Command Line Reference
Network Management And Monitor...
Mirror Configuration
5 min
mirror configuration mirror configuration show mirror session show mirror session \[command] show mirror session \[ number ] \[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 \[command] mirror session session id span \[direction {rx|tx|both}] {src ethernet|src vlan} port name {dst ethernet|dst vlan|dst link aggregation} port name no mirror session id span \[purpose] create a mirror session or add port to the mirror session \[parameter] true 379,940 left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type \[view] system configuration view \[use cases] sonic(config)# mirror session 1 span sonic(config span mirror 1)# src ethernet 4 sonic(config span mirror 1)# dst ethernet 7 sonic(config span mirror 1)# mirror session rspan mirror session rspan \[command] mirror session id rspan \[direction {rx|tx|both}] {src ethernet|src vlan} port name {dst ethernet|dst link aggregation} port name remote vlan vlan id no mirror session id rspan \[purpose] create a remote mirroring session or add source/destination interfaces to an existing mirroring session \[parameter] true 340,876 left #4283c7 unhandled content type left #4283c7 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type \[view] system view \[usage scenario] rspan's main function is to copy the traffic of ports on one switch to an analysis port on another remote switch, allowing network administrators to monitor and analyze traffic on the remote switch without direct access to the target device remote switched port analyzer (rspan) builds upon local port mirroring by encapsulating packets with a specified vlan, transmitting them through intermediate devices, and ultimately reaching the destination switch the vlan is then stripped off at the destination switch before being forwarded to the backend analyzer \[notes] as the rspan dedicated vlan, "remote vlan" is not recommended for other purposes the destination interface needs to be added to the "remote vlan " \[use cases] sonic(config)# mirror session 1 rspan sonic(config rspan mirror 1)# src ethernet 4 sonic(config rspan mirror 1)# dst ethernet 7 sonic(config rspan mirror 1)# remote vlan 100
