Академический Документы
Профессиональный Документы
Культура Документы
I got the new Switch Layer 3 and I want to setup Fresh Ubuntu on my old box .So I
will be implement Coovachilli to support Vlans.
My scenario
-
------------------------------------------╔╡10.1.1.0/25
------------------------------------------╠╡10.2.2.0/25
[Router]==[Coova]==[Switch]==╬╡10.3.3.0/25
------------------------------------------╚╡10.4.4.0/25
# Create VLAN 10 for the marketing department and configure the IP address of
VLAN-interface 10 as 10.1.1.126
system-view
[Sysname] vlan 10
[Sysname-vlan10] port Ethernet 1/0/1
[Sysname-vlan10] quit
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ip address 10.1.1.126 255.255.255.128
[Sysname-Vlan-interface10] quit
# Create VLAN 20 for the R&D department and configure the IP address of VLAN-
interface 20 as 10.2.2.126
[Sysname] vlan 20
[Sysname-vlan20] port Ethernet 1/0/2
[Sysname-vlan20] quit
[Sysname] interface Vlan-interface 20
[Sysname-Vlan-interface20] ip address 10.2.2.126 255.255.255.128
[Sysname-Vlan-interface20] quit
# Create VLAN 30 for the administration department and configure the IP address
of VLAN-interface 30 as 10.3.3.126
[Sysname] vlan 30
[Sysname-vlan30] port Ethernet 1/0/3
[Sysname-vlan30] quit
[Sysname] interface Vlan-interface 30
[Sysname-Vlan-interface30] ip address 10.3.3.126 255.255.255.128
[Sysname-Vlan-interface30] quit
# Create VLAN 40 for the Web cache server and configure the IP address of VLAN-
interface 40 as 10.4.4.126
[Sysname] vlan 40
[Sysname-vlan40] port Ethernet 1/0/4
[Sysname-vlan40] quit
[Sysname] interface Vlan-interface 40
[Sysname-Vlan-interface40] ip address 10.4.4.126 255.255.255.128
[Sysname-Vlan-interface40] quit
[Sysname]interface GigabitEthernet 1/0/27
[Sysname-GigabitEthernet1/0/27]port link-type trunk
[Sysname-GigabitEthernet1/0/27]port trunk permit vlan all
[Sysname-GigabitEthernet1/0/27]undo shutdown
Plug the lan cable conectected with the internal interface of Coovachilli into port
27th
auto eth0
iface eth0 inet static
address 10.10.10.2
netmask 255.255.255.128
network 10.10.10.0
broadcast 10.10.10.127
gateway 10.10.10.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 203.144.207.29
auto eth1
auto vlan40
iface vlan40 inet manual
vlan-raw-device eth1
auto vlan20
iface vlan20 inet manual
vlan-raw-device eth1
auto vlan30
iface vlan30 inet manual
vlan-raw-device eth1
auto vlan10
iface vlan10 inet manual
vlan-raw-device eth1
Install CoovaChilli:
cd ..
dpkg -i coova-chilli_*_i386.deb
Configure coova
cp etc/chilli/defaults /etc/chilli/config
nano /etc/chilli/config
HS_HS_RADSECRET=Iloveradius
HS_UAMSECRET=uamsecret
HS_UAMALLOW=www.coova.org,www.google.com,10.x.x.1/25
HS_UAMSERVER=10.x.x.1
HS_UAMFORMAT=https://\$HS_UAMSERVER/hotspot/uam/
HS_UAMSERVICE=https://10.x.x.1/cgi-bin/hotspotlogin.cgi
Create hotspot site for more detail you can sarch from my old article
mkdir /var/www/hotspot
cd /var/www/hotspot
cp /etc/chilli/www/* /var/www/hotspot
sed -i 's/1.0.0.1/10.1.1.1/g' /etc/chilli/www/ChilliLibrary.js
sed -i 's/1.0.0.1/10.1.1.1/g' /var/www/hotspot/ChilliLibrary.js
Configuration process
mkdir /etc/chilli/eth1.10
mkdir /etc/chilli/eth1.20
mkdir /etc/chilli/eth1.30
mkdir /etc/chilli/eth1.40
cp /etc/chilli/config /etc/chilli/eth1.10/config
cp /etc/chilli/config /etc/chilli/eth1.20/config
cp /etc/chilli/config /etc/chilli/eth1.30/config
cp /etc/chilli/config /etc/chilli/eth1.40/config
nano /etc/chilli/eth1.10/chilli.conf
include /etc/chilli/eth1.10/main.conf
include /etc/chilli/eth1.10/hs.conf
include /etc/chilli/eth1.10/local.conf
ipup /etc/chilli/up.sh
ipdown /etc/chilli/down.sh
nano /etc/chilli/eth1.20/config
nano /etc/chilli/eth1.20/chilli.conf
include /etc/chilli/eth1.20/main.conf
include /etc/chilli/eth1.20/hs.conf
include /etc/chilli/eth1.20/local.conf
ipup /etc/chilli/up.sh
ipdown /etc/chilli/down.sh
nano /etc/chilli/eth1.30/config
include /etc/chilli/eth1.30/main.conf
include /etc/chilli/eth1.30/hs.conf
include /etc/chilli/eth1.30/local.conf
ipup /etc/chilli/up.sh
ipdown /etc/chilli/down.sh
Configure Vlan 40
nano /etc/chilli/eth1.40/config
include /etc/chilli/eth1.40/main.conf
include /etc/chilli/eth1.40/hs.conf
include /etc/chilli/eth1.40/local.conf
ipup /etc/chilli/up.sh
ipdown /etc/chilli/down.sh
HS_DYNIP=192.168.20.130
HS_DYNIP_MASK=255.255.255.0
HS_STATIP=192.168.20.3
HS_STATIP_MASK=255.255.255.0
# HS_DNS_DOMAIN=192.168.20.101
# OpenDNS Servers
HS_DNS1=192.168.20.1
HS_DNS2=192.168.20.102
HS_NASID=nas-20
HS_RADIUS=localhost
HS_RADIUS2=localhost
HS_UAMALLOW=192.168.20.0/24,192.168.0.0/24,10.10.10.0/27
HS_RADSECRET=Chitlada # Set to be your RADIUS shared secret
HS_UAMSECRET=Luamsecret # Set to be your UAM secret
HS_UAMALIASNAME=chilli
HS_UAMSERVER=192.168.20.1
HS_UAMFORMAT=https://\$HS_UAMSERVER/hotspot/uam/
HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html
HS_MODE=hotspot
HS_TYPE=chillispot
HS_WWWDIR=/etc/chilli/www
HS_WWWBIN=/etc/chilli/wwwsh
HS_PROVIDER=Coova
HS_PROVIDER_LINK=http://www.coova.org/
HS_LOC_NAME="My HotSpot"
=========== End of file ==========