From: bob@MorningStar.Com (Bob Sutterfield)
Subject: Re: default address mask selection for a point-to-point network?
Organization: Morning Star Technologies
Date: Thu, 9 Apr 1992 19:56:43 GMT

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>

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.

   (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.

   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.
Newsgroups: comp.protocols.tcp-ip