I'm trying to set up a WiFi link between two buildings. On one side I've got a regular SoHo (network A) router (Linksys EA4500) and on the other side I've got an Alfa AWUS036H (network B) connected to some Debian box. On the Debian box I can connect to network A and have no issues.

How should I proceed about bridging that connection to the rest of network B?

My current thought is to plug an ethernet cable into the Debian box. So the Debian box would be hooked to network B by wire, and network A by wireless. Since this Debian box would not be the router on network B though, this brings up the question of having it forward traffic for other nodes on network B. Do I set up a static route on the network B router to point that traffic at my Debian box and enable forwarding (i.e. sysctl net.ipv4.ip_forward right?)

Can someone provide me a push in the right direction? I'm clearly new to this. Thank you!

Edit: Network B has its own router already that's doing a PPPoE connection for Internet access and is running pfSense.

  • When you say "bridge" do you mean you're literally trying to create a layer 2 bridge, merging them into one broadcast domain? Or are you trying to route IP packets between the two buildings? – David Schwartz Dec 25 '12 at 4:18
  • @DavidSchwartz Thank you for the clarification. I think either will work for me. Honestly, whatever is easier. – omghai2u Dec 25 '12 at 4:21
  • Needs more details. Also, Wireless Workgroup Bridge. Dunno how you'd do it with that SOHO kit, but you might be able to look up how to setup a wireless bridge on that specific gear. – HopelessN00b Dec 25 '12 at 4:23
  • Routing between networks is either. But then you have to know which IP addresses are on which side of the link and a router on each end must direct packets bound for the other side of the link to the router on the other side. Also, somehow packets bound for machines on the other side of the link have to get to the routers that handle the link from the machines that create them. – David Schwartz Dec 25 '12 at 4:23
  • 1
    @omghai2u: Yes, so long as machines no to send those packets to those routers, those routers are the default gateways for the machines using the links, or you also put routes in the default gateway routers. (When machine X sends a packet to machine Y on the other end of the link, it will send it to its default gateway if it has no more specific route. So the default gateways on both sides have to know to send those packets across the link.) – David Schwartz Dec 25 '12 at 4:27

IMHO, use the Debian box as a router for Network B. Following is the setup.

1 Network

  • Network A

    IP :
    GW : (SoHo router with internet connection)
  • Network B

    IP :
    GW : (Debian Box LAN interface IP)

2 SoHo Router == Network A Router

    LAN IP       : (Machine on Network A use this IP as default gateway)
    WAN Config   : PPPoE (I am making assumption here)
    Static Route : GW

Static route is needed for SoHo route to know traffic to is going through, not to the default gateway(which will be the internet)

3 Debian Box == Network B Router

    Wi-Fi IP     :
    LAN   IP     : (Machines on Network B use this IP as default gateway)
    Default GW   : (Default GW of Debian Box itself, not for machines on Network B)
    net.ipv4.ip_forward = 1

Static route is not needed for Debian Box is because BOTH internet and traffic are going through Wi-Fi interface ( to SoHo Router, which will route them accordingly.

PS: The most important thing here is configuring static route on SoHo router. Some router just don't have that capability.

  • I like this, this seems good. I think I'm confused a little though: I'll still need to add a static route on Network B's router (the one with the PPPoE connection) as well, right? – omghai2u Dec 25 '12 at 4:42
  • I updated the answer for clarification. – John Siu Dec 25 '12 at 4:54
  • Just wondering if this is done or implemented in another way? – John Siu Feb 5 '13 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.