Usage¶
In this section, it is assumed that Virtual Accelerator has been properly installed and configured. See Getting Started for more details.
Example
# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
# ip addr add 3ffe:2:10::1/64 dev eth1
# ip link set up dev eth1
# ip route add 3ffe:100:2:2::1/128 via 3ffe:2:10::5
# ip -6 route show dev eth1
3ffe:2:10::/64  proto kernel  metric 256
3ffe:100:2:2::1 via 3ffe:2:10::5  metric 1024
fe80::/64  proto kernel  metric 256
# fp-cli
<fp-0> route6
# - Preferred, * - Active, > - selected
3ffe:100:2:2::1/128  [03]  ROUTE gw 3ffe:2:10::5 via eth1-vr0 (6)
<fp-0> addr6 eth1
number of ip address: 1
3ffe:0002:0010:0000:0000:0000:0000:0001 [0]
<fp-0> iface
1:lo [VR-0] ifid=1 (virtual) <UP|RUNNING|FWD4|FWD6> (0x63)
          type=loop mac=00:00:00:00:00:00 mtu=16436 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
7:eth3 [VR-0] ifid=7 (port 2) <FWD4|FWD6> (0x60)
          type=ether mac=00:1b:21:c5:7f:76 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
8:eth2 [VR-0] ifid=8 (port 1) <UP|RUNNING|FWD4|FWD6> (0x63)
          type=ether mac=00:1b:21:c5:7f:75 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
9:eth1 [VR-0] ifid=9 (port 0) <UP|RUNNING|FWD4|FWD6> (0x63)
          type=ether mac=00:1b:21:c5:7f:74 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=2
          if_ops: rx_dev=none tx_dev=none ip_output=none
10:eth0 [VR-0] ifid=10 (virtual) <FWD4|FWD6> (0x60)
          type=ether mac=00:21:85:c1:82:58 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
11:eth4 [VR-0] ifid=11 (port 3) <FWD4|FWD6> (0x60)
          type=ether mac=00:1b:21:c5:7f:77 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
ECMP routes¶
Synopsis
An ECMP route is a single route to a destination, with several next hops. The traffic matching this route is dispatched among the specified next hops based on a hash of the packet source and destination IP addresses. That way, packets of a same flow follow the same path.
IPv6 ECMP routes are configured in several steps: the route is first created with a nexthop, then extra nexthops are appended by specifying a route to the same destination and with the same metric. The routes will be merged into a single ECMP route.
Example
Enable IPv6 forwarding and configure eth1 and eth2:
# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
# ip addr add 2001:db8:1::1/64 dev eth1
# ip link set up dev eth1
# ip addr add 2001:db8:2::1/64 dev eth2
# ip link set up dev eth2
Add an ECMP route to 2001:db8:10::/56 via gateways 2001:db8:1::2 and
2001:db8:2::5:
# ip route add 2001:db8:10::/56 via 2001:db8:1::2
# ip route append 2001:db8:10::/56 via 2001:db8:2::5
Display Linux IPv6 routes. Note that the ECMP route is displayed as separate routes, although it is actually a single route with several next hops:
# ip -6 route
2001:db8:1::/64 dev eth1  proto kernel  metric 256  pref medium
2001:db8:2::/64 dev eth2  proto kernel  metric 256  pref medium
2001:db8:10::/56 via 2001:db8:1::2 dev eth1  metric 1024  pref medium
2001:db8:10::/56 via 2001:db8:2::5 dev eth2  metric 1024  pref medium
fe80::/64 dev mgmt0  proto kernel  metric 256  pref medium
fe80::/64 dev eth1  proto kernel  metric 256  pref medium
fe80::/64 dev eth2  proto kernel  metric 256  pref medium
Display fast path IPv6 routes:
<fp-0> route6
# - Preferred, * - Active, > - selected
(254) 2001:db8:10::/56 metric 1024 Multipath Entry (8)
     [06]  #    (p=001)  ROUTE gw 2001:db8:2::5 via eth2-vr0
     [05]  #    (p=001)  ROUTE gw 2001:db8:1::2 via eth1-vr0
