大网数据广告活动
服务器运维问答

Where are nmcli capitalized setting stored and how can I modify them?

· 52CE 我爱测

I have a VM and I'm playing with nmcli on CentOS 8 nmcli shows a couple addresses which I added. I was able to remove the .106 address from the ipv4.addresses , but not from the capitalized configuration (I don't know what the ca…

问题原文

原帖链接 · Bob Smith · CC BY-SA 4.0

I have a VM and I'm playing with nmcli on CentOS 8

nmcli shows a couple addresses which I added. I was able to remove the .106 address from the ipv4.addresses, but not from the capitalized configuration (I don't know what the capitalized component config is called).

$ nmcli connection show enp0s8
...
ipv4.addresses:                         192.168.56.107/24
...
IP4.ADDRESS[1]:                         192.168.56.107/24
IP4.ADDRESS[2]:                         192.168.56.106/24

nmcli still shows both addresses are active

$ nmcli
enp0s8: connected to enp0s8
"Intel 82540EM"
ethernet (e1000), 08:00:27:42:77:8C, hw, mtu 1500
inet4 192.168.56.107/24
inet4 192.168.56.106/24
route4 192.168.56.0/24
route4 192.168.56.0/24
route4 192.168.56.0/24
inet6 fe80::f3b6:f5e9:b207:49a1/64
route6 fe80::/64
route6 ff00::/8

As does ip route

$ ip address show enp0s8
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:42:77:8c brd ff:ff:ff:ff:ff:ff
inet 192.168.56.106/24 brd 192.168.56.255 scope global dynamic noprefixroute enp0s8
   valid_lft 333sec preferred_lft 333sec
inet 192.168.56.107/24 brd 192.168.56.255 scope global secondary noprefixroute enp0s8
   valid_lft forever preferred_lft forever
inet6 fe80::f3b6:f5e9:b207:49a1/64 scope link noprefixroute
   valid_lft forever preferred_lft forever

The configuration does not appear in the network scripts

$ egrep "106" /etc/sysconfig/network-scripts/*
$

My question, with this context is, where is the capitalized config stored and how can I modify it?

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

The "settings" appearing in all capital letters are not settings, but represent the actual current state of the connection. You do not "modify" them because they are not settings. Rather, if you want to change the live connection, you use the existing tools (e.g. ip addr del 192.168.56.106 dev enp8s0) to do so.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-03-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。