Host-only connections for Visual Box

 

1. After installing Visual Box, "VirtualBox Host-Only Network" will appear in the control panel - network connection, first make sure it is enabled

 

2. Configure the IPV4 properties of "VirtualBox Host-Only Network"

 

3. Modify the network configuration of the virtual host


 
4. After CentOS is installed, it uses the automatic IP address allocation method by default. You need to modify the following files to use the static address method:

/etc/sysconfig/network-scripts/ifcfg-eth0

Status before modification:


Status after modification: 


 

 5 Restart the network

service network restart

 

6. Use the ping command to test the modification results

 

 

 

 

Other common network configurations:

/etc/sysconfig/network Centos set hostname and network configuration

/etc/sysconfig/network-scripts/ifcfg-eth0 set for a specific network card

/etc/resolv.conf set DNS

/etc/hosts Set the specified domain name resolution address

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326573370&siteId=291194637