OpenWrt Forum Archive

Topic: Configuring OpenWrt for a RFC 4638 connection.

The content of this topic has been archived on 1 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

With the recent upgrade of OpenWrt's PPP to 2.4.6 it's now possible to configure many routers (those that support at least baby jumbo frames of 1508) to connect over PPPoE using RFC 4638.

Here's how i configured my TP-Link WDR4900:

First the underlying ethernet interface needs to have it's MTU set to 1508.  Because the WDR4900 uses a switch and vlans instead of dedicated interfaces for WAN and LAN the whole interface needs to be bumped up.

Add a new section in /etc/config/network:

config interface 'eth0'
    option ifname 'eth0'
    option mtu '1508'

Because eth0.1 (lan) and eth0.2 (wan) both inherit eth0's MTU we will want to explicitly set the LAN back to 1500.

In /etc/config/network:

config interface 'lan'
    option ifname 'eth0.1'
    ...
    option mtu '1500'

We also need to modify the wan section that will be used for the PPPoE connection.

In /etc/config/network:

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'pppoe'
    ...
    option mtu '1508'
    option pppd_options 'debug' # optional 

The pppd_options 'debug' line is only needed if you want to log the negotiated MTU and make sure all is working.

Now run

/etc/init.d/network restart

You're up and running.

$ ping -D -s 1472 www.dslreports.com
PING www.dslreports.com (64.91.255.98): 1472 data bytes
1480 bytes from 64.91.255.98: icmp_seq=0 ttl=47 time=122.827 ms
1480 bytes from 64.91.255.98: icmp_seq=1 ttl=47 time=123.011 ms
1480 bytes from 64.91.255.98: icmp_seq=2 ttl=47 time=122.368 ms
1480 bytes from 64.91.255.98: icmp_seq=3 ttl=47 time=122.715 ms
1480 bytes from 64.91.255.98: icmp_seq=4 ttl=47 time=122.640 ms

where previously

$ ping -D -s 1472 www.dslreports.com
PING www.dslreports.com (64.91.255.98): 1472 data bytes
556 bytes from router.lan.example.com (172.20.0.1): frag needed and DF set (MTU 1492)
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
 4  5  00 dc05 0c69   0 0000  40  01 3cb3 172.20.0.51  64.91.255.98

From the debug log:

daemon.debug pppd[14889]: Send PPPOE Discovery V1T1 PADI session 0x0 length 18
daemon.debug pppd[14889]:  dst ff:ff:ff:ff:ff:ff  src a0:f3:c1:fa:c3:67
daemon.debug pppd[14889]:  [service-name] [host-uniq  00 00 3a 29] [PPP-max-payload  05 dc]
daemon.debug pppd[14889]: Recv PPPOE Discovery V1T1 PADO session 0x0 length 51
daemon.debug pppd[14889]:  dst a0:f3:c1:fa:c3:67  src 00:30:88:00:00:0b
daemon.debug pppd[14889]:  [host-uniq  00 00 3a 29] [PPP-max-payload  05 dc] [AC-name bras-red6.gi-b-B2014010600398] [service-name]
daemon.debug pppd[14889]: Send PPPOE Discovery V1T1 PADR session 0x0 length 18
daemon.debug pppd[14889]:  dst 00:30:88:00:00:0b  src a0:f3:c1:fa:c3:67
daemon.debug pppd[14889]:  [service-name] [host-uniq  00 00 3a 29] [PPP-max-payload  05 dc]
daemon.debug pppd[14889]: Recv PPPOE Discovery V1T1 PADS session 0x484 length 51
daemon.debug pppd[14889]:  dst a0:f3:c1:fa:c3:67  src 00:30:88:00:00:0b
daemon.debug pppd[14889]:  [service-name] [host-uniq  00 00 3a 29] [PPP-max-payload  05 dc] [AC-name bras-red6.gi-b-B2014010600398]
daemon.debug pppd[14889]: PADS: Service-Name: ''
daemon.info pppd[14889]: PPP session is 1156
daemon.warn pppd[14889]: Connected to 00:30:88:00:00:0b via interface eth0.2
daemon.debug pppd[14889]: using channel 3
daemon.info pppd[14889]: Using interface pppoe-wan
daemon.notice pppd[14889]: Connect: pppoe-wan <--> eth0.2
daemon.debug pppd[14889]: sent [LCP ConfReq id=0x1 <magic 0x470e5573>]
daemon.debug pppd[14889]: rcvd [LCP ConfReq id=0xb8 <mru 1500> <auth chap MD5> <magic 0x5187bac0>]
daemon.debug pppd[14889]: sent [LCP ConfAck id=0xb8 <mru 1500> <auth chap MD5> <magic 0x5187bac0>]
daemon.debug pppd[14889]: rcvd [LCP ConfAck id=0x1 <magic 0x470e5573>]
daemon.debug pppd[14889]: sent [LCP EchoReq id=0x0 magic=0x470e5573]
daemon.debug pppd[14889]: rcvd [CHAP Challenge id=0x1 <25e39f2218874fd3dba9df44f9095c9a>, name = "bras-red6.gi-b"]
daemon.debug pppd[14889]: sent [CHAP Response id=0x1 <efba3c4200b06e50b65363057df7d37e>, name = "05555555555-vivaciti@surfdsluk"]
daemon.debug pppd[14889]: rcvd [LCP EchoRep id=0x0 magic=0x5187bac0]
daemon.debug pppd[14889]: rcvd [CHAP Success id=0x1 ""]

You can see the PPP-max-payload tag being sent and received and a 1500 MTU being correctly negotiated.

