Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Troubleshoot using the vRouter CLI

Read this topic to learn about the various troubleshooting commands available in the vRouter CLI including vif, dpdkinfo, flow, rt, nh commands.

Accessing the vRouter CLI

Refer to Access vRouter CLI to learn how to access the vRouter 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

Here is the list of options available for 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
--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 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.

The command dpdkinfo -m debug verifies the hugepage size in use by the vRouter. The output displays the memory zone table with a HugepageSz column that shows the hugepage size allocated to each zone.

For a vRouter using 2MB hugepages, the HugepageSz column shows 2M for all entries:

For a vRouter using 1G hugepages, the HugepageSz column shows 1G for all entries.

Troubleshooting L2 Configuration and Statistics

View L2 Configuration and Statistics

  • Here is the list of options for the bd command.

  • Verify the bridge domain information on vRouter using the bd command:
  • The command below shows the MAC addresses that the vRouter has dynamically learned. Broadcast route is created for each bridge domain. This command also shows the broadcast route's next hop.
  • From the command output above, broadcast route in bridge domain (BD) 2 points to next hop 31. You can get more details about the next hop using the nh --get nhID command.

    The highlighted Oif values correspond to vif1 and vif6 interfaces that are a part of BD 2.

  • The Layer 2 stats are available using the vif utility.
  • Use the following command to clear L2 stats:

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 2: 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:

Troubleshooting L3 Configuration and Statistics

Display routes and next hops using the rt and nh Commands for L3 Deployments

Here is the list of options available for the rt command.

For example, for IPv4 traffic:

For example, for IPv6 traffic:

Display all active flows using the flow Command for L3 Deployment

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

Use the command to display all routes in a VRF. The 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.

Troubleshooting CoS Statistics via qosdpdk

The qosdpdk utility provides per-forwarding-lcore CoS statistics directly from the vRouter DPDK datapath. Use it for granular operational troubleshooting when aggregated Prometheus or gNMI data does not pinpoint the affected lcore. To run qosdpdk commands interactively, open a shell in the contrail-vrouter-agent-dpdk container:

To view the usage and examples of the qosdpdk utility, run qosdpdk --help:

Table 3: qosdpdk Command Options

Option

Arguments

Description

--get

<module> --name <name>

  • classifier (classifier|cla): Required: --tc <dscp|dscpv6>

  • re-write (re-write|rw): Required: --tc <dscp|dscpv6|exp>

  • policer (policer|pol): Optional: --core <N>

  • scheduler (scheduler|sch) and dropper (dropper|dro): no additional arguments

Retrieve statistics for a specific named CoS object. The output varies by module:

  • classifier (classifier|cla)—Displays per-forwarding-class packet and byte counts for the named classifier entry, filtered by the specified traffic class type (dscp or dscpv6).
  • re-write (re-write|rw)—Displays per-forwarding-class packet and byte counts for the named rewrite rule, filtered by traffic class type (dscp, dscpv6, or exp).
  • policer (policer|pol)—Displays the total packets and bytes received and evaluated by the named policer, along with the total packets and bytes dropped due to rate violations. When --core is specified, output is limited to the named policer's statistics on that lcore.
  • scheduler (scheduler|sch)—Displays total packets and bytes processed, total packets and bytes dropped, average queue length, and drop counts for the named scheduler entry.
  • dropper (dropper|dro)—Displays drop statistics for the named dropper entry.

--list

<cla|re-write|pol|sch|dro>

Optional: --core <N>

List all CoS objects configured for the specified module. The output returns the names and identifiers of every configured object of that type (for example, all classifier entries, all policers, or all scheduler entries), providing an inventory you can use to identify valid names for use with the --get option. When --core is specified, the listing is limited to objects active on that lcore.

--stat

<ba_cla|mf_cla|rw>

Optional: --tc <dscp|dscpv6|exp>

Optional: --core <N>

Display aggregated statistics per forwarding lcore for BA classifier, MF classifier, or rewrite. When --tc is omitted, output is shown for all traffic class types. When --core is omitted, output is shown for all lcores. The exp traffic class is supported for rw only.

--sock-dir

<directory>

Override the default DPDK socket directory.

--help

nil

Display usage information and examples.

The following examples show sample qosdpdk command output for BA classifier and rewrite statistics.

BA classifier statistics per forwarding lcore (DSCP traffic class):

Note:

The --core argument specifies the DPDK lcore index, not the physical CPU core ID. The core ID shown in the output reflects the actual CPU core assigned to that lcore by DPDK.

Rewrite statistics for all lcores (all traffic class types):