AnsweredAssumed Answered

How to addif to bridge automatically

Question asked by Steven Yu on Jul 7, 2017
Latest reply on Jul 10, 2017 by Steven Yu

Hi,

 

We have verify below commands and it works ok.

brctl addbr br0

brctl addif br0 eth0

brctl addif br0 usb0

ifconfig br0 192.168.20.1

 

Then, we want to bring the bridge interface br0 up automatically, so we add some lines to /etc/network/interfaces file as below, but system does not add eth0 and usb0 interface into bridge. Do you know what we miss or where is the point to interpret the content of /etc/network/interfaces, and then we can printf there to see the problem.

 

auto br0

bridge_ports eth0 usb0

iface br0 inet static
address 192.168.20.1
netmask 255.255.255.0
network 192.168.20.0
gateway 192.168.20.100

 

 

root@imx6ull14x14evk:~# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no


root@imx6ull14x14evk:~# ifconfig br0
br0 Link encap:Ethernet HWaddr 46:D4:97:C3:26:B0
inet addr:192.168.20.1 Bcast:192.168.20.255 Mask:255.255.255.0
inet6 addr: fe80::44d4:97ff:fec3:26b0%2129824624/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:6708 (6.5 KiB)

root@imx6ull14x14evk:~#

 

Regards,

Steven Yu

Outcomes