Hướng Dẫn Xác Thực SPAN Và ERSPAN Trên Switch Cisco Catalyst 9000

HƯỚNG DẪN XÁC THỰC SPAN TRÊN SWITCH CISCO CATALYST 9000 SERIES

Cấu trúc liên kết SPAN trên Cisco 9500
Cấu trúc liên kết SPAN trên Cisco 9500

Cisco Catalyst 9000 Series là dòng sản phẩm thế hệ mới được Cisco nghiên cứu và cho ra đời nhằm thay thế các dòng sản phẩm cũ, giúp mang đến giải pháp hoàn hảo hơn giúp vận hành dễ dàng, cải thiện năng suất, tiết kiệm chi phí cũng như gia tăng lợi ích kinh doanh cho các doanh nghiệp.

Switch Cisco Catalyst 9000 Series bao gồm các dòng sản phẩm:

Cấu Hình SPAN Trên Switch Cisco Catalyst 9000

Dưới đây là cấu hình SPAN trên các thiết bị Switch Cisco 9000 Series:

monitor session 1 source interface Twe1/0/1
monitor session 1 destination interface Twe1/0/2

Xác Minh Cấu Hình SPAN Trên Cisco Catalyst 9000 Series

Dưới đây là ví dụ về cấu hình SPAN trên Cisco 9500. Hãy lưu ý đến các giao diện SPAN Nguồn và Đích hướng SPAN capture

C9500-SPAN#show monitor session all
Session 1
---------
Type                     : Local Session
Source Ports             :
    Both                 : Twe1/0/1
Destination Ports        : Twe1/0/2
    Encapsulation        : Native
          Ingress        : Disabled

Xác minh mục nhập phần cứng SPAN. Sử dụng FED Session ID là ID duy nhất cho mỗi cấu hình SPAN. Có thể có tối đa 8 phiên FED được định cấu hình cùng lúc (Từ phiên 0 đến phiên 7 của FED)

C9500-SPAN# show platform software monitor session 1
Span Session 1 (FED Session 0):
  Type:      Local SPAN
  Prev type: Local SPAN
  Ingress Src Ports: Twe1/0/1    <-- Hardware entry for source interface.
  Egress Src Ports:  Twe1/0/1    <-- Hardware entry for source interface.
  Ingress Local Src Ports: (null)
  Egress Local Src Ports: (null)
  Destination Ports:  Twe1/0/2   <-- Hardware entry for destination interface.
  Ingress Src Vlans:
  Egress Src Vlans:
  Ingress Up Src Vlans: (null)
  Egress Up Src Vlans:  (null)
  Src Trunk filter Vlans:
  RSPAN dst vlan: 0
  RSPAN src vlan: 0
  RSPAN src vlan sav: 0
  Dest port encap = 0x0000
  Dest port ingress encap = 0xFFFFFFFFFFFFFFFF
  Dest port ingress vlan = 0x0
  SrcSess: 1  DstSess: 0 DstPortCfgd: 1  RspnDstCfg: 0  RspnSrcVld: 0
  DstCliCfg: 0  DstPrtInit: 1  PsLclCfgd: 0
  Flags: 0x00000031 PSPAN
  Remote dest port: 0   Dest port group: 0
  FSPAN disabled
  FSPAN not notified

Thu thập số ASIC, Core và Port cho các cổng SPAN nguồn và đích đã định cấu hình. Số cổng được yêu cầu để xác nhận giao diện SPAN nguồn có được lập trình đúng cách hay không và SPAN có trỏ đến đúng giao diện SPAN đích hay không

C9500-SPAN# show platform software fed active ifm mappings 
Interface                 IF_ID    Inst Asic Core Port SubPort Mac  Cntx LPN  GPN  Type Active
TwentyFiveGigE1/0/1       0x8        1   0   1    20     0      16   4    1    101  NIF  Y
TwentyFiveGigE1/0/2       0x9        1   0   1    21     0      17   5    2    102  NIF  Y

Thanh ghi IlePortLeSpanBitMapTable được sử dụng để xác định một cổng có phải là SPAN theo hướng RX hay không. Để xác nhận cổng SPAN nguồn đã định cấu hình (cổng ASIC 20) được gán cho đúng phiên FED (Phiên 0)

C9500-SPAN# show platform hardware fed active fwd-asic register read register-name IlePortLeSpanBitMapTable-20 asic 0 core 1
For asic 0 core 1

Module 0 - IlePortLeSpanBitMapTable[0][20] 

ssbm                      : 0x1     <-- Convert from Hexadecimal to Binary: 0b00000001. Bit 0 is set.

Bản đồ bit phiên SPAN là một thanh ghi 8 bit. Mỗi bit tương ứng với 1 phiên FED, bit quan trọng nhất tương ứng với phiên FED 0, bit quan trọng nhất tương ứng với phiên FED 7. Do đó, số phiên SPAN tối đa được hỗ trợ là 8, như đã đề cập trước đây.

Nếu một giao diện được định cấu hình làm cổng nguồn SPAN cho nhiều phiên SPAN, tất cả các Phiên FED phải xuất hiện trong thanh ghi SSBM. Ví dụ: SSBM có giá trị 0x5 (0b00000101) có nghĩa là giao diện là nguồn SPAN cho cả FED phiên 0 và FED phiên 2

Tương tự, thanh ghi Doppler ElePortLeSpanBitMapTable xác định xem một cổng có phải là SPAN theo hướng đầu ra (TX) hay không. Phân tích giống như thanh ghi IlePortLeSpanBitMapTable. Để xác nhận rằng cổng SPAN nguồn đã định cấu hình (cổng ASIC 20) được gán cho đúng Phiên FED (Phiên 0)

