ich versuche seit Wochen krampfhaft ein WLAN-Netz mithilfe von hostapd und isc-dhcpd aufzubauen.
Das Problem was ich dabei habe:
Ich sehe zwar das WLAN-Netz. Wenn ich mich damit verbinde, dann bekomme ich nach einigen Sekunden auch eine Adresse vom DHCP-Server.
Allerdings bin ich vom AP aus nicht in der Lage, den Client mittels Ping zu erreichen. Der Client kann den Host auch nicht erreichen.
Das WLAN-Netz versuche ich mittels Interface wlan0 aufzubauen (ein USB-WLAN-Stick)
Meine /etc/network/interfaces
Code: Alles auswählen
auto lo
iface lo inet loopback
auto eth0:0
iface eth0:0 inet static
address 192.168.178.188
netmask 255.255.255.0
broadcast 192.168.178.255
gateway 192.168.178.1
auto eth0
iface eth0 inet dhcp
iface default inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 10.11.12.12
netmask 255.255.255.0
broadcast 10.11.12.255
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
Code: Alles auswählen
br0 Link encap:Ethernet HWaddr 00:0f:54:15:8f:6c
inet6 addr: fe80::20f:54ff:fe15:8f6c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
eth0 Link encap:Ethernet HWaddr b8:27:eb:e2:1e:bb
inet6 addr: fe80::ba27:ebff:fee2:1ebb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:285 errors:0 dropped:0 overruns:0 frame:0
TX packets:301 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25016 (24.4 KiB) TX bytes:34082 (33.2 KiB)
eth0:0 Link encap:Ethernet HWaddr b8:27:eb:e2:1e:bb
inet addr:192.168.178.188 Bcast:192.168.178.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
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:16436 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3402 (3.3 KiB) TX bytes:3402 (3.3 KiB)
mon.wlan0 Link encap:UNSPEC HWaddr 00-0F-54-15-8F-6C-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:201 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:38917 (38.0 KiB) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 00:0f:54:15:8f:6c
inet6 addr: fe80::20f:54ff:fe15:8f6c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4912 (4.7 KiB) TX bytes:6140 (5.9 KiB)
Code: Alles auswählen
br0 no wireless extensions.
mon.wlan0 IEEE 802.11bgn Mode:Monitor Frequency:2.442 GHz Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
wlan0 IEEE 802.11bgn Mode:Master Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
lo no wireless extensions.
eth0 no wireless extensions.
hostapd.conf
Code: Alles auswählen
ssid=KMW1
wpa_passphrase=MeinPasswort
interface=wlan0
bridge=br0
auth_algs=3
channel=7
driver=nl80211
hw_mode=g
logger_stdout=-1
logger_stdout_level=2
max_num_sta=5
rsn_pairwise=CCMP
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
dhcpd.conf
Code: Alles auswählen
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name "kmw1.de";
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
#subnet 10.152.187.0 netmask 255.255.255.0 {
#}
# This is a very basic subnet declaration.
#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.20;
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}
subnet 10.11.12.0 netmask 255.255.255.0 {
range 10.11.12.13 10.11.12.20;
option routers kmw1;
interface wlan0;
}
/var/log/syslog
Code: Alles auswählen
Aug 11 13:18:24 raspberrypi ifplugd(wlan0)[1694]: Link beat detected.
Aug 11 13:18:24 raspberrypi ifplugd(wlan0)[1694]: Executing '/etc/ifplugd/ifplugd.action wlan0 up'.
Aug 11 13:18:24 raspberrypi ifplugd(br0)[2099]: Link beat detected.
Aug 11 13:18:25 raspberrypi ifplugd(wlan0)[1694]: client: /sbin/ifup: interface wlan0 already configured
Aug 11 13:18:25 raspberrypi ifplugd(br0)[2099]: Executing '/etc/ifplugd/ifplugd.action br0 up'.
Aug 11 13:18:25 raspberrypi ifplugd(br0)[2099]: client: Ignoring unknown interface br0=br0.
Aug 11 13:18:25 raspberrypi ifplugd(wlan0)[1694]: Program executed successfully.
Aug 11 13:18:25 raspberrypi ifplugd(br0)[2099]: Program executed successfully.
Aug 11 13:18:26 raspberrypi /usr/sbin/cron[2274]: (CRON) INFO (pidfile fd = 3)
Aug 11 13:18:26 raspberrypi /usr/sbin/cron[2275]: (CRON) STARTUP (fork ok)
Aug 11 13:18:26 raspberrypi /usr/sbin/cron[2275]: (CRON) INFO (Running @reboot jobs)
Aug 11 13:18:27 raspberrypi kernel: [ 93.269735] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:509948k SS
Aug 11 13:18:27 raspberrypi dhcpd: Internet Systems Consortium DHCP Server 4.2.2
Aug 11 13:18:27 raspberrypi dhcpd: Copyright 2004-2011 Internet Systems Consortium.
Aug 11 13:18:27 raspberrypi dhcpd: All rights reserved.
Aug 11 13:18:27 raspberrypi dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Aug 11 13:18:27 raspberrypi dhcpd: Internet Systems Consortium DHCP Server 4.2.2
Aug 11 13:18:27 raspberrypi dhcpd: Copyright 2004-2011 Internet Systems Consortium.
Aug 11 13:18:27 raspberrypi dhcpd: All rights reserved.
Aug 11 13:18:27 raspberrypi dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Aug 11 13:18:27 raspberrypi dhcpd: Wrote 2 leases to leases file.
Aug 11 13:18:29 raspberrypi dhcpd:
Aug 11 13:18:29 raspberrypi dhcpd: No subnet declaration for wlan0 (no IPv4 addresses).
Aug 11 13:18:29 raspberrypi dhcpd: ** Ignoring requests on wlan0. If this is not what
Aug 11 13:18:29 raspberrypi dhcpd: you want, please write a subnet declaration
Aug 11 13:18:29 raspberrypi dhcpd: in your dhcpd.conf file for the network segment
Aug 11 13:18:29 raspberrypi dhcpd: to which interface wlan0 is attached. **
Aug 11 13:18:29 raspberrypi dhcpd:
Aug 11 13:18:29 raspberrypi dhcpd:
Aug 11 13:18:29 raspberrypi dhcpd: Not configured to listen on any interfaces!
Ich würde mich unendlich freuen, wenn mir jemand helfen könnte.
Wenn ich den Rechner neu starte, hat das interface wlan0 lustigerweise keine IP Adresse. Obwohl in der Datei /etc/network/interfaces eine definiert wurde.
Kann es sein, dass hostapd da rein pfuscht?