How to change MTU permanently? - Xiaomi Redmi Note 5 / 5 Plus Questions & Answers

Hi everyone.
I'm trying to bypass my ISPs throttling with changing MTU. If I connect the cellular network with changed MTU, I can bypass (For example, each month first 300MB is very fast but after that my internet speed generally 128 Kbps even though my data plan is unlimited. And there is no law about this throttling, I told problem to customer service then I complained my problem to other authorities, still no result). But I can't change my MTU before connect the cellular network, the interface of cellular network can't seen. I used that command when cellular data on in Terminal Emulator app with superuser privileges:
Code:
ifconfig rmnet_data0 mtu 8511
I tried an app for changing MTU, too. On reboot or disconnect from cellular network, MTU 1500 again. So I need change MTU permanently. I googled and really struggled but no result. I'm thinking that a file that storing default MTU info of all interfaces. Sorry for my bad english. I need help
Device: Redmi 5 Plus 4/64 Global
ROM: MIUI Global 10.2.3 Stable with Magisk and OrangeFox Recovery R9.0

Maybe I should write this under general android development

Related

Barnacle Wifi Tether

Hey I found this on Modaco, I tried it out, and everything works great. Hopefully no one else has posted this as a thread, if so sorry! Here is the link ----> http://goo.gl/JV7W
Baranacle Wifi Settings:
1. Change SSID - [User Preference]
2. Change Channel - 6
3. Custom Wifi Ad-hoc - NONE
4. Skip wpa_supplicant - CHECK
5. Restart Phone As Desired
Settings For Windows:
Open cmd.exe as administrator
C:\Windows\system32>netsh interface ipv4 set subinterface "Wireless Network Connection" mtu=1250 store=persistent
This is assuming your wireless network adapter is called "Wireless Network Connection"
Fix For Mac:
System Preferences>Network>
Under Airport select advanced>ethernet tab
Set Configure to Custom and use 1250 MTU
I did NOT figure this out, just found on Modaco.
Good find! I'll test it out when I hit home!
P.S. I actually loaded webpages, so unlike googles wifitether where it shows it works, this actually does.
Those instructions along with this morning's Barnacle update and I am fully online now.
Worked perfectly on my mac! Thanks again!
This was posted a day or two ago but it's buried deep in a thread somewhere. I tried the settings and they work for Edge but not 3G. I tried it today with an iTouch and it connected but when I tried to surf around it disconnected. :-/
I might need to play around with it again (with the new Barnacle update) if people are having good luck.
works great, thanks!
This did not work for my Vibrant trying to connect wifi to my Toshiba NB 205. Message "NAT restart Message too long" repeats every few seconds.
Pneumatic said:
This was posted a day or two ago but it's buried deep in a thread somewhere. I tried the settings and they work for Edge but not 3G. I tried it today with an iTouch and it connected but when I tried to surf around it disconnected. :-/
I might need to play around with it again (with the new Barnacle update) if people are having good luck.
Click to expand...
Click to collapse
Worked great when I was using it with 3G, must have been the new update?
Halieus said:
This did not work for my Vibrant trying to connect wifi to my Toshiba NB 205. Message "NAT restart Message too long" repeats every few seconds.
Click to expand...
Click to collapse
did you get that fixed?
I am seeing the NAT restart message as well.
neema said:
I am seeing the NAT restart message as well.
Click to expand...
Click to collapse
To fix the NAT errors, you need to set your computer to use MTU of 1250. This is supposed to be fixed in the next release of Barnacle. But for now, if you make this change, it will work. See the first post in this thread for instructions. I use a Mac, but setting the MTU in System Prefs wouldn't stick for me. But this command worked:
sudo ifconfig en1 mtu 1250
I noticed that I keep getting the NAT restart error on my ipod touch but I am able to continue browsing the internet. Anyone tried this with success as well or possibly tried this with an iPad?
RaistlinMajere said:
To fix the NAT errors, you need to set your computer to use MTU of 1250. This is supposed to be fixed in the next release of Barnacle.
Click to expand...
Click to collapse
Thanks, I will have to wait for the release, I do not have the ability to adjust MTU settings on the device I want to connect. I assume it is the normal 1400 and does not support changing it.
They just posted an update in the market. It seems to work, but I haven't tried to surf yet. I will try when I get home.
I can confirm that Barnacle is working as a wifi tether on a rooted Vibrant.
I am using Ubuntu. I did have to set MTU for wlan0 (my laptops wireless device name, yours may vary) to 1250.
In Ubuntu you can change this (gui way):
System -> Administration -> Network Tools
Then:
Wireless -> (Your Vibrants SSID) Click Edit
Set MTU to 1250 instead of automatic
Or the command line way:
ifconfig wlan0 mtu 1250
The command line way is for the device! In this case I recommend the gui way (first time ever)
Did a speed test: 1.01 Down .33 Up Ping: 128ms (A little lower than I am used to being tethered, but it works and that's all I need)
Can confirm the current version in the market works *IF* you set your MTU to 1200 in windows, to do this w/ Windows 7:
(From an elevated command prompt):
Code:
netsh interface ipv4 set subinterface "Wireless Network Connection" mtu=1200 store=persistent
Just did a speedtest while tethered, 3.58mb/s down, 1.28mb/s up w/ 105ms ping!
It's not working with the iPad using 3G. I can still connect using Edge but it's really slow.
Still waiting for a total fix.
I get the "NAT restart" error when I'm on 3G but it works fine one EDGE
New version just went live in the Market.

[Q] How can I change the mtu setting?

I need to change it to 1400, but after endless searches I have no clue. Is there any way to change the mtu settings and what is the default mtu setting for the vibrant (is it 1500?).
I found this thread, but it deals with windows mobile phones.
I need to do this because many downloads time out and need to reconnect.
Not sure you I understand the need but here is a basic description:
If things are working correctly MTU is "discovered" when the session is initiated.
MTU can change anyplace in the path. There is so much equipment there is no way to know for sure.
The one place that MTU size has a large impact is when the do not fragment flag is set. Normally a device that cannot pass it will return a messages via ICMP that says fragmentation required but the flag is set and drop the packet. The client then resends it with a smaller MTU. When a firewall blocks this message (some people do not know ICMP is not always ping) you get very strange and hard to debug issues.
Packet fragmentation used to be a much larger issue. Depends what device is doing the reassembly of the packet. PCs now days have plenty of power and so do most routers and firewalls.
There is also the issue of extra overhead for the tcp header on the fragments but bandwidth is huge so that also makes little difference.
The only MTU settings that make a large performance difference is when you can run jumbo frames but this is limited to equipment that can support this.
I think the timeouts may be a result of tower traffic kick off and slow transfer rate, and changing the MTU probably won't make a difference unless you are trying to connect to a specific site.
Hope that helps...
when I tether my phone to my pc, I had trouble d/l files because they would time out and the tether connection would be dropped as a result
After changing the mtu for this connection on my pc from the default of 1500 down to a lower value, the files downloaded properly and there was no dropping of connection.
Now when I download directly from my phone (no tethering), the same thing happens where the downloads time out. I'm wondering if there is a similar process where I could change the mtu settings on my phone like I did on my pc so that it only accepts a certain size of packets plus header instead of the default which I think is 1500.

[Q] Photon 4g vs college bandwidth limit.

Greetings,
First and foremost I stay in a dorm and I recently discovered that after so much use my college will limit my bandwidth. When I connect to their wifi I start with speeds of 54 mbps which drops to 6 mbps. I have no 4G access on campus and I've tried several methods to circumvent this bandwidth limit.
I've changed my Mac address and android_id in hopes that when I register my device it'll appear as a new device that won't be limited. This has failed every time. Am I missing another parameter that I don't know about? After researching, should I change my internal ip?
Objective: To make my device appear as a completely different device in attempt to circumvent a bandwidth limit placed on my phone.
I have root access + busybox. I use hex editor to change my mac address and android id changer v1.5 to change my android_id.
Anyone have any idea of what I can do?

Android Tethering: APN config restrictions? or another issue?

phone: Android 7.1.2 (Xiaomi Note 5a)
got a huge 100 Go data plan (in France)
provider's policy: "tethering is allowed, but no support is given."
phone allows tethering as well — no disabled fields
I thought: configuring the Personal Hotspot and way to go!
well, connecting by wifi to the phone went smooth ... but no internet on the laptop.
whilst data is fully functional on the android 7 phone, tethering activated (wifi/hotspot, bluetooth tethering and USB-tethering, tried all three possibilities), always same effect on the laptop: I got an IP-address and all, but still NO INTERNET.
no idea why.
first tried APN settings. adding default,dun to APN type.
that didn't change a thing.
then tried to set the global tether_dun_apn using adb.
ugg:/ $ settings put global tether_dun_required 0
with this answer:
"Error while accessing settings provider
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS"
now i'm totally stuck.
anyone?
stackv said:
phone: Android 7.1.2 (Xiaomi Note 5a)
Click to expand...
Click to collapse
last attempt.
dual sim phone, right?
switched the sim from slot#1 to slot#2 and tethering suddenly works !??!!
one issue remains: I cannot see the speed of the connection on the phone.
tethering seems to use a different "channel"?
so also the data limits on the phone aren't functioning the way they should
any hint?

Question Bypassing hotspot/tethering throttle speed on n200 5g

Got a free n200 through tmobile to use as a hotspot device for my pc. I was previously getting the job done by using a galaxy note 3 and setting my pc's ttl to 65 but apparently that doesn't work with the newer phones.
I did some searching online and haven't been able to get a definitive solution to bypassing the hotspot throttle, as people seem to have varying results.
Had a lot of issues with PDAnet+, so it's definitely not a long-term solution for me.
Just sent an unlock request to OnePlus, hopefully by next week I'll get the unlock file and I'll root the phone. I'm assuming that rooting the phone will expand my options for what I want to do. Anyone have a solution that worked for them?
Yo, it's like dns hijacking, in fact, this is what you have to do to bypass this.
I'll paint a scenario, see what you make of it...
I plug my sim into a wifi router, in the control panel of this router, I set the wifi to use the 2nd ip, (yes, all isp's actually give you 2 ip's, one that is public, one the isp use's to spy on you, and the one you see in your ethernet card, usually 192.168.1.1.
Your wifi router runs adb, so it is on a different network, being 192.168.0.1, if you set your connecting device to your public ip shown by the router, and nxbogus domain your isp's private number seen in the router, (usually 100.whatever) and their dns, then set your prefered dns in the connecting device, you will bypass the throttling, but you will notice something else...
They throttle you by lowering your phones coverage lol...
Notice in your wifi setup pages your signal will drop from say 75% to 25%, and if you check the config logs, you'll see your limited 90% by the isp..
Yup, I'm isp level in this department..
didn't understand half of what you said. can you break it down a lil bit more?
l0csta said:
Got a free n200 through tmobile to use as a hotspot device for my pc. I was previously getting the job done by using a galaxy note 3 and setting my pc's ttl to 65 but apparently that doesn't work with the newer phones.
I did some searching online and haven't been able to get a definitive solution to bypassing the hotspot throttle, as people seem to have varying results.
Had a lot of issues with PDAnet+, so it's definitely not a long-term solution for me.
Just sent an unlock request to OnePlus, hopefully by next week I'll get the unlock file and I'll root the phone. I'm assuming that rooting the phone will expand my options for what I want to do. Anyone have a solution that worked for them?
Click to expand...
Click to collapse
you could always use this classic app been around for yrs its called pdanet/Foxfi........ http://foxfi.com/
PopCaps1996 said:
you could always use this classic app been around for yrs its called pdanet/Foxfi........ http://foxfi.com/
Click to expand...
Click to collapse
yea i'm using easytether rn, very similar to foxfi and pdanet+... not a permanent solution however, as it tends to randomly disconnect and i often get kicked out of games due to "network lag". Speeds are exponentially faster than the throttled hotspot, however, so i wont complain.
still, would be nice if there was a solution to this for the native hotspot/tether features... tried everything with apns and changing the ttl on the phone but it didn't work.
looks like someone found a solution for the moto g 5g here, maybe i'll try to implement this for the n200, could be a possible workaround.
l0csta said:
yea i'm using easytether rn, very similar to foxfi and pdanet+... not a permanent solution however, as it tends to randomly disconnect and i often get kicked out of games due to "network lag". Speeds are exponentially faster than the throttled hotspot, however, so i wont complain.
still, would be nice if there was a solution to this for the native hotspot/tether features... tried everything with apns and changing the ttl on the phone but it didn't work.
looks like someone found a solution for the moto g 5g here, maybe i'll try to implement this for the n200, could be a possible workaround.
Click to expand...
Click to collapse
moto g solution you posted requires a special kernel. usb tethering through PDAnet+ paid version works fine, the key is you dont enable it thru the native tethering, instead enable USB tethering through the PDAnet app and leave the phone on charging mode so it can make a ADB connection. Make sure ADB is working and you can establish a working adb connection from PC to phone first prior to attempting to tether since it will use ADB. i get full speeds tethering using the paid version.
AiM2LeaRn said:
moto g solution you posted requires a special kernel. usb tethering through PDAnet+ paid version works fine, the key is you dont enable it thru the native tethering, instead enable USB tethering through the PDAnet app and leave the phone on charging mode so it can make a ADB connection. Make sure ADB is working and you can establish a working adb connection from PC to phone first prior to attempting to tether since it will use ADB. i get full speeds tethering using the paid version.
Click to expand...
Click to collapse
yeah i've been doing this via easy tether, gets the job done for the most part
For me, PDAnet has low throughput while EasyTether runs full speed and can be used with OpenWRT. They both disconnect randomly though.
No reason to deal with that if you have root. AdGuard+VPNHotspot+noprovisioning is easy to setup and works fine for most networks.
l0csta said:
didn't understand half of what you said. can you break it down a lil bit more?
Click to expand...
Click to collapse
Only connection is WAN to WAN!
Ok, first, I use an lte wifi router, enter gui, goto lan, change router login ip to any ip not 192.168.1.1 or 192.168.0.1, the latter is hidden in router, but when trying to connect 2nd router, using this ip, problems appear, because the 1st router has adb enabled due to the lte section of 1st router being android 6, and uses's it.
So in effect, I set 1st routers address to 192.168.1.5, 255.255.254.0, 192.168.1.3 ie, this is 1st router login address. In the 2nd router I set mac address of 1st router to use 192.168.1.3, having been set in the 1st.
I do this because if I set 2nd router to match 1st routers address, the 2nd router auto changes address, when plugged in to first, and the 1st router changes too.
So now that you can goto 192.168.1.1 in 2nd router with 1st plugged in, try 192.168.1.3.
First part over, now the tricky part...
Disconnect 2nd router (this Will become your MAIN router)
Start 1st router with sim in, only to obtain public ip, because you need to set this ip in WAN of 2nd router. If your ip changes every reboot, you need to check public ip from first router match's what you set the wan ip to in 2nd router.
Now when you are in 1st router's network/lan settings, look for option to use 2nd ip. enable it, in the ip box put your public ip, ie your internet ip, and remove all access to anything else, including disabling wifi, both 2.5 and 5g.
So now plug in 2nd router WAN to first routers WAN.
Go into 2nd router, and block the PRIVATE ip seen in 1st router, the ip the isp shows you, and NX=bogusdomain your isp's private dns
In your WAN page of 2nd router, set preferred dns.
Voila.
70-80% increase in response.
The hardware method to block dns hijacking
Ps any reboot of the first router will change its ip due to being lte, so remember to check 2nd router match's after any power outage...

Categories

Resources