In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how centos7.6 in LINUX modifies static IP and configuration parameter NM_CONTROLLED. I hope you will get something after reading this article. Let's discuss it together.
At present, various versions of the OS operating system are frantically upgraded, and the operating system settings that change with it have also changed a lot. The latest version of CENTOS has been
It is 8.x, but some configurations related to the operating system have changed a lot compared with previous versions of centos 7.6.For example, static IP and configuration parameters
NM_CONTROLLED does not work even if its IP configuration uses static IP when the parameters are not changed in the network configuration file.
-- configuration of ifcfg-ens34
[root@centos76mysqlpri network-scripts] # cat ifcfg-ens34
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static # static IP has been declared here
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=ens34
UUID=af87d788-f524-4095-81c9-367eba488f9a
DEVICE=ens34
>
IPADDR=192.168.192.201
PREFIX=24
GATEWAY=192.168.192.1
IPV6_PRIVACY=no
[root@centos76mysqlpri network-scripts] #
The lack of IP address after ifcfg-ens34 startup is not expected.
[root@centos76mysqlpri network-scripts] # ifup ens34
[root@centos76mysqlpri network-scripts] # ifconfig-a
Ens33: flags=4163 mtu 1500
Inet 192.168.248.129 netmask 255.255.255.0 broadcast 192.168.248.255
Inet6 fe80::7391:3e5e:cead:f642 prefixlen 64 scopeid 0x20
Ether 00:0c:29:26:76:0c txqueuelen 1000 (Ethernet)
RX packets 13523 bytes 17404331 (16.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5554 bytes 343077 (335.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Ens34: flags=4163 mtu 1500
Inet 192.168.192.128 netmask 255.255.255.0 broadcast 192.168.192.255
Inet6 fe80::2162:583:8ee:d0be prefixlen 64 scopeid 0x20
Ether 00:0c:29:26:76:16 txqueuelen 1000 (Ethernet)
RX packets 63 bytes 7008 (6.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 138 bytes 20565 (20.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Lo: flags=73 mtu 65536
Inet 127.0.0.1 netmask 255.0.0.0
Inet6:: 1 prefixlen 128 scopeid 0x10
Loop txqueuelen 1000 (Local Loopback)
RX packets 224 bytes 18384 (17.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 224 bytes 18384 (17.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Virbr0: flags=4099 mtu 1500
Inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
Ether 52:54:00:2f:86:09 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Virbr0-nic: flags=4098 mtu 1500
Ether 52:54:00:2f:86:09 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@centos76mysqlpri network-scripts] #
At this point, I feel a little baffled! The query is that centos7.6 uses the NM_CONTROLLED parameter to control whether it is managed through the network manager.
-- modify ifcfg-ens34 configuration
[root@centos76mysqlpri network-scripts] # cat ifcfg-ens34
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
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=ens34
UUID=af87d788-f524-4095-81c9-367eba488f9a
DEVICE=ens34
>
NM_CONTROLLED=no
IPADDR=192.168.192.201
PREFIX=24
GATEWAY=192.168.192.1
IPV6_PRIVACY=no
[root@centos76mysqlpri network-scripts] #
-- after the ifcfg-ens34 network card is restarted
[root@centos76mysqlpri network-scripts] # ifup ens34
[root@centos76mysqlpri network-scripts] # ifconfig-a
Ens33: flags=4163 mtu 1500
Inet 192.168.248.129 netmask 255.255.255.0 broadcast 192.168.248.255
Inet6 fe80::7391:3e5e:cead:f642 prefixlen 64 scopeid 0x20
Ether 00:0c:29:26:76:0c txqueuelen 1000 (Ethernet)
RX packets 13523 bytes 17404331 (16.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5554 bytes 343077 (335.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Ens34: flags=4163 mtu 1500
Inet 192.168.192.201 netmask 255.255.255.0 broadcast 192.168.192.255
Inet6 fe80::20c:29ff:fe26:7616 prefixlen 64 scopeid 0x20
Ether 00:0c:29:26:76:16 txqueuelen 1000 (Ethernet)
RX packets 81 bytes 8664 (8.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 167 bytes 24573 (23.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Lo: flags=73 mtu 65536
Inet 127.0.0.1 netmask 255.0.0.0
Inet6:: 1 prefixlen 128 scopeid 0x10
Loop txqueuelen 1000 (Local Loopback)
RX packets 224 bytes 18384 (17.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 224 bytes 18384 (17.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Virbr0: flags=4099 mtu 1500
Inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
Ether 52:54:00:2f:86:09 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Virbr0-nic: flags=4098 mtu 1500
Ether 52:54:00:2f:86:09 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@centos76mysqlpri network-scripts] #
After reading this article, I believe you have a certain understanding of "how centos7.6 modifies static IP and configuration parameter NM_CONTROLLED in LINUX". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
# include "stdlib.h" # include "stdio.h" void main () {char s [255]; while (1)
© 2024 shulou.com SLNews company. All rights reserved.