IPV6 affecting data usage

Topics related to OpenWRT, LEDE, GoldenOrb, Linux and other firmware
Post Reply
TonyShepherd
Posts: 6
Joined: Tue Jul 09, 2019 7:30 am
Has thanked: 0
Been thanked: 2 times

IPV6 affecting data usage

Post by TonyShepherd » Mon Feb 10, 2020 9:09 am

Current configuration:
WE1326V5- GO2019-04-09, MC7455- Generic Version 02.33.03.00, QMI Mode, IPV6 disabled on modem, Verizon post paid unlimited tablet plan.

I have been fighting hotspot usage since first receiving the equipment in July. Some data would count towards hotspot while other would not. After reaching the 15GB hotspot limit, the speed was throttled to 600Kbs. I tried all of the usual TTL settings with no definite affect.
I use the Status|Firewall screen to check that the TTL setting have taken effect and recently realized that there is also a IPV6 tab and it got me to thinking that if the TTL settings are only for IPV4 maybe IPV6 is affecting how my data is logged. Looking under the Status|Firewall|IPV6 screen at the bottom Table: Mangle section does not show anything for TTL or HL (Hop Limit as it's refereed to under IPV6). I could see I had an IPV6 upstream connection from Status|Overview screen and knew that the desktop used for all of my testing had IPV6 enabled.
I started researching how to set the Hop Limit using IPtables as is done for the TTL in IPV4. What I came up with is very similar to what is used for TTL. For IPV6 the syntax that worked is
ip6tables -t mangle -I POSTROUTING -o wwan0 -j HL --hl-set 64
ip6tables -t mangle -I PREROUTING -i wwan0 -j HL --hl-set 64
and can be inserted in the Network|Firewall|Custom Rules screen as the next to the last line before #endTTL, under the TTL lines. This can be verified effective by looking in the Tables:Mangle section at the bottom of Status|Firewall IPV6 tab after Restart Firewall.

Since my plan has reached the hotspot limit and is throttled to 600Kbs it should be easy to see what makes a difference. Entering the above lines, Restarting Firewall and AT!reset to the modem, a speed test confirmed the speed had jumped from, 600Kbs to over 20Mbs. I noticed that I had also lost the IPV6 upstream connection in Status|Overview so I was not sure if the IP6TABLES had solved the issue or the fact that I no longer had IPV6 and now the traffic was using the TTL values.

Here's what I learned by testing different configurations.
1) GO2019-04-09 in QMI mode- the ip6tables strings cause the ipv6 upstream connection to not connect. This is the only version of GO I have used so no prior history, but based on a comment by Jim Helms ("UPDATE: 01/15/2020 IPV6 in QMI composition is now available via GoldenOrb") in viewtopic.php?f=21&t=233, it appears that ipv6 was previously only possible in MBIM Mode so this may be an issue with the latest version GO in QMI mode.

2) Without the ipv6 connection the TTL setting effects the routed traffic and it is not counted as hotspot.

3) Disabling ipv6 on the desktop has the same effect, regardless of ip6tables use or ipv6 connection, data is not hotspot.

4) Switching to MBIM mode has a different effect. The ipv6tables work as expected. The ipv6 connection is maintained and with ipv6 enabled on the desktop speed is 20Mbs so no hotspot data. 64 worked the best for both TTL or HL, others (63, 65, 117) reverted back to throttled speed. I got mixed results by just clicking Restart Firewall after changing the TTL, HL number. Suggest Reset Modem as well or just disconnect | reconnect router power.

5) Disabling ipv6 on the modem with at!custom="IPV6ENABLE",0 has the same effect since there's no ipv6 connection.

Wondering what most people are doing for their setups? Running older versions of GO in QMI (no ipv6), MBIM with ipv6 disabled on all LAN connected computers, disabling ipv6 on the modem, or something else that I missed in the tutorials I have read. This is the first time in 6 months that I feel I have a usable solution. I don't claim to understand how this all works, but this definitely made a difference in my setup.

User avatar
JimHelms
Site Admin
Posts: 1286
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 76 times
Been thanked: 148 times
Contact:

Re: IPV6 affecting data usage

Post by JimHelms » Mon Feb 10, 2020 1:35 pm

You can try using a IPV4 (only) APN but would need to modify an internal script per this TUTORIAL.

You can also try the following (James Bond) TTL scripts which seem to work well with some carriers in stopping the IPV6 bleed over effect.

Code: Select all

#start 007 TTL
ip6tables -t mangle -A POSTROUTING -o wwan0 -j HL --hl-set 65
iptables -t mangle -I PREROUTING -i wwan0 -j TTL --ttl-set 65
#end 007 TTL

