This article discusses some common mistakes that are made while configuring port mirroring in Contrail post R3.x, the effects of the misconfiguration, and the steps that can be taken to avoid these issues.
The mirror next hop may not be created on the compute node where the Virtual Machine Interface (VMI) resides. The mirror --dump command does not show an entry.
mirror --dump
root@compute1:~# mirror --dump Mirror Table Flags:D=Dynamic Mirroring Index NextHop Flags VNI ------------------------------------------------
A mirror NH exists but is invalid, and therefore leads to traffic drop.
### Juniper header Enabled ### root@compute1:~# mirror --dump Mirror Table Flags:D=Dynamic Mirroring Index NextHop Flags VNI ------------------------------------------------ 0 46 D 0 root@compute1:~# nh --get 46 Id:46 Type:Tunnel Fmly: AF_INET Rid:0 Ref_cnt:2 Vrf:-1 Flags:Valid, Udp, Copy SIP, Oif:0 Len:14 Flags Valid, Udp, Copy SIP, Data:00 00 00 00 00 00 52 54 00 1c f4 ce 08 00 Vrf:-1 Sip:10.168.5.7 Dip:10.1.0.7 Sport:8097 Dport:8099 ### Juniper Header Disabled ### root@compute1:~# mirror --dump Mirror Table Flags:D=Dynamic Mirroring Index NextHop Flags VNI ------------------------------------------------ 0 1 0 root@compute1:~# nh --get 1 Id:1 Type:Drop Fmly: AF_INET Rid:0 Ref_cnt:1006 Vrf:0 Flags:Valid,
The mirror metadata is missing on the VMI.
The above symptoms are the result of some of the common mistakes that are made while configuring port mirroring on a VMI, including the following:
Missing or mismatched Analyzer VM name
Missing or mismatched destination VN
Missing Analyzer IP address
To avoid the consequences of such configuration mistakes and for optimal results, use the following recommendations:
Disable the policy on the Analyzer VM to make sure that it accepts all the traffic that is mirrored (Configure > Networking > Edit the VMI > Advanced Options > Select the Disable Policy check box).
If dynamic NH has been selected with Juniper Header Disabled, make sure that the Analyzer VM MAC address and the Destination Mirror VRF are configured.
If static NH has been selected with Juniper Header Disabled, make sure that the virtual tunnel endpoint (VTEP) ID and the VNI (VxLAN ID) are specified.