I denna laboration konfigurerar du två namngivna utökade ACL på R1.
Målet är att PC1 i nätverket 192.168.10.0/24 ska kunna använda SSH, Telnet, HTTP och HTTPS till andra nätverk samt DNS och aktiv FTP mot den externa servern 209.165.200.225.
Övriga datorer i LAN 10 ska inte kunna skicka IPv4-trafik via R1 till andra nätverk. Kommunikation mellan enheter inom samma LAN påverkas inte, eftersom den normalt inte passerar routern.
De två ACL har följande uppgifter:
- PERMIT-PC1 tillåter de angivna trafiktyperna från PC1 och blockerar övrig IPv4-trafik som kommer in via LAN-interfacet.
- REPLY-PC1 tillåter TCP-paket till PC1 med ACK- eller RST-flaggan satt samt särskilda undantag för DNS-svar över UDP och serverns dataanslutning vid aktiv FTP. Övrig IPv4-trafik mot LAN 10 blockeras.
ACL tillämpas på R1 interface G0/0/0, som är anslutet till LAN 10. PERMIT-PC1 tillämpas inkommande (in), medan REPLY-PC1 tillämpas utgående (out). Riktningarna anges alltid ur routerns perspektiv.
Nyckelordet established kontrollerar TCP-flaggor. Det innebär inte att routern följer anslutningarnas tillstånd eller säkerställer att ett paket är ett svar på tidigare trafik.
Nätverkstopologi
Tre routrar av modellen 433 och routing med EIGRP

