Fixed IP is configured to allow your system to surf the Internet and connect to your server remotely.
Command:
#ls "List directories or files under the current directory"
#ip addr "To view your network card information"
#dhclient "Automatically configure IP addresses for your virtual system"
#ctrl +l "Clear Screen"
#route-N "View network card Gateway"
Ifcfg-nes33 "Virtual network card" Ifcfg-lo "loopback address"
#vi/etc/sysconfig/network-scripts/ifcfg-ens33 "NIC configuration file"
Press I to enter edit mode:
Bootproto=dhcp "bootproto=static (change to dynamic IP switch to static IP)
Onboot=no "Onboot=yes (changed to boot from boot)
ipaddr=192.168.160.128 (IP value obtained by dhclient)
netmask=255.255.255.0 (Subnet mask)
gateway=192.168.160.2 (gateway address)
dns1=119.29.29.29 (DNS server)
Press ESC to exit
Press:: Wq "Save and Exit"
# "VI" "edit mode can modify the contents of the document, press ESC to exit the edit mode into the command mode input:": Wq "Save Exit"
#systemctl Restart Network.service "Restart Network Service"
#ifconfig "Viewing network card information"
#ping www.qq.com "See if I can ping the network"
If there's nothing else behind this line, it means you're on the Internet.
Troubleshooting Network problems:
Can not ping the outside network after the change, change the network mode,
If NAT mode is changed to bridging mode, and vice versa.
If you change the network mode to find or not ping,
Use the Dhclient command to re-obtain the IP address, if you cannot ping the
Recheck the network configuration file with the VI editor.
#vi/etc/sysconfig/network-scripts/ifcfg-ens33 "NIC configuration file"
(Small white Personal method Reference)
Reconfigure the IP Restore virtual network editor to come again.
Once again, no, it's over. The problem is naturally found ~ ~