wlan 接口已连接网络但无法访问本地或外部网络

wlan 接口已连接网络但无法访问本地或外部网络

我已经通过配置文件 /etc/network/interfaces 设置了我的无线接口,该接口能够连接到路由器,但我无法 ping 本地网络上的任何内容(甚至无法 ping 通该接口所连接的路由器本身)并且我也无法访问任何外部(WAN)资源。

我的配置如下:

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback


# The wireless network interface
auto wlan1
iface wlan1 inet static
    address             192.168.1.12
    netmask             255.255.255.0
    gateway             192.168.1.1
    wireless-essid      xxxx
    wireless-key        s:xxxx 
    wireless-keymode    open

如下图所示,接口实际上已连接:

$ iwconfig

lo        no wireless extensions.

wlan1     IEEE 802.11abg  ESSID:"xxxx"  
          Mode:Managed  Frequency:2.452 GHz  Access Point: 58:98:35:4A:A4:F0   
          Bit Rate=54 Mb/s   Tx-Power=200 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:xxxx-xxxx-xx
          Power Management:off
          Link Quality=48/70  Signal level=-62 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

eth0      no wireless extensions.

但我无法 ping 通网关 (192.168.1.1) 或 DNS (8.8.8.8):

$ ping 192.168.1.1

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.12 icmp_seq=1 Destination Host Unreachable
From 192.168.1.12 icmp_seq=1 Destination Host Unreachable
From 192.168.1.12 icmp_seq=1 Destination Host Unreachable

ifconfig 返回:

$ ifconfig

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:65536  Metric:1
          RX packets:31 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2158 (2.1 KiB)  TX bytes:2158 (2.1 KiB)

wlan1     Link encap:Ethernet  HWaddr 5c:93:a2:92:96:81  
          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::5e93:a2ff:fe92:9681/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:143
          TX packets:101 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:14372 (14.0 KiB)
          Interrupt:18 

内核路由设置如下:

$ route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan1

任何建议/故障排除提示将非常感谢。

问候,迈克。

相关内容