cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1305
Views
5
Helpful
8
Replies

automatically apply tag policy, tag rf, tag site on cisco 9800 wlc

Andrey128
Level 1
Level 1

as we know, per design new access point will get default tag policy, tag rf, tag site and will not provide wifi.

I have N+1 WLCs and its quite inconvenient manually assign tags for new access points and then need not to forget configure such static assignment of tag policy, tag rf, tag site on the second WLC.

I found such similar problem : https://community.cisco.com/t5/wireless/change-initial-tags-for-aps-connecting-to-9800-wlcs/td-p/4145556

My questions are:

1) does 9800 WLC provide possibility to test regex without applying it and without wasting new access points to join?

2) is suggested config

ap filter name DEFAULT-TAGS1
ap name-regex ^AP.*
tag policy CORP
tag rf EMEA-OFFICE-SD
tag site OFFICE-SITE

really will work or there are some actions, commands etc required

8 Replies 8

ammahend
VIP
VIP

1. Yes you can do it. Apply any regex for e.g ^Testing* and then change your AP name to Testing1, then the tags associated with ^Testing* regex filter will apply to this particular AP. 

2. it will work if all your AP name starts with AP, its done because by default new AP names are AP<mac address>, and provided you have not configured AP static TAG mapping already, it goes top down in that list, so static TAG mapping is given first priority. 

-hope this helps-

Rich R
VIP
VIP

You must also set the filter priority otherwise the filter is inactive:
https://www.cisco.com/c/en/us/td/docs/wireless/controller/9800/config-guide/newconfigmodel/b_catalyst-9800-configuration-model/m_creating-an-ap-filter.html

As Rich indicated, filter priority is needed. Here is a simple example for any AP names got "WBO-BOU" keyword

ap filter name WBO-BOU
ap name-regex WBO-BOU
tag policy pt1-all-other
tag rf tag_rf_shd
tag site st6-other-sites
!
ap filter priority 500 filter-name WBO-BOU

Even after AP name change, if you do not see new tag assignment, you have to reset CAPWAP for that AP in order to take your config effect. You can do that easily using WLC CLI.

WLC#ap name <AP_NAME> reset capwap

HTH
Rasika
*** Pls rate all useful responses ***

Andrey128
Level 1
Level 1

thanks for all suggestions:

I've tested, its working. AP gets related tags and applies related new tags immediately if I change AP's name per my regex.

Not convenient that WLC not offering a tool to test regexp, e.g.

#sh ip bgp regexp ^abc
% BGP not active

It does have some TCL shell regex , I've not tested it yet:

#tclsh
WLC(tcl)#regexp {[123]*4+ab$} 444ab

 

Garry Cross
Level 1
Level 1

Hi, it seems the above should work, but it does not seem to be working in my config.We are testing and using 17.9.3 because it supports the 3702. This is also a C9800-CL in Azure. In order for the 3702 to join we have been reseting the config in the 3702. When it joins the controller it is joined with name AP046273e1d0bc. I have an ap filter configured as follows.

ap filter name Toronto
ap name-regex ^TOR*.
tag policy default-policy-tag
tag rf TORONTO
tag site Toronto

When I looked at it with show ap tag sum, it was misconfigured, and had all the default tags and it said static assignment.

When I looked at the config it had a policy-tag with the name of an ap profile tag configured under the ap. It may have been erroniously placed there by a colleague. I renamed the ap TOR-APXXX but the filter did not take affect. I remove the faulty policy tag from the ap config and it left and rejoined but kept all the default tags and did not follow the filter rule. Misconfigured was now a no but the tag assignment was still static.

My thoughts on this are that one will need an ap filter with a regex of ^AP*. and assign some group of tags. Then rename the ap appropriately and hopefully the Toronto filter will now kick in. Without the filter it seems that the tags get assigned statically with no way to change them with a filter as the priority cannot be changed for static or location and once assigned static thats it.

Do we have any thoughts on this matter?

 

@Garry Cross did you read my and @Rasika Nayanajith replies above? 
The regex will not work (inactive) until you set the ap filter priority - which you make no mention of in your config snippet.

When you have done that, and the AP has the correct name, then "ap name TOR-APXXX reset capwap" and it should re-join and pick up the regex settings.

JPavonM
VIP
VIP

@Garry Cross if you are resetting AP3702 before joining then you need to change your 'ap name regex' from ^TOR to ^AP.

Garry Cross
Level 1
Level 1

I have the ap back on the C9800-CL. The tag summary now indicates "Default" tag assignment. I have renamed it again. I will try the ap tag revalidate command first before doing the reset capwap command.

Rich, I do have the priority set

ap filter priority 1 filter-name Toronto

ap filter name Toronto
ap name-regex ^TOR*.
tag policy default-policy-tag
tag rf TORONTO
tag site Toronto

Just to confirm the regex could be TOR, ^TOR, or ^TOR*. and all will work for ap name TOR-APXX-YYY.

Thx.

Review Cisco Networking for a $25 gift card