Linux systems use NAT mode to configure detailed steps in the Internet

Source: Internet
Author: User

1.6/1.7 IP Configuration

The fixed IP is configured to allow your system to surf the Internet so that you can connect to your server remotely.

Open virtual machine into virtual system = "Enter root user/Enter user password"

Command: LS "lists directories or files under the current directory"

#ip addr "To view your network card information"

#dhclient "Automatically configure IP addresses for your virtual system"

Nes33 "Virtual network card" Lo "loopback address"

Open Virtual Machine edit = "virtual Network Editor =" Select VMnet8

You can see the subnet and subnet mask, and then select NAT Settings (s) ...

Remember the gateway. Back to the virtual machine

#vi/etc/sysconfig/network-scripts/ifcfg-ens33 "Network adapter Profile" command: VI "Edit Document"

Press I to enter edit mode.

Change the bootproto=dhcp into a bootproto=static.

Change the onboot=no into a onboot=yes.

Add the following

ipaddr=192.168.17.12

netmask=255.255.255.0

gateway=192.168.17.2

dns1=119.29.29.29

Press ESC to exit

Press: Wq "Save and 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.

#route-N "View network card Gateway"

#yum install-y net-tools "Install ifconfig command" command: Yum "installs a package"


Linux systems use NAT mode to configure detailed steps in the Internet

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.