C9500-SPAN# show platform hardware fed active fwd-asic register read register-name ElePortLeSpanBitMapTable-20 asic 0 core 1
For asic 0 core 1

Module 0 - ElePortLeSpanBitMapTable[0][20] 

ssbm                      : 0x1

Điều này xác nhận giao diện SPAN nguồn được ánh xạ tới phiên FED phù hợp cho cả hướng RX và TX

Với ID phiên FED, chúng ta có thể tìm thấy các cổng đích cho SPAN trong thanh ghi AqmRepSpanPortMap. Để xác nhận Phiên FED 0 điểm đến đúng cổng đích SPAN (cổng ASIC 21):

C9500-SPAN# show platform hardware fed active fwd-asic register read register-name AqmRepSpanPortMap-0 asic 0 core 1
For asic 0 core 1

Module 0 - AqmRepSpanPortMap[0][0] 

cpuQueueNum               : 0x0
cpuSpanValid              : 0x0
indirectApPortMap         : 0x0
portMap0                  : 0x200000     <-- Convert from Hexadecimal to Binary: 0b00100000000000000000000. Bit 21 is set.
rcpPortMap                : 0x0
spanCtiLo                 : 0x0

Điều này xác nhận rằng các gói được thu thập bằng SPAN phải được hiển thị sao chép ngoài giao diện Tw1/0/2 (cổng ASIC 21). Nếu có nhiều cổng đích SPAN được định cấu hình, các cổng này được hiển thị trong thanh ghi AqmRepSpanPortMap


HƯỚNG DẪN XÁC THỰC ERSPAN TRÊN SWITCH CISCO CATALYST 9000 SERIES

Cấu trúc liên kết ERSPAN trên Switch Cisco 9000 Series
Cấu trúc liên kết ERSPAN trên Switch Cisco 9000 Series

Lưu ý:

  • ERSPAN không hỗ trợ trên Switch Cisco Catalyst 9200
  • Để sử dụng ERSPAN cần có license DNA-Advantage

Cấu Hình ERSPAN Trên Switch Cisco Catalyst 9000

Dưới đây là cấu hình ERSPAN trên các thiết bị Switch Cisco 9000 Series:

### Source ESRPAN Device ###

C9300-ERSPAN# show run | section monitor
monitor session 1 type erspan-source
 source vlan 10 
 destination
  erspan-id 3                     <-- ERSPAN id must be identical on source and destination.
  ip address 192.168.1.1          <-- GRE tunnel destination IP (IP addr configured on ERSPAN destination switch).
  origin ip address 192.168.1.2   <-- GRE tunnel source IP (IP addr configured on ERSPAN source switch).
  
C9300-ERSPAN# show ip interface brief | exclude unassigned
Interface              IP-Address      OK? Method Status                Protocol    
<snip>
Loopback0              192.168.1.2     YES NVRAM  up                    up      

### Destination ERSPAN Device ###

C9500-ERSPAN# show run | section monitor
monitor session 1 type erspan-destination
destination interface Twe1/0/3
source
erspan-id 3                       <-- ERSPAN id must be identical on source and destination.  
ip address 192.168.1.1            <-- GRE tunnel destination IP (IP addr configured on ERSPAN destination switch).

C9500-ERSPAN# show ip interface brief | exclude unassigned
Interface            IP-Address       OK? Method Status                Protocol
<snip> 
Loopback0            192.168.1.1     YES NVRAM   up                   up

Thiết Bị Nguồn

Xác thực khả năng truy cập giữa IP gốc và đích

C9300-ERSPAN#ping 192.168.1.1 source 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.2 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

Lập Trình Phần Mềm Cisco IOS

Xác thực trong phần mềm Cisco IOS mục nhập cho phiên ERSPAN

C9300-ERSPAN#show monitor session 1
Session 1
---------
Type                     : ERSPAN Source Session
Status                   : Admin Enabled
Source VLANs             :
    Both                 : 10
Destination IP Address   : 192.168.1.1
Destination ERSPAN ID    : 3
Origin IP Address        : 192.168.1.2

Lập Trình SIM

Xác minh phần mềm nào gửi đến phần cứng của chương trình

C9300-ERSPAN#show platform software monitor session 1
Span Session 1 (FED Session 0):
  Type:      ERSPAN Source
  Prev type: Unknown
  Ingress Src Ports:
  Egress Src Ports: 
  Ingress Local Src Ports: (null)
  Egress Local Src Ports: (null)
  Destination Ports: 
  Ingress Src Vlans: 10     <-- Replicate Traffic.
  Egress Src Vlans:  10     <-- Replicate Traffic.
  Ingress Up Src Vlans: 10
  Egress Up Src Vlans:  10
  Src Trunk filter Vlans:
  RSPAN dst vlan: 0
  RSPAN src vlan: 0
  RSPAN src vlan sav: 0
  Dest port encap = 0x0000
  Dest port ingress encap = 0x0000
  Dest port ingress vlan = 0x0
  SrcSess: 1  DstPortCfgd: 0  RspnDstCfg: 0  RspnSrcVld: 0    <-- Monitor session number.
  DstCliCfg: 0  DstPrtInit: 0  PsLclCfgd: 0
  Flags: 0x00000002 VSPAN
  Remote dest port: 0   Dest port group: 0
  FSPAN disabled
  FSPAN not notified
  ERSPAN Id    : 3     	      <-- Value match with the software setting.				
  ERSPAN Org Ip: 192.168.1.2  <-- Value match with the software setting.			
  ERSPAN Dst Ip: 192.168.1.1  <-- Value match with the software setting.
  ERSPAN Ip Ttl: 255
  ERSPAN State : Enabled        		
  ERSPAN Tun id: 77

