Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2018-08-24,backup-redmine/2019-09-14,master
>---------------------------------------------------------------
commit b5578a13ac2a8c8f9fd17aa3e2b3f7c5b388cd1d
Author: Jose Martin <jmartin(a)vcomnetworks.com>
Date: Sun Aug 19 05:40:40 2018 +0000
doc: open-mesh/BATMAN_and_Dynamic_VLANs_with_NPS_Radius_Server
>---------------------------------------------------------------
b5578a13ac2a8c8f9fd17aa3e2b3f7c5b388cd1d
...nd_Dynamic_VLANs_with_NPS_Radius_Server.textile | 81 ++++++++++++----------
1 file changed, 46 insertions(+), 35 deletions(-)
diff --git a/open-mesh/BATMAN_and_Dynamic_VLANs_with_NPS_Radius_Server.textile b/open-mesh/BATMAN_and_Dynamic_VLANs_with_NPS_Radius_Server.textile
index 7882a83..e103547 100644
--- a/open-mesh/BATMAN_and_Dynamic_VLANs_with_NPS_Radius_Server.textile
+++ b/open-mesh/BATMAN_and_Dynamic_VLANs_with_NPS_Radius_Server.textile
@@ -3,9 +3,12 @@ h1. BATMAN and Dynamic VLANs with NPS Radius Server
I want to share my experience of a MESH network configuration with dynamic VLANs allocation based on authentication with a remote RADIUS server (Windows Server with NPS). Enjoy it
-**************************************************************************
+************************
+
1.- Previous Info
-**************************************************************************
+
+************************
+
LAN Services:
RADIUS Server
NPS Windows Server (Configuration not included)
@@ -45,9 +48,12 @@ Router: 172.1.1.254
Windows Server: 172.1.1.34
-**************************************************************************
+************************
+
2.- Installation
-**************************************************************************
+
+************************
+
opkg update
opkg remove wpad-mini
opkg install wpad
@@ -55,13 +61,15 @@ opkg install kmod-batman-adv
opkg install batctl
-**************************************************************************
+************************
+
3.- Basic Configuration
-**************************************************************************
---------------------------------------------------------------------------
-DNS and DHCP
---------------------------------------------------------------------------
+************************
+
+------------------------
+DNS
+------------------------
/etc/resolv.conf:
nameserver 8.8.8.8
@@ -76,9 +84,9 @@ nameserver 8.8.4.4
---------------------------------------------------------------------------
+------------------------
DHCP
---------------------------------------------------------------------------
+------------------------
/etc/config/dhcp:
config dnsmasq
@@ -111,7 +119,7 @@ config dhcp 'lan'
/etc/dnsmasq.conf:
-# dhcp-range=[network-id,],[[,],][,]
+#dhcp-range=[network-id,],[[,],][,]
dhcp-range=Vlan20,192.168.18.1,192.168.19.200,255.255.254.0,4h #VLAN 20 range defined in the DHCP server
dhcp-range=Vlan21,10.1.14.1,10.1.15.200,255.255.254.0,96h #VLAN 21 range defined in the DHCP server
@@ -121,20 +129,23 @@ dhcp-relay=10.1.15.25x,172.1.1.34 #Interface in the appropriate VLAN used to c
---------------------------------------------------------------------------
+------------------------
Hostapd for the Dynamic VLANs
---------------------------------------------------------------------------
+------------------------
/etc/config/hostapd.vlan:
-* wlan0-1.#
+'* wlan0-1.#'
+
+************************
-**************************************************************************
4.- Mesh Configuration
-**************************************************************************
---------------------------------------------------------------------------
+
+************************
+
+------------------------
B.A.T.M.A.N
---------------------------------------------------------------------------
+------------------------
etc/config/batman-adv:
config 'mesh' 'bat0'
@@ -156,9 +167,9 @@ config 'mesh' 'bat0'
---------------------------------------------------------------------------
+------------------------
Wireless
---------------------------------------------------------------------------
+------------------------
etc/config/wireless:
config wifi-iface
@@ -193,14 +204,14 @@ config wifi-iface 'wmesh'
---------------------------------------------------------------------------
+------------------------
Network
---------------------------------------------------------------------------
+------------------------
etc/config/network:
Node master
(Connected to the wired Network. It is the Node gateway)
----------------------------------------------------------------
+------------------------
config interface 'lan'
option type 'bridge'
option ifname 'eth0 bat0'
@@ -235,7 +246,7 @@ config interface 'Vlan20'
Node 2
(not connected to the wired network, only wireless to the Mesh)
----------------------------------------------------------------
+------------------------
config interface 'lan'
option ifname 'eth0'
@@ -276,9 +287,9 @@ config interface 'Vlan20'
---------------------------------------------------------------------------
+------------------------
Useful Commands You may need
---------------------------------------------------------------------------
+------------------------
iw list | grep "Supported interface modes" -A 9 #verify the supported modes
killall dnsmasq #kill dnsmasq running
/etc/init.d/network restart #reload Network
@@ -293,13 +304,13 @@ brctl show #show the bridges
---------------------------------------------------------------------------
+------------------------
Commands outputs during the test
---------------------------------------------------------------------------
+------------------------
Node Master:
----------------------------------------------------------------
+------------------------
root@apmesh1:~# ifconfig
bat0 Link encap:Ethernet HWaddr F2:DC:B7:31:79:54
br-lan Link encap:Ethernet HWaddr F4:F2:6D:35:23:95
@@ -311,7 +322,7 @@ eth0.66 Link encap:Ethernet HWaddr F4:F2:6D:35:23:95
mesh0 Link encap:Ethernet HWaddr F4:F2:6D:35:23:95
wlan0-1 Link encap:Ethernet HWaddr F6:F2:6D:35:23:95
----------------------------------------------------------------
+------------------------
brctl show:
bridge name bridge id STP enabled interfaces
br-lan 7fff.f4f26d352395 no eth0
@@ -327,12 +338,12 @@ br-Vlan21 7fff.f4f26d352395 no eth0.34
wlan0-1.34
br-Vlan20 7fff.f4f26d352395 no eth0.66
----------------------------------------------------------------
+------------------------
Other Node:
----------------------------------------------------------------
+------------------------
root@apmesh2:~# ifconfig
bat0 Link encap:Ethernet HWaddr 16:3F:15:C0:56:78
bat0.34 Link encap:Ethernet HWaddr 16:3F:15:C0:56:78
@@ -345,7 +356,7 @@ eth0 Link encap:Ethernet HWaddr DC:9F:DB:6B:53:3C
mesh0 Link encap:Ethernet HWaddr DC:9F:DB:6A:53:3C
wlan0-1 Link encap:Ethernet HWaddr DE:9F:DB:6A:53:3C
----------------------------------------------------------------
+------------------------
brctl show:
bridge name bridge id STP enabled interfaces
br-lan 7fff.dc9fdb6b533c no eth0
@@ -361,4 +372,4 @@ br-Vlan21 7fff.163f15c05678 no bat0.34
wlan0-1.34 #when the client is connected
br-Vlan20 7fff.163f15c05678 no bat0.66
----------------------------------------------------------------
\ No newline at end of file
+------------------------
\ No newline at end of file