FD.io VPP
v16.09
Vector Packet Processing
|
show adjacency alloc.
Declaration: show_adjacency_alloc_command (vnet/vnet/ip/adj_alloc.c:237)
Implementation: show_adjacency_alloc_command_fn.
IP4/IP6 commands.
Declaration: set_interface_ip_command (vnet/vnet/ip/ip46_cli.c:57)
Add/delete IP4/IP6 address for interface.
Declaration: set_interface_ip_address_command (vnet/vnet/ip/ip46_cli.c:180)
Implementation: add_del_ip_address.
Add/delete FIB table id for interface.
Place the indicated interface into the supplied VRF
vpp# set interface ip table
vpp# set interface ip table GigabitEthernet2/0/0 2
Interface addresses added after setting the interface IP table end up in the indicated VRF table. Predictable but potentially counter-intuitive results occur if you provision interface addresses in multiple FIBs. Upon RX, packets will be processed in the last IP table ID provisioned. It might be marginally useful to evade source RPF drops to put an interface address into multiple FIBs.
Declaration: set_interface_ip_table_command (vnet/vnet/ip/ip4_forward.c:3175)
Implementation: add_del_interface_table.
set ip classify intfc <int> table-index <index>.
Declaration: set_ip_classify_command (vnet/vnet/ip/ip4_forward.c:3628)
Implementation: set_ip_classify_command_fn.
set ip table flow-hash table <fib-id> src dst sport dport proto reverse.
Declaration: set_ip_flow_hash_command (vnet/vnet/ip/ip4_forward.c:3558)
Implementation: set_ip_flow_hash_command_fn.
Show ip local protocol table.
Declaration: show_ip_local (vnet/vnet/ip/ip4_forward.c:2350)
Implementation: show_ip_local_command_fn.
test lookup.
Declaration: lookup_test_command (vnet/vnet/ip/ip4_forward.c:3496)
Implementation: test_lookup_command_fn.
set ip source-and-port-range-check <ip-addr>/<mask> [range <nn>-<nn> tcp-vrf <id>] [vrf <id>] [del].
Declaration: ip_source_and_port_range_check_command (vnet/vnet/ip/ip4_source_and_port_range_check.c:1005)
Implementation: ip_source_and_port_range_check_command_fn.
show ip source-and-port-range-check vrf <nn> <ip-addr> <port>.
Declaration: show_source_and_port_range_check (vnet/vnet/ip/ip4_source_and_port_range_check.c:1106)
Implementation: show_source_and_port_range_check_fn.
Set IP4/IP6 interface unicast source check.
Declaration: set_interface_ip_source_check_command (vnet/vnet/ip/ip4_source_check.c:365)
Implementation: set_ip_source_check.
test route.
Declaration: test_route_command (vnet/vnet/ip/ip4_test.c:300)
Implementation: thrash.
set interface ip6 table <intfc> <table-id>.
Declaration: set_interface_ip6_table_command (vnet/vnet/ip/ip6_forward.c:3078)
Implementation: add_del_ip6_interface_table.
set ip6 classify intfc <int> table-index <index>.
Declaration: set_ip6_classify_command (vnet/vnet/ip/ip6_forward.c:3292)
Implementation: set_ip6_classify_command_fn.
set ip table flow-hash table <fib-id> src dst sport dport proto reverse.
Declaration: set_ip6_flow_hash_command (vnet/vnet/ip/ip6_forward.c:3196)
Implementation: set_ip6_flow_hash_command_fn.
Show ip6 local protocol table.
Declaration: show_ip6_local (vnet/vnet/ip/ip6_forward.c:3223)
Implementation: show_ip6_local_command_fn.
test ip6 link <mac-address>.
Declaration: test_link_command (vnet/vnet/ip/ip6_forward.c:3134)
Implementation: test_ip6_link_command_fn.
clear ioam rewrite.
Declaration: ip6_clear_ioam_trace_cmd (vnet/vnet/ip/ip6_hop_by_hop.c:873)
Implementation: clear_ioam_rewrite_command_fn.
set ioam destination <ip6-address>/<width> add | pop | none.
Declaration: ip6_set_ioam_destination_cmd (vnet/vnet/ip/ip6_hop_by_hop.c:1142)
Implementation: ip6_set_ioam_destination_command_fn.
set ioam rewrite trace-type <0x1f|0x3|0x9|0x11|0x19> trace-elts <nn> trace-tsp <0|1|2|3> node-id <node id in hex> app-data <app_data in hex> [pot] [ppc <encap|decap>].
Declaration: ip6_set_ioam_rewrite_cmd (vnet/vnet/ip/ip6_hop_by_hop.c:948)
Implementation: ip6_set_ioam_rewrite_command_fn.
Summary of IOAM configuration.
Declaration: ip6_show_ioam_run_cmd (vnet/vnet/ip/ip6_hop_by_hop.c:1013)
Implementation: ip6_show_ioam_summary_cmd_fn.
disable ip6 interface <iface name>.
Declaration: disable_ip6_interface_command (vnet/vnet/ip/ip6_neighbor.c:3010)
Implementation: disable_ip6_interface_cmd.
enable ip6 interface <iface name>.
Declaration: enable_ip6_interface_command (vnet/vnet/ip/ip6_neighbor.c:2979)
Implementation: enable_ip6_interface_cmd.
Set ip6 neighbor discovery parameters.
Declaration: ip6_nd_command (vnet/vnet/ip/ip6_neighbor.c:3016)
Implementation: ip6_neighbor_cmd.
Set ip6 interface link-local address <intfc> <address.>.
Declaration: set_ip6_link_local_address_command (vnet/vnet/ip/ip6_neighbor.c:3114)
Implementation: set_ip6_link_local_address_cmd.
set ip6 neighbor [del] <intfc> <ip6-address> <mac-address> [static].
Declaration: set_ip6_neighbor_command (vnet/vnet/ip/ip6_neighbor.c:676)
Implementation: set_ip6_neighbor.
show ip6 interface <iface name>.
Declaration: show_ip6_interface_command (vnet/vnet/ip/ip6_neighbor.c:2816)
Implementation: show_ip6_interface_cmd.
Show ip6 neighbors.
Declaration: show_ip6_neighbors_command (vnet/vnet/ip/ip6_neighbor.c:628)
Implementation: show_ip6_neighbors.
show ip features.
Declaration: show_ip_features_command (vnet/vnet/ip/ip_feature_registration.c:253)
Implementation: show_ip_features_command_fn.
show ip interface features <intfc>.
Declaration: show_ip_interface_features_command (vnet/vnet/ip/ip_feature_registration.c:331)
Implementation: show_ip_interface_features_command_fn.
Internet protocol (IP) commands.
Declaration: vlib_cli_ip_command (vnet/vnet/ip/lookup.c:1657)
ip probe-neighbor <intfc> <ip4-addr> | <ip6-addr> [retry nn].
Declaration: ip_probe_neighbor_command (vnet/vnet/ip/lookup.c:1880)
Implementation: probe_neighbor_address.
Add/delete IP routes.
To add or delete routes, use ip route add / del
vpp# ip route
To add or delete straightforward static routes, use ip route add / del:
vpp# ip route add 6.0.1.2/32 via 6.0.0.1 GigabitEthernet2/0/0
vpp# ip route del 6.0.1.2/32 via 6.0.0.1 GigabitEthernet2/0/0
Multiple routes
Mainly for route add/del performance testing, one can add or delete multiple routes by adding 'count N' to the previous item: vpp# ip route add count 10 7.0.0.0/24 via 6.0.0.1 GigabitEthernet2/0/0
Multipath
Add multiple routes for the same destination to create equal-cost multipath: vpp# ip route add 7.0.0.1/32 via 6.0.0.1 GigabitEthernet2/0/0 vpp# ip route add 7.0.0.1/32 via 6.0.0.2 GigabitEthernet2/0/0
For unequal-cost multipath, specify the desired weights: vpp# ip route add 7.0.0.1/32 via 6.0.0.1 GigabitEthernet2/0/0 weight 1 vpp# ip route add 7.0.0.1/32 via 6.0.0.2 GigabitEthernet2/0/0 weight 3
This combination of weights results in 3/4 of the traffic following the second path, 1/4 following the first path.
Declaration: ip_route_command (vnet/vnet/ip/lookup.c:1704)
Implementation: vnet_ip_route_cmd.
Internet protocol (IP) show commands.
Declaration: vlib_cli_show_ip_command (vnet/vnet/ip/lookup.c:1662)
show ip fib [mtrie] [summary] [table <n>] [<ip4-addr>] [clear] [include-empty].
Show FIB/route entries
vpp# show ip fib
Display the IPv4 FIB.
This command will run for a long time when the FIBs comprise millions of entries.
vpp# sh ip fib
Table 0
Destination Packets Bytes Adjacency
6.0.0.0/8 0 0 weight 1, index 3
arp fake-eth0 6.0.0.1/8
6.0.0.1/32 0 0 weight 1, index 4
local 6.0.0.1/8
And so forth. Use 'show ip fib summary' for a summary:
vpp# sh ip fib summary Table 0 Prefix length Count 8 1 32 4
Declaration: ip4_show_fib_command (vnet/vnet/ip/lookup.c:2168)
Implementation: ip4_show_fib.
Internet protocol version 4 (IP4) show commands.
Declaration: vlib_cli_show_ip4_command (vnet/vnet/ip/lookup.c:1667)
Internet protocol version 6 (IP6) show commands.
Declaration: vlib_cli_show_ip6_command (vnet/vnet/ip/lookup.c:1672)
show ip6 fib [summary] [clear].
Show FIB6/route entries
vpp# show ip fib
Display the IPv6 FIB.
This command will run for a long time when the FIBs comprise millions of entries.
See 'show ip fib'
Declaration: ip6_show_fib_command (vnet/vnet/ip/lookup.c:2404)
Implementation: ip6_show_fib.