nmcli connection add type ethernet ifname eth1 con-name eth1
nmcli connection modify eth1 ipv4.address 172.16.0.2/24
nmcli connection modify eth1 ipv4.method manual
nmcli connection up eth1
[root@aaaa ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
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 mq state UP group default qlen 1000
link/ether 00:15:5d:0b:c9:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.11.208/24 brd 192.168.11.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 240d:1a:76e:800:5397:a6f9:8481:e895/64 scope global dynamic noprefixroute
valid_lft 7502sec preferred_lft 7502sec
inet6 fe80::5854:f022:4e88:61d1/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:0b:c9:0a brd ff:ff:ff:ff:ff:ff
inet 172.16.0.2/24 brd 172.16.0.255 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet6 fe80::a1c2:78aa:a19f:5a48/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Recommended Posts