No DHCPOFFERS received. && Failed to add the interfa

Discussions related to using VirtualBox on Linux hosts.
Post Reply
pdr
Posts: 5
Joined: 2. Aug 2008, 01:31

No DHCPOFFERS received. && Failed to add the interfa

Post by pdr »

Hi, for my project i need to install virtualbox and i've managed to do it.
I need to establish an internet connection between host machine and guest machine. On host machine there is ubuntu 8.04 hardy and on guest there is debian. I followed the instructions on user manual. I added

Code: Select all

auto br0
iface br0 inet dhcp
    bridge_ports eth0
before the line in /etc/network/interfaces:

Code: Select all

auto eth0
When i run the command:

Code: Select all

sudo /etc/init.d/networking restart
it says;

Code: Select all

Listening on LPF/eth1/00:**:**:**:**:**
Sending on   LPF/eth1/00:**:**:**:**:**
Sending on   Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
After that when i try to do this:

Code: Select all

 VBoxAddIF vbox0 pdr br0
Another the problem shows up:

Code: Select all

Failed to add the interface "vbox0" to the bridge "br0".
Make sure that the bridge exists and that you currently have sufficient
permissions to do this.
I couldn't solve the problem. How can i be sure that bridge exists and what is the cause(s) of this?

Thanks...
philippe44
Posts: 45
Joined: 31. Jul 2008, 20:56
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Kubuntu, misc Linux, XP

Post by philippe44 »

reading through your logs, it seems that you try to bridge eth0 and vbox0 while your controler is eth1
philippe44
Posts: 45
Joined: 31. Jul 2008, 20:56
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Kubuntu, misc Linux, XP

Post by philippe44 »

and did you add user "pdr" to the group "vboxusers", and made sure /dev/net/tun as "vboxusers" as group, with rw (66x) mode ?
pdr
Posts: 5
Joined: 2. Aug 2008, 01:31

Post by pdr »

I added myself to vboxusers but i couldn't do '/dev/net/tun as "vboxusers" as group, with rw (66x) mode' thing. in my system /dev/net/tun file is 0 byte. but its group is vboxusers and mode is rw. is that a problem?

I don't use eth1 as i know. But how can i learn that? in system menu i opened network tools and i see that eth1 does not exists(does not function). eth0 working for me now.

thank you for the reply by the way...
philippe44
Posts: 45
Joined: 31. Jul 2008, 20:56
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Kubuntu, misc Linux, XP

Post by philippe44 »

If /dev/net/tun is "vboxusers", this is fine - the major and minor of this device are 10,200 right ?
To fix the bridge, I think you should either set the bridge with eth1 either modify the /etc/udev/rules.d/70-persistent-net.rules find the line referring to eth0, comment it, then find the line referring to eth1 and replace "0" by "1" (btw, this is just naming convention, so yo can stick with option #1 if you prefer). Before doing this, can you tell me if you have changed something in the past in your PC configuration while Linux was installed (like adding a ethernet board, or an ethernet-capable device) ?
philippe44
Posts: 45
Joined: 31. Jul 2008, 20:56
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Kubuntu, misc Linux, XP

Post by philippe44 »

btw, can you an "ifconfig" and send me the result ?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

As per manual: Easiest way to get internet on the Guest, use NAT. That's all. No need for a bridge unless you want to access the Guest from the Host or other systems on the network.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
pdr
Posts: 5
Joined: 2. Aug 2008, 01:31

Post by pdr »

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:11:d8:dc:32:53  
          inet addr:144.122.116.133  Bcast:144.122.116.255  Mask:255.255.255.0
          inet6 addr: fe80::211:d8ff:fedc:3253/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:527028 errors:0 dropped:0 overruns:0 frame:0
          TX packets:271458 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:771143623 (735.4 MB)  TX bytes:17341006 (16.5 MB)
          Interrupt:19 Base address:0xc800 

eth1      Link encap:Ethernet  HWaddr 00:12:f0:2c:ce:46  
          inet6 addr: fe80::212:f0ff:fe2c:ce46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7616 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3649 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:19 Base address:0x2000 Memory:fe8fe000-fe8fefff 

eth1:avahi Link encap:Ethernet  HWaddr 00:12:f0:2c:ce:46  
          inet addr:169.254.7.13  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:19 Base address:0x2000 Memory:fe8fe000-fe8fefff 

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:1745 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1745 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:87344 (85.2 KB)  TX bytes:87344 (85.2 KB)

vbox0     Link encap:Ethernet  HWaddr 00:ff:57:48:bd:01  
          inet6 addr: fe80::2ff:57ff:fe48:bd01/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:6 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
result of ipconfig is above.

@philippe44:
I didn't change ethernet configuration of my pc. After linux installed, it recognized my ethernet connection. Should i still do the changes you said to me?


@sasquatch:

I want my host machine to behave like a server and guest machine like a client. My purpose here is, I will send mail from my virtual machine to another machine on the network. The gateway here does the things like enveloping. After that gateway will send the mail to the server and server will do whatever needed. I need my server to have an internet connection directly not the guest. I need my virtual machine to connect internet via host machine, not directly. For incoming mail case, the incoming mail will come firstly to server machine(host machine) after that it will redirect it to virtual machine and gateway will show up here again. I will set the port numbers, ip settings etc of guest. Am i right?

I am not sure but in nat, i think it is not the case. If it is, it is ok for me, too :)

