Supported Platforms
Related Documentation
- J, M, MX, T Series
- Configuring Ethernet Physical Interface Properties
- M, MX, T Series
- Configuring Port Mirroring
Configuring Protocol-Independent Firewall Filter for Port Mirroring
On MX Series routers with MPCs, you can configure a firewall filter to mirror Layer 2 and Layer 3 packets at a global level and at an instance level. When port mirror is configured at ingress or egress, the packet entering or exiting an interface is copied and the copies are sent to the local interface for local monitoring.
Typically, the firewall filter is configured such that it mirrors either Layer 2 or Layer 3 packets based on the family configured at the interface. However, in case of an integrated routing and bridging (IRB) interface, Layer 2 packets are not completely mirrored because IRB interfaces are configured to mirror only Layer 3 packets. On such an interface, you can configure a firewall filter and port mirroring parameters in the family any to ensure that a packet is completely mirrored irrespective of whether it is a Layer 2 or a Layer 3 packet.
![]() |
|
Before you begin configuring port mirroring, you must configure valid physical interfaces.
To configure a protocol-independent firewall filter for port mirroring:
- Configure a global firewall filter for port-mirroring
egress or ingress traffic.[edit firewall family any]user@host# set filter filter-name {term term-name {then {port-mirror;accept;}}}
- Configure a firewall filter to port-mirror traffic for
an instance.[edit firewall family any]user@host# set filter filter-name {term term-name {then {port-mirror-instance instance-name;accept;}}}
- Configure port mirroring parameters for egress and ingress
traffic.[edit forwarding-options port-mirroring]user@host# input {maximum-packet-length bytesrate rate;}family any {output {(next-hop-group group-name | interface interface-name);}}
- Configure port mirroring parameters for an instance. In
this configuration, you can specify the output or destination for
the Layer 2 packets to be either a valid next-hop group or a Layer
2 interface.[edit forwarding-options port-mirroring]user@host#instance instance-name {family any{output {(next-hop-group group-name | interface interface-name);}}}
- Configure the firewall filter at the ingress or egress
interface on which the packets are transmitted.[edit interface interface-name unit]user@host# filter {output filter-name;input filter-name;}
Related Documentation
- J, M, MX, T Series
- Configuring Ethernet Physical Interface Properties
- M, MX, T Series
- Configuring Port Mirroring
Published: 2013-07-18
Supported Platforms
Related Documentation
- J, M, MX, T Series
- Configuring Ethernet Physical Interface Properties
- M, MX, T Series
- Configuring Port Mirroring