RedHat/CentOS 7 Steps to Manage the Network Through the nmcli Command

  

The network management of Red Hat Enterprise Linux 7 and CentOS 7 is actually the management of NetworkManager, which can be controlled by the nmcli command. The following is a brief introduction to RedHat. /CentOS 7 manages the network through the nmcli command. Friends who don't know how to manage the network can learn.

NetworkManager can be used for the following types of connections: Ethernet, VLANS, Bridges, Bonds, Teams, Wi-Fi, mobile boradband (eg mobile 3G) and IP-over-InfiniBand. For these network types, NetworkManager can configure their network aliases, IP addresses, static routes, DNS, VPN connections, and many other special parameters.

You can use the command line tool nmcli to control NetworkManager.

1, nmcli Usage

# nmcli [ OPTIONS ] OBJECT { COMMAND |  Help }

We can use the TAB key to complete the command. When you forget the syntax of this command, you only need to press TAB to see the list of options. Some examples

Use nmcli of:

# nmcli general status

This command will NetworkManager all states are printed.

# nmcli connection show

Show all connections.

# nmcli connection show -a

Show only the currently active connections.

# nmcli device status

Lists the list of devices identified by NetworkManager and their status.

2, start /stop network interfaces

Use nmcli tool to start or stop network interfaces, and ifconfig the up /down is the same.

Use the following command to stop an interface:

# nmcli device disconnect eno16777736

The following command is used to start the interface:

# nmcli device connect eno16777736< Br> Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved