In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "centos 7.0 how to achieve network card configuration and renaming", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "centos 7.0how to achieve network card configuration and renaming" this article.
Centos 7.0 Network Card configuration and renaming tutorial 2014-08-14 15:40:43
Classification: system operation and maintenance
After centos 7.0is installed, the network card is not booted by default, and the name of the network card is changed. In centos 5 and previous system network cards, the name was named eth0 eth2, but in the era of centos 6, the name of the network card was changed to the name of em1 em2, and a greater change appeared in the era of centos 7, when the name of the network card was directly changed to the appearance of ens192 eno12312 and so on. The following is a specific description of the configuration operation of the centos 7.0Nic.
The installation of the system is complete, enter the configuration folder of the network card
You can see here that my network card name is currently ifcfg-ens192.
The last few lines of vi ifcfg-ens192 are configuration files that need to be added by yourself.
Click (here) to collapse or open
HWADDR=00:50:56:bf:00:25
TYPE=Ethernet
BOOTPROTO=static # enable static IP address
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=ens192
UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11
ONBOOT=yes # enable automatically enable network connection setting boot, be sure to modify it
IPADDR0=10.0.0.101 # set IP address
PREFIXO0=24 # set the subnet mask
GATEWAY0=10.0.0.1 # set Gateway
DNS1=202.102.152.3 # set the main DNS
DNS2=202.102.128.68 # set up DNS. What I write here is the dns server in Jinan. You can fill in according to your needs.
Save exit.
Restart the network card here you can use either service network restart or centos7's new command systemctl restart network.service
Finally, take a look at the information of the network card using the command systemctl status network.status
Of course, the name of the network card can be modified according to your own needs, it can be changed to eth0 em1, etc.
Edit the contents of the / etc/sysconfig/grub file and add "net.ifnames=0 biosdevname=0"
Execute: grub2-mkconfig-o / boot/grub2/grub.cfg
Rename the file
Mv / etc/sysconfig/network-scripts/ifcfg-ens192 / etc/sysconfig/network-scripts/ifcfg-eth0
Note that the NAME = ens192 in the configuration file is modified to the same name as above: NAME = eth0
Restart the system after the configuration is completed, and view the configuration information of the network card ifocnfig
The above is all the contents of the article "how to configure and rename the network card in centos 7.0". 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.