Configuring network for enterprises can be painful and complex job and Red Hat Enterprise Linux 7.0 makes it easy by providing Network Manger which is ready to use for enterprise networking setups like Bonding, Teaming, VLAN, and Bridging. Network manager eliminates the need to manually edit network configuration files. It provides flexible and unified gnome applet (GUI) and command line tool (nmcli) to configure network. Network manager can also detect and manage existing interface configurations. Following examples will explain how to configure Bonding, bridging, teaming and VLAN through nmcli
To create a bond through the CLI, you first need to create a bond interface, add slaves to this interface and bring the slaves up. Here is how you do it.
nmcli con add type bond ifname bond0 mode active-backup
nmcli con add type bond-slave ifname em1 master bond0
nmcli con add type bond-slave ifname em2 master bond0
nmcli con up bond-slave-em1
nmcli con up bond-slave-em2
Creating a bridge is also a similar procedure. You need to first create a bridge interface, add the network interfaces which are to be bridged to this interface. Once you bring these interfaces up, the bridge will be active. Here is how you create the bridge in few easy steps.
nmcli con add type bridge ifname br1
nmcli con add type bridge-slave ifname em3 master br1
nmcli con add type bridge-slave ifname em4 master br1
nmcli con up bridge-slave-em3
nmcli con up bridge-slave-em4
Unlike in earlier versions where creating a VLAN can be quite complicated, with RHEL 7.0 a VLAN can be created with a single nmcli command and it will update all the config files for you.
nmcli con add type vlan ifname VLAN10 dev em4 id 10
nmcli con up VLAN-VLAN10
Just as how bonding lets you do link aggregation, the team driver which was introduced in RHEL 7.0, also lets you aggregate links in a more flexible and efficient manner. Creating a team is just like creating a bond, as you will realize below.
nmcli con add type team ifname team0
Add slave interfaces to teaming ( team0)
nmcli con add type team-slave em1 master team0
nmcli con up team-team0
There are lot of other commands which make network management a breeze, here are a few examples
nmcli con mod bond0 +bond.options mii=100
nmcli con mod bond0 -bond.options downdelay
nmcli connection show
nmcli connection show –active
nmcli device status
nmcli con edit
As you would have observed, network manager lets you manage your networks in a simple, efficient, unified and effective manner. I encourage you to try out nmcli and see for yourself how easy it can get.
Article ID: SLN311120
Last Date Modified: 08/14/2018 01:28 AM
Thank you for your feedback.