文章目录
VPP_UPF_CONFIG_GENERATION.mdVPP UPF Configuration GenerationEnvironment variablesInterfacesInterface Configuration ExamplesCentral UPFA-UPFI-UPFUL CL FEATURE_SET.mdVPP_UPG_CLI参考文献VPP_UPF_CONFIG_GENERATION.md
VPP UPF Configuration Generation
这个文章比较关键
VPP_UPF_CONFIG_GENERATION.md
init.conf
startup_debug.conf
upf_profile.json
create_configuration.py
The VPP-UPF configuration for different UPF deployment options (A-UPF, I-UPF, ULCL) are not compatible with each other.
The example described in VPP_UPF_CONFIG shows a central UPF node with one N3 and one N6
interface.
To ease the deployment, the UPF configuration can be auto-generated using thecreate_configuration.py
script. It is
located inscripts/upf_conf/create_configuration.py
. If you choose to use the official OAI docker images (from v1.5.0), this script is
executed upon start of the containers.
It takes three positional arguments:
usage: create_configuration.py[-h][--rename]init_pathprofile_pathstartup_path
Theinit_path
is the path to the init file that will be generated. A json file is written to theprofile_path
which
contains the UPF profile which is sent to the NRF.
Thestartup_path
requires an existing VPPstartup_debug.conf
file with placeholders (@value@
). These will be
overwritten with the corresponding environment variables.
If you choose to rename using the--rename
option, the host interfaces are renamed from e.g.eth1
ton6-3
.
Which interface is renamed depends on the configured subnet.
Environment variables
The UPF configuration is built entirely from environment variables. There are static variables, which always have to be
present:
* This config from VPP allows to configure more than one worker thread, e.g. 1-4, but it is not recommended in the
VPP-UPF, as there are race conditions.
The UPF FQDN is built as follows:
<name>.node.5gcn.mnc<mnc>.mcc<mcc>.<realm>
The NAME variable is translated to lower-case.
Then, there are support features which you also have to configure:
Apart from this global configuration, you can dynamically configure your interfaces.
The syntax to configure an interface is as follows:
IF_<Index>_<Value>
Each interface can have multiple values, whereas the index describes the interface.
The following values are available:
** Should belong to subnet of existing host interface
An example of a UPF configuration is as follows (see also the docker-compose file):
- IF_1_IP=192.168.70.201- IF_1_TYPE=N4- IF_2_IP=192.168.72.201- IF_2_TYPE=N3- IF_2_NWI=- IF_3_IP=192.168.73.201- IF_3_TYPE=N6- IF_3_IP_REMOTE=192.168.73.135 # EXT-DN IP Address- IF_3_NWI=- NAME=VPP-UPF- MNC=95- MCC=208- REALM=- VPP_MAIN_CORE=0- VPP_CORE_WORKER=1- VPP_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/vpp_plugins/ # Ubntu18.04- SNSSAI_SD=123- SNSSAI_SST=222- DNN=default- REGISTER_NRF=yes- NRF_IP_ADDR=192.168.70.130- NRF_PORT=80- HTTP_VERSION=1
Interfaces
We use veth pairs to configure the UPF interfaces. Each UPF interface (e.g. N3) has a host interface IP and the IP address
used for signaling. You need one subnet for each UPF interface. In a typical deployment, you need at least three subnets:
Signaling (N4)Access (N3)Core/Internet (N6).
TheIP
value should belong to the same subnet as the host interface, but must not be the same.
TheIP_REMOTE
value also needs to be in the same subnet and is used to setup the routes accordingly.
When you use the--rename
option, theIP_REMOTE
is automatically calculated from the subnet from theIP
value.
The remote IP is always the first host in the subnet, e.g. for the IP192.168.70.201
in the subnet192.168.70.0/24
,
the remote IP is192.168.70.1
.
The value you provide overrides the default value. When you do not rename the interfaces, you need to manually specify
the remote IP address.
Interface Configuration Examples
The dynamic creation allows you to configure different UPF types.
Central UPF
This UPF has one N3, one N4 and one N6 interface:
- IF_1_IP=192.168.70.201- IF_1_TYPE=N4- IF_2_IP=192.168.72.201- IF_2_TYPE=N3- IF_2_NWI=- IF_3_IP=192.168.73.201- IF_3_TYPE=N6- IF_3_NWI=
A-UPF
This UPF has one N9, one N4 and one N6 interface:
- IF_1_IP=192.168.70.202- IF_1_TYPE=N4- IF_2_IP=192.168.74.202- IF_2_TYPE=N9- IF_2_NWI=iupf.node.5gcn.mnc98.- IF_2_DNAI=iupf- IF_3_IP=192.168.75.202- IF_3_TYPE=N6- IF_3_NWI=- IF_3_DNAI=internet
When you want to use multiple UPFs which should be chained or form a graph, you need to ensure that theNWI
of the
configuration matches theFQDN
of the other UPF. In this case,IUPF
should have the following FQDN config:
- NAME=IUPF- MNC=98- MCC=208- REALM=
I-UPF
This UPF has one N3, one N4 and one N9 interface:
- IF_1_IP=192.168.70.203- IF_1_TYPE=N4- IF_2_IP=192.168.72.203- IF_2_TYPE=N3- IF_2_NWI=- IF_2_DNAI=access- IF_3_IP=192.168.74.203- IF_3_TYPE=N9- IF_3_NWI=aupf.node.5gcn.mnc98.- IF_3_DNAI=aupf
As you can see, the N9 interface is in the same subnet as the N9 interface of the I-UPF example. This means
that the SMF will create an edge between these two nodes (as long as the FQDN/NWI configuration matches).
Also, the DNAI is configured for these examples to enable SMF in selecting a specific UPF for a PDU session.
UL CL
This UPF has one N3, one N4 and two N9 interfaces:
- IF_1_IP=192.168.70.204- IF_1_TYPE=N4- IF_2_IP=192.168.72.204- IF_2_TYPE=N3- IF_2_NWI=- IF_2_DNAI=access- IF_3_IP=192.168.74.204- IF_3_TYPE=N9- IF_3_NWI=aupf1.node.5gcn.mnc98.- IF_3_DNAI=aupf1- IF_4_IP=192.168.76.204- IF_3_TYPE=N9- IF_3_NWI=aupf2.node.5gcn.mnc98.- IF_4_DNAI=aupf2
FEATURE_SET.md
FEATURE_SET.md
VPP_UPG_CLI
VPP-UPF 可以进行的一些操作
$ docker exec -it vpp-upf ./bin/vppctl show upf helpadf show upf adf commandsapplicationshow upf application <name>applications show upf applications [verbose]associationshow upf associationbihashshow upf bihash <v4-tunnel-by-key | v6-tunnel-by-key | qer-by-id | peer-index-by-ip> [detail|verbose]flowsshow upf flowsflow show upf flow commandsgtpu show upf gtpu commandsnode-id show upf node-idnwi show upf nwipfcp show upf pfcp commandspolicyshow upf policyproxyshow upf proxysession show upf sessionspecification show upf specification commandstdf show upf tdf commands
Show PFCP session at UPF
$ docker exec -it vpp-upf ./bin/vppctl show upf sessionCP F-SEID: 0x0000000000000001 (1) @ 192.168.70.133UP F-SEID: 0x0000000000000001 (1) @ 192.168.70.202PFCP Association: 0TEID assignment per choose IDPDR: 1 @ 0x7f6cef01cd00Precedence: 0PDI:Fields: 0000000dSource Interface: AccessNetwork Instance: Local F-TEID: 218138074 (0x0d0085da)IPv4: 192.168.72.202UE IP address (source):IPv4 address: 12.1.1.2SDF Filter [1]:permit out ip from any to assigned Outer Header Removal: GTP-U/UDP/IPv4FAR Id: 1URR Ids: [1] @ 0x7f6ceefde850QER Ids: [] @ 0x0PDR: 2 @ 0x7f6cef01cd80Precedence: 0PDI:Fields: 0000000cSource Interface: CoreNetwork Instance: UE IP address (destination):IPv4 address: 12.1.1.2SDF Filter [1]:permit out ip from any to assigned Outer Header Removal: noFAR Id: 2URR Ids: [1] @ 0x7f6ceefde8e0QER Ids: [] @ 0x0FAR: 1Apply Action: 00000002 == [FORWARD]Forward:Network Instance: Destination Interface: 1FAR: 2Apply Action: 00000002 == [FORWARD]Forward:Network Instance: Destination Interface: 0Outer Header Creation: [GTP-U/UDP/IPv4],TEID:9acb0442,IP:192.168.72.141URR: 1Measurement Method: 0002 == [VOLUME]Reporting Triggers: 0001 == [PERIODIC REPORTING]Status: 0 == []Start Time: /09/02 07:29:30:476vTime of First Usage: 0.0000 vTime of Last Usage: 0.0000 VolumeUp: Measured:0, Theshold:0, Pkts:0Consumed:0, Quota: 0Down: Measured:0, Theshold:0, Pkts:0Consumed:0, Quota: 0Total: Measured:0, Theshold:0, Pkts:0Consumed:0, Quota: 0Measurement Period: 10 secs @ /09/02 07:29:40:476, in5.597 secs, handle 0x00000c01
参考文献
参考文献1:OAI 基础核心网部署:oai-cn5g-fed/docs/DEPLOY_SA5G_BASIC_DEPLOYMENT.md
参考文献2:oai-cn5g-upf-vpp
参考文献3:UPD_DEPLOY_HELP
参考文献4:vpp-upf-docs