Tutorial-Linux-Networking
NetworkManager has many benefits especially with WiFi compatibility, virtualisation and it's found by default on many Linux distros.
You may find when attempting to setup Bridging libvirt setups fail; suggested solution is to disable NetworkManager and use the classic network initscripts. However there is a work around for the bug.
Quick Ref Guide:
- Remove existing wired Network
- Add a new bridge connection
- Ensure bridge is set to connect automatically
- Add bridged-slave connections
- Set bridged-slave connection to auto
- Check bridged-slave interface MAC Address is your physical network (the one you removed)
- Activate the connection
1. Make sure bridge module is loaded
modprobe --first-time bridge2. Grab the name of your interface(s) and delete existing network(s)
modprobe: ERROR: could not insert 'bridge': Module already in kernel
nmcli con show
nmcli con del 'Your interface'(can use filter options, i.e view all active connections only, use nmcli --fields ACTIVE, NAME, UUID, TYPE, DEVICE, STATE c show)
3. Create Bridged network
nmcli con add type bridge ifname br0(leaving the name blank after 'ifname' will default to default to bridge, bridge-1, bridge-2, and so on)
4. (Optional steps) Disable SFTP, Delay directive
nmcli con modify bridge-br0 bridge.stp no
vi /etc/sysconfig/network-scripts/ifcfg-bridge-br0 add line Delay=0
5. Create bridged-slave connection under current master bridge.
6. Activate the bridge connection
The above can be accomplished using NetworkManager Text User Interface by issuing nmtui.
You can always go back and modify your network by issuing nmcli connection edit bridge-br0 which brings you to the interactive mode.
Useful definitions
For more about Linux bridge network setups click here
nmcli con add type bridge-slave ifname 'your interface name' master bridge-br0(you can grab the interface name ip a, this will be your physical interface)
6. Activate the bridge connection
ifup bridge-br0 bridge-slave-en0 or restart all your existing network interface(s) systemctl restart networkNotes
The above can be accomplished using NetworkManager Text User Interface by issuing nmtui.
You can always go back and modify your network by issuing nmcli connection edit bridge-br0 which brings you to the interactive mode.
Useful definitions
- ifname = The name of the interface to the bridge.
- Aging time = The time, in seconds, a MAC address is kept in the MAC address forwarding database.
- STP (Spanning Tree Protocol)
- Priority = The bridge priority; the bridge with the lowest priority will be elected as the root bridge.
- Forward delay = The time, in seconds, spent in both the Listening and Learning states before entering the
- Forwarding state = The default is 15 seconds.
- Hello time = The time interval, in seconds, between sending configuration information in bridge protocol
- data units (BPDU).
- Max age = The maximum time, in seconds, to store the configuration information from BPDUs. This
- value should be twice the Hello Time plus 1 but less than twice the Forwarding delay minus
For more about Linux bridge network setups click here
No comments:
Post a Comment