Networking Forums

Networking Forums > Computer Networking > Linux Networking > Broadcast routing problem with duplicate IPs

Reply
Thread Tools Display Modes

Broadcast routing problem with duplicate IPs

 
 
Thomas Boehne
Guest
Posts: n/a

 
      06-24-2004, 08:27 AM
Hi all,

I am stuck with a little IP/firewall/routing problem:

If a linux box "A" has the same IP address as another host "B" on
the network, UDP broadcasts from B to 255.255.255.255 seem to be
silently discarded on A in the routing layer (everything works as
expected if A and B have different IPs). Discarding those packets
is reasonable (since TCP/IP forbids this setup), but for my needs
I need a workaround for this problem ("A" is an embedded linux
device which IP address is configured using UDP broadcasts).

I tried using iptables to change the source address of the incoming
broadcast, but SNAT is only possible in POSTROUTING (as mentioned
before, the packet is discarded during routing. iptables can log it
in PREROUTING, but it is gone in INPUT/FORWARD and POSTROUTING).

So I tried to modify the routing tables to pass the packets to my
local server process. Using "ip" I inspected the routing tables and
found the following rules:

192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.50
broadcast 192.168.1.0 dev eth1 table local proto kernel scope link src 192.168.1.50
local 192.168.1.50 dev eth1 table local proto kernel scope host src 192.168.1.50
broadcast 192.168.1.255 dev eth1 table local proto kernel scope link src 192.168.1.50

When I remove the "local" entry, the broadcast packets arrive at my
application, but all other network connections fail (obviously).
How must I set up routing so that networking behaves as usual, with
the only difference being that broadcasts from other systems are always
passed to local applications?

Other workarounds are welcome, too (except for: "use different IPs").

Thanks, Thomas
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing broadcast Frank Grunwald Windows Networking 1 12-15-2005 01:47 PM
Routing question, how to duplicate route table in new distro? Ohmster Linux Networking 1 05-08-2005 06:33 PM
MN-700 MAC broadcast problem Matt Broadband Hardware 4 08-15-2004 03:49 AM
routing broadcast traffic wilson Linux Networking 1 06-17-2004 07:03 AM
block broadcast packets from routing Dave Lister Linux Networking 1 09-16-2003 08:01 PM



1 2 3 4 5 6 7 8 9 10 11