LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Trouble creating network bridge (https://www.linuxquestions.org/questions/linux-networking-3/trouble-creating-network-bridge-509892/)

amhso 12-12-2006 09:41 PM

Trouble creating network bridge
 
First off, I'll say what i am attempting to do, before I say what i did. I am trying to install Arch Linux on a new box, which has no internet and I can't connect it to the router. I have a Slackware 10.2 box, which has wireless running and has access to the internet. To update packages and make the Arch Linux box a desktop, i need internet. So I want to bridge the connection so that it can access the internet through the Slackware box's wireless.

So on the Slackware box, the one w/ wireless internet connection, I have the devices : eth0 and wlan0 . eth0 is connected by a ethernet cable to the othermachine's eth0. Here's what i did on the bridging machine:

brctl addbr br0

this was to make a bridge "br0"

adding devices to br0 to bridge.

brctl addif br0 eth0
brctl addif br0 wlan0


to bring it up, i used:

ip link set br0 up

and then my net died and nothing worked. Are there other things I should be setting or am I missing some commands? Thanks in advance.

acid_kewpie 12-13-2006 02:15 AM

well addir is invalid, it's addif (ADD InterFace) and you also need to specify which interface you need to add it too, i.e. "brdtl addif br0 eth0"

http://tldp.org/HOWTO/Ethernet-Bridg...r-HOWTO-3.html

amhso 12-13-2006 09:16 PM

sorry. that didnt come out right. i did use:

brctl addif br0 eth0
brctl addif br0 wlan0

because i got a working output when i did

brctl br0

and it listed the devices wlan0 and eth0

xjlittle 12-13-2006 10:06 PM

Unless your arch box is on a different subnet than the slackware box you don't need a bridge if I understand your setup. When you connect the two boxes can you ping both interfaces on the slackware box from the arch box? If you can then set the default gateway on the arch box to the wlan ip on the slackware box. You might also want to enable ip forwarding by issuing the command echo 1 > /proc/sys/net/ipv4/ip_forward. Note this is not a permanent change in this manner. Consult the slackware docs for making it permanent.

acid_kewpie 12-14-2006 01:44 AM

yeah i thought about that being what they wanted to do. it's certainly a more conventional way, but assuming this is a wireless link to an ADSL router then there's technically no *need* to route through the box...

xjlittle 12-14-2006 06:14 PM

True. Since s/he has it connected through what sounds like a crossover cable I had the impression that it didn't have a wireless card.

DaveQB 01-20-2007 08:46 PM

Quote:

Originally Posted by xjlittle
Unless your arch box is on a different subnet than the slackware box you don't need a bridge if I understand your setup. When you connect the two boxes can you ping both interfaces on the slackware box from the arch box?

I don't think this is the situation of the OP.
I believes its more like how I am trying to set it up.

Code:

Router ----> wlan0[Slackware]
            eth0[Slackware] ----------> eth0[Arch]


If this is the case, would your suggestion still work xjlittle ?


All times are GMT -5. The time now is 04:25 PM.