Deleting an IPv6 ECMP route requires to remove all its next hops one by one. If no next hop is specified, then the first one will be removed. The route is actually deleted when all of its next hops were removed.
Example
Delete next hop 2001:db8:1::2 from ECMP route to 2001:db8:10::/56:
# ip route del 2001:db8:10::/56 via 2001:db8:1::2
Display Linux IPv6 routes:
# ip -6 route
2001:db8:1::/64 dev eth1  proto kernel  metric 256  pref medium
2001:db8:2::/64 dev eth2  proto kernel  metric 256  pref medium
2001:db8:10::/56 via 2001:db8:2::5 dev eth2  metric 1024  pref medium
fe80::/64 dev mgmt0  proto kernel  metric 256  pref medium
fe80::/64 dev eth1  proto kernel  metric 256  pref medium
fe80::/64 dev eth2  proto kernel  metric 256  pref medium
Display fast path IPv6 routes:
<fp-0> route6
# - Preferred, * - Active, > - selected
(254) 2001:db8:10::/56 metric 1024 [06]  ROUTE gw 2001:db8:2::5 via eth2-vr0 (8)
Route metric¶
Synopsis
The fast path supports several IPv6 routes to the same destination with different metrics (a.k.a. priority or preference). Unlike an ECMP route, packets can only match the route with the lowest metric.
Example
Enable IPv6 forwarding and configure eth1 and eth2:
# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
# ip addr add 2001:db8:1::1/64 dev eth1
# ip link set up dev eth1
# ip addr add 2001:db8:2::1/64 dev eth2
# ip link set up dev eth2
Add 2 routes to 2001:db8:10::/56 with different metrics:
# ip route add 2001:db8:10::/56 metric 200 via 2001:db8:1::2
# ip route add 2001:db8:10::/56 metric 100 via 2001:db8:2::5
Display Linux IPv6 routes:
root@dut-vm:~# ip -6 route
2001:db8:1::/64 dev eth1  proto kernel  metric 256  pref medium
2001:db8:2::/64 dev eth2  proto kernel  metric 256  pref medium
2001:db8:10::/56 via 2001:db8:2::5 dev eth2  metric 100  pref medium
2001:db8:10::/56 via 2001:db8:1::2 dev eth1  metric 200  pref medium
Display fast path IPv6 routes:
<fp-0> route6
# - Preferred, * - Active, > - selected
(254) 2001:db8:10::/56 metric 100 [08]  ROUTE gw 2001:db8:2::5 via eth2-vr0 (13)
(254) 2001:db8:10::/56 metric 200 [07]  ROUTE gw 2001:db8:1::2 via eth1-vr0 (12)
Each of these routes may itself be an ECMP route. Change route with metric 100 to an ECMP route by adding a next hop:
# ip route append 2001:db8:10::/56 metric 100 via 2001:db8:1::2
Display Linux IPv6 routes:
root@dut-vm:~# ip -6 route
2001:db8:1::/64 dev eth1  proto kernel  metric 256  pref medium
2001:db8:2::/64 dev eth2  proto kernel  metric 256  pref medium
2001:db8:10::/56 via 2001:db8:2::5 dev eth2  metric 100  pref medium
2001:db8:10::/56 via 2001:db8:1::2 dev eth1  metric 100  pref medium
2001:db8:10::/56 via 2001:db8:1::2 dev eth1  metric 200  pref medium
fe80::/64 dev mgmt0  proto kernel  metric 256  pref medium
fe80::/64 dev eth1  proto kernel  metric 256  pref medium
fe80::/64 dev eth2  proto kernel  metric 256  pref medium
Display fast path IPv6 routes:
<fp-0> route6
# - Preferred, * - Active, > - selected
(254) 2001:db8:10::/56 metric 100 Multipath Entry (13)
     [12]  #    (p=001)  ROUTE gw 2001:db8:1::2 via eth1-vr0
     [13]  #    (p=001)  ROUTE gw 2001:db8:2::5 via eth2-vr0
