26.05.2016 Views

Vlan-En-Ubiquiti

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

<br />

<br />

S T O R E C O M M U N I T Y SIGN IN<br />

<br />

REGISTER<br />

Home<br />

Forums<br />

Knowledge Base<br />

Blogs<br />

Stories<br />

Board<br />

SEARCH<br />

Subscriptions Bookmarks Unread posts Mark as Read Recent posts Recent Topics FAQ<br />

<strong>Ubiquiti</strong> Networks Community Forums airMAX airOS Software & Conguration<br />

Bridged Network with VLAN Conguration<br />

Conguration<br />

REPLY Topic Options Message Listing Previous Topic Next Topic Previous 1 2 3 Next<br />

feisley<br />

New Member<br />

Bridged Network with VLAN Conguration<br />

01-18-2013 11:21 PM<br />

Options<br />

Posts: 18<br />

Kudos: 10<br />

Registered: 10-01-2012<br />

We are getting ready to launch our first <strong>Ubiquiti</strong> network. We currently have two existing networks and this new network will overlay<br />

and supplement the service area.<br />

During the testing and planning process one of the key items was to plan how to integrate this into our existing network topology,<br />

primarily the VLANs for customer access and management traffic.<br />

After searching the forums to see how others did it, I decided to set this up in the lab to see which scenarios worked best. In the end I<br />

settled on a VLAN configuration that closely mimics how we manage our Canopy network. Since I did not see anything like this<br />

posted, I wanted to share the configuration and notes as others may find it useful.<br />

The goals were as follows:<br />

1. Provide a VLAN from the core network to manage individual stations based on either a static IP or a DHCP reservation. The<br />

customer should not be able to see or access this VLAN or subnet.<br />

2. Allow a technician connected directly to the radio to access the management interface by a common ip (in this example<br />

192.168.1.20). The technician should not need any VLAN aware equipment.<br />

3. Provide an access VLAN that will be exposed to the user on the station ethernet port. The user should not need any VLAN aware<br />

equipment.<br />

Lab Setup:<br />

VLAN 10 - 192.168.10.X - Management Network<br />

VLAN 12 - 192.168.12.X - Customer Access Network<br />

Wiring Setup:<br />

Cisco Switch AP ((((((())))))) STA Laptop<br />

Configuration Steps:<br />

0. A Few Assumptions are made<br />

This assumes the Cisco (or other) switch is tagging both VLAN 10 and 12 on the port connected to the AP. The laptop is just a<br />

standard device with no VLAN configuration.<br />

1. Add VLANs under Advanced Network Configuration<br />

2. Assign WLAN0.10 to the Management Interface<br />

By doing this, the management IP is exposed only via VLAN 10 to the core network. It cannot be accessed by the local LAN0<br />

interface.<br />

3. On BRIDGE0, remove WLAN0 and add WLAN0.12<br />

Doing this bridges the customer VLAN 12 to the wired interface, thus connecting the customer to the appropriate network. As an<br />

added bonus, for customers that are behind on payments, we simply change this to a captive portal VLAN that provides them an<br />

interface to pay their bill. Ideally we want to make this switch automatic.<br />

4. Add the IP Alias of 192.168.1.20 to the BRIDGE0<br />

This exposes 192.168.1.20 as a way of managing the device from the local lan port. This is useful if a station falls off line and we<br />

need to roll a truck to repair the modem. The technician simply plugs a laptop into the LAN port and is able to manage the device.<br />

1 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

NOTE: Due to the fact this is on the BRIDGE0, that 192.168.1.20 IP is also bridged to the Wireless VLAN 12 (That the customers are<br />

on). Based on our testing, this did not cause an issue as any attempt to access the 192.168.1.20 interface is handled by the local<br />

station rather than bridging to another device. Additionally if you employ client isolation this is further mitigated. The biggest thing to<br />

understand is that you could not access 192.168.1.20 from the core network side of VLAN 12. Doing so would not work due to the<br />

conflict between the devices bridged to it. Finally if this is a concern, you could assign a unique IP Alias, however, we felt this<br />

defeated the purpose of having a single easy to remember management IP. I welcome your input on this.<br />

I have included a screen shot of the configuration for reference. It shows the resulting network settings after following the above<br />

steps.<br />

