INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Create ACL for ip range

Create ACL for ip range

(OP)
Hi All,

Trying to create an ACL for the following below.

10.134.76.100-105
permit ip 10.134.76.100-105 host 10.242.254.146
permit ip 10.134.76.100-105 host 10.227.232.12
permit ip 10.134.76.100-105 host 10.227.238.91
permit ip 10.134.76.100-105 host 10.228.18.7
permit ip 10.134.76.100-105 host 10.242.127.21
permit ip 10.134.76.100-105 host 10.228.127.22
deny ip 10.134.76.100-105 to 135 any
permit ip any any

When I enter the following ACL below onto my router is looks the following below.
ACL Entered
Access-list 120 permit ip 10.134.76.100 0.0.0.5 host 10.242.254.146
Access-list 120 permit ip 10.134.76.100 0.0.0.5 host 10.227.232.12
Access-list 120 permit ip 10.134.76.100 0.0.0.5 host 10.227.238.91
Access-list 120 permit ip 10.134.76.100 0.0.0.5 host 10.228.18.7
Access-list 120 permit ip 10.134.76.100 0.0.0.5 host 10.228.127.21
Access-list 120 permit ip 10.134.76.100 0.0.0.5 host 10.228.127.22
Access-list 120 deny ip 10.134.76.100 0.0.0.5 any
Access-list 120 permit ip any any

Results of a SH RUN
access-list 120 permit ip 10.134.76.96 0.0.0.5 host 10.242.254.146
access-list 120 permit ip 10.134.76.96 0.0.0.5 host 10.227.232.12
access-list 120 permit ip 10.134.76.96 0.0.0.5 host 10.227.238.91
access-list 120 permit ip 10.134.76.96 0.0.0.5 host 10.228.18.7
access-list 120 permit ip 10.134.76.96 0.0.0.5 host 10.228.127.21
access-list 120 permit ip 10.134.76.96 0.0.0.5 host 10.228.127.22
access-list 120 deny ip 10.134.76.96 0.0.0.5 any
access-list 120 permit ip any any

Can anyone please let me know if this is correct or how I would add the ACL to allow range from 10.134.76.100 to 105. Thanks

RE: Create ACL for ip range

If you are looking to allow just 10.134.76.100-.105 to these hosts, and deny the rest of the 10.134.76.0/24 range, you could do (remember you have to use inverse masks!):

access-list 100 permit ip host 10.134.76.100 host 10.242.254.146
access-list 100 permit ip host 10.134.76.101 host 10.242.254.146
access-list 100 permit ip host 10.134.76.102 host 10.242.254.146
access-list 100 permit ip host 10.134.76.103 host 10.242.254.146
access-list 100 permit ip host 10.134.76.104 host 10.242.254.146
access-list 100 permit ip host 10.134.76.105 host 10.242.254.146
access-list 100 permit ip host 10.134.76.100 host 10.227.232.12
access-list 100 permit ip host 10.134.76.101 host 10.227.232.12
access-list 100 permit ip host 10.134.76.102 host 10.227.232.12
access-list 100 permit ip host 10.134.76.103 host 10.227.232.12
access-list 100 permit ip host 10.134.76.104 host 10.227.232.12
access-list 100 permit ip host 10.134.76.105 host 10.227.232.12
access-list 100 permit ip host 10.134.76.100 host 10.227.238.91
access-list 100 permit ip host 10.134.76.101 host 10.227.238.91
access-list 100 permit ip host 10.134.76.102 host 10.227.238.91
access-list 100 permit ip host 10.134.76.103 host 10.227.238.91
access-list 100 permit ip host 10.134.76.104 host 10.227.238.91
access-list 100 permit ip host 10.134.76.105 host 10.227.238.91
access-list 100 permit ip host 10.134.76.100 host 10.228.18.7
access-list 100 permit ip host 10.134.76.101 host 10.228.18.7
access-list 100 permit ip host 10.134.76.102 host 10.228.18.7
access-list 100 permit ip host 10.134.76.103 host 10.228.18.7
access-list 100 permit ip host 10.134.76.104 host 10.228.18.7
access-list 100 permit ip host 10.134.76.105 host 10.228.18.7
access-list 100 permit ip host 10.134.76.100 host 10.242.127.21
access-list 100 permit ip host 10.134.76.101 host 10.242.127.21
access-list 100 permit ip host 10.134.76.102 host 10.242.127.21
access-list 100 permit ip host 10.134.76.103 host 10.242.127.21
access-list 100 permit ip host 10.134.76.104 host 10.242.127.21
access-list 100 permit ip host 10.134.76.105 host 10.242.127.21
access-list 100 permit ip host 10.134.76.100 host 10.242.127.22
access-list 100 permit ip host 10.134.76.101 host 10.242.127.22
access-list 100 permit ip host 10.134.76.102 host 10.242.127.22
access-list 100 permit ip host 10.134.76.103 host 10.242.127.22
access-list 100 permit ip host 10.134.76.104 host 10.242.127.22
access-list 100 permit ip host 10.134.76.105 host 10.242.127.22
access-list 100 deny ip 10.134.76.0 0.0.0.255 any
permit ip any any


Then apply to your interface:
Interface GigabitEthernet0/1
ip access-group 100 in
ip access-group 100 out


Hope this helps.

RE: Create ACL for ip range

(OP)
Thank you so much for the reply. Yes it helped a lot. Thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close