Difference between revisions of "Bridge"

From Linuxintro
Line 9: Line 9:
 
* install brctl:
 
* install brctl:
 
  sudo apt-get install bridge-utils
 
  sudo apt-get install bridge-utils
 
+
* verify your bridge br0 has been set up:
 +
<pre>
 +
tstaerk@dell-desktop:~$ brctl addbr br0
 +
add bridge failed: Operation not permitted
 +
tstaerk@dell-desktop:~$ sudo brctl addbr br0
 +
tstaerk@dell-desktop:~$ ip a s
 +
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
 +
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
 +
    inet 127.0.0.1/8 scope host lo
 +
    inet6 ::1/128 scope host
 +
      valid_lft forever preferred_lft forever
 +
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
 +
    link/ether 00:22:19:f7:3c:bb brd ff:ff:ff:ff:ff:ff
 +
3: wmaster0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
 +
    link/ieee802.11 00:22:fb:89:57:06 brd ff:ff:ff:ff:ff:ff
 +
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
 +
    link/ether 00:22:fb:89:57:06 brd ff:ff:ff:ff:ff:ff
 +
5: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
 +
    link/ether d6:2a:40:12:ff:bc brd ff:ff:ff:ff:ff:ff
 +
6: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
 +
    link/ppp
 +
    inet 10.57.81.93 peer 10.64.64.64/32 scope global ppp0
 +
'''''7: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN '''''
 +
    link/ether 06:ed:32:47:91:a2 brd ff:ff:ff:ff:ff:ff
 +
</pre>
 
{{stub}}
 
{{stub}}

Revision as of 17:47, 8 August 2011

You will need a (software) network bridge on your computer if you

Setup

To set up a bridge you need to find out your distribution and proceed accordingly:

Ubuntu

  • install brctl:
sudo apt-get install bridge-utils
  • verify your bridge br0 has been set up:
tstaerk@dell-desktop:~$ brctl addbr br0
add bridge failed: Operation not permitted
tstaerk@dell-desktop:~$ sudo brctl addbr br0
tstaerk@dell-desktop:~$ ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:22:19:f7:3c:bb brd ff:ff:ff:ff:ff:ff
3: wmaster0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ieee802.11 00:22:fb:89:57:06 brd ff:ff:ff:ff:ff:ff
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:22:fb:89:57:06 brd ff:ff:ff:ff:ff:ff
5: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether d6:2a:40:12:ff:bc brd ff:ff:ff:ff:ff:ff
6: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
    inet 10.57.81.93 peer 10.64.64.64/32 scope global ppp0
'''''7: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN '''''
    link/ether 06:ed:32:47:91:a2 brd ff:ff:ff:ff:ff:ff

This article is a stub and needs improvement. You can help here :)