Symptoms

Virtual machine random network connectivity issues with VirtualBox. Using pingcommand results in:
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=22.2 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=22.3 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=22.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=22.2 ms (DUP!)
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, +2 duplicates, 0% packet loss, time 1009ms
rtt min/avg/max/mdev = 22.106/22.248/22.368/0.142 ms

Solution

Disable host operating system's IP forwarding:
# sysctl -w net.ipv4.ip_forward=0
net.ipv4.ip_forward = 0
If sysctl command is not available execute:
# echo 0 > /proc/sys/net/ipv4/ip_forward
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: