Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure VLAN SPAN Example

Network Requirements

  • PC1, PC2, and PC3 are connected with Device; PC1 and PC2 communicate in VLAN2.
  • Configure VLAN SPAN on Device, the source vlan is vlan2, and the destination port is gigabitethernet0/3, realizing that PC3 monitors the packets received and sent by VLAN2 of Device.

Network Topology

Networking of configuring VLAN SPAN

Figure 5-4 Networking of configuring VLAN SPAN

Configuration Steps

Step 1: Configure the link type of the VLAN and port.

#Create VLAN2 on Device.

Device#configure terminal
Device(config)#vlan 2
Device(config-vlan2)#exit

#On Device, configure the link type of port gigabitethernet0/1 and gigabitethernet0/2 as Access, permitting the services of VLAN2 to pass.

Device(config)#interface gigabitethernet 0/1-0/2
Device(config-if-range)#switchport mode access
Device(config-if-range)#switchport access vlan 2
Device(config-if-range)#exit

Step 2: Configure VLAN SPAN.

#Configure VLAN SPAN on Device, the mirror source session is vlan2, and the destination session is port gigabitethernet0/3.

Device(config)#monitor session 1 source vlan 2 both 
Device(config)# monitor session 1 destination interface gigabitethernet0/3
Device#show monitor session all  
Session 1 
Type             : SPAN Local VLAN Session
Destination Interface : gi0/3     
Source VLAN(both): 2 

Step 3: Check the result.

#When PC1 and PC2 communicate with each other, you can capture the packets received and sent by VLAN2 on PC3.