MPLS support + loop_vm_arp test fix
[nfvbench.git] / docs / testing / user / userguide / mpls.rst
1 ==========================
2 MPLS encapsulation feature
3 ==========================
4
5 This feature allows to generate packets with standard MPLS L2VPN double stack MPLS labels, where the outer label is transport and the inner label is VPN.
6 The top layer of a packets encapsulated inside MPLS L2VPN seems to be an Ethernet layer with the rest of the IP stack inside.
7 Please refer to RFC-3031 for more details.
8 The whole MPLS packet structure looks like the following:
9
10 ###[ Ethernet ]###
11   dst       = ['00:8a:96:bb:14:28']
12   src       = 3c:fd:fe:a3:48:7c
13   type      = 0x8847
14 ###[ MPLS ]### <-------------- Outer Label
15      label     = 16303
16      cos       = 1
17      s         = 0
18      ttl       = 255
19 ###[ MPLS ]### <-------------- Inner Label
20         label     = 5010
21         cos       = 1
22         s         = 1
23         ttl       = 255
24 ###[ Ethernet ]###
25            dst       = fa:16:3e:bd:02:b5
26            src       = 3c:fd:fe:a3:48:7c
27            type      = 0x800
28 ###[ IP ]###
29               version   = 4
30               ihl       = None
31               tos       = 0x0
32               len       = None
33               id        = 1
34               flags     =
35               frag      = 0
36               ttl       = 64
37               proto     = udp
38               chksum    = None
39               src       = 16.0.0.1
40               dst       = 48.0.0.1
41               \options   \
42 ###[ UDP ]###
43                  sport     = 53
44                  dport     = 53
45                  len       = None
46                  chksum    = None
47
48 Example: nfvbench generates mpls traffic port A ----> port B. This example assumes openstack is at the other end of the mpls tunnels.
49 Packets generated and sent to port B are delivered to the MPLS domain infrastructure which will transport that packet to the other end
50 of the MPLS transport tunnel using the outer label. At that point, the outer label is decapsulated and the inner label is used to
51 select the destination openstack network. After decapsulation of the inner label, the resulting L2 frame is then forwarded to the
52 destination VM corresponding to the destination MAC. When the VM receives the packet, it is sent back to far end port of the traffic
53 generator (port B) using either L2 forwarding or L3 routing though the peer virtual interface. The return packet is then encapsulated
54 with the inner label first then outer label to reach nfvbench on port B.
55
56 Only 2 MPLS labels stack is supported. If more than two labels stack is required then these operations should be handled by MPLS transport
57 domain where nfvbench is attached next-hop mpls router and rest of the mpls domain should be configured accordingly to be able
58 pop/swap/push labels and deliver packet to the proper destination based on an initial transport label injected by nfvbench, VPN label
59 should stay unchanged until its delivered to PE (compute node).
60 Set nfvbench 'mpls' parameter to 'true' to enable MPLS encapsulation.
61 When this option is enabled internal networks 'network type' parameter value should be 'mpls'
62 MPLS and VxLAN encapsulations are mutual exclusive features if 'mpls' is 'true' then 'vxlan' should be set to 'false' and vise versa.
63 no_flow_stats, no_latency_stats, no_latency_streams parameters should be set to 'true' because these features are not supported at the moment.
64 In future when these features will be supported they will require special NIC hardware.
65
66 Example of 1-chain MPLS configuration:
67  internal_networks:
68     left:
69         network_type: mpls
70         segmentation_id: 5010
71         mpls_transport_labels: 16303
72         physical_network: phys_sriov0
73     right:
74         network_type: mpls
75         segmentation_id: 5011
76         mpls_transport_labels: 16303
77         physical_network: phys_sriov1
78
79 Example of 2-chain MPLS configuration:
80  internal_networks:
81     left:
82         network_type: mpls
83         segmentation_id: [5010, 5020]
84         mpls_transport_labels: [16303, 16304]
85         physical_network: phys_sriov0
86     right:
87         network_type: mpls
88         segmentation_id: [5011, 5021]
89         mpls_transport_labels: [16303, 16304]
90         physical_network: phys_sriov1
91
92 Example of how to run:
93 nfvbench --rate 50000pps --duration 30 --mpls