
type – To specify the type of Interface (Ethernet, Bridge, VLAN, Team, VLAN, WIFI etc). connection – To specify a connection profile to create. nmcli – Command-line tool for controlling NetworkManager. # nmcli connection add type ethernet ifname ens32 con-name prod Creating a Connection ProfileĪs soon as we confirmed with the physical interface, create the connection profile. However, to understand what we are doing, first, we will create only the profile name, Then modify the connection to assign an IP address, By following modify the connection and assign with DNS, DNS search, and much more. It is possible to create a connection name, assign the IP address, gateway, DNS, DNS search, IP assigning method, IPv6 etc in a single command. Once we know the interface let’s start to create connection profile without configuring an IP Address. The current status of connection has two dashes “–” which means the connection was not yet configured.
Finally, at last, the profile name or connection name. State of the interface device in the third column. Type of the device will be in the second column. The first column shows the physical device name. For demonstration purpose, we are about to use ens32 shown in RED colour. We have two physical interfaces, One ( ens33) is already configured and underuse. Very less information shown because we have not configured this interface yet. The output of other interfaces is removed and shown only for ens32. This is not required in common use because it will print all the information about an interface. Or to print complete information about an interface. Let’s start to print and know the available physical interfaces. Print the available Physical Interfaces (NIC) Whether IPv6 need to be created or not. DNS search domain(search linuxsysadmins.local). Sub net you are about to use for your IP Address.
The interface needs to start persistently during reboot.Static IP Address method or DHCP to be configured.Which interface needs to be configured (ens32).Type of the interface (Ethernet) we are about to configure.Second, you can use any name for your connection profile.First, know the device name assigned by kernel etc.Still, confused? have a look into below definition about above interface configuration. While configuring an interface we should know below configuration lines.įor a better understanding, each line of below configuration is defined line by line. If you understand what needs to be considered while configuring an interface it will be easier for you.
Understanding Network Interface Configuration While running the nmcli command Type nmcli and press TAB twice to get the available options so that you can learn nmcli soon and make it more easier to understand.
# systemctl status NetworkManager Easy way to learn and use nmcliįirstly, Before starting with the below steps, install “ bash-completion” package because it will help to complete the command with options and arguments using TAB key. So better use nmcli or ifup / ifdown to manage individual interfaces. We can manage Network Manager service using below commands, But keep in mind while running below commands it will affect all the interfaces in your system. But still, we can use legacy network service on RHEL 7 based OS.
Network Manager is used on RHEL 7.0 based Operating System and above versions by running as a service. To configure the interface we are using Network Manager it is a dynamic network control and configuration manager.