Router - TG582N - Using an external modem

From AAISP Support Site
Jump to: navigation, search

One may wish to use the TG582n just as a router, and use an external ADSL or VDSL modem. In your author's case, the performance of the TG582n as an ADSL modem was found to be very poor (3.2km from the exchange, 8km from a very powerful Medium Wave transmitter) and a different modem was much better (part of a modem/router which can't do IPv6...).

One could use the configuration wizard to setup the TG582n for FTTC, but some of the settings aren't appropriate for ADSL - and my intention is to make it easy to switch back to the internal modem (although since doing this, I've only switched back once!) and not lose my custom configuration.

Sacrifice an Ethernet port

One has to dedicate an Ethernet port for the connection to the external modem. It's traditional to sacrifice port 4 for this, so

:eth bridge ifdelete brname bridge intf ethport4

Create a WAN interface

:eth intf=eth_WAN
:eth ifconfig intf=eth_WAN dest=ethif4 vlan=default
:eth ifattach intf=eth_WAN
:eth ifconfig intf=eth_WAN wan=enabled priotag=disable

For VDSL, create an interface with the appropriate VLAN

BT's VDSL runs over a VLAN (101), and the Openreach modem (now discontinued) and other modems expose the VLAN over the PPPoE link. So a 'shim' interface is needed on the router to cope with the vlan.

:eth add vlan name=FTTx vid=101
:eth bridge vlan ifadd name=FTTx intf=virt untagged=disabled
:eth ifadd intf=eth_PPP
:eth ifconfig intf=eth_PPP dest=eth_WAN vlan=FTTx
:eth ifattach intf eth_PPP

Switch PPP over to use this new interface

One can't ppp ifconfig an interface which is administratively up, so one has to bring it down first. The dest field should be eth_WAN for ADSL or eth_PPP for VDSL.

:ppp ifdetach intf=Internet
:ppp ifconfig intf=Internet dest=eth_WAN|eth_PPP mru=1492

Then bring PPP back up:

:ppp ifattach intf=Internet

One can simply switch the dest field between atm_Internet and eth_WAN to change between internal and external modem. The mru field sets the maximum received unit (the receiving equivalent of mtu), and will probably need to be 1492 with an external modem and 1500 with the internal modem.

Get the front panel LEDs working correctly

For external modem:

:system config WANMode=ETH WANEthPort=ethif4

For internal modem:

:system config WANMode=ADSL

Connect the external modem

Disconnect the TG582n from the phone line, connect an Ethernet cable from port 4 on the TG582n to ones external modem, connect the external modem to the phone line, and one should be back online.

MTU and baby jumbo frames

See also MTU

Using an external modem forces the TG582n to use PPPoE (rather than PPPoA). The MTU will drop by 8 octets as a result. It is possible to configure eth_WAN to use 1508 octet Ethernet frames ("baby jumbo frames") and give PPPoE a MRU/MTU of 1500 octets:

:eth ifconfig intf=eth_WAN mtu=1508
:ppp ifdetach intf=Internet
:ppp ifconfig intf=Internet mru=1500
:ppp ifattach intf=Internet

but (at least with firmware version 10.2.0.B) the TG582n doesn't support RFC4638 and won't negotiate 1500 octet MRU/MTU with the backhaul network.

[ One would need a PPPoE to PPPoA bridge running on the external modem to get a 1500 octet MRU/MTU with PPPoE. ]

Connecting to servers on the external modem

In your author's case, there are still servers (HTTP, Telnet, SSH) running on the external modem - it has an RFC1912 address. It's very useful to be able to connect to these servers from the LAN. There's already an Ethernet link to the external modem (it's carrying the PPPoE traffic), so add an interface on eth_WAN to talk TCP/IP to the external modem:

:ip ifadd intf=ModemLink dest=eth_WAN
:ip ifconfig intf=ModemLink group=lan ipv6=disabled
:ip ifattach intf=ModemLink

and add an IP address on that interface. In this case the external modem is on 192.168.0.1/24:

:ip ipadd intf=ModemLink addr=192.168.0.2/24 addroute=enabled

Other pages regarding this router:

<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1 showfirst=1>Category:Router TG582N</ncl>