Todd and Margo Chester
2007-Sep-02 23:49 UTC
[CentOS-virt] Virtual Box: br0 not resolving: No DHCPOFFERS
Dear Centos-Virt: Help! Guest=XP Pro, SP2 Host=CentOS5; # uname -r; 2.6.18-8.1.8.el5 VirtualBox-1.4.0_21864_rhel5-1.i586 http://www.virtualbox.org/download/1.5.0/VirtualBox-1.5.0_24069_rhel5-1.i586.rpm.run I have two nic: eth0 is the internal network; eth1 connects to a DSL modem. I also have a fully functioning DHCP server on eth0 (works perfectly with Parallels for Linux). The directions (from hell): http://www.virtualbox.org/download/UserManual.pdf I am trying to set up a "host interface" network between my XP guest and my Linux host. Three problems: 1) "br0" does not resolve with my DHCP server: "No DHCPOFFERS received" 2) Virtual Box will not start, unless I switch to no network or NAT network 3) eth1 will not communicate with the Internet after restarting the network daemon to try to bet an address for br0 Following the directions on page 62 for Fedora Core in the users manual do not work (or I am doing them wrong): 1) # chmod 0666 /dev/net/tun 2) /etc/sysconfig/network-scripts/ifcfg-br0: DEVICE=br0 TYPE=Bridge BOOTPROTO=dhcp ONBOOT=yes 3) /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 TYPE=Ethernet BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.10 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 IPV6ADDRIPV6PREFIXONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0 4)# sudo /sbin/service network restart br0 failed: FAILED, unable to resolve IP address. From my /var/log/messages: dhcpd: DHCPOFFER on 192.168.255.198 to 00:30:48:78:8e:92 via eth0 dhclient: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 7 DHCPDISCOVER from 00:30:48:78:8e:92 via eth0 dhcpd: DHCPOFFER on 192.168.255.198 to 00:30:48:78:8e:92 via eth0 dhclient: No DHCPOFFERS received. 5) #sudo VBoxAddIF vbox0 todd br0 Note: also tried it with user=root (did a VBoxDeleteIF first): no symptom change 6) In VirtualBox settings, set "network adaptors" to "Host Interface" and set ?Interface name? to ?vbox0? 7) started VB and got the same fail DHCP offcer as in step 4. VB refused to start. 8) at this point eth1 STOPS communicating with the DSL modem and the Internet (I have to comment out the "br" in eth0's config, restart the network daemon, and restart the firewall to get the Internet back.) Help! Many thanks, -T p.s. This is this is my full messages log when I restart networking (note the message at the end): #/etc/rc.d/init.d/network restart Aug 31 21:14:40 rn1 avahi-daemon[3207]: Withdrawing address record for fe80::230:48ff:fe78:8e92 on br0. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Leaving mDNS multicast group on interface br0.IPv6 with address fe80::230:48ff:fe78:8e92. Aug 31 21:14:40 rn1 avahi-daemon[3207]: iface.c: interface_mdns_mcast_join() called but no local address available. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Interface br0.IPv6 no longer relevant for mDNS. Aug 31 21:14:40 rn1 kernel: br0: port 1(eth0) entering disabled state Aug 31 21:14:40 rn1 kernel: br0: port 2(vbox0) entering disabled state Aug 31 21:14:40 rn1 avahi-daemon[3207]: Interface eth0.IPv6 no longer relevant for mDNS. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::230:48ff:fe78:8e92. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Interface eth0.IPv4 no longer relevant for mDNS. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.255.10. Aug 31 21:14:40 rn1 dhcpd: receive_packet failed on eth0: Network is down Aug 31 21:14:40 rn1 avahi-daemon[3207]: Withdrawing address record for fe80::230:48ff:fe78:8e92 on eth0. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Withdrawing address record for 192.168.255.10 on eth0. Aug 31 21:14:40 rn1 kernel: device eth0 left promiscuous mode Aug 31 21:14:40 rn1 kernel: br0: port 1(eth0) entering disabled state Aug 31 21:14:40 rn1 avahi-daemon[3207]: Withdrawing address record for 192.168.1.47 on eth1. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Leaving mDNS multicast group on interface eth1.IPv4 with address 192.168.1.47. Aug 31 21:14:40 rn1 avahi-daemon[3207]: iface.c: interface_mdns_mcast_join() called but no local address available. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Interface eth1.IPv4 no longer relevant for mDNS. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Withdrawing address record for fe80::230:48ff:fe78:8e93 on eth1. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Leaving mDNS multicast group on interface eth1.IPv6 with address fe80::230:48ff:fe78:8e93. Aug 31 21:14:40 rn1 avahi-daemon[3207]: iface.c: interface_mdns_mcast_join() called but no local address available. Aug 31 21:14:40 rn1 avahi-daemon[3207]: Interface eth1.IPv6 no longer relevant for mDNS. Aug 31 21:14:40 rn1 dhcpd: receive_packet failed on eth1: Network is down Aug 31 21:14:41 rn1 kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready Aug 31 21:14:41 rn1 kernel: device eth0 entered promiscuous mode Aug 31 21:14:41 rn1 kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready Aug 31 21:14:42 rn1 kernel: e1000: eth1: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex Aug 31 21:14:42 rn1 kernel: e1000: eth1: e1000_watchdog_task: 10/100 speed: disabling TSO Aug 31 21:14:42 rn1 kernel: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready Aug 31 21:14:42 rn1 kernel: e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex Aug 31 21:14:42 rn1 kernel: e1000: eth0: e1000_watchdog_task: 10/100 speed: disabling TSO Aug 31 21:14:42 rn1 dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67 Aug 31 21:14:42 rn1 dhcpd: DHCPREQUEST for 192.168.1.47 from 00:30:48:78:8e:93 via eth1: unknown lease 192.168.1.47. Aug 31 21:14:42 rn1 dhclient: DHCPACK from 192.168.1.1 Aug 31 21:14:42 rn1 avahi-daemon[3207]: New relevant interface eth1.IPv4 for mDNS. Aug 31 21:14:42 rn1 avahi-daemon[3207]: Joining mDNS multicast group on interface eth1.IPv4 with address 192.168.1.47. Aug 31 21:14:42 rn1 kernel: dsl-out Everything Else IN= OUT=eth1 SRC=192.168.1.47 DST=224.0.0.22 LEN=40 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 Aug 31 21:14:42 rn1 avahi-daemon[3207]: Registering new address record for 192.168.1.47 on eth1. Aug 31 21:14:42 rn1 avahi-daemon[3207]: Withdrawing address record for 192.168.1.47 on eth1. Aug 31 21:14:42 rn1 avahi-daemon[3207]: Leaving mDNS multicast group on interface eth1.IPv4 with address 192.168.1.47. Aug 31 21:14:42 rn1 kernel: dsl-out Everything Else IN= OUT=eth1 SRC=192.168.1.47 DST=224.0.0.22 LEN=40 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 Aug 31 21:14:42 rn1 avahi-daemon[3207]: iface.c: interface_mdns_mcast_join() called but no local address available. Aug 31 21:14:42 rn1 avahi-daemon[3207]: Interface eth1.IPv4 no longer relevant for mDNS. Aug 31 21:14:42 rn1 avahi-daemon[3207]: New relevant interface eth1.IPv4 for mDNS. Aug 31 21:14:42 rn1 avahi-daemon[3207]: Joining mDNS multicast group on interface eth1.IPv4 with address 192.168.1.47. Aug 31 21:14:42 rn1 kernel: dsl-out Everything Else IN= OUT=eth1 SRC=192.168.1.47 DST=224.0.0.22 LEN=40 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 Aug 31 21:14:42 rn1 avahi-daemon[3207]: Registering new address record for 192.168.1.47 on eth1. Aug 31 21:14:42 rn1 dhclient: bound to 192.168.1.47 -- renewal in 38661 seconds. Aug 31 21:14:42 rn1 kernel: br0: port 1(eth0) entering learning state Aug 31 21:14:42 rn1 kernel: br0: port 2(vbox0) entering learning state Aug 31 21:14:43 rn1 dhclient: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 4 Aug 31 21:14:43 rn1 kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Aug 31 21:14:44 rn1 avahi-daemon[3207]: New relevant interface eth1.IPv6 for mDNS. Aug 31 21:14:44 rn1 avahi-daemon[3207]: Joining mDNS multicast group on interface eth1.IPv6 with address fe80::230:48ff:fe78:8e93. Aug 31 21:14:44 rn1 avahi-daemon[3207]: Registering new address record for fe80::230:48ff:fe78:8e93 on eth1. Aug 31 21:14:44 rn1 avahi-daemon[3207]: New relevant interface br0.IPv6 for mDNS. Aug 31 21:14:44 rn1 avahi-daemon[3207]: Joining mDNS multicast group on interface br0.IPv6 with address fe80::230:48ff:fe78:8e92. Aug 31 21:14:44 rn1 avahi-daemon[3207]: Registering new address record for fe80::230:48ff:fe78:8e92 on br0. Aug 31 21:14:45 rn1 avahi-daemon[3207]: New relevant interface eth0.IPv6 for mDNS. Aug 31 21:14:45 rn1 avahi-daemon[3207]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::230:48ff:fe78:8e92. Aug 31 21:14:45 rn1 avahi-daemon[3207]: Registering new address record for fe80::230:48ff:fe78:8e92 on eth0. Aug 31 21:14:47 rn1 dhclient: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 8 Aug 31 21:14:50 rn1 kernel: dsl-out Everything Else IN= OUT=eth1 SRC=192.168.1.47 DST=224.0.0.22 LEN=40 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 Aug 31 21:14:55 rn1 dhclient: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 14 Aug 31 21:14:57 rn1 kernel: br0: topology change detected, propagating Aug 31 21:14:57 rn1 kernel: br0: port 1(eth0) entering forwarding state Aug 31 21:14:57 rn1 kernel: br0: topology change detected, propagating Aug 31 21:14:57 rn1 kernel: br0: port 2(vbox0) entering forwarding state Aug 31 21:15:09 rn1 dhclient: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 15 Aug 31 21:15:09 rn1 dhcpd: DHCPDISCOVER from 00:30:48:78:8e:92 via eth0 Aug 31 21:15:10 rn1 dhcpd: DHCPOFFER on 192.168.255.198 to 00:30:48:78:8e:92 via eth0 Aug 31 21:15:24 rn1 dhclient: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 8 Aug 31 21:15:24 rn1 dhcpd: DHCPDISCOVER from 00:30:48:78:8e:92 via eth0 Aug 31 21:15:24 rn1 dhcpd: DHCPOFFER on 192.168.255.198 to 00:30:48:78:8e:92 via eth0 Aug 31 21:15:32 rn1 dhclient: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 12 Aug 31 21:15:32 rn1 dhcpd: DHCPDISCOVER from 00:30:48:78:8e:92 via eth0 Aug 31 21:15:32 rn1 dhcpd: DHCPOFFER on 192.168.255.198 to 00:30:48:78:8e:92 via eth0 Aug 31 21:15:44 rn1 dhclient: No DHCPOFFERS received.
Daniel de Kok
2007-Sep-03 16:22 UTC
[CentOS-virt] Virtual Box: br0 not resolving: No DHCPOFFERS
On Sun, 2007-09-02 at 16:49 -0700, Todd and Margo Chester wrote:> 1) "br0" does not resolve with my DHCP server: "No > DHCPOFFERS received"[snip] Why not do this one step at a time, and get bridging working first?> 2) /etc/sysconfig/network-scripts/ifcfg-br0: > DEVICE=br0 > TYPE=Bridge > BOOTPROTO=dhcp > ONBOOT=yesLooks ok.> 3) /etc/sysconfig/network-scripts/ifcfg-eth0 > DEVICE=eth0 > TYPE=Ethernet > BOOTPROTO=static > BROADCAST=192.168.255.255 > IPADDR=192.168.255.10 > NETMASK=255.255.255.0 > NETWORK=192.168.255.0 > GATEWAY=192.168.255.10 > IPV6ADDR> IPV6PREFIX> ONBOOT=yes > USERCTL=yes > IPV6INIT=no > PEERDNS=no > BRIDGE=br0But this doesn't. An ethernet bridge ties together multiple ethernets to give the "illusion" that it is one ethernet. An interface that is added to the bridge is just a bridge port. The configuration for the NIC should simply add it to the bridge, e.g.: --- DEVICE=eth0 TYPE=ETHER BRIDGE=br0 ONBOOT=yes --- The resulting bridge device (br0) is the interface to the new ethernet. So, if you want to give it a static IP address, do it in the bridge configuration. A quick example: /etc/sysconfig/ifcfg-br0: --- DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.10 NETMASK=255.255.255.0 NETWORK=192.168.255.0 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no ONBOOT=yes --- Once that works, continue with the other stuff :). -- Daniel