[SOLVED] Cannot access any IP in the network

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
popescustefanradu

[SOLVED] Cannot access any IP in the network

Post by popescustefanradu »

Situation 1:

My ethernet router is a linksys E3200. It uses DHCP and correctly allocates my ip to this machine. Cannot ping gateway or any other IP in the network.

ip route

Code: Select all

 
default via 192.168.1.1 dev enp2s0  proto static  metric 100 
192.168.1.0/24 dev enp2s0  proto kernel  scope link  src 192.168.1.122  metric 100 
ping 192.168.1.1

Code: Select all

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.122 icmp_seq=1 Destination Host Unreachable
From 192.168.1.122 icmp_seq=2 Destination Host Unreachable
From 192.168.1.122 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3037ms
pipe 3
ip addr

Code: Select all

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: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.122/24 brd 192.168.1.255 scope global dynamic enp2s0
       valid_lft 86313sec preferred_lft 86313sec
    inet6 fd2f:1322:b386:0:9800:c574:9171:df2f/64 scope global temporary dynamic 
       valid_lft 7115sec preferred_lft 3515sec
    inet6 fd2f:1322:b386:0:5918:22d5:52e3:1739/64 scope global mngtmpaddr noprefixroute dynamic 
       valid_lft 7115sec preferred_lft 3515sec
    inet6 fe80::6c52:e419:42cc:a46f/64 scope link 
       valid_lft forever preferred_lft forever
3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 24:0a:64:1d:83:07 brd ff:ff:ff:ff:ff:ff
uname -a

Code: Select all

Linux radu-K95VB 4.13.0-37-generic #42~16.04.1-Ubuntu SMP Wed Mar 7 16:03:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/linuxmint/info | grep REL

Code: Select all

RELEASE=18.3
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_sylvia_cinnamon.php
ls /sys/firmware/efi/

Code: Select all

config_table  efivars  fw_platform_size  fw_vendor  runtime  runtime-map  systab  vars
inxi -N

Code: Select all

Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           Card-2: Qualcomm Atheros AR9485 Wireless Network Adapter driver: ath9k
My setup runs in dual-boot with windows in UEFI mode for both.

I have not altered /etc/resolv.conf

Situation 2:

I booted latest Linux Mint Cinnamon from an USB stick and had same result as above. UEFI mode USB using rufus.


Please help me fix my issue, thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gm10

Re: Cannot access any IP in the network

Post by gm10 »

That's a router issue, not a Linux issue. Check the firewall function in the router admin mask.
popescustefanradu

Re: Cannot access any IP in the network

Post by popescustefanradu »

My ubuntu server 18.04 LTE doesn't seem to have this firewall problem and is configured just the same, please explain. Also the DHCP does correctly detect my PC and allocates an IP for it. I have tested with windows and linux from this same machine. If i remove the DHCP from the list and go on windows it uses the windows machine name when I log into windows, then close the PC, remove the name + ip + mac from the DHCP list. Start linux, check DHCP list, now it has the linux name. Close pc, open as windows, connection still working on same IP.

From this I would assume that it's something specific with this PC and having to do with both LM 18 and 19.
gm10

Re: Cannot access any IP in the network

Post by gm10 »

Oh, so it's a dual boot and the Windows install can ping? Fair enough. Can you ping localhost at least from within LM? And do you have Internet connectivity? Might be something wrong with the driver for your network card. But I'm just grasping at straws, I can't say I've ever run into this issue before.
popescustefanradu

Re: Cannot access any IP in the network

Post by popescustefanradu »

Yes, I can ping localhost. I have internet connectivity through wifi but I need ethernet, I'm rather far from the wi-fi modem. Yeah, I'm thinking of switching to some different driver. r8169 -> r8168, will do a restart now and hope that what I did changed the driver.

Edit: I was unable to change the driver by using ``sudo apt-get install r8168-dkms`` and blacklisting r8169
gm10

Re: Cannot access any IP in the network

Post by gm10 »

No, I was wondering if you had Internet connectivity via ethernet or if it was only ICMP getting blocked (since DHCP obviously was going through). But I guess the answer is no.

I had another idea though looking at your ip addr output. Try disabling IPv6 (set it to ignore).
popescustefanradu

Re: Cannot access any IP in the network

Post by popescustefanradu »

Code: Select all

$ ip addr
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
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.122/24 brd 192.168.1.255 scope global dynamic enp2s0
       valid_lft 86395sec preferred_lft 86395sec
3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 24:0a:64:1d:83:07 brd ff:ff:ff:ff:ff:ff
Same result.

Also, ICMP is not the only thing that doesn't reach its destination. ICMP is not blocked, I left it open.
gm10

Re: Cannot access any IP in the network

Post by gm10 »

Kinda out of ideas here. Maybe boot into Windows and see what address and gateway gets configured there, maybe it's a difference. Or disable DHCP and set it up manually. Sorry I can't be of more help. I do hope you find a solution though because I'd really like to know what the problem was.
popescustefanradu

Re: Cannot access any IP in the network

Post by popescustefanradu »

Forcing an IP from the OS in the range of the DHCP IPs will get refused by the router, I tested that prior when I set up my Ubunutu server. At most I can get an IP and then lock it to a MAC address from the router. I don't want to disable DHCP either.
gm10

Re: Cannot access any IP in the network

Post by gm10 »

popescustefanradu wrote: Sat Jul 14, 2018 5:43 pm Forcing an IP from the OS in the range of the DHCP IPs will get refused by the router, I tested that prior when I set up my Ubunutu server. At most I can get an IP and then lock it to a MAC address from the router. I don't want to disable DHCP either.
Oh, now that you mention MAC address, how about this fake MAC for your Ethernet being the problem, hadn't noticed that one before:

Code: Select all

2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
Maybe your router is blocking that or you're using the same fake MAC on another device on the same network.

PS: And if you didn't fake it but the driver is messing that up, you can configure your own in the connection settings under "Cloned MAC address".
popescustefanradu

Re: Cannot access any IP in the network

Post by popescustefanradu »

Code: Select all

$ sudo ip link set enp2s0 address 24:0A:64:1D:83:07

Code: Select all

$ ip link ls enp2s0
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 24:0a:64:1d:83:07 brd ff:ff:ff:ff:ff:ff
It wasn't fake. Also should I fix that ``ff:ff:ff:ff:ff:ff`` as well? I went to the router and copied my MAC from the DHCP table. Also, yes now I have a connection, apparently, hurray.


Edit: funnily enough windows connects me correctly with the same wrong MAC Image
gm10

Re: Cannot access any IP in the network

Post by gm10 »

popescustefanradu wrote: Sat Jul 14, 2018 6:13 pmIt wasn't fake. Also should I fix that ``ff:ff:ff:ff:ff:ff`` as well? I went to the router and copied my MAC from the DHCP table. Also, yes now I have a connection, apparently, hurray.


Edit: funnily enough windows connects me correctly with the same wrong MAC
Fake as in not the hardware MAC, that 00:11: etc. was clearly a placeholder. And no, leave the ff part alone, that's correct. Windows being much more forgiving in that regard isn't all that surprising.

Anyway, glad we got you all fixed up. I honest should have seen this right away but I completely skipped over it. I'll blame the time, it's late here. ;)
popescustefanradu

Re: [SOLVED] Cannot access any IP in the network

Post by popescustefanradu »

Thanks so much for your help. I need to pick up that networking book ASAP.
Locked

Return to “Networking”