Kitz Forum

Broadband Related => Broadband Hardware => Topic started by: Pauljbl on August 15, 2019, 09:54:10 PM

Title: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 15, 2019, 09:54:10 PM
I have a hg612 modem in bridge mode I did telnet in to it and did a if config and it says the ptm interface has a MTU of 1500 is this correct or should it be 1508

I have done ping tests and get fragmented packets over 1492 MTU
I have set the router wan interface to 1508 in the GUI in openwrt
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Alex Atkin UK on August 15, 2019, 10:12:56 PM
It always said 1500 on mine too but somehow it seemed to "just work" on pfSense.

I know it must have worked because when I switched to my current modems I HAD to use the patched firmware to get the same setup to work there.
Title: Re: Help getting MTU 1500 working with openwrt
Post by: d2d4j on August 15, 2019, 10:13:11 PM
Hi

Ask your dsl provider if they support 1500

Given your post it looks unlikely or your pc is not 1500

Many thanks

John
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 15, 2019, 11:03:07 PM
Is there a way to find out if my ISP supports 1500
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Weaver on August 16, 2019, 12:04:24 AM
There is an MTU test for ISPs (IPv4 only iirc, despite what it says) which is excellent but has bugs in it so read the cautionary tale at https://forum.kitz.co.uk/index.php/topic,22654.msg385812.html#msg385812

This test will only report MTU=whatever if everything in the chain supports at least that MTU, so that is switches, router, modem and the isp.

One example of where the isp matters : the old BT20CN network for ADSL when used with PPPoEoA won’t let you do MTU 1500+8=1508, even if all the kit is good. (But would be fine with 21CN ADSL exchanges or with PPPoA on the dsl side. In the latter case, in a separate-modem, two-box setup, you would need a PPPoEoE-to-PPPoA protocol-converting Draytek Vigor 130 modem which presents PPPoA not PPPoEoA on the ADSL side and that doesn’t upset BT and Openreach’s old 20cn kit.) Any ISP who uses BT20CN for ADSL will be restricted by BT’s max MTU of IP 1492+8 = 1500 PPP MTU.
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 16, 2019, 04:14:01 PM
Yes I tried that test and it said I had a MTU of 1492.
Wondered if it is my ISP or something not set right
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Weaver on August 16, 2019, 06:07:50 PM
Remind us of your isp and type of dsl link etc ?
Title: Re: Help getting MTU 1500 working with openwrt
Post by: burakkucat on August 16, 2019, 06:25:56 PM
In an attempt to add some clarity (and, hopefully, not confusing Pauljbl) I'll show exactly what that MTU testing site (http://www.letmecheck.it/mtu-test.php) returns for my circuit. Please note that I, like Weaver, have an ADSL2 circuit, using PPPoA and my provider is TalkTalk.

My MTU is 1500.

Sending 32 bytes to W.X.Y.Z  <-  not fragmented

Sending 750 bytes to W.X.Y.Z  <-  not fragmented

Sending 1125 bytes to W.X.Y.Z  <-  not fragmented

Sending 1313 bytes to W.X.Y.Z  <-  not fragmented

Sending 1407 bytes to W.X.Y.Z  <-  not fragmented

Sending 1454 bytes to W.X.Y.Z  <-  not fragmented

Sending 1478 bytes to W.X.Y.Z  <-  FRAGMENTED!

Sending 1466 bytes to W.X.Y.Z  <-  not fragmented

Sending 1472 bytes to W.X.Y.Z  <-  not fragmented

Sending 1475 bytes to W.X.Y.Z  <-  FRAGMENTED!

Sending 1473 bytes to W.X.Y.Z  <-  FRAGMENTED!

Sending 1472 bytes to W.X.Y.Z  <-  not fragmented

From the tests we did, we can assume that 1472 bytes is the largest unfragmented packet
size. The MTU size would be 1500, made up from 1472 payload and 28 ICMP/IP Headers
and payload information.
The maximum MTU size for W.X.Y.Z is:    1500

NB: The Internet Protocol requires that hosts must be able to process IP datagrams of at least
576 bytes (for IPv4) or 1280 bytes (for IPv6)

Obviously I have globally replaced my IPv4 address with the string "W.X.Y.Z".
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 16, 2019, 06:38:01 PM
My ISP is Vodafone using pppoe
Its vdsl
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Weaver on August 18, 2019, 02:54:27 AM
To our existing druids; does the fact that this is FTTC tell us anything about MTU? I presume not, because MTU could hypothetically be limited further upstream even if it is happily 1500 for IP PDUs, or even a lot more, at the MSAN.

I seem to remember rather a lot higher numbers being mentioned in respect of BT, for L2 various layers’ PDU sizes - the system has to be able to carry Ethernet including maybe two VLAN tags besides, plus yet more protocol bloat not mentioned too. BT I believe, but memory fails, has a healthy amount of room for additional protocol bloat acquired from lower layers on top of IP PDU MTU of 1500, rather more than the bare minimum iirc.

