I have a scenario where I have to specify a contiguous range of addresses in an ACL, using the least amount of entries possible. Problem is, that these addresses do not fall on any classful boundaries, makingi t hard for me to specify a valid address and wildcard mask to choose just the particular range I want. For example, I need to make permit statements for addresses 192.168.0.5 - 192.168.0.45, and deny statements for any other addresses on the 192.168.0.0/24 network. I KNOW I'm missing something incredibly simple here...Could someone hint at how I'd best approach this without making a pile of entries in the ACL?
By the way...this is being done for PBR based on source-address, in case you're wondering.
I think this will work. I don't think it can be done with just one or two ACL entries, but I am not the best at subnet math.
In reality you don't need the deny statements at the end as every access list has an implicit deny at the end. You could consider putting the denies at the top. This way you deny early. Where the denies are placed is really determined by what the majority of your traffic will be. If most of the traffic is in the allow range it might be best to put the allows first. If most of the traffic is in the deny range it might be best to put the denies first.
access-list 111 permit ip host 192.168.0.5 any
access-list 111 permit ip host 192.168.0.6 any
access-list 111 permit ip host 192.168.0.7 any
access-list 111 permit ip 192.168.0.8 0.0.0.7 any
access-list 111 permit ip 192.168.0.16 0.0.0.15 any
access-list 111 permit ip 192.168.0.32 0.0.0.7 any
access-list 111 permit ip 192.168.0.40 0.0.0.3 any
access-list 111 permit ip host 192.168.0.44 any
access-list 111 permit ip host 192.168.0.45 any
access-list 111 deny ip 192.168.0.0 0.0.0.3 any
access-list 111 deny ip host 192.168.0.4 any
access-list 111 deny ip host 192.168.0.46 any
access-list 111 deny ip host 192.168.0.47 any
access-list 111 deny ip 192.168.0.48 0.0.0.15 any
access-list 111 deny ip 192.168.0.64 0.0.0.63 any
access-list 111 deny ip 192.168.0.128 0.0.0.127 any
Question We run asr9001 with XR 6.1.3, and we have a very long delay to
login w/ SSH 1 or 2 to the device compare to IOS device. After
investigation, the there is 1s delay between the client KEXDH_INIT and
the server (XR) KEXDH_REPLY. After debug ssh serv...
Introduction The purpose of this document is to demonstrate the Open
Shortest Path First (OSPF) behavior when the V-bit (Virtual-link bit) is
present in a non-backbone area. The V-bit is signaled in Type-1 LSA only
if the router is the endpoint of one or ...
Hi, I am seeing quite a few issues with patch install and wanted to
share my experience and workaround to this. Login to admin via CLI, then
access root with the “shell” command Issue “df –h” and you’ll probably
see the following directory full or nearly ...