windows 7 - Bridged adapter in Virtual Box - cannot obtain IP
2014-04
I have virtual box with RHEL installed. My virtual box is running on windows 7 64 -bit. I configured bridged connection, but when I am restarting network interfaces, I receive following error:
Determining IP information for eth1... failed
On Windows XP it works without problems. I disabled Windows Firewall and installed latest Virtual Box, still without success.
NAT is working without any problems. What did I missed?
UPDATE
Ouput of ifconfig -a
is:
eth0 Link encap:Ethernet HWaddr 08:00:27:B6:FC:69
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feb6:fc69/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:430 errors:0 dropped:0 overruns:0 frame:0
TX packets:346 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36520 (35.6 KiB) TX bytes:31455 (30.7 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:C3:84:4A
inet6 addr: fe80::a00:27ff:fec3:844a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1464 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:135419 (132.2 KiB) TX bytes:4230 (4.1 KiB)
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)
Output of route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
Output of dhclient -v eth1
is:
Listening on LPF/eth1/08:00:27:c3:84:4a
Sending on LPF/eth1/08:00:27:c3:84:4a
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 9 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 15 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 18 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 13 (xid=0x6afb6c4c)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Moreover the same machine with the same configuration works well on Windows XP. The problem is only on Windows 7.
The problem was not with my machine, but my company DHCP server, which block more than one mac on port. It took me two days to find out that problem was "outside" my machine
I'm trying to get my FEDORA12 to have an STATIC IP - inside VirtualBox - inside Ubuntu
Let me rephrase that. I have an Ubuntu 9.04 system with VirtualBox and a FEDORA12 VM. I would like to use a static IP on the Fedora VM (amahi needs it), but I'm getting stuck... I'm using NAT (if that's any help)
I tried a few tutorials, but no go.
I'm kind of new to the *nix world but I'm old school on M$
Screenshots:
UBUNTU 9.04 (host that has the VM)
FEDORA
INFO:
GUEST WITH STATIC:
IFCONFIG:
eth0 Link encap:Ethernet HWaddr 08:00:27:35:CC:DE
inet addr:192.168.1.55 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe35:ccde/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:2764 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:574 (574.0 b) TX bytes:127121 (124.1 KiB)
Interrupt:11 Base address:0xc020
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:1856 errors:0 dropped:0 overruns:0 frame:0
TX packets:1856 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:181587 (177.3 KiB) TX bytes:181587 (177.3 KiB)
NETSTAT -NR:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0
GUEST WITH DHCP:
IFCONFIG:
eth0 Link encap:Ethernet HWaddr 08:00:27:35:CC:DE
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe35:ccde/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105 errors:0 dropped:0 overruns:0 frame:0
TX packets:2966 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:49787 (48.6 KiB) TX bytes:149969 (146.4 KiB)
Interrupt:11 Base address:0xc020
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:1903 errors:0 dropped:0 overruns:0 frame:0
TX packets:1903 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:185931 (181.5 KiB) TX bytes:185931 (181.5 KiB)
NETSTAT -NR:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0
PS.: I'm still trying to workout the sudoer file to be able to exec the iptables command
You need your IP address to be on the same subnet as the virtual NAT router. As you can see from when you use DHCP on the guest the subnet is 10.0.2.0/255.255.255.0
, so, when you are setting a static IP address it needs to be in the 10.0.2.x
range. Try setting it to something like 10.0.2.150
. If possible, look in the VirtualBox settings to find the range of IPs the DHCP server will assign so you don't use one of those. Once your on the same subnet, it should work just fine. Just to summarize, here are your settings:
IP: 10.0.2.150
Netmask: 255.255.255.0
Default Gateway: 10.0.2.2