GigaSMART Header Stripping
GigaSMART operations with a strip-header component can identify and remove headers from tagged packets or headers and trailers from tunneled (encapsulated) packets.
Example – FM6000 Timestamping
The following is an example CLI command to strip packets containing the FM6000 timestamp:
(config) # gsop alias fm6000_replace strip-header fm6000-ts none port-list gsgroup1
The following are example CLI commands to convert packets containing the FM6000 timestamp to UTC and append the UTC timestamp to either the Gigamon trailer or the PRT-H00-X12TS trailer:
(config) # gsop alias fm6000_replace strip-header fm6000-ts gs port-list gsgroup1
(config) # gsop alias fm6000_replace strip-header fm6000-ts x12-ts port-list gsgroup1
The following is an example map using the strip header GigaSMART operation:
(config) # map alias fm6000_map
(config map alias fm6000_map) # type regular byRule
(config map alias fm6000_map) # roles replace admin to owner_roles
(config map alias fm6000_map) # use gsop fm6000_replace
(config map alias fm6000_map) # rule add pass ipver 4
(config map alias fm6000_map) # to 1/1/x1
(config map alias fm6000_map) # from 1/1/x2
(config map alias fm6000_map) # exit
(config) #
Note: There is one-to-one mapping between the GigaSMART operation (gsop) and the map.
If there are multiple devices, each device can be configured with a different timestamp format. To configure this, use a different gsop and a different map for each device. For example, for packets arriving from FM6000 device1, configure a gsop for FM6000 device1 and associate it with map1. For packets arriving from FM6000 device2, configure a gsop for FM6000 device2 and associate it with map2.
All the maps can send all the packets to the same tool port.
Example 1 – Stripping PPPoE Encapsulated Packets
In this example, the PPPoE encapsulated packets are stripped from the packet structure. 1 illustrates a red outline around the frame that needs to be striped.
1 | PPPoE Encapsulated Packets |
The following is an example CLI command syntax to strip PPPoE encapsulated packets:
(config) # gsop alias <alias> strip-header generic anchor-hdr1 eth offset end header-count 1 anchor-hdr2 any port-list gsg
Table 2: Components of PPPoE Encapsulated Packets
Component |
Description |
anchor-hdr1 eth offset end |
Starts the Header Stripping operation from the right end of the Ethernet header. |
header-count 1 |
Strips the next header after the Ethernet Header. |
anchor-hdr2 any |
Updates a valid protocol as the second header in the packet. In this case, any IPv4 or IPv6 protocol can become the second header. |
Example 2 – Retaining IPv4 Inner Header from the LISP Header Format
Cisco LISP is used to carry original IP packets to support multi-homing. In this example, the IPv4 outer header, UDP header, and LISP header are stripped from the Cisco LISP header format. The LISP header is considered as an unknown header.
3 illustrates a red outline around the frame that needs to be striped.
3 | Cisco LISP Encapsulated Packets |
The following is an example CLI command syntax to strip Cisco LISP encapsulated packets:
(config) # gsop alias remove_lisp strip-header generic anchor-hdr1 eth offset end header-count 2 custom-len 8 anchor-hdr2 ipv4
Table 4: Components of Cisco LISP Encapsulated Packets
Component |
Description |
anchor-hdr1 eth offset end |
Starts the Header Stripping operation from the right end of the Ethernet header. |
header-count 2 |
Strips the next two headers, which are IPv4 Outer Header and UDP from the packet. |
custom-len 8 |
Strips 8 bytes of the unknown packet header. LISP is an unknown header. |
anchor-hdr2 ipv4 |
Updates IPv4 protocol as the second header in the packet. |
Example 3 – Stripping Outer MAC Header from the L2 MPLS Encapsulated Frames
The L2 MPLS packet, also known as VPLS, encapsulates Ethernet packets in the MPLS label stack. In this example, the outer Ethernet header and MPLS [PW Label] are stripped from the L2 MPLS encapsulated packets.
5 illustrates a red outline around the frame that needs to be striped.
5 | L2 MPLS Encapsulated Packets |
The following is an example CLI command syntax to strip the outer MAC header from the L2 MPLS encapsulated packets:
(config) # gsop alias remove_out_mac_vpls strip-header generic anchor-hdr1 none offset start header-count 2 anchor-hdr2 none port-list gsp
Table 6: Components of L2 MPLS Encapsulated Packets
Component |
Description |
anchor-hdr1 none offset start |
Starts the Header Stripping operation from the start of the Ethernet header. |
header-count 2 |
Strips the first and the second header from the packet. The outer Ethernet header and MPLS [PW label] packet header are both removed. As anchor-hdr1 is set to none, the header-count counts the first header for stripping. |
anchor-hdr2 none |
Signifies that there is no need to specify the second anchor header. In this case, the IPv4 protocol forms the first header of the packet after the stripping operation is complete. |
Example 4 – Stripping PW Label Frame from the L2 MPLS Encapsulated Frames
Using the same example as in Example 3 – Stripping Outer MAC Header from the L2 MPLS Encapsulated Frames, another scenario is explained. In this scenario, only the PW Label frame from the MPLS header is removed.
7 illustrates a red outline around the frame that needs to be striped.
7 | L2 MPLS Encapsulated Packets |
The following is an example CLI command syntax to strip the PW Label frame from the L2 MPLS encapsulated packets:
(config) # gsop alias remove_pwlabel_mpls strip-header generic anchor-hdr1 mpls offset 4 custom-len 4 anchor-hdr2 none port-list gsp
Table 8: Components of L2 MPLS Encapsulated Packets
Component |
Description |
anchor-hdr1 mpls offset 4 |
Starts the Header Stripping operation after the first 4 bytes of the MPLS header. |
custom-len 4 |
Strips the custom length of 4 bytes of the PW Label frame. |
anchor-hdr2 none |
Signifies that it is not necessary to specify the next header as GigaSMART can parse the next header information from the MPLS header. |
Example 5 – Retaining Inner Ethernet Frame from the VXLAN Encapsulated Frame
VXLAN encapsulates Ethernet packets in IP using VXLAN header. In this example, the outer Ethernet header, outer IP header, outer UDP header, and VXLAN Header are stripped from the VXLAN encapsulated packets.
9 illustrates a red outline around the frame that needs to be striped.
9 | VXLAN Encapsulated Packets |
The following is an example CLI command syntax to strip outer Ethernet frame from the VXLAN encapsulated packets:
(config) # gsop alias remove_outer_mac_vxlan strip-header generic anchor-hdr1 none offset start header-count 4 anchor-hdr2 none port-list gsp
Table 10: Components of VXLAN Encapsulated Packets
Component |
Description |
anchor-hdr1 none offset start |
Starts the Header Stripping operation from the start of the Ethernet header. |
header-count 4 |
Strips the next three headers, which is the outer IP header, outer UDP header, and VXLAN header. |
anchor-hdr2 none |
Signifies that there is no need to specify the second anchor header. In this case, the IPv4 protocol forms the first header of the packet. Note: When the first anchor header is set to none, the second anchor header must also be set to none. |
Example 6 – Stripping TRILL Header Frames
TRILL encapsulates Ethernet packets in Ethernet frame to provide L2 layer routing in data centers. In this example, consider TRILL frame as an unknown header. This TRILL frame is stripped with the inner Ethernet header from the encapsulated packets. The combined length of TRILL header (6 bytes) and inner Ethernet header (14 bytes) is 20 bytes.
11 illustrates a red outline around the frame that needs to be striped.
11 | TRILL Encapsulated Packets |
The following is an example CLI command syntax to strip TRILL from the encapsulated packets:
(config) # gsop alias remove_inner_mac_trill strip-header generic anchor-hdr1 eth offset end custom-len 20 anchor-hdr2 ipv4 port-list gsg
Table 12: Componentsof TRILL Encapsulated Packets
Component |
Description |
anchor-hdr1 eth offset end |
Starts the Header Stripping operation from the right end of the outer Ethernet header. |
custom-len 20 |
Strips 20 bytes of unknown header from the packets. In this case, the TRILL frame and the inner Ethernet header is stripped. |
anchor-hdr2 ipv4 |
Updates IPv4 protocol as the second header in the packet. |
Example 7 – Stripping Outer Ethernet Header from the Avaya SPB Encapsulated Packets
Avaya SPB (802.1ah) fabric encapsulates Ethernet packets using MAC-In-MAC headers. In this example, the outer Ethernet header and ITAG are removed from the packet structure.
7 illustrates a red outline around the frame that needs to be striped.
13 | Avaya SPB Encapsulated Packets |
The following is an example CLI command syntax to strip the outer Ethernet headers from the encapsulated packets:
(config) # gsop alias remove_outer_mac_spb strip-header generic anchor-hdr1 none offset start header-count 2 anchor-hdr2 none port-list gsg
Table 14: Components of Avaya SPB Encapsulated Packets
Component |
Description |
anchor-hdr1 none offset start |
Starts the Header Stripping operation from the left end of the outer Ethernet header. |
header-count 2 |
Strips the outer Ethernet header and ITAG from the packet. |
anchor-hdr2 none |
Signifies that it is not necessary to specify the next header. The inner Ethernet header becomes the first header after the stripping operation is complete. |
Example 8 – Stripping Inner Ethernet Header from the Avaya SPB Encapsulated Packets
Using the same example as in Example 7 – Stripping Outer Ethernet Header from the Avaya SPB Encapsulated Packets, another scenario is explained. In this example, the ITAG, inner Ethernet header, and VLAN are removed from the packet structure.
7 illustrates a red outline around the frame that needs to be striped.
15 | Avaya SPB Encapsulated Packets |
The following is an example CLI command syntax to strip the inner Ethernet headers from the encapsulated packets:
(config) # gsop alias remove_inner_mac_spb strip-header generic anchor-hdr1 eth end header-count 3 anchor-hdr2 any port-list gsg
Table 16: Components of Avaya SPB Encapsulated Packets
Component |
Description |
anchor-hdr1 eth offset end |
Starts the Header Stripping operation from the right end of the outer Ethernet header. |
header-count 3 |
Strips the ITAG, inner Ethernet header, and VLAN from the packet. |
anchor-hdr2 any |
Indicates that any valid protocol available after the Header Stripping operation can become the next header in the packet. |