I connect to wifi and ifconfig
report 3 interfaces (lo
, eth0
and wlan0
), but I cannot ping anything, including the router.
Only after ifconfig eth0 down
I get to actually use the internet.
What is going on? How do I avoid this problem?
My /etc/network/interfaces
:
auto lo wlan0
iface lo inet loopback
route:
before ifconfig eth0 down
:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.7.1 0.0.0.0 UG 0 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.7.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
after ifconfig eth0 down
:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.7.1 0.0.0.0 UG 0 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
192.168.7.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
ifconfig
before ifconfig eth0 down
:
eth0 Link encap:Ethernet HWaddr 00:90:f5:a6:6c:de
inet addr:192.168.7.100 Bcast:192.168.7.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:45
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:430 errors:0 dropped:0 overruns:0 frame:0
TX packets:430 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:34157 (34.1 KB) TX bytes:34157 (34.1 KB)
wlan0 Link encap:Ethernet HWaddr 74:f0:6d:27:3e:4d
inet addr:192.168.7.156 Bcast:192.168.7.255 Mask:255.255.255.0
inet6 addr: fe80::76f0:6dff:fe27:3e4d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:878 (878.0 B) TX bytes:10870 (10.8 KB)
after ifconfig eth0 down
:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1435 errors:0 dropped:0 overruns:0 frame:0
TX packets:1435 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:116494 (116.4 KB) TX bytes:116494 (116.4 KB)
wlan0 Link encap:Ethernet HWaddr 74:f0:6d:27:3e:4d
inet addr:192.168.7.156 Bcast:192.168.7.255 Mask:255.255.255.0
inet6 addr: fe80::76f0:6dff:fe27:3e4d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63915 errors:0 dropped:0 overruns:0 frame:0
TX packets:50926 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:95400944 (95.4 MB) TX bytes:4750543 (4.7 MB)