Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I install ubuntu 11.10 64 in virtual machine using vmbox 4.1. My host machine also has ubuntu 11.10 64. I use mobile brodband. this is my networking details.

eth0      Link encap:Ethernet  HWaddr d0:27:88:7c:2c:0d 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:43 Base address:0xc000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:630 errors:0 dropped:0 overruns:0 frame:0
          TX packets:630 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:370028 (370.0 KB)  TX bytes:370028 (370.0 KB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:10.113.52.123  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:96536 errors:196 dropped:0 overruns:0 frame:0
          TX packets:69735 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:116819812 (116.8 MB)  TX bytes:6462243 (6.4 MB)


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.64.64.64     0.0.0.0         UG    0      0        0 ppp0
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 ppp0

I tried connect network with my vm using NAT. This is my vm networking details.

eth0      Link encap:Ethernet  HWaddr 08:00:27:59:7e:f8  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe59:7ef8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2352 (2.3 KB)  TX bytes:10364 (10.3 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
10.0.2.0        0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0

Now i can connect external server. eg: I can ping to 10.113.52.123

But i can't connect vm in my host machine. eg: I can't ping to 10.0.2.15

I tried using bridge. But all network is not working at that time. This is networking details when i using bridge.

eth0      Link encap:Ethernet  HWaddr 08:00:27:59:7e:f8  
          inet6 addr: fe80::a00:27ff:fe59:7ef8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:5176 (5.1 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I have poor networking knoeladge. Please help me. I want make my vm as server. How to do that.

share|improve this question

migrated from stackoverflow.com Dec 6 '11 at 22:38

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You could continue using the NAT option and add a second network interface to your VM bridged to the lo interface of your host. Your VM is then connected to the internet through the eth0 interface and to your host via the eth1 interface.

share|improve this answer
    
How i do it? please help me' –  Asuraya Dec 4 '11 at 17:15
    
Assuming you are using the GUI to configure your VM: Go to the network section, on the tab of the first interface select NAT as method. Then to go the second tab, tick the checkbox to activate that interface and select network bridge as method. Below there should be an option to select the host interface to bridge to, select your lo interface there. I am sorry I currently only have windows host with virtualbox at hand. –  Jan Dec 4 '11 at 20:26
    
i have change for your way. I can't select lo as interface. I select eth0. Same problem is there. vm can connect external servers. But i cant connect vm server. help me again. –  Asuraya Dec 5 '11 at 16:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.