LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No Internet Access (https://www.linuxquestions.org/questions/linux-newbie-8/no-internet-access-4175717542/)

rstuff 10-07-2022 11:06 PM

No Internet Access
 
I am unable to connect to the Internet. I am able to access the router through WIFI but I get get the message unable to connect when trying to access a website like Bing.com. I am on a Lenovo laptop G50-45 running MX-19.4. I am using a tp-link archer c8 router. I told the router to use my ISP's DNS's. I cannot ping bing.com or it's IP address. The router shows me the WAN IP address and WAN gateway address. I don't know a lot of linux commands so please be explicit with the instructions. Thank you.

!!! 10-07-2022 11:33 PM

I start with: ip r # default gateway okay=router?

There's many paths your troubleshooting can take, so I would start with this web search:
debian wiki internet not working
And add keywords to narrow down what you find. Let us know!!!

P. S. Tell us more about how you're talking to the router (told [tp-link archer c8] shows). Does it work for any other device like a cellphone?

rstuff 10-08-2022 12:59 AM

Quote:

$ ip r # default gateway okay=router?
default via 192.168.42.129 dev usb0 proto dhcp metric 100
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.100 metric 600
192.168.42.0/24 dev usb0 proto kernel scope link src 192.168.42.34 metric 100
Where is the 192.168.42 subnet coming from?

My laptop can get to the internet when I tether it to my smartphone.

I will try my smartphone connected with wifi through router and post results.

I do have another laptop running Ubuntu with the same problem.

After I started having this problem I tried specifying nameservers in /etc and then the router but it did not help. Where is the best place to specify a DNS? Since I could not ping IP's I doubt a DNS problem.
Thank you for the help.

I will search the Debian problems.

rstuff 10-08-2022 01:08 AM

Powered off modem and router many times.
 
I forgot to mention that I have disconnected power to modem and router many times and tried a different cable between router and modem. I also disconnected the coax to the modem at one time. I also tried plugging an ethernet directly from the modem to my laptop with no luck. I had comcast check out the connection and they did not see a problem. I don't have an extra modem or router.

michaelk 10-08-2022 08:14 AM

Quote:

$ ip r # default gateway okay=router?
default via 192.168.42.129 dev usb0 proto dhcp metric 100
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.100 metric 600
192.168.42.0/24 dev usb0 proto kernel scope link src 192.168.42.34 metric 100
I assume you were tethered to your smartphone when you posted the above? The tether is creating a network over USB between the laptop and the phone. From the above it appears like your laptop is connecting to the router over wireless and has a valid IP address.

I assume your using cable? Typically with a home cable plan your only allowed one device to connect to the MODEM at a time. Whenever you switch devices you need to cycle power on the MODEM. I have found in the past that even though the ISP can access the MODEM that does not mean 100% you do not have a problem on their end. The signal strength may be on the low end. Can you log into the router and see a connection to the ISP? Do you have a valid public IP address?

rstuff 10-08-2022 01:06 PM

I ran the IP command again and got different results so I probably was tethered at the time.

Quote:

$ ip r # default gateway okay=router?
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.100 metric 600
I have attached a screenshot of the routers network page.

I tried pinging the WAN IP's shown on the screenshot and could not reach them from the routers diagnostics or the terminal. Shouldn't I be able to ping them?

Thank you.

michaelk 10-08-2022 01:32 PM

Did your smartphone have access to the internet when connected to your router's wifi?

Post the entire output of the ip r command when connected to the wifi as posted above? I would expect the metric to be something like 100 for both the default route and wlan0

Please remove the screenshot from the last post since it contains your public address just as a precautionary measure since anyone can view it. Whether or not you can ping your router from inside LAN depends on your router. I can ping the address but I can not tell if that is really you or not.

yvesjv 10-08-2022 01:34 PM

Try to traceroute to something like 8.8.8.8

rstuff 10-08-2022 01:41 PM

Phone works through router
 
I was able to connect my phone through wifi to the router and browse the Internet. Good call. I verified it by going to iplocation.com and it showed me the same IP as the router network page. I then tethered my laptop to my phone and went to iplocation.com again and it gave me the same ip address of my router.

michaelk 10-08-2022 01:46 PM

Still need to see the output of ip r when connected to your wifi.

uteck 10-08-2022 02:19 PM

So you can connect your laptop to the router wifi, and can see the router, but no DNS. Your phone can connect to the router wifi and has DNS. Makes me think some interface setting on the laptop is messed up.
Did you make any changes in NetworkManager to the interface?

rstuff 10-08-2022 04:09 PM

Message 6 contains the result of the ip r command without being tethered to the phone. Thank you for your suggestion of using the phone to connect to router.

The result of the traceroute command while being connected to router wifi:

Quote:

$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
connect: Network is unreachable
Results of traceroute while tethered to phone connected to router via wifi:
Quote:

$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 _gateway (192.168.42.129) 0.684 ms 0.847 ms 0.879 ms
2 192.168.1.1 (192.168.1.1) 13.014 ms 12.979 ms 12.934 ms
3 100.93.108.194 (100.93.108.194) 20.798 ms 21.615 ms 22.047 ms
4 96.108.64.117 (96.108.64.117) 21.611 ms 68.85.242.233 (68.85.242.233) 21.431 ms 21.845 ms
5 96.216.60.189 (96.216.60.189) 22.290 ms 96.108.80.178 (96.108.80.178) 21.986 ms 21.987 ms
6 96.216.60.221 (96.216.60.221) 26.891 ms 96.216.60.189 (96.216.60.189) 8.410 ms 96.216.60.221 (96.216.60.221) 13.548 ms
7 be-36211-cs01.seattle.wa.ibone.comcast.net (68.86.93.49) 17.718 ms 96.216.60.221 (96.216.60.221) 14.432 ms 14.740 ms
8 be-2311-pe11.seattle.wa.ibone.comcast.net (96.110.32.234) 17.914 ms be-36221-cs02.seattle.wa.ibone.comcast.net (68.86.93.53) 20.046 ms be-2312-pe12.seattle.wa.ibone.comcast.net (96.110.34.138) 20.881 ms
9 be-2211-pe11.seattle.wa.ibone.comcast.net (96.110.32.230) 19.667 ms be-2101-pe01.seattle.wa.ibone.comcast.net (96.110.39.202) 19.976 ms 19.853 ms
10 50.208.232.246 (50.208.232.246) 22.029 ms 20.782 ms 20.205 ms
11 * * dns.google (8.8.8.8) 17.120 ms
I did try making changes to resolv.conf for the nameservers but they did not stick
and since I can't ping WAN ip addresses I didn't think it was a nameserver but I may be wrong.

Thanks for the suggestion to remove screenshot.

My phone did have access to internet when connected to router wifi.

michaelk 10-08-2022 05:21 PM

https://www.tecmint.com/set-permanen...ubuntu-debian/

This explains a bit how it works in Ubuntu. While mx defaults to sysv init versus systemd, network manager is in control of /etc/resolv.conf. It seems strange that your having similar problems on two operating systems that are not exactly the same. Have you changed anything from default installation?

elgrandeperro 10-08-2022 08:27 PM

Obviously, the router's 192.168.1.1 interface works but when you say "ip route" it should have a via in the default entry. Your default
route is not set or your interface is down. If you are using DHCP, possible it isn't giving you the right gateway.

I don't care about tethered, obivoulsy 192.168.1.1 is working fine.

Try "route -n"
and
"ifconfig"

rstuff 10-09-2022 12:03 AM

Results of route -n and ifconfig
 
Quote:

$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan0
Quote:

$ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 68:f7:28:6d:03:0a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 4192 bytes 333315 (325.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4192 bytes 333315 (325.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6a04:9df5:d977:9362 prefixlen 64 scopeid 0x20<link>
ether 38:b1:db:dd:b8:59 txqueuelen 1000 (Ethernet)
RX packets 9416 bytes 3221519 (3.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 230026
TX packets 3206 bytes 337419 (329.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40
I have made many changes but they were mostly for appearance or taming the toucpad. Nothing that I can think of before losing access to the Internet. After I lost access I tried specifying nameservers to no avail.


All times are GMT -5. The time now is 09:44 AM.