Solved

Cisco Access Control List Order

Posted on 2014-07-23
5
574 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MPLS Network Question 2 35
Cisco iWAN 8 46
Choosing a firewall for our broadband cable connection 2 31
Cisco / asa /Nagios 3 10
If you have an ASA5510 then this sort of thing would be better handled with a CSC Module, however on an ASA5505 thats not an option, and if you want to throw in a quick solution to stop your staff going to facebook during work time, then this is the…
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now