home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!uwm.edu!spool.mu.edu!news.cs.indiana.edu!arizona.edu!telcom.arizona.edu!leonard
- From: leonard@telcom.arizona.edu (Aaron Leonard)
- Newsgroups: comp.protocols.tcp-ip
- Subject: Re: Broadcasting and Subnets
- Message-ID: <1992Sep3.090735.3657@arizona.edu>
- Date: 3 Sep 92 16:07:33 GMT
- Article-I.D.: arizona.1992Sep3.090735.3657
- References: <2490@cronos.metaphor.com> <184hnoINN7tu@early-bird.think.com>
- Reply-To: Leonard@Arizona.EDU
- Distribution: world,local
- Organization: University of Arizona Telecommunications
- Lines: 38
- Nntp-Posting-Host: bugs.telcom.arizona.edu
-
- In article <184hnoINN7tu@early-bird.think.com>, barmar@think.com (Barry Margolin) writes:
- |
- | In article <2490@cronos.metaphor.com> pstevens@Metaphor.COM (Paul Stevens) writes:
- | >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.
- |
- | There's no common method for this. In general, hosts are only expected to
- | know the subnet mask for their local networks. Hosts are only supposed to
- | use subnet masks to determine whether a destination can be reached directly
- | or must go via a router. All non-local addresses are equivalent to hosts.
- |
- | Recent routing protocols transmit subnet masks along with routes, but these
- | are intended only for use by routers, not individual hosts.
- |
- | Sending broadcasts to remote networks is frowned upon, so there's no
- | special support to make it easy. If you want to do it, you're on your own
- | for a mechanism to learn the appropriate broadcast address for that subnet.
-
- The best and easiest approach is just to use ALL 1's (255.255.255.255) as your
- broadcast address. That way you don't have to worry about your subnet mask,
- or for that matter even what your own IP address is. Recommended by
- RFC-1122, sec. 3.3.6 (discussion section.)
-
- This won't let you send a broadcast to a remote network, of course, but that
- won't work anyway. Use multicast for this.
-
- Aaron
-
- Aaron Leonard (AL104), <Leonard@Arizona.EDU>
- University of Arizona Network Operations, Tucson AZ 85721
- |> If it ain't broke, break it.
-