mirror-by-port

Use port mirroring to aid in diagnostic and security operations.

Syntax

Command Parameters

<1-479>
Specifies the mirror-by-port entry ID in the range of 1 to 479.
enable
Enables or disables a mirroring instance already created in the mirror-by-port table.
in-port {slot/port[/sub-port] [-slot/port[/sub-port]] [,...]} |monitor-mlt <1-512> |out-port {slot/port[/sub-port] [-slot/port[/sub-port]] [,...]}
Creates a new mirror-by-port table entry.
  • in-port {slot/port[/sub-port][-slot/port[/sub-port]][,...]} specifies the mirrored port.

  • monitor-mlt <1-512> specifies the mirroring MLT ID from 1–512.

  • out-port {slot/port[/sub-port][-slot/port[/sub-port]][,...]} specifies the mirroring port.

{slot/port[/sub-port][-slot/port[/sub-port]][,...]}

Identifies the slot and port in one of the following formats: a single slot and port (slot/port), a range of slots and ports (slot/port-slot/port), or a series of slots and ports (slot/port,slot/port,slot/port). If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

mirror-port <1-479> {slot/port[/sub-port] [-slot/port[/sub-port]] [,...]}
Modifies the mirrored port. Before you can modify an existing entry, you must disable the entry: no mirror-by-port <1-479> enable.
{slot/port[/sub-port][-slot/port[/sub-port]][,...]}

Identifies the slot and port in one of the following formats: a single slot and port (slot/port), a range of slots and ports (slot/port-slot/port), or a series of slots and ports (slot/port,slot/port,slot/port). If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

mode <both|tx|rx>
Sets the mirroring mode. The default is rx. both mirrors both egress and ingress packets. tx mirrors egress packets. rx mirrors ingress packets.
monitor-ip <1-479> {A.B.C.D} [dscp <0-63>] [ttl <2-255>]
Creates a mirroring instance for Layer 3 mirroring. The destination must be an IP address {A.B.C.D}. The default DSCP is 0 and the default TTL is 255.
monitor-isid-offset <1-1000>
Specifies the offset ID that is mapped to the actual monitor I-SID where packets are mirrored. Monitor I-SID = base monitor I-SID + offset ID. The base monitor I-SID is 16776000.
monitor-mlt <1-479> <1-512>
Modifies the monitoring MLT; <1-479> <1-512> specifies the port mirroring entry id and the MLT ID. Before you can modify an existing entry, you must disable the entry: no mirror-by-port <1-479> enable .
monitor-port <1-479> {{slot/port[/sub-port] [-slot/port[/sub-port]] [,...]}}
Modifies the monitoring ports. Before you can modify an existing entry, you must disable the entry: no mirror-by-port <1-479> enable.
{slot/port[/sub-port][-slot/port[/sub-port]][,...]}

Identifies the slot and port in one of the following formats: a single slot and port (slot/port), a range of slots and ports (slot/port-slot/port), or a series of slots and ports (slot/port,slot/port,slot/port). If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

monitor-vlan <1-479> <1-4059>
Modifies the monitoring VLAN. Before you can modify an existing entry, you must disable the entry: no mirror-by-port <1-479> enable .

Specifies the VLAN ID in the range of 1 to 4059. By default, VLAN IDs 1 to 4059 are configurable and the system reserves VLAN IDs 4060 to 4094 for internal use. On switches that support the vrf-scaling and spbm-config-mode boot configuration flags, if you enable these flags, the system also reserves VLAN IDs 3500 to 3998. VLAN ID 1 is the default VLAN and you cannot create or delete VLAN ID 1.

qos <0-5>
Specifies the Quality of Service (QoS) profiles for the system. Monitoring I-SID supports six different QoS levels, each QoS level can be configured individually. Default value is 1.
remote-mirror-vlan-id <1-4059>
Sets the remote mirror VLAN ID.

Specifies the VLAN ID in the range of 1 to 4059. By default, VLAN IDs 1 to 4059 are configurable and the system reserves VLAN IDs 4060 to 4094 for internal use. On switches that support the vrf-scaling and spbm-config-mode boot configuration flags, if you enable these flags, the system also reserves VLAN IDs 3500 to 3998. VLAN ID 1 is the default VLAN and you cannot create or delete VLAN ID 1.

Default

The default DSCP is 0. The default TTL is 64.

Command Mode

Global Configuration