cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1137
Views
5
Helpful
3
Replies

Create a ACL With command script

Your challenge is to create an ACL that will allow the Right PC to ping the Left only if the IP address of the PC is an ‘even’ number. However, if the Right PC IP address is an odd number, it cannot (or should not be able to) ping the Left PC!

 

not sure on how to do this using command script ? Any ideas thanks

 

 

3 Replies 3

Not sure what you mean with 'command script', but have a look at the sample configuration below.
A PC with IP address 192.168.10.2/24 (Left PC) is connected to interface GigabitEthernet0/0.
Any PC connected to Gigabitthernet0/1 with an odd IP address is not allowed to ping 192.168.10.2, any
PC with an even address is.

interface GigabitEthernet0/0
description Link to Left_PC
ip address 192.168.10.1 255.255.255.0
!
interface GigabitEthernet0/1
description Link to Right_PCs
ip address 192.168.20.1 255.255.255.0
ip access-group 101 out
!
access-list 101 permit icmp 192.168.10.0 0.0.0.255 192.168.20.0 0.0.0.254 echo-reply

What’s your email I’ll show you the question I have as I’m struggling

pauwen@hotmail.com

Review Cisco Networking for a $25 gift card