Command Line Reference
Network Management And Monitor...
Mirror Configuration
5 min
mirror configuration mirror configuration show mirror show mirror \[command] show mirror \[purpose] show configuration related to mirror \[view] system view \[use cases] sonic# show mirror session + + + + + + \| session name | destination port | source port | type | direction | +================+====================+===============+========+=============+ \| 1 | ethernet1 | ethernet2 | span | both | + + + + + + mirror session mirror session name \[command] mirror session id span \[direction {rx|tx|both}] {src ethernet|src vlan} port name {dst ethernet} port name no mirror session id span \[purpose] create a mirror session or add port to the mirror session \[parameter] true 158,352 left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type \[view] system configuration view \[use cases] sonic# configure sonic(config)# mirror session 1 span direction both src ethernet 2 dst ethernet 3 mirror session id erspan mirror session id erspan \[command] mirror session id erspan \[direction {rx|tx|both}] {src ethernet} port name gre src ip a b c d/a b gre dst ip a b c d/a b \[gre vrf vrf name ] no mirror session id erspan \[purpose] create a remote mirroring session and add the source and destination addresses for gre encapsulation \[parameter] true 148,362 left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type \[view] system view \[usage scenario] erspan is a layer 3 remote mirroring technology that duplicates packets from specified ports it sends the duplicated packets to a remote data monitoring device through a gre tunnel, allowing users to analyze these packets using the monitoring device for network monitoring and troubleshooting \[notes] to configure encapsulation parameters for layer 3 remote mirroring, you only need to specify the mirror source and destination port on the source device additionally, all devices must have a unicast routing protocol configured, ensuring a seamless layer 3 network between the devices it should be noted that erspan needs to be configured after the destination ip actually takes effect for example, if the destination ip corresponds to a static arp, then the static arp needs to be configured first before configuring the erspan function \[use cases] sonic# configure sonic(config)# mirror session 1 erspan direction rx src ethernet 3 gre src ip 10 1 1 1 gre dst ip 30 1 1 2
