Rocky Linux9.1 手动配置静态IP

时间:2022-12-15 17:56:52

#修改网络的配置文件

[root@zabbix ~]# vim /etc/NetworkManager/system-connections/ens192.nmconnection

[connection]

id=ens192

uuid=0572911c-bd45-33c3-9442-c896e03207dd

type=ethernet

autoconnect-priority=-999

interface-name=ens192

permissions=user:root:;

timestamp=1671092551

[ethernet]

[ipv4]

address1=192.168.75.250/22,192.168.72.1

dns=172.25.2.69;

may-fail=false

method=manual

[ipv6]

addr-gen-mode=eui64

method=auto

never-default=true

[proxy]

Rocky Linux9.1 手动配置静态IP

#重新加载配置文件

[root@zabbix ~]# nmcli connection reload /etc/NetworkManager/system-connections/ens192.nmconnection

#激活配置文件

[root@zabbix ~]# nmcli connection up /etc/NetworkManager/system-connections/ens192.nmconnection