2011-10-16

PPPoE

When putting an integrated DSL modem into bridge mode (RFC 1483), one loses the capability to access the web configuration of the modem, because the router doesn't pass LAN packets out onto its WAN port.  The usual option is to take down the Net connection by unplugging the modem from the router's WAN port and plugging it into a LAN port.  Apparently there are a few other options, but none of them are really satisfactory in that they either cause additional latency (through use of a switch between the modem and the router) or route instability (via wacky topology).  If using a Linux-based router, there appears to be a way to force the system to pass the reserved address out on the WAN port:
#!/bin/sh

#IP Address of the modem, must be a different network from your local LAN.
#If you use 192.168.x.x for LAN then use 10.0.0.x for modem, etc (basically, pick a free IANA reserved range)
#Obviously you need to configure the actual DSL modem to use the address you select in MODEM_IP.
MODEM_IP="10.0.0.1"

#IP address that will be bound to vlan1, usually safe to just increment MODEM_IP by 1.
VLAN_IP="10.0.0.2"

#Setup network interface and firewall rules.
ifconfig vlan1 $VLAN_IP netmask 255.255.255.0
iptables -A forwarding_rule -d $MODEM_IP -j ACCEPT
iptables -t nat -A POSTROUTING -d $MODEM_IP -j MASQUERADE

No comments: