Usage¶
In this section, it is assumed that Virtual Accelerator has been properly installed and configured. See Getting Started for more details.
With Linux - Fast Path Synchronization you can manage VXLANs via standard Linux commands.
Synchronizing Linux and the fast path¶
Load required modules:
# modprobe vxlan
Managing VXLANs from Linux¶
The Linux commands below allow you to manage VXLAN interfaces.
Creating a VXLAN interface¶
# ip link add IFNAME type vxlan id ID group GROUPADDR dev LINK_IFNAME ageing LIFETIME dstport DSTPORT
- IFNAME
VXLAN interface’s name.
- ID
VXLAN interface ID.
- GROUPADDR
Multicast group address.
- LINK_IFNAME
Name of the link interface.
- DSTPORT
Port number of the VXLAN interface (IANA has assigned port 4789, but the Linux default value is 8472).
- LIFETIME
Lifetime of FDB entries learnt.
Example
Create a new device (vxlan10
). The device uses the multicast group
239.0.0.10
over eth1
to handle packets when no forwarding table entry
matches. Lifetime of FDB entries learnt is 3600 seconds.
# ip link add vxlan10 type vxlan id 10 group 239.0.0.10 dev eth1 ageing 3600 dstport 4789
Creating a VXLAN GBP interface¶
# ip link add IFNAME type vxlan id ID group GROUPADDR dev LINK_IFNAME ageing LIFETIME dstport DSTPORT gbp
Example
Create a new VXLAN GBP device and set a mark in gbp field with iptables while forwarding.
# ip link add vxlan10 type vxlan id 10 group 239.0.0.10 dev eth1 ageing 3600 dstport 4789 gbp
# iptables -t mangle -A PREROUTING -j MARK --set-mark 0xabcd
Displaying information about a VXLAN interface¶
# ip -d link show vxlan10
Deleting a VXLAN device¶
# ip link delete vxlan10
Displaying the forwarding table¶
# bridge fdb show dev vxlan10
Creating a forwarding table entry¶
# bridge fdb add to 00:17:42:8a:b4:05 dst 192.168.1.1 dev vxlan10 permanent
Deleting a forwarding table entry¶
# bridge fdb delete 00:17:42:8a:b4:05 dev vxlan10
Managing VXLANs from the fast path¶
The fp-cli
command below allows you to manage VXLAN instances from the
fast path.
Displaying VXLAN interfaces¶
vxlan
Example
<fp-0> vxlan
VXLAN: check of rx checksum is off
vrfid: 0 dstport: 4789
vxlan10-vr0 vni: 10
vrfid: 0 dstport: 8474 master: ovs
Note
VXLAN interfaces displaying ‘master: ovs’ will be managed by the Fast Path OVS Acceleration module. With kernel >= 4.4, a VXLAN interface will be created to represent Open vSwitch VXLAN ports.
Displaying a VXLAN interface’s FDB entries¶
vxlan-fdb <ifname>
- ifname
Name of the VXLAN interface.
Example
<fp-0> vxlan-fdb vxlan10
vxlan10: vni=10 dstport=4789 ttl=255 srcminport=32768 srcmaxport=61000
FDB entries:
00:17:42:8a:b4:05 192.168.1.1 vni: 10 port: 4789
00:00:00:00:00:00 239.0.0.10 vni: 10 port: 4789 eth1-vr0
Enabling the verification of the UDP checksum on the input path¶
vxlan-check-rx-csum-set on|off
- on|off
Enable or disable the verification of the UDP checksum on the input path.
Example
<fp-0> vxlan-check-rx-csum-set on
VXLAN: check of rx checksum is on (was off)
Statistics¶
vxlan-stats¶
Description
Display vxlan statistics.
Synopsis
vxlan-stats [percore] [all]
Parameters
- percore
Display all statistics per core running the fast path.
- all
Display all statistics (even those that are null).
Example
<fp-0> vxlan-stats all
VxlanDroppedUnknownIface:0
VxlanDroppedUnknownVNI:0
VxlanDroppedHeaderTooShort:0
VxlanDroppedInvalidIPv4Header:0
VxlanDroppedInvalidIPv6Header:0
VxlanDroppedInvalidIPv4Csum:0
VxlanDroppedInvalidIPv6Csum:0
VxlanDroppedOvsNoDst:0
VxlanDroppedIPv4NoDst:0
VxlanDroppedIPv6NoDst:0
VxlanDroppedPrependOvsFailure:0
VxlanDroppedPrependIPv4Failure:0
VxlanDroppedPrependIPv6Failure:0
VxlanDroppedInvalidIpFamily:0
VxlanFdbForwDuplicateError:0
VxlanDroppedAddGBPFailure:0
VxlanExceptionIFlagNotSet:0
VxlanExceptionOvsMtuExceeded:0
VxlanExceptionIPv4MtuExceeded:0
VxlanExceptionIPv6MtuExceeded:0
VxlanExceptionNoInputFdb:0
VxlanExceptionNoOutputFdb:0
VxlanExceptionIPv4NoMcastSrc:0
VxlanExceptionIPv6NoMcastSrc:0
VxlanExceptionNoRemote:0
VxlanExceptionOvsRoute:0
VxlanExceptionIPv4Route:0
VxlanExceptionIPv6Route:0
VxlanExceptionTooManyFlags:0
vxlan-stats-json¶
Description
Display vxlan statistics in json format.
Synopsis
vxlan-stats-json
Example
<fp-0> vxlan-stats-json
{
"VxlanDroppedUnknownIface": 0,
"VxlanDroppedInvalidIpFamily": 0,
"VxlanDroppedUnknownVNI": 0,
"VxlanDroppedPrependOvsFailure": 0,
"VxlanDroppedPrependIPv4Failure": 0,
"VxlanDroppedPrependIPv6Failure": 0,
"VxlanDroppedOvsNoDst": 0,
"VxlanDroppedIPv4NoDst": 0,
"VxlanDroppedIPv6NoDst": 0,
"VxlanDroppedHeaderTooShort": 0,
"VxlanDroppedInvalidIPv4Header": 0,
"VxlanDroppedInvalidIPv6Header": 0,
"VxlanDroppedInvalidIPv4Csum": 0,
"VxlanDroppedInvalidIPv6Csum": 0,
"VxlanFdbForwDuplicateError": 0,
"VxlanDroppedAddGBPFailure": 0,
"VxlanExceptionNoInputFdb": 0,
"VxlanExceptionNoOutputFdb": 0,
"VxlanExceptionIPv4NoMcastSrc": 0,
"VxlanExceptionIPv6NoMcastSrc": 0,
"VxlanExceptionIFlagNotSet": 0,
"VxlanExceptionTooManyFlags": 0,
"VxlanExceptionOvsMtuExceeded": 0,
"VxlanExceptionIPv4MtuExceeded": 0,
"VxlanExceptionIPv6MtuExceeded": 0,
"VxlanExceptionOvsRoute": 0,
"VxlanExceptionIPv4Route": 0,
"VxlanExceptionIPv6Route": 0,
"VxlanExceptionNoRemote": 0,
}
Providing options¶
Some capabilities can be tuned for this module.
Example
FP_OPTIONS="--mod-opt=vxlan:--max-if=8"
- --max-port¶
Maximum number of (VXLAN destination port, VR) pairs
- Default value
15
- Memory footprint per (VXLAN destination port, VR) pair
2 KB
- Range
0 .. 128
- --max-if¶
Maximum number of VXLAN interfaces
- Default value
127
- Memory footprint per VXLAN interface
66 KB
- Range
0 .. 50K
- --max-fdb¶
Maximum number of VXLAN forwarding database entries
- Default value
5000
- Memory footprint per IPv6 Netfilter conntrack
100 B
- Range
0 .. 50K
- --port-hash-order¶
Size order of (VXLAN destination port, VR) tuples. Value automatically updated if
--max-port
is changed.- Default value
4
- Range
1 .. 31
- --if-hash-order¶
Size order of VXLAN interfaces hash table Value automatically updated if
--max-if
is changed.- Default value
8
- Range
1 .. 31
- --fdb-hash-order¶
Size order of VXLAN forwarding database hash table Value automatically updated if
--max-fdb
is changed.- Default value
13
- Range
1 .. 31
Note
See Fast Path Capabilities documentation for impact of the available memory on the default value of configurable capabilities