咨询下为啥localhost像是丢失了,
D1S,tina-linux
网卡是WIFI,芯片是XR829;
没有连接WIFI的时候,localhost这个名字ping很正常;
root@TinaLinux:/# ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.258 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.276 ms
此时WIFI
wlan0 Link encap:Ethernet HWaddr A0:8B:95:D8:E4:DB
inet6 addr: fe80::a28b:95ff:fed8:e4db/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3661 errors:0 dropped:6 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1635196 (1.5 MiB) TX bytes:2858 (2.7 KiB)
但是一旦连接WIFI网络后,localhost就ping不通了,只能ping 通127.0.0.1;
root@TinaLinux:/mnt/UDISK/omg# ping localhost
ping: bad address 'localhost'
网卡状态
wlan0 Link encap:Ethernet HWaddr A0:8B:95:D8:E4:DB
inet addr:192.168.210.39 Bcast:192.168.210.255 Mask:255.255.255.0
inet6 addr: fe80::a28b:95ff:fed8:e4db/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3744 errors:0 dropped:6 overruns:0 frame:0
TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1672530 (1.5 MiB) TX bytes:6656 (6.5 KiB)
/etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
root@TinaLinux:/mnt/UDISK/omg# cat /etc/resolv.conf
nameserver 218.85.152.99
nameserver 211.138.156.66
不懂为啥连了WIFI后,localhost仿佛像是丢失了一样
root@TinaLinux:/mnt/UDISK/omg# ifconfig -a
bond0 Link encap:Ethernet HWaddr FE:E0:A1:06:4F:70
BROADCAST MASTER 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)
eth0 Link encap:Ethernet HWaddr E0:4E:7A:1B:A8:84
BROADCAST 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)
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:3152 errors:0 dropped:0 overruns:0 frame:0
TX packets:3152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:245836 (240.0 KiB) TX bytes:245836 (240.0 KiB)
wlan0 Link encap:Ethernet HWaddr A0:8B:95:D8:E4:DB
inet addr:192.168.210.39 Bcast:192.168.210.255 Mask:255.255.255.0
inet6 addr: fe80::a28b:95ff:fed8:e4db/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3869 errors:0 dropped:8 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1721619 (1.6 MiB) TX bytes:13809 (13.4 KiB)