To configure global port-mirroring properties for a Layer 2 packet address family, include the input statement and the family (bridge | ccc | vpls) output statement at the [edit forwarding-options port-mirroring] hierarchy level:
- [edit]
- forwarding-options {
-
- port-mirroring {
-
- input { # Input packet-sampling properties
- maximum-run-length number;
- rate number;
- run-length number;
- }
-
- family ( bridge | ccc | vpls) {
-
- output { # Mirror destination properties
- interface interface-name;
- no-filter-check; # Optional
- }
- }
- }
- }
To configure input packet-sampling properties, include the input statement at the [edit forwarding-options port-mirroring] hierarchy level. To specify the number of packets in a sample, include the rate number statement. To specify the number of sampled packets to mirror, include the run-length number statement.
To configure the length to which mirrored packets are truncated, include the maximum-packet-length statement at the [edit forwarding-options port-mirroring input] hierarchy level. The default value is 0, which means the mirrored packets are not truncated. The valid range is 0 through 9216.
To configure the mirror destination properties, include the family (bridge | ccc | vpls) output statement at the [edit forwarding-options port-mirroring] hierarchy level. To specify the physical interface on which to send the duplicate packets, include the interface interface-name statement.
![]() |
Note: Under the [edit forwarding-options port-mirroring] hierarchy level, the protocol family statement family bridge is an alias for family vpls. The command-line interface (CLI) displays Layer 2 port-mirroring configurations as family vpls, even for Layer 2 port-mirroring configured as family bridge. |
If you need to allow configuration of filters on the destination interface for the global port-mirroring instance, include the no-filter-check statement. If you apply a filter to an interface that is a Layer 2 port-mirroring destination, a commit failure is returned unless you included the no-filter-check option at the [edit forwarding-options port-mirroring family (bridge | ccc | vpls) output] hierarchy level.