Some customers may request to simultaneously send port-mirrored traffic to two analyzing/sniffing servers that connect to two switches, for recording. The purpose of this setup is to mirror packets that traverse two EX4300 switches to reach two servers that connect to port ge-0/0/13, respectively, on the switches at the same time.
This article uses an example (server 1 and server 2 that connect to port ge-0/0/13 on EX4300-1 and EX4300-2, respectively) to demonstrate this setup.
Note: The traffic being mirrored is within a VLAN.
10.1.1.1/24 and 10.1.1.2/24 are two clients that connect to 2x EX4300 switches (EX4300-1 and EX4300-2), which are located within the same VLAN.
Ports xe-0/2/0 and xe-0/0/32 are trunk ports on the two EX4300 switches.
Ports ge-0/0/20 and ge-0/0/21 on the two switches are connected by a physical RJ45 cable in order to form physical loops.
Ports ge-0/0/13 on both the switches connect to sniffing or analyzing servers, respectively.
VLAN 100 is used for normal traffic, such as Internet Control Message Protocol (ICMP) in this example.
VLAN 901 is used to flood mirrored packets to the two servers on both the switches.
EX4300-1
set interfaces ge-0/0/11 unit 0 family ethernet-switching vlan members v100
set interfaces ge-0/0/13 unit 0 family ethernet-switching interface-mode trunk set interfaces ge-0/0/13 unit 0 family ethernet-switching vlan members v901
set interfaces ge-0/0/20 unit 0 family ethernet-switching vlan members v901
set interfaces ge-0/0/21 unit 0 family ethernet-switching
set interfaces xe-0/2/0 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/2/0 unit 0 family ethernet-switching vlan members v100 set interfaces xe-0/2/0 unit 0 family ethernet-switching vlan members v901
set vlans v100 vlan-id 100 set vlans v100 l3-interface irb.100 set vlans v901 vlan-id 901
set vlans v901 switch-options no-mac-learning
set forwarding-options analyzer RSPAN_Test input ingress interface ge-0/0/11.0 set forwarding-options analyzer RSPAN_Test input egress interface ge-0/0/11.0 set forwarding-options analyzer RSPAN_Test output interface ge-0/0/21.0
set protocols rstp interface ge-0/0/20 disable set protocols rstp interface ge-0/0/21 disable
EX4300-2
set interfaces xe-0/0/32 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/0/32 unit 0 family ethernet-switching vlan members v100 set interfaces xe-0/0/32 unit 0 family ethernet-switching vlan members v901
2018-08-20: Re-organized step 1 and 2 in Solution section