- Bridged AP
- Configuration
- Step 1: Change the LAN interface
- Step 2: Configure and enable the wireless network
- Step 3: Disable dnsmasq
- Step 4: Connect host router and openwrt router correctly
- Apply changes
- Точка доступа (Bridged AP)
- Настройка
- Шаг 1: Добавляем новую сеть
- Шаг 2: Меняем настройки беспроводного адаптера
- Шаг 3: Отключаем dnsmasq
- Шаг 4: Подключаем OpenWRT-роутер к сети
- Шаг 5: Включаем беспроводную сеть
Bridged AP
Bridged AP is to extend your existing wired host router to have wireless capabilities. Clients connecting to OpenWRT will get an IP address from the wired host router.
OpenWrt bridges the LAN network with the WLAN of the device in Access Point mode. The advantage of bridging is that broadcast traffic from Wireless to LAN and vice versa works without further changes.
This document outlines the steps necessary to implement such a setup.
Note: This recipe results in a bridged LAN that will work fine for home and small networks. It is similar to the “Dumb AP ” recipe at dumbap. These pages should probably be merged.
Configuration
The changes below assume an OpenWrt default configuration, the relevant files are:
Step 1: Change the LAN interface
Edit /etc/config/network and change the lan interface section to set the IP your access point should have in the future:
config interface lan option ifname eth0 option type bridge option proto static option ipaddr 192.168.1.2 option netmask 255.255.255.0 option gateway 192.168.1.1 option dns 192.168.1.1
This IP address must be an unused one within the network subnet of the main router. You could also change proto to dhcp and let the main router decide the access point’s address, but of course from then on the access point needs a DHCP server and you will lose the ability to directly plug into your access point for maintenance.
Step 2: Configure and enable the wireless network
In /etc/config/wireless , locate the existing wifi-iface section and change its network option to point to the newly created interface section.
config wifi-iface option device wifi0 option network lan option mode ap option ssid OpenWrt option encryption none
Naturally, you should consider securing your wifi network.
Step 3: Disable dnsmasq
Step 4: Connect host router and openwrt router correctly
Ensure the host router is connected with a lan port of the openwrt, not the wan port!
Apply changes
Enable the new wireless network.
root@OpenWrt:~# ifup wifi root@OpenWrt:~# wifi
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website. OK More information about cookies
Self-registration in the wiki has been disabled.
If you want to contribute to the OpenWrt wiki, please post HERE in the forum or ask on IRC for access.
Except where otherwise noted, content on this wiki is licensed under the following license:
CC Attribution-Share Alike 4.0 International
Точка доступа (Bridged AP)
Точка доступа подходит для подключения беспроводных клиентов к существующей проводной сети. При этом, клиенты, подключающиеся к беспроводной точке доступа будут находиться в одном широковещательном домене.
OpenWrt в этом режиме функционирует как сетевой мост между проводным и беспроводным сетевыми адаптерами устройства. Широковещательный трафик проходит насквозь такого моста без каких либо дополнительных настроек.
На этой странице Вы найдете пошаговое руководство по настройке OpenWRT для работы в режиме точки доступа.
Настройка
Следующие изменения указаны для настроек OpenWrt по умолчанию, им соответствуют файлы:
Шаг 1: Добавляем новую сеть
Редактируем файл /etc/config/network — добавляем раздел с новым интерфейсом:
config interface loopback option ifname lo option proto static option ipaddr 127.0.0.1 option netmask 255.0.0.0 config interface lan option ifname eth0 option type bridge option proto static option ipaddr 192.168.1.2 option netmask 255.255.255.0 option gateway 192.168.1.1 option dns 192.168.1.1 |
Шаг 2: Меняем настройки беспроводного адаптера
В файле /etc/config/wireless , находим раздел wifi-iface и меняем настройки согласно новым настройкам в файле /etc/config/network .
config wifi-device wifi0 option type atheros option country DE option channel 11 config wifi-iface option device wifi0 option network lan option mode ap option ssid OpenWrt option encryption none |
Опционально: последнюю строчку можно изменить на option encryprion psk2 и добавить строчку option key ‘ключ_сети’ чтобы включить WPA-защиту. Подробнее о настройке защиты беспроводной сети здесь
Шаг 3: Отключаем dnsmasq
Шаг 4: Подключаем OpenWRT-роутер к сети
Убедитесь, что роутер подключен к сети через порт lan, а не wan (т.к. мы настраивали мост между lan портами и беспроводным интерфейсом)
Шаг 5: Включаем беспроводную сеть
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website. OK More information about cookies
Self-registration in the wiki has been disabled.
If you want to contribute to the OpenWrt wiki, please post HERE in the forum or ask on IRC for access.
Except where otherwise noted, content on this wiki is licensed under the following license:
CC Attribution-Share Alike 4.0 International