LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-16-2006, 08:04 AM   #1
Mithrilhall
Member
 
Registered: Feb 2002
Location: Massachusetts
Distribution: Debian (Lenny)
Posts: 286

Rep: Reputation: 30
Question Network bridge


What would be the easiest way to create a network bridge?

I have two interfaces (eth0 & eth1).

My internet connection is coming in on eth0 and I have a switch connected to eth1 that has multiple computers connected to it.
 
Old 11-16-2006, 08:21 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
you'd normally make a bridge using the inspiringly named bridge module

there are plenty of config guides if you google for "bridge howto" on google.
 
Old 11-16-2006, 08:48 AM   #3
Mithrilhall
Member
 
Registered: Feb 2002
Location: Massachusetts
Distribution: Debian (Lenny)
Posts: 286

Original Poster
Rep: Reputation: 30
That's what I've been using and it works fine....kind of.

This is what my problem is:

eth0 - ip address 10.2.162.2 -- Incoming Internet
eth1 - ip address 10.2.162.3 -- Switch with multiple computers
br0 - ip address 10.2.162.5 -- You know...it's the bridge


The odd thing is sometimes I can ping google.com fine...other times I can't. It's not an ISP issue though.

The server is connected to a Cisco VPN router. When I try to ping, lets say 10.2.162.2 from another location (10.2.175.1) it works sometimes. When it stops responding I can usually ping 10.2.162.5.

Sometimes 10.2.162.5 stops responding and then I can ping 10.2.162.2 again.


I'm not sure what's going on here.

These are the commands I've been using to create my bridge:

Code:
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
ip link set br0 up
ip addr add 10.2.162.5/24 brd + dev br0
route add default gw 10.2.162.1 dev br0
 
Old 11-16-2006, 09:18 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
i'll come clean and say i've not actually configured a bridge under linux, btu surely you wouldn't have ip addresses on each ethX in the bridge? you'd just have the single ip on br0. here http://linux-net.osdl.org/index.php/Bridge they've set eth0 and eth1 to both be 0.0.0.0 presumably to just hold in interface up.

my personal route it always to stick wireshark and tcpdump on and see what's going where. you can dump on both ethX's simultaneously and see where the icmp traffic is going during failures.
 
Old 11-16-2006, 09:32 AM   #5
Mithrilhall
Member
 
Registered: Feb 2002
Location: Massachusetts
Distribution: Debian (Lenny)
Posts: 286

Original Poster
Rep: Reputation: 30
Let me give that a shot and see what happens.
 
Old 11-16-2006, 09:43 AM   #6
Mithrilhall
Member
 
Registered: Feb 2002
Location: Massachusetts
Distribution: Debian (Lenny)
Posts: 286

Original Poster
Rep: Reputation: 30
Doh!

That worked perfectly.


Thanks
 
Old 01-20-2007, 08:48 PM   #7
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 396

Rep: Reputation: 38
What did you end up doing exactly Mithrilhall ?
 
Old 01-21-2007, 11:15 PM   #8
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 396

Rep: Reputation: 38
Quote:
Originally Posted by acid_kewpie
my personal route it always to stick wireshark and tcpdump on and see what's going where. you can dump on both ethX's simultaneously and see where the icmp traffic is going during failures.

How exactly ??

Code:
root@jlh:~# brctl show
bridge name     bridge id               STP enabled     interfaces
home            8000.00110992c93d       no              eth1
                                                        eth0
root@jlh:~# tcpdump home
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: syntax error
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Network bridge problem paddyjoy Linux - Networking 4 11-03-2005 05:46 AM
Bridge simulating Network Lag, for developing network code for games intripoon Linux - Networking 18 10-27-2005 05:04 PM
network bridge Ryan450 Linux - Networking 1 08-26-2004 03:55 AM
Network bridge eqxro Linux - Networking 2 08-21-2004 07:46 PM
Network Bridge- IR to Ethernet systemparadox Linux - Networking 2 08-18-2004 08:51 AM

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

All times are GMT -5. The time now is 05:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration