Wednesday, November 19, 2014

How to turn linux into switch

** we have 3 interfaces and we want the three into a single bridge
 - eth0
 - wlan0
 - vmnet1

1- install the bridge tool -- openvswitch-switch
root@switch:/# apt-get install openvswitch-switch

2- create a bridge call br0 and add all the interface into the bridge
root@switch:/# brctl addbr br0
root@switch:/# brctl addif br0 vmnet1
root@switch:/# brctl addif br0 eth0
root@switch:/# brctl addif br0 wlan0

3- activate the bridge and show the information about the bridge

root@switch:/# ifconfig br0 up
root@switch:/# brctl show
bridge name    bridge id        STP enabled    interfaces
br0        8000.005056c00001    no        eth0
                                                              vmnet1
                                                               wlan0
lxcbr0        8000.000000000000    no


root@switch:/# brctl show br0
bridge name    bridge id        STP enabled    interfaces
br0        8000.005056c00001    no        eth0
                                                               vmnet1
                                                               wlan0





*** Note***
- to be able to add wlan0 to bridge we have connect wlan0 to AP, or make it as AP by itself

No comments:

Post a Comment