Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Apr 2001 10:28:44 +1000
From:      Tony Landells <ahl@austclear.com.au>
To:        Alexander <amour@bugs.elitsat.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: routings 
Message-ID:  <200104020028.KAA03222@tungsten.austclear.com.au>
In-Reply-To: Message from Alexander <amour@bugs.elitsat.net>  of "Fri, 30 Mar 2001 22:14:11 %2B0300." <Pine.BSF.4.21.0103302200450.50250-100000@bugs.elitsat.net> 

next in thread | previous in thread | raw e-mail | index | archive | help

amour@bugs.elitsat.net said:
> It is like: 
>	aaa.bbb.ccc.129/32         	aaa.bbb.ccc.0/240
>		|                                  |
>		|                                  |
>                -----------------------------------
>               |
>   ... ---- aaa.bbb.ccc.1/24 --- aaa.bbb.ccc.2/(24?)
>		|
>		|
>		|
>		-------------------------- aaa.bbb.ccc.OTHER_IPS_FROM_THE_NET

I can't see what distinction you are trying to make in this diagram
from the one I sent.  The basic point is that you have to go through
aaa.bbb.ccc.1 to get to aaa.bbb.ccc.2.

Your network design is wrong.

As for your note:
> (These machines are linuxes and the netmask doesn't matter to them)

I find that hard to believe.  The netmask is a fundamental component
of TCP/IP networking and is what actually defines a network.

The only way that the above network would work is if the gateway at
aaa.bbb.ccc.1 were to provide you proxy ARP for the other devices on
aaa.bbb.ccc.0/24, so that he picks up that traffic (and then forwards
it).  Similarly, it would probably need to provide proxy ARP for your
address to the other boxes so they can send traffic back to you.

> I'm aaa.bbb.ccc.129/32  and my problem is that my netmask must be
> 255.255.255.0 to catch the gateway (rc.conf: ifconfig_ed0="inet
> .... netmask 255.255.255.0")

Yes, it must.

> But on boot my sendmail hangs because somehow it tries to resolve some
> host or something and it contacts to my nameserver, which is not on the
> same network segment (aaa.bbb.ccc.2). If I change the netmask to
> 255.255.255.255 (hostmask) then the gateway won't add to the routing
> table. So the only thing I can do is to leave the netmask by default to
> Class C and then after the booting I do   rc.local: ifconfig ed0 inet
> aaa.bbb.ccc.129 netmask 255.255.255.255   and then I start sendmail, but
> this is really ugly and there must be other way to do that.

You can't set a netmask to 255.255.255.255 (ignoring for the moment some
special purpose uses) because what you're saying is that there is nothing
else on that interface.  The longest meaningful netmask is 255.255.255.252
(since out of every "network" you should remove the last address as the
broadcast address and, for safety, the first address as well, so if you
use a netmask of 255.255.255.254 you get no "host assignable" addresses).

Assuming you used that netmask (255.255.255.252) the only hosts on your
network are aaa.bbb.ccc.129 and aaa.bbb.ccc.130.  Strangely enough, that
doesn't include your supposed gateway.  And if you can't talk to your
gateway, you can't talk to anything through that gateway.

So there's another option for you if you don't want proxy ARP (and you
probably don't...)--get the administrator of your gateway to set an
address of aaa.bbb.ccc.130 on your interface with a netmask of
255.255.255.252 so that you have a gateway on your network that doesn't
suggest that systems on other segments should also be directly accessible.

I mean really, your network administrator should have assigned you
an address, a netmask and a gateway address for your segment since he's
supposed to understand this stuff.

If he told you that your IP address is aaa.bbb.ccc.129 and the gateway
is aaa.bbb.ccc.1, then the netmask can't be more specific that
255.255.255.0.  Honestly.  There is no doubt.  One bit more and you
would no longer be able to talk to the gateway, and that would be
wrong beyond any question.  (And take note that I seldom make such
definite statements.)

So IF you are aaa.bbb.ccc.129, your gateway is aaa.bbb.ccc.1 and the
netmask is (no more specific than) 255.255.255.0 and systems such as
aaa.bbb.ccc.2 are on different segments, then the gateway needs to be
doing some sort of forwarding at the Ethernet level (proxy ARP/bridging
type stuff that I don't know so much about).

On the other hand, if he's not doing some sort of proxy ARP or bridging
stuff, then he MUST give you a different gateway address and netmask.

Perhaps you should ask your network administrator how it's supposed
to work???

Cheers,
Tony
-- 
Tony Landells					<ahl@austclear.com.au>
Senior Network Engineer				Ph:  +61 3 9677 9319
Australian Clearing Services Pty Ltd		Fax: +61 3 9677 9355
Level 4, Rialto North Tower
525 Collins Street
Melbourne VIC 3000
Australia



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104020028.KAA03222>