Again, I hope some may find this useful and I welcome a discussion if you feel there are any ways this could be improved.<br />

Cheers,<br />

Jacob<br />

1 of 51<br />

7 Kudos<br />

REPLY<br />

sjackson909<br />

Regular Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-19-2013 06:02 AM<br />

Options<br />

Posts: 690<br />

Jacob,<br />

Great write up. This is the same exact way we setup all our CPE's in one of my markets. The network is a mix of canopy and UNBT<br />

and completely bridged all the way back to the core. The setup is not as easy as setting a untagged ingress like canopy but at least it<br />

2 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

Kudos: 189<br />

Solutions: 1<br />

Registered: 09-12-2011<br />

works. Again great write up.<br />

Thanks<br />

-Seth<br />

2 of 51<br />

0 Kudos<br />

REPLY<br />

feisley<br />

New Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-21-2013 09:03 PM<br />

We added the following rules to the AP firewall to block the discovery and CDP packets from the 192.168.1.20 interface:<br />

Options<br />

Posts: 18<br />

Kudos: 10<br />

Registered: 10-01-2012<br />

Bridge chain: FIREWALL, entries: 2, policy: ACCEPT<br />

-p IPv4 -i ath0.12 --ip-src 192.168.1.20 -j DROP<br />

-d 1:0:c:cc:cc:cc -i ath0.12 -j DROP<br />

3 of 51<br />

0 Kudos<br />

REPLY<br />

Mathieu<br />

Regular Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-26-2013 09:31 PM<br />

Options<br />

We added the following rules to the AP firewall to block the discovery and CDP packets from the 192.168.1.20 interface:<br />

Posts: 544<br />

Kudos: 37<br />

Solutions: 4<br />

Registered: 06-29-2010<br />

Bridge chain: FIREWALL, entries: 2, policy: ACCEPT<br />

-p IPv4 -i ath0.12 --ip-src 192.168.1.20 -j DROP<br />

-d 1:0:c:cc:cc:cc -i ath0.12 -j DROP<br />

what appen if a customer plug their router into the lan port ?<br />

i will never run a network witout a station in router mode.<br />

4 of 51<br />

0 Kudos<br />

REPLY<br />

feisley<br />

New Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-26-2013 10:16 PM<br />

Options<br />

what appen if a customer plug their router into the lan port ?<br />

Posts: 18<br />

Kudos: 10<br />

Registered: 10-01-2012<br />

i will never run a network witout a station in router mode.<br />

Our market is primarily business customers where we handle the installation of their equipment, thus this is unlikely to occur for our<br />

use case.<br />

However, we do take preventative measures in case of mistakes. We have the firewall enabled on the station which blocks DHCP,<br />

SMB, and other applications that should not extend into our network. We also block traffic not part of our customer IP ranges, to<br />

further inhibit a reversed router from causing any problems (other than the customer not getting internet until the router is installed<br />

properly)<br />

5 of 51<br />

0 Kudos<br />

REPLY<br />

sjackson909<br />

Regular Member<br />

Posts: 690<br />

Re: Bridged Network with VLAN Conguration<br />

01-27-2013 06:24 AM<br />

This is where canopys protocol filter page would be nice. I requested a while back but didn't catch on.<br />

forum.ubnt.com/showthread.php?t=65738<br />

Thanks<br />

Options<br />

3 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

Kudos: 189<br />

Solutions: 1<br />

Registered: 09-12-2011<br />

-Seth<br />

6 of 51<br />

0 Kudos<br />

REPLY<br />

adairw<br />

Regular Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-27-2013 09:10 AM<br />

Options<br />

Posts: 326<br />

Kudos: 145<br />

Solutions: 3<br />

Registered: 07-11-2010<br />

what appen if a customer plug their router into the lan port ?<br />

i will never run a network witout a station in router mode.<br />

I use bridge filters on the mikrotik. I can show my code if anyone cares.<br />

7 of 51<br />

1 Kudo<br />

REPLY<br />

adairw<br />

Regular Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-27-2013 09:12 AM<br />

Options<br />

Posts: 326<br />

Kudos: 145<br />

Solutions: 3<br />

Registered: 07-11-2010<br />

Thanks for sharing.<br />

This is pretty much how I setup my radios also except I don't use a management vlan. The management interface is on wlan0. I like<br />

the idea of the ip alias. Have to play around with that.<br />

