Access control list is used for security on a Network from other Network. By this we restrict an IP or pool of IP to access a computer or a Network. And by the same way we can allow it to one system or no of system to access the system or network.
Type of ACL
- Standard ACL (1-99)
- Extended ACL (100-999)
Standard Access Control List:
It works on IP based packet filtering, to allow or deny a network of a specific computer on network. It is based on source IP. It work on priority base, when we put the permit condition first so first it will permit then will block the other IP.
Configuration on Router 1
- Router1# conf terminal
- Router(config)# int e0
- Router(config_if)# ip add 192.168.10.10 255.255.255.0
- Router(config_if)# no shut
- Router(config_if)# exit
- Router(config)# int s0
- Router(config_if)# ip add 1.1.1.1 255.255.255.0
- Router(config_if)# no shut
- Router(config_if)# clock rate 6400
- Router(config_if)# router rip
If we want to configure on RIP v2 so do as
- Router(config_router)# version v2
- Router(config_router)# network 192.168.10.0
- Router(config_router)# network 1.0.0.0
- Router(config_router)# exit
To allow the traffic of Router 2, ip 192.168.20.1 on Router 1 and block the other
- Router1(config)# Access-list 10 permit ip 192.168.20.1 0.0.0.0
- Router1(config)# access-list 10 deny any
- Router1(config)# int s0
- Router1(config_if)# ip access-group 10 in
- Router1(config_if)# exit
To allow all except 192.168.20.1 on Router 1
- Router1(config)# access-list 10 deny ip 192.168.20.1 0.0.0.0
- Router1(config)# access-list 10 permit any
- Router1(config)# int s0
- Router1(config_if)# ip access-group 10 in
- Router1(config_if)# exit
- Rotuer1(config)# exit
- Router1#
To allow 192.168.20.10 and 192.168.20.30 on Router1
- Router1(config)# access-list 10 permit ip 192.168.20.10 0.0.0.0
- Router1(config)# access-list 10 permit ip 192.168.20.30 0.0.0.0
- Router1(config)# access-list 10 deny any
- Router1(config)# int s0
- Router1(config_if)# ip access-group 10 in
- Router1(config_if)# exit
- Rotuer1(config)# exit
- Router1#
To allow 1st 3 then block from 4-15 and then allow from 16-30 on Router 1
- Router1(config)# access-list 10 permit ip 192.168.20.0 0.0.0.3
- Router1(config)# access-list 10 deny ip 192.168.20.0 0.0.0.15
- Router1(config)# access-list 10 permit ip 192.168.20.0 0.0.0.30
- Router1(config)# int s0
- Router1(config_if)# ip access-group 10 in
- Router1(config_if)# exit
- Rotuer1(config)# exit
- Router1#
Now do the configuration on router 2 as
- Router2> enable
- Router# conf terminal
- Router(config)#int e0
- Router(config_if)# ip add 192.168.20.10 255.255.255.0
- Router(config_if)# no shut
- Router(config_if)# exit
- Router(config)# int s0
- Router(config_if)# ip add 1.1.1.2 255.255.255.0
- Router(config_if)# no shut
- Router(config_if)# clock rate 64000
- Router(config_if)# exit
- Router(config)# router rip (for rip v2 just type version 2)
- Router(config_router)# version 2
- Router(config_router)# network 192.168.20.0
- Router(config_router)# network 1.0.0.0
- Router(config_router)# exit
- Router(config)# exit
- Router# exit
Type of ACL
- Standard ACL (1-99)
- Extended ACL (100-999