srv6-mobile:
[vpp.git] / src / plugins / srv6-mobile / extra / README.md
1 Test and Demonstrate SRv6 Mobile User Plane Plugin
2 ========================
3
4
5 ## Getting started
6 To play with SRv6 Mobile User Plane on VPP, you need to install following packages:
7
8         docker
9         python3
10         pip3
11
12         Python packages (use pip):
13         docker
14         scapy
15         jinja2
16
17
18 ### Quick-start
19
20 1. Build up the docker container image as following:
21
22 ```
23 $ git clone https://github.com/filvarga/srv6-mobile.git
24 $ cd ./srv6-mobile/src/plugins/srv6-mobile/extra
25 $ ./runner.py infra build
26
27 $ docker images
28 REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
29 srv6m-image         latest              577e786b7ec6        2 days ago          8GB
30 ubuntu              18.04               4c108a37151f        4 weeks ago         64.2MB
31
32 ```
33
34 The runner script [runner.py](runner.py) has features to automate configurations and procedures for the test.
35
36 2. Instantiate test Scenario
37
38 Let's try following command to instantiate a topology:
39
40 ```
41 $ ./runner.py infra start
42 ```
43
44 This command instantiates 4 VPP containers with following topology:
45
46 ![Topology Diagram](topo-init.png)
47
48 You can check the instantiated docker instances with "docker ps".
49
50
51 ```
52 $ docker ps
53 CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS               NAMES
54 44cb98994500        srv6m-image       "/bin/sh -c 'vpp -c …"   About a minute ago   Up About a minute                       hck-vpp-4
55 6d65fff8aee9        srv6m-image       "/bin/sh -c 'vpp -c …"   About a minute ago   Up About a minute                       hck-vpp-3
56 ad123b516b24        srv6m-image       "/bin/sh -c 'vpp -c …"   About a minute ago   Up About a minute                       hck-vpp-2
57 5efed405b96a        srv6m-image       "/bin/sh -c 'vpp -c …"   About a minute ago   Up About a minute                       hck-vpp-1
58
59 ```
60
61 You can login to and configure each instantiated container.
62
63 ```
64 $ ./runner.py cmd vppctl 0
65
66 Verified image: None
67 connecting to: hck-vpp-1
68     _______    _        _   _____  ___
69  __/ __/ _ \  (_)__    | | / / _ \/ _ \
70  _/ _// // / / / _ \   | |/ / ___/ ___/
71  /_/ /____(_)_/\___/   |___/_/  /_/    
72
73 vpp#
74 ```
75
76 ## Test Scenarios
77 ### SRv6 Drop-in between GTP-U tunnel
78
79 This test scenario introduces SRv6 path between GTP-U tunnel transparently. A GTP-U packet sent out from one end to another is translated to SRv6 and then back to GTP-U. All GTP-U tunnel identifiers are preserved in IPv6 header and SRH.
80
81
82 #### GTP-U over UDP/IPv4 case
83
84 This case uses SRv6 end functions, T.M.GTP4.D and End.M.GTP4.E.
85
86 ![Topology Diagram](topo-test_gtp4d.png)
87
88 VPP1 is configured with "T.M.GTP4.D", and VPP4 is configured with "End.M.GTP4.E". Others are configured with "End". The packet generator sends a GTP-U packet over UDP/IPv4 toward the packet capture. VPP1 translates it to SRv6 toward D4::TEID with SR policy <D2::, D3::> in SRH. VPP4 translates the SRv6 packet to the original GTP-U packet and send out to the packet capture.
89
90 To start this case with IPv4 payload over GTP-U, you can run:
91
92 ```
93 $ ./runner.py test gtp4
94 ```
95
96 If you want to use IPv6 payload instead of IPv4, you can run:
97
98 ```
99 $ ./runner.py test gtp4_ipv6
100 ```
101
102 If you use the latest scapy codes from the master branch, you can test the functions with GTP-U packet in 5G format:
103
104 ```
105 $ ./runner.py test gtp4_5g
106 ```
107
108
109
110 #### GTP-U over UDP/IPv6 case
111
112 This case uses SRv6 end functions, End.M.GTP6.D.Di and End.M.GTP6.E.
113
114 ![Topology Diagram](topo-test_gtp6d.png)
115
116 VPP1 is configured with "End.M.GTP6.D.Di", and VPP4 is configured with "End.M.GTP4.E". Others are configured with "End". The packet generator sends a GTP-U packet over UDP/IPv6 toward D:: of the packet capture. VPP1 translates it to SRv6 toward D:: with SR policy <D2::, D3::, D4::TEID> in SRH. VPP4 translates the SRv6 packet to the original GTP-U packet and send out to the packet capture.
117
118 To start this case with IPv4 payload over GTP-U, you can run:
119
120 ```
121 $ ./runner.py test gtp6_drop_in
122 ```
123
124 If you want to use IPv6 payload instead of IPv4, you can run:
125
126 ```
127 $ ./runner.py test gtp6_drop_in_ipv6
128 ```
129
130
131 ### GTP-U to SRv6
132
133 This test scenario demonstrates GTP-U to SRv6 translation. A GTP-U packet sent out from one end to another is translated to SRv6.
134
135 #### GTP-U over UDP/IPv6 case
136
137 ##### IPv4 payload
138
139 This case uses SRv6 end functions, End.M.GTP6.D and End.DT4.
140
141 ![Topology Diagram](topo-test_gtp6.png)
142
143 VPP1 is configured with "End.M.GTP6.D", and VPP4 is configured with "End.DT4". Others are configured with "End". The packet generator sends a GTP-U packet over UDP/IPv6 toward D::2. VPP1 translates it to SRv6 toward the IPv6 destination consists of D4:: and TEID of GTP-U with SR policy <D2::, D3::> in SRH. VPP4 decapsulates the SRv6 packet and lookup the table for the inner IPv4 packet and send out to the packet capture.
144
145 To start this case, you can run:
146
147 ```
148 $ ./runner.py test gtp6
149 ```
150
151 ##### IPv6 payload
152
153 This case uses SRv6 end functions, End.M.GTP6.D and End.DT6.
154
155
156 ![Topology Diagram](topo-test_gtp6ip6.png)
157
158 The configurations are same with IPv4 payload case, except D4:: is configured as "End.DT6" in VPP4. VPP4 decapsulates the SRv6 packet and lookup the table for the inner IPv6 packet and send out to the packet capture.
159
160 If you want to use IPv6 payload instead of IPv4, you can run:
161
162 ```
163 $ ./runner.py test gtp6_ipv6
164 ```
165
166 ## More information
167
168 - @subpage runner_doc.md