Network Management#

Network information#

$ ip a s ens192
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:0b:fa:af brd ff:ff:ff:ff:ff:ff
    inet 5.135.236.224/32 brd 5.135.236.224 scope global ens192
      valid_lft forever preferred_lft forever
ip -s(tatistics) link show ens192
ip r(oute)
ping -c3 google.com
traceroute google.com
tracepath google.com
ss -ta

Network Manager#

# nmcli c s
NAME           UUID                                  TYPE            DEVICE
System ens192  757d582e-22b3-4514-91df-63e29a49a388  802-3-ethernet  ens192
System ens224  0a0c153f-47a4-4d23-81f0-d588b1ec1418  802-3-ethernet  ens224
# nmcli c show "System ens192"
connection.id:                          System ens192
connection.uuid:                        757d582e-22b3-4514-91df-63e29a49a388
connection.interface-name:              ens192
connection.type:                        802-3-ethernet
connection.autoconnect:                 yes
connection.timestamp:                   1460972356
# nmcli d s
DEVICE  TYPE      STATE         CONNECTION
ens192  ethernet  connected     System ens192
ens224  ethernet  connected     System ens224
ens256  ethernet  disconnected  --
lo      loopback  unmanaged     --
# nmcli d show ens192
GENERAL.DEVICE:                         ens192
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:0C:29:3A:E6:77
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     System ens192
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/0
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         ip = 192.168.0.1/24, gw = 0.0.0.0
IP4.DNS[1]:                             213.186.33.99
IP4.DOMAIN[1]:                          example.org
IP6.ADDRESS[1]:                         ip = fe80::20c:29ff:fe3a:e677/64, gw = ::
nmcli c s
ip a show ens256
# hostname
server01.intranet
hostnamectl set-hostname server02.intranet
hostnamectl status
# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.100   server01.intranet server01
# cat /etc/resolv.conf
# Generated by NetworkManager
domain intranet
search intranet intranet.
nameserver 213.186.33.99
# nmcli con mod statictest ipv4.dns 10.10.10.254
# nmcli con down statictest
# nmcli con up statictest
# cat /etc/resolv.conf
# Generated by NetworkManager
domain example.org
search example.org example.org.
nameserver 213.186.33.99
nameserver 10.10.10.254