nmcli nmtui systemctl restart NetworkManager
!part_command = run last command
[root@localhost ~]# nmcli connection show
NAME UUID TYPE DEVICE
ens33 80d3cc7f-4474-4a88-b534-679859a360ca 802-3-ethernet ens33
[root@localhost ~]# ls /etc/sysconfig/network-scripts/
ifcfg-ens33 ifdown-isdn ifup ifup-plip ifup-tunnel
ifcfg-lo ifdown-post ifup-aliases ifup-plusb ifup-wireless
ifdown ifdown-ppp ifup-bnep ifup-post init.ipv6-global
let's add new connection
[root@localhost ~]# nmcli connection add con-name test ifname ens33 type ethernet ip4 10.0.0.15/24
Connection 'test' (d9819184-7f5f-4880-b7f6-75ccd7739e62) successfully added.
[root@localhost ~]# nmcli connection show NAME UUID TYPE DEVICE
ens33 80d3cc7f-4474-4a88-b534-679859a360ca 802-3-ethernet ens33
test d9819184-7f5f-4880-b7f6-75ccd7739e62 802-3-ethernet --
nmcli conn down ens33
[root@localhost ~]# nmcli connection show
NAME UUID TYPE DEVICE
ens33 80d3cc7f-4474-4a88-b534-679859a360ca 802-3-ethernet ens33
[root@localhost ~]# ls /etc/sysconfig/network-scripts/
ifcfg-ens33 ifdown-isdn ifup ifup-plip ifup-tunnel
ifcfg-lo ifdown-post ifup-aliases ifup-plusb ifup-wireless
ifdown ifdown-ppp ifup-bnep ifup-post init.ipv6-global
let's add new connection
[root@localhost ~]# nmcli connection add con-name test ifname ens33 type ethernet ip4 10.0.0.15/24
Connection 'test' (d9819184-7f5f-4880-b7f6-75ccd7739e62) successfully added.
[root@localhost ~]# nmcli connection show NAME UUID TYPE DEVICE
ens33 80d3cc7f-4474-4a88-b534-679859a360ca 802-3-ethernet ens33
test d9819184-7f5f-4880-b7f6-75ccd7739e62 802-3-ethernet --
nmcli conn down ens33
nmcli conn up test
[root@localhost ~]# !ip
ip a 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: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:17:b4:58 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.15/24 brd 10.0.0.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::ccb5:1d23:1a98:e42f/64 scope link
valid_lft forever preferred_lft forever
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-test
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.0.0.15
PREFIX=24
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=test
UUID=d9819184-7f5f-4880-b7f6-75ccd7739e62
DEVICE=ens33
ONBOOT=yes
after changes in nmtui - run
systemctl restart NetworkManager
Comments
Post a Comment