LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-10-2012, 04:37 PM   #1
crust
LQ Newbie
 
Registered: Sep 2010
Posts: 6

Rep: Reputation: 0
Trouble with bridge, iptables, ebtables on embedded system (odd config)


I have an embedded system that I am having some trouble with getting the networking up and running. Here is the configuration in as good a drawing as I can make for brevity I just put the last octets of the IP configuration. I've been struggling to get this working so any help is much appreciated.

To understand my picture, anything under the red segment needs to see the PC and everything in the blue segment needs to see the controller at the far right with the 199 address. The problem is that the 199 is duplicated along every one of these paths so I don't want the PC to see it. Right now *MOST* everything works. However there is one failure that I cannot figure out.

If I were to start at one of the cpus (1.1) and ping (1.2) it mostly works but on occasion will fail. It fails *I THINK* because the 1.1 does an arp and one of the other 1.2s responds. I've tried iptables, ebtables, and arptables and have not gotten it to do what I want. Basically I think all I need to do is at br0 of 1.1 stop all arps that try to go from its eth0. But I can't figure out how.

The exact message I get is
br0: received packet on eth0 with own address as source address

As a simple experiment I did the following on one of the embedded CPUs (.7):
# arptables -P INPUT DROP
# arptables -P FORWARD DROP
# arptables -P OUTPUT DROP
# br0: received packet on eth0 with own address as source address

I still get the message, on the other hand, it doesn't seem to break anymore (I realize this completely cuts off arp on one of the groups).

I used the physdev attributes of iptables in order to cut off the 1.X network from the 0.X network (or so I thought), but it seems to have no effect.

/sbin/iptables -A INPUT -m physdev --physdev-in eth0 \
! -s 169.254.0.0/24 -j DROP

/sbin/iptables -A FORWARD -m physdev --physdev-is-bridge \
-d 169.254.1.0/24 -j DROP



I am not married to this approach if there is a better way to do it. This is what I was able to figure out.

Thanks

Click image for larger version

Name:	network picture.png
Views:	30
Size:	61.1 KB
ID:	8801

Last edited by crust; 01-10-2012 at 04:58 PM. Reason: Updated picture, added some code from my script
 
Old 01-10-2012, 05:50 PM   #2
tsumaru
LQ Newbie
 
Registered: Jan 2012
Distribution: Ubuntu
Posts: 18

Rep: Reputation: Disabled
just a quick observation.. everything in the blue section is essentially all connected to the same switch, so unless the two "rows" are in a separate vlan that's going to confuse the hell out of the switch and cause lots of problems...
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
loops occures in a linux bridge and ebtables configuration guitier Linux - Networking 0 05-27-2011 04:05 AM
Anyone using a bridge firewall with iptables and ebtables? CoffeeKing!!! Linux - Networking 3 11-02-2009 11:10 AM
Ethernet bridging & iptables. Is ebtables needed also? utahnix Linux - Networking 4 04-21-2008 10:38 AM
Bridge/htb problem (ebtables) Mycado Linux - Networking 6 06-21-2006 04:58 AM
802.1d Bridge + ebtables otisthegbs Linux - Wireless Networking 0 10-05-2004 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration