[292] in linux-net channel archive
Re^2: Linux-Activists - NET Channel digest. 95-4-9-6:26
daemon@ATHENA.MIT.EDU (Michael Weller)
Tue May 9 09:12:54 1995
Date: Tue, 9 May 1995 12:51:15 +0200 (MSZ)
From: Michael Weller <eowmob@exp-math.uni-essen.de>
To: Jeanette Pauline Middelink <middelin@polyware.iaf.nl>
Cc: linux-net@vger.rutgers.edu,
Linux Forum at Niksula <linux-activists@joker.cs.hut.fi>
In-Reply-To: <9505090900.AA15117@pollux.exp-math.uni-essen.de>
X-Mn-Key: NET
[One thing first. You know that this mailserver is scheduled to be removed?
Most people of this and the other linux channels have moved to the "new"
linux mail forum at vge.rutgers.edu. send a mail containing a single
line of help to majordomo@vger.rutgers.edu. Still I expect most (like me)
listening here, bot no longer posting at the old server]
> From: Jeanette Pauline Middelink <middelin@polyware.iaf.nl>
> Subject: Re: Linux-Activists - NET Channel digest. 95-4-8-23:45
> Date: Tue, 9 May 1995 07:59:15 +0200 (MET DST)
>
> > > # ifconfig sl0 193.170.67.253 pointopoint 193.170.67.190
> > > # ifconfig sl0 netmask 255.255.255.255
> >
> > A netmask of 255.255.255.255 is a network of one address, the port on
> > you are ifconfigging. It would be a mistake to configure your port like
> > this. I presume Alan has coded the ifconfig command to prevent you from
> > making this mistake.
correct.
> No, the function long inet_ntoa(const char *) returns -1 for
> an error. And guess what 255.255.255.255 (0xFFFFFFFF) resolves
> to? Right. -1.
*laugh* Indeed inet_ntoa has problems to return any special value for an
error. You'll probably have to change it's prototype to return one
errorflag and the converted address. (somehow like strtol does it in some
sense for example (Ok,ok.. it merely return a pointer to the next
unconverted char)). But then this would cost common Unix/Posix
compatibility so you have to live with it.
> An single point can be used for a slip line, which has only
> one IP address... An netmask of 255.255.255.255 is valid for
> this one-netter.
Uhm. nope. A slip interface has always exactly two reachable ip
addresses. to stay with above example: 193.170.67.253 and 193.170.67.190.
Above ifconfig makes both addresses valid. A netmask of 255.255.255.255
would make one of both unreachable and make the slip line unusable. Using
another netmask will usually look like if there are other people
reachable directly via this interface to (except when both ip addresses
only differ in the last bit) which is horribly wrong either.
A netmask is required for networks where you can directly reach more than
one other partner (not counting yourself). There you must tell your
machine which range of ip-addresses can be directly reached with this
interface.
There is nothing like that for slip. There are two fundamental types of
interfaces, that is pointtopoint (which does not have a netmask) (say
SLIP, PPP, PLIP) and those that are not pointtopoint (which need a netmask)
(ethernet, tokenring, FDDI, ...)
Usually the value of netmask is simply ignored for pointtopoint interfaces.
Thus one could claim that above netmask ifconfig should simply fail
telling that sl0 is in pointtopoint mode w/o a netmask. It could also try
to set sl0 into a non pointtopoint netmode (maybe that is what it is
actually doing?) but I don't know a way to run slip in a non
pointtopoint fashion, so it should maybe not try to do so and be smart
enough to fail..
All in all you should simply not set a netmask for a slip line at all as
ifconfig may actually do what you ask it to do and screw the line up.
Michael.
(eowmob@exp-math.uni-essen.de or eowmob@pollux.exp-math.uni-essen.de
Please do not use my vm or de0hrz1a accounts anymore. In case of real
problems reaching me try mat42b@aixrs1.hrz.uni-essen.de instead.)