Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Aug 14, 2014, 09:05 PM
Registered User
Jack Crossfire's Avatar
Thread OP
Discussion

Raspberry pi routing


So you have a pi router with wlan0 & eth0. The internet is on a wlan0 address 10.0.1.11. The home network is on a eth0 address 10.0.0.11. Getting from a network on eth0 to a phone on wlan0 is a big deal. There are many ways to do it. There's using a bridge device on your pi to make eth0 & wlan0 the same device.

apt-get install bridge-utils

In /etc/hostapd/hostapd.conf add
bridge=br0
but keep
interface=wlan0

In /etc/init.d/ap add
brctl addbr br0
brctl addif br0 wlan0
brctl addif br0 eth0
ifconfig br0 10.0.0.11 netmask 255.255.255.0

The IP masquerading is the same. The IP addresses of wlan0 & eth0 need to be 0.0.0.0. Setting br0 sets both to the address of br0. Everyone on the wired network uses 10.0.0.11 as their gateway, which forwards everything to the phone. Bridging falls apart when you put more than 1 access point on the network.

Instead of a bridge, you need the wireless parts & the wired parts on different subnets. Every access point is a different subnet, while the wired part is the same. On the phone & every wireless computer, create a routing entry from the wireless subnet to the wired subnet.

/system/xbin/route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.1.11

On every wired computer, create a routing entry from the wired subnet to the wireless subnet.

route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.0.11

Everyone wanting to go to the other subnet needs a routing entry. Without the entry, it sometimes works, but not always. With the routing solved, all the 24 hour network services moved to the phone, it was finally time.




After 8 years, rising in price from $50 to $90, being down 25% of the time, Comca$t was finally put down, the webcam downloader which had run since Feb was killed, & the home network was switched to the phone.

Comca$t burned some $7200 in 8 years of ravenous price increases. With the latest price increase, LTE & DSL finally became more economical than coax. The phone hasn't experienced throttling yet, but DSL is probably going to become necessary.
Last edited by Jack Crossfire; Aug 15, 2014 at 06:15 PM.
Sign up now
to remove ads between posts


Quick Reply
Message:
Thread Tools