Openwrt режим моста wifi

Настройка роутера на OpenWRT в режим сетевого моста

В данной статье мы рассмотрим настройку роутера под управлением ОС OpenWRT в режим сетевого моста. Интернет наш роутер будет получать по Wi-Fi от другой сети и раздавать по LAN и собственной сети Wi-Fi.

  • Вам потребуется знать в какой подсети находится роутер, от которого мы будем получать интернет. Чтобы узнать подсеть, подключитесь по LAN или Wi-Fi к роутеру, затем зайдите в Центр управления сетями и общим доступом — Изменение параметров адаптера — щелкните правой кнопкой мыши на подключении — Состояние — Сведения. В нашем случае роутер находится в подсети 192.168.0.0/24
  • Подключитесь к web-интерфейсу роутера OpenWRT
  • Сначала нужно объединить подсети двух роутеров и отключить DHCP. Заходим в раздел Сеть — Итерфейсы. Нажимаем кнопку «Редактировать» LAN интерфейс
  • В поле IPv4 адрес вводим свободный IP адрес из подсети роутера с интернетом.
  • Отключаем DHCP, поставив галочку «Игнорировать интерфейс» в разделе DHCP-сервер. Нажмите «Сохранить и применить»
  • Чтобы снова подключиться к WEB-интерфйсу, перейдите к настройке IPv4 параметров вашего сетевого адптера. Пропишите компьютеру свободный IP адрес подсети. В качестве шлюза укажите IP-адрес роутера с OpenWRT
  • Подключитесь к WEB-интерфейсу через новый IP-адрес роутера. Перейдите в меню Сеть — Wi-F и нажмите кнопку «Сканировать»

На этом настройка сетевого моста завершена.

Источник

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.

Читайте также:  Широкополосное подключение wi fi

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.

Читайте также:  Usb вай фай сеть

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

Источник

Оцените статью
Adblock
detector