Hopefully this will eventually get some logic built into OpenWRT so that it's unnecessary for this to be manually configured but, for now, UK (and European) FTTC/FTTP users rejoice; we've now got support for RFC 4638 without having to patch!

For any devs reading, bug #14528 can be closed.

Thanks for the guide, I have successfully done this with a TP-Link WDR3600 and a ping packet size of 1472 is working.

I have noticed one quirk - it appears that the mtu 1500 on eth0.1 isn't being applied.

ifconfig displays the following mtu sizes:

br-lan: 1500
eth0: 1508
eth0.1: 1508
eth0.2: 1508
pppoe-wan: 1500

I don't know if it matters at all, but I'm able to set eth0.1 back to 1500 after connecting with:

ifconfig eth0.1 mtu 1500

It's great that its finally possible to do this without patching, at least for the switches that use ethernet driver ag71xx.
I imagine there are other ethernet drivers out there that have not yet been patched to support baby jumbo packets.

(Last edited by Charles_Brown on 29 Jun 2014, 19:18)

You shouldn't need to do the ifconfig.  By default OpenWrt bridges the wired and wireless LANs into a single interface called "br-lan" and, from your output, it's being correctly set to 1500.

I don't usually run with bridged wired and wireless but thinking about it you probably don't even need to explicitly set the lan interface to 1500.  When bridging the wired and wireless i expect "br-lan" will be created with a 1500 MTU.

So you probably only need to modify the "eth0" and "wan" interfaces.

Forget everything i posted, it's completely unnecessary!

All you need to do is go to Interfaces/WAN/Advanced Settings in LuCI and set the "Override MTU" setting to 1508.  OpenWrt is smart enough to do the right thing with all the interfaces when it brings up the network.

Trust me to overcomplicate things. ^_^

If I do just that, a lower MTU of 1492 is negotiated (no 'PPP-max-payload' in the log).

On my set up, I have to specify eth0 1508 _and_ eth0.2 1508 to get a 1500 MTU connection.

What trunk version are you on?

TP Link WDR3600
r41264

You're right.  Ignore my "correction".

I just moved ISPs this morning and after reconfiguring the network it was still correctly negotiating a 1500 MTU.  But it must have been that eth0 had retained the old 1508 MTU over a network restart.  A reboot exhibited the same problem with PPP being forced down to 1492.

TP Link WDR4900
r41360

Thx! Works perfectly from UAE's etisalat(ISP) GPON internet. Using Tplink WR1043ND & Barrierbreaker.

Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]:  [service-name] [AC-name DXB-ABH-AL301] [host-uniq  00 00 10 76] [AC-cookie  dd 42 05 06 40 93 f1 8a 38 d7 ab ed 7a 9a 07 15] [PPP-max-payload  05 dc]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: Send PPPOE Discovery V1T1 PADR session 0x0 length 38
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]:  dst 00:00:5e:00:01:08  src f8:1a:67:56:3b:92
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]:  [service-name] [host-uniq  00 00 10 76] [PPP-max-payload  05 dc] [AC-cookie  dd 42 05 06 40 93 f1 8a 38 d7 ab ed 7a 9a 07 15]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: Recv PPPOE Discovery V1T1 PADS session 0x1 length 18
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]:  dst f8:1a:67:56:3b:92  src 00:00:5e:00:01:08
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]:  [service-name] [host-uniq  00 00 10 76] [PPP-max-payload  05 dc]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: PADS: Service-Name: ''
Mon Feb  2 07:56:23 2015 daemon.info pppd[4214]: PPP session is 1
Mon Feb  2 07:56:23 2015 daemon.warn pppd[4214]: Connected to 00:00:5e:00:01:08 via interface eth0.2
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: using channel 2
Mon Feb  2 07:56:23 2015 daemon.info pppd[4214]: Using interface pppoe-wan
Mon Feb  2 07:56:23 2015 daemon.notice pppd[4214]: Connect: pppoe-wan <--> eth0.2
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: sent [LCP ConfReq id=0x1 <magic 0xcfe00f6a>]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: rcvd [LCP ConfReq id=0x1d <mru 1500> <auth pap> <magic 0x30d82678>]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: sent [LCP ConfAck id=0x1d <mru 1500> <auth pap> <magic 0x30d82678>]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: rcvd [LCP ConfAck id=0x1 <magic 0xcfe00f6a>]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: sent [LCP EchoReq id=0x0 magic=0xcfe00f6a]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: sent [PAP AuthReq id=0x1 user="xxxxxx" password=<hidden>]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: rcvd [LCP EchoRep id=0x0 magic=0x30d82678]
Mon Feb  2 07:56:23 2015 daemon.debug pppd[4214]: rcvd [PAP AuthAck id=0x1 "Login ok"]
ping -f -l 1472 8.8.8.8

Pinging 8.8.8.8 with 1472 bytes of data:
Reply from 8.8.8.8: bytes=1472 time=111ms TTL=49
Reply from 8.8.8.8: bytes=1472 time=112ms TTL=49
Reply from 8.8.8.8: bytes=1472 time=111ms TTL=49
Reply from 8.8.8.8: bytes=1472 time=112ms TTL=49

My modem is a Zhone ZNID-GE-2424 gpon modem.

(Last edited by dhowpirate on 4 Feb 2015, 19:28)

This does not seem to be working for me: even if I see the "[PPP-max-payload  05 dc]" messages, then comes a "sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x18860409>]" message, and the WAN interface has a MTU of 1492 bytes; I guess my provider does not support this feature.

In this situation, do you think it makes sense to lower the MTU of the internal LAN to 1492, to avoid fragmentation? Thanks!

The discussion might have continued from here.