But Vodafone may well be completely different upstream. I don’t know what I’m talking about, but someone here will know.
Title: Re: Help getting MTU 1500 working with openwrt
Post by: j0hn on August 18, 2019, 01:48:23 PM
The HG612 does 1508 without any modifications.
The ifconfig displays 1500 for all interfaces but ignore this.

If you were being limited to 1492 MTU out to the wider internet I can see 2 possible reasons.
Vodafone don't support it, or your Openwrt router needs additional setup to support it.

Some Openwrt routers need multiple interfaces changed to allow this to work.

Which router are you using?
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 18, 2019, 02:30:01 PM
Its a bthomehub 5 with openwrt installed on
I set the wan interface to 1508
Title: Re: Help getting MTU 1500 working with openwrt
Post by: j0hn on August 18, 2019, 04:37:31 PM
https://forum.kitz.co.uk/index.php/topic,23615.msg399210.html#msg399210

Quote
I was able to get 1500 MTU with my previous provider, John Lewis broadband but once I switched over to Vodafone, MTU is being clamped to 1492.

The issue might be a Vodafone limitation, but a few posts on Overclockers suggest 1508 MTU works on Vodafone.

Some Openwrt devices need different MTU's set on different interfaces but AFAIK the BT HH5a just needs 1508 MTU set in the WebUI.

Can you post the output of ifconfig on the HH5a?

What does http://www.letmecheck.it/mtu-test.php show (ipv6 needs disabled)?
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 18, 2019, 05:24:48 PM
--------------------------------------------------
root@OpenWrt:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr A0:1B:29:7A:25:7C
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd6c:ba51:9b48::1/60 Scope:Global
          inet6 addr: fe80::a21b:29ff:fe7a:257c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3879453 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5509018 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:538528287 (513.5 MiB)  TX bytes:6894267979 (6.4 GiB)

eth0      Link encap:Ethernet  HWaddr 0E:94:C6:48:02:CD
          inet6 addr: fe80::c94:c6ff:fe48:2cd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33793865 errors:0 dropped:1 overruns:0 frame:0
          TX packets:30758793 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:664406380 (633.6 MiB)  TX bytes:2826047668 (2.6 GiB)

eth0.1    Link encap:Ethernet  HWaddr A0:1B:29:7A:25:7C
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2751945 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3662798 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:440648104 (420.2 MiB)  TX bytes:4274873858 (3.9 GiB)

