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-21-2009, 11:27 AM   #1
c-penguin
LQ Newbie
 
Registered: May 2009
Posts: 8

Rep: Reputation: 0
failed in debian to configure the net bridge


fllow these,
1. First install the bridge utilities (bridge-utils). package. You can do this fromthe command line as follows:

sudo apt-get install bridge-utils

2. Next, you must add an entry to the file /etc/network/interfacesto de-scribe the bridge. The following sample entry creates a bridgecalled br0, addsthe host ethernet interface eth0 to it and tells it toobtain an IP address usingDHCP so that the host remains able to accessthe network.

auto br0
iface br0 inet dhcp
bridge_ports eth0

You will probably want to change this to suit your own networkingneeds. Inparticular, you may want to assign a static IP address to thebridge.
3. Restart networking on the host:

sudo /etc/init.d/networking restart

After this the bridge will be recreated every time you boot your host system.

after above,the addresses of br0 and eth0 are the same,and my host(debian5)can't ping my local or outside,then I am so sad.
Does any one know about these?
 
Old 05-22-2009, 12:03 PM   #2
c-penguin
LQ Newbie
 
Registered: May 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Can anyone help me ?
 
Old 05-22-2009, 03:05 PM   #3
herbie_popnecker
LQ Newbie
 
Registered: Sep 2007
Posts: 8

Rep: Reputation: 0
remember the bridge entirely replaces your NICs in /etc/network/interfaces, so:
Code:
auto lo
iface lo inet loopback

auto bridge01
iface bridge01 inet dhcp
  pre-up ifconfig eth0 down
  pre-up ifconfig eth1 down
  pre-up brctl addbr bridge01
  pre-up brctl addif bridge01 eth0
  pre-up brctl addif bridge01 eth1
  pre-up ifconfig eth0 0.0.0.0
  pre-up ifconfig eth1 0.0.0.0
  post-down ifconfig eth0 down
  post-down ifconfig eth1 down
  post-down ifconfig bridge01 down
  post-down brctl delif bridge01 eth0
  post-down brctl delif bridge01 eth1
  post-down brctl delbr bridge01
You can then apt-get install ntop or darkstat and point it at the bridge01 instead of eth0 or eth1 to watch traffic.
Oh yeah, sometimes it seems 'sudo /etc/init.d/networking restart' didn't actually clear the old file (in Ubuntu 9.04 I checked ifconfig and saw the old eth0 settings still) so I just rebooted and it works fine.

Last edited by herbie_popnecker; 05-22-2009 at 03:09 PM.
 
Old 05-23-2009, 10:03 AM   #4
c-penguin
LQ Newbie
 
Registered: May 2009
Posts: 8

Original Poster
Rep: Reputation: 0
I also get one answer from orther forum:

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_maxwait 0
bridge_fd 0

and it work all right。

but I don't know the difference with yours. and I think this is more clearly.
 
  


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
Configure Failed logins to lock accounts after 5 failed attempts mccartjd Linux - Newbie 5 05-05-2008 08:02 AM
ANOTHER failed Debian net install! whohlme Linux - Laptop and Netbook 4 11-21-2007 03:21 PM
Failed Debian Net Install on Thinkpad 240X whohlme Linux - Laptop and Netbook 0 11-16-2007 03:12 AM
Debian net install/failed eth0 fincher69 Linux - Networking 0 02-03-2005 07:12 PM
Getting net connection from XP Bridge into SuSe. Djm101 Linux - Networking 0 01-27-2005 03:37 PM

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

All times are GMT -5. The time now is 08:09 AM.

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