Today in the WIN7 environment through Xshell link VirtualBox centos; always link not on, originally because the virtual machine chooses the network link is incorrect [recommended connection method: Host-only Adapter (host mode).
On the Internet to check the relevant information to know:
Knowledge Summary:
VBox in the host to simulate a virtual machine for the use of a network card, all virtual machines are connected to the network card, we can set up this network card to achieve the Internet and other very versatile.
Host mode through the settings of the virtual machine and network card can complete the three kinds of network connection mode to achieve the function.
Nat
Bridged Adapter
Internal
The relationship between the virtual machine and the physical host: The default is not mutual access, the two parties do not belong to the same IP segment, the HOST-ONLY network card default IP field is 192.168.56.X subnet mask is 255.255.255.0, the subsequent virtual machines are assigned to this network segment.
The relationship between a virtual machine and other physical hosts on the network: The default is not to ask each other for the same reason. By setting up, you can make mutual visits.
Virtual machine-to-virtual-machine relationships: By default, only virtual machines can access each other. are in the same network segment.
The so-called host is simply said to be a virtual host.
First, the CentOS check-in setting:
1. Turn off pre-fire
Service Iptables Stop
Chkconfig iptables off
2. Start the SSH service
Service sshd Start
3. View the CentOS IP address: ifconfig-a
inet addr:192.168.56.101 bcast:192.168.56.255 mask:255.255.255.0
Then, go back to WIN7 and ping 192.168.56.101 to make sure the virtual machine responds.
C:\users\yyzx>ping 192.168.56.101
Pinging 192.168.56.101 with 32 bytes of data:
Reply from 192.168.56.101: Byte =32 time =1ms ttl=64
Reply from 192.168.56.101: Byte =32 time <1ms ttl=64
Reply from 192.168.56.101: Byte =32 time <1ms ttl=64
Reply from 192.168.56.101: Byte =32 time <1ms ttl=64
Ping Statistics for 192.168.56.101:
Packet: Sent = 4. Received = 4, lost = 0 (0% lost),
Estimated time of round trip (in milliseconds):
Shortest = 0ms, longest = 1ms, average = 0ms
Next, set up the virtual machine nic VirtualBox host-only Ethernet Adapter
IP Address: 192.168.56.1 Mask: 255.255.255.0 gateway and DNSServer address are not filled in.
Then Xshell play, Session mode select SSH, fill in the virtual host IP address 192.168.56.101.
many other CentOS-related information is found in CentOS Featured Pages http://www.linuxidc.com/topicnews.aspx?
Tid=14
Link a virtual machine's CentOS via Xshell