From: gsa@easyaspi.udev.cdc.com (gary s anderson)
Newsgroups: comp.protocols.tcp-ip
Subject: Re: default address mask selection for a point-to-point network?
Date: 9 Apr 92 22:16:00 GMT
Article-I.D.: shamash.40660
Reply-To: gsa@easyaspi.udev.cdc.com (gary s anderson)

In article <BOB.92Apr9155631@volitans.MorningStar.Com>, bob@MorningStar.Com (Bob Sutterfield) writes:
|> In article <40635@shamash.cdc.com> gsa@easyaspi.udev.cdc.com (gary s anderson) writes:
|>    In article <BOB.92Apr8122251@volitans.MorningStar.Com>, bob@MorningStar.Com (Bob Sutterfield) writes:
|>       From which address (local or remote) should a host infer the
|>       default subnet address mask for a point-to-point network?
|> 
|>    one would assume that you would not issue a mask request for either
|>    of the addresses because the full mask is already known.
|> 
|> Though RFC-1122 section 3.2.2.9 talks about ICMP Address Mask
|> transactions, it was the only place I could find *any* discussion of
|> decisions leading to picking a particular address mask size and shape.
|> 
|>    The one interesting point in your request is the possibility of the
|>    local and remote IP address for a point to point link to be in
|>    different subnets.  This seems like an odd configuration, 
|> 
|> Not at all, here's an example from a Sun.  du0 is our dialup link to
|> OARnet, and du1 is a fabricated link to the old ohio-state.arpa:
|> 
|> 3:27pm> ifconfig -a
|> le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
|>         inet 137.175.2.11 netmask ffffff00 broadcast 137.175.2.255
|>         ether 0:c0:7:0:0:1e
|> lo0: flags=49<UP,LOOPBACK,RUNNING>
|>         inet 127.0.0.1 netmask ff000000
|> du0: flags=51<UP,POINTOPOINT,RUNNING>
|>         inet 137.175.2.11 --> 131.187.1.12 netmask ffff0000
|> du1: flags=51<UP,POINTOPOINT,RUNNING>
|>         inet 137.175.2.11 --> 192.5.58.18 netmask ffff0000
|> 3:27pm>
|> 
|> It's very common for point-to-point links to run between networks.  In
|> such a case, the routing tables look like
|> 
|> 3:27pm> netstat -rn | egrep du\|table\|Flag
|> Routing tables
|> Destination          Gateway              Flags    Refcnt Use        Interface
|> 192.5.58.18          137.175.2.11         UH       0      0          du1
|> 131.187.1.12         137.175.2.11         UH       0      24         du0
|> default              131.187.1.12         UG       10     10051      du0
|> 3:27pm>

This was my initial point.  From a routing perspective, a point-to-point
link uses full 32-bit addressing.  In this configuration the network mask
associated with the interface is not used in any routing decisions.

|> 
|> As you note from du1's ifconfig above, our PPP software's behavior
|> (which I'm questioning) is to deduce a default netmask based on the
|> address class of the local end of the wire.
|> 
|>    however, it seems that you would use the subnet assigned to the
|>    local address in order to be consistent with other interfaces
|> 
|> The need for consistency between interfaces is, I think, an artifact
|> of deficiencies in some vendors' 4.3BSD-based code, or perhaps in
|> 4.3BSD itself.  I haven't examined tahoe, reno, BSDI, or 4.4 to see
|> what they do.  I don't believe non-4.3 IP implementations (e.g. in a
|> real router) require or enforce netmask consistency between
|> interfaces.
|> 
|> And besides, which other local non-point-to-point interface should I
|> choose as my sample netmask?  The example above shows one Class-A and
|> one Class-B with Class-C style subnetting.
|> 

I probably wasn't clear here.  The ICMP Address Mask Response code dips
into the *ia* structure to find the subnet mask.  This structure contains
the interface address subnet mask for the local IP address.  By "consistent"
I meant to use the same code for all interfaces (i.e. supply the subnet
mask of the corresponding local IP address), including point to point links.
(NOTE - this is what you should get from a BSD-based solution).  I did not 
mean to imply that you would use the mask from a different interface.....

|>    (on the curious side, where would you get the remote subnet mask
|>    from, another routing table entry).
|> 
|> Since PPP's IPCP lacks an address mask negotiation option, we depend
|> upon the user to set it from the daemon startup command line if (a)
|> they care and (b) the default was inappropriate.
|> 
|>    In fact does anyone really use the ICMP Address Mask Request on
|>    point-to-point links (does it even make sense)?
|> 
|> I don't think so, and I don't think it even makes sense.  But some
|> software (e.g. routed) cares about the mask it sees on "up"
|> interfaces, so we try to set the masks appropriately when we ifconfig
|> the point-to-point interface.

May I ask what particular piece of software cares?  My limited view of
the world has seen code which special cases point to point links and
looks at them as src/dest pairs rather than src/mask pairs.  Are there
SNMP managers which flag an interface as a bogus point to point link if the
subnet mask is not what was expected?  Even if they did, is this a major
problem (i.e. can't the manager reset the mask or, worst case, isn't this
a one time change to some initialization script (if you made an error
the first time))?

|> 
|>    If what you really want is to advertise information about the
|>    network (or subnet) accessible via the point-to-point link, which
|>    matches the network (or subnet) in the point-to-point link IP
|>    address, then define another routing table entry which explicitly
|>    defines the information you want to disseminate.
|> 
|> Today, our users with gated set the netmask explicitly from the pppd
|> command line, if the default is inappropriate, before starting gated.
|> This gets the correct information disseminated.  And BSD netmasks are
|> stored in per-interface information, not in the routing table.