Машина №1:
# ifconfig wlan0 up
# iwconfig wlan0 essid N1 key s:Hello mode ad-hoc
# ifconfig wlan0 192.168.0.1
Машина №2
# ifconfig wlan0 up
# iwlist wlan0 scan|tail -19
Cell 03 - Address: B6:FF:86:6A:16:D1
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=62/70 Signal level=-48 dBm
Encryption key:on
ESSID:"N1"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Ad-Hoc
Extra:tsf=0000000000b2299f
Extra: Last beacon: 1086ms ago
IE: Unknown: 00024E31
IE: Unknown: 010882040B160C121824
IE: Unknown: 030101
IE: Unknown: 06020000
IE: Unknown: 32043048606C
IE: Unknown: DD070050F202000100
# iwconfig wlan0 essid N1 key s:Hello
# ifconfig wlan0 192.168.0.2
# ping -I wlan0 192.168.0.1
PING 192.168.0.1 (192.168.0.1) from 192.168.0.2 wlan0: 56(84) bytes of data.
From 192.168.0.2 icmp_seq=2 Destination Host Unreachable
From 192.168.0.2 icmp_seq=3 Destination Host Unreachable
From 192.168.0.2 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.0.1 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4009ms
pipe 3
fconfig wlan0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 metric 1
inet 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255
ether 00:15:af:e6:8d:c8 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
Машина №1:
# ping -I wlan0 192.168.0.2
PING 192.168.0.2 (192.168.0.2) from 192.168.0.1 wlan0: 56(84) bytes of data.
From 192.168.0.1 icmp_seq=2 Destination Host Unreachable
From 192.168.0.1 icmp_seq=3 Destination Host Unreachable
From 192.168.0.1 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.0.2 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3008ms
pipe 3
# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
inet 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::4a5d:60ff:fe68:eeee prefixlen 64 scopeid 0x20<link>
ether 48:5d:60:68:ee:ee txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 573 bytes 35244 (34.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0