Trivial: Clean up some typos.
[vpp.git] / src / vnet / span / span_doc.md
1 # VPP SPAN implementation    {#span_doc}
2
3 This is a memo intended to contain documentation of the VPP SPAN implementation.
4 Everything that is not directly obvious should come here.
5
6
7 ## Switched Port Analyzer (SPAN)
8 Port mirroring is used on a network switch to send a copy of network packets seen on one switch port to a network monitoring connection on another switch port.
9 Can be used by network engineers or administrators to measure performance, analyze and debug data or diagnose errors on a network.
10
11 ### RX traffic node
12 There is one static node to mirror incoming packets.
13 * span-input: Creates a copy of incoming buffer due to incoming buffers can be reused internally.
14
15 Chaining: dpdk-input -> span-input ->
16 * original buffer is sent to ethernet-input for processing
17 * buffer copy is sent to interface-output
18
19 ### Configuration
20 SPAN supports the following CLI configuration commands:
21
22 #### Enable/Disable SPAN (CLI)
23         set interface span <if-name> [disable | destination <if-name>]
24
25 <if-name>: mirrored interface name
26 destination <if-name>: monitoring interface name
27 disable: delete mirroring
28
29 #### Enable/Disable SPAN (API)
30 SPAN supports the following API configuration command:
31         sw_interface_span_enable_disable src GigabitEthernet0/8/0 dst GigabitEthernet0/9/0
32         sw_interface_span_enable_disable src_sw_if_index 1 dst_sw_if_index 2
33
34 src/src_sw_if_index: mirrored interface name
35 dst/dst_sw_if_index: monitoring interface name
36
37 #### Remove SPAN entry (API)
38 SPAN supports the following API configuration command:
39         sw_interface_span_enable_disable src_sw_if_index 1 dst_sw_if_index 2 disable
40
41 src_sw_if_index: mirrored interface name
42 dst_sw_if_index: monitoring interface name
43
44 ### Configuration example
45
46 Mirror all packets on interface GigabitEthernet0/10/0 to interface GigabitEthernet0/11/0.
47
48 Configure IPv4 addresses on mirrored interface:
49 set interface ip address GigabitEthernet0/10/0 192.168.1.13/24
50 set interface state GigabitEthernet0/10/0 up
51
52 Configure IPv4 addresses on monitoring interface:
53 set interface ip address GigabitEthernet0/11/0 192.168.2.13/24
54 set interface state GigabitEthernet0/11/0 up
55
56 Configure SPAN
57 set span src GigabitEthernet0/10/0 dst GigabitEthernet0/11/0
58
59 ### Operational data
60
61 Active SPAN mirroring CLI show command:
62     show interfaces span
63
64 Active SPAN mirroring API dump command:
65     sw_interface_span_dump