FD.io VPP  v16.09
Vector Packet Processing
vnet/vnet/ip

show adjacency alloc

Summary/usage

show adjacency alloc.

Declaration and implementation

Declaration: show_adjacency_alloc_command (vnet/vnet/ip/adj_alloc.c:237)

Implementation: show_adjacency_alloc_command_fn.

set interface ip

Summary/usage

IP4/IP6 commands.

Declaration and implementation

Declaration: set_interface_ip_command (vnet/vnet/ip/ip46_cli.c:57)

set interface ip address

Summary/usage

Add/delete IP4/IP6 address for interface.

Declaration and implementation

Declaration: set_interface_ip_address_command (vnet/vnet/ip/ip46_cli.c:180)

Implementation: add_del_ip_address.

set interface ip table

Summary/usage

Add/delete FIB table id for interface.

Description

Place the indicated interface into the supplied VRF

Example usage
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 and implementation

Declaration: set_interface_ip_table_command (vnet/vnet/ip/ip4_forward.c:3175)

Implementation: add_del_interface_table.

set ip classify

Summary/usage

set ip classify intfc <int> table-index <index>.

Declaration and implementation

Declaration: set_ip_classify_command (vnet/vnet/ip/ip4_forward.c:3628)

Implementation: set_ip_classify_command_fn.

set ip flow-hash

Summary/usage

set ip table flow-hash table <fib-id> src dst sport dport proto reverse.

Declaration and implementation

Declaration: set_ip_flow_hash_command (vnet/vnet/ip/ip4_forward.c:3558)

Implementation: set_ip_flow_hash_command_fn.

show ip local

Summary/usage

Show ip local protocol table.

Declaration and implementation

Declaration: show_ip_local (vnet/vnet/ip/ip4_forward.c:2350)

Implementation: show_ip_local_command_fn.

test lookup

Summary/usage

test lookup.

Declaration and implementation

Declaration: lookup_test_command (vnet/vnet/ip/ip4_forward.c:3496)

Implementation: test_lookup_command_fn.

set ip source-and-port-range-check

Summary/usage

set ip source-and-port-range-check <ip-addr>/<mask> [range <nn>-<nn> tcp-vrf <id>] [vrf <id>] [del].

Declaration and implementation

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

Summary/usage

show ip source-and-port-range-check vrf <nn> <ip-addr> <port>.

Declaration and implementation

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 interface ip source-check

Summary/usage

Set IP4/IP6 interface unicast source check.

Declaration and implementation

Declaration: set_interface_ip_source_check_command (vnet/vnet/ip/ip4_source_check.c:365)

Implementation: set_ip_source_check.

test route

Summary/usage

test route.

Declaration and implementation

Declaration: test_route_command (vnet/vnet/ip/ip4_test.c:300)

Implementation: thrash.

set interface ip6 table

Summary/usage

set interface ip6 table <intfc> <table-id>.

Declaration and implementation

Declaration: set_interface_ip6_table_command (vnet/vnet/ip/ip6_forward.c:3078)

Implementation: add_del_ip6_interface_table.

set ip6 classify

Summary/usage

set ip6 classify intfc <int> table-index <index>.

Declaration and implementation

Declaration: set_ip6_classify_command (vnet/vnet/ip/ip6_forward.c:3292)

Implementation: set_ip6_classify_command_fn.

set ip6 flow-hash

Summary/usage

set ip table flow-hash table <fib-id> src dst sport dport proto reverse.

Declaration and implementation

Declaration: set_ip6_flow_hash_command (vnet/vnet/ip/ip6_forward.c:3196)

Implementation: set_ip6_flow_hash_command_fn.

show ip6 local

Summary/usage

Show ip6 local protocol table.

Declaration and implementation

Declaration: show_ip6_local (vnet/vnet/ip/ip6_forward.c:3223)

Implementation: show_ip6_local_command_fn.

test ip6 link

Summary/usage

test ip6 link <mac-address>.

Declaration and implementation

Declaration: test_link_command (vnet/vnet/ip/ip6_forward.c:3134)

Implementation: test_ip6_link_command_fn.

clear ioam rewrite

Summary/usage

clear ioam rewrite.

Declaration and implementation

Declaration: ip6_clear_ioam_trace_cmd (vnet/vnet/ip/ip6_hop_by_hop.c:873)

Implementation: clear_ioam_rewrite_command_fn.

set ioam destination

Summary/usage

set ioam destination <ip6-address>/<width> add | pop | none.

Declaration and implementation

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

Summary/usage

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 and implementation

