Celestica Documentation Portal

Find your product documents here

ERSPAN session config

Adds mirror session source interface(s) along with GRE tunnel mirror encap fields such as destination IP, source IP, DSCP, GRE, TTL field values.

Syntaxdestination erspan dst-ip <destination-ip-address> src-ip <source-ip- address> dscp <dscp-value> gre <gre-value> ttl <ttl-value> source {Ethernet <interface-number> | PortChannel <lag-id>} direction <direction-value>
Command mode Mirror session
Parameters
  • destination-ip-address – GRE tunnel header's Destination IPv4 host address. Mirror destination port is resolved based on this IP address. Format: A.B.C.D

  • source-ip-address – GRE tunnel header's source IPv4 address. Format: A.B.C.D

  • dscp-value – GRE tunnel header's DSCP value. Range: 0 – 63.

  • gre-value – GRE tunnel protocol value. It should be given as 2-byte hex value with 0x prefix.

  • ttl-value – GRE tunnel header's ttl value. Range: 0 – 63.

  • interface-number – Mirror source Ethernet interface number.

  • lag-id – Mirror source port-channel number. Range: 1 – 256.

  • direction-value – Direction of the source-interface's traffic to be mirrored. Valid values are rx/tx/both.

UsageUse no source {Ethernet <interface-number> | PortChannel <lag-id>} to remove only the source interface from the mirror session.
Supported Releases 1.0.0 or later
Click commandconfig mirror_session erspan add <session_name> <src_ip> <dst_ip> <dscp> <ttl> [gre_type] [queue] [src_port] [direction]
Example
sonic(config)# mirror-session m1
sonic(config-mirror-m1)# erspan dst-ip 1.1.1.1 src-ip 2.2.2.2 dscp 0 gre 0x1234 ttl 63 source Ethernet 0 direction rx
sonic(config-mirror-m1)# erspan dst-ip 1.1.1.1 src-ip 2.2.2.2 dscp 0 gre 0x1234 ttl 63 source Ethernet 1 direction rx
sonic(config-mirror-m1)# no source Ethernet 0