home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!nntp1.radiomail.net!cronos!Metaphor.COM!pstevens
- From: pstevens@Metaphor.COM (Paul Stevens)
- Newsgroups: comp.protocols.tcp-ip
- Subject: Broadcasting and Subnets
- Message-ID: <2490@cronos.metaphor.com>
- Date: 3 Sep 92 00:36:00 GMT
- Sender: news@cronos.metaphor.com
- Reply-To: pstevens@Metaphor.COM (Paul Stevens)
- Organization: m4
- Lines: 35
-
- After looking in all the usual places (Comer, Stevens, Tanenbaum)
- there's still some loose ends I don't quite understand.
-
- When I want to send a broadcast packet to all stations on a net or
- subnet I set the IP address so that it contains the network/subnet
- numbers but set the host portion to all 1's. This is, of course,
- net/subnet OR'ed with the inverse of the subnet mask. Presumably
- this style of addressing even works for a net/subnet that might be
- several hops away (i.e. the routers along the route will use the
- net/subnet fields of the IP address to route the packet to the proper
- net/subnet). My basic question concerns how to get a the correct
- subnet mask.
-
- Comer discusses using an ICMP message that can be sent to a gateway
- to learn the subnet mask for a given network, but doesn't list any
- programatic interfaces to this type of query.
-
- What I don't understand is how networks and subnets get *named*.
- The documentation on getnetbyname seems to imply that it uses
- /etc/networks to return information and also does not give the subnet
- mask.
-
- Is this all hooked into Domain Name Servers somehow? I know that
- locally on a Unix system one could use the combination of /etc/networks
- and /etc/netmasks to get this information. But that implies that
- each host would have to have these files kept up-to-date for all nets
- that might be communicated with. There must be a missing piece here
- that allows these things to be administered more centrally and for
- inquiries to be made remotely.
-
- +------------------------------------------------------------------------+
-
- Paul Stevens {apple|decwrl}!metaphor!pstevens
- Metaphor Computer Systems pstevens@metaphor.com
- Mountain View, CA
-