cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
223
Views
0
Helpful
3
Replies

Simple access list question

whiteford
Level 1
Level 1

On a router I have added:

line vty 0 4

access-class 50 in

and i was wondering if I can add an IP range for the access-list 50?

At the moment I just do:

access-list 50 permit 172.19.1.10

access-list 50 permit 172.19.1.11

access-list 50 permit 172.19.1.12

Can I do something like:

access-list 50 permit 172.19.1.10-15?

3 Replies 3

mahmoodmkl
Level 7
Level 7

Hi

U can use the wildcard masks to provide the range for the IP's.What is the subnet mask fot this IP's

Thanks

Mahmood

Hi, it's:

255.255.255.0

paul.matthews
Level 5
Level 5

10-50 would be awkward. You can use wildcards

access-list 50 permit 172.19.1.8 0.0.0.7 would permit 8-15, it all depends on exactly what addresses you need to permit, what the consequences of allowing a couple extra are compared to the convenience of a single entry.

If you really must do 10-15, with no others, try:

access-list 50 permit 172.19.1.10 0.0.0.1

access-list 50 permit 172.19.1.12 0.0.0.3

Where the first permits 10 & 11, and the second prmits 12-15

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco