cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
622
Views
10
Helpful
4
Replies

Subnet help

rsamuel708
Level 1
Level 1

I have the following /16 172.31.0.0/16 that I'm trying to create an access list for. I'd like to allow 172.31.240.0/24 but deny all else, so I'm looking the best way to accomplish this with 2 acl lines.

Any help would be appreciated?

/rls

1 Accepted Solution

Accepted Solutions

Mark Yeates
Level 7
Level 7

Robert,

Just a simple permit of the 172.31.240.0 subnet and deny the whole subnet will be sufficient.

permit ip 172.31.240.0 0.0.0.255

deny ip 172.31.0.0 0.0.255.255

HTH,

Mark

View solution in original post

4 Replies 4

Mark Yeates
Level 7
Level 7

Robert,

Just a simple permit of the 172.31.240.0 subnet and deny the whole subnet will be sufficient.

permit ip 172.31.240.0 0.0.0.255

deny ip 172.31.0.0 0.0.255.255

HTH,

Mark

Thanks for the quick answer. Guess I was over-thinking the obvious!

/rls

Glad I was able to help!

Good Luck,

Mark

singhsaju
Level 4
Level 4

Hi,

The access list if you want to allow ip traffic sourced from 172.31.240.0/24 only as following :

access-list 100 permit ip 172.31.240.0 0.0.0.255 any

access-list 100 deny ip any any

Basically you need only one permit statement because there is implicit deny at the end of access-list.

HTH

Saju

Pls rate if it helps

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card