User Tools

Site Tools


doc:recipes:bridgedap

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.

Configuration

The changes below assume an OpenWrt default configuration, the relevant files are:

Step 1: Define a new network

Edit /etc/config/network and define a new interface section:

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

Step 2: Change the existing 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-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

Optionally change the last line for option encryption 'psk2' and add the line option key 'secret key' to enable WPA encryption

Or if you are using a WEP Key

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 wep option key 58303030313338433742304342

Key must be in Hex format to avoid a error like this: Command 'set wepkey' failed: -1

Step 3: Disable dnsmasq

/etc/init.d/dnsmasq disable

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
doc/recipes/bridgedap.txt · Last modified: 2013/06/20 08:53 by deadcode