Bind separte PHYSICAL interface to VM

Discussions related to using VirtualBox on Linux hosts.
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 »

I'm not a programmer. I do have a paypal account though :P. But just the mere accomplishment of a working situation is enough credit for me.
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.
Angry
Posts: 24
Joined: 4. Sep 2008, 17:36

Post by Angry »

K well I'll keep you updated - can't really work on it tonight but I'll post tomorrow. Thanks again and have a good night (or day in Nederlander).
Angry
Posts: 24
Joined: 4. Sep 2008, 17:36

Still not working

Post by Angry »

Sorry, but this isn't working for me. I read those man pages and the docs but I must be doing something wrong. Here's what I did:

I edited /etc/network/interfaces to assign the address and netmask you suggested:

Code: Select all

auto lo
iface lo inet loopback

auto br0
iface br0 inet static
address 0.0.0.0
netmask 255.0.0.0
bridge_ports eth0

auto br1
iface br1 inet static
address 0.0.0.0
netmask 255.0.0.0
bridge_ports eth4
I restarted the interfaces with /etc/init.d/network restart:

Code: Select all

rt3@rt3-desktop:~$ sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces...                                          device br0 already exists; can't create bridge with the same name

Waiting for br0 to get ready (MAXWAIT is 32 seconds).
SIOCSIFNETMASK: Cannot assign requested address
Failed to bring up br0.
device br1 already exists; can't create bridge with the same name

Waiting for br1 to get ready (MAXWAIT is 32 seconds).
SIOCSIFNETMASK: Cannot assign requested address
Failed to bring up br1.
                                                                         [ OK ]
rt3@rt3-desktop:~$ 
I started the VM's - just a reminder that eth0/br0/vbox0 is the client and eth4/br1/vbox1 is the dhcp server:

Code: Select all

rt3@rt3-desktop:~$ ifconfig
br0       Link encap:Ethernet  HWaddr 00:0a:5e:54:c0:3a  
          inet6 addr: fe80::20a:5eff:fe54:c03a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:100 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:20066 (19.5 KB)  TX bytes:12093 (11.8 KB)

br1       Link encap:Ethernet  HWaddr 00:0a:5e:54:c0:14  
          inet6 addr: fe80::20a:5eff:fe54:c014/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:15800 (15.4 KB)  TX bytes:6633 (6.4 KB)

br0:avahi Link encap:Ethernet  HWaddr 00:0a:5e:54:c0:3a  
          inet addr:169.254.84.23  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

br1:avahi Link encap:Ethernet  HWaddr 00:0a:5e:54:c0:14  
          inet addr:169.254.176.139  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:0a:5e:54:c0:3a  
          inet6 addr: fe80::20a:5eff:fe54:c03a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:291 errors:0 dropped:0 overruns:0 frame:0
          TX packets:323 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:55598 (54.2 KB)  TX bytes:59521 (58.1 KB)
          Interrupt:22 Base address:0xa880 

eth1      Link encap:Ethernet  HWaddr 00:19:d1:7e:4e:84  
          inet addr:136.204.170.44  Bcast:136.204.171.255  Mask:255.255.252.0
          inet6 addr: fe80::219:d1ff:fe7e:4e84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5944 errors:0 dropped:0 overruns:0 frame:0
          TX packets:558 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:819879 (800.6 KB)  TX bytes:99429 (97.0 KB)
          Base address:0x30c0 Memory:90300000-90320000 

eth4      Link encap:Ethernet  HWaddr 00:0a:5e:54:c0:14  
          inet6 addr: fe80::20a:5eff:fe54:c014/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:528 errors:0 dropped:0 overruns:1 frame:0
          TX packets:587 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:120011 (117.1 KB)  TX bytes:84357 (82.3 KB)
          Interrupt:23 Base address:0x2800 

eth0:avahi Link encap:Ethernet  HWaddr 00:0a:5e:54:c0:3a  
          inet addr:169.254.45.119  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:22 Base address:0xa880 

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

vbox0     Link encap:Ethernet  HWaddr 00:ff:50:67:5d:3d  
          inet6 addr: fe80::2ff:50ff:fe67:5d3d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:172 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:67 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:12977 (12.6 KB)  TX bytes:6207 (6.0 KB)

vbox1     Link encap:Ethernet  HWaddr 00:ff:f3:f1:77:ac  
          inet addr:192.168.1.252  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2ff:f3ff:fef1:77ac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:131 errors:0 dropped:0 overruns:0 frame:0
          TX packets:150 errors:0 dropped:190 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:6338 (6.1 KB)  TX bytes:10327 (10.0 KB)

vbox0:avahi Link encap:Ethernet  HWaddr 00:ff:50:67:5d:3d  
          inet addr:169.254.5.122  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
At first I went into eth4/br1/vbox1 and set an IP statically per the interfaces directions. This is the output from the eth4/br1/vbox1 ifconfig:

Image

For some reason, it seems that eth4/br1/vbox1 (which is running the dhcp server) has somehow issued an IP address to itself!

I have to go to class till 9 pm EST - just thought I'd give you that to chew on if you can help me later. Thanks in advance.
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 »

Interfaces file for you to use, reboot after you made it like this:

Code: Select all

auto br0 br1
iface br0 inet static
address 0.0.0.0
netmask 255.0.0.0
bridge_ports eth0 vbox0

iface br1 inet static
address 0.0.0.0
netmask 255.0.0.0
bridge_ports eth4 vbox1

iface vbox0 inet manual
iface vbox1 inet manual

iface eth0 inet manual

iface eth4 inet manual
I'm assuming here that you made those interfaces permanent with the VBoxAddIF command and assign them to a bridge properly.

This should do it. However, if you have Network Manager, remove that as it will only get in the way. It can be useful most of the times, but when doing more advanced networking, it's a real PITA.
This is how I have my bridge running without any issues. DHCP works just fine when obtaining an 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.
Angry
Posts: 24
Joined: 4. Sep 2008, 17:36

Post by Angry »

Yes, I did bridge them using VBoxAddIF and I didn't know the bridge_ports (i'm assuming that's a variable or is it a function that accepts the parameter [interfaces]?) needs BOTH interfaces - I thought it bound the interface declared AUTOMATICALLY with the declared bridge. I thought it was like:

Code: Select all

auto br0
*
*
*
bridge_ports eth0
meant "bridge eth0 to virtual bridge br0" and then the command:

Code: Select all

VBoxAddIF vbox0 rt3 br0
meant "bridge vbox0 to br0 for user rt3" thus completing the join between interfaces :( I'm in Philosophy class discussing Experimenter's Regress so when I'm done at 9 I'll check it out. Thank you for being so attentive :)
Angry
Posts: 24
Joined: 4. Sep 2008, 17:36

IT'S WORKING NOW!!!

Post by Angry »

Ha, you're awesome!! Here are a couple screenshots:

Image
Ubuntu Desktop requesting an address from Ubuntu Server.

Image
Desktop with its IP from the DHCP server.

I'm also working on setting up named in Fedora which I've done before - just a matter of time - but oh thank you so much for your help!! You let me know if there's any way I can compensate you :)
Post Reply