EXT ACLs
EXT ACLs
EXT ACLs
Extended ACLs
Extended ACLs are used more often than standard ACLs because they provide a greater range of control. Extended ACLs check the source and destination packet addresses as well as being able to check for protocols and port numbers. This gives greater flexibility to describe what the ACL will check. Packets can be permitted or denied access based on where the packet originated and its destination as well as protocol type and port addresses.
The ip access-group command links an existing extended ACL to an interface. Remember that only one ACL per interface, per direction, per protocol is allowed. The format of the command is: Router(config-if)#ip access-group access-list-number {in | out}
Once access list has been created you must apply it to an interface. Use the same command as the IP standard list RouterA(config-if)ip access-group 110 in or RouterA(config-if)ip access-group 110 outRouterA(config-if)ip access-group 110 in
Sales 172.16.40.0
Example 1
172.16.20.0/24 s0 RouterA .1 e0 .1 s0 .2 RouterB .1 e0 172.16.40.0/24 s1 .1 s0 .2 RouterC .1 e0 Administration Sales Engineering
172.16.10.3/24 172.16.10.2/24
172.16.30.3/24 172.16.30.2/24
172.16.50.3/24 172.16.50.2/24
Port 80
Task What if we wanted Router A to permit only the Engineering workstation 172.16.50.2 to be able to access the web server in Administrative network with the IP address 172.16.10.2 and port address 80. All other traffic is denied.
11
Example 1
172.16.20.0/24 s0 RouterA .1 e0 .1 s0 .2 RouterB .1 e0 172.16.40.0/24 s1 .1 s0 .2 RouterC .1 e0 Administration Sales Engineering
172.16.10.3/24 172.16.10.2/24
172.16.30.3/24 172.16.30.2/24
172.16.50.3/24 172.16.50.2/24
Port 80
RouterA(config)#access-list 110 permit tcp host 172.16.50.2 host 172.16.10.2 eq 80 RouterA(config)#inter e 0 RouterA(config-if)#ip access-group 110 out
Why is better to place the ACL on RouterA instead of RouterC? Why is the e0 interface used instead of s0 on RouterA?
Example 2
172.16.20.0/24 s0 RouterA .1 e0 .1 s0 .2 RouterB .1 e0 172.16.40.0/24 s1 .1 s0 .2 RouterC .1 e0 Administration Sales Engineering
172.16.10.3/24 172.16.10.2/24
172.16.30.3/24 172.16.30.2/24
172.16.50.3/24 172.16.50.2/24
Port 80
Task What if we wanted Router A to permit any workstation on the Sales network be able to access the web server in Administrative network with the IP address 172.16.10.2 and port address 80. All other traffic is denied.
Example 2
172.16.20.0/24 s0 RouterA .1 e0 .1 s0 .2 RouterB .1 e0 172.16.40.0/24 s1 .1 s0 .2 RouterC .1 e0 Administration Sales Engineering
172.16.10.3/24 172.16.10.2/24
172.16.30.3/24 172.16.30.2/24
172.16.50.3/24 172.16.50.2/24
Port 80
RouterA(config)#access-list 110 permit tcp 172.16.30.0 0.0.0.255 host 172.16.10.2 eq 80 RouterA(config)#inter e 0 RouterA(config-if)#ip access-group 110 out
When configuring access list statements, use the ? to walk yourself through the command!
With inbound Access Lists the IOS checks the packets before it is sent to the Routing Table Process. With outbound Access Lists, the IOS checks the packets after it is sent to the Routing Table Process. This is because the output interface is not known until the forwarding decision is made.