LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   I am running debian, and I was wondering how I would set up a bridge between ethernet (http://www.linuxquestions.org/questions/linux-software-2/i-am-running-debian-and-i-was-wondering-how-i-would-set-up-a-bridge-between-ethernet-918584/)

darkstarbyte 12-13-2011 05:17 PM

I am running debian, and I was wondering how I would set up a bridge between ethernet
 
I am running debian, and I was wondering how I would set up a bridge between Ethernet and wifi so I can update a computer that does not have wifi.
Code:

lspci

00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)
00:1c.3 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02)
01:00.0 Ethernet controller: Atheros Communications AR8132 Fast Ethernet (rev c0)
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

It also seems I can't use the addbr command from bridge-utils. I don't know how to set this up.

davemguru 12-13-2011 07:39 PM

If you have a your wifi network card setup with an IP address and it's working (you can ping your host from another machine and vice versa)
AND
you have your ethernet card setup with an IP address. (I am gonna assume that this card is connected somehow to the internet) and you can ping some address out in the ether.
Then all you need to do is turn on "IP FORWARDING"
By default - most modern Linux's have IP forwarding turned off.
You can check by
Code:

cat /proc/sys/net/ipv4/ip_forward
if the result is 0 (zero) - then it's off.
To turn it on temporarily ...
Code:

echo 1 > /proc/sys/net/ipv4/ip_forward
Now packets from the wifi should be able to flow through your host and out to the internet.

If you are using ipv6 then you should search for the (different) details with regard to ipv6 forwarding.

Of course - you will also need to adjust your routing tables on the client. To say "my default route (gateway) for stuff is that machine over there".
I apologise if it appears that I haven't given the "complete solution on a plate" - but, I am assuming you wanted "pointers in the right direction".

Dave

darkstarbyte 12-17-2011 09:43 AM

I was meaning something like ethernet to wifi. It does not have to be a bridge I just want it to connect one of my machines that can't get wifi to the internet.

sgosnell 12-17-2011 05:29 PM

How are you connecting wirelessly? Do you not have a router available, with ethernet ports?

davemguru 12-18-2011 09:38 AM

Quote:

I was meaning something like ethernet to wifi. It does not have to be a bridge I just want it to connect one of my machines that can't get wifi to the internet
Perhaps I was "assuming too much".sgosnell has the right idea - he/she is trying to get to the root of the problem.

If you have a wireless device (example - laptop) and you DO NOT have a wireless router or Access point - then it begs the question - "how is this wireless device communicating with anything at present?".
Maybe that is the root?
You have a server/desktop Debian box - that has both wired and wireless interfaces. It is the Debian box that is connected (by wire) to the Internet. You wish to make the Debian box behave as an "Access point" for the laptop.. thus the laptop can connect to the internet "through" the Debian box?
I guess what sgosnell and I are both asking you is - Please explain in more detail - (a) what you have and (b) what it is you wish to achieve.

Dave

darkstarbyte 12-18-2011 08:25 PM

I have a router, but not a cable long enough to run to the other machine.

EDIT: I have wep set on the router, if that helps.
My netbook is a stock model, 1005hab eee pc. My desktop computer is a custom build, and is much older than my netbook. I have maxed out the ram on all of my computers except the netbook. I have an old pentium 4 with 4 gigabytes of ram, well that is not entire true I also have one that has 2.5 gigabytes of ram. I can't complain when I only had to pay for the netbook.

sgosnell 12-22-2011 08:51 PM

Can you temporarily move the router? Ethernet cable isn't expensive, and can be bought in long lengths, but if you really don't want to do that, moving the router, and using a longer phone cable might be a workable compromise. Or just move the desktop temporarily.

In the long run, you will be better off getting a longer ethernet cable or moving the router.


All times are GMT -5. The time now is 12:26 AM.