【问题标题】:Can't ping two adhoc wireless lop tops (linux)无法 ping 两台 ad hoc 无线笔记本电脑 (linux)
【发布时间】:2016-03-01 12:38:58
【问题描述】:

我想在两个都有 Linux 操作系统的 lop top 上运行 ad-hoc 无线。我用它来创建 ad-hoc 网络。(我之前已经停止了网络管理器)

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode ad-hoc essid test-adhoc channel 3
sudo ifconfig wlan0 up
sudo ifconfig wlan0 192.168.1.1 netmask 255.255.255.0

我的 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:25388 errors:0 dropped:0 overruns:0 frame:0
           TX packets:25388 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0 
           RX bytes:3916018 (3.9 MB)  TX bytes:3916018 (3.9 MB)

  vmnet1    Link encap:Ethernet  HWaddr 00:50:56:c0:00:01  
            inet addr:192.168.237.1  Bcast:192.168.237.255 Mask:255.255.255.0
            inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:505 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  vmnet8    Link encap:Ethernet  HWaddr 00:50:56:c0:00:08  
            inet addr:172.16.62.1  Bcast:172.16.62.255  Mask:255.255.255.0
            inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:504 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  wlan0     Link encap:Ethernet  HWaddr ac:72:89:1b:19:76  
            inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
            inet6 addr: fe80::ae72:89ff:fe1b:1976/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:1543085 errors:0 dropped:27 overruns:0 frame:0
            TX packets:19353 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:183406489 (183.4 MB)  TX bytes:3741745 (3.7 MB)

还有 iwconfig

vmnet8    no wireless extensions.

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"test-adhoc"  
          Mode:Ad-Hoc  Frequency:2.422 GHz  Cell: A2:A3:E3:9B:6A:FA   
          Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

vmnet1    no wireless extensions.

第一个 Lop 顶部的 IP 是 ,第二个是 。我检查了路线:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.62.0     *               255.255.255.0   U     0      0        0 vmnet8
192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.237.0   *               255.255.255.0   U     0      0        0 vmnet1

但是当我从另一个 ping 一个时:

ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
From 192.168.1.1 icmp_seq=2 Destination Host Unreachable
From 192.168.1.1 icmp_seq=3 Destination Host Unreachable
From 192.168.1.1 icmp_seq=4 Destination Host Unreachable
From 192.168.1.1 icmp_seq=5 Destination Host Unreachable
From 192.168.1.1 icmp_seq=6 Destination Host Unreachable

我该怎么办?我的系统是 Ubuntu 14.04。

【问题讨论】:

    标签: linux networking adhoc


    【解决方案1】:

    我只是改变了我的方法。在这个tutorial 中,第二种方法不起作用。 在第一种方法中,不要使用“auto wlan0”。 (如果你这样做,你可能会连接到另一个网络)

    【讨论】:

    • 您的意思是您使用了第一种方法但注释掉了 auto wlan0?。
    猜你喜欢
    • 2014-05-11
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 2014-11-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多