8 of 51<br />

1 Kudo<br />

REPLY<br />

feisley<br />

New Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-27-2013 12:38 PM<br />

Options<br />

Posts: 18<br />

Kudos: 10<br />

Registered: 10-01-2012<br />

This is where canopys protocol filter page would be nice. I requested a while back but didn't catch on.<br />

forum.ubnt.com/showthread.php?t=65738<br />

Thanks<br />

-Seth<br />

Seth,<br />

Yea, the ease of simply checking the filtered protocols is nice, however, if what you want to block doesn't fit in that list or in the 3<br />

extra spaces they give you then you are out of luck.<br />

So I guess AirOS sacrifices some of the simplicity in exchange for a bit more power/flexibility. The ability to add any number of rules<br />

per device is handy. The firewall page could be expanded to allow raw ebtables/iptables rule entry for advanced configuration<br />

(eliminating the need to manually edit the config on the device)<br />

On a slightly unrelated subject... One thing I would like to see from Canopy is the separate rate limit for broadcast.<br />

9 of 51<br />

0 Kudos<br />

REPLY<br />

feisley<br />

New Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-27-2013 12:40 PM<br />

Options<br />

I use bridge filters on the mikrotik. I can show my code if anyone cares.<br />

Posts: 18<br />

Kudos: 10<br />

Registered: 10-01-2012<br />

I would be interested in this. I have just started looking at some of the MikroTik devices.<br />

4 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

10 of 51<br />

0 Kudos<br />

REPLY<br />

adairw<br />

Regular Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-27-2013 01:05 PM<br />

Options<br />

I would be interested in this. I have just started looking at some of the MikroTik devices.<br />

Posts: 326<br />

Kudos: 145<br />

Solutions: 3<br />

Registered: 07-11-2010<br />

I initially used this example to make my own functional rule.<br />

http://wiki.mikrotik.com/wiki/Bridge_Filter_-_Blocking_DHCP_Traffic<br />

/interface bridge filter<br />

add action=drop chain=forward dst-port=68 in-bridge=bridge-vpls-1002-Nat1 \<br />

ip-protocol=udp mac-protocol=ip src-address=!192.168.99.254/32 src-port=\<br />

67<br />

I use this rule on each tower router where I have a bridge from a VPLS tunnel to a VLAN.<br />

Using client isolation on the AP this basically allows dhcp responses to only be received by/from my server (99.254) that's in the<br />

core.<br />

Again, I do like you and bridge the CPE LAN interface to a VLAN that's bridged in the mikrotik to a VPLS tunnel that terminates back<br />

at my core router. I use VPLS as route-able vlan's so to speak. Currently there is a VPLS tunnel from my core router out to each<br />

tower router and all my towers are bridged together(in the core). But I think I'm about to break the bridge and terminate each tunnel<br />

at the core with it's own subnet and do routing/natting on each. Which will make the above filter a little useless but for now it works.<br />

11 of 51<br />

0 Kudos<br />

REPLY<br />

truverman<br />

Newbie<br />

Local Management<br />

01-28-2013 09:51 AM<br />

Ok, first off great post, exactly what i need to know.<br />

Options<br />

Posts: 7<br />

Registered: 12-14-2011<br />

i attached a photo of my config, it seems everything works EXCEPT the local management, can anyone notice why? thanks for any<br />

advise.<br />

16028<br />

5 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

12 of 51<br />

0 Kudos<br />

REPLY<br />

feisley<br />

New Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-28-2013 10:00 AM<br />

Options<br />

Ok, first off great post, exactly what i need to know.<br />

Posts: 18<br />

Kudos: 10<br />

Registered: 10-01-2012<br />

i attached a photo of my config, it seems everything works EXCEPT the local management, can anyone notice why? thanks<br />

for any advise.<br />

16028<br />

For local management, you need to be plugged directly into the wired interface (i.e. no router, NAT, etc). Additionally the computer<br />

must have an IP in that subnet (192.168.1.X) assigned to it.<br />

The other thing that could cause issues but is less likely is that both your WAN Management VLAN and the Local one are using the<br />

same subnet. The gateway interface for this subnet is specified as the management interface you selected. I have not tried this<br />

locally, but you may want to try changing one of the IPs to see if that clears things up.<br />

