In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what are the differences between the centos7 network configuration and the previous version, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!
Centos7 has an automatic detection function for network card devices:
(1) Nic naming mechanism
How systemd names network devices:
(a) if the index information provided by Firmware or BIOS for devices integrated on the motherboard is available and predictable, it is named after this index, such as eno1
(B) if the index information provided by Firmware or BIOS for the PCI-E expansion slot is available and predictable, name it according to this index, such as ens1
(C) if physical location information for the hardware interface is available, name it based on this information, such as enp2s0
(d) if the user starts it explicitly, it can also be named after the MAC address, enx2387a1dc56
(e) if none of the above is available, the traditional naming mechanism is used.
Some of the above naming mechanisms require the participation of biosdevname programs.
(2) the format of name composition
En:ethernet Ethernet
Wl:wlan wireless local area network
Ww:wwan wireless wide area network
Name type:
O: the device index number of the integrated device
S: the index number of the expansion slot
X: naming based on MAC address
Ps:enp2s1
Naming process of Nic devices:
Step one:
Udev, accessibility program / lib/udev/rename_device,/usr/lib/udev/rules.d/60-net.rules
Read configuration file
Step 2:
Biosdevname will be based on / usr/lib/udev/rules.d/71-biosdevname.rules
Step 3:
By detecting the network interface device, according to / usr/lib/udev/rules.d/75-net-description
ID_NET_NAME_ONBOARD,ID_NET_NAME_SLOT,ID_NET_NAME_PATH
Return to the traditional naming method:
(1) Edit / etc/default/grub configuration file
GRUB_CMDLINE_LINUX= "net.ifnames=0rhgbquiet"
(2) generate its configuration file for grub2
Grub2-mkconfig-o/etc/grub2.cfg
(3) restart the system
Address configuration tool: nmcli:
Display network information: nmclideviceshow [deveth0]
Nmclicon {show | up | down | add | modify | edit | delete | reload | load}
How to modify attributes such as IP address:
# nmcliconnectionmodify API name [+ | -] setting.propertyvalue
Setting.property:
Ipv4.addresses
Ipv4.gateway
Ipv4.dns1
Ipv4.method
Manual
Network Interface configuration tui tool: nmtui
Host name configuration tool: hostnamectl
Status
Set-hostname
The above is all the contents of the article "what are the differences between the centos7 network configuration and the previous version". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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
© 2024 shulou.com SLNews company. All rights reserved.