Solved

Cisco Access Control List Order

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
When speed and performance are vital to revenue, companies must have complete confidence in their cloud environment.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

734 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