(254) 2001:db8:10::/56 metric 200 [12]  ROUTE gw 2001:db8:1::2 via eth1-vr0 (12)
Neighbors management¶
Displaying the neighbors table¶
Synopsis
neigh6
Example
<fp-0> neigh6
R[000006] GW/NEIGH 3ffe:2:10::6 00:1b:21:cc:0d:97 via eth1-vr0 REACHABLE (nh:6)
Setting interface NDP hitflags¶
Synopsis
ndp-hitflags-set <period in seconds> <max scanned> <max sent>
- <period in seconds>
 Validity period of NDP hitflags, in seconds.
- <max scanned>
 Maximum number of NDP hitflags per synchronization message with
fpm.- <max sent>
 Maximum number of NDP hitflags to send.
Example
<fp-0> ndp-hitflags-set 8 600 800
Displaying NDP/CT6 hitflags parameters¶
Synopsis
hitflags [all|ndp|conntrack6|...]
- No parameter
 Display parameters for all categories.
- all
 Same as wit no parameters.
- ndp
 Display only the NDP category.
- conntrack6
 Display only the IPv6 conntrack category.
Example
<fp-0> hitflags ndp
ndp hitflags
  period_in_seconds:1
  max_scanned:2500
  max_sent:1600
Addresses management¶
Displaying IPv6 addresses¶
Description
Display IPv6 addresses of a given interface.
Synopsis
addr6 <iface>
Parameters
- <iface>
 Name of the interface.
Examples
<fp-0> addr6 eth0
number of ip address: 1
fd00:0175:0000:0000:0000:0000:0000:0001 [2]
Routes management¶
Displaying the rt_entry table¶
Synopsis
rt6 [<rt index>]
- No parameter
 Display the whole
rt_entrytable.- <rt index>
 Index to dump specifically in
rt_table.
Example
<fp-0> rt6
R6[000001]IFACE/LOCAL via ifid0-vr0 (nh:5001)
R6[000002]IFACE/LOCAL via ifid0-vr0 (nh:5001)
R6[000003]IFACE/BLACKHOLE via ifid0-vr0 (nh:5002)
R6[000004]IFACE/CONNECTED via eth1-vr0 (nh:1)
R6[000005]GW/ADDRESS :: 00:00:00:00:00:00 via eth1-vr0 NONE (nh:2)
R6[000006]GW/ROUTE 3ffe:2:10::5 00:00:00:00:00:00 via eth1-vr0 NONE (nh:3)
R6[000007]GW/NEIGH 3ffe:2:10::6 00:15:17:34:2a:d8 via eth1-vr0 REACHABLE (nh:4)
R6[000008]GW/ROUTE fe80::1 00:00:00:00:00:00 via eth1-vr0 NONE (nh:5)
Displaying the IPv6 next hop table¶
Synopsis
nh [<nh index>]
- No parameter
 Display the whole next hop table.
- <nh index>
 Index to dump specifically in next hop table.
Example
<fp-0> nh6
N6[0001] IFACE/CONNECTED via eth1-vr0 refcnt=1
N6[0002] GW/ADDRESS :: 00:00:00:00:00:00 via eth1-vr0 NONE refcnt=1
N6[0003] GW/ROUTE 3ffe:2:10::5 00:00:00:00:00:00 via eth1-vr0 NONE refcnt=1
N6[0004] GW/NEIGH 3ffe:2:10::6 00:15:17:34:2a:d8 via eth1-vr0 REACHABLE refcnt=1
N6[0005] GW/ROUTE fe80::1 00:00:00:00:00:00 via eth1-vr0 NONE refcnt=1
Displaying the user routing entries¶
Display the user routing entries.
Synopsis
route6 [dst <addr dst>|<addr dst/prefix> [src <addr src>]]|[type TYPE]
- No parameter
 Display only routes configured by user.
- dst <addr dst>|<addr dst/prefix>
 Search a route by destination address with or without prefix.
- src <addr src>
 Reduce search to a specific source address.
