# Hostapd - dual band access point

## Akaihiryuu

I've finally gotten hardware that can do 802.11ac.  Right now I'm still running everything on the 2.4GHz band (so limited to n speeds).  What I want to do is create a second AP on the 5GHz band.  The card I'm using is a dual band one, so from my understanding it SHOULD be be able to do this.  I'm just not sure how to configure hostapd for this.  Right now it works fine with either 2.4GHz or 5GHz.  I've been reading around, and in some cases it looks like you have to pass 2 separate conf files to it.  Does anyone know how to do this?  If for some reason my card doesn't support 2.4 and 5GHz at the same time, can someone suggest one that does?  I can very easily swap the wifi out on this setup with any mini-PCIe card.

The card I'm using is a Realtek RTL8821AE.

04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter

Here is my current (working) hostapd.conf for the 2.4GHz setup

```
interface=wlan0

bridge=br0

country_code=US

logger_syslog=-1

logger_syslog_level=2

logger_stdout=-1

logger_stdout_level=2

ctrl_interface=/var/run/hostapd

ctrl_interface_group=0

ssid=<snip>

hw_mode=g

channel=9

ieee80211d=1

accept_mac_file=/etc/hostapd/hostapd.accept

deny_mac_file=/etc/hostapd/hostapd.deny

wpa=2

wpa_passphrase=<snip>

wpa_key_mgmt=WPA-PSK

rsn_pairwise=CCMP

ieee80211n=1

ieee80211ac=1

wmm_enabled=1

own_ip_addr=<snip>
```

And working config for 5g

```
interface=wlan0

bridge=br0

country_code=US

logger_syslog=-1

logger_syslog_level=2

logger_stdout=-1

logger_stdout_level=2

ctrl_interface=/var/run/hostapd

ctrl_interface_group=0

ssid=<snip>

hw_mode=a

channel=48

ieee80211d=1

accept_mac_file=/etc/hostapd/hostapd.accept

deny_mac_file=/etc/hostapd/hostapd.deny

wpa=2

wpa_passphrase=<snip>

wpa_key_mgmt=WPA-PSK

rsn_pairwise=CCMP

ieee80211n=1

ieee80211ac=1

wmm_enabled=1

own_ip_addr=<snip>
```

----------

## Ant P.

It'd help to have the output of `iw list`, the important thing to know first is whether it supports multiple APs on the same card.

----------

## Akaihiryuu

I've done some more research and this one apparently doesn't support 2 AP's on the same card.  I'm curious if anyone does know of any that do though.  Mini-PCIe if possible.

----------

## Logicien

I know it is possible to use a wireless card in AP mode and in Managed mode at the same time. I do it because when the wireless card is in AP mode, I cannot scan the wireless neighborhood. I create a new wireless card with iw like this:

```
iw dev wlan0 interface add sta0 type station

ip link set dev sta0 address 00:01:02:03:04:05
```

I have wlan0 interface with the real MAC address in AP mode and sta0 interface with the virtual MAC address in Managed mode. I can scan the wireless neighborhood even if the card is already in AP mode. I never try to connect to any Access Point with sta0 because I don't need it, of course.

I took this from Internet and I don't remember if the card need a special mode feature for this.This do not resolv you problem but it is an example of a wireless card who can do 2 things at the same time.

I try to create a virtual wireless interface in AP mode from the real one and this is the answer I receive

```
iw dev wlan0 interface add sta0 type ap

You need to run a management daemon, e.g. hostapd,

see http://wireless.kernel.org/en/users/Documentation/hostapd

for more information on how to do that.
```

So, if Hostapd cannot put a single wireless card in 2 different AP modes at the same time, iw say that you cannot do it virtually too.

----------

## bbgermany

 *Akaihiryuu wrote:*   

> I've been reading around, and in some cases it looks like you have to pass 2 separate conf files to it.  Does anyone know how to do this? 

 

I was struggeling around with 5GHz as well (ok I gave up), nvm. You just need to add the second configfile in your /etc/conf.d/hostapd like this:

```

# Space separated list of configuration files

CONFIGS="/etc/hostapd/hostapd_24ghz.conf /etc/hostapd/hostapd_5ghz.conf"

```

Restart hostapd and you should see a process like this with "ps ax | grep hostapd"

```

 4645 ?        Ss     1:00 /usr/sbin/hostapd -P /run/hostapd.pid -B /etc/hostapd/hostapd_24.conf /etc/hostapd/hostapd_5ghz.conf

```

greets, bb

----------

