[SOLVED] cannot reach guest via NAT

Discussions related to using VirtualBox on Mac OS X hosts.

[SOLVED] cannot reach guest via NAT

Postby cortextual » 2. Aug 2010, 20:25

Good morning.

I'm using VirtualBox 3.2.6 r63112 on OS X ( 10.5.8 ) with both an Ubuntu Linux 9.10 and a Windows XP guest.

I've been having problems reaching either VM from my host system when using NAT. Additionally, DHCP often fails when using a bridged virtual NIC on the guests.

Output from ping 10.0.2.15 (the IP address of the virtual NIC of the Linux guest) executed on my host system:

ariwifi174:~ aball$ ping 10.0.2.15
PING 10.0.2.15 (10.0.2.15): 56 data bytes
36 bytes from 10.32.12.189: Destination Host Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 5400 61d1 0 0000 3b 01 cb11 10.10.60.174 10.0.2.15

36 bytes from 10.32.12.189: Destination Host Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 5400 9883 0 0000 3b 01 945f 10.10.60.174 10.0.2.15

36 bytes from 10.32.12.189: Destination Host Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 5400 08e1 0 0000 3b 01 2402 10.10.60.174 10.0.2.15

traceout output:

ariwifi174:~ aball$ traceroute 10.0.2.15
traceroute to 10.0.2.15 (10.0.2.15), 64 hops max, 40 byte packets
1 ariwifi1 (10.10.60.1) 5.092 ms 1.661 ms 1.035 ms
2 tavi (10.10.103.1) 1.038 ms 0.965 ms 0.826 ms
3 border-router.southport.americanri.com.ofc (10.10.101.1) 4.888 ms 3.005 ms 3.103 ms
4 192.168.1.1 (192.168.1.1) 2.835 ms 1.824 ms 2.371 ms
5 10.32.12.189 (10.32.12.189) 30.172 ms 78.157 ms 37.682 ms
6 10.32.12.189 (10.32.12.189) 29.024 ms !H * 40.988 ms !H

Any thoughts? My suspicion is that I'm having an address space conflict with the internal IPv4 addressing used at the office. The IP address of the host (which is using a wireless connection) is 10.10.60.174. Full ifconfig output for that interface:

ariwifi174:~ aball$ ifconfig en1
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::21f:5bff:fecc:bccf%en1 prefixlen 64 scopeid 0x5
inet 10.10.60.174 netmask 0xffffff00 broadcast 10.10.60.255
ether 00:1f:5b:cc:bc:cf
media: autoselect status: active
supported media: autoselect
Last edited by cortextual on 3. Aug 2010, 23:42, edited 1 time in total.
cortextual
 
Posts: 3
Joined: 2. Aug 2010, 20:18
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Linux (Ubuntu 9.10), Windows XP

Re: cannot reach guest via NAT, often DHCP fails on bridged NIC

Postby Perryg » 2. Aug 2010, 20:29

You should read Chapter 6. Virtual networking in your VirtualBox users guide.
It will explain this. Then feel free to ask questions.
Perryg
Site Moderator
 
Posts: 25942
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: cannot reach guest via NAT, often DHCP fails on bridged NIC

Postby ChipMcK » 3. Aug 2010, 05:28

ChipMcK
Volunteer
 
Posts: 604
Joined: 20. May 2009, 02:17
Location: U S of A
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: cannot reach guest via NAT, often DHCP fails on bridged NIC

Postby cortextual » 3. Aug 2010, 21:12

Perryg wrote:You should read Chapter 6. Virtual networking in your VirtualBox users guide.
It will explain this. Then feel free to ask questions.


Thanks. I believe what I need for NAT is to use the information at http://www.virtualbox.org/manual/ch09.html#changenat to choose a different IP address range that doesn't conflict with any subnets that we use at work on 10.0.0.0/8.

I found that DHCP on the guest works fine when I bridge the virtual NIC on the physical wired Ethernet port rather than the physical wireless port.
cortextual
 
Posts: 3
Joined: 2. Aug 2010, 20:18
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Linux (Ubuntu 9.10), Windows XP

Re: cannot reach guest via NAT, often DHCP fails on bridged NIC

Postby cortextual » 3. Aug 2010, 23:41



The first link was what I needed. Using NAT for the first network adapter of my VM, I added a new virtual network adapter to it in "host only" mode. I was then able to reach the second adopter from my host system.

Many thanks!
cortextual
 
Posts: 3
Joined: 2. Aug 2010, 20:18
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Linux (Ubuntu 9.10), Windows XP


Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 17 guests