home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.protocols.tcp-ip
- Subject: Re: Broadcasting and Subnets
- Date: 3 Sep 1992 08:18:00 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 28
- Message-ID: <184hnoINN7tu@early-bird.think.com>
- References: <2490@cronos.metaphor.com>
- NNTP-Posting-Host: gandalf.think.com
-
- 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.
-
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-