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

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.protocols.tcp-ip
  4. Subject: Re: Broadcasting and Subnets
  5. Date: 3 Sep 1992 08:18:00 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 28
  8. Message-ID: <184hnoINN7tu@early-bird.think.com>
  9. References: <2490@cronos.metaphor.com>
  10. NNTP-Posting-Host: gandalf.think.com
  11.  
  12. In article <2490@cronos.metaphor.com> pstevens@Metaphor.COM (Paul Stevens) writes:
  13. >When I want to send a broadcast packet to all stations on a net or
  14. >subnet I set the IP address so that it contains the network/subnet
  15. >numbers but set the host portion to all 1's.  This is, of course,
  16. >net/subnet OR'ed with the inverse of the subnet mask.  Presumably 
  17. >this style of addressing even works for a net/subnet that might be
  18. >several hops away (i.e. the routers along the route will use the 
  19. >net/subnet fields of the IP address to route the packet to the proper
  20. >net/subnet).  My basic question concerns how to get a the correct
  21. >subnet mask.
  22.  
  23. There's no common method for this.  In general, hosts are only expected to
  24. know the subnet mask for their local networks.  Hosts are only supposed to
  25. use subnet masks to determine whether a destination can be reached directly
  26. or must go via a router.  All non-local addresses are equivalent to hosts.
  27.  
  28. Recent routing protocols transmit subnet masks along with routes, but these
  29. are intended only for use by routers, not individual hosts.
  30.  
  31. Sending broadcasts to remote networks is frowned upon, so there's no
  32. special support to make it easy.  If you want to do it, you're on your own
  33. for a mechanism to learn the appropriate broadcast address for that subnet.
  34.  
  35. -- 
  36. Barry Margolin
  37. System Manager, Thinking Machines Corp.
  38.  
  39. barmar@think.com          {uunet,harvard}!think!barmar
  40.