This article explains how port mirroring feature can be configured on an SRX device.
Sometimes we may need to examine the traffic on an interface. This can be accomplished by taking a packet capture on the interface or mirroring the interface.
[ edit forwarding-options] port-mirroring { input { rate 1; run-length 10; } family inet { output { interface ge-0/0/1.0 { next-hop 2.2.2.1; } } } }
edit forwarding-options] port-mirroring { input { rate 1; run-length 10; } family inet { output { interface ge-0/0/1.0 { next-hop 2.2.2.1; } } } }
[edit firewall] filter port-mirror { term 1 { from { source-address { 0.0.0.0/0; } } then { port-mirror; accept; } } }
[edit interfaces] ge-0/0/0 { unit 0 { family inet { filter { input port-mirror; output port-mirror; } address 1.1.1.1/24; } } }
system { root-authentication { encrypted-password "$ABC123"; ## SECRET-DATA } } interfaces { ge-0/0/0 { unit 0 { family inet { filter { input port-mirror; output port-mirror; } address 1.1.1.1/24; } } } ge-0/0/1 { unit 0 { family inet { address 2.2.2.2/24; } } } } forwarding-options { port-mirroring { input { rate 1; run-length 10; } family inet { output { interface ge-0/0/1.0 { next-hop 2.2.2.1; } } } } } security { policies { default-policy { permit-all; } } zones { security-zone trust { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { all; } } } } firewall { filter port-mirror { term 1 { from { source-address { 0.0.0.0/0; } } then { port-mirror; accept; } } } }