Score:0

Unable to ping or connect to internet via WLAN

ru flag

Problem statement

Hi . I needed to auto-connect my system to another system via Ethernet so I assigned both these systems respective static IPs. On my host system, I did this by editing the /etc/network/interfaces.d/eth0 as:

auto eth0
iface eth0 inet static
address 10.0.0.1 
netmask 255.0.0.0
gateway 192.168.1.254

Meanwhile the /etc/network/interfaces file sourced this file as

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

This worked as intended. For internet I used WLAN0 but now, when I changed my router hardware, I asked my host system to pair with this new router via nmcli (Headless mode). But now the internet won't work, nor am I able to ping 8.8.8.8 or google.com.


Additional verbose

ifconfig spits out:

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 10.0.0.1  netmask 255.0.0.0  broadcast 192.168.0.255
        ether 00:04:4b:cb:ab:ad  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
        device interrupt 40  

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 1  (Local Loopback)
        RX packets 675  bytes 51512 (51.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 675  bytes 51512 (51.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 1a:af:98:a3:44:39  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

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 1a:af:98:a3:44:3b  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

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::2123:f14d:ba67:f32  prefixlen 64  scopeid 0x20<link>
        ether 0c:54:15:b6:63:9f  txqueuelen 1000  (Ethernet)
        RX packets 92892  bytes 29709877 (29.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1593  bytes 258271 (258.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

route spits:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    0      0        0 eth0
default         _gateway        0.0.0.0         UG    600    0        0 wlan0
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlan0

How can I connect to the internet ?

Score:0
cn flag

eth0 is connected to a network (10.0.0.0/8) which cannot provide a route to the internet so it should not be in your routing table.

Try removing that route, something along the lines of :

    sudo route delete default gw _gateway dev eth0

Update your interfaces to remove the gateway as it is not accessible from the 10.0.0.0 network.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.