Say, this question has been screwing me for an afternoon = =
But finally can use NAT mode to surf the internet, or quite a sense of accomplishment
First, put a picture like this.
Prove that Putty even Linux is a problem of wood, but not on the net Oh ~ ~ ~
Please note that
the current IP is 192.168.131.128
(Why do I have to cannot it?!) Don't think I really eat enough to support the (elder sister is good, oh ~), mainly because the library is often disconnected and then re-login, so, if you use a bridge, then your IP will become change!!! )
So I had to love cuts the bridge that I loved-nat mode turned on
0, there is a big premise, first I have networkmanager this thing from the service list permanently removed, hahaha haha ~ ~ ~ (below will talk about why to take it away, first sell a Xiaoguanzi)
Operation:
(shamelessly copied from my Evernote 2 commands)
Chkconfig NetworkManager off permanently shuts down service, requires reboot
Service NetworkManager stop immediately shuts down the services and does not require a restart
Just in case, I wrote all two.
Then there is no more worries ....
1. Make sure the network adapter is set to NAT
2. Open the Virtual network editor in VMware Station
NAT settings, the gateway should be aware of
Usually the last one by default is 2, so you don't have to change your hand more.
Here's a little reminder to make sure your real machine, VMNET8, is open.
That's when you check the IP on the real machine.
If not, you can disable it and start it again (similar to restart in Linux)
It can be found that the Gateway (192.168.131.2) on Linux is the same as the network segment IPV4 this address (192.168.131.1)
################################ segmentation
Back to the virtual machine Linux
This indicates that dhclient assigned IP, is from the 192.168.131.0 began to allocate (should be 255 bar, temporarily not refined)
3. Modify the configuration file
/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-ETHX (x Me here is 0, because mine is eth0)
Save, run
Service Network Restart (if your networkmanager is still there, I removed it from the beginning and may need to turn it off)
Then my putty off the net (originally 128) .... Change to 110
Can connect
View current IP
OK, no problem.
First the route, the Gateway looked up (I found that the previous 128 did not appear!) )
See the dawn of victory, Woo Woo ~ ~ ~
Test
1, Real Machine IP:
Real-machine ping virtual machine Windysai
Virtual machine Windysai Ping Real Machine
Ping Baidu
Finished ~ ~ ~
Putty can connect to Linux remotely, but not on the network (NAT mode)