You are not logged in.

#1 2010-07-16 05:53:13

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

How to bridge two interfaces on same motherboard.

Hello everyone, I've just started digging in to Arch Linux, and I am loving it so far!

Most of my Linux experience is from Ubuntu, so bear with me here, because I'm having a fairly simple problem that I had figured out on Ubuntu and would like to reproduce on Arch.

I have a motherboard with two network cards in it.   One is fed from the router, and the other one feeds an Xbox1 that runs Xbox Media Center.   Both of these machines are set to DHCP for the network.  What I need from the setup is for each machine to get its own internal IP from the router's dhcp server.  In Ubuntu I had this setup and working perfectly by having the following code in my /etc/network/interfaces file:

auto lo
iface lo inet loopback

auto eth0
auto br0

iface eth1 inet dhcp

iface br0 inet dhcp
bridge_ports eth0 eth1

My problem is that I do not have a /etc/network/interfaces file in Arch, like there is in Ubuntu.    Where would I need to input these commands?

In Arch I have installed the bridge-utils package, and last night I installed networkmanager, and dnsmasq.   In my rc.conf file I commented out the network commands, and the network daemon, and added networkmanager's daemon to the list.   Something tells me this wasn't necessary, and I can remove all of that if its necessary to get the bridge up.   This isn't as simple as me just making my own /etc/network/interfaces file is it?   

Anyway thanks for taking the time to read over this.   Let me know if there is some pertinent information I've left out of this post.   I've tried to be as clear as I can be.

Offline

#2 2010-07-16 06:45:11

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: How to bridge two interfaces on same motherboard.

You should be able to set this up in /etc/rc.conf with some minor changes.
I believe you need to declare both interfaces in rc.conf and assign a default gateway.
The NIC which is the Xbox needs a routing rule set up to be "bridged" through to the other NIC so that it can essentially obtain an IP from the DHCP server.

There is possibly more specific information here http://wiki.archlinux.org/index.php/Con … _Static_IP

Last edited by sand_man (2010-07-16 06:46:54)


neutral

Offline

#3 2010-07-16 07:14:33

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to bridge two interfaces on same motherboard.

What you've posted is the Debian way - it won't work on Arch. I remember looking for /etc/network interfaces myself when I first changed over. smile

Have a look at /etc/conf.d/bridges - that should start you off. Figuring out the rest is basically down to familiarising yourself with the actual bridging commands (I'm assuming you don't know them yet, as you didn't need to learn them for Debian). man brctl will help with that.

Not sure how/if networkmanager works with bridging - I don't use nm myself. You might consider scripting something yourself.

Offline

#4 2010-07-16 08:53:44

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

Re: How to bridge two interfaces on same motherboard.

Ah thank you very much for pointing me in the right direction!   I read over man brctl, studied the /etc/conf./bridges and the /etc/rc.conf files and figured it out!  Here is what I did, in the hopes it might help someone else out.

First off I removed the networkmanager app, as it wasn't necessary at all.  After I removed that I made sure to remove the deamon from rc.conf, and uncommented the daemon for 'network'. 

in the file /etc/rc.conf I added the following in between the HOSTNAME and the gateway line:

eth0="eth0 up"
eth0="eth1 up"
br0="dhcp"
INTERFACES=(lo eth0 eth1 br0)

In the /etc/conf.d/bridges file I added the following two lines:

bridge_br0="eth0 eth1"
BRIDGE_INTERFACES=(br0)

When I logged back in the PC had an IP and so did the Xbox!   Thanks again for the help.  This was the one big hurdles I had to adopting Arch.

Last edited by Beelzebud (2010-07-16 09:03:42)

Offline

#5 2010-07-17 04:11:17

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

Re: How to bridge two interfaces on same motherboard.

I just had to post this, and I didn't want to create a new thread for it.

I LOVE ARCH LINUX!  smile

The network bridge is working, Samba shares are working, nvidia drivers and compiz are working, and it now does everything Ubuntu did, but with better performance!   The best part is that I've learned a lot of fundamental things about how the Linux/Unix architecture works.   I'm grateful for Ubuntu, because it got me started on Linux, but I think I've found my distro in Arch!   If you're willing to learn, it's an amazing OS.   smile

Offline

Board footer

Powered by FluxBB