Configuring VRF
Use the following steps to configure VRF support in UPF.
At SMF:
-
Create the APN or DNN profile.
-
Create overlapping IP pools and associate the respective APN or DNN and VRF at context-level.
-
Associate APN or DNN to the UPF profile.
The following is an example of the SMF configuration:
profile dnn intershat1
.
.
.
upf apn mpls1.com
exit
profile dnn intershat2
.
.
.
upf apn mpls2.com
exit
profile network-element upf upf1
.
.
.
dnn-list [ intershat1 intershat2 ]
exit
profile network-element upf upf2
.
.
.
dnn-list [ intershat1 intershat2 ]
exit
ipam
source local
address-pool pool-intershat1
vrf-name mpls-vrf-1@isp
tags
dnn intershat1
exit
ipv4
address-range 209.165.201.25 255.255.255.224
exit
exit
address-pool pool-intershat2
vrf-name mpls-vrf-2@isp
tags
dnn intershat2
exit
ipv4
address-range 209.165.201.25 255.255.255.224
exit
exit
exit
At UPF:
It is recommended to configure VRF in UPF before a chunk is pushed from SMF. Else, it leads to failure of the complete IP pool transaction (including chunks that donot belong to the VRF). SMF retries the attempt after some time.
The following is an example of the UPF configurations:
UPF 1:
config
context EPC2
sx-service sx
instance-type userplane
bind ipv4-address 209.165.201.11 ipv6-address bbbb:aaaa::4
exit
user-plane-service up
associate gtpu-service pgw-gtpu pgw-ingress
associate gtpu-service sgw-ingress-gtpu sgw-ingress
associate gtpu-service sgw-engress-gtpu sgw-egress
associate gtpu-service saegw-sxu cp-tunnel
associate sx-service sx
associate fast-path service
associate control-plane-group g1
exit
context isp
ip vrf mpls-vrf-1
#exit
ip vrf mpls-vrf-2
#exit
ip vrf mpls-vrf-1
route-distinguisher 61601 11100001
route-target export 61601 11100001
route-target import 61606 11100001
route-target import 65200 11100001
#exit
address-family ipv4 vrf mpls-vrf-1
redistribute connected
redistribute static
#exit
address-family ipv6 vrf mpls-vrf-1
redistribute connected
redistribute static
#exit
ip vrf mpls-vrf-2
route-distinguisher 61601 11100002
route-target export 61601 11100002
route-target import 61606 11100002
route-target import 65200 11100002
#exit
address-family ipv4 vrf mpls-vrf-2
redistribute connected
redistribute static
#exit
address-family ipv6 vrf mpls-vrf-2
redistribute connected
redistribute static
#exit
#exit
apn mpls1.com
pdp-type ipv4 ipv6
bearer-control-mode mixed
selection-mode sent-by-ms
ip context-name isp
exit
exit
control-plane-group g1
peer-node-id ipv4-address 209.165.201.15
#exit
user-plane-group default
UPF 2:
config
context EPC2
sx-service sx
instance-type userplane
bind ipv4-address 209.165.201.12 ipv6-address bbbb:aaaa::5
exit
user-plane-service up
associate gtpu-service pgw-gtpu pgw-ingress
associate gtpu-service sgw-ingress-gtpu sgw-ingress
associate gtpu-service sgw-engress-gtpu sgw-egress
associate gtpu-service saegw-sxu cp-tunnel
associate sx-service sx
associate fast-path service
associate control-plane-group g1
exit
exit
context isp
ip vrf mpls-vrf-1
#exit
ip vrf mpls-vrf-2
#exit
apn mpls2.com
pdp-type ipv4 ipv6
bearer-control-mode mixed
selection-mode sent-by-ms
ip context-name isp
exit
exit
control-plane-group g1
peer-node-id ipv4-address 209.165.201.15
#exit
user-plane-group default