Bộ Xử Lý Forwarding Manager Route

Xác minh phần mềm nào gửi đến phần cứng chương trình (FMAN RP Layer)

C9300-ERSPAN#show platform software swspan switch active R0 source 
Showing SPAN source table summary info

Sess-id   IF-type   IF-id   Sess-type   Dir         
--------------------------------------------------
0         VLAN      10      ERSPAN SRC  Ingress     
0         VLAN      10      ERSPAN SRC  Egress    


C9300-ERSPAN#show platform software swspan switch active R0 source sess-id 0
Showing SPAN source detail info
Session ID : 0
Intf Type : VLAN
Vlan id : 10       <-- Vlan entry
PD Sess ID : 0
Session Type : ERSPAN SRC
Direction : Ingress
Filter Enabled : No
ACL Configured : No
ERSPAN Enable : Yes

Session ID : 0
Intf Type : VLAN
Vlan id : 10    <-- Match with the Vlan/Interface SPAN.
PD Sess ID : 0
Session Type : ERSPAN SRC
Direction : Egress
Filter Enabled : No
ACL Configured : No
ERSPAN Enable : Yes

Bộ Xử Lý Forward Manager-Forwarding

Xác minh phần mềm nào gửi đến phần cứng chương trình (FMAN FP Layer).

C9300-ERSPAN#show platform software swspan switch active F0 source 
Showing SPAN source table summary info

Sess-id   IF-type   IF-id   Sess-type   Dir         
--------------------------------------------------
0         VLAN      10      ERSPAN SRC  Ingress     
0         VLAN      10      ERSPAN SRC  Egress      
C9300-ERSPAN#show platform software swspan switch active F0 source sess-id 0
Showing SPAN source detail info

Session ID : 0
Intf Type : VLAN
Vlan id : 10
PD Sess ID : 0
Session Type : ERSPAN SRC   <-- Source Interface.
Direction : Ingress
Filter Enabled : No
ACL Configured : No
AOM Object id : 519
AOM Object Status : Done
Parent AOM object Id : 30
Parent AOM object Status : Done

Session ID : 0
Intf Type : VLAN
Vlan id : 10
PD Sess ID : 0
Session Type : ERSPAN SRC  <-- Source Interface.
Direction : Egress
Filter Enabled : No
ACL Configured : No
AOM Object id : 520
AOM Object Status : Done
Parent AOM object Id : 30
Parent AOM object Status : Done


C9300-ERSPAN#show platform software swspan switch active F0 counters  <-- Check for any err counters that increment on PI/PD/HW
Dump Switch SPAN FP operation counters  <-- Operational Counters.

Source SPAN Config Counters

PI: Create 2 (err 0), Modify 0 (err 0), Delete 0 (err 0) <-- PI = platform independent (Software/IOS).
PD: Create 2 (err 0), Modify 0 (err 0), Delete 0 (err 0) <-- PD = platform dependent (SHIM/FMAN/FED).
HW: Create 2 (err 0), Modify 0 (err 0), Delete 0 (err 0) <-- HW = hardware (FED/ASIC).

Destination SPAN Config Counters

PI: Create 1 (err 0), Modify 0 (err 0), Delete 0 (err 0)
PD: Create 1 (err 0), Modify 0 (err 0), Delete 0 (err 0)
HW: Create 1 (err 0), Modify 0 (err 0), Delete 0 (err 0)

Filter SPAN Config Counters

PI: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)
PD: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)
HW: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)

Trình Điều Khiển Forwarding Engine

Xác minh lớp lập trình ASIC (FED)

C9300-ERSPAN#show platform software fed switch active monitor 0
Session 0
---------
  Session Type         : ERSPAN Source Session
  Source Ports         : RX: None  TX: None  
  Destination Ports    : None
  Source VLANs         : VLAN-10
  Destination VLANs    : VLAN-10 
  Source RSPAN VLAN    : 0
  DST RSPAN VLAN       : 0
  Encap                : Native
  Ingress Forwarding   : Disabled
  Filter VLANs         : None
  ERSPAN Enable        : 1         <-- 1 = On/Completed.
  ERSPAN Hw Programmed : 1         <-- 1 = On/Completed.
  ERSPAN Mandatory Cfg : 1         <-- 1 = On/Completed.
  ERSPAN Id            : 3
  Gre Prot             : 88be
  MTU                  : 9000
  Ip Tos               : 0
  Ip Ttl               : 255
  Cos                  : 0
  Vrf Id               : 0
  Dst Ip               : 192.168.1.1
  Org Ip               : 192.168.1.2
  Dst Ipv6             : ::
  Org Ipv6             : ::
  SGT count            : 0
  SGT Tag(s)           :

Xác minh Hardware Tunnel Programming (FED).

