I've installed Ubuntu Hardy Heron 8.04 on my laptop, which uses a wireless network, and then installed VirtualBox. I want to set up a virtual machine for development, etc etc. So I set up CentOS 5.1. Installation went fine, but upon booting, it gives the error when trying to start the network:
Bringing up interface eth0: Error, some other host already uses address 192.168.1.99
Let me tell you how I created the networking for this machine. I followed the instructions given at
https://help.ubuntu.com/community/VirtualBox to set up parprouted as per the "Wireless Networking" instructions:
Code:
apt-get install parprouted
cat > /etc/network/if-up.d/vbox_network << EOF
#!/bin/bash
sysctl net.ipv4.ip_forward=1
VBoxTunctl -b -u bps7j
ip link set tap0 up
ip addr add 192.168.1.99/24 dev tap0
parprouted wlan0 tap0
EOF
chmod 700 /etc/network/if-up.d/vbox_network
/etc/network/if-up.d/vbox_network
(The user I'm running the virtual machine as is 'bps7j').
This creates a network device called tap0, which I can ping from my laptop, etc etc. Then in the VirtualBox network settings, I selected Host Interface and typed in tap0.
I read around on some of the forums and in Google, and found
http://www.linuxquestions.org/questi...xxxxxx-554768/ and
http://www.linuxquestions.org/questi...xx.xxx-187162/ which seem to be addressing similar-but-different issues, and didn't give me any hints.
Anyway, I thought OK, what might be happening. I'm pretty much a networking novice. But I did an arping from within the virtual machine, to check whether the IP address was already in use:
Code:
arping -c 2 -w 3 -D -I eth0 192.168.1.99
ARPING 192.168.1.99 from 0.0.0.0 eth0
Unicast reply from 192.168.1.99 [00:FF:C8:8A:04:DB] 1.162ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
There is no other physical machine on my network with that IP address, by the way; my router's DHCP starts at 192.168.1.100. (This is a home network.)
Hmmm. OK, so what if I try to set the device up manually? My wireless router is 192.168.1.1.
Code:
ifconfig eth0 192.168.1.99 netmask 255.255.255.0 up
route add default gw 192.168.1.1
ping 192.168.1.1
It never gets a reply. I can't ping the outside world either (like a Google IP address.) I can't wget or otherwise communicate with the outside world. ifconfig shows what appears to be a correctly set up device -- it just never gets any reply from the outside.
I read a little more about all this, and added the following line to my network start script as suggested here
http://home.nyc.rr.com/computertaiju...oxbridge.html:
Code:
route add -net 192.168.1.0 netmask 255.255.255.0 tap0
Still no dice. I tried rebooting my host machine. No luck.
Looks like for whatever reason, the little parprouted sleight-of-hand isn't working for this virtual machine the way it ought to be. Any ideas? Remember I don't know much about networking, so if you have any suggestions for me I would appreciate if you can help me understand all the steps I'll have to take.