| # SAVE the bridge configs to make changes persist reboots.
|
| #
|
| # Options:
|
| # bridge_stp off -> disable Spanning Tree Protocol
|
| # bridge_waitport 0 -> no delay before a port becomes available
|
| # bridge_fd 0 -> no forwarding delay
|
| #
|
| # NOTE: We trying to keep the same metric of the main network device the
|
| # bridge will "substitute": so, if there are other NICs or other network
|
| # interfaces with different metric (e.g. wifi interface), the priority of
|
| # the main network interface is preserved.
|
| if ! sudo tee "${bridge_conf_file}" >/dev/null <<- EOF
|
| auto ${bridge_iface}
|
| iface ${bridge_iface} inet dhcp
|
| bridge_ports ${network_iface} ${aux_ifaces[*]}
|
| hwaddress ether ${network_iface_macaddr}
|
| bridge_stp off
|
| bridge_waitport 0
|
| bridge_fd 0
|
| bridge_maxwait 0
|
| post-up ip route replace default dev ${bridge_iface} metric ${metric}
|