C9300-ERSPAN#show platform software fed switch active ifm interfaces tunnel 
Interface                         IF_ID               State             
----------------------------------------------------------------------
Tunnel1000000000                  0x00000035          READY            <-- 0x35 in Hex is 53 in Decimal (tunnel number 53).
C9300-ERSPAN#show platform software fed switch active ifm if-id 0x35 <-- Hardware tunnel number 0x35.
Interface IF_ID : 0x0000000000000035
Interface Name : Tunnel1000000000
Interface Block Pointer : 0x55d0ff5b6c98
Interface Block State : READY
Interface State : Enabled
Interface Status : ADD
Interface Ref-Cnt : 4
Interface Type : TUNNEL
    Unit : 0
    SNMP IF Index : 0
    Encap L3If LE Handle : 0x7f00e0a50a28    <-- Hardware handle info (used to check final Hardware program state).
    Decap L3If LE Handle : 0x7f00e0a50bd8    <-- Hardware handle info (used to check final Hardware program state).
    Tunnel Mode : 0 [gre]                    <-- Tunnel Protocol Enable.
    Tunnel Sub-mode: 0 [none]
    Hw Support : Yes
    Tunnel Vrf : 0
    IPv4 MTU : 0
    IPv6 MTU : 0
    IPv4 VRF ID : 0
    IPv6 VRF ID : 0
    Protocol flags : 0x0001 [ ipv4 ]
    Misc flags : 0x0000 [ None ]
    ICMPv4 flags : 0x03 [ unreachable redirect ]
    ICMPv6 flags : 0x03 [ unreachable redirect ]

Port Information
    Handle ............ [0xcf000051]
    Type .............. [L3-Tunnel]
    Identifier ........ [0x35]
    Unit .............. [53]
    Port Logical Tunnel Subblock
    Encap-L3ifle.......[0x7f00e0a50a28]   <-- Same number as previous highlighted output.
    Decap-L3ifle.......[0x7f00e0a50bd8]   <-- Same number as previous highlighted output.
    decap-portle.......[0x0]
    RI-decap...........[0x7f00e0a5a1a8]
    SI-decap...........[0x7f00e0a5a678]
    Decap-Tcam_handle..[0x7f00e0a5a9a8]
    Tunnel_capability..[0x3]
    Encap-RCP-PMAP.....[0x0]
    GPN................[0]

C9300-ERSPAN#show platform software fed switch active ifm mappings l3if-le | include L3IF|Tunnel
L3IF_LE                   Interface                         IF_ID               Type                  
0x00007f00e0a50a28        Tunnel1000000000                  0x00000035          ENCAP_L3_LE <-- L3IF + IF_ID (ENCAP) match here.               
0x00007f00e0a50bd8        Tunnel1000000000                  0x00000035          DECAP_L3_LE <-- L3IF + IF_ID (DECAP) match here.       
Encapsulation LE

C9300-ERSPAN#show platform hardwware fed switch active fwd-asic abstraction print-resource-handle 0x00007f00e0a50a28 0 <-- ENCAP. 
Handle:0x7f00e0a50a28 Res-Type:ASIC_RSC_L3IF_LE Res-Switch-Num:255 Asic-Num:255 Feature-ID:AL_FID_IFM Lkp-ftr-id:LKP_FEAT_INVALID ref_count:1
priv_ri/priv_si Handle: (nil)Hardware Indices/Handles: index0:0x27 mtu_index/l3u_ri_index0:0x5 sm handle [ASIC 0]: 0x7f00e0a56d08 index1:0x27 mtu_index/l3u_ri_index1:0x5

==============================================================

Decapsulation LE

C9300-ERSPAN#show platform hardware fed switch active fwd-asic abstraction print-resource-handle 0x00007f00e0a50a28 0 <-- DECAP.
Handle:0x7f00e0a50bd8 Res-Type:ASIC_RSC_L3IF_LE Res-Switch-Num:255 Asic-Num:255 Feature-ID:AL_FID_IFM Lkp-ftr-id:LKP_FEAT_INVALID ref_count:1
priv_ri/priv_si Handle: (nil)Hardware Indices/Handles: index0:0x28 mtu_index/l3u_ri_index0:0x0 sm handle [ASIC 0]: 0x7f00e0a559c8 index1:0x28 mtu_index/l3u_ri_index1:0x0

==============================================================

Chạy Embedded Packet Capture trên cổng ra về phía switch đích. Một bộ lọc có thể được áp dụng, sử dụng IP nguồn và đích của GRE tunnel (Gói tin là một gói được đóng gói).

Frame 1: 110 bytes on wire (880 bits), 110 bytes captured (880 bits) on interface 0
 <snip>
Internet Protocol Version 4, Src: 192.168.1.2, Dst: 192.168.1.1 <-- ERSPAN IP HEADER.
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
        0000 00.. = Differentiated Services Codepoint: Default (0)
        .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
    Total Length: 96
    Identification: 0x1018 (4120)
    Flags: 0x00
        0... .... = Reserved bit: Not set
        .0.. .... = Don't fragment: Not set
        ..0. .... = More fragments: Not set
    Fragment offset: 0
    Time to live: 255
    Protocol: Generic Routing Encapsulation (47)  <-- GRE tunnel encapsulation.
    Header checksum: 0x9c56 [validation disabled]
        [Good: False]
        [Bad: False]
    Source: 192.168.1.2              <-- Source GRE IP tunnel.
    Destination: 192.168.1.1         <-- Destination GRE IP tunnel.
Generic Routing Encapsulation (ERSPAN)
    Flags and Version: 0x1000
        0... .... .... .... = Checksum Bit: No
        .0.. .... .... .... = Routing Bit: No
        ..0. .... .... .... = Key Bit: No
        ...1 .... .... .... = Sequence Number Bit: Yes
        .... 0... .... .... = Strict Source Route Bit: No
        .... .000 .... .... = Recursion control: 0
        .... .... 0000 0... = Flags (Reserved): 0
        .... .... .... .000 = Version: GRE (0)
    Protocol Type: ERSPAN (0x88be)         <--ERSPAN enable. 
    Sequence Number: 0
Encapsulated Remote Switch Packet Analysis
    0001 .... .... .... = Version: Type II (1)
    .... 0000 0001 1000 = Vlan: 10
    000. .... .... .... = Priority: 0
    ...1 .... .... .... = Unknown2: 1
    .... 1... .... .... = Direction: Outgoing (1)
    .... .0.. .... .... = Truncated: Not truncated (0)
    .... ..00 0000 0011 = SpanID: 3       <--ERSPAN ID.
    Unknown7: 00000002
