[NTLUG:Discuss] Routing BROADCAST messages.

Rusty Haddock/KD4WLZ rusty at fe2o3.lonestar.org
Sat Aug 19 02:28:16 CDT 2000


Steve Baker wrote:
    >Rusty Haddock wrote:
    >> 
    >> Steve,
    >>    Sounds like the broadcast address you're using in your program might
    >> not be correct.  I'm almost thinking that might be '0.0.0.0' or
    >> '255.255.255.255'.  I've attached a UDP broadcaster, in C, that I wrote
    >> many moons ago.  It's intention was to broadcast small packets of data
    >> and, any machine on the net that wanted to listen would simply listen on
    >> the pre-arranged IP port and soak up the data.  Maybe it'll help.
    >
    >OK - so I looked at your code - and the network-related parts are indeed
    >identical to my own code *except* for the choice of broadcast address.
    >
    >  #define APRS_BRDCST_ADDR        0xc0a806ff  /* 192.168.6.255 */
    >
    >...which seems awfully like something special on your own network...
    >apart from the '255' on the end.

Yup, that's right.  I want my broadcasts to stay on my LAN(s) and go
nowhere else!

    >OK - so I know why you chose 192.168.xx.xx - that's the right choice
    >for an internal network - which is what I have.  I guess the '255'
    >at the end means "Broadcast" - so does the '6' have any special
    >significance?

For me, a little bit.  Most folks use 192.168.0.blah for their private
networks which is fine.  Still, private networks are permitted to specify
the third octet as well.  Since my wife and I have our birthdays in June
our main workstations are IP'd with 192.168.6.xx.  June is the 6th month
of the year, right?  :-)

    >All my machines have 192.168.0.xx addresses.

All of my machines are either 192.168.6.xx or 192.168.7.xx, depending
on which of the house networks they're connected.  .6.xx is my 100BaseT net
and .7.xx is my 10BaseT net.

    >If I run my code with 192.168.6.255, I don't get any errors - but
    >my program doesn't see it's own messages reflected back on the same
    >port - and no packets are being sent out on the 10baseT port.

Yup, that's what the netmask for your 10BaseT port is s'pose to do.

    >If I hang up the modem so PPP shuts down, I get a "Network is
    >unreachable" error from 'sendto' - which makes sense - none of
    >my machines are on a 192.168.6.xx sub-net and we are (hopefully)
    >on a class C network here.

    >If I change it to use 192.168.0.255 (which makes some kind of
    >sense because all my machines have 192.168.0.xx local addresses)
    >then the machine can see it's own messages being reflected back
    >at it - but there are still no messages going down the local
    >10baseT lines - and (of course) none of the other machines
    >can see those messages.  This behavior is the same whether
    >the modem is connected to my ISP or not.  I know the 10baseT
    >stuff is working because my home network is functioning perfectly
    >and I routinely run NFS from the same computer.

I'm not quite sure why but it could be that dummy0 interface.

Tell you what -- bring your current code with you to the meeting Saturday
and we'll go over it and I'll try to give you what little knowledge I have
about IP broadcasts. 

    >I've been looking at the 'ifconfig' output - and I notice that
    >both 'dummy0' and 'eth0' mention 'Bcast:192.168.0.255'.  Is this
    >'dummy0' thing swallowing correctly broadcast packets or something?

I suspect so.  It's late but wasn't the dummy interface was used on
machines that didn't have a network port, ppp, eth, or otherwise but it
kept the network code in the kernel from spazzing out.

I'd say, lose the dummy!  :-) Check out that Netmask setting too!  I'd bet
that that is the reason you're missing packets. 

See you at the meeting?

	-Rusty-

    >ifconfig (with the modem hung up) says:
    >
    >dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
    >          inet addr:192.168.0.97  Bcast:192.168.0.255  Mask:255.255.255.255
    >          inet6 addr: fe80::/10 Scope:Link
    >          inet6 addr: fe80::200:ff:fe00:0/10 Scope:Link
    >          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
    >          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    >          TX packets:1228 errors:0 dropped:0 overruns:0 carrier:0
    >          collisions:0 txqueuelen:0

-- 
   _____        Rusty Haddock  =  KD4WLZ  =  rusty at fe2o3.lonestar.org
|\/   o \   o
|   (  -<  O o  Thanks, Sparky!          Charles M Schulz (1922-2000)
|/\__V__/




More information about the Discuss mailing list