RADIUSdesk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

user_guide:md_adding_cpe [2016/06/12 15:10] (current)
admin created
Line 1: Line 1:
 +====== Adding CPEs as clients to a MESHdesk mesh ======
 +  * So you have just finished deploying a nice mesh at a gated community. (http://​en.wikipedia.org/​wiki/​Gated_community)
 +  * The body corporate is very happy with their investment until one of the customers started the following conversation:​
  
 +> What about my wireless printer? and the kids games?
 +
 +>> Mam, I'm sure there is a way to fix this up. We just need to investigate our options.
 +
 +> Very good. :-)
 +
 +  * Back home you grab some of those super cheap Atheros based Access Points lying around; flash it with OpenWrt and do the following changes: ​
 +
 +===== Do the following changes to a clean install of OpenWrt =====
 +  * We will run the radio in both **Station** mode and **Access Point** mode simultaneously.
 +  * We will use it in **Station** mode to join the mesh network which has an open SSID.
 +  * We will use it in Access Point mode for the house to connect to this private fire-walled network.
 +  * So in essence we simply replace the WAN interface that is traditionally eth1 with the one virtual WiFi interface running in station mode and is connected to the mesh's open SSID.
 +  * See the following files and the comments inside them to explain what we are doing:
 +  * /​etc/​config/​wireless
 +
 +<file bash wireless>​
 +config wifi-device ​ radio0
 +        option type     ​mac80211
 +        option channel ​ 11
 +        option hwmode ​  11g
 +        option path     '​platform/​ar933x_wmac'​
 +        option htmode ​  HT20
 +        # REMOVE THIS LINE TO ENABLE WIFI:
 +        option disabled 0
 +#This is the private SSID for the user's home
 +config wifi-iface
 +        option device ​  ​radio0
 +        option network ​ lan
 +        option mode     ap
 +        option ssid     ​OpenWrt
 +        option '​encryption'​ '​psk2'​
 +        option '​key' ​       '​passphrase'​
 +
 +
 +#This is the uplink station mode interface joined to the wan network (where we removed the eth1 interface)
 +config wifi-iface
 +        option device ​  ​radio0
 +        option mode     sta
 +        option ssid     "​Cheetah guest"
 +        option encryption none
 +        option network ​ wan
 +        ​
 +</​file>​
 +
 +  * /​etc/​config/​network
 +
 +<file bash network>
 +config interface '​loopback'​
 +        option ifname '​lo'​
 +        option proto '​static'​
 +        option ipaddr '​127.0.0.1'​
 +        option netmask '​255.0.0.0'​
 +
 +config globals '​globals'​
 +        option ula_prefix '​fda0:​c846:​c916::/​48'​
 +
 +config interface '​lan'​
 +        option ifname '​eth0'​
 +        option force_link '​1'​
 +        option type '​bridge'​
 +        option proto '​static'​
 +        option ipaddr '​192.168.1.1'​
 +        option netmask '​255.255.255.0'​
 +        option ip6assign '​60'​
 +
 +#We replace the eth1 interface with the wlan0 interface
 +#This is the '​uplink'​ interface
 +config interface '​wan'​
 +#       ​option ifname '​eth1'​
 +        option proto '​dhcp'​
 +
 +config interface '​wan6'​
 +        option ifname '​@wan'​
 +        option proto '​dhcpv6'​
 +
 +</​file>​
 +
 + * /​etc/​config/​dhcp
 +
 +<file bash dhcp>
 +config dnsmasq
 +        option domainneeded '​1'​
 +        option boguspriv '​1'​
 +        option filterwin2k '​0'​
 +        option localise_queries '​1'​
 +        option rebind_protection '​1'​
 +        option rebind_localhost '​1'​
 +        option local '/​lan/'​
 +        option domain '​lan'​
 +        option expandhosts '​1'​
 +        option nonegcache '​0'​
 +        option authoritative '​1'​
 +        option readethers '​1'​
 +        option leasefile '/​tmp/​dhcp.leases'​
 +        option resolvfile '/​tmp/​resolv.conf.auto'​
 +
 +config dhcp '​lan'​
 +        option interface '​lan'​
 +        option start '​100'​
 +        option limit '​150'​
 +        option leasetime '​12h'​
 +       #NB change from '​server'​ to '​disabled'​ for NAT through the CPE to work right
 +        option dhcpv6 '​disabled'​
 +        option ra '​server'​
 +
 +config dhcp '​wan'​
 +        option interface '​wan'​
 +        option ignore '​1'​
 +
 +config odhcpd '​odhcpd'​
 +        option maindhcp '​0'​
 +        option leasefile '/​tmp/​hosts/​odhcpd'​
 +        option leasetrigger '/​usr/​sbin/​odhcpd-update'​
 +        ​
 +</​file>​
 +
 +  * After these changes its time to reboot and test