<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How a policy-map process multiple class-map associated to it in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519896#M627553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly it. The implicit deny in the ACL doesn't play in the class-maps.&lt;/P&gt;&lt;P&gt;Take care,&lt;/P&gt;&lt;P&gt;PK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Nov 2010 20:48:49 GMT</pubDate>
    <dc:creator>Panos Kampanakis</dc:creator>
    <dc:date>2010-11-04T20:48:49Z</dc:date>
    <item>
      <title>How a policy-map process multiple class-map associated to it?</title>
      <link>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519893#M627504</link>
      <description>&lt;P&gt;Hi experts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a request from my boss to block different websites for different source IPs. I was able to block the same websites for all the IPs. Then I thought that I just needed to "deny the special IPs" from the original class-map and created a new class-map and "permit only these special IPs". Anyway here is my config. I want to block "monster" websites for IP 10.26.105.107 (which is my laptop, for testing purpose)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;regex BLOCKURLLIST01 "\.facebook\.com"&lt;BR /&gt;regex BLOCKURLLIST11 "\.monster\."&lt;BR /&gt;regex BLOCKURLLIST02 "evony\.com"&lt;BR /&gt;regex BLOCKURLLIST03 "twitter\.com"&lt;BR /&gt;regex BLOCKURLLIST04 "youtube\.com"&lt;BR /&gt;regex BLOCKURLLIST05 "boutell\.com"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;class-map type regex match-any CMAP_BLOCKURLLIST&lt;BR /&gt; match regex BLOCKURLLIST01&lt;BR /&gt; match regex BLOCKURLLIST02&lt;BR /&gt; match regex BLOCKURLLIST05&lt;BR /&gt; match regex BLOCKURLLIST03&lt;BR /&gt; match regex BLOCKURLLIST04&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;class-map type regex match-any CMAP_BLOCKURLLIST.1&lt;BR /&gt; match regex BLOCKURLLIST11&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;class-map type inspect http match-all CMAP_INSPECTURLLIST&lt;BR /&gt; match request header host regex class CMAP_BLOCKURLLIST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;class-map type inspect http match-all CMAP_INSPECTURLLIST.1&lt;BR /&gt; match request header host regex class CMAP_BLOCKURLLIST.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;policy-map type inspect http PMAP_URLLIST&lt;BR /&gt;&amp;nbsp; parameters&lt;BR /&gt;&amp;nbsp;&amp;nbsp; protocol-violation action log&lt;BR /&gt;&amp;nbsp; class CMAP_INSPECTURLLIST&lt;BR /&gt;&amp;nbsp;&amp;nbsp; drop-connection log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;policy-map type inspect http PMAP_URLLIST.1&lt;BR /&gt; parameters&lt;BR /&gt;&amp;nbsp; protocol-violation action log&lt;BR /&gt; class CMAP_INSPECTURLLIST.1&lt;BR /&gt;&amp;nbsp; drop-connection log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;access-list INSPECTURL extended deny tcp host 10.26.105.107 any eq www&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;access-list INSPECTURL extended permit tcp any any eq www&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;access-list INSPECTURL.1 extended permit tcp host 10.26.105.107 any eq www&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;class-map CMAP_HTTP&lt;BR /&gt; match access-list INSPECTURL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;class-map CMAP_HTTP.1&lt;BR /&gt; match access-list INSPECTURL.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;policy-map PMAP_INSPECTURL&lt;BR /&gt; class CMAP_HTTP&lt;BR /&gt;&amp;nbsp; inspect http PMAP_URLLIST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; class CMAP_HTTP.1&lt;BR /&gt;&amp;nbsp; inspect http PMAP_URLLIST.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;service-policy PMAP_INSPECTURL interface inside&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The config in blue are the old config and they still work for the rest IPs. However my laptop now can go to any websites including "monster". My regex should be fine because once I added the #11 regex in the original class-map and nobody (expect my laptop) can go to "monster" any more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also found that the new ACL doesn't match any www traffic from me. However the counter of the "deny" clause in the old ACL does match my traffic.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;fw-dc-01(config)# sh access-list INSPECTURL&lt;BR /&gt;access-list INSPECTURL; 2 elements&lt;BR /&gt;access-list INSPECTURL line 1 extended deny tcp host 10.26.105.107 any eq www (hitcnt=&lt;SPAN style="color: #ff0000;"&gt;369&lt;/SPAN&gt;) 0xcce40994&lt;BR /&gt;access-list INSPECTURL line 2 extended permit tcp any any eq www (hitcnt=320948) 0x375d6ac6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;fw-dc-01(config)# sh access-list INSPECTURL.1&lt;BR /&gt;access-list INSPECTURL.1; 1 elements&lt;BR /&gt;access-list INSPECTURL.1 line 1 extended permit tcp host 10.26.105.107 any eq www (hitcnt=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #ff0000;"&gt;0&lt;/SPAN&gt;) 0x06b294db&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I'm wondering how a policy-map process multiple class-maps. I thought that it should process them in order of their sequence in the config. If the traffic doesn't match the first class-map then it will be matched against the 2nd, until there is a match or no class-maps are left...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I figured that one policy-map may only process one class-map of same type (inspect HTTP). In order to prove my point, I changed the sequence of class-maps in the policy-map. Now it looks like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;policy-map PMAP_INSPECTURL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; class CMAP_HTTP.1&lt;BR /&gt;&amp;nbsp; inspect http PMAP_URLLIST.1&lt;BR /&gt; class CMAP_HTTP&lt;BR /&gt;&amp;nbsp; inspect http PMAP_URLLIST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As expected, I can't browse monster anymore. However to my surprise, rest IPs are still blocked from the other websites!! If the policy-map only processes the first class-map, then obviously in this test it did process the other one!! But why it didn't work in the original sequence???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guys I'm so lost... Help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Difan&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 19:05:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519893#M627504</guid>
      <dc:creator>Difan Zhao</dc:creator>
      <dc:date>2019-03-11T19:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How a policy-map process multiple class-map associated to it</title>
      <link>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519894#M627522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the class maps match the same protocols and ip addresses then as you are saying you will be matching only the first one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though, in your case you are matching a class-map. You are matching the first class-map, but you are matching the deny in the ACL (it is still a match). So, you will not be subject to the first policy (deny in the ACL), but the second policy will not be evaluated either&amp;nbsp; because you matches the deny. It seems kind of strange but I am explaining how the feature works. There has been an enhancement request for this, but I don't think that it has been fixed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it clarifies it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 18:06:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519894#M627522</guid>
      <dc:creator>Panos Kampanakis</dc:creator>
      <dc:date>2010-11-04T18:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: How a policy-map process multiple class-map associated to it</title>
      <link>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519895#M627539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PK,&lt;/P&gt;&lt;DIV class="jive-thread-username"&gt; &lt;/DIV&gt;&lt;DIV class="jive-thread-username"&gt;Thanks for quick response! I think I got your point: if there is a match (no matter whether it's permit or deny) in the previous class-map, the next class-map won't run. However, just curious, all the ACL has an implied "deny any any" at the end of the list. So I guess this last "deny" clause won't "match" anything in the class-map then??&lt;/DIV&gt;&lt;DIV class="jive-thread-username"&gt; &lt;/DIV&gt;&lt;DIV class="jive-thread-username"&gt;Thanks!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 20:31:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519895#M627539</guid>
      <dc:creator>Difan Zhao</dc:creator>
      <dc:date>2010-11-04T20:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: How a policy-map process multiple class-map associated to it</title>
      <link>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519896#M627553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly it. The implicit deny in the ACL doesn't play in the class-maps.&lt;/P&gt;&lt;P&gt;Take care,&lt;/P&gt;&lt;P&gt;PK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 20:48:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/how-a-policy-map-process-multiple-class-map-associated-to-it/m-p/1519896#M627553</guid>
      <dc:creator>Panos Kampanakis</dc:creator>
      <dc:date>2010-11-04T20:48:49Z</dc:date>
    </item>
  </channel>
</rss>