Declaration: ip6_set_ioam_rewrite_cmd (vnet/vnet/ip/ip6_hop_by_hop.c:948)

Implementation: ip6_set_ioam_rewrite_command_fn.

show ioam summary

Summary/usage

Summary of IOAM configuration.

Declaration and implementation

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

Summary/usage

disable ip6 interface <iface name>.

Declaration and implementation

Declaration: disable_ip6_interface_command (vnet/vnet/ip/ip6_neighbor.c:3010)

Implementation: disable_ip6_interface_cmd.

enable ip6 interface

Summary/usage

enable ip6 interface <iface name>.

Declaration and implementation

Declaration: enable_ip6_interface_command (vnet/vnet/ip/ip6_neighbor.c:2979)

Implementation: enable_ip6_interface_cmd.

ip6 nd

Summary/usage

Set ip6 neighbor discovery parameters.

Declaration and implementation

Declaration: ip6_nd_command (vnet/vnet/ip/ip6_neighbor.c:3016)

Implementation: ip6_neighbor_cmd.

set ip6 link-local address

Summary/usage

Set ip6 interface link-local address <intfc> <address.>.

Declaration and implementation

Declaration: set_ip6_link_local_address_command (vnet/vnet/ip/ip6_neighbor.c:3114)

Implementation: set_ip6_link_local_address_cmd.

set ip6 neighbor

Summary/usage

set ip6 neighbor [del] <intfc> <ip6-address> <mac-address> [static].

Declaration and implementation

Declaration: set_ip6_neighbor_command (vnet/vnet/ip/ip6_neighbor.c:676)

Implementation: set_ip6_neighbor.

show ip6 interface

Summary/usage

show ip6 interface <iface name>.

Declaration and implementation

Declaration: show_ip6_interface_command (vnet/vnet/ip/ip6_neighbor.c:2816)

Implementation: show_ip6_interface_cmd.

show ip6 neighbors

Summary/usage

Show ip6 neighbors.

Declaration and implementation

Declaration: show_ip6_neighbors_command (vnet/vnet/ip/ip6_neighbor.c:628)

Implementation: show_ip6_neighbors.

show ip features

Summary/usage

show ip features.

Declaration and implementation

Declaration: show_ip_features_command (vnet/vnet/ip/ip_feature_registration.c:253)

Implementation: show_ip_features_command_fn.

show ip interface features

Summary/usage

show ip interface features <intfc>.

Declaration and implementation

Declaration: show_ip_interface_features_command (vnet/vnet/ip/ip_feature_registration.c:331)

Implementation: show_ip_interface_features_command_fn.

ip

Summary/usage

Internet protocol (IP) commands.

Declaration and implementation

Declaration: vlib_cli_ip_command (vnet/vnet/ip/lookup.c:1657)

ip probe-neighbor

Summary/usage

ip probe-neighbor <intfc> <ip4-addr> | <ip6-addr> [retry nn].

Declaration and implementation

Declaration: ip_probe_neighbor_command (vnet/vnet/ip/lookup.c:1880)

Implementation: probe_neighbor_address.

ip route

Summary/usage

Add/delete IP routes.

Description

To add or delete routes, use ip route add / del

Example usage
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 and implementation

Declaration: ip_route_command (vnet/vnet/ip/lookup.c:1704)

Implementation: vnet_ip_route_cmd.

show ip

Summary/usage

Internet protocol (IP) show commands.

Declaration and implementation

Declaration: vlib_cli_show_ip_command (vnet/vnet/ip/lookup.c:1662)

show ip fib

Summary/usage

show ip fib [mtrie] [summary] [table <n>] [<ip4-addr>] [clear] [include-empty].

Description

Show FIB/route entries

Example usage
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 and implementation

Declaration: ip4_show_fib_command (vnet/vnet/ip/lookup.c:2168)

Implementation: ip4_show_fib.

show ip4

Summary/usage

Internet protocol version 4 (IP4) show commands.

Declaration and implementation

Declaration: vlib_cli_show_ip4_command (vnet/vnet/ip/lookup.c:1667)

show ip6

Summary/usage

Internet protocol version 6 (IP6) show commands.

Declaration and implementation

Declaration: vlib_cli_show_ip6_command (vnet/vnet/ip/lookup.c:1672)

show ip6 fib

Summary/usage

show ip6 fib [summary] [clear].

Description

Show FIB6/route entries

Example usage
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 and implementation

Declaration: ip6_show_fib_command (vnet/vnet/ip/lookup.c:2404)

Implementation: ip6_show_fib.