home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / protocol / tcpip / 4287 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  2.5 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!spool.mu.edu!news.cs.indiana.edu!arizona.edu!telcom.arizona.edu!leonard
  2. From: leonard@telcom.arizona.edu (Aaron Leonard)
  3. Newsgroups: comp.protocols.tcp-ip
  4. Subject: Re: Broadcasting and Subnets
  5. Message-ID: <1992Sep3.090735.3657@arizona.edu>
  6. Date: 3 Sep 92 16:07:33 GMT
  7. Article-I.D.: arizona.1992Sep3.090735.3657
  8. References: <2490@cronos.metaphor.com> <184hnoINN7tu@early-bird.think.com>
  9. Reply-To: Leonard@Arizona.EDU
  10. Distribution: world,local
  11. Organization: University of Arizona Telecommunications
  12. Lines: 38
  13. Nntp-Posting-Host: bugs.telcom.arizona.edu
  14.  
  15. In article <184hnoINN7tu@early-bird.think.com>, barmar@think.com (Barry Margolin) writes:
  16. | In article <2490@cronos.metaphor.com> pstevens@Metaphor.COM (Paul Stevens) writes:
  17. | >When I want to send a broadcast packet to all stations on a net or
  18. | >subnet I set the IP address so that it contains the network/subnet
  19. | >numbers but set the host portion to all 1's.  This is, of course,
  20. | >net/subnet OR'ed with the inverse of the subnet mask.  Presumably 
  21. | >this style of addressing even works for a net/subnet that might be
  22. | >several hops away (i.e. the routers along the route will use the 
  23. | >net/subnet fields of the IP address to route the packet to the proper
  24. | >net/subnet).  My basic question concerns how to get a the correct
  25. | >subnet mask.
  26. | There's no common method for this.  In general, hosts are only expected to
  27. | know the subnet mask for their local networks.  Hosts are only supposed to
  28. | use subnet masks to determine whether a destination can be reached directly
  29. | or must go via a router.  All non-local addresses are equivalent to hosts.
  30. | Recent routing protocols transmit subnet masks along with routes, but these
  31. | are intended only for use by routers, not individual hosts.
  32. | Sending broadcasts to remote networks is frowned upon, so there's no
  33. | special support to make it easy.  If you want to do it, you're on your own
  34. | for a mechanism to learn the appropriate broadcast address for that subnet.
  35.  
  36. The best and easiest approach is just to use ALL 1's (255.255.255.255) as your
  37. broadcast address.  That way you don't have to worry about your subnet mask,
  38. or for that matter even what your own IP address is.  Recommended by 
  39. RFC-1122, sec. 3.3.6 (discussion section.)
  40.  
  41. This won't let you send a broadcast to a remote network, of course, but that
  42. won't work anyway.  Use multicast for this.
  43.  
  44. Aaron
  45.  
  46. Aaron Leonard (AL104), <Leonard@Arizona.EDU>
  47. University of Arizona Network Operations, Tucson AZ 85721
  48. |>   If it ain't broke, break it.
  49.