ich möchte in meinem Netzwerk ein AdHoc-Wlan einrichten und auf dem Rechner mit dem Adhoc-Wlan soll ein DHCP-Server laufen.
Das AdHoc-Wlan läuft bereits und der DHCP-Server verteilt auch IP-Addressen. Leider können sich die Clients und der Server
nicht anpingen (Network is unreachable). Wahrscheinlich ist die Konfiguration /etc/dnsmasq.conf nicht korrekt.
Achso, die Clients sollen kein Zugang zum Internet erhalten.
Dabei bitte ich um eure Hilfe.
Viele Grüße,
eddi0815
Daten:
Debian-Release: Stretch
DHCP-Server: dnsmasq
Kommandos für AdHoc-Wlan:
Code: Alles auswählen
iw wlan0 set type ibss
ip link set wlan0 up
iw wlan0 ibss join spc 2412
ip addr add 192.168.20.1 dev wlan0
Code: Alles auswählen
no-resolv
domain-needed
bogus-priv
interface=wlan0
bind-interfaces
dhcp-range=192.168.20.50,192.168.20.150,255.255.255.0,12h
Code: Alles auswählen
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 0 26332 1881/dnsmasq
tcp 0 0 192.168.20.1:53 0.0.0.0:* LISTEN 0 26330 1881/dnsmasq
tcp6 0 0 ::1:53 :::* LISTEN 0 26336 1881/dnsmasq
tcp6 0 0 fe80::ae83:f3ff:fe31:53 :::* LISTEN 0 26334 1881/dnsmasq
udp 0 0 127.0.0.1:53 0.0.0.0:* 0 26331 1881/dnsmasq
udp 0 0 192.168.20.1:53 0.0.0.0:* 0 26329 1881/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 0 26326 1881/dnsmasq
udp6 0 0 ::1:53 :::* 0 26335 1881/dnsmasq
udp6 0 0 fe80::ae83:f3ff:fe31:53 :::* 0 26333 1881/dnsmasq
Code: Alles auswählen
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.20.1 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80::ae83:f3ff:fe31:f330 prefixlen 64 scopeid 0x20<link>
ether ac:83:f3:31:f3:30 txqueuelen 1000 (Ethernet)
RX packets 923 bytes 74032 (72.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 61 bytes 9410 (9.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
iwconfig Server:
Code: Alles auswählen
wlan0 IEEE 802.11 ESSID:"spc"
Mode:Ad-Hoc Frequency:2.412 GHz Cell: D6:B6:42:4D:DB:20
Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Code: Alles auswählen
2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:1e:64:27:4a:9c brd ff:ff:ff:ff:ff:ff
inet 192.168.20.142/24 brd 192.168.20.255 scope global dynamic wlp3s0
valid_lft 43185sec preferred_lft 43185sec
inet6 fe80::2e93:69b4:5e0d:df0e/64 scope link
valid_lft forever preferred_lft forever
iwconfig Client:
Code: Alles auswählen
wlp3s0 IEEE 802.11 ESSID:"spc"
Mode:Ad-Hoc Frequency:2.412 GHz Cell: D6:B6:42:4D:DB:20
Tx-Power=14 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
systemctl status dnsmasq.service:
Code: Alles auswählen
��● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2017-09-13 19:50:26 UTC; 3s ago
Process: 2143 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=exited, status=0/SUCCESS)
Process: 2162 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 2154 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 2151 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 2161 (dnsmasq)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/dnsmasq.service
��└��─2161 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,19036,8,2,49aac11d7b6f64467
02e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5 --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Sep 13 19:50:26 spc dnsmasq[2151]: dnsmasq: syntax check OK.
Sep 13 19:50:26 spc dnsmasq[2161]: started, version 2.76 cachesize 150
Sep 13 19:50:26 spc dnsmasq[2161]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Sep 13 19:50:26 spc dnsmasq[2161]: warning: no upstream servers configured
Sep 13 19:50:26 spc dnsmasq-dhcp[2161]: DHCP, IP range 192.168.20.50 -- 192.168.20.150, lease time 12h
Sep 13 19:50:26 spc dnsmasq-dhcp[2161]: DHCP, sockets bound exclusively to interface wlan0
Sep 13 19:50:26 spc dnsmasq[2161]: read /etc/hosts - 7 addresses
Sep 13 19:50:26 spc systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Sep 13 19:50:27 spc dnsmasq[2161]: failed to send packet: Network is unreachable
Sep 13 19:50:27 spc dnsmasq[2161]: failed to send packet: Network is unreachable