Article View: comp.protocols.ppp
Article #159Broadcast over SLIP
From: Bob Sutterfield
Date: Tue, 29 Sep 1992 08:27
Date: Tue, 29 Sep 1992 08:27
72 lines
3979 bytes
3979 bytes
Date: Tue, 29 Sep 1992 03:18:59 -0500
From: cbwierda@ar14darlrk.er.usgs.gov (Clark B. Wierda)
I take then that this also applies to IP packets of the form
aaa.bbb.ccc.255?
Your Ethernet interface might be on a LAN numbered aaa.bbb.ccc.0, in
which case your kernel's IP would know that it can broadcast on that
network by using aaa.bbb.ccc.255 as the packet's destination address,
and handing it to the Ethernet interface (le0 or whatever) to be
placed on the medium that carries that network's traffic.
But a point-to-point IP link (whether it's using SLIP or PPP or
whatever other encapsulation) is not a network, it's just a way to get
packets to a particular host. Not being a network, it doesn't have a
broadcast address. (On a BSD system, note the struct ifaddr
definition in <net/if.h>: the same field is used for either a
network's broadcast address, or a link's destination address.)
For example, here's what my workstation looks like right now. I
started a couple of bogus PPP daemons (on du*) so you'd see what such
interfaces look like:
11:49am> ifconfig -a
le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
inet 137.175.2.11 netmask ffffff00 broadcast 137.175.2.255
ether 8:0:20:7:b5:72
lo0: flags=49<UP,LOOPBACK,RUNNING>
inet 127.0.0.1 netmask ff000000
du0: flags=51<UP,POINTOPOINT,RUNNING>
inet 192.9.200.3 --> 192.5.58.18 netmask ffffff00
du1: flags=51<UP,POINTOPOINT,RUNNING>
inet 128.6.4.2 --> 192.112.36.4 netmask ffff0000
11:49am>
I also added routes pointing across the links, to reach the networks
one might find there. Here's the output of "netstat -rn", rearranged
a bit for easier reading:
11:49am> netstat -rn
Routing tables
Destination Gateway Flags Refcnt Use Interface
127.0.0.1 127.0.0.1 UH 5 424 lo0
137.175.2.0 137.175.2.11 U 27 124016 le0
default 137.175.2.1 UG 3 4673 le0
192.5.58.18 192.9.200.3 UH 0 0 du0
192.5.58.0 192.5.58.18 UG 0 0 du0
192.112.36.4 128.6.4.2 UH 0 0 du1
192.112.36.0 192.112.36.4 UG 0 0 du1
137.175.3.0 137.175.2.3 UG 0 0 le0
137.175.6.0 137.175.2.7 UG 0 923 le0
137.175.9.0 137.175.2.6 UG 0 0 le0
137.175.11.0 137.175.2.7 UG 0 0 le0
134.19.0.0 137.175.2.10 UG 0 0 le0
11:49am>
Some IPs support directed broadcast, which sounds like what you'd like
to do. For example, if I wanted to broadcast on the net to which
192.5.58.18 is attached, I would set the destination address on my
packet to 192.5.58.255, and my IP (if it supports directed broadcasts)
would see the Gateway route (the one labeled UG) for 192.5.58.0, pass
it across the link by which it knows that it can get to that network.
It knows that by looking at the Gateway that's listed in the Gateway
route line, and then it uses the Host route (labeled UH) by which it
gets to the machine listed as the Gateway.
Does that make sense? Let me know if I can help clear it up, or if
I'm entirely misguided.
Technical Details
Message-ID:
<9209291627.AA01593@volitans.morningstar.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!morningstar.com!bobReferences:
<9209290818.AA23777@ar14darlrk.er.usgs.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!morningstar.com!bob From: bob@morningstar.com (Bob Sutterfield) Newsgroups: comp.protocols.ppp Subject: Broadcast over SLIP Message-ID: <9209291627.AA01593@volitans.morningstar.com> Date: 29 Sep 92 08:27:13 GMT Article-I.D.: volitans.9209291627.AA01593 References: <9209290818.AA23777@ar14darlrk.er.usgs.gov> Sender: daemon@cis.ohio-state.edu Organization: The Ohio State University Department of Computer and Information Science Lines: 72