none
Setup Network between host and virtual machine

    Frage

  • Hi,

    I newbie on the Virtual Pc world but im trying to establish a network between my host pc amd my VM, without sucess...

    I was able to give internet acess to my VM, but the problem is that i can't ping my VM from my host PC and vice versa...

    For VM im using 2 network adapters, NAT and the wireless adapter, already add the icpm exceptions on the windows firewall, but still cant ping both machines..

    Its kind a weird, because the ips adress on both machines dont are similar, but i think the internet acess was given by the NAT..

    Here goes the ipconfig command on both machines:

    Virtual Machine

    Windows IP Configuration
    
       Host Name . . . . . . . . . . . . : NAVDEV
       Primary Dns Suffix  . . . . . . . : dir.svc.domain.com
       Node Type . . . . . . . . . . . . : Hybrid
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No
       DNS Suffix Search List. . . . . . : dir.svc.domain.com
                                           svc.domain.com
                                           domain.com
    
    Ethernet adapter Local Area Connection 2:
    
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapt
    er (Generic) #2
       Physical Address. . . . . . . . . : 00-03-FF-45-DC-92
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Autoconfiguration IP Address. . . : 169.254.210.83
       Subnet Mask . . . . . . . . . . . : 255.255.0.0
       Default Gateway . . . . . . . . . :
    
    Ethernet adapter Local Area Connection:
    
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapt
    er (Generic)
       Physical Address. . . . . . . . . : 00-03-FF-42-DC-92
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       IP Address. . . . . . . . . . . . : 192.168.131.65
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . : 192.168.131.254
       DHCP Server . . . . . . . . . . . : 192.168.131.254
       DNS Servers . . . . . . . . . . . : 10.111.32.6
                                           10.130.5.70
                                           10.130.5.6
       Lease Obtained. . . . . . . . . . : Thursday, February 23, 2012 5:13:51 PM
       Lease Expires . . . . . . . . . . : Tuesday, February 27, 2029 12:02:22 PM

    ipconfig Host PC

    Windows IP Configuration
    
       Host Name . . . . . . . . . . . . : MW7G9L31JTZAE1
       Primary Dns Suffix  . . . . . . . : dir.svc.domain.com
       Node Type . . . . . . . . . . . . : Hybrid
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No
       DNS Suffix Search List. . . . . . : dir.svc.domain.com
                                           svc.domain.com
                                           domain.com
       System Quarantine State . . . . . : Not Restricted
    
    
    Ethernet adapter Bluetooth Network Connection:
    
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
       Physical Address. . . . . . . . . : 9C-B7-0D-02-1A-9C
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
    
    Wireless LAN adapter Wireless Network Connection:
    
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : DW1530 Wireless-N WLAN Half-Mini Card
       Physical Address. . . . . . . . . : 7C-E9-D3-1B-B7-71
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Link-local IPv6 Address . . . . . : fe80::3d55:47bb:53a5:b8c7%13(Preferred)
       IPv4 Address. . . . . . . . . . . : 10.111.42.26(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.254.0
       Lease Obtained. . . . . . . . . . : quinta-feira, 23 de Fevereiro de 2012 09:
    23:24
       Lease Expires . . . . . . . . . . : sexta-feira, 24 de Fevereiro de 2012 17:4
    0:25
       Default Gateway . . . . . . . . . : 10.111.42.1
       DHCP Server . . . . . . . . . . . : 1.1.1.1
       DHCPv6 IAID . . . . . . . . . . . : 243067347
       DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-C1-E1-6E-D0-67-E5-41-DC-92
    
       DNS Servers . . . . . . . . . . . : 10.111.32.6
                                           10.130.5.70
                                           10.130.5.6
       NetBIOS over Tcpip. . . . . . . . : Enabled
    
    Ethernet adapter Local Area Connection:
    
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Controlle
    r
       Physical Address. . . . . . . . . : D0-67-E5-41-DC-92
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
    
    Tunnel adapter isatap.{832FC8AC-ABAD-4D93-ADBD-523BFB5BA021}:
    
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft ISATAP Adapter
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
    
    Tunnel adapter Local Area Connection* 9:
    
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft Teredo Tunneling Adapter
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
    
    Tunnel adapter isatap.{3578F104-F173-4ED5-8815-BDDBE4B597D1}:
    
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
    
    Tunnel adapter iphttpsinterface:
    
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : iphttpsinterface
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
    
    Tunnel adapter isatap.{B9B23D4D-D4DC-4C47-8C93-AA9CBF1953B5}:
    
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft ISATAP Adapter #5
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes

    Can anyone help me on this subject?

    Thanks in advance

    Best Regards

    JM

    Donnerstag, 23. Februar 2012 17:46

Antworten

Alle Antworten

  • Yes, NAT is providing your internet access, but it won't provide host-guest network communication.  The other NIC is your problem. You're not getting an IP address for your first NIC on the VM, that's what the 169.x.x.x is telling you.  In order to ping, that IP address needs to be in the same subnet as your host IP: 10.111.42.26

    Where is your host getting it's IP address info from?  ISP?  If so, you'll either need another IP address from the ISP or put a router between the ISP and your computers.

    Alternately, you can set up a loopback adapter on the host and get host-guest communication via that.

    Donnerstag, 23. Februar 2012 17:54
  • hi smjain,

    Thanks for your reply. My ip adress, host, probably it's my company's dhcp server that it's giving me.
    Maybe a silly question, but what if i insert a static gateway and ip adress on the VM, in the range of the host, will it work?

    I allready seen some post about loopback adapter, but didn't try it due to lack of knowledge... How does it work this adapter? how it consiste?

    Thanks once again
    Regards
    JM


    EDIT - I just checked now that the VM NIC subnet mask it's 255.255.0.0 instead of standard 255.255.255.0. How come? :)
    Donnerstag, 23. Februar 2012 18:08
  • 255.255.0.0 is also a standard subnet mask, just for a different network class, and allows for there to be more IP addresses on the same subnet that can communicate with a router.  There's a lot of info on subnet masks on the internet: http://www.tcpipguide.com/free/t_IPDefaultSubnetMasksForAddressClassesABandC.htm

    You may be able to do this, but you will probably incur the wraith of your network admin, unless you know that there are specific IP addresses that can be assigned statically.  I'd recommend you not do this, since you don't know if the IP address has already been assigned to another computer.  If you manually assign an IP address to the VM that is already in use, it will knock the other computer off the network.

    My guess is that your network admins have a policy on your switches that only allow 1 IP address per port, so you won't get another IP address assigned to the VM.  Your best bet is to talk to the network admin to get another IP via DHCP for your VM.

    Donnerstag, 23. Februar 2012 18:37
  • Hi,

    smjain you said on your first reply:

    "Alternately, you can set up a loopback adapter on the host and get host-guest communication via that"

    How can i achieve this?

    I allready tried to for both my pc adapters: Wireless and netwoork, but without sucess...

    Another question that i gave is if i set up a loopback adapter does i still need the shared netwoork (NAT) to give internet connection to my VM or with the loopback it's not needed anymore?

    Thanks

    Regards

    JM

    Dienstag, 28. Februar 2012 14:21
  •   If you install a Microsoft Loopback Adapter in the host machine, Virtual PC will reccognize it as an interface in the host machine. You will then be able to link a NIC in any vm to this interface, giving you a network connection between the host and your guests. Give them static IPs in their own private subnet. This is your own network with no connection to the corporate LAN.

      If you want the guests to also have Internet access then yes they will need a NAT connection as well for that.

    http://www.groovypost.com/howto/microsoft/install-a-loopback-adapter-in-windows-7/


    Bill

    Dienstag, 28. Februar 2012 22:26