In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to configure network IP in RHEL7.0. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The naming mode of the network card in RHEL7 has changed from eth0,1,2 to enoXXXXX. En stands for enthernet (Ethernet) and o for onboard (built-in). That string of numbers is automatically generated by some kind of index number on the motherboard to ensure its uniqueness. Compared with the original naming method, this new method is longer and difficult to remember, but the advantage is that the number is unique and it is not easy to make mistakes when doing system migration.
1. Modify / etc/sysconfig/network-scripts/eno16777736
Check your Nic name (this machine is eno16777736):
[root@linuxprobe Desktop] # ifconfig
Eno16777736: flags=4163 mtu 1500
Inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
Inet6 fe80::20c:29ff:feb8:2b07 prefixlen 64 scopeid 0x20
Inet6 fde0:b912:e3a9:0:20c:29ff:feb8:2b07 prefixlen 64 scopeid 0x0
Ether 00:0c:29:b8:2b:07 txqueuelen 1000 (Ethernet)
RX packets 37 bytes 5428 (5.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 62 bytes 8269 (8.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 0 (Local Loopback)
RX packets 134 bytes 10928 (10.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 134 bytes 10928 (10.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@linuxprobe Desktop] #
Edit the ifcfg-eno16777736 file:
Red is the content that needs to be modified or added, save and exit.
Partial interpretation:
TYPE=Ethernet # Network Interface Type
BOOTPROTO=static # is dynamically dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
Does IPV6INIT=yes # support IPV6?
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736 # Nic name
UUID=72cf53fd-534c-4765-912b-3df575a10a7d
ONBOOT=yes # enable automatically enable network connection
IPADDRO=192.168.1.20 # set IP address
GATEWAY0=192.168.1.1 # set Gateway
PREFIX0=24 # set the subnet mask
DNS1=192.168.1.1 # set DNS
HWADDR=00:0C:29:B8:2B:07
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
Restart the network card and test the network:
[root@linuxprobe Desktop] # systemctl restart network
two。 Graphic tool nmtui
Execute the command at the terminal:
[root@linuxprobe Desktop] # nmtui
You still need to restart the network card to take effect and test the network.
3. Graphic tool nm-connection-editor
Terminal executes commands:
[root@linuxprobe Desktop] # nm-connection-editor
As long as you can access the Internet in one of the three ways, it is not very easy to configure the services you need.
This is the end of the article on "how to configure network IP in RHEL7.0". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
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.