Linux Network configuration

Source: Internet
Author: User

   My computer is the WINDOWS10 operating system, installed on the above virtual machine version 12, using the centos6.8 version of the image file installation. Note that you must use the root user to have permission to modify the contents of the file.

1 CentOS installed in VMware, the default cannot connect to the network, click the red flag to access the browser:

2 Setting up the network

first click on the virtual machine edit-"then click on the Virtual network editor, select VMnet8, click on the" NAT "setting. View the gateway address.

 Then modify the/etc/sysconfig/network-scripts/ifcfg-eth0 file (remember the backup, and the IP configuration of Windows corresponds), when I test many times I found that the gateway must be one by one corresponding,

IP addresses may not necessarily have to be one by one for a network segment, but for accuracy or one by one to correspond. You can also test your own play. The contents of the configuration file are as follows:

nic name Device=eth0# restart effective Onboot=yes# is set to static Ipbootproto=static#ip地址IPADDR =10.23. 57.227 #子网掩码NETMASK=255.255. 255.0 #网关GATEWAY  =10.23.57.2 #DNS1DNS1=8.8. 8.8 #DNS2DNS2=4.4. 4.4

Note that the gateway here must correspond to one by one at the net settings.

last use Use the command: Service network restart or/etc/init.d/network restart to perform a networking restart. Access the network again. can be successfully accessed.

I myself in the company test when connected to the wired network, the configuration is successfully accessible, back to the place where the wireless network can also be normal access, because the wireless network settings automatically get the IP address.

Linux Network configuration

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.