Virtual machine network configuration

*, virtual machine bridge network configuration

     Simple implementation: Customize IP, NETMASK, GATEWAY ( check the relevant parameters of the host ). At this time, if the virtual machine cannot ping the host but the host can ping the virtual machine, it is likely that the firewall of the host is turned on. After closing it, the test can be pinged. Yes, if this method does not work, try the following solutions:

     cp first (don't ask what cp is!) Vim /etc/sysconfig/network-scripts/ifcfg-eth0

     Automatic acquisition - the main content is as follows:

BOOTPROTO="dhcp"--get IP automatically
TYPE=Ethernet
HWADDR=**************
IPV6INIT=no
NM_CONTROLLED=yes
ONBOOT=yes
USERCTL=no

 

     Manually obtain 1 - the main content is as follows:

BOOTPROTO=static--Get IP manually, this configuration can only ping the host and cannot access the Internet
GATEWAY=192.168.**.1
IPADDR=192.168.**.222
NETMASK=255.255.255.0
TYPE=Ethernet
WADDR=***********H**
IPV6INIT=no
NM_CONTROLLED=yes
ONBOOT=yes
USERCTL=no

 ----------------------------------------------- The following is the pit -------------------------------------------------- -------------

 *, the remaining problem, the static IP configuration cannot be connected to the external network, it has not been solved yet!

 *, the exception encountered

      some other host already uses address 192.168.**.222 .

      Pay attention to the space before the point, hey, I feel tired and don't love it!

Guess you like

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