eth0.2    Link encap:Ethernet  HWaddr 0E:94:C6:48:02:CD
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::c94:c6ff:fe48:2cd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21648842 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12857135 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:27826648969 (25.9 GiB)  TX bytes:1900631500 (1.7 GiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:32796 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32796 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:2865175 (2.7 MiB)  TX bytes:2865175 (2.7 MiB)

pppoe-wan Link encap:Point-to-Point Protocol
          inet addr:90.246.217.38  P-t-P:212.158.250.41  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:21486887 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12621925 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:27647108310 (25.7 GiB)  TX bytes:1614950661 (1.5 GiB)

wlan0     Link encap:Ethernet  HWaddr A0:1B:29:7A:25:7F
          inet6 addr: fe80::a21b:29ff:fe7a:257f/64 Scope:Link
          inet6 addr: fe80::a21b:29ff:fe7a:257f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1168295 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2392383 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:139132464 (132.6 MiB)  TX bytes:2847828835 (2.6 GiB)
Title: Re: Help getting MTU 1500 working with openwrt
Post by: j0hn on August 18, 2019, 05:46:54 PM
That's set to 1492.
The Eth0 interface needs to be 1508 and pppoe-wan needs to be 1500.

Try following this guide

https://forum.archive.openwrt.org/viewtopic.php?id=51326

Although I don't know if you need to set this part

Quote
Because eth0.1 (lan) and eth0.2 (wan) both inherit eth0's MTU we will want to explicitly set the LAN back to 1500.
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 18, 2019, 06:14:42 PM
Hi
I just tried this but the MTU is still 1492 in the ifconfig
Title: Re: Help getting MTU 1500 working with openwrt
Post by: burakkucat on August 19, 2019, 03:02:19 AM
I seem to remember rather a lot higher numbers being mentioned in respect of BT, for L2 various layers’ PDU sizes - the system has to be able to carry Ethernet including maybe two VLAN tags besides, plus yet more protocol bloat not mentioned too. BT I believe, but memory fails, has a healthy amount of room for additional protocol bloat acquired from lower layers on top of IP PDU MTU of 1500, rather more than the bare minimum iirc.

I suggest that the hardware in use by "BT" (whatever that means) is jumbo frames capable.

I've just taken a quick look at the uplink interface of an Adva FSP150CCf-825 and see "MTU: 9250". If the equipment has jumbo frames ability (and what carrier-class hardware does not have the ability?), it should be used.
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Chrysalis on August 19, 2019, 05:45:46 AM
you need to bump mtu on the modem as well, not just the router.
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 19, 2019, 06:52:35 AM
I am using the hg612 which everyone says is set for 1508 MTU as standard
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Chrysalis on August 19, 2019, 07:18:06 AM
I checked my old thread here and yes when I did this on the hg612 I did leave it alone so didnt need to increase the mtu on it, it was in bridge mode.

https://forum.kitz.co.uk/index.php?topic=12842.0

As far as openwrt is concerned tho there is multiple interfaces as has been stated.

You have the individual ethernet interfaces and also the switch interface.  Both would need bumping I think.  I think someone already suggested this to you.

The bridge interface is likely to be named br-lan.

Also on my link I had to do vlan2 also, which was an extra virtual interface assigned to the WAN connection after pppoe was established, its possible openwrt does something similar.    This extra interface doesnt appear until after you connect so is something you change after internet connectivity is established.

I think its eth0.1 you need to set to MTU 1508 based on your ifconfig output.   After thats done try setting the pppoe interface again to 1500.

So try this in order as I am not convinced the bridge needs any adjustment since the lan bridge is not part of the wan connection..

eth0.1 to 1508 then pppoe-wan to 1500
if that fails then set eth0 also to 1508 and try again after pppoe-wan to 1500.
Title: Re: Help getting MTU 1500 working with openwrt
Post by: johnson on August 19, 2019, 07:48:52 AM
I have not completely given up, but as far as with default OpenWRT on the BT HH5A it will not support 1508 to a modem. I'm sorry for even mentioning it in the thread about OpenWRT devices.  :(

With any of the release builds you can try:
Code: [Select]
ifconfig eth0 mtu 1508

It will fail with : "ifconfig: SIOCSIFMTU: Invalid argument", which means the driver does not support an MTU higher than 1500.

Last night I compiled a version of 18.06.4 for the HH5A with this patch to lantiq_xrx200.c:

Code: [Select]
static int xrx200_change_mtu(struct net_device *dev, int mtu)
{
if (mtu < 68 || mtu > ETH_DATA_LEN + 8)
return -EINVAL;
dev->mtu = mtu;
return 0;
}

static const struct net_device_ops xrx200_netdev_ops = {
.ndo_init = xrx200_init,
.ndo_open = xrx200_open,
.ndo_stop = xrx200_close,
.ndo_start_xmit = xrx200_start_xmit,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = xrx200_change_mtu,

From: https://forum.openwrt.org/t/lantiq-vrx200-pppoe-1500-bytes/4087 (I believe @btsimonh is a user here too)

It compiled without issue and I flashed it to my HH5a, it was now possible to bring up the eth0 interface at 1508 and so a PPPoE connection at 1500. Unfortunately pings with 1472(1500) size then just got lost, no "packet too large" warning, they just fell into a black hole at some point in the chain.

That was as far as I got. Will try again with fresh eyes soon, again apologies for even suggesting the HH5A in the same breath as 1508 compatible modems. It will make a nice wireless AP if you need one?   ;D
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Pauljbl on August 19, 2019, 11:27:54 AM
At least I know its this router that is the problem.
I was planning on getting another router.

Johnson what thinclient or nuc do you use?
Title: Re: Help getting MTU 1500 working with openwrt
Post by: Chrysalis on February 16, 2022, 04:08:25 PM
I have not completely given up, but as far as with default OpenWRT on the BT HH5A it will not support 1508 to a modem. I'm sorry for even mentioning it in the thread about OpenWRT devices.  :(

With any of the release builds you can try:
Code: [Select]
ifconfig eth0 mtu 1508

It will fail with : "ifconfig: SIOCSIFMTU: Invalid argument", which means the driver does not support an MTU higher than 1500.

Last night I compiled a version of 18.06.4 for the HH5A with this patch to lantiq_xrx200.c:

Code: [Select]
static int xrx200_change_mtu(struct net_device *dev, int mtu)
{
if (mtu < 68 || mtu > ETH_DATA_LEN + 8)
return -EINVAL;
dev->mtu = mtu;
return 0;
}

static const struct net_device_ops xrx200_netdev_ops = {
.ndo_init = xrx200_init,
.ndo_open = xrx200_open,
.ndo_stop = xrx200_close,
.ndo_start_xmit = xrx200_start_xmit,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = xrx200_change_mtu,

From: https://forum.openwrt.org/t/lantiq-vrx200-pppoe-1500-bytes/4087 (I believe @btsimonh is a user here too)

It compiled without issue and I flashed it to my HH5a, it was now possible to bring up the eth0 interface at 1508 and so a PPPoE connection at 1500. Unfortunately pings with 1472(1500) size then just got lost, no "packet too large" warning, they just fell into a black hole at some point in the chain.

That was as far as I got. Will try again with fresh eyes soon, again apologies for even suggesting the HH5A in the same breath as 1508 compatible modems. It will make a nice wireless AP if you need one?   ;D


Think I have hit the same roadblock, I believe the solution is using your patched firmware, (if you could do one for 19.07 would be great) combined with a usb ethernet device, so the 1508 can be set on the dsl device, and then its bridged to the usb ethernet device.