Author
Christopher Marshall (christopherlmarshall@yahoo.com)
Raw Notes on Ethernet Bridging
# Here's how you would bring up a bridge between eth0 and eth1 insmod bridge brctl addbr br0 # create bridge interface brctl addif br0 eth0 # enslave eth0 to it brctl addif br0 eth1 # enslave eth1 to it ifconfig eth0 0.0.0.0 promisc # remove eth0's ip address ifconfig eth1 0.0.0.0 promisc # remove eth1;s ip address # assign ip and route to br0 ifconfig br0 10.0.0.1 netmask 255.255.255.0 broadcase 10.0.0.255 up # The packet forwarding would not take effect until the last line above. # dhcp br0 would actually work at this point but not before, oddly enough. # A complex scenario involving dhcp and user mode linux virtual # networking. When the UML instance comes up, its dhcp will work # load required modules insmod bridge insmod tun # setup up bridging /usr/local/sbin/brctl addbr br0 /usr/local/sbin/brctl stp br0 off # add eth0 to bridge /sbin/ifconfig eth0 0.0.0.0 brctl addif br0 eth0 # setup tap0 and add to bridge /usr/bin/tunctl -u chris /sbin/ifconfig tap0 0.0.0.0 /usr/local/sbin/brctl addif br0 tap0 # bring bridge up with bogus address /sbin/ifconfig br0 10.0.0.1 up # invoke dhcp through the bridge /sbin/dhcpcd -d br0
