LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-18-2010, 01:01 PM   #1
medized
LQ Newbie
 
Registered: May 2010
Posts: 7

Rep: Reputation: 0
Linux ethernet bridge : route configuration


Hello all !

I have two Network Interfaces eth0 and eth1. For each one of them, I have two ip aliases:
Code:
eth0:0 192.168.0.1 
eth0:1 192.168.0.2

eth1:0 192.168.1.1 
eth1:0 192.168.1.2
I put a bridge between the two interfaces:

Code:
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
I built a program which sends packets from 192.168.0.1 to 192.168.1.1 and from 192.168.0.2 to 192.168.1.2, using raw sockets to be able to forge the ip source and destination fields.

The packets are delivered, but through the loopback interface. I actually need it to go from eth0 to eth1 ... I guess I have to configure some special routes, but I don't which ones.

I'd like to be able to specify to the kernel to use the eth0 interface when the address is 192.168.0.* , and the eth1 interface for 192.168.1.* addresses, and let the bridge do the rest.

Thanks for your help, this question might sound stupid, but my networking skills are really, I mean really limited !

Cheers,

--
Zed
 
Old 05-19-2010, 06:13 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well you're basically just not using a bridge at all correctly. by definition, a bridge is a device (or simulation of, in this case) that joins two similar ethernet segments as one, at Layer 2 in the OSI model. Basically this means that everything needs to be in the same ip subnet, just like a physical network switch. What are you trying to achieve by doing this? The point should be that machines hanging off of eth1 can talk directly to machines on eth0 without doing any routing, just switching, but that's only logically feasible if they are both in the same subnet, e.g. 192.168.0.0/24, and not one there and one in 192.168.1.0/24 instead.
 
Old 05-19-2010, 06:58 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Moved to Linux-Networking
 
  


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
VLAN, Bridge, Route - Cant get my head around it towme Linux - Networking 1 05-31-2009 05:49 PM
Linux bridge configuration!!! sholah Linux - Server 2 10-04-2008 03:30 PM
try an ethernet to wireless bridge!! leec11 Linux - Wireless Networking 0 10-10-2004 09:42 PM
For Linux GURU's: route configuration in complex network netguy2000 Linux - Networking 1 09-06-2004 09:00 AM
Windows route configuration easier than Linux??? hdalle Linux - Networking 5 08-25-2004 06:14 AM

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

All times are GMT -5. The time now is 07:18 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