Lab For Extended Acls
Lab For Extended Acls
Enable,
Serial 0/0/0 Enable vty, and
Host FastEthernet 0/0 Serial 0/0/0/ Interface Default Secret Console
Device Name IP Address IP Address Type Gateway Password Password
Router 1 R1 192.168.1.1/24 192.168.15.1/30 DCE class cisco
Router 2 R2 192.168.5.1/24 192.168.15.2/30 DTE class cisco
Switch 1 S1 class cisco
Host 1 H1 192.168.1.10/24 192.168.1.1
Host 2 H2 192.168.1.11/24 192.168.1.1
Host 3 H3 192.168.5.10/24 192.168.5.1
Objectives
• Configure Extended ACLs to control traffic.
• Verify ACL operation.
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 1 of 5
CCNA Discovery
Introducing Routing and Switching in the Enterprise
Background / Preparation
In this lab you will work with Extended ACLs to control network traffic based on host IP addresses. Any router
that meets the interface requirements displayed on the topology diagram may be used. For example, router
series 800, 1600, 1700, 1800, 2500, 2600, 2800, or any combination can be used.
The information in this lab applies to 1841 series routers. It also apples to other routers; however, the
command syntax may vary. Depending on the router model, the interfaces may differ. For example, on some
routers Serial 0 may be Serial 0/0 or Serial 0/0/0 and Ethernet0 may be FastEthernet 0/0. The Cisco Catalyst
2960 switch comes preconfigured and only needs to be assigned basic security information before being
connected to a network.
The following resources are required:
• One Cisco 2960 switch or other comparable switch
• Two Cisco 1841 or equivalent routers, each with a serial and an Ethernet interface
• Three Windows-based PCs, at least one with a terminal emulation program, and all set up as hosts
• At least one RJ-45-to-DB-9 connector console cable to configure the routers and switch
• Three straight-through Ethernet cables
• One crossover Ethernet cable
• One 2-part DTE/DCE serial crossover cable
NOTE: Make sure that the routers and the switches have been erased and have no startup configurations.
Instructions for erasing both switch and router are provided in the Lab Manual, located on Academy
Connection in the Tools section.
NOTE: SDM Enabled Routers – If the startup-config is erased in an SDM enabled router, SDM will no longer
come up by default when the router is restarted. It will be necessary to build a basic router configuration using
IOS commands. The steps provided in this lab use IOS commands and do not require the use of SDM. If you
wish to use SDM, refer to the instructions in the Lab Manual, located on the Academy Connection in the Tools
section or contact your instructor if necessary.
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 2 of 5
CCNA Discovery
Introducing Routing and Switching in the Enterprise
Step 5: Configure the hosts with IP address, subnet mask, and default gateway
a. Configure the hosts with IP address, subnet mask, and default gateway according to the addressing
table and the topology diagram.
b. Each workstation should be able to ping the attached router. If the pings are not successful,
troubleshoot as necessary. Check and verify that the workstation has been assigned a specific IP
address and default gateway.
Step 6: Configure RIP routing and verify end to end connectivity in the network
a. On R1, enable the RIP routing protocol and configure it to advertise both connected networks.
b. On R2, enable the RIP routing protocol and configure it to advertise both connected networks.
c. Ping from each host to the other two hosts.
Were the pings successful? __________
If the answer is no, troubleshoot the router and host configurations to find the error. Ping again until
they are all successful.
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 3 of 5
CCNA Discovery
Introducing Routing and Switching in the Enterprise
c. Create an Extended ACL to perform the tasks stated and apply it to R2.
R2(config)#access-list 101 permit ip host 192.168.1.10 host
192.168.5.10
R2(config)#access-list 101 deny ip 192.168.1.0 0.0.0.255 host
192.168.5.10
R2(config)#access-list 101 permit ip any any
R2(config)#access-list 101 deny ip any any
NOTE: The implicit deny at the end of an access control list performs this same function. However,
adding the line to the ACL helps document it and is considered good practice. By explicitly adding this
statement, the number of packets matching the statement are tallied, and the administrator can see
how many packets were denied.
d. Apply the access list on the Fa0/0 interface of R2 in the outbound direction.
R2(config)#interface fastethernet 0/0
R2(config-if)#ip access-group 101 out
e. Verify the ACL on R2 with the show access-lists command.
Does the output of the show access-lists command display the ACL that was created?
__________
Does the output of the show access-lists command display how the ACL is applied?
__________
f. Use the show ip interface fa0/0 command on R2 to display the application of the ACL.
What does the output of the show ip interface command tell you about the ACL?
________________________________________________________________________________
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 4 of 5
CCNA Discovery
Introducing Routing and Switching in the Enterprise
Step 9: Configure and test the ACL for the next requirement
a. Host 3 is the only host that should be allowed to connect to R1 for remote management. Create an
access control list to meet this requirement. This ACL will need to be placed on R1 because R1 is the
destination of the traffic. All other hosts will not be allowed access. This is the only traffic being
controlled; all other traffic should be allowed.
R1(config)#access-list 101 permit ip host 192.168.5.10 host
192.168.15.1
R1(config)#access-list 101 permit ip host 192.168.5.10 host 192.168.1.1
R1(config)#access-list 101 deny ip any host 192.168.15.1
R1(config)#access-list 101 deny ip any host 192.168.1.1
R1(config)#access-list 101 permit ip any any
R1(config)#access-list 101 deny ip any any
b. Because the source traffic could come from any direction, this ACL needs to be applied to both
interfaces on R1. The traffic to be controlled would be inbound to the router.
R1(config)#interface fastethernet 0/0
R1(config-if)#ip access-group 101 in
R1(config-if)#interface serial 0/0/0
R1(config-if)#ip access-group 101 in
c. Now attempt to telnet to R1 from all hosts and R2. Attempt to telnet to both R1 addresses.
Can you telnet to R1 from any of these devices? If yes, which one(s)? ____________________
d. View the output of the show access-lists command on R1.
Does the output of the show access-lists command display that the statements are being
matched? __________
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 5 of 5