etorr
Posts: 1
Joined: Sun Feb 09, 2020 2:14 pm
Has thanked: 0
Been thanked: 0

Re: IPV6 affecting data usage

Post by etorr » Sun Feb 16, 2020 11:25 am

If i added a custom rule for the ip6tables HL setting I would not get an ipv6 address, but if I entered the command from ssh It worked great. I am running the latest goldenorb and setup ipv6 in QMI mode. I am getting similar speeds on ipv4 and ipv6 speed tests on tmobile.

Code: Select all

ip6tables -t mangle -I POSTROUTING -o wwan0 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING -i wwan0 -j HL --hl-set 65
I made a script to run on startup.

User avatar
BillA
Posts: 852
Joined: Sun Dec 01, 2019 6:46 pm
Location: USA
Has thanked: 132 times
Been thanked: 168 times
Contact:

Re: IPV6 affecting data usage

Post by BillA » Mon Feb 17, 2020 6:44 am

etorr wrote:
Sun Feb 16, 2020 11:25 am
If i added a custom rule for the ip6tables HL setting I would not get an ipv6 address, but if I entered the command from ssh It worked great. I am running the latest goldenorb and setup ipv6 in QMI mode. I am getting similar speeds on ipv4 and ipv6 speed tests on tmobile.

Code: Select all

ip6tables -t mangle -I POSTROUTING -o wwan0 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING -i wwan0 -j HL --hl-set 65
I made a script to run on startup.

First, thanks for the really detailed test report in the initial post, you're definitely on the way to mobile router geekdom. xD
Second, I've noticed you wrote "64 worked the best for both TTL or HL, others (63, 65, 117) reverted back to throttled speed", but then later wrote:
ip6tables -t mangle -I PREROUTING -i wwan0 -j HL --hl-set 65
ip6tables -t mangle -I POSTROUTING -o wwan0 -j HL --hl-set 65
So which TTL value is working for you, 64 or 65 without using hotspot data?

I'm running my router with IPv6 disabled (just not a fan of it) and TTL 65 on Tmobile/SimpleMobile.

TonyShepherd
Posts: 6
Joined: Tue Jul 09, 2019 7:30 am
Has thanked: 0
Been thanked: 2 times

Re: IPV6 affecting data usage

Post by TonyShepherd » Mon Feb 17, 2020 2:16 pm

BillA wrote:
Mon Feb 17, 2020 6:44 am
First, thanks for the really detailed test report in the initial post, you're definitely on the way to mobile router geekdom. xD
Second, I've noticed you wrote "64 worked the best for both TTL or HL, others (63, 65, 117) reverted back to throttled speed", but then later wrote:
ip6tables -t mangle -I PREROUTING -i wwan0 -j HL --hl-set 65
ip6tables -t mangle -I POSTROUTING -o wwan0 -j HL --hl-set 65
So which TTL value is working for you, 64 or 65 without using hotspot data?

I'm running my router with IPv6 disabled (just not a fan of it) and TTL 65 on Tmobile/SimpleMobile.
I do tend to be a little detail oriented (geeky) :geek: in things I do, or at least according to my wife. Bad information is worse than no information. Anyway, yes, 64 worked better for me in all situations. JimHelms and etorr referenced 65 in their posts. I am currently running with IPV6 disabled on the modem with just TTL =64. My account reset so it's more difficult to test what is counted as hotspot, plus it's been working so I haven't spent much time fooling with it.

User avatar
BillA
Posts: 852
Joined: Sun Dec 01, 2019 6:46 pm
Location: USA
Has thanked: 132 times
Been thanked: 168 times
Contact:

Re: IPV6 affecting data usage

Post by BillA » Mon Feb 17, 2020 2:50 pm

TonyShepherd wrote:
Mon Feb 17, 2020 2:16 pm
I do tend to be a little detail oriented (geeky) :geek: in things I do, or at least according to my wife. Bad information is worse than no information. Anyway, yes, 64 worked better for me in all situations. JimHelms and etorr referenced 65 in their posts. I am currently running with IPV6 disabled on the modem with just TTL =64. My account reset so it's more difficult to test what is counted as hotspot, plus it's been working so I haven't spent much time fooling with it.

If you're running on real Tmobile (not one of their re-sellers), then there are a couple of ways to tell if your data is counted as regular phone data or hotspot. with the sim card in phone, dial #DATA# + Call (#3282#), or log into your account online and look at current usage which should break down the regular phone data and hotspot usage separately. After all your hotspot data has been used up, it's easier to tell because either it doesn't work at all or it's slowed down.

Post Reply