Ethernet II, Src: Xerox_00:02:00 (00:00:08:00:02:00), Dst: Cisco_eb:90:68 (00:9e:1e:eb:90:68)  
  <snip>
(Internal data packet comes here, output truncated)

Thiết Bị Đích ERSPAN

Lập trình phần mềm Cisco IOS

C9500-ERSPAN#show monitor session 1
Session 1
---------
Type                     : ERSPAN Destination Session
Status                   : Admin Enabled
Destination Ports        : Twe1/0/3
Source IP Address        : 192.168.1.1
Source ERSPAN ID         : 3

Lập trình SHIM

Xác minh phần mềm nào gửi đến phần cứng chương trình (đối tượng SHIM)

C9500-ERSPAN#show platform software monitor session 1
Span Session 1 (FED Session 0):
  Type:      ERSPAN Destination
  Prev type: Unknown
  Ingress Src Ports:
  Egress Src Ports: 
  Ingress Local Src Ports: (null)
  Egress Local Src Ports: (null)
  Destination Ports:  Twe1/0/3
  Ingress Src Vlans:
  Egress Src Vlans: 
  Ingress Up Src Vlans: (null)
  Egress Up Src Vlans:  (null)
  Src Trunk filter Vlans:
  RSPAN dst vlan: 0
  RSPAN src vlan: 0
  RSPAN src vlan sav: 0
  Dest port encap = 0x0004
  Dest port ingress encap = 0x0000
  Dest port ingress vlan = 0x0
  SrcSess: 0  DstSess: 1 DstPortCfgd: 1  RspnDstCfg: 0  RspnSrcVld: 0
  DstCliCfg: 0  DstPrtInit: 1  PsLclCfgd: 0
  Flags: 0x00000000
  Remote dest port: 0   Dest port group: 0
  FSPAN disabled
  FSPAN not notified
  ERSPAN Id    : 3
  ERSPAN Dst Ip: 192.168.1.1
  ERSPAN Vrf   : 0

Bộ xử lý Forward Manager-Forwarding

Xác minh phần mềm nào gửi đến phần cứng chương trình (FMAN FP Layer)

C9500-ERSPAN#show platform software swspan switch active r0 destination
Showing SPAN destination table summary info

Sess-id   IF-type   IF-id   Sess-type   
--------------------------------------
0         PORT      11       Local        <-- IF-if 0xb maps to Twe1/0/3 (Check under 'show platform software fed active ifm mapping').
0         ERSPAN    ERSPAN   DST  


C9500-ERSPAN#show platform software swspan R0 destination sess-id 0
Showing SPAN destination detail info

Session ID : 0
Intf Type : PORT       
Port dpidx :11         <--Match with IF-id
PD Sess Id : 0
Session Type : Local   <-- Type of monitor session
Ingress Fwd : No
Ingress Encape : Disabled
Ingress Vlan : 0
Encap Value : Replicate
RSPAN Vlan : 0

Session ID : 0
Intf Type : ERSPAN
Vlan id : 
PD Sess Id : 0
Session Type : ERSPAN DST
ERSPAN Id : 3
ERSPAN Dst Ip: 192.168.1.1
ERSPAN Src Ip: 0.0.0.0
GRE Prot  : 35006
MTU       : 0
IP Tos    : 0
IP Ttl    : 255
Cos       : 0
Vrf Id    : 0
Tunnel Ifid: 38         <-- 38 in Decimal is 0x26 in Hex which is the IF_ID of Tunnel1
ERSPAN En : TDL_TRUE

Bộ xử lý Forward Manager-Forwarding

Xác minh phần mềm nào gửi đến phần cứng chương trình (FMAN FP Layer)

C9500-ERSPAN#show platform software swspan switch active F0 counters  <-- (check for any error counters on PI/PD/HW).
Dump Switch SPAN FP operation counters

Source SPAN Config Counters

PI: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)  <-- PI = platform independent (Software/IOS). 
PD: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)  <-- PD = platform dependent (SHIM/FMAN/FED).
HW: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)  <-- HW = hardware (FED/ASIC).

Destination SPAN Config Counters

PI: Create 10 (err 0), Modify 6 (err 0), Delete 4 (err 0)
PD: Create 4 (err 0), Modify 0 (err 0), Delete 2 (err 0)
HW: Create 4 (err 0), Modify 0 (err 0), Delete 2 (err 0)

Filter SPAN Config Counters

PI: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)
PD: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)
HW: Create 0 (err 0), Modify 0 (err 0), Delete 0 (err 0)

C9500-ERSPAN#show platform software swspan switch active F0 destination 
Showing SPAN destination table summary info

Sess-id   IF-type   IF-id   Sess-type   
--------------------------------------
0         PORT      11       Local       
0         VLAN      0       ERSPAN DST  

Forwarding Engine Driver

Xác minh lớp lập trình ASIC (FED)

C9500-ERSPAN#show platform software fed switch active monitor 0
Session 0
---------
  Session Type         : ERSPAN Destination Session
  Source Ports         : RX: None TX: Tunnel1000000000
  Destination Ports    : TwentyFiveGigE1/0/3 
  Source VLANs         : None  
  Destination VLANs    : None  
  Source RSPAN VLAN    : 0
  DST RSPAN VLAN       : 0
  Encap                : Replicate
  Ingress Forwarding   : Disabled
  Filter VLANs         : None
  ERSPAN Enable        : 1
  ERSPAN Hw Programmed : 1
  ERSPAN Mandatory Cfg : 1
  ERSPAN Id            : 3
  Ip Tos               : 0 (DSCP:0)
  Ip Ttl               : 0
  Cos                  : 0
  Vrf Id               : 0
  Tunnel IfId          : 38                 <-- 38 in Decicmal is 0x26 in Hex which is the IF_ID of Tunnel1
  Dst Ip               : 192.168.1.1        
  Org Ip               : 0.0.0.0
  SGT count            : 0
  SGT Tag(s)           :  