thanks...
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Ok, you might want to try it without a bridge. Keep the Host Interface, set it to static addresses and point the Guest to the Host HIF address. As I understand what you want, you only want the Guest to send email to the Host, who then handles the rest. Same for the other way around, the Host recieves a mail and sends it to the Guest system. You would have the following setup on the Host (guest is self explaining).

Code: Select all

eth0 #for your Host internet I assume?
address 144.122.116.133
mask 255.255.255.0
gateway 144.122.116.1 #assuming this is correct, else the default will apply

eth1 #where is this interface used for?
no config

vbox0 #your way to the Guest system
address 192.168.0.1
mask 255.255.255.0
Just to complete it, the Guest system.

Code: Select all

eth0
address 192.168.0.2
mask 255.255.255.0
gateway 192.168.0.1
This is assuming you don't need DNS records, else you can put them in the /etc/host (or is it /etc/hosts?) file.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
philippe44
Posts: 45
Joined: 31. Jul 2008, 20:56
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Kubuntu, misc Linux, XP

Post by philippe44 »

maybe you could also deactivate the avahi dameon (/etc/default/avah-conf or something similar) - BTW, do you know what are these 2 eth interfaces ? Because if you try to build a bridge with a wlan or a 1394, most of the time it does not work (cannot be put in promiscuitous)
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

philippe44 wrote:maybe you could also deactivate the avahi dameon (/etc/default/avah-conf or something similar) - BTW, do you know what are these 2 eth interfaces ? Because if you try to build a bridge with a wlan or a 1394, most of the time it does not work (cannot be put in promiscuitous)
The eth1:avahi is there because he didn't get an IP address from the DHCP server, giving it a so called APIPA address.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
philippe44
Posts: 45
Joined: 31. Jul 2008, 20:56
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Kubuntu, misc Linux, XP

Post by philippe44 »

What do you think of these tools (zeroconf in general) ? I'm not a big fan, I recently experienced a conflict due to networkmanager when building a bridge. It was keeping duplicated routes on both br0 and eth0 (w/ different metrics) but it confused my Kubuntu 8.04 which was not any more able to route correctly. Preventing networkmanager from configuring eth0 did solve the problem, with having a single set of routes. But to the problem we are trying to help, zeroconf does not add an IF, rigth ? so can't it be a problem either of bridging the wrong ones (and what are these eth0 and eth1), or avahi (zeroconf) interacting poorly with the bridge ? what do you think ?
pdr
Posts: 5
Joined: 2. Aug 2008, 01:31

Post by pdr »

let's take it slow sasquatch. :)
I'm very confused about what you said. Sorry but i'm not very good at linux :(
I want to know something about server machine(host). will it be behave like i want. don i need to add any dns server like thing?
Also i don't know how to set HIF Address. I am sorry but i'm totally stuck here.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

This is my Host interfaces file.

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo
iface lo inet loopback

auto brdg
iface brdg inet static
        bridge_maxwait 0
        bridge_ports lan vbox0 vbox1
        address 192.168.0.1
        netmask 255.255.255.0
#       gateway 192.168.1.254
#       dns-nameserver 192.168.1.254

# This one does not need to be started automatically, because it's part of the bridge
# and the bridge starts it. It doesn't even need the IP configuration.
#auto lan
iface lan inet manual
#       address 192.168.0.10
#       netmask 255.255.255.0
#       dns-nameservers 192.168.1.254
#       gateway 192.168.0.2

# First virtual interface for bridge.
#auto vbox0
iface vbox0 inet manual

# Second virtual interface, because I run more than one VM at times.
#auto vbox1
iface vbox1 inet manual

# This interface is Host <=> Guest communication only, no internet goes over this connection
auto vbox2
iface vbox2 inet static
        address 172.30.1.2
        netmask 255.255.0.0

# My wireless, as you might have guessed :P
auto wlan
iface wlan inet static
        pre-down killall -q wpa_supplicant
        post-down killall -q dhclient
        post-up /etc/network/wifiscript.sh
        address 192.168.1.252
        netmask 255.255.255.248
        gateway 192.168.1.254
        dns-nameservers 192.168.1.254
If you have something like what I have, it should work just fine. The command brctl show brdg (or br0, whatever you call your bridge) will look something like this:

Code: Select all

bridge name     bridge id               STP enabled     interfaces
brdg            8000.00030d447f69       no              lan
                                                        vbox0
                                                        vbox1
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply