Solved

Cisco Access Control List Order

Posted on 2014-07-23
5
624 Views
Last Modified: 2014-07-27
With the code below, it allows a device to send a broadcast for a DHCP address. Once it gets a 192.168.81.x IP it should be able to communicate over the network.  My question is, doesn't the deny statements get hit first and 'match' the 192.168.81.x address before it hits the permit statement for that network?

ip access-list extended guest-wifi
 permit udp any any eq bootps
 permit udp any any eq bootpc
 deny   ip any 192.168.0.0 0.0.255.255
 deny   ip any 172.16.0.0 0.15.255.255
 deny   ip any 10.0.0.0 0.255.255.255
 permit ip 192.168.81.0 0.0.0.255 any
0
Comment
Question by:lconnell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 50

Expert Comment

by:Don Johnston
ID: 40215290
My question is, doesn't the deny statements get hit first and 'match' the 192.168.81.x address before it hits the permit statement for that network?
You are correct. The "permit ip 192.168.81.0 0.0.0.255 any" should be before the deny statement.
0
 
LVL 18

Expert Comment

by:Akinsd
ID: 40215424
The 1st line of an acl is hit 1st before the 2nd line and so forth.
Once a match exists, the device stops checking through the lines.

In your example,  access-list extended guest-wifi
10  permit udp any any eq bootps
 20 permit udp any any eq bootpc
30  deny   ip any 192.168.0.0 0.0.255.255
 40 deny   ip any 172.16.0.0 0.15.255.255
50  deny   ip any 10.0.0.0 0.255.255.255
 60 permit ip 192.168.81.0 0.0.0.255 any

I added the sequence numbers to explain this
10 gets hit first, then 20, then 30 etc

60 would never get a hit as seq 30 matches that address. This means 192.168.81.0 /24 will be denied based on seq 30
0
 
LVL 6

Accepted Solution

by:
gcl_hk earned 250 total points
ID: 40218449
Better to clarify "match the 192.168.81.x address before it hits the permit" the matching address you mean source or destination?

This ACL should be working normally if it is for the guest network purpose. The deny statements are to prevent the 192.168.81.x subnet to communicate with any other internal subnets, and the last permit statement is to allow the 192.168.81.x to reach internet. No conflict at all.
0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 40218455
Good catch gcl_hk.  I missed the source/destination (I'll blame it on the iPad)  :-)

You're absolutely right. Only traffic to private addresses would be blocked by the ACL.   Internet traffic would be permitted.
0
 

Author Closing Comment

by:lconnell
ID: 40222585
Thank you to everyone who commented, very much appreciated! :)
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This past year has been one of great growth and performance for OnPage. We have added many features and integrations to the product, making 2016 an awesome year. We see these steps forward as the basis for future growth.
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question