Re: question about /etc/route


Philip A. Prindeville (PAP4@AI.AI.MIT.EDU)
Thu, 4 Feb 88 23:04:48 EST


    Am I right that the following entry is taken as a host entry and not
    a network entry?

    # route add 128.174.22 mygateway 3

    produces a netstat -r -n output:

    128.174.0.22 128.174.20.77 UGH

    Seems that route isn't using the subnet mask (8 bit subnet on Class B) to
    determine that the 128.174.22 is a separate subnet instead of a host.

    A bug? Fixed in later release?

Actually, it's minor brain-death in the way BSD parses addreses. If you
leave dotted numbers out, all but the last set of digits get left
justified in the address, whereas the last digit gets right justified.
Therefore, 10.51 == 10.0.0.51, and 128.174.22 == 128.174.0.22.
If you try:

# route add 128.174.22.0 mygateway 3

you will find this nastiness goes away. And I thought that standard
notation for internet addresses was four dotted digits...

-Philip

-------



This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:40:42 GMT