Distroname and release: Debian Stretch
Creating an bridged adapter
brctl vs ip
It seems that brctl cannot do vlan tagging, for which I tend to use the ip package instead if brctl.brctl is part of bridge-utils
ip is part of iproute2. Lets start by installing required packages.
apt-get install iproute2 bridge-utils
Create an bridge on eth0 using CLI.
Notice, this will not be persistant, and be at gone rebootsIf you want persistant bridges, skip this step and continue to Create persistant bridge
If you are connected through SSH on eth0, you WILL be disconnected, so please have an IRMC,ILO,IMPI or whatever in this case.
Make sure that there is no previously IP attached to this interface.
ifconfig eth0 0.0.0.0Create an bridge named br0, and bridge it with eth0
ip link add name br0 type bridge ip link set dev br0 up ip link set dev eth0 master br0 ip addr add 192.168.10.100/24 dev br0Now you should have an working bridged interface.
Create persistant bridge
To persist the bridge after reboots, is needed to add the bridge configuration to Debian's interface file.
/etc/network/interfaces
auto br0
iface br0 inet static
hwaddress ether xx:xx:xx:xx:xx:xx
address 192.168.10.100
netmask 255.255.255.0
network 192.168.10.0
gateway 192.168.10.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
Bring the new interface up
ifup br0Notice, that the IP address should be on br0, NOT eth0.
ip addr show br0 21: br0:mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff inet 192.168.10.100/24 brd 192.168.10.255 scope global br0 valid_lft forever preferred_lft forever inet6 fe80::ec4:7aff:fe86:a22a/64 scope link valid_lft forever preferred_lft forever