3

I am using LinuxMint17 (Host) and running another LinuxMint17 as Guest using Virtual Box.

My Guest LinuxMint is able to ping Host LinuxMint but vice-versa is not happening.

Network Setting in VirtualBox Network Adapter 1 - Host-Only Network (This i did so that Guest IP is aligned with Host) Network Adapter 2- NAT (To get my internet work on guest)

ifconfig(HOST) -

 ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 44:8a:5b:42:46:69  
          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:18 

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:65536  Metric:1
          RX packets:41595 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41595 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:14653896 (14.6 MB)  TX bytes:14653896 (14.6 MB)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  
          inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:508 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:90705 (90.7 KB)

wlan0     Link encap:Ethernet  HWaddr 54:27:1e:40:f0:d1  
          inet addr:192.168.1.72  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::5627:1eff:fe40:f0d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7743461 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4638376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10989028454 (10.9 GB)  TX bytes:411974451 (411.9 MB)

ifconfig(Guest)

linuxmint@linuxmint-VirtualBox ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:97:c5:ee  
          inet addr:192.168.56.103  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe97:c5ee/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1723 (1.7 KB)  TX bytes:17391 (17.3 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:06:0f:b3  
          inet addr:10.0.3.15  Bcast:10.0.3.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe06:fb3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22668 (22.6 KB)  TX bytes:24575 (24.5 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:65536  Metric:1
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2878 (2.8 KB)  TX bytes:2878 (2.8 KB)

Ping output -

Host-to-Guest

~ $ ping 192.168.56.103
PING 192.168.56.103 (192.168.56.103) 56(84) bytes of data.
^C
--- 192.168.56.103 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

Guest-to-Host

linuxmint@linuxmint-VirtualBox ~ $ ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
64 bytes from 192.168.50.1: icmp_seq=1 ttl=63 time=0.435 ms
64 bytes from 192.168.50.1: icmp_seq=2 ttl=63 time=0.185 ms
^C
--- 192.168.50.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.185/0.310/0.435/0.125 ms
linuxmint@linuxmint-VirtualBox ~ $ ping 192.168.1.72
PING 192.168.1.72 (192.168.1.72) 56(84) bytes of data.
64 bytes from 192.168.1.72: icmp_seq=1 ttl=63 time=0.250 ms
64 bytes from 192.168.1.72: icmp_seq=2 ttl=63 time=0.148 ms
^C
--- 192.168.1.72 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.148/0.199/0.250/0.051 ms

Can anyone suggest what i am doing wrong?

1 Answer 1

2

What set the IP of the eth0 interface on the guest? It doesn't look right; the IP's should both be in the same subnet.

Try (on the guest, as root):

ip addr del 192.168.56.103/24 dev eth0
ip addr add 192.168.50.2/24 dev eth0

That will delete the existing IP address, and add one that is in the same subnet.

3
  • 2
    @user1158351 Did you know you can also up-vote a question/answer by clicking the gray up arrow?
    – BenjiWiebe
    Jul 7, 2014 at 14:23
  • 2
    Yes I know...and I tried it..but it says i need atleast 15 reputation to do it. ..i am new to superuser...once i get enough reputation..i will upvote.. Jul 7, 2014 at 16:50
  • @user1158351 Ah ok. I wasn't sure if the restriction applied to answers to your own post.
    – BenjiWiebe
    Jul 7, 2014 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .