Solved Weird Wifi Problem !! Linux 21.1

Solved issue

l33t7here

New Member
Joined
Apr 10, 2023
Messages
9
Reaction score
1
Credits
87
So My hostel's wifi has firewalls, basically "172.16.57.253" This is default route of it. Randomly it gets changed into 192.168.0.1 and internet goes off.
I tried to fix my bssid,macaddress from network settings as well as i tried to put default routes etc from setting. still facing same problem !!
Only fix is to just forget and reset By network setting.

This bug was not in linux mint 20 :( after updating to 21 it came :(

Any Suggestions or help will be appropriated.

inxi -Fnxxz -> Output
System:
Kernel: 5.15.0-56-generic x86_64 bits: 64 compiler: gcc v: 11.3.0
Desktop: Cinnamon 5.6.5 tk: GTK 3.24.33 wm: muffin dm: LightDM
Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy

CPU:
Info: quad core model: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
bits: 64 type: MT MCP arch: Zen/Zen+ note: check rev: 1 cache: L1: 384 KiB
L2: 2 MiB L3: 4 MiB
Speed (MHz): avg: 1420 high: 2190 min/max: 1400/2100 boost: enabled
cores: 1: 1312 2: 1232 3: 1231 4: 1229 5: 2190 6: 1722 7: 1227 8: 1221
bogomips: 33535
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Network:
Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
vendor: AzureWave driver: ath10k_pci v: kernel pcie: speed: 2.5 GT/s
lanes: 1 bus-ID: 01:00.0 chip-ID: 168c:0042
IF: wlp1s0 state: up mac: <filter>
Bluetooth:
Device-1: IMC Networks type: USB driver: btusb v: 0.8 bus-ID: 3-2.2:7
chip-ID: 13d3:3503
Report: hciconfig ID: hci0 rfk-id: 0 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
 
Last edited:


l33t7here wrote:
My hostel's wifi has firewalls
....
Any Suggestions or help will be appropriated.
Under the heading of "any suggestion", in such situations, if it's possible, for one's independence, it may be more useful to connect online by tethering one's mobile phone. In my own case, a little configuration with wpa_supplicant with details from: https://wiki.debian.org/NetworkConfiguration, provided a private and independent connection online which was usually quite a bit faster than the institution's hardware, not unusually, twice as fast. Keeping the laptop plugged into power helped for extended online work, with the phone connected to the laptop via usb cable, (though wireless is possible too). YMMV.
 
L33t, I don't believe you're explaining the issue clearly enough, or at least I can't tell what the issue is by the question. You mention the hostel has a firewall, then you give an IP address. Then you state default route, then you say it changes and give a standard non-routable subnet router address. You then say you change your MAC address.
Are you saying that the hostel's gateway IP changes from 172.16.57.253 to 192.168.0.1? or that your computer's IP changes 172.16.57.253 to 192.168.0.1? Or is it that your computers default gateway changes 172.16.57.253 to 192.168.0.1? And what causes this change? Does it happen when you start your VPN on your computer?
If the hostel has a firewall, it should be invisible to you and you shouldn't even know it exists, unless they told you about it. From your statement, it sounds like the hostel's wifi address changes and then you can't connect because your computer is looking for the old address. If this is the case, you need to complain to them and tell them to stop screwing around with it.
 
Can you give output of ...

ip ad

and

ip route
 
Are you sure that this problem is related to your computer and not the network itself?

Here is a diagram of our home internet connection, which may be similar to the hostel:
Internet <--> (cable) [cable modem] (Ethernet) <--> [firewall/router] <--> [Ethernet Switch] <<-->> home network

Under normal use, the cable modem is transparent and acts as a "bridge". The firewall/router gets the public IP address for the internet connection.

When they first start after a power failure, the cable modem Ethernet port gives itself an IP address in the 192.168 range. It also operates a DHCP server that provides 192.168 IP addresses to whatever is connected to the Ethernet port. If the cable modem has a status or configuration web page, this is how to see it. Once the cable modem has finished its startup process, it becomes a transparent bridge. The firewall/router gets a new, valid public IP address that the home network shares.

Every once in a while, there is a glitch and our internet connection goes down. When that happens, the cable modem restarts itself and the firewall/router's public IP address jumps to the 192.168 range temporarily as the network starts up.

-> Could something like that be happening on your network? A glitch, a network restart, the 192.168 address, and finally back to normal? ... or are you confident that the problem is somewhere in your system?
 
L33t, I don't believe you're explaining the issue clearly enough, or at least I can't tell what the issue is by the question. You mention the hostel has a firewall, then you give an IP address. Then you state default route, then you say it changes and give a standard non-routable subnet router address. You then say you change your MAC address.
Are you saying that the hostel's gateway IP changes from 172.16.57.253 to 192.168.0.1? or that your computer's IP changes 172.16.57.253 to 192.168.0.1? Or is it that your computers default gateway changes 172.16.57.253 to 192.168.0.1? And what causes this change? Does it happen when you start your VPN on your computer?
If the hostel has a firewall, it should be invisible to you and you shouldn't even know it exists, unless they told you about it. From your statement, it sounds like the hostel's wifi address changes and then you can't connect because your computer is looking for the old address. If this is the case, you need to complain to them and tell them to stop screwing around with it.
Dear @TechnoJunky , I admire that you have shown your confusion on my problem lemme clear it for uh,
After updating to linux 21.1, i was seeing random internet outrage ! after digging more i found that the problem is when sudden change of default route occurs !! There is no power failure not even a slight signal problem etc .
As i have my window device with me too and it works flawless on that device so after checking more depth in my linux machine!

i founded that on sudden change The Default route changes to 192.168.0.1 and due to that my internet goes off.
Even if i reconnect wifi again it wont work, i have to forget and reset whole wifi by network setting !!

i have attached image of my current default route and by this internet works fine ! but at random time it will change to 192.168.0.1 and internet will go off again :(
1681230656539.png
 
Are you sure that this problem is related to your computer and not the network itself?

Here is a diagram of our home internet connection, which may be similar to the hostel:
Internet <--> (cable) [cable modem] (Ethernet) <--> [firewall/router] <--> [Ethernet Switch] <<-->> home network

Under normal use, the cable modem is transparent and acts as a "bridge". The firewall/router gets the public IP address for the internet connection.

When they first start after a power failure, the cable modem Ethernet port gives itself an IP address in the 192.168 range. It also operates a DHCP server that provides 192.168 IP addresses to whatever is connected to the Ethernet port. If the cable modem has a status or configuration web page, this is how to see it. Once the cable modem has finished its startup process, it becomes a transparent bridge. The firewall/router gets a new, valid public IP address that the home network shares.

Every once in a while, there is a glitch and our internet connection goes down. When that happens, the cable modem restarts itself and the firewall/router's public IP address jumps to the 192.168 range temporarily as the network starts up.

-> Could something like that be happening on your network? A glitch, a network restart, the 192.168 address, and finally back to normal? ... or are you confident that the problem is somewhere in your system?
Please check my reply on TechoJunky Comment !!!
 
Can you give output of ...

ip ad

and

ip route
ip ad ->

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether ********* brd ff:ff:ff:ff:ff:ff
inet 172.16.57.187/23 brd 172.16.57.255 scope global dynamic noprefixroute wlp1s0
valid_lft 6657sec preferred_lft 6657sec
inet6 fe80::ab70:960b:c33c:f046/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ip route ->
default via 172.16.57.253 dev wlp1s0 proto dhcp metric 600
169.254.0.0/16 dev wlp1s0 scope link metric 1000
172.16.56.0/23 dev wlp1s0 proto kernel scope link src 172.16.57.187 metric 600
 
Please check my reply on TechoJunky Comment !!!
Okay, I read it and also your reply to @dos2unix above.

It looks like your IP address, mask, and gateway are provided by a DHCP server.

-> I still wonder whether your problem is that your computer is getting a 192.168 address from a DHCP server on the network at DHCP renewal time instead of the expected 172.16.57.187 address.

Could I be wrong about that?
 
Okay, I read it and also your reply to @dos2unix above.

It looks like your IP address, mask, and gateway are provided by a DHCP server.

-> I still wonder whether your problem is that your computer is getting a 192.168 address from a DHCP server on the network at DHCP renewal time instead of the expected 172.16.57.187 address.

Could I be wrong about that?
Only Problem of mine is internet goes off even thought wifi stays connected !!
At same time, other device is able to consume internet from same wifi !!
:(
 
Only Problem of mine is internet goes off even thought wifi stays connected !!
At same time, other device is able to consume internet from same wifi !!
:(
What you describe still matches my hypothesis. You can still be connected to the WiFi and get that 192.168 IP address. That would prevent your laptop from seeing the internet, but it will still be on the WiFi.

The other device continues to work because it has a 172.16 address, which matches the network and allows it to route its packets to the internet. The question is: Why doesn't it get a 192.168 address on rare occasions when it renews its DHCP lease? Luck? Configuration? Something else?

It may be that the hostel has a misconfigured device somewhere, but I wonder whether someone else at the hostel is operating a DHCP server on that same network that gives out 192.168 IP addresses. It may be another hostel (hostile?) guest. They may not realize that they are running a DHCP server, or they may be doing it for immature amusement, or they may be doing something more malicious.

If I were staying at that hostel, I would figure out the DHCP range of the regular network and think about configuring a manual IP address that is unlikely to overlap with the DHCP server's address range (or at the high range of it, if necessary). This is risky because you may induce an IP address collision, but my expectations is that it should work and solve your problem. (IP Address: You choose, based on what you learn; Subnet Mask: 255.255.254.0; Gateway: 172.16.57.253)

(Note: If you try a manual address fix, remember to reconfigure your laptop to use DHCP when you are elsewhere.)

Note:
I hope that I am not jumping to conclusions. Do others believe that I am giving good advice here?
 
default via 172.16.57.253 dev wlp1s0 proto dhcp metric 600
169.254.0.0/16 dev wlp1s0 scope link metric 1000
172.16.56.0/23 dev wlp1s0 proto kernel scope link src 172.16.57.187 metric 600

Usually having two default gateways on the same interface is not a good idea.
You do have a lower metric on the 172.16.56.x so that should help.

Who is managing the dhcp server? It is unusual for them to send two gateways.
I see you have .187 as the IP wlp1s0 and it's also the "src" providing the gateway.
So that part looks OK. I would guess that the .253 on the same subnet should be the
correct gateway.

Which makes me wonder where the 169.254.0.x is coming from?
It couldn't work anyway, it's the wrong subnet and subnet mask for your wifi IP address.

If you disconnect from the wifi, do you still have a default route?
 
In that case, it looks like a config error on your dhcp server.
How did you conclude that there is a misconfigured DHCP server and not an extra "rogue" DHCP server?

I assume that the DHCP server belongs to the hostel, not @l33t7here. They may not be able to get support from the hostel managers.
 
How did you conclude that there is a misconfigured DHCP server and not an extra "rogue" DHCP server?

Usually a dhcp server will only give one IP address per interface. ( I know that's not 100% true, but... )
The dns server is handed out by the same dhcp server. It doesn't have to be ON the dhcp server,
but it has to be given out by the dhcp server.

If there was another dhcp server, the interface IP address would change, ( also likely the subnet ).
If there were two dhcp servers on the same subnet, it would be causing a lot of problems.
If the dhcp server IP isn't changing, then either there's only one dhcp server, or there are two with
the same IP address.
 
I again faced same issue and internet goes off :( , This time i took proper screenshots and logs

Check This :-
ip add -> Output
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether hidden brd ff:ff:ff:ff:ff:ff
inet 192.168.0.182/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp1s0
valid_lft 85942sec preferred_lft 85942sec
inet6 fe80::3f0b:1376:913:7072/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ip route ->
default via 192.168.0.1 dev wlp1s0 proto dhcp metric 20600
192.168.0.0/24 dev wlp1s0 proto kernel scope link src 192.168.0.182 metric 600
 

Attachments

  • Screenshot from 2023-04-13 08-53-01.png
    Screenshot from 2023-04-13 08-53-01.png
    22.4 KB · Views: 136
I am convinced that your laptop gets that erroneous 192.168.x.x IP address from a DHCP server somewhere on the network. If I were staying in that hostel, I would give my laptop a manually assigned IP address, mask, gateway, and DNS server settings.

I would choose the IP address carefully, in my best attempt to avoid an IP address conflict with a legitimate IP address already in use by another device. A crude, simple approach would be to use the "ping" command in the terminal to try a few IP addresses to see if they are in use. Try the adjacent IP addresses, too. If they are all non-responsive to pings, you can probably "borrow" one and assign it manually.

There are sophisticated tools that can scan the network for addresses in use, use "arp" to check for true address conflicts, etc. The simple truth is that if you use a quick ping check to find an IP address that is not in use, you can probably get away with using it and nobody will know or care. Use a manually configured IP address while you are staying at that hostel. It is even better if you choose an IP address that is outside the DHCP server's address range. Try these manual network configuration settings, which is where I would start if I were at your hostel:
  • IP address - Choose something in the range: 172.16.56.1 through 172.16.57.254 (but remember that .253 is the gateway!)
    • See "HINT for Choosing a Manual IP Address", below.
  • Subnet Mask: 255.255.254.0
    • An equivalent setting is "/23"
  • Gateway: 172.16.57.253
  • Broadcast address (not normally needed): 172.16.57.255
  • DNS: 172.16.55.252, 4.2.2.2
    • ... or replace them with your own favorites, like Cloudflare: 1.1.1.1 and/or Google: 8.8.8.8
      • I offer them for no other reason except that they are easy to remember.
      • Some people do not like those companies for personal or political reasons.
HINT for Choosing a Manual IP Address
When choosing a manual IP address on your network, I would look first in the high part of 172.16.57.x to see if anything is there. If those IP addresses appear to be unused, pick an IP address in the high middle part of the range. It would be better if one or two IP addresses on either side of the chosen IP address are "empty" too.
-> Example:
Use ping to check the range from 172.16.57.240 to 172.16.57.249 to see if any are in use. If none are in use, pick one in the middle. Maybe 172.16.47.246 (?), especially if .244 through .248 are also non-responsive to pings. Try that.

You get the idea, I hope.

By the way, the worst-case scenario from a manual IP address configuration is that you have an IP address conflict with another device on the network. Most likely, both devices will display "duplicate IP address" warnings and one or both of the two devices may disable networking until the issue is resolved. If you have an IP address conflict, you know something about an IP address that is in use. Change or disable your conflicting IP address immediately. Learn from your mistake and assign your computer a different manual IP address that is less likely to be in use.

(Note: Some DHCP servers can automatically detect IP address conflicts before they assign IP addresses. The DHCP server at the hostel may be configured to detect and avoid giving out an IP address that you assigned to your computer, even if it falls in the DHCP server's range. It is also possible that it is not configured to detect conflicts.)

RELATED:
Nobody has asked the obvious question:
Does IPv6 work at that hostel? Can you disable IPv4 and work only with IPv6?
 
@sphen Thanks I applied your suggestions and from then its working fine :)
Thank you for letting us know. This kind of positive feedback is very helpful.

Your laptop should continue to work fine with that manual setting until you move on to another place.

IMPORTANT:
-> Remember to reset your laptop back to using DHCP if you use it at a coffee shop or somewhere like that, and also when you move on to the next place.
 

Members online


Latest posts

Top