Bridge between wireless internet connection and Drobo Ethernet connection

0

My target setup is as follows:

  1. Ubuntu 11.04 64 bit server which has a WiFi USB dongle that connects to a Linksys WRT160NL wireless router (and from them to the net).
  2. A Drobo FS that connects directly to the Ethernet port of Ubuntu.
  3. Laptops and iPhones connecting to the Linksys router wirelessly.

I want all devices to be on the same network (like 192.168.1.xxx). The only problem I can't solve is how to make the Ubuntu server act as proxy/bridge (not sure what the right word is) for all packets going to and from the Drobo.

DrorCohen

Posted 2011-07-24T16:13:53.673

Reputation: 234

Answers

0

I would not advise bridging wifi and wired networks. Keep them separate and use routing, that way your ethernet traffic won't be broadcast to the world with the wifi slowing down your wired traffic.

(Instead of buying a new wifi router, I configured a spare ASUS EEE PC to do the same job with 100mbps internet traffic on external usb, the ethernet port on 192.168.1.0/24 and the wifi as an access point with dhcp on 192.168.3.0/24 - it works brilliantly, but your arrangement is much simpler.)

If you split your wifi/wired subnets with /25, then you could still make your network look like 192.168.1.x :-) Set dhcp on the router for 3-127 for wifi and 128-253 for wired if poss, otherwise might need to do static addresses or configure dhcp on the server for eth0 net with appropriate firewall rules to separate the dhcp traffic. In any case, traffic should be tidied with iptables to avoid leaking broadcasts etc.

on the server:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -P FORWARD ACCEPT
route add default gw 192.168.1.1 dev wlan0 # to linksys
route add -net 192.168.1.0 netmask 255.255.255.128 dev wlan0
route add -net 192.168.1.128 netmask 255.255.255.128 dev eth0

This probably isn't complete or correct, but I hope should give you a start with a little googling.

Andy Lee Robinson

Posted 2011-07-24T16:13:53.673

Reputation: 908

the problem is that I need both legs on the same network (so broadcast will transmit from one to the other). What should I set the eth0 ip in that case (my understanding is that you cant have a server with two legs with ips from the same network)? – DrorCohen – 2011-07-29T13:54:58.890

I expected it would be .254 (hence dhcp 128-253). Should be able to make broadcasts traverse subnets, while keeping local traffic local to each subnet. Not sure I follow your last point - a server can have many addresses from lots of networks, and interfaces can also have many addresses. We are splitting a network into two pieces, one for wired, one for wireless, FF.FF.FF.80. If broadcast mask is 192.168.1.255 then it should cover both subnets. – Andy Lee Robinson – 2011-07-29T18:40:02.473

0

That router has four ethernet ports on it, so I can only see two reasons why you wouldn't plug your Drobo into it:

  1. All 4 ports are already taken (not too hard to imagine), or

  2. You don't want a noisy Drobo wherever your router is.

If the second case is true, I would suggest doing what I did and get an ethernet cable long enough so that you can put your Drobo someplace else. A nearby closet for instance.

If it's the first case, add a switch to the mix. 8 port gigabit switches can be had for less than $50, and you've already spent a whole lot more than that on your Drobo. Also, you probably have enough wired gadgets to make it worth your while.

MBraedley

Posted 2011-07-24T16:13:53.673

Reputation: 2 712

Actually the reason is that the server and Drobo are in a different room than the phone and the adsl wifi router – DrorCohen – 2011-08-01T07:21:45.440

I still qualify that as reason 2. If it's not that difficult to string a cable I would do that. Powerline modems might also be an option. – MBraedley – 2011-08-01T12:32:36.480