CentOS Virtual machine post-installation network configuration

Source: Internet
Author: User

After I installed the CentOS 6.8 minimal.iso with VBox, there was no network configuration and I needed to configure the network manually.


1. In the VBox centos configuration, select Network mode. I choose the bridge mode, select the bridge mode, the network interface and the network interface of your host, can be configured to the same network segment, so that your host and virtual machine can be freely accessible, and other hosts within the LAN can also communicate with the virtual machine.


2. Start the CentOS virtual machine and execute

ls/etc/sysconfig/network-scripts/ifcfg-*

You can see that there is a/etc/sysconfig/network-scripts/ifcfg-eth0 file, eth0 is a network interface, but the interface does not start when it is just installed. Starting mode:

A. Modify/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0hwaddr=08:00:27:8a:e8:99type=ethernetuuid=cb09fdd1-897f-4d48-a1f8-e1d44499a02bonboot=yes # Open Nm_ at system startup CONTROLLED=YESBOOTPROTO=DHCP # DHCP

After restarting Shutdown-r now, CentOS will be able to obtain IP via DHCP after booting.

If you do not have DHCP in your LAN or want to configure a static IP, you can include it in the configuration file above:

If the LAN is 192.168.0.0/24 and you want to configure an interface IP of 192.168.0.100, add the configuration:

Bootproto=static # changed from DHCP to staticbroadcast=192.168.0.255 #子网广播地址IPADDR =12.168.0.100 #ipNETMASK =255.255.255.0 # Mask network=192.168.0.0 #网络段

After you restart CentOS.

If you configure a static IP, you also need to configure the DNS server, routing information, and so on, not here.


This article is from the "Chhquan" blog, make sure to keep this source http://chhquan.blog.51cto.com/1346841/1790748

CentOS Virtual machine post-installation network configuration

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.