linux virtual machine network settings

First, log in as root

Enter the terminal, execute the following command

service network restart 

ifup eth0

Ifconfig command to view network configuration is to get ip address (ip restart the virtual machine becomes)

 

 

 

Second, the bridge mode, the same address

Save and exit after the virtual machine input terminal Setup, the following open interface, select the network configuration, and then select the setting device, the setting information as shown below, setting is completed

 

Primary DNS server can be set as the default gateway IP 

 

Once set up network services to restart to take effect.

Enter the following command 

/etc/init.d/network restart 

ifup eth0 

Ifconfig view ip address has changed

Guess you like

Origin www.cnblogs.com/jodie2019/p/12043851.html