I plan to install my new office computer as centos6.3 for testing server, but it is obviously not enough to do a distributed test on a computer, so I plan to use VM virtualbox to virtualize several systems on it. Follow the regular configuration (Baidu ),
After the static IP address is configured, the connection mode of virtualbox is "bridging ". Run service network restart to restart the service. Ping the VM from the Local Machine (physical machine. Ping the local machine from a virtual machine and ping the gateway. However, you cannot access the Internet.
Error message:
[Root @ localhost network-Scripts] # Ping www.baidu.com
Ping: Unknown host www.baidu.com
Of course, you can ping the Internet through DHCP. But I just want to make it static. Then I found a method on the Internet:
Create a route-eth0 file in/etc/sysconfig/network-scripts. The content is as follows:
Via 192.168.1.200
Save and restart the server to access the Internet. It seems to have achieved results. But I don't know if this method can be used in the production environment (of course this problem may not be encountered? Why is it possible to use? Are there other methods to achieve this?