For example, in our network Local Admin is always 192.168.1.20 (to match factory <strong>Ubiquiti</strong> configuration). And our WAN<br />

management network is 10.10.2.X<br />

6 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

13 of 51<br />

0 Kudos<br />

REPLY<br />

truverman<br />

Newbie<br />

Re: Bridged Network with VLAN Conguration<br />

01-28-2013 10:05 AM<br />

thanks, testing now!<br />

Options<br />

Posts: 7<br />

Registered: 12-14-2011<br />

14 of 51<br />

0 Kudos<br />

REPLY<br />

truverman<br />

Newbie<br />

Re: Bridged Network with VLAN Conguration<br />

01-28-2013 10:09 AM<br />

Yep that was it, changed the test subnet to 192.168.2.x and it works. thanks!<br />

Options<br />

Posts: 7<br />

Registered: 12-14-2011<br />

15 of 51<br />

0 Kudos<br />

REPLY<br />

feisley<br />

New Member<br />

Re: Bridged Network with VLAN Conguration<br />

01-29-2013 09:26 PM<br />

Options<br />

Yep that was it, changed the test subnet to 192.168.2.x and it works. thanks!<br />

Posts: 18<br />

Kudos: 10<br />

Registered: 10-01-2012<br />

Awesome, glad it worked for you.<br />

16 of 51<br />

0 Kudos<br />

REPLY<br />

Mathieu<br />

Regular Member<br />

Re: Bridged Network with VLAN Conguration<br />

02-02-2013 09:09 AM<br />

Options<br />

I use bridge filters on the mikrotik. I can show my code if anyone cares.<br />

Posts: 544<br />

Kudos: 37<br />

Solutions: 4<br />

Registered: 06-29-2010<br />

sure it will be appreciated<br />

17 of 51<br />

0 Kudos<br />

REPLY<br />

adairw<br />

Regular Member<br />

Re: Bridged Network with VLAN Conguration<br />

02-02-2013 05:52 PM<br />

Options<br />

sure it will be appreciated<br />

Posts: 326<br />

Kudos: 145<br />

Solutions: 3<br />

Registered: 07-11-2010<br />

http://forum.ubnt.com/showpost.php?p=425756&postcount=11<br />

18 of 51<br />

0 Kudos<br />

REPLY<br />

jtf6xb<br />

Newbie<br />

Re: Bridged Network with VLAN Conguration<br />

02-12-2013 02:16 PM<br />

Options<br />

Posts: 2<br />

Registered: 02-11-2013<br />

Great post. Helped me confirm the configuration I was wanting to use for my CPE devices. I am curious about the vlan configuration<br />

of the AP. Do you create a bridge for each vlan?<br />

7 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

19 of 51<br />

0 Kudos<br />

REPLY<br />

Verde<br />

Member<br />

Posts: 111<br />

Kudos: 131<br />

Solutions: 4<br />

Registered: 08-12-2010<br />

Re: Bridged Network with VLAN Conguration<br />

02-12-2013 03:37 PM<br />

Agreed, great post. I also played around with my AP and this is what I can up with:<br />

On the AP:<br />

In Advanced Configuration Mode:<br />

1. Static IP 192.168.10.x<br />

2. Add vlan 10 & 12 to both ports (wlan0 & lan0)<br />

3. Bridge0 should only contain lan0.12 & wlan0.12<br />

4. Bridge1 should only contain lan0.10 & wlan0.10<br />

5. Assign Bridge1 to Management Interface<br />

It worked for me.<br />

Options<br />

20 of 51<br />

1 Kudo<br />

REPLY<br />

REPLY Message Listing Previous Topic Next Topic Previous 1 2 3 Next<br />

8 de 9 14/01/16 08:40


Bridged Network with VLAN Configuration - Ubiq...<br />

http://community.ubnt.com/t5/airOS-Software-Con...<br />

Platforms<br />

EdgeMax<br />

airMax<br />

airFiber<br />

airVision<br />

UniFi<br />

mFi<br />

Support<br />

Platforms<br />

Downloads<br />

Training<br />

Company<br />

About us<br />

Contact us<br />

Marketing<br />

Investors<br />

© 2016 <strong>Ubiquiti</strong> Networks. All rights reserved.<br />

Terms of Service<br />

Privacy policy<br />

9 de 9 14/01/16 08:40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!