Xác minh lập trình phần cứng tunnel (FED)

C9500-ERSPAN#show platform software fed switch active ifm interfaces tunnel
Interface               IF_ID        State
----------------------------------------------------------------------
Tunnel1000000000        0x00000026   READY
C9500-ERSPAN#show platform software fed switch active ifm if-id 0x00000026
Interface IF_ID : 0x0000000000000026
Interface Name : Tunnel1000000000
Interface Block Pointer : 0x7f2cd48e9958
Interface Block State : READY
Interface State : Enabled
Interface Status : ADD
Interface Ref-Cnt : 5
Interface Type : TUNNEL

	Unit           : 0
	SNMP IF Index  : 0
	Encap L3If LE Handle : 0x7f2cd4904e08    <-- Hardware handle info (used to check final Hardware program state).
	Decap L3If LE Handle : 0x7f2cd48dabc8    <-- Hardware handle info (used to check final Hardware program state).
	Tunnel Mode    : 0 [gre]                 <-- Tunnel Protocol Enable.
	Hw Support     : Yes
	Tunnel Vrf     : 0
	IPv4 MTU       : 0
	IPv6 MTU       : 0
	IPv4 VRF ID    : 0
	IPv6 VRF ID    : 0
	Protocol flags : 0x0001 [ ipv4 ]
	Misc flags     : 0x0000 [ None ]
	ICMPv4 flags   : 0x03 [ unreachable redirect ]
	ICMPv6 flags   : 0x03 [ unreachable redirect ]
          
	Port Information
	Handle ............ [0xd4000043]
	Type .............. [L3-Tunnel]
	Identifier ........ [0x26]
	Unit .............. [38]
	Port Logical Tunnel Subblock
		Encap-L3ifle.......[0x7f2cd4904e08]     <-- Same number as previous highlighted output.
		Decap-L3ifle.......[0x7f2cd48dabc8]     <-- Same number as previous highlighted output.
		decap-portle.......[0x0]
		RI-decap...........[0x7f2cd49615d8]     <-- Same number as previous highlighted output.
		SI-decap...........[0x7f2cd4958dd8]     <-- Same number as previous highlighted output.
		Decap-Tcam_handle..[0x7f2cd46eee08]     <-- Same number as previous highlighted output.
		Tunnel_capability..[0x3]
		Encap-RCP-PMAP.....[0x0]
		GPN................[0]
<snip>
C9500-ERSPAN#show platform software fed switch active ifm mappings l3if-le | include L3IF|Tunnel
L3IF_LE                   Interface                         IF_ID               Type                  
0x00007f2cd48dabc8        Tunnel1000000000                  0x00000026          DECAP_L3_LE      <-- L3IF + IF_ID (DECAP) match here.        
0x00007f2cd4904e08        Tunnel1000000000                  0x00000026          ENCAP_L3_LE      <-- L3IF + IF_ID (ENCAP) match here.
### Encapsulation LE ###

C9500-ERSPAN#show platform hardware fed switch active fwd-asic abstraction print-resource-handle 0x7f2cd4904e08 0 <--ENCAP
Handle:0x7f2cd4904e08 Res-Type:ASIC_RSC_L3IF_LE Res-Switch-Num:255 Asic-Num:255 Feature-ID:AL_FID_IFM Lkp-ftr-id:LKP_FEAT_INVALID ref_count:1
priv_ri/priv_si Handle: (nil)Hardware Indices/Handles: index0:0x27  mtu_index/l3u_ri_index0:0x2  sm handle [ASIC 0]: 0x7f2cd46ece38 index1:0x27 mtu_index/l3u_ri_index1:0x4 

==============================================================

### Decapsulation LE ###

C9500-ERSPAN#show platform hardware fed switch active fwd-asic abstraction print-resource-handle 0x7f2cd48dabc8 0 <--DECAP
Handle:0x7f2cd48dabc8 Res-Type:ASIC_RSC_L3IF_LE Res-Switch-Num:255 Asic-Num:255 Feature-ID:AL_FID_IFM Lkp-ftr-id:LKP_FEAT_INVALID ref_count:1
priv_ri/priv_si Handle: (nil)Hardware Indices/Handles: index0:0x28 mtu_index/l3u_ri_index0:0x0 sm handle [ASIC 0]: 0x7f2cd46d91c8 index1:0x28 mtu_index/l3u_ri_index1:0x0
### Rewrite Index (decapsulation) ###

