Topology:
Configuration Steps:
jcluser@spine2# deactivate protocols bgp
jcluser@spine2# commit
{master:0}
jcluser@leaf1> show route 10.1.255.14
inet.0: 17 destinations, 17 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.255.14/32 *[BGP/170] 1d 01:58:39, localpref 100
AS path: 65001 65014 I, validation-state: unverified
> to 10.1.11.1 via xe-0/0/6.0
:vxlan.inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
10.1.255.14/32 *[Static/1] 1d 01:58:35, metric2 0
jcluser@spine1# set forwarding-options port-mirroring instance mirror-leaf1-and-leaf4 family inet output ip-address 172.16.1.2
{master:0}[edit firewall family inet filter port-mirror-from-leaf1]
jcluser@spine1# show | display set | no-more
set firewall family inet filter port-mirror-from-leaf1 term 1 from source-address 10.1.255.11/32
set firewall family inet filter port-mirror-from-leaf1 term term1 from destination-address 10.1.255.14/32
set firewall family inet filter port-mirror-from-leaf1 term term1 then count from-leaf1-vtep
set firewall family inet filter port-mirror-from-leaf1 term term1 then port-mirror-instance mirror-leaf1-and-leaf4
set firewall family inet filter port-mirror-from-leaf1 term term1 then accept
set firewall family inet filter port-mirror-from-leaf1 term term2 then accept
jcluser@spine1# top edit firewall family inet filter port-mirror-from-leaf4
{master:0}[edit firewall family inet filter port-mirror-from-leaf4]
set firewall family inet filter port-mirror-from-leaf4 term term1 from source-address 10.1.255.14/32
set firewall family inet filter port-mirror-from-leaf4 term term1 from destination-address 10.1.255.11/32
set firewall family inet filter port-mirror-from-leaf4 term term1 then count from-leaf4-vtep
set firewall family inet filter port-mirror-from-leaf4 term term1 then port-mirror-instance mirror-leaf1-and-leaf4
set firewall family inet filter port-mirror-from-leaf4 term term1 then accept
set firewall family inet filter port-mirror-from-leaf4 term term2 then accept
Filters are applied to Leaf 1 and Leaf 4-facing fabric interfaces.
jcluser@spine1# set interfaces xe-0/0/6 unit 0 family inet filter input port-mirror-from-leaf4
jcluser@spine1# set interfaces xe-0/0/7 unit 0 family inet filter input port-mirror-from-leaf1
5. Add Additional Filters (Optional):
Imput from step 3.
jcluser@spine1# show | display set
A quick modification to the existing port-mirror-from-leaf4 filter is needed to also match on the
destination address of Leaf's 2 VTEP and create an input filter for Spine 1's Leaf 2-facing interface. (No applied on this example)
set firewall family inet filter port-mirror-from-leaf4 term term1 from source-address 10.1.255.12/32
6. Commit Changes at Spine 1:
jcluser@spine1# show | compare rollback 2
[edit interfaces]
[edit interfaces xe-0/0/6 unit 0 family inet]
+ filter {
+ input port-mirror-from-leaf4;
+ }
[edit interfaces xe-0/0/7 unit 0 family inet]
+ input port-mirror-from-leaf1;
[edit forwarding-options]
+ port-mirroring {
+ instance {
+ mirror-leaf1-and-leaf4 {
+ family inet {
+ output {
+ ip-address 172.16.1.2;
[edit]
+ firewall {
+ filter port-mirror-from-leaf4 {
+ term term1 {
+ from {
+ source-address {
+ 10.1.255.14/32;
+ destination-address {
+ 10.1.255.11/32;
+ then {
+ count from-leaf4-vtep;
+ port-mirror-instance mirror-leaf1-and-leaf4;
+ accept;
+ term term2 {
+ then accept;
+ filter port-mirror-from-leaf1 {
+ term 1 {
+ count from-leaf1-vtep;
7. Modify Configuration at Leaf 3:
jcluser@bl-leaf3# show interfaces xe-0/0/0
unit 0 {
family inet {
address 172.16.1.1/24;
}
8. Modify Underlay Export Policy at Border Leaf 3:
{master:0}[edit policy-options policy-statement send-direct]
jcluser@bl-leaf3# show | display set
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 from route-filter 10.1.255.13/32 exact
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-direct term 2 from protocol direct
set policy-options policy-statement send-direct term 2 from route-filter 172.16.1.0/24 exact
set policy-options policy-statement send-direct term 2 then accept
jcluser@bl-leaf3# top show | compare rollback 4
+ xe-0/0/3 {
+ unit 0 {
+ address 10.1.13.2/30;
[edit policy-options policy-statement send-direct]
term 1 { ... }
+ term 2 {
+ protocol direct;
+ route-filter 172.16.1.0/24 exact;
Verification:
jcluser@spine1> show route 172.16.1.0/24
inet.0: 19 destinations, 19 routes (19 active, 0 holddown, 0 hidden)
172.16.1.0/24 *[BGP/170] 10:18:46, localpref 100
AS path: 65013 I, validation-state: unverified
> to 10.1.13.2 via xe-0/0/5.0
jcluser@spine1> ping 172.16.1.2 count 2
PING 172.16.1.2 (172.16.1.2): 56 data bytes
64 bytes from 172.16.1.2: icmp_seq=0 ttl=63 time=115.706 ms
64 bytes from 172.16.1.2: icmp_seq=1 ttl=63 time=116.592 ms
--- 172.16.1.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 115.706/116.149/116.592/0.443 ms
{master:0}[edit]
jcluser@spine1# run show forwarding-options port-mirroring detail
Instance Name: mirror-leaf1-and-leaf4
Instance Id: 2
Input parameters:
Rate : 1
Run-length : 0
Maximum-packet-length : 0
Output parameters:
Family State Destination Next-hop
inet up 172.16.1.2 .local..0
[labuser@linuxpc ~]$ ping -I eth1 -c 10 -W 1 10.1.101.20
PING 10.1.101.20 (10.1.101.20) from 10.1.101.101 eth1: 56(84) bytes of data.
64 bytes from 10.1.101.20: icmp_seq=1 ttl=64 time=131 ms
64 bytes from 10.1.101.20: icmp_seq=2 ttl=64 time=133 ms
64 bytes from 10.1.101.20: icmp_seq=3 ttl=64 time=130 ms
64 bytes from 10.1.101.20: icmp_seq=4 ttl=64 time=227 ms
64 bytes from 10.1.101.20: icmp_seq=5 ttl=64 time=130 ms
64 bytes from 10.1.101.20: icmp_seq=6 ttl=64 time=311 ms
64 bytes from 10.1.101.20: icmp_seq=7 ttl=64 time=132 ms
64 bytes from 10.1.101.20: icmp_seq=8 ttl=64 time=126 ms
64 bytes from 10.1.101.20: icmp_seq=9 ttl=64 time=128 ms
64 bytes from 10.1.101.20: icmp_seq=10 ttl=64 time=133 ms
jcluser@spine1# run show firewall
Filter: port-mirror-from-leaf1
Counters:
Name Bytes Packets
from-leaf1-vtep 0 0
Filter: port-mirror-from-leaf4
from-leaf4-vtep 0 0
Sep 02 05:09:29
from-leaf4-vtep 1532 12
Remote Port Mirroring for EVPN-VXLAN Fabrics