cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
634
Views
5
Helpful
4
Replies

access lists on Cisco 2900

roncro
Level 3
Level 3

Hello,

 

I have an access list on my Cisco 2900 router, like so:

access-list 103 permit ip host 192.168.3.17 any

 

and would like to have another host in there, then just the one.   instead of 192.168.3.17   I want 192.168.3.17 and 192.168.3.40 in there.   I could do the whole subnet, but I want just the 2 IP addresses in that access list.

 

(I tried: "access-list 103 permit ip host 192.168.3.17 192.168.3.40 any "  but of course that didn't work.)

 

any ideas on how to do that?

 

thanks,

 

Ron

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

you need to add like below :

 

access-list 103 permit ip host 192.168.3.17 any

access-list 103 permit ip host 192.168.3.40 any

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

you need to add like below :

 

access-list 103 permit ip host 192.168.3.17 any

access-list 103 permit ip host 192.168.3.40 any

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

@balaji.bandi is quite correct about how to add an entry for a second host. I would point out that with this access list as it exists so far these 2 hosts would be the only hosts in that subnet that are permitted because of the implicit deny ip any any that is at the bottom of the access list. We do not know anything about the environment of the original post and exactly how this access list will be used. If it is to be used for something like Policy Based Routing then perhaps only permit 2 hosts is exactly what is desired. But if it is to applied to the interface to filter traffic perhaps the result is not what is really wanted.

HTH

Rick

Hello Richard,

that host is a data-logger and in a vlan with other stuff, that host is one of the few that actually pushes data out on the internet. So yes, that is what I wanted.

 

thanks,

 

Ron

cool!  thanks,

 

sometimes it is "that" simple isn't it?

Review Cisco Networking products for a $25 gift card