This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13058|Reply: 0

[linux] CentOS 7 Unable to Access the Internet Tutorial on Setting a Static IP Address

[Copy link]
Posted on 2019-11-21 16:04:12 | | | |
After installing centos 7 on the Hyper-V virtual machine, there is no network, so it is impossible to access the Internet and install some services.

After installing the system, you need to set a static IP address, the tutorial is as follows:

1. Check the network card



2. Configure the eth0 static IP address

PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static # Use a static IP address, the default is dhcp
IPADDR=192.168.5.122 # The static IP set to the table
NETMASK=255.255.255.0 # Subnet mask
GATEWAY=192.168.5.2 # GATEWAY
DNS1=192.168.5.2 # DNS server
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=ens33
UUID=8df5a6e0-cba0-4f89-b55c-319d2616a985
DEVICE=ens33
ONBOOT=yes
ZONE=public


Note: In NAT mode, the static IP gateway set here should not be the same as the gateway of the host.
Finally, restart the network to make the IP you just configured take effect








Previous:Hikvision face device (enable the function of arming backhaul to capture photos) VB.NET source code
Next:CentOS 7 installation Gitlab installation tutorial
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com