Konfigurationer
- Server
- IP address: 209.165.299.225
- Subnet Mask: 255.255.255.252
- Default Gateway: 209.165.200.226
- DNS: 209.165.299.225
- PC1
- IP address: 192.168.10.10
- Subnet Mask: 255.255.255.0
- Default Gateway: 192.168.10.254
- DNS: 209.165.299.225
- PC2
- IP address: 192.168.10.11
- Subnet Mask: 255.255.255.0
- Default Gateway: 192.168.10.254
- DNS: 209.165.299.225
- PC3
- IP address: 192.168.20.10
- Subnet Mask: 255.255.255.0
- Default Gateway: 192.168.10.254
- DNS: 209.165.299.225
- PC4
- IP address: 192.168.30.10
- Subnet Mask: 255.255.255.0
- Default Gateway: 192.168.10.254
- DNS: 209.165.299.225
- R1# configure terminal
- R1(config)# no ip domain-lookup
- R1(config)# interface Gig 0/0/0
- R1(config-if)# description Connected to LAN 10
- R1(config-if)# ip address 192.168.10.254 255.255.255.0
- R1(config-if)# duplex auto
- R1(config-if)# speed auto
- R1(config-if)# no shutdown
- R1(config-if)# exit
- R1(config)# interface Gig 0/0/1
- R1(config-if)# description Connected to LAN 20
- R1(config-if)# ip address 192.168.20.254 255.255.255.0
- R1(config-if)# duplex auto
- R1(config-if)# speed auto
- R1(config-if)# no shutdown
- R1(config)# exit
- R1(config)# interface Se0/1/0
- R1(config-if)# description Connected to R2
- R1(config-if)# ip address 10.1.1.1 255.255.255.252
- R1(config-if)# no shutdown
- R1(config-if)# exit
- R1(config)# router eigrp 100
- R1(config-router)# no auto-summary
- R1(config-router)# network 192.168.10.0 0.0.0.255
- R1(config-router)# network 192.168.20.0 0.0.0.255
- R1(config-router)# network 10.1.1.0 0.0.0.3
- R1(config-router)# passive-interface G0/0/0
- R1(config-router)# passive-interface G0/0/1
- R1(config-router)# end
- R1#
- R2# configure terminal
- R2(config)# no ip domain-lookup
- R2(config)# interface Gig 0/0/0
- R2(config-if)# description Connected to ISP
- R2(config-if)# ip address 209.165.200.226 255.255.255.252
- R2(config-if)# duplex auto
- R2(config-if)# speed auto
- R2(config-if)# no shutdown
- R2(config-if)# exit
- R2(config)# interface Gig 0/0/1
- R2(config-if)# no ip address
- R2(config-if)# duplex auto
- R2(config-if)# speed auto
- R2(config-if)# shutdown
- R2(config-if)# exit
- R2(config)# interface Se0/1/0
- R2(config-if)# description DCE connected to R1
- R2(config-if)# clock rate 4000000
- R2(config-if)# ip address 10.1.1.2 255.255.255.252
- R2(config-if)# no shutdown
- R2(config-if)# exit
- R2(config)# interface Se0/1/1
- R2(config-if)# description DCE connected to R3
- R2(config-if)# clock rate 4000000
- R2(config-if)# ip address 10.2.2.2 255.255.255.252
- R2(config-if)# no shutdown
- R2(config-if)# exit
- R2(config)# router eigrp 100
- R2(config-router)# no auto-summary
- R2(config-router)# network 10.1.1.0 0.0.0.3
- R2(config-router)# network 10.2.2.0 0.0.0.3
- R2(config-router)# network 209.165.200.224 0.0.0.3
- R2(config-router)# passive-interface Gig 0/0/0
- R2(config-router)# end
- R2#
- R3# configure terminal
- R3(config)# no ip domain-lookup
- R3(config)# interface Gig 0/0/0
- R3(config-if)# description Connected to LAN 30
- R3(config-if)# ip address 192.168.30.254 255.255.255.0
- R3(config-if)# duplex auto
- R3(config-if)# speed auto
- R3(config-if)# no shutdown
- R3(config-if)# exit
- R3(config)# interface Gig 0/0/1
- R3(config-if)# no ip address
- R3(config-if)# duplex auto
- R3(config-if)# speed auto
- R3(config-if)# shutdown
- R3(config-if)# exit
- R3(config)# interface Se0/1/1
- R3(config-if)# description Connected to R2
- R3(config-if)# ip address 10.2.2.1 255.255.255.252
- R3(config-if)# no shutdown
- R3(config-if)# exit
- R3(config)# router eigrp 100
- R3(config-router)# no auto-summary
- R3(config-router)# network 192.168.30.0 0.0.0.255
- R3(config-router)# network 10.2.2.0 0.0.0.3
- R3(config-router)# passive-interface Gig 0/0/0
- R3(config-router)# end
- R3#
- R1# configure terminal
- ! Extended named ACL PERMIT-PC1
- R1(config)# ip access-list extended PERMIT-PC1
- R1(config-ext-nacl)# remark Permit PC1 selected services
- R1(config-ext-nacl)# permit tcp host 192.168.10.10 host 209.165.200.225 eq 21
- R1(config-ext-nacl)# permit tcp host 192.168.10.10 host 209.165.200.225 eq 20 established
- R1(config-ext-nacl)# permit tcp host 192.168.10.10 any eq 22
- R1(config-ext-nacl)# permit tcp host 192.168.10.10 any eq 23
- R1(config-ext-nacl)# permit udp host 192.168.10.10 host 209.165.200.225 eq 53
- R1(config-ext-nacl)# permit tcp host 192.168.10.10 host 209.165.200.225 eq 53
- R1(config-ext-nacl)# permit tcp host 192.168.10.10 any eq 80
- R1(config-ext-nacl)# permit tcp host 192.168.10.10 any eq 443
- R1(config-ext-nacl)# deny ip any any
- R1(config-ext-nacl)# exit
- ! Extended named ACL REPLY-PC1
- R1(config)# ip access-list extended REPLY-PC1
- R1(config-ext-nacl)# remark Permit TCP ACK or RST packets to PC1
- R1(config-ext-nacl)# permit tcp any host 192.168.10.10 established
- R1(config-ext-nacl)# remark Permit DNS UDP replies from the server
- R1(config-ext-nacl)# permit udp host 209.165.200.225 eq 53 host 192.168.10.10
- R1(config-ext-nacl)# remark Permit active FTP data connection from the server
- R1(config-ext-nacl)# permit tcp host 209.165.200.225 eq 20 host 192.168.10.10 gt 1023
- R1(config-ext-nacl)# deny ip any any
- R1(config-ext-nacl)# exit
- R1(config)# interface GigabitEthernet0/0/0
- R1(config-if)# ip access-group PERMIT-PC1 in
- R1(config-if)# ip access-group REPLY-PC1 out
- R1(config-if)# end