- type TYPE
 Display routes with a specific type:
Type
description
all
Display all kind of routes.
fpm
Display routes configured via
fpm.local
Display local routes, ones to hosts on directly connected networks.
neigh
Display routes to neighbor hosts.
connected
Display routes to connected hosts.
black
Display black hole routes.
Example
<fp-0> route6
# - Preferred, * - Active, > - selected
3ffe:2:20::/48  [05]  ROUTE gw fe80::1 via eth1-vr0 (8)
3ffe:100:2:2::1/128  [03]  ROUTE gw 3ffe:2:10::5 via eth1-vr0 (6)
<fp-0> route6 type fpm
<fp-0> route6 type local
# - Preferred, * - Active, > - selected
fe80::/10  [5001]  LOCAL (1)
ff00::/8  [5001]  LOCAL (2)
<fp-0> route6 type neigh
# - Preferred, * - Active, > - selected
3ffe:2:10::6/128  [04]  NEIGH gw 3ffe:2:10::6 (N) via eth1-vr0 (7)
<fp-0> route6 type connected
# - Preferred, * - Active, > - selected
3ffe:2:10::/64  [01]  CONNECTED via eth1-vr0 (4)
<fp-0> route6 type black
# - Preferred, * - Active, > - selected
::/80  [5002]  BLACKHOLE (3)
<fp-0> route6 type all
# - Preferred, * - Active, > - selected
::/80  [5002]  BLACKHOLE (3)
3ffe:2:10::/64  [01]  CONNECTED via eth1-vr0 (4)
3ffe:2:10::1/128  [02]  ADDRESS via eth1-vr0 (5)
3ffe:2:10::6/128  [04]  NEIGH gw 3ffe:2:10::6 (N) via eth1-vr0 (7)
3ffe:2:20::/48  [05]  ROUTE gw fe80::1 via eth1-vr0 (8)
3ffe:100:2:2::1/128  [03]  ROUTE gw 3ffe:2:10::5 via eth1-vr0 (6)
fe80::/10  [5001]  LOCAL (1)
ff00::/8  [5001]  LOCAL (2)
Displaying the filling of each table in memory¶
Synopsis
route6-filling
Example
<fp-0> route6-filling
IPv6 tables filling:
fp_8_table_shared: 14/11000 (0.127273%) IPv6:8
fp_8_entries_shared: 1544/2816000 (0.054830%)
fp_rt6_table: 3/50001 (0.006000%)
fp_nh6_table: 0/5001 (0.000000%)
VRF support¶
See also
Please see the VRF section in the Fast Path Forwarding IPv4 documentation.
RPF check¶
Displaying IPv6 RPF flag status¶
Synopsis
rpf6 <iface>
- <iface>
 Name of the interface.
Example
<fp-0> rpf6 eth3
eth3: IPv6 RPF is off
Setting IPv6 RPF flag¶
Synopsis
rpf6-set <iface> on|off
- <iface>
 Name of the interface.
- on or off
 Enable/disable the RPF on this interface (optional). If this argument is omitted, only the status of the RPF check is displayed.
Example
<fp-0> rpf6-set eth3 on
eth3: IPv6 RPF is on
<fp-0> iface
9:eth3 [VR-0] ifid=9 (port 2) <UP|RUNNING|FWD4|FWD6|RPF6> (0x663)
        type=ether mac=00:1b:21:c5:7f:76 mtu=1500 tcp6mss=0 tcp6mss=0
        IPv4 routes=0  IPv6 routes=0
        if_ops: rx_dev=none tx_dev=none ip_output=none
TCP MSS clamping¶
TCP MSS clamping can be configured by interface.
Editing the default value of MSS¶
0 means no change is made in packets.
Synopsis
tcpmss6-set <iface> <mss6>
- <iface>
 Name of the interface.
- <mss6>
 MSS, default is 0 (disabled).
Example
<fp-0> tcpmss6-set eth0 1440
Statistics¶
Displaying IPv6 statistics¶
Synopsis
ip6-stats [percore|agg[regated]] [all]
- percore
 Display all statistics per core running the fast path.
