Access - List
Access - List
Access - List
Deny
Permit
Deny
TCP
UDP
ICMP
RIP
Packet
HOST A Deny
Subnet 3 Permit
Interface
Network 5 Permit E0
Protocol X Deny
“Bit
Bucket”
Everything Deny
Source
Host C, Subnet 4, Network 7
Protocol Y ?
K K Singh, DGM(DX), ALTTC 10
Sequentiality
• Access lists are executed sequentially,
from top down.
• Wrong sequence of filters may result in
undesirable functioning of Access list.
• Most common cause of malfunctioning
access list is putting the individual
filtering lines in wrong sequence.
Source Source
10. 23. 147. 00 10. 23. 147. 00
“Bit
Bucket”
s0 s0
Pune s1 Subnet 10.1.129.0 s1 Bangalore
A B C D
10.1.2.1 10.1.2.2
In case of link failure between Pune and Delhi, Pune will learn a route to 10.1.1.0/24
From Bangalore and packets from A to E&F will now leave Pune through s1 link
Without being filtered. Similarly Link failure between Bangalore and Pune will allow
Bangalore to send traffic via s0 without getting filtered.
K K Singh, DGM(DX), ALTTC 18
Extended IP Access Lists
• Extended IP access lists are almost
identical to standard IP access lists in
their use.
• As with standard lists, extended access
lists are enabled for packet entering or
exiting an interface.
• Apart from source addresses extended
access list can match destination IP
address, source & destination port nos,
protocol etc.
Examine no
Source Match ?
Address
yes
Go to
Next
Level
Examine no
Source Match ?
Address
yes
Examine no
Source Match ?
Address
yes
Schedule Specified
Action
Example :
Access-list 110 permit udp 10.64.32.0 0.0.0.255 host 172.22.15.87 eq 69
Access-list 110 permit udp any host 172.22.15.85 eq 53
Access-list 110 permit udp any any eq 161
Interface serial 3
Interface ethernet 0 Ip access-group 2 out
Ip access-group 1 in
Vty Process
Line vty 0 4
Access-class 3 in
Access-class 4 out
A B C D
10.1.2.1 10.1.2.2 10.1.3.1 10.1.3.2
Interface serial 0
Ip access-group 110
!
Interface serial 1
Ip access-group 111
! Criterion 1 met with next statement
Access-list 110 permit tcp any host 10.1.1.2 eq www
! Criterion 2 met with next statement
Access-list 110 deny udp 0.0.0.128 255.255.255.127 host 10.1.1.1
! Criterion 3 met with next statement
Access-list 110 deny ip 10.1.2.0 0.0.0.255 10.1.3.0 0.0.0.255
! Criterion 5 met with next statement
Access-list 110 permit ip any any
!
! Criterion 1 met with next statement
Access-list 111 permit tcp any host 10.1.1.2 eq www
! Criterion 2 met with next statement
Access-list 111 deny udp 0.0.0.128 255.255.255.127 host 10.1.1.1
! Criterion 5 met with next statement
Access-list 111 permit ip any any
Interface serial 0
Ip access-group 110
!
Interface serial 1
Ip access-group 111
!
! Criterion 1 met with next statement
Access-list 110 permit tcp any host 10.1.1.2 eq www
! Criterion 2 met with next statement
Access-list 110 deny udp 0.0.0.128 255.255.255.127 host 10.1.1.1
! Criterion 3 met with next statement
Access-list 110 deny ip 10.1.3.0 0.0.0.255 10.1.2.0 0.0.0.255
! Criterion 5 met with next statement
Access-list 110 permit ip any any
!
! Criterion 1 met with next statement
Access-list 111 permit tcp any host 10.1.1.2 eq www
! Criterion 2 met with next statement
Access-list 111 deny udp 0.0.0.128 255.255.255.127 host 10.1.1.1
! Criterion 5 met with next statement
Access-list 111 permit ip any any
Interface serial 0
Ip access-group 112
!
Interface serial 1
Ip access-group 112
!
! Criterion 4 met with next four statements
Access-list 112 deny ip host 10.1.1.130 host 10.1.3.2
Access-list 112 deny ip host 10.1.1.28 host 10.1.3.2
Access-list 112 permit ip host 10.1.1.130 any
Access-list 112 permit ip host 10.1.1.28 any
! Criterion 5 met with next statement
Access-list 112 permit ip any any
Router#
Router# conf t
Router(config)#
Router(config)# ip access-list extended bsnl
Router(config-ext-nacl)# permit tcp host 10.1.1.2 eq www any
Router(config-ext-nacl)# deny udp host 10.1.1.1 0.0.0.128 255.255.255.127
Router(config-ext-nacl)# deny ip 10.1.3.0 0.0.0.255 10.1.2.0 0.0.0.255
Router(config-ext-nacl)# deny ip host 10.1.1.130 host 10.1.3.2
Router(config-ext-nacl)# deny ip host 10.1.28 host 10.1.3.2
Router(config-ext-nacl)# permit ip any any
Router(config-ext-nacl)# ^Z
Router(config)# interface serial 1
Router(config-int)# ip access-group bsnl
Router(config-int)# ^Z
Router(config)# ^Z
Router#
10.1.129.9/30 s0 10.1.129.5/30
s0
Pune s1 10.1.129.1/30 Bangalore
10.1.2.1 s1
10.1.3.1
10.1.129.1/30 e0
e0
Subnet 10.1.2.0/24 Subnet 10.1.3.0/24
A B C D
10.1.2.2 10.1.2.3 10.1.3.2 10.1.3.3