I have a Raspberry Pi with two USB wlan adapters. wlan0 is configured with DHCP and wlan1 is configured with a static IP address and hostapd (access point) is running on this interface. The adapter supports master mode. But wlan1 never gets it's IP address after boot and the network does not work properly. Any clues to why?
/etc/network/interfaces looks like this:
auto lo
iface lo inet loopback
iface default inet dhcp
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.201
netmask 255.255.255.0
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
auto wlan1
iface wlan1 inet static
address 10.0.0.1
netmask 255.255.255.0
Directly after booting the RPi, ifconfig returns the following:
eth0 Link encap:Ethernet HWaddr b8:27:eb:47:0d:a5
inet addr:192.168.2.201 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:102 errors:0 dropped:1 overruns:0 frame:0
TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11281 (11.0 KiB) TX bytes:15674 (15.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
mon.wlan1 Link encap:UNSPEC HWaddr 54-E6-FC-89-BE-4B-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2665 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:810921 (791.9 KiB) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 80:1f:02:84:f8:3f
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:14 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3672 (3.5 KiB) TX bytes:1106 (1.0 KiB)
wlan1 Link encap:Ethernet HWaddr 54:e6:fc:89:be:4b
UP BROADCAST RUNNING 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)
As you can see wlan1 is not assigned the expected 10.0.0.1 address. If I issue ifdown and then ifup it will get the IP address.
The command ip link shows this before doing ifdown/ifup:
4: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
and this afterwards:
4: wlan1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
Any help is appreciated.