- aggregated
 Display sum of Linux and fast path statistics.
- all
 Display all statistics (even those that are null).
Example
<fp-0> ip6-stats all
 IpForwDatagrams:232
 IpInReceives:232
 IpInDelivers:124
 IpInHdrErrors:0
 IpInTruncatedPkts:0
 IpInAddrErrors:0
 IpDroppedNoArp:0
 IpDroppedNoMemory:0
 IpDroppedForwarding:0
 IpDroppedIPsec:0
 IpDroppedBlackhole:0
 IpDroppedInvalidInterface:0
 IpDroppedNetfilter:0
 IpDroppedRouteException:0
 IpReasmReqds:0
 IpReasmOKs:0
 IpReasmFails:0
 IpReasmTimeout:0
 IpReasmExceptions:0
 IpFragOKs:0
 IpFragFails:0
 IpFragCreates:0
 IpReasmErrorPacketTooShort:0
 IpReasmErrorTooManySegments:0
 IpReasmErrorHeaderEncap:0
 IpReasmErrorFragmentHeader:0
 IpReasmErrorQueueFull:0
 IpReasmErrorIPOptionTooLarge:0
 IpReasmErrorSizeExceed:0
 IpReasmErrorLastAlreadyReceived:0
 IpReasmErrorSizeOverflow:0
 IpReasmErrorOverlapPrevious:0
 IpReasmErrorOverlapNext:0
 IpReasmErrorQueueAlloc:0
 IpReasmErrorOffsetTooLarge:0
 IpReasmDroppedSessionComplete:0
 IpReasmDroppedSessionAlreadyFull:0
Transparent IPv6 extended header support¶
The default handling of IPv6 packets with Hop-by-hop extension headers is to send these packets to control plane, where the kernel will have a specific management.
This option is used to ignore the non-default extension header of the packets and forward the packets containing an extended header as if they had a default header.
To enable or disable check of IPv6 options use the ip6-options and
ip6-options-set commands. If the options checking is disabled IP packets
with non-default header length are transparently forwarded.
Displaying fast path processing of IPv6 packets with options in header¶
Synopsis
ip6-options
Example
<fp-0> ip6-options
IPv6 options are checked
Defining fast path processing of IPv6 packets with options in header¶
The default behavior of the fast path is to send IPv6 packets with non-default header lenght to the control plane as exception packets.
Synopsis
ip6-options-set ignore|check
- ignore or check
 Check: packets with extended option are sent as exception to the control plane.
Example
<fp-0> ip6-options
IPv6 options are checked
<fp-0> ip6-options-set ignore
IPv6 options are ignored
Providing options¶
- 
--max-addr¶ Maximum number of IPv6 addresses
- Default value
 4096
- Memory footprint per IPv6 address
 20 B
- Range
 0 .. 4M
- 
--max-route¶ Maximum number of IPv6 routes
- Default value
 50000
- Memory footprint per IPv6 route
 50 B
- Range
 0 .. 4M
- 
--max-neigh¶ Maximum number of IPv6 neighbors
- Default value
 5000
- Memory footprint per IPv6 neighbor
 50 B
- Range
 0 .. 400K
- 
--max-reass-queues¶ Power of 2 of the maximum number of simultaneous reassembly procedures for IPv6
- Default value
 6
- Memory footprint
 None
- Range
 0 .. 30
- 
--reass-hash-order¶ Size order of reassembly hash table for IPv6. Value automatically updated if
--max-reass-queuesis changed.- Default value
 7
- Range
 1 .. 31
- 
--max-reass-time¶ Maximum lifetime of a reassembly procedure for IPv6 (ms).
- Default value
 2000
- Range
 1 .. 100M
- 
--max-reass-interfrag¶ Maximum time between two fragments for a IPv6 reassembly procedure (ms).
- Default value
 200
- Range
 1 .. 100M
Note
See Fast Path Capabilities documentation for impact of the available memory on the default value of configurable capabilities