From FON Wiki Beta
Description
- With a "network bridge" we want to change our Fonera into a dumb switch. We still want to be able to reach it though!
- Most people allready have an internet modem that allready runs a DHCP and has functions like portforwarding, upnp and probably has 4 lan ports.
- When people add a fonera, fonera+ or fonera 2.0g they are introducing
- 2nd nat ... all pc's behind "myplace" or the LAN on the Fonera+/2.0g/n are natted again to a 192.168.10.x subnet... and the "internet" side is probably part of a 192.168.0.x subnet of their internet modem.
- This doublenat is not nice for gaming
- port forwarding x 2...
- upnp is not opening up ports to the internet modem...only on the fonera
- breaks SIP which doesn't like double nat very much.
- Also the Fonera is running NAT & Firewalling between it's internet & lan/myplace interface which takes CPU and networkspeed.
- In Bridge we don't need this anymore on the "myplace" interface (lan/wifi)...which means faster speeds wan/lan that might be almost 100mbit like ... only your internet modem/internet subscription would be the limitation!!!
issues
- Due to the CPU usage on NAT/Iptable firewalling the speed on the WAN interface is limited to 2mbyte/s
- If you shut down the QOS service to prevent this throttling you will notice the web interface will become unresponsive while doing >2mbyte/s
- Tests should be conducted what the max speed is when there is no firewall(iptables) and NAT being performed on the WAN/LAN interface. It should only be used on the "FON_FREE_INTERNET" interface
Possible solutions
wget -O /etc/init.d/bridge http://www.lorenzobraghetto.com/wp-content/uploads/bridge && chmod +x /etc/init.d/bridge
/etc/init.d/bridge start
- Before enable the script, verify that all works correctly because if it doesn't work, you must do a master reset
/etc/init.d/bridge enable
- Possible caveats:
- It doesn't disable firewall/nat
- Option forward in the lan zone should be set to accept
- The bridge with the wan ip runs under the context of the lan interfaces, this might cause unexpected behaviour
- How does people know the ip of the fonera to administer? does their internet modem show all connected clients (eg fonera)
- Very important !
- The public wifi doesn't work with this script
- You must turn your wan IP to a static address
Official support
- on 14th December 2009 FON releases 2.3.5RC2 on the public which has "bridging" support.
- in april FON kept it in 2.3.6 firmware for the Fonera 2.0n ... there is no official support for Fonera 2.0g
- It works but if for some reason your uplink changes ip adres your fonera 2.0n becomes a dumb switch, not manageable anymore.
- The Reset & Firmware restore methods do NOT WORK
- Reboot the fonera without internet connectivity (WAN/INTERNET port empty)
- Connect your pc to one of the LAN ports and let it gain a "limited internet access"
- Turn off any wireless connectivity
- surf to http://169.254.255.1 and you get a popup for authentication
- Use user "fonero" and password that you selected last.
- You can now turn of Bridging under Settings -> Network Settings and power recycle the device!
*** This 99$ tip was given by Kyros ***
Unofficial support
Fonera 2.0g or 2.0n
#!/bin/sh /etc/rc.common
## Bridge for Fonera 2.0x by monossido modified by basgys
START=41
## Get WAN iface from network file
waniface=$(tail -n +$(grep -n "config 'interface' 'wan'" /etc/config/network | cut -d":" -f1) /etc/config/network | grep -m1 "option 'ifname'" | awk '{print $3}' | tr -d "'")
## Get WAN IP from fon file
wanip=$(tail -n +$(grep -n "config 'wan'" /etc/config/fon | cut -d":" -f1) /etc/config/fon | grep -m1 "option 'ipaddr'" | awk '{print $3}' | tr -d "'")
## Get gateway IP from route table
gatewayip=$(route -n | grep $waniface | grep 'UG[ \t]' | awk '{print $2}')
start() {
ifconfig br-lan $wanip
ifconfig $waniface 0.0.0.0
brctl addif br-lan $waniface
route del -net 0.0.0.0 gw $gatewayip
route add default gw $gatewayip
}
stop() {
/etc/init.d/network restart
LaFonera+
La Fonera 2100/2200