C9500-ERSPAN#show platform hardware fed switch active fwd-asic abstraction print-resource-handle 0x7f2cd49615d8 1   <-- RI-decap
Handle:0x7f2cd49615d8 Res-Type:ASIC_RSC_RI Res-Switch-Num:255 Asic-Num:255 Feature-ID:AL_FID_GRE Lkp-ftr-id:LKP_FEAT_INVALID ref_count:1
priv_ri/priv_si Handle: 0x7f2cd48daf28Hardware Indices/Handles: index0:0x16 mtu_index/l3u_ri_index0:0x0 index1:0x16 mtu_index/l3u_ri_index1:0x0
Features sharing this resource:107 (1)]
Cookie length: 56
00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 6b 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Detailed Resource Information (ASIC# 0)
----------------------------------------

Rewrite Data Table Entry, 
ASIC#:0 RI:22 Rewrite_type:AL_RRM_REWRITE_IPV4_ERSPAN2_DECAP(61) Mapped_rii:TUNNEL_IPv4Erspan_DECAP(83)

  L3IF LE Index: 40           <-- 64 in Decimal is 0x40 in Hex which matches Decap LE index seen above

Detailed Resource Information (ASIC# 1)
----------------------------------------
          
Rewrite Data Table Entry, 
ASIC#:1 RI:22 Rewrite_type:AL_RRM_REWRITE_IPV4_ERSPAN2_DECAP(61) Mapped_rii:TUNNEL_IPv4Erspan_DECAP(83)

 L3IF LE Index:	 40
==============================================================
### Station Index (decapsulation) ###

C9500-ERSPAN#show platform hardware fed switch active fwd-asic abstraction print-resource-handle 0x7f2cd4958dd8 1  <-- SI-decap
Handle:0x7f2cd4958dd8 Res-Type:ASIC_RSC_SI Res-Switch-Num:255 Asic-Num:255 Feature-ID:AL_FID_GRE Lkp-ftr-id:LKP_FEAT_INVALID ref_count:1
priv_ri/priv_si Handle: 0x7f2cd49615d8Hardware Indices/Handles: index0:0xae mtu_index/l3u_ri_index0:0x0 index1:0xae mtu_index/l3u_ri_index1:0x0
Features sharing this resource:107 (1)]
Cookie length: 56
00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 6b 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Detailed Resource Information (ASIC# 0)
----------------------------------------

Station Index (SI) [0xae]
RI = 0x16
DI = 0x5012
stationTableGenericLabel = 0
stationFdConstructionLabel = 0x7
lookupSkipIdIndex = 0x15
rcpServiceId = 0
dejaVuPreCheckEn = 0
Replication Bitmap: LD 
Detailed Resource Information (ASIC# 1)
----------------------------------------

Station Index (SI) [0xae]
RI = 0x16
DI = 0x5012
stationTableGenericLabel = 0
stationFdConstructionLabel = 0x7
lookupSkipIdIndex = 0x15
rcpServiceId = 0
dejaVuPreCheckEn = 0
Replication Bitmap: CD 
==============================================================
### Tunnel Decap (TCAM) ###

C9500-ERSPAN#show platform hardware fed switch active fwd-asic abstraction print-resource-handle 0x7f2cd46eee08 1  <-- Decap-Tcam_handle.
Handle:0x7f2cd46eee08 Res-Type:ASIC_RSC_HASH_TCAM Res-Switch-Num:0 Asic-Num:255 Feature-ID:AL_FID_GRE Lkp-ftr-id:LKP_FEAT_TT_IPV4_GRE ref_count:1
priv_ri/priv_si Handle: (nil)Hardware Indices/Handles: handle [ASIC: 0]: 0x7f2cd48db018

Detailed Resource Information (ASIC# 0)
----------------------------------------
Number of HTM Entries: 3

Entry 0: (handle 0x7f2cd48db018)
Labels  Port   Vlan   L3If   Group
M:      0000   0000   0000   0000
V:      0000   0000   0000   0000

M: ffffffff 00000000 00000000 000003ff 00000000 00000100 01000000 00000fff
3f000000 
V: c0a80101 00000000 00000000 00000003 00000000 00000100 01000000 00000000      <-- c0a80101 in Hex maps to 192.168.1.1
        00000000 

GREv4 Dst       Src     Key     C S R D E F VRF Fl L3P GreP Misc RCPSVCId
  M: ffffffff 00000000 00000000 0 0 0 0 0 1 000 0  00  0000 00 3f               <-- F=1 Forwarding
  V: c0a80101 00000000 00000000 0 0 0 0 0 1 000 0  00  0000 00 00        
Action: 00000100 06000000 00000000 00000000 00000000 00000000 000000ad 00000000 
        00000000 00000000 
RL2 RL3 ACF SPK CLPC LKV PRI STL LPC ADC LKI   SI 

0   1   0   0    0   0   6   0   0   0   0    ad                                <-- Hexadecimal value for Station Index.        
Start/Skip Word: 0x00000003
Start Feature, Terminate

Entry 1: (handle 0x7f2cd495c3f8)
Labels  Port   Vlan   L3If   Group
M:      0000   0000   0000   0000
V:      0000   0000   0000   0000

M: ffffffff 00000000 00000000 000003ff 00000000 00000100 00000000 000a0000 
        3f000000 
V: c0a80101 00000000 00000000 00000003 00000000 00000100 00000000 00080000 
        00000000 

GREv4 Dst       Src     Key     C S R D E F VRF Fl L3P GreP Misc RCPSVCId
  M: ffffffff 00000000 00000000 0 0 0 0 0 0 000 a  00  0000 00 3f
  V: c0a80101 00000000 00000000 0 0 0 0 0 0 000 8  00  0000 00 00
Action: 00000100 06000000 00000000 00000000 00000000 00000000 000000ad 00000000 
        00000000 00000000 
RL2 RL3 ACF SPK CLPC LKV PRI STL LPC ADC LKI   SI 

0   1   0   0    0   0   6   0   0   0   0   ad                     
Start/Skip Word: 0x00000000
No Start, Terminate


Entry 2: (handle 0x7f2cd46ef568)
Labels  Port   Vlan   L3If   Group
M:      0000   0000   0000   0000
V:      0000   0000   0000   0000

M: ffffffff 00000000 00000000 000003ff 00000000 00000100 00000000 00020fff
        00000000 
V: c0a80101 00000000 00000000 00000003 00000000 00000100 00000000 00000000 
        00000000 

GREv4 Dst       Src     Key     C S R D E F VRF Fl L3P GreP Misc RCPSVCId
  M: ffffffff 00000000 00000000 0 0 0 0 0 0 000 2  00  0000 00 00
  V: c0a80101 00000000 00000000 0 0 0 0 0 0 000 0  00  0000 00 00
Action: 00000100 06000000 00000000 00000000 00000000 00000000 000000ae 00000000 
        00000000 00000000 
RL2 RL3 ACF SPK CLPC LKV PRI STL LPC ADC LKI   SI 

0   1   0   0    0   0   6   0   0   0   0   ae                                <-- Hexadecimal value for Station Index.
Start/Skip Word: 0x00000000
No Start, Terminate
==============================================================
C9500-ERSPAN#show platform hardware fed switch active fwd-asic resource asic 0 station-index range 0xab 0xab        
ASIC#0:
Station Index (SI) [0xad]
RI = 0x14
DI = 0x505a                  <-- Destination Index                      
stationTableGenericLabel = 0
stationFdConstructionLabel = 0x7
lookupSkipIdIndex = 0x15
rcpServiceId = 0xd
dejaVuPreCheckEn = 0
Replication Bitmap: LD

C9500-ERSPAN#show platform hardware fed switch active fwd-asic resource asic 0 station-index range 0xae 0xae     

Station Index (SI) [0xae]
RI = 0x16
DI = 0x5012                 <-- Destination Index
stationTableGenericLabel = 0
stationFdConstructionLabel = 0x7
lookupSkipIdIndex = 0x15
rcpServiceId = 0
dejaVuPreCheckEn = 0
Replication Bitmap: LD
C9500-ERSPAN#show platform hardware fed switch active fwd-asic resource asic 0 destination-index range 0x505a 0x505a 

Destination index = 0x505a DI_RCP_PORT2
pmap = 0x00000000 0x00000000
cmi = 0x0
rcp_pmap = 0x2
al_rsc_cmi
CPU Map Index (CMI) [0]
ctiLo0 = 0
ctiLo1 = 0
ctiLo2 = 0
cpuQNum0 = 0
cpuQNum1 = 0
cpuQNum2 = 0
npuIndex = 0
stripSeg = 0
copySeg = 0

C9500-ERSPAN#show platform hardware fed switch active fwd-asic resource asic 0 destination-index range 0x5012 0x5012 
ASIC#0:
Destination Index (DI) [0x5012]
portMap = 0x00000000 00000000
cmi1 = 0
rcpPortMap = 0x1

CPU Map Index (CMI) [0]
ctiLo0 = 0
ctiLo1 = 0
ctiLo2 = 0
cpuQNum0 = 0
cpuQNum1 = 0
cpuQNum2 = 0
npuIndex = 0
stripSeg = 0
copySeg = 0

KẾT LUẬN

Như vậy là qua bài viết này, quản trị viên của Cisco Chính Hãng ™ đã gửi đến quý khách hàng cũng như các bạn độc giả hướng dẫn cấu hình SPAN và ERSPAN trên dòng sản phẩm Cisco Catalyst 9000 Series Switch.

Cisco Chính Hãng ™ là một địa chỉ phân phối Switch Cisco Catalyst chính hãng uy tín hàng đầu tại Việt Nam. Đến với chúng tôi, quý khách hàng sẽ nhận được những thông tin chính xác về nguồn gốc xuất xứ, giấy tờ, chứng chỉ, với mức giá Discount theo quy định của nhà sản xuất. Hàng luôn sẵn kho số lượng lớn để đáp ứng nhu cầu của khách hàng.

Cisco Chính Hãng ™ có văn phòng giao dịch tại 2 thành phố lớn nhất là Hà Nội và Hồ Chí Minh (Sài Gòn). Giúp thuận tiện cho khách hàng có như cầu mua Switch Cisco Catalyst 9000 Chính Hãng có thể đến trực tiếp văn phòng của chúng tôi, cũng như rút ngắn thời gian giao hàng các sản phẩm máy chủ chính hãng đến với khách hàng..

Ngoài ra thì chúng tôi phân phối Cisco Việt Nam chính hãng trên toàn quốc, Do đó nếu khách hàng không ở có điều kiện để đến trực tiếp văn phòng của chúng tôi tại Hà Nội và Sài Gòn thì có thể liên hệ với chúng tôi để nhận thông tin về báo giá, tình trạng hàng hoá, chương trình khuyến mại…

Để Nhận Thông Tin Hỗ Trợ Báo Giá Dự Án, Đặt Hàng, Giao Hàng, Đặt Hàng, Giao Hàn Bảo Hành, Khuyến Mại, Hỗ trợ kỹ thuật của các sản phẩm Switch Cisco Catalyst 9000 Chính Hãng tại TP Hà Nội và khu vực lân cận, Hãy Chát Ngay với chúng tôi ở khung bên dưới hoặc gọi điện tới số hotline hỗ trợ 24/7 của Cisco Chính Hãng ™. Hoặc nếu quý khách ở Hà Nội hoặc các tỉnh lân cận, có thể liên hệ tới văn phòng của chúng tôi tại Hà Nội theo thông tin sau:

Địa Chỉ Phân Phối Cisco Catalyst 9000 Series Chính Hãng Giá Tốt Tại Hà Nội

Địa Chỉ Phân Phối Cisco Catalyst 9000 Series Chính Hãng Giá Tốt Tại Sài Gòn (TP HCM)

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Hotline: 0967.40.70.80