Re: whats wrong with my IP address?

Zach Brown (zab@grumblesmurf.net)
Tue, 19 Nov 1996 18:58:46 -0800 (PST)


On Tue, 19 Nov 1996, Dave Wreski wrote:

> On Tue, 19 Nov 1996, Zach Brown wrote:
> >
> > how about: "route add -net 127.0.0.0 netmask 255.0.0.0 lo" ? works for
> > me. what is the current contents of your routing table? you are bringing
> > up lo before doing the route command, right?
>
> Sure am. Like I said, it worked once before (under 3.0.3 redhat). This
> route command does not work for me. There must be something else wrong.
> 'route add -net 127.0.0.0 netmask 255.0.0.0 lo' gives me:
>
> route: netmask doesn't match route address

hmm.. that is odd.

the code that does this seems to be:
mask = ((struct sockaddr_in *) &rt.rt_dst)->sin_addr.s_addr;
if (mask & ~mask_in_addr(rt)) {

so wouldn't this only happen when there bits in the source addr and not in
the netmask? i.e. (127.1.0.0 & ~(255.0.0.0)) == 0.1.0.0

and this isn't the case in 127.0.0.0 and 255.0.0.0. am I getting my
logic all confused? :)

my route also doesn't have nearly as much goop compiled in as yours:

Source: net-tools 1.32-alpha net-tools@lina.inka.de (Bernd Eckenfels)
Kernelsource: 2.0.13
route 1.92 (1996-04-26)
+NEW_ADDRT +RTF_IRTT +RTF_REJECT -NLS
AF:(inet) +UNIX +INET -IPX -AX25 -NETROM -ATALK
HW: +ETHER -ARC +SLIP +PPP +TUNNEL -TR -AX25 -NETROM -FR

(though it does have the route cache listing patch I did, but that
shouldn't be an issue :))

> AF:(inet) +UNIX +INET +IPX +AX25 +NETROM +ATALK
> HW: +ETHER +ARC +SLIP +PPP +TUNNEL +TR +AX25 +NETROM +FR
>
> Well, I understand your point. However, because I am behind a
> firewall/proxy, and because ppp defines my defaultroute, there really
> shouldn't be a problem, right? Nevertheless, I will change my IP address
> to represent an unused IP. Isn't there a class C that is also reserved?

true. but then if you ever want to do something cool like masquerading
you will have to renumber. and yeah, there is a group of class c's that
are allocated as well, but I don't have the rfc handy :(

> Hm.. Guess I'll have to check into that :) As a matter of fact, I just
> noticed that RedHat 4.0 doesn't have 'dc' installed at all... It sure
> used to work...

I got it from the gnu sources I think.

-- z