Lab Objective:
The focus of this lab is to understand Router IP Traffic Export (RITE) and Switched Port Analyzer (SPAN) implementation and configuration in Cisco IOS routers.
Lab Topology:

|
IMPORTANT NOTE If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no interface fastethernet 0/0 Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab. |
Task 1
Configure hostnames and IP addresses on all devices as illustrated in the topology. In addition, configure VLAN 100 on switch ALS1. Assign R1s FastEthernet0/0 to this VLAN and configure a VLAN interface (SVI) with the IP address 150.1.1.254 on switch ALS1. Following this, confirm that switch ALS1 pings router R1.
Task 2
Configure OSPF on R1 and R2 as illustrated in the topology. Ensure that R2 can ping switch ALS1. Verify your configuration using the appropriate commands.
Task 3
There have been some network issues experienced on the LAN segment between R1 and ALS1. Configure SPAN on ALS1 so that all ingress and egress traffic from R1s LAN interface is mirrored to FastEthernet 0/8. FastEthernet 0/8 will have an administrator workstation running Wire Shark. In addition to being used for monitoring, this workstation will also need to reach other network devices and all received frames should be assigned to VLAN 100. Verify your configuration using the appropriate commands.
Task 4
R2 is connected to a hub, which makes implementing SPAN impossible. However, users that are connected to this hub are also complaining of network latency. Configure RITE on R2 so that all ingress and egress traffic from the LAN interface is sent to a host with the MAC address 00-24-E7-47-32-40. R1 should only capture inbound and outbound HTTP traffic. All other type should be ignored. Ensure that one in two packets are exported. Verify your configuration.
Lab Validation
Task 1
Please refer to previous tasks for basic VLAN and IP addressing configuration. These will not be included in this section for brevity and to avoid being redundant. Following your configuration, switch ALS1 should be able to ping R1. This is illustrated in the output below:
| ALS1#ping 150.1.1.1
Type escape sequence to abort. |
Task 2
Please refer to previous labs for basic OSPF configuration. Following this, verify your OSPF configuration using the show ip ospf neighbors and show ip route commands. Following this configuration, your route tables should show the following route information:
| R1#show ip route ospf 150.2.0.0/24 is subnetted, 1 subnets O 150.2.2.0 [110/65] via 10.0.0.2, 00:00:00, Serial0/0 |
| R2#show ip route ospf 150.1.0.0/24 is subnetted, 1 subnets O 150.1.1.0 [110/65] via 10.0.0.1, 00:00:21, Serial0/0 |
In order to allow R2 to ping ALS1, you need to configure a default gateway on switch ALS1:
| ALS1(config)#ip default-gateway 150.1.1.1 |
Following this, R2 will be able to ping switch ALS1 and vice-versa:
| R2#ping 150.1.1.254 repeat 10 size 1500 source fastethernet 0/0
Type escape sequence to abort. |
Task 3
While the core requirements of this task are simple, it is important to remember that when a port is specified as a SPAN destination port, by default, it is a receive-only port and cannot transmit data. The state of the SPAN destination port is up/down by design. This state is used in order to make it evident that the port is currently not usable as a production port. To allow ingress traffic, you must use the ingress, encapsulation <isl|dot1q> andvlan <tag> keywords. These keywords enable ingress traffic forwarding on the SPAN destination port, specify the ingress encapsulation and type and VLAN ID respectively. Keep in mind, however, that most Cisco IOS switches now only support 802.1Q; therefore, you do not necessarily need to specify this default encapsulation type. This task is completed as follows:
| ALS1(config)#monitor session 1 source interface fastethernet 0/1 both ALS1(config)#$nterface fastethernet 0/8 encapsulation dot1q ingress vlan 100 |
Next, verify your configuration using the show monitor session command:
| ALS1#show monitor session 1 Session 1 ——— Type : Local Session Source Ports : Both : Fa0/1 Destination Ports : Fa0/8 Encapsulation : DOT1Q Ingress: Enabled, default VLAN = 100 Ingress encapsulation: DOT1Q |
You can also append the detail keyword for additional information on the session:
| ALS1#show monitor session 1 detail Session 1 ——— Type : Local Session Source Ports : RX Only : None TX Only : None Both : Fa0/1 Source VLANs : RX Only : None TX Only : None Both : None Source RSPAN VLAN : None Destination Ports : Fa0/8 Encapsulation : DOT1Q Ingress: Enabled, default VLAN = 100 Ingress encapsulation: DOT1Q Reflector Port : None Filter VLANs : None Dest RSPAN VLAN : None |
Task 4
While the core requirements of this task are straightforward, it is important to remember that you can use ACLs with RITE. The requirement that all ingress and egress HTTP traffic be mirrored means that you must use ACLs that matches both ingress and egress HTTP traffic. You cannot accomplish this with a single ACL. This is completed as follows:
| R2(config)#ip access-list extended INBOUND-HTTP-TRAFFIC R2(config-ext-nacl)#permit tcp any any eq www R2(config-ext-nacl)#exit R2(config)#ip access-list extended OUTBOUND-HTTP-TRAFFIC R2(config-ext-nacl)#permit tcp any eq www any R2(config-ext-nacl)#exit R2(config)#ip traffic-export profile IOS-RITE R2(conf-rite)#bidirectional R2(conf-rite)#incoming access-list INBOUND-HTTP-TRAFFIC R2(conf-rite)#outgoing access-list OUTBOUND-HTTP-TRAFFIC R2(conf-rite)#mac-address 0024.E747.3240 R2(conf-rite)#incoming sample one-in-every 2 R2(conf-rite)#outgoing sample one-in-every 2 R2(conf-rite)#interface fastethernet 0/0 R2(conf-rite)#exit R2(conf-rite)#interface fastethernet 0/0 R2(conf-rite)#exit R2(config)#interface fastethernet 0/0 R2(config-if)#ip traffic-export apply IOS-RITE *Jun 15 21:48:53.999: %RITE-5-ACTIVATE: Activated IP traffic export on interface FastEthernet0/0 R2(config-if)#exit |
Next, view the router configuration to verify that you solution is configured correctly:
| R2#more system:running-config | section traffic-export ip traffic-export profile IOS-RITE interface FastEthernet0/0 bidirectional incoming access-list INBOUND-HTTP-TRAFFIC outgoing access-list OUTBOUND-HTTP-TRAFFIC mac-address 0024.e747.3240 incoming sample one-in-every 2 outgoing sample one-in-every 2 ip traffic-export apply IOS-RITE |
Following this, use the show ip traffic-export command to verify statistics:
| R2#show ip traffic-export interface fastethernet 0/0 Router IP Traffic Export Parameters Monitored Interface FastEthernet0/0 Export Interface FastEthernet0/0 Destination MAC address 0024.e747.3240 bi-directional traffic export is on Output IP Traffic Export Information Packets/Bytes Exported 0/0 Packets Dropped 0 Sampling Rate one-in-every 2 packets Access List OUTBOUND-HTTP-TRAFFIC [named extended IP] Input IP Traffic Export Information Packets/Bytes Exported 0/0 Packets Dropped 119 Sampling Rate one-in-every 2 packets Access List INBOUND-HTTP-TRAFFIC [named extended IP] Profile IOS-RITE is Active |
To test RITE, assuming you have a device connected to the same segment as R2, you can use the traffic-export interface <interface> start andtraffic-export interface <interface> stop privileged EXEC commands.
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 910 bytes R1# |
R2
|
R2#term len 0 Current configuration : 1358 bytes R2# |
Final Switch Configuration
ALS1
|
ALS1#term len 0 Current configuration : 1054 bytes ALS1# |