Page 1 of 1

No Internet Access on NAT Network

Posted: 11. Aug 2015, 19:10
by xaffar
I have created a a NAT Network in VirtulBox 5 In Ubuntu 14.04 LTS with following settings

Natework Name : NatNetwrok1
Network CIDR: 10.0.2.0/24
Support DHCP :enabled
Support IPv6 :disabled
without any port forwarding

Additionally I have two VMs (Both Xubuntu clones), I have set the Network settings to enable two NICs on each of the VM with following settings in all four adapters:

Attached To : “NAT Network”
Name : “NatNetwrok1”

When I run both VMs I can see following settings on running ifconfig command

ifconfig results on Xubuntu1

Code: Select all

eth0      Link encap:Ethernet  HWaddr 08:00:27:00:8c:03  
          inet addr:10.0.2.9  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe00:8c03/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12133 (12.1 KB)  TX bytes:8517 (8.5 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:9e:20:e8  
          inet addr:10.0.2.8  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe9e:20e8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10294 (10.2 KB)  TX bytes:8798 (8.7 KB)
ifconfig results on Xubuntu2

Code: Select all

eth0      Link encap:Ethernet  HWaddr 08:00:27:00:8c:03  
          inet addr:10.0.2.9  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe00:8c03/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12133 (12.1 KB)  TX bytes:8517 (8.5 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:9e:20:e8  
          inet addr:10.0.2.8  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe9e:20e8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10294 (10.2 KB)  TX bytes:8798 (8.7 KB)
ping between these 4 IPs works fine
But I can not access Internet on either of these VMs
While if o change “NAT Network” to “NAT” I can access the network but it seems the become part of different virtual network and I can not ping them from each other
Can anybody help me in identifying and fixing problem

Can anyone also explain whats difference between NAT and NAT Network

Re: No Internet Access on NAT Network

Posted: 14. Aug 2015, 17:52
by noteirak
The problem is that both of your VMs use the same MAC addresses, which will not work. I'm guessing you cloned the first VM. Make sure each NIC use a unique MAC address.

NAT mode means each VM is isolated behind its own router. You can use the same IP for each VM, since it is only usable by that VM. Nothing else will care about it.
NAT Network is the same as NAT except that you can have several VM connected to the same internal router. You'll need different IPs for each VM, but anything outside that NAT network will never about their IPs.