Lab Objective:
The focus of this lab is to understand basic RACL, PACL, and VACL implementation and configuration in Cisco IOS Catalyst switches.
Lab Topology:
The lab network topology is illustrated below:
|
IMPORTANT NOTE If you are using the www.howtonetwork.net racks, please begin each and every lab by shutting down all interfaces on all switches and then manually re-enabling only the interfaces that are illustrated in this topology. |
Task 1
Disable VTP on all switches and configure VLAN 100 on switches DLS1 and ALS1 and VLAN 200 on switches DLS2 and ALS2.
Task 2
Configure 802.1Q trunks between DLS1 and ALS1 as well as between DLS2 and ALS2. Ensure that DTP is disabled on all trunk links.
Next, configure an LACP Layer 3 EtherChannel between switches DLS1 and DLS2. Use the 192.168.0.0/30 subnet for the EtherChannel.
Task 3
Configure the following SVIs and interfaces on the switches in the topology:
- DLS1: Interface VLAN 100: IP address 100.1.1.1/24
- ALS1: Interface VLAN 100: IP address 100.1.1.2/24
- DLS2: Interface VLAN 200: IP address 200.1.1.1/24
- ALS2: Interface VLAN 200: IP address 200.1.1.2/24
Task 4
Configure OSPF on switches DLS1 and DLS2 so that switches ALS1 and ALS2 have IP reachability to each other. Verify that switches ALS1 and ALS2 can ping each other.
Task 5
Configure an inbound RACL on switch DLS1s EtherChannel that allows OSPF and PING traffic anywhere. The RACL should also only allow TCP traffic if the session was initiated by any host residing on VLAN 100. In other words, switches DLS2 and ALS2 should not be able to initiate a Telnet (for example) connection to switches ALS1 and DLS1. However, switches ALS1 and DLS1 can Telnet to them. Test your configuration.
Task 6
Configure an inbound PACL on the trunk link between DLS1 and ALS1 that allows frames only sent by switch ALS1 to be forwarded. Verify that you can still ping ALS2 from ALS1. Additionally, in the event that routing fails on switch DLS1, ensure that non-IP packets can be bridged between VLAN 100 and switch DLS2.
Task 7
Configure a VACL on switch DLS2 for VLAN 200 that performs the following:
- It permits all non-IP traffic
- It denies all UDP traffic
- It permits all TCP traffic
- It permits all ICMP traffic
- It denies all other traffic
Lab Validation
Task 1
| DLS1(config)#vtp mode transparent Setting device to VTP TRANSPARENT mode. |
| DLS2(config)#vtp mode transparent Setting device to VTP TRANSPARENT mode. |
| ALS1(config)#vtp mode transparent Setting device to VTP TRANSPARENT mode. |
| ALS2(config)#vtp mode transparent Setting device to VTP TRANSPARENT mode. |
Task 2
| DLS1(config)#interface fastethernet 0/7 DLS1(config-if)#switchport DLS1(config-if)#switchport trunk encapsulation dot1q DLS1(config-if)#switchport mode trunk DLS1(config-if)#switchport nonegotiate DLS1(config-if)#exit DLS1(config)#interface range fastethernet 0/11 – 12 DLS1(config-if-range)#no switchport DLS1(config-if-range)#channel-group 1 mode active Creating a port-channel interface Port-channel 1 DLS1(config-if-range)#exit |
| DLS2(config)#interface fastethernet 0/7 DLS2(config-if)#switchport DLS2(config-if)#switchport trunk encapsulation dot1q DLS2(config-if)#switchport mode trunk DLS2(config-if)#switchport nonegotiate DLS2(config-if)#exit DLS2(config)#interface range fastethernet 0/11 – 12 DLS2(config-if-range)#no switchport DLS2(config-if-range)#channel-group 1 mode active Creating a port-channel interface Port-channel 1 DLS2(config-if-range)#exit |
| ALS1(config)#interface fastethernet 0/7 ALS1(config-if)#switchport mode trunk ALS1(config-if)#switchport nonegotiate ALS1(config-if)#exit |
| ALS2(config)#interface fastethernet 0/7 ALS2(config-if)#switchport mode trunk ALS2(config-if)#switchport nonegotiate ALS2(config-if)#exit |
Verify your trunking configuration using the show interfaces trunk command:
| ALS1#show interfaces trunk
Port Mode Encapsulation Status Native vlan Port Vlans allowed on trunk Port Vlans allowed and active in management domain Port Vlans in spanning tree forwarding state and not pruned |
Use the show etherchannel commands to verify EtherChannel configuration:
| DLS1#show etherchannel summary Flags: D – down P – bundled in port-channel I – stand-alone s – suspended H – Hot-standby (LACP only) R – Layer3 S – Layer2 U – in use f – failed to allocate aggregator M – not in use, minimum links not met
Number of channel-groups in use: 1 Group Port-channel Protocol Ports |
Finally, use a simple ping test to verify connectivity between switches DLS1 and DLS2:
| DLS1#ping 192.168.0.2 repeat 10
Type escape sequence to abort. |
Task 3
| DLS1(config)#vlan 100 DLS1(config-vlan)#exit DLS1(config)#interface vlan 100 DLS1(config-if)#ip address 100.1.1.1 255.255.255.0 DLS1(config-if)#exit |
| DLS2(config)#vlan 200 DLS2(config-vlan)#exit DLS2(config)#interface vlan 200 DLS2(config-if)#ip address 200.1.1.1 255.255.255.0 DLS2(config-if)#exit |
| ALS1(config)#vlan 100 ALS1(config-vlan)#exit ALS1(config)#interface vlan 100 ALS1(config-if)#ip address 100.1.1.2 255.255.255.0 ALS1(config-if)#exit |
| ALS2(config)#vlan 200 ALS2(config-vlan)#exit ALS2(config)#interface vlan 200 ALS2(config-if)#ip address 200.1.1.2 255.255.255.0 ALS2(config-if)#exit |
Verify connectivity between switches DLS1 and ALS1 using a simple ping:
| ALS1#ping 100.1.1.1
Type escape sequence to abort. |
Verify connectivity between switches DLS1 and ALS1 using a simple ping:
| ALS2#ping 200.1.1.1
Type escape sequence to abort. |
Task 4
The first part of this task is straightforward and is completed as follows:
| DLS1(config)#ip routing DLS1(config)#router ospf 1 DLS1(config-router)#network 0.0.0.0 255.255.255.255 area 0 DLS1(config-router)#exit |
| DLS2(config)#ip routing DLS2(config)#router ospf 2 DLS2(config-router)#network 0.0.0.0 255.255.255.255 area 0 DLS2(config-router)#exit |
Verify OSPF configuration using the show ip ospf and show ip route commands:
| DLS2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| DLS2#show ip route ospf 100.0.0.0/24 is subnetted, 1 subnets O 100.1.1.0 [110/2] via 192.168.0.1, 00:02:21, Port-channel1 |
In order to allow ALS1 and ALS2 to ping each other, both switches need a default gateway:
| ALS1(config)#ip default-gateway 100.1.1.1 |
| ALS2(config)#ip default-gateway 200.1.1.1 |
Finally, verify connectivity using a simple ping:
| ALS2#ping 100.1.1.1
Type escape sequence to abort. |
Task 5
The first two requirements are straightforward; however, the third; however, requires the use of the established keyword. This keyword matches on both the TCP ACK and RST bits. These bits are sent in response to an original SYN (hence are sent in response to an initiated connection). This task is completed as follows:
| DLS1(config)#ip access-list extended INBOUND DLS1(config-ext-nacl)#permit ospf any any DLS1(config-ext-nacl)#permit icmp any any DLS1(config-ext-nacl)#permit tcp any any established DLS1(config-ext-nacl)#exit DLS1(config)#interface port-channel 1 DLS1(config-if)#ip access-group INBOUND in DLS1(config-if)#exit |
To verify your configuration, attempt to Telnet from switch ALS2 to switch ALS1:
| ALS2#ping 100.1.1.2
Type escape sequence to abort. |
Next, attempt to Telnet from switch ALS1 to switch ALS2:
| ALS1#ping 200.1.1.2
Type escape sequence to abort.
Password required, but none set [Connection to 200.1.1.2 closed by foreign host] ALS1# |
Task 6
The first part of this task requires the use of a MAC ACL. This is completed as follows:
| DLS1(config)#mac access-list extended HOST-ALS1-ONLY DLS1(config-ext-macl)#permit host 0007.8432.dd00 any DLS1(config-ext-macl)#exit DLS1(config)#interface fastethernet 0/7 DLS1(config-if)#mac access-group HOST-ALS1-ONLY in DLS1(config-if)#exit |
NOTE: You can use the show arp command to acquire the MAC address of switch ALS1.
Next, verify that following the PACL configuration, switch ALS1 can reach DLS2 and ALS2:
| ALS1#ping 200.1.1.2
Type escape sequence to abort. |
The second part of this task requires the configuration of fallback bridging. Fallback bridging allows the bridging together of two or more VLANs or routed ports, allowing the switch to forward non-routable traffic within the bridge group. This task is completed as follows:
| DLS1(config)#bridge 1 protocol vlan-bridge DLS1(config)#interface vlan 100 DLS1(config-if)#bridge-group 1 DLS1(config-if)#exit DLS1(config)#interface port-channel 1 DLS1(config-if)#bridge-group 1 DLS1(config-if)#exit |
Verify your configuration using the show bridge commands:
| DLS1#show bridge group
Bridge Group 1 is running the VLAN Bridge compatible Spanning Tree protocol Port 57 (Vlan100) of bridge group 1 is forwarding |
Task 7
When configuring VACLs, if the VLAN map has at least one match clause for the type of packet (IP or MAC) and the packet does not match any of these match clauses, the default is to drop the packet. If there is no match clause for that type of packet in the VLAN map, the default is to forward the packet. This task is completed as follows:
| DLS2(config)#ip access-list extended ALLOW-ICMP-ONLY DLS2(config-ext-nacl)#permit icmp any any DLS2(config-ext-nacl)#exit DLS2(config)#ip access-list extended ALLOW-TCP-ONLY DLS2(config-ext-nacl)#permit tcp any any DLS2(config-ext-nacl)#exit DLS2(config)#vlan access-map VLAN-200-FILTER 10 DLS2(config-access-map)#match ip address ALLOW-ICMP-ONLY DLS2(config-access-map)#action forward DLS2(config-access-map)#exit DLS2(config)#vlan access-map VLAN-200-FILTER 20 DLS2(config-access-map)#match ip address ALLOW-TCP-ONLY DLS2(config-access-map)#action forward DLS2(config-access-map)#exit DLS2(config)#vlan filter VLAN-200-FILTER vlan-list 200 |
Use the show vlan access-map and show vlan filter commands to verify your configuration:
| DLS2#show vlan access-map Vlan access-map “VLAN-200-FILTER” 10 Match clauses: ip address: ALLOW-ICMP ALLOW-ICMP-ONLY Action: forward Vlan access-map “VLAN-200-FILTER” 20 Match clauses: ip address: ALLOW-TCP ALLOW-TCP-ONLY Action: forward |
| DLS2#show vlan filter VLAN Map VLAN-200-FILTER is filtering VLANs: 200 |
Finally, test your configuration using PING and Telnet from ALS1 to ALS2:
| ALS1#ping 200.1.1.2
Type escape sequence to abort.
Password required, but none set [Connection to 200.1.1.2 closed by foreign host] |
Final Switch Configurations
DLS1
|
DLS1#term len 0 Current configuration : 4587 bytes DLS1# |
DLS2
|
DLS2#term len 0 Current configuration : 4637 bytes DLS2# |
ALS1
|
ALS1#term len 0 Current configuration : 1069 bytes ALS1# |
ALS2
|
ALS2#term len 0 Current configuration : 1069 bytes ALS2# |
