Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Troubleshoot via the vRouter CLI

Accessing the vRouter CLI

You can access the command-line interface (CLI) of the vRouter by accessing the shell of the running vRouter-agent container.
Note: The commands below are provided as an example. The vRouter pod name must be replaced from your environment. The command outputs may differ based on your environment.

List the K8s Pods running on the cluster

Copy the name of the vRouter pod—contrail-vrouter-masters-dfxgm in this example output . You will use the pod name to connect to the running container's shell.

Connect to the vRouter CLI

Issue the kubectl exec command to access the running container's shell:

where <namespace> identifies the namespace in which the pod is running, <pod name> specificies the name of the pod and the <container name> specifies the name of the container (to be specified if the pod has more than one container).

The vRouter pod has three containers. When the container name is not specified, the command will default to the vrouter-agent container shell. Here is an example:

At this point, you have connected to the vRouter's CLI.

Troubleshooting via the vRouter CLI

You can run commands in the CLI to learn about the state of the vRouter.

Verify vRouter Interfaces via the vif Command

The command shown below allows you to see which interfaces are present on the vRouter:

View the running configuration of the vRouter

To see the status of the vRouter, enter the following command in the vRouter CLI:

The output contains several elements.

Table 1: vRouter Status Attributes
Flag Meaning
--l2_mode

The vRouter is running in L2 mode.

--l2_table_size

The current number of entries in the MAC table. The default size is 10240 entries.

--allow=<PCI Id>

The PCI ID of fabric and fabric workload interfaces. More than one ID can appear in the output. These IDs serve as an allowlist.

--ddp

Enable Intel DDP support.

We enable DDP by default in the values.yaml file in the vRouter.

Note:

The Intel XL710 NIC does not support DDP.

View L2 Configuration and Statistics via the purel2cli Command

The purel2cli command is a useful utility to view the JCNR L2 configuration and statistics. Start by using the purel2cli --help command.

The purel2cli --mac show command shows the MAC addresses that the vRouter has dynamically learned.

The purel2cli --vlan show command shows the VLANs and associated ports.

You can also issue the purel2cli --vlan get command to get more details about the VLAN.

Issue the purel2cli --l2stats command to view L2 statistics. For example:

Table 2: purel2cli Command Options for L2 Statistics
Sample Command Function
purel2cli --l2stats get '*' '*' Get statistics for all virtual interfaces (vif) and all VLAN IDs.
purel2cli --l2stats get '*' 100 Get statistics for all vif that are part of VLAN 100
purel2cli --l2stats get 1 '*' Get statistics for all VLANs for which interface 1 is a member
purel2cli --l2stats get 1 100 Get statistics for interface 1 and VLAN 100

The command shows the VLAN to port mapping in the vRouter.You can use the command to see the bridge domain table entry for a specific VLAN: There are several variations of the command that allow you to display and filter L2 statistics in the vRouter. The base form of the command is: . The table below shows the available command options and what they do. It also provides a sample output using one of the options:The following command is an example of the L2 statistics for interface 2 and VLAN 1221:You can clear the statistics from the vRouter with the purel2cli command in the form: . Clears all statistics from all VLANs in the vRouter. Clears all statistics for VLAN id 100.

Packet Tracing via the dropstats Command

The vRouter tracks the packets that it drops and includes the reason for dropping them. The table below shows the common reasons for vRouter to drop a packet. When you execute the dropstats command, the vRouter does not show a counter if the count for that counter is 0.

Table 3: Dropstats Counters
Counter Name Meaning
L2 bd table drop No interfaces in bridge domain
L2 untag pkt drop Untagged packet arrives on trunk or sub-interface
L2 Invalid Vlan Packet VLAN does not match interface VLAN
L2 Mac Table Full No more entries available in the MAC table
L2 ACL drop Packet matched firewall filter (ACL) drop rule
L2 Src Mac lookup fail Unable to match (or learn) the source MAC address

Example output from the dropstats command looks like:

View status and statistics of DPDK using the dpdkinfo Command

The dpdkinfo command provides insight into the status and statistics of DPDK. The dpdkinfo command has many options. The following sections describe the available options and the example output from the dpdkinfo command. You can run the dpdkinfo command only from within the vRouter-agent CLI.

The command dpdkinfo -c shows the Lcores assigned to DPDK VF fabric interfaces and the queue ID for each interface.

The command dpdkinfo -m all shows all of the memory pool information.

The command dpdkinfo -n 3 displays statistical information for a specific interface.

The command dpdkinfo -x 3 displays extended statistical information for a specific interface.

Display routes and next hops using the rt and nh Commands

Use the rt command to display all routes in a VRF. The nh command enables you to inspect the next hops that are known by the vRouter. Next hops tell the vRouter the next location to send a packet in the path to its final destination.

For example, for IPv4 traffic:

For example, for IPv6 traffic:

Display all active flows using the flow Command

Use the flow command to display all active flows in a system. For example: