Linux - bridging eth0 and at0 with brctl

0

The problem is as follows: I have a router running a DHCP server connected (with a cable) to a computer with a wireless card. I want to create and ad-hoc network using airbase-ng then bridge it to eth0 (I know this doesn't make much sense, it's meant to be an exercise) so that anyone who connects to the ad-hoc network:

1) can access the outside world through the computer running the network 2) gets an IP address from the DHCP server the router is running

I tried:

brctl addbr Bridge
brctl addif eth0
brctl addif at0

But I'm not sure what to do next (to start Bridge), also adding eth0 to Bridge for some reason makes it not work, even if I configure it again after adding (dhclient eth0).

This is probably a noob question, but I would appreciate any help. Thanks in advance.

user4520

Posted 2013-11-10T11:04:33.367

Reputation: 183

Answers

0

What you just did was create a new network interface called Bridge which has eth0 and at0 junctioned into it. The interface named Bridge should show up in ifconfig.

So doing anything to eth0 or at0 individually afterward (except getting at0 on/off a wireless network) doesn't make sense. They are part of the bridge.

Try dhclient -v Bridge and see if Bridge can get an IP from your DHCP server.

LawrenceC

Posted 2013-11-10T11:04:33.367

Reputation: 63 487

My dhclient never heard of a -v option, but I just did dhclient Bridge and it worked like a charm - thanks :). – user4520 – 2013-11-10T11:26:39.517