FD.io VPP
v18.04-17-g3a0d853
Vector Packet Processing
|
clear hardware-interfaces [<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]].
Clear the extended statistics for all or a list of given interfaces (statistics associated with the 'show hardware-interfaces' command).
vpp# clear hardware-interfaces
Example of how to clear the extended statistics for an interface by name and software index (where 2 is the software index): vpp# clear hardware-interfaces GigabitEthernet7/0/0 2
Declaration: clear_hw_interface_counters_command (src/vnet/interface_cli.c line 249)
Implementation: show_or_clear_hw_interfaces.
clear interface tag <interface>.
Declaration: clear_tag_command (src/vnet/interface_cli.c line 1235)
Implementation: clear_tag.
clear interfaces.
Clear the statistics for all interfaces (statistics associated with the 'show interface' command).
vpp# clear interfaces
Declaration: clear_interface_counters_command (src/vnet/interface_cli.c line 537)
Implementation: clear_interface_counters.
create sub-interfaces <interface> {<subId> [default|untagged]} | {<subId>-<subId>} | {<subId> dot1q|dot1ad <vlanId>|any [inner-dot1q <vlanId>|any] [exact-match]}.
This command is used to add VLAN IDs to interfaces, also known as subinterfaces. The primary input to this command is the 'interface' and 'subId' (subinterface Id) parameters. If no additional VLAN ID is provide, the VLAN ID is assumed to be the 'subId'. The VLAN ID and 'subId' can be different, but this is not recommended.
This command has several variations:
When 'dot1q' or 'dot1ad' is explictly entered, subinterfaces can be configured as either exact-match or non-exact match. Non-exact match is the CLI default. If 'exact-match' is specified, packets must have the same number of VLAN tags as the configuration. For non-exact-match, packets must at least that number of tags. L3 (routed) interfaces must be configured as exact-match. L2 interfaces are typically configured as non-exact-match. If 'dot1q' or 'dot1ad' is NOT entered, then the default behavior is exact-match.
Use the 'show interface' command to display all subinterfaces.
Example of how to create a VLAN subinterface 11 to process packets on 802.1q VLAN ID 11:
vpp# create sub-interfaces GigabitEthernet2/0/0 11
The previous example is shorthand and is equivalent to:
vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1q 11 exact-match
Example of how to create a subinterface number that is different from the VLAN ID:
vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1q 100
Examples of how to create q-in-q and q-in-any subinterfaces:
vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1q 100 inner-dot1q 200
vpp# create sub-interfaces GigabitEthernet2/0/0 12 dot1q 100 inner-dot1q any
Examples of how to create dot1ad interfaces:
vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1ad 11
vpp# create sub-interfaces GigabitEthernet2/0/0 12 dot1ad 100 inner-dot1q 200
Examples of 'exact-match' versus non-exact match. A packet with outer VLAN 100 and inner VLAN 200 would match this interface, because the default is non-exact match:
vpp# create sub-interfaces GigabitEthernet2/0/0 5 dot1q 100
However, the same packet would NOT match this interface because 'exact-match' is specified and only one VLAN is configured, but packet contains two VLANs:
vpp# create sub-interfaces GigabitEthernet2/0/0 5 dot1q 100 exact-match
Example of how to created a subinterface to process untagged packets:
vpp# create sub-interfaces GigabitEthernet2/0/0 5 untagged
Example of how to created a subinterface to process any packet with a VLAN ID that does not match any other subinterface:
vpp# create sub-interfaces GigabitEthernet2/0/0 7 default
When subinterfaces are created, they are in the down state. Example of how to enable a newly created subinterface:
vpp# set interface GigabitEthernet2/0/0.7 up
Declaration: create_sub_interfaces_command (src/vnet/interface_cli.c line 868)
Implementation: create_sub_interfaces.
Interface commands.
Declaration: vnet_cli_interface_command (src/vnet/interface_cli.c line 466)
interface collect detailed-stats <enable|disable>.
Declaration: collect_detailed_interface_stats_command (src/vnet/interface.c line 1602)
Implementation: collect_detailed_interface_stats_cli.
pcap drop trace on off max <nn> intfc <intfc> file <name> status.
Declaration: pcap_trace_command (src/vnet/interface_output.c line 1259)
Implementation: pcap_drop_trace_command_fn.
renumber interface <interface> <new-dev-instance>.
Declaration: renumber_interface_command (src/vnet/interface_cli.c line 1059)
Implementation: renumber_interface_command_fn.
Interface commands.
Declaration: vnet_cli_set_interface_command (src/vnet/interface_cli.c line 473)
set interface handoff <interface-name> workers <workers-list> [symmetrical|asymmetrical].
Declaration: set_interface_handoff_command (src/vnet/handoff.c line 354)
Implementation: set_interface_handoff_command_fn.
Set interface hardware class.
Declaration: set_hw_class_command (src/vnet/interface_cli.c line 1009)
Implementation: set_hw_class.
set interface mac address <interface> <mac-address>.
The 'set interface mac address ' command allows to set MAC address of given interface. In case of NIC interfaces the one has to support MAC address change. A side effect of MAC address change are changes of MAC addresses in FIB tables (ipv4 and ipv6).
vpp# set interface mac address GigabitEthernet0/8/0 aa:bb:cc:dd:ee:01
vpp# set interface mac address host-vpp0 aa:bb:cc:dd:ee:02
vpp# set interface mac address tap-0 aa:bb:cc:dd:ee:03
vpp# set interface mac address pg0 aa:bb:cc:dd:ee:04
Declaration: set_interface_mac_address_cmd (src/vnet/interface_cli.c line 1186)
Implementation: set_interface_mac_address.
set interface mtu <value> <interface>.
Declaration: set_interface_mtu_cmd (src/vnet/interface_cli.c line 1136)
Implementation: mtu_cmd.
set interface promiscuous [on|off] <interface>.
Declaration: set_interface_promiscuous_cmd (src/vnet/interface_cli.c line 1095)
Implementation: promiscuous_cmd.
set interface rx-mode <interface> [queue <n>] [polling | interrupt | adaptive].
This command is used to assign the RX packet processing mode (polling, interrupt, adaptive) of the a given interface, and optionally a given queue. If the 'queue' is not provided, the 'mode' is applied to all queues of the interface. Not all interfaces support all modes. To display the current rx-mode use the command 'show interface rx-placement'.
vpp# set interface rx-mode VirtualEthernet0/0/12 polling
Example of how to assign rx-mode to one queue of an interface: vpp# set interface rx-mode VirtualEthernet0/0/12 queue 0 interrupt
Example of how to display the rx-mode of all interfaces: vpp# show interface rx-placement
Thread 1 (vpp_wk_0):
node dpdk-input:
GigabitEthernet7/0/0 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 0 (interrupt)
VirtualEthernet0/0/12 queue 2 (polling)
VirtualEthernet0/0/13 queue 0 (polling)
VirtualEthernet0/0/13 queue 2 (polling)
Thread 2 (vpp_wk_1):
node dpdk-input:
GigabitEthernet7/0/1 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 1 (polling)
VirtualEthernet0/0/12 queue 3 (polling)
VirtualEthernet0/0/13 queue 1 (polling)
VirtualEthernet0/0/13 queue 3 (polling)
Declaration: cmd_set_if_rx_mode (src/vnet/interface_cli.c line 1409)
Implementation: set_interface_rx_mode.
set interface rx-placement <interface> [queue <n>] [worker <n> | main].
This command is used to assign a given interface, and optionally a given queue, to a different thread. If the 'queue' is not provided, it defaults to 0. The 'worker' parameter is zero based and the index in the thread name, for example, 0 in the thread name 'vpp_wk_0'.
vpp# show interface rx-placement
Thread 1 (vpp_wk_0):
node dpdk-input:
GigabitEthernet7/0/0 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 0 (polling)
VirtualEthernet0/0/12 queue 2 (polling)
VirtualEthernet0/0/13 queue 0 (polling)
VirtualEthernet0/0/13 queue 2 (polling)
Thread 2 (vpp_wk_1):
node dpdk-input:
GigabitEthernet7/0/1 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 1 (polling)
VirtualEthernet0/0/12 queue 3 (polling)
VirtualEthernet0/0/13 queue 1 (polling)
VirtualEthernet0/0/13 queue 3 (polling)
Example of how to assign a interface and queue to a worker thread: vpp# set interface rx-placement VirtualEthernet0/0/12 queue 1 worker 0
Example of how to display the interface placement: vpp# show interface rx-placement
Thread 1 (vpp_wk_0):
node dpdk-input:
GigabitEthernet7/0/0 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 0 (polling)
VirtualEthernet0/0/12 queue 1 (polling)
VirtualEthernet0/0/12 queue 2 (polling)
VirtualEthernet0/0/13 queue 0 (polling)
VirtualEthernet0/0/13 queue 2 (polling)
Thread 2 (vpp_wk_1):
node dpdk-input:
GigabitEthernet7/0/1 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 3 (polling)
VirtualEthernet0/0/13 queue 1 (polling)
VirtualEthernet0/0/13 queue 3 (polling)
Declaration: cmd_set_if_rx_placement (src/vnet/interface_cli.c line 1606)
Implementation: set_interface_rx_placement.
set interface state <interface> [up|down|punt|enable].
This command is used to change the admin state (up/down) of an interface.
If an interface is down, the optional 'punt' flag can also be set. The 'punt' flag implies the interface is disabled for forwarding but punt all traffic to slow-path. Use the 'enable' flag to clear 'punt' flag (interface is still down).
vpp# set interface state GigabitEthernet2/0/0 up
Example of how to configure the admin state of an interface to 'down</em?': vpp# set interface state GigabitEthernet2/0/0 down
Declaration: set_state_command (src/vnet/interface_cli.c line 925)
Implementation: set_state.
set interface tag <interface> <tag>.
Declaration: set_tag_command (src/vnet/interface_cli.c line 1211)
Implementation: set_tag.
set interface unnumbered [<interface> use <interface> | del <interface>].
Declaration: set_unnumbered_command (src/vnet/interface_cli.c line 966)
Implementation: set_unnumbered.
show hardware-interfaces [brief|verbose|detail] [bond] [<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]].
Display more detailed information about all or a list of given interfaces. The verboseness of the output can be controlled by the following optional parameters:
To limit the output of the command to bonded interfaces and their slave interfaces, use the 'bond' optional parameter.
vpp# show hardware-interfaces
Name Idx Link Hardware
GigabitEthernet7/0/0 1 up GigabitEthernet7/0/0
Ethernet address ec:f4:bb:c0:bc:fc
Intel e1000
carrier up full duplex speed 1000 mtu 9216
rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
cpu socket 0
GigabitEthernet7/0/1 2 up GigabitEthernet7/0/1
Ethernet address ec:f4:bb:c0:bc:fd
Intel e1000
carrier up full duplex speed 1000 mtu 9216
rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
cpu socket 0
VirtualEthernet0/0/0 3 up VirtualEthernet0/0/0
Ethernet address 02:fe:a5:a9:8b:8e
VirtualEthernet0/0/1 4 up VirtualEthernet0/0/1
Ethernet address 02:fe:c0:4e:3b:b0
VirtualEthernet0/0/2 5 up VirtualEthernet0/0/2
Ethernet address 02:fe:1f:73:92:81
VirtualEthernet0/0/3 6 up VirtualEthernet0/0/3
Ethernet address 02:fe:f2:25:c4:68
local0 0 down local0
local
Example of how to display 'verbose' data for an interface by name and software index (where 2 is the software index): vpp# show hardware-interfaces GigabitEthernet7/0/0 2 verbose
Name Idx Link Hardware
GigabitEthernet7/0/0 1 up GigabitEthernet7/0/0
Ethernet address ec:f4:bb:c0:bc:fc
Intel e1000
carrier up full duplex speed 1000 mtu 9216
rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
cpu socket 0
GigabitEthernet7/0/1 2 down GigabitEthernet7/0/1
Ethernet address ec:f4:bb:c0:bc:fd
Intel e1000
carrier up full duplex speed 1000 mtu 9216
rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
cpu socket 0
Declaration: show_hw_interfaces_command (src/vnet/interface_cli.c line 228)
Implementation: show_or_clear_hw_interfaces.
show interface [address|addr|features|feat] [<interface> [<interface> [..]]].
Declaration: show_sw_interfaces_command (src/vnet/interface_cli.c line 457)
Implementation: show_sw_interfaces.
show interface rx-placement.
This command is used to display the interface and queue worker thread placement.
vpp# show interface rx-placement
Thread 1 (vpp_wk_0):
node dpdk-input:
GigabitEthernet7/0/0 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 0 (polling)
VirtualEthernet0/0/12 queue 2 (polling)
VirtualEthernet0/0/13 queue 0 (polling)
VirtualEthernet0/0/13 queue 2 (polling)
Thread 2 (vpp_wk_1):
node dpdk-input:
GigabitEthernet7/0/1 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/12 queue 1 (polling)
VirtualEthernet0/0/12 queue 3 (polling)
VirtualEthernet0/0/13 queue 1 (polling)
VirtualEthernet0/0/13 queue 3 (polling)
Declaration: show_interface_rx_placement (src/vnet/interface_cli.c line 1487)
Implementation: show_interface_rx_placement_fn.