nmcli
[root@web01 ~]# nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected eth0
lo loopback unmanaged --
[root@web01 ~]# nmcli connection show
NAME UUID TYPE DEVICE
eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
[root@web01 ~]# nmcli connection show --active
NAME UUID TYPE DEVICE
eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
[root@web01 ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:35:f3:09 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.138/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe35:f309/64 scope link
valid_lft forever preferred_lft forever
[root@web01 ~]#
[root@web01 ~]# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:35:f3:09 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.138/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe35:f309/64 scope link
valid_lft forever preferred_lft forever
[root@web01 ~]#
[root@ansible01:/root]
> nmcli connection show
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
Wired connection 1 ecc6ad4a-104f-3712-bf25-783532c6ef6a 802-3-ethernet eth1
[root@ansible01:/root]
> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.170/24 brd 192.168.31.255 scope global dynamic eth1
valid_lft 21434sec preferred_lft 21434sec
inet6 fe80::d712:1936:1554:8b49/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/root]
> cat /etc/sysconfig/network-scripts/ifcfg-eth1
cat: /etc/sysconfig/network-scripts/ifcfg-eth1: No such file or directory
[root@ansible01:/root]
> cd /etc/sysconfig/network-scripts/
[root@ansible01:/etc/sysconfig/network-scripts]
> ll
total 224
-rw-r--r--. 1 root root 139 Mar 17 13:02 ifcfg-eth0
-rw-r--r--. 1 root root 254 May 3 2017 ifcfg-lo
lrwxrwxrwx. 1 root root 24 Mar 17 11:08 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x. 1 root root 654 May 3 2017 ifdown-bnep
-rwxr-xr-x. 1 root root 6571 May 3 2017 ifdown-eth
-rwxr-xr-x. 1 root root 781 May 3 2017 ifdown-ippp
-rwxr-xr-x. 1 root root 4540 May 3 2017 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Mar 17 11:08 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1768 May 3 2017 ifdown-post
-rwxr-xr-x. 1 root root 1068 May 3 2017 ifdown-ppp
-rwxr-xr-x. 1 root root 870 May 3 2017 ifdown-routes
-rwxr-xr-x. 1 root root 1456 May 3 2017 ifdown-sit
-rwxr-xr-x. 1 root root 1621 Aug 3 2017 ifdown-Team
-rwxr-xr-x. 1 root root 1556 Apr 15 2016 ifdown-TeamPort
-rwxr-xr-x. 1 root root 1462 May 3 2017 ifdown-tunnel
lrwxrwxrwx. 1 root root 22 Mar 17 11:08 ifup -> ../../../usr/sbin/ifup
-rwxr-xr-x. 1 root root 12312 May 3 2017 ifup-aliases
-rwxr-xr-x. 1 root root 910 May 3 2017 ifup-bnep
-rwxr-xr-x. 1 root root 12680 May 3 2017 ifup-eth
-rwxr-xr-x. 1 root root 12075 May 3 2017 ifup-ippp
-rwxr-xr-x. 1 root root 11893 May 3 2017 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Mar 17 11:08 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 650 May 3 2017 ifup-plip
-rwxr-xr-x. 1 root root 1064 May 3 2017 ifup-plusb
-rwxr-xr-x. 1 root root 3433 May 3 2017 ifup-post
-rwxr-xr-x. 1 root root 4154 May 3 2017 ifup-ppp
-rwxr-xr-x. 1 root root 2001 May 3 2017 ifup-routes
-rwxr-xr-x. 1 root root 3303 May 3 2017 ifup-sit
-rwxr-xr-x. 1 root root 1755 Apr 15 2016 ifup-Team
-rwxr-xr-x. 1 root root 1876 Apr 15 2016 ifup-TeamPort
-rwxr-xr-x. 1 root root 2711 May 3 2017 ifup-tunnel
-rwxr-xr-x. 1 root root 1836 May 3 2017 ifup-wireless
-rwxr-xr-x. 1 root root 5419 May 3 2017 init.ipv6-global
-rw-r--r--. 1 root root 18919 May 3 2017 network-functions
-rw-r--r--. 1 root root 31027 May 3 2017 network-functions-ipv6
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection add con-name eth1 type ethernet ifname eth1
Connection 'eth1' (0a2027d8-54d5-4b95-a682-a9286c6bd692) successfully added.
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection show
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
Wired connection 1 ecc6ad4a-104f-3712-bf25-783532c6ef6a 802-3-ethernet eth1
eth1 0a2027d8-54d5-4b95-a682-a9286c6bd692 802-3-ethernet --
[root@ansible01:/etc/sysconfig/network-scripts]
> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.170/24 brd 192.168.31.255 scope global dynamic eth1
valid_lft 21282sec preferred_lft 21282sec
inet6 fe80::d712:1936:1554:8b49/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/etc/sysconfig/network-scripts]
> ls -l
total 228
-rw-r--r--. 1 root root 139 Mar 17 13:02 ifcfg-eth0
-rw-r--r-- 1 root root 278 Mar 20 16:38 ifcfg-eth1
-rw-r--r--. 1 root root 254 May 3 2017 ifcfg-lo
lrwxrwxrwx. 1 root root 24 Mar 17 11:08 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x. 1 root root 654 May 3 2017 ifdown-bnep
-rwxr-xr-x. 1 root root 6571 May 3 2017 ifdown-eth
-rwxr-xr-x. 1 root root 781 May 3 2017 ifdown-ippp
-rwxr-xr-x. 1 root root 4540 May 3 2017 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Mar 17 11:08 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1768 May 3 2017 ifdown-post
-rwxr-xr-x. 1 root root 1068 May 3 2017 ifdown-ppp
-rwxr-xr-x. 1 root root 870 May 3 2017 ifdown-routes
-rwxr-xr-x. 1 root root 1456 May 3 2017 ifdown-sit
-rwxr-xr-x. 1 root root 1621 Aug 3 2017 ifdown-Team
-rwxr-xr-x. 1 root root 1556 Apr 15 2016 ifdown-TeamPort
-rwxr-xr-x. 1 root root 1462 May 3 2017 ifdown-tunnel
lrwxrwxrwx. 1 root root 22 Mar 17 11:08 ifup -> ../../../usr/sbin/ifup
-rwxr-xr-x. 1 root root 12312 May 3 2017 ifup-aliases
-rwxr-xr-x. 1 root root 910 May 3 2017 ifup-bnep
-rwxr-xr-x. 1 root root 12680 May 3 2017 ifup-eth
-rwxr-xr-x. 1 root root 12075 May 3 2017 ifup-ippp
-rwxr-xr-x. 1 root root 11893 May 3 2017 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Mar 17 11:08 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 650 May 3 2017 ifup-plip
-rwxr-xr-x. 1 root root 1064 May 3 2017 ifup-plusb
-rwxr-xr-x. 1 root root 3433 May 3 2017 ifup-post
-rwxr-xr-x. 1 root root 4154 May 3 2017 ifup-ppp
-rwxr-xr-x. 1 root root 2001 May 3 2017 ifup-routes
-rwxr-xr-x. 1 root root 3303 May 3 2017 ifup-sit
-rwxr-xr-x. 1 root root 1755 Apr 15 2016 ifup-Team
-rwxr-xr-x. 1 root root 1876 Apr 15 2016 ifup-TeamPort
-rwxr-xr-x. 1 root root 2711 May 3 2017 ifup-tunnel
-rwxr-xr-x. 1 root root 1836 May 3 2017 ifup-wireless
-rwxr-xr-x. 1 root root 5419 May 3 2017 init.ipv6-global
-rw-r--r--. 1 root root 18919 May 3 2017 network-functions
-rw-r--r--. 1 root root 31027 May 3 2017 network-functions-ipv6
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID=0a2027d8-54d5-4b95-a682-a9286c6bd692
DEVICE=eth1
ONBOOT=yes
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection add con-name eth1 type ethernet ifname eth1 \
> ip4 192.168.31.28/24 gw4 192.168.0.254
Connection 'eth1' (3e4a4167-05da-4d2f-a763-6ba29f9622d2) successfully added.
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection up static-eth1
Error: unknown connection 'static-eth1'.
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection show
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
Wired connection 1 ecc6ad4a-104f-3712-bf25-783532c6ef6a 802-3-ethernet eth1
eth1 0a2027d8-54d5-4b95-a682-a9286c6bd692 802-3-ethernet --
eth1 3e4a4167-05da-4d2f-a763-6ba29f9622d2 802-3-ethernet --
[root@ansible01:/etc/sysconfig/network-scripts]
> ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.170/24 brd 192.168.31.255 scope global dynamic eth1
valid_lft 20925sec preferred_lft 20925sec
inet6 fe80::d712:1936:1554:8b49/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/etc/sysconfig/network-scripts]
> ifdown eth1
Device 'eth1' successfully disconnected.
[root@ansible01:/etc/sysconfig/network-scripts]
> ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.31.176 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::20c:29ff:fe3c:8fbd prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:3c:8f:bd txqueuelen 1000 (Ethernet)
RX packets 26731 bytes 1915972 (1.8 MiB)
RX errors 0 dropped 20 overruns 0 frame 0
TX packets 3011 bytes 329662 (321.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:0c:29:3c:8f:c7 txqueuelen 1000 (Ethernet)
RX packets 1315 bytes 90528 (88.4 KiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 11 bytes 1350 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 12 bytes 1404 (1.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1404 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection show
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
Wired connection 1 ecc6ad4a-104f-3712-bf25-783532c6ef6a 802-3-ethernet --
eth1 0a2027d8-54d5-4b95-a682-a9286c6bd692 802-3-ethernet --
eth1 3e4a4167-05da-4d2f-a763-6ba29f9622d2 802-3-ethernet --
[root@ansible01:/etc/sysconfig/network-scripts]
> /etc/init.d/network restart
Restarting network (via systemctl): [ OK ]
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection show
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
eth1 0a2027d8-54d5-4b95-a682-a9286c6bd692 802-3-ethernet eth1
Wired connection 1 ecc6ad4a-104f-3712-bf25-783532c6ef6a 802-3-ethernet --
eth1 3e4a4167-05da-4d2f-a763-6ba29f9622d2 802-3-ethernet --
[root@ansible01:/etc/sysconfig/network-scripts]
> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.170/24 brd 192.168.31.255 scope global dynamic eth1
valid_lft 21579sec preferred_lft 21579sec
inet6 fe80::3cd8:c358:5fda:8c76/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection add con-name eth1 type ethernet ifname eth1 \
> ip4 192.168.31.28/24 gw4 192.168.31.1
Connection 'eth1' (f2cafb9f-1571-4df2-90e7-0d5178a03184) successfully added.
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection up eth1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)
[root@ansible01:/etc/sysconfig/network-scripts]
> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.28/24 brd 192.168.31.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::e09:f4b3:5015:5f99/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1
ifcfg-eth1 ifcfg-eth1-1 ifcfg-eth1-2
[root@ansible01:/etc/sysconfig/network-scripts]
> ll
total 236
-rw-r--r--. 1 root root 139 Mar 17 13:02 ifcfg-eth0
-rw-r--r-- 1 root root 278 Mar 20 16:38 ifcfg-eth1
-rw-r--r-- 1 root root 331 Mar 20 16:41 ifcfg-eth1-1
-rw-r--r-- 1 root root 330 Mar 20 16:48 ifcfg-eth1-2
-rw-r--r--. 1 root root 254 May 3 2017 ifcfg-lo
lrwxrwxrwx. 1 root root 24 Mar 17 11:08 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x. 1 root root 654 May 3 2017 ifdown-bnep
-rwxr-xr-x. 1 root root 6571 May 3 2017 ifdown-eth
-rwxr-xr-x. 1 root root 781 May 3 2017 ifdown-ippp
-rwxr-xr-x. 1 root root 4540 May 3 2017 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Mar 17 11:08 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1768 May 3 2017 ifdown-post
-rwxr-xr-x. 1 root root 1068 May 3 2017 ifdown-ppp
-rwxr-xr-x. 1 root root 870 May 3 2017 ifdown-routes
-rwxr-xr-x. 1 root root 1456 May 3 2017 ifdown-sit
-rwxr-xr-x. 1 root root 1621 Aug 3 2017 ifdown-Team
-rwxr-xr-x. 1 root root 1556 Apr 15 2016 ifdown-TeamPort
-rwxr-xr-x. 1 root root 1462 May 3 2017 ifdown-tunnel
lrwxrwxrwx. 1 root root 22 Mar 17 11:08 ifup -> ../../../usr/sbin/ifup
-rwxr-xr-x. 1 root root 12312 May 3 2017 ifup-aliases
-rwxr-xr-x. 1 root root 910 May 3 2017 ifup-bnep
-rwxr-xr-x. 1 root root 12680 May 3 2017 ifup-eth
-rwxr-xr-x. 1 root root 12075 May 3 2017 ifup-ippp
-rwxr-xr-x. 1 root root 11893 May 3 2017 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Mar 17 11:08 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 650 May 3 2017 ifup-plip
-rwxr-xr-x. 1 root root 1064 May 3 2017 ifup-plusb
-rwxr-xr-x. 1 root root 3433 May 3 2017 ifup-post
-rwxr-xr-x. 1 root root 4154 May 3 2017 ifup-ppp
-rwxr-xr-x. 1 root root 2001 May 3 2017 ifup-routes
-rwxr-xr-x. 1 root root 3303 May 3 2017 ifup-sit
-rwxr-xr-x. 1 root root 1755 Apr 15 2016 ifup-Team
-rwxr-xr-x. 1 root root 1876 Apr 15 2016 ifup-TeamPort
-rwxr-xr-x. 1 root root 2711 May 3 2017 ifup-tunnel
-rwxr-xr-x. 1 root root 1836 May 3 2017 ifup-wireless
-rwxr-xr-x. 1 root root 5419 May 3 2017 init.ipv6-global
-rw-r--r--. 1 root root 18919 May 3 2017 network-functions
-rw-r--r--. 1 root root 31027 May 3 2017 network-functions-ipv6
[root@ansible01:/etc/sysconfig/network-scripts]
> ls
ifcfg-eth0 ifdown-ippp ifdown-TeamPort ifup-isdn ifup-TeamPort
ifcfg-eth1 ifdown-ipv6 ifdown-tunnel ifup-plip ifup-tunnel
ifcfg-eth1-1 ifdown-isdn ifup ifup-plusb ifup-wireless
ifcfg-eth1-2 ifdown-post ifup-aliases ifup-post init.ipv6-global
ifcfg-lo ifdown-ppp ifup-bnep ifup-ppp network-functions
ifdown ifdown-routes ifup-eth ifup-routes network-functions-ipv6
ifdown-bnep ifdown-sit ifup-ippp ifup-sit
ifdown-eth ifdown-Team ifup-ipv6 ifup-Team
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID=0a2027d8-54d5-4b95-a682-a9286c6bd692
DEVICE=eth1
ONBOOT=yes
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1-
ifcfg-eth1-1 ifcfg-eth1-2
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1-1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=192.168.31.28
PREFIX=24
GATEWAY=192.168.0.254
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID=3e4a4167-05da-4d2f-a763-6ba29f9622d2
DEVICE=eth1
ONBOOT=yes
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1-2
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=192.168.31.28
PREFIX=24
GATEWAY=192.168.31.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID=f2cafb9f-1571-4df2-90e7-0d5178a03184
DEVICE=eth1
ONBOOT=yes
[root@ansible01:/etc/sysconfig/network-scripts]
>
[root@ansible01:/etc/sysconfig/network-scripts]
> ls
ifcfg-eth0 ifdown-ippp ifdown-TeamPort ifup-isdn ifup-TeamPort
ifcfg-eth1 ifdown-ipv6 ifdown-tunnel ifup-plip ifup-tunnel
ifcfg-eth1-1 ifdown-isdn ifup ifup-plusb ifup-wireless
ifcfg-eth1-2 ifdown-post ifup-aliases ifup-post init.ipv6-global
ifcfg-lo ifdown-ppp ifup-bnep ifup-ppp network-functions
ifdown ifdown-routes ifup-eth ifup-routes network-functions-ipv6
ifdown-bnep ifdown-sit ifup-ippp ifup-sit
ifdown-eth ifdown-Team ifup-ipv6 ifup-Team
[root@ansible01:/etc/sysconfig/network-scripts]
> rm -rf ifcfg-eth1-2
[root@ansible01:/etc/sysconfig/network-scripts]
>
[root@ansible01:/etc/sysconfig/network-scripts]
> ls -l
total 232
-rw-r--r--. 1 root root 139 Mar 17 13:02 ifcfg-eth0
-rw-r--r-- 1 root root 278 Mar 20 16:38 ifcfg-eth1
-rw-r--r-- 1 root root 331 Mar 20 16:41 ifcfg-eth1-1
-rw-r--r--. 1 root root 254 May 3 2017 ifcfg-lo
lrwxrwxrwx. 1 root root 24 Mar 17 11:08 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x. 1 root root 654 May 3 2017 ifdown-bnep
-rwxr-xr-x. 1 root root 6571 May 3 2017 ifdown-eth
-rwxr-xr-x. 1 root root 781 May 3 2017 ifdown-ippp
-rwxr-xr-x. 1 root root 4540 May 3 2017 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Mar 17 11:08 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1768 May 3 2017 ifdown-post
-rwxr-xr-x. 1 root root 1068 May 3 2017 ifdown-ppp
-rwxr-xr-x. 1 root root 870 May 3 2017 ifdown-routes
-rwxr-xr-x. 1 root root 1456 May 3 2017 ifdown-sit
-rwxr-xr-x. 1 root root 1621 Aug 3 2017 ifdown-Team
-rwxr-xr-x. 1 root root 1556 Apr 15 2016 ifdown-TeamPort
-rwxr-xr-x. 1 root root 1462 May 3 2017 ifdown-tunnel
lrwxrwxrwx. 1 root root 22 Mar 17 11:08 ifup -> ../../../usr/sbin/ifup
-rwxr-xr-x. 1 root root 12312 May 3 2017 ifup-aliases
-rwxr-xr-x. 1 root root 910 May 3 2017 ifup-bnep
-rwxr-xr-x. 1 root root 12680 May 3 2017 ifup-eth
-rwxr-xr-x. 1 root root 12075 May 3 2017 ifup-ippp
-rwxr-xr-x. 1 root root 11893 May 3 2017 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Mar 17 11:08 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 650 May 3 2017 ifup-plip
-rwxr-xr-x. 1 root root 1064 May 3 2017 ifup-plusb
-rwxr-xr-x. 1 root root 3433 May 3 2017 ifup-post
-rwxr-xr-x. 1 root root 4154 May 3 2017 ifup-ppp
-rwxr-xr-x. 1 root root 2001 May 3 2017 ifup-routes
-rwxr-xr-x. 1 root root 3303 May 3 2017 ifup-sit
-rwxr-xr-x. 1 root root 1755 Apr 15 2016 ifup-Team
-rwxr-xr-x. 1 root root 1876 Apr 15 2016 ifup-TeamPort
-rwxr-xr-x. 1 root root 2711 May 3 2017 ifup-tunnel
-rwxr-xr-x. 1 root root 1836 May 3 2017 ifup-wireless
-rwxr-xr-x. 1 root root 5419 May 3 2017 init.ipv6-global
-rw-r--r--. 1 root root 18919 May 3 2017 network-functions
-rw-r--r--. 1 root root 31027 May 3 2017 network-functions-ipv6
[root@ansible01:/etc/sysconfig/network-scripts]
> ls
ifcfg-eth0 ifdown-ipv6 ifdown-tunnel ifup-plip ifup-tunnel
ifcfg-eth1 ifdown-isdn ifup ifup-plusb ifup-wireless
ifcfg-eth1-1 ifdown-post ifup-aliases ifup-post init.ipv6-global
ifcfg-lo ifdown-ppp ifup-bnep ifup-ppp network-functions
ifdown ifdown-routes ifup-eth ifup-routes network-functions-ipv6
ifdown-bnep ifdown-sit ifup-ippp ifup-sit
ifdown-eth ifdown-Team ifup-ipv6 ifup-Team
ifdown-ippp ifdown-TeamPort ifup-isdn ifup-TeamPort
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1-1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=192.168.31.28
PREFIX=24
GATEWAY=192.168.0.254
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID=3e4a4167-05da-4d2f-a763-6ba29f9622d2
DEVICE=eth1
ONBOOT=yes
[root@ansible01:/etc/sysconfig/network-scripts]
> systemctl restart network.service
[root@ansible01:/etc/sysconfig/network-scripts]
> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.170/24 brd 192.168.31.255 scope global dynamic eth1
valid_lft 21596sec preferred_lft 21596sec
inet6 fe80::3cd8:c358:5fda:8c76/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/etc/sysconfig/network-scripts]
> ls
ifcfg-eth0 ifdown-ipv6 ifdown-tunnel ifup-plip ifup-tunnel
ifcfg-eth1 ifdown-isdn ifup ifup-plusb ifup-wireless
ifcfg-eth1-1 ifdown-post ifup-aliases ifup-post init.ipv6-global
ifcfg-lo ifdown-ppp ifup-bnep ifup-ppp network-functions
ifdown ifdown-routes ifup-eth ifup-routes network-functions-ipv6
ifdown-bnep ifdown-sit ifup-ippp ifup-sit
ifdown-eth ifdown-Team ifup-ipv6 ifup-Team
ifdown-ippp ifdown-TeamPort ifup-isdn ifup-TeamPort
[root@ansible01:/etc/sysconfig/network-scripts]
> nmcli connection show
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
eth1 0a2027d8-54d5-4b95-a682-a9286c6bd692 802-3-ethernet eth1
Wired connection 1 ecc6ad4a-104f-3712-bf25-783532c6ef6a 802-3-ethernet --
eth1 3e4a4167-05da-4d2f-a763-6ba29f9622d2 802-3-ethernet --
[root@ansible01:/etc/sysconfig/network-scripts]
> ls
ifcfg-eth0 ifdown-ipv6 ifdown-tunnel ifup-plip ifup-tunnel
ifcfg-eth1 ifdown-isdn ifup ifup-plusb ifup-wireless
ifcfg-eth1-1 ifdown-post ifup-aliases ifup-post init.ipv6-global
ifcfg-lo ifdown-ppp ifup-bnep ifup-ppp network-functions
ifdown ifdown-routes ifup-eth ifup-routes network-functions-ipv6
ifdown-bnep ifdown-sit ifup-ippp ifup-sit
ifdown-eth ifdown-Team ifup-ipv6 ifup-Team
ifdown-ippp ifdown-TeamPort ifup-isdn ifup-TeamPort
[root@ansible01:/etc/sysconfig/network-scripts]
> cat ifcfg-eth1-1
TYPE=Ethernet
PROXY_METHOD=none
OWSER_ONLY=no
▽OOTPROTO=none
IPADDR=192.168.31.28
PREFIX=24
GATEWAY=192.168.0.254
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth1
UUID=3e4a4167-05da-4d2f-a763-6ba29f9622d2
DEVICE=eth1
ONBOOT=yes
[root@ansible01:/etc/sysconfig/network-scripts]
> vim ifcfg-eth1-1
1 TYPE=Ethernet
2 PROXY_METHOD=none
3 BROWSER_ONLY=no
4 BOOTPROTO=man
5 IPADDR=192.168.31.28
6 PREFIX=24
7 GATEWAY=192.168.0.254
8 DEFROUTE=yes
9 IPV4_FAILURE_FATAL=no
10 IPV6INIT=yes
11 IPV6_AUTOCONF=yes
12 IPV6_DEFROUTE=yes
13 IPV6_FAILURE_FATAL=no
14 IPV6_ADDR_GEN_MODE=stable-privacy
15 NAME=eth1
16 UUID=3e4a4167-05da-4d2f-a763-6ba29f9622d2
17 DEVICE=eth1
18 ONBOOT=yes
ifcfg-eth1-1 [+] 4,14 All
-- INSERT --
2 PROXY_METHOD=none
3 BROWSER_ONLY=no
4 BOOTPROTO=manual
5 IPADDR=192.168.31.28
6 PREFIX=24
7 GATEWAY=192.168.0.254
8 DEFROUTE=yes
9 IPV4_FAILURE_FATAL=no
10 IPV6INIT=yes
11 IPV6_AUTOCONF=yes
12 IPV6_DEFROUTE=yes
13 IPV6_FAILURE_FATAL=no
14 IPV6_ADDR_GEN_MODE=stable-privacy
15 NAME=eth1
16 UUID=3e4a4167-05da-4d2f-a763-6ba29f9622d2
ifcfg-eth1-1 [+] 4,17 33%
-- INSERT --
1 TYPE=Ethernet
2 PROXY_METHOD=none
3 BROWSER_ONLY=no
4 BOOTPROTO=manual
5 IPADDR=192.168.31.28
6 PREFIX=24
7 GATEWAY=192.168.0.254
8 DEFROUTE=yes
9 IPV4_FAILURE_FATAL=no
10 IPV6INIT=yes
11 IPV6_AUTOCONF=yes
12 IPV6_DEFROUTE=yes
13 IPV6_FAILURE_FATAL=no
14 IPV6_ADDR_GEN_MODE=stable-privacy
15 NAME=eth1
16 UUID=3e4a4167-05da-4d2f-a763-6ba29f9622d2
17 DEVICE=eth1
18 ONBOOT=yes
ifcfg-eth1-1 [+] 4,16 All
"ifcfg-eth1-1" 18L, 333C written
[root@ansible01:/etc/sysconfig/network-scripts]
> systemctl restart network.service
[root@ansible01:/etc/sysconfig/network-scripts]
> ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.170/24 brd 192.168.31.255 scope global dynamic eth1
valid_lft 86393sec preferred_lft 86393sec
inet 192.168.31.28/24 brd 192.168.31.255 scope global secondary eth1
valid_lft forever preferred_lft forever
inet6 fe80::3cd8:c358:5fda:8c76/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/etc/sysconfig/network-scripts]
> rm -rf ifcfg-eth1
[root@ansible01:/etc/sysconfig/network-scripts]
> systemctl restart network.service
[root@ansible01:/etc/sysconfig/network-scripts]
> ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:bd brd ff:ff:ff:ff:ff:ff
inet 192.168.31.176/24 brd 192.168.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3c:8fbd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3c:8f:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.170/24 brd 192.168.31.255 scope global dynamic eth1
valid_lft 86393sec preferred_lft 86393sec
inet 192.168.31.28/24 brd 192.168.31.255 scope global secondary eth1
valid_lft forever preferred_lft forever
inet6 fe80::d712:1936:1554:8b49/64 scope link
valid_lft forever preferred_lft forever
[root@ansible01:/etc/sysconfig/network-scripts]
> ll
total 228
-rw-r--r--. 1 root root 139 Mar 17 13:02 ifcfg-eth0
-rw-r--r-- 1 root root 333 Mar 20 17:04 ifcfg-eth1-1
-rw-r--r--. 1 root root 254 May 3 2017 ifcfg-lo
lrwxrwxrwx. 1 root root 24 Mar 17 11:08 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x. 1 root root 654 May 3 2017 ifdown-bnep
-rwxr-xr-x. 1 root root 6571 May 3 2017 ifdown-eth
-rwxr-xr-x. 1 root root 781 May 3 2017 ifdown-ippp
-rwxr-xr-x. 1 root root 4540 May 3 2017 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Mar 17 11:08 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1768 May 3 2017 ifdown-post
-rwxr-xr-x. 1 root root 1068 May 3 2017 ifdown-ppp
-rwxr-xr-x. 1 root root 870 May 3 2017 ifdown-routes
-rwxr-xr-x. 1 root root 1456 May 3 2017 ifdown-sit
-rwxr-xr-x. 1 root root 1621 Aug 3 2017 ifdown-Team
-rwxr-xr-x. 1 root root 1556 Apr 15 2016 ifdown-TeamPort
-rwxr-xr-x. 1 root root 1462 May 3 2017 ifdown-tunnel
lrwxrwxrwx. 1 root root 22 Mar 17 11:08 ifup -> ../../../usr/sbin/ifup
-rwxr-xr-x. 1 root root 12312 May 3 2017 ifup-aliases
-rwxr-xr-x. 1 root root 910 May 3 2017 ifup-bnep
-rwxr-xr-x. 1 root root 12680 May 3 2017 ifup-eth
-rwxr-xr-x. 1 root root 12075 May 3 2017 ifup-ippp
-rwxr-xr-x. 1 root root 11893 May 3 2017 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Mar 17 11:08 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 650 May 3 2017 ifup-plip
-rwxr-xr-x. 1 root root 1064 May 3 2017 ifup-plusb
-rwxr-xr-x. 1 root root 3433 May 3 2017 ifup-post
-rwxr-xr-x. 1 root root 4154 May 3 2017 ifup-ppp
-rwxr-xr-x. 1 root root 2001 May 3 2017 ifup-routes
-rwxr-xr-x. 1 root root 3303 May 3 2017 ifup-sit
-rwxr-xr-x. 1 root root 1755 Apr 15 2016 ifup-Team
-rwxr-xr-x. 1 root root 1876 Apr 15 2016 ifup-TeamPort
-rwxr-xr-x. 1 root root 2711 May 3 2017 ifup-tunnel
-rwxr-xr-x. 1 root root 1836 May 3 2017 ifup-wireless
-rwxr-xr-x. 1 root root 5419 May 3 2017 init.ipv6-global
-rw-r--r--. 1 root root 18919 May 3 2017 network-functions
-rw-r--r--. 1 root root 31027 May 3 2017 network-functions-ipv6
[root@ansible01:/etc/sysconfig/network-scripts]
> systemctl restart network.service
[root@ansible01:/etc/sysconfig/network-scripts]
> ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.31.176 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::20c:29ff:fe3c:8fbd prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:3c:8f:bd txqueuelen 1000 (Ethernet)
RX packets 29925 bytes 2164788 (2.0 MiB)
RX errors 0 dropped 35 overruns 0 frame 0
TX packets 4155 bytes 481152 (469.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.31.28 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::20c:29ff:fe3c:8fc7 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:3c:8f:c7 txqueuelen 1000 (Ethernet)
RX packets 17 bytes 1342 (1.3 KiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 24 bytes 1988 (1.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 12 bytes 1404 (1.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1404 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@ansible01:/etc/sysconfig/network-scripts]
> ls
ifcfg-eth0 ifdown-ippp ifdown-sit ifup-bnep ifup-plusb ifup-TeamPort
ifcfg-eth1-1 ifdown-ipv6 ifdown-Team ifup-eth ifup-post ifup-tunnel
ifcfg-lo ifdown-isdn ifdown-TeamPort ifup-ippp ifup-ppp ifup-wireless
ifdown ifdown-post ifdown-tunnel ifup-ipv6 ifup-routes init.ipv6-global
ifdown-bnep ifdown-ppp ifup ifup-isdn ifup-sit network-functions
ifdown-eth ifdown-routes ifup-aliases ifup-plip ifup-Team network-functions-ipv6
[root@ansible01:/etc/sysconfig/network-scripts]
> mv ifcfg-eth1-1 ifcfg-eth1
[root@ansible01:/etc/sysconfig/network-scripts]
> ls
ifcfg-eth0 ifdown-ippp ifdown-sit ifup-bnep ifup-plusb ifup-TeamPort
ifcfg-eth1 ifdown-ipv6 ifdown-Team ifup-eth ifup-post ifup-tunnel
ifcfg-lo ifdown-isdn ifdown-TeamPort ifup-ippp ifup-ppp ifup-wireless
ifdown ifdown-post ifdown-tunnel ifup-ipv6 ifup-routes init.ipv6-global
ifdown-bnep ifdown-ppp ifup ifup-isdn ifup-sit network-functions
ifdown-eth ifdown-routes ifup-aliases ifup-plip ifup-Team network-functions-ipv6
[root@ansible01:/etc/sysconfig/network-scripts]
> systemctl restart network.service
[root@ansible01:/etc/sysconfig/network-scripts]
> ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.31.176 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::20c:29ff:fe3c:8fbd prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:3c:8f:bd txqueuelen 1000 (Ethernet)
RX packets 30006 bytes 2169700 (2.0 MiB)
RX errors 0 dropped 43 overruns 0 frame 0
TX packets 4174 bytes 482482 (471.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.31.28 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::20c:29ff:fe3c:8fc7 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:3c:8f:c7 txqueuelen 1000 (Ethernet)
RX packets 29 bytes 2062 (2.0 KiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 25 bytes 2002 (1.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 12 bytes 1404 (1.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1404 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
nmcli的更多相关文章
- Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7
SOLUTION VERIFIED September 13 2016 KB1248793 Environment Red Hat Enterprise Linux 7 NetworkManager ...
- Configure a VLAN (on top of a bond) with NetworkManager (nmcli) in RHEL7
not on top of a bond Environment Red Hat Enterprise Linux 7 NetworkManager Issue Need an 802.1q VLAN ...
- 练习:使用nmcli 配置网络连接
显示所有连接 # nmcli con show 显示活动连接的所有配置信息 # nmcli con show "System eth0" --->引号内为连接的网卡名称 显示 ...
- CentOS 7使用nmcli配置双网卡聚合
进入CentOS 7以后,网络方面变化比较大,例如eth0不见了,ifconfig不见了,其原因是网络服务全部都由NetworkManager管理了,下面记录下今天下午用nmcli配置的网卡聚合,网络 ...
- 在 Linux 中用 nmcli 命令绑定多块网卡
今天,我们来学习一下在 CentOS 7.x 中如何用 nmcli(Network Manager Command Line Interface:网络管理命令行接口)进行网卡绑定. 网卡(接口)绑定是 ...
- RHEL7网络管理之nmcli
在RHEL7中默认使用NetworkManager 守护进程来监控和管理网络设置.nmcli是命令行的管理NetworkManager的工具,会自动把配置写到/etc/sysconfig/networ ...
- Nmcli 网络管理命令行工具基础
介绍 在本教程中,我们会在CentOS / RHEL 7中讨论网络管理命令行工具NetworkManager command line tool,也叫nmcli.那些使用ifconfig的用户应该在C ...
- 使用nmcli创建网络连接
使用nmcli创建一个新的网络连接时,首先需要清楚几个概念 设备即接口 连接是供设备使用的配置,其由一组设置组成. 同一个设备可能存在多个连接,但是一次只能有一个保持活动状态 在创建新的连接时,参数的 ...
- Centos7多网卡绑定操作,通过nmcli命令操作。
运行 ip link 命令查看系统中可用的接口1.创建bond网卡nmcli con add type team con-name team0 ifname team0 config '{" ...
- 网络配置之nmcli
使用nmcli命令配置网络 NetworkManager是管理和监控网络设置的守护进程,设备既就是网络接口,连接是对网络接口的配置,一个网络接口可以有多个连接配置,但同时只有一个连接配置生效. 1 配 ...
随机推荐
- P1265 公路修建 (prim)
题目描述 某国有n个城市,它们互相之间没有公路相通,因此交通十分不便.为解决这一"行路难"的问题,政府决定修建公路.修建公路的任务由各城市共同完成. 修建工程分若干轮完成.在每一轮 ...
- 1.1 Eclipse的安装
下载地址:http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr1 2.java jdk 的 ...
- 启动 Appium 自带模拟器
1.先在sclipse中新建并打开一个设备 2.启动appium 3.安装apk 打开cmd 并在sdk安装目录的tools文件夹下输入安装命令adb install xxx.apk(在这之前需要把 ...
- mysql点滴_02程序中运行sql语句报字符集问题解决
程序中运行 "SELECT t.EVENT_TYPE_ID FROM RATABLE_EVENT_TYPE t WHERE t.NAME='帐期末费用转移事件'" 报错 错误码 ...
- 【分享】GEARS of DRAGOON 1+2【日文硬盘版】[带全CG存档&攻略+SSG改动+打开存档补丁]
冒险者们哟.寻找龙秘玉吧--! ninetail的最新作,是使用丰富多彩的技能·道具探索迷宫的3D迷宫RPG! 存在着骑士和神官的架空世界常见的职业为首的13种职业.超过数百种的道具的登场! 和伙伴一 ...
- HDU 1042.N!【高精度乘法】【8月24】
N! Problem Description Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N! Input One N ...
- unity3d Pathfinding插件使用
Overview The central script of the A* Pathfinding Project is the script 'astarpath.cs', it acts as a ...
- MVC发送邮件
<> 发送邮件报错说明 发送邮件 假设发送人的邮箱username与邮箱password都没有填写错误:假设报:參数或变量中有语法错误. server响应为:mail from addre ...
- Oracle RMAN备份中catalog和nocatalog区别
nocatalog方式:用control file作为catalog,每一次备份都要往控制文件里面写好多备份信息,控制文件里面会有越来越多的备份信息,即RMAN的备份信息写在本地控制文件里面. cat ...
- Oracle 11G R2 RAC中的scan ip 的用途和基本原理
Oracle 11G R2 RAC增加了scan ip功能,在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个 ...