Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UPF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UPF
Commits
0005cbfc
Commit
0005cbfc
authored
Oct 11, 2022
by
Stefan Spettel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(upf): docker-compose.yml and better error message in create_configuration.py
parent
3f283b89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
23 deletions
+28
-23
ci-scripts/pcap_check.py
ci-scripts/pcap_check.py
+2
-2
docker-compose/docker-compose.yml
docker-compose/docker-compose.yml
+19
-20
scripts/upf_conf/create_configuration.py
scripts/upf_conf/create_configuration.py
+7
-1
No files found.
ci-scripts/pcap_check.py
View file @
0005cbfc
...
@@ -31,7 +31,7 @@ import pyshark
...
@@ -31,7 +31,7 @@ import pyshark
NRF_IP_ADDRESS
=
'192.168.71.130'
NRF_IP_ADDRESS
=
'192.168.71.130'
SMF_IP_ADDRESS
=
'192.168.71.133'
SMF_IP_ADDRESS
=
'192.168.71.133'
UPF_IP_ADDRESS
=
'192.168.71.134'
UPF_IP_ADDRESS
=
'192.168.71.134'
UPF_N4_IP_ADDRESS
=
'192.168.71.20
2
'
UPF_N4_IP_ADDRESS
=
'192.168.71.20
1
'
# PGCP Constants
# PGCP Constants
PFCP_MSG_TYPE__SX_HEARTBEAT_REQUEST
=
'1'
PFCP_MSG_TYPE__SX_HEARTBEAT_REQUEST
=
'1'
...
@@ -69,7 +69,7 @@ def check_if_upf_registers_to_nrf(pcap_file):
...
@@ -69,7 +69,7 @@ def check_if_upf_registers_to_nrf(pcap_file):
status201
=
True
status201
=
True
result
=
re
.
search
(
'json_value_string'
,
str
(
pkt
.
http2
.
field_names
))
result
=
re
.
search
(
'json_value_string'
,
str
(
pkt
.
http2
.
field_names
))
if
result
is
not
None
:
if
result
is
not
None
:
if
pkt
.
http2
.
json_value_string
==
'
gw1.vpp
upf.node.5gcn.mnc95.mcc208.3gppnetwork.org'
:
if
pkt
.
http2
.
json_value_string
==
'
vpp-
upf.node.5gcn.mnc95.mcc208.3gppnetwork.org'
:
upf_fqdn
=
True
upf_fqdn
=
True
res
[
'upf_nrf_fqdn'
]
=
pkt
.
http2
.
json_value_string
res
[
'upf_nrf_fqdn'
]
=
pkt
.
http2
.
json_value_string
if
status201
and
upf_fqdn
:
if
status201
and
upf_fqdn
:
...
...
docker-compose/docker-compose.yml
View file @
0005cbfc
...
@@ -140,7 +140,7 @@ services:
...
@@ -140,7 +140,7 @@ services:
-
USE_NETWORK_INSTANCE=yes
-
USE_NETWORK_INSTANCE=yes
-
USE_FQDN_DNS=no
-
USE_FQDN_DNS=no
extra_hosts
:
extra_hosts
:
-
"
gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.71.202
"
-
"
vpp-upf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.71.201
"
depends_on
:
depends_on
:
-
oai-amf
-
oai-amf
volumes
:
volumes
:
...
@@ -158,25 +158,25 @@ services:
...
@@ -158,25 +158,25 @@ services:
privileged
:
true
privileged
:
true
container_name
:
"
vpp-upf"
container_name
:
"
vpp-upf"
environment
:
environment
:
-
NWI_N3=access.oai.org
-
IF_1_IP=192.168.71.201
-
NWI_N6=core.oai.org
-
IF_1_TYPE=N4
-
GW_ID=1
-
IF_2_IP=192.168.72.201
-
MNC03=95
-
IF_2_TYPE=N3
-
IF_2_NWI=access.oai.org
-
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=internet.oai.org
-
NAME=VPP-UPF
-
MNC=95
-
MCC=208
-
MCC=208
-
REALM=3gppnetwork.org
-
REALM=3gppnetwork.org
-
NETWORK_UE_IP=12.1.1.0/24
-
N3_IPV4_ADDRESS_REMOTE=192.168.72.141
# GNB IP Address
-
N4_IPV4_ADDRESS_REMOTE=192.168.71.133
# SMF IP Address
-
N6_IPV4_ADDRESS_REMOTE=192.168.73.135
# EXT-DN IP Address
-
VPP_MAIN_CORE=0
-
VPP_MAIN_CORE=0
-
VPP_CORE_WORKER=1
-
VPP_CORE_WORKER=1
# - VPP_PLUGIN_PATH=/usr/lib64/vpp_plugins/ # RHEL7
# - VPP_PLUGIN_PATH=/usr/lib64/vpp_plugins/ # RHEL7
-
VPP_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/vpp_plugins/
# Ubntu18.04
-
VPP_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/vpp_plugins/
# Ubntu18.04
-
INTERFACE_ACCESS=eth0
-
SNSSAI_SD=222
-
INTERFACE_CORE=eth1
-
SNSSAI_SST=123
-
INTERFACE_CP=eth2
-
NSSAI_SD_0=222
-
SST=123
-
DNN=default
-
DNN=default
-
REGISTER_NRF=yes
-
REGISTER_NRF=yes
-
NRF_IP_ADDR=192.168.71.130
-
NRF_IP_ADDR=192.168.71.130
...
@@ -195,14 +195,13 @@ services:
...
@@ -195,14 +195,13 @@ services:
public_net_core
:
public_net_core
:
ipv4_address
:
192.168.73.134
ipv4_address
:
192.168.73.134
oai-ext-dn
:
oai-ext-dn
:
image
:
ubuntu:bionic
image
:
trf-gen-cn5g:latest
privileged
:
true
privileged
:
true
container_name
:
"
oai-ext-dn"
container_name
:
"
oai-ext-dn"
entrypoint
:
/bin/bash -c \
entrypoint
:
[
"
/bin/bash"
,
"
-c"
,
"
iptables
-t
nat
-A
POSTROUTING
-o
eth0
-j
MASQUERADE;
\
"apt update; apt install -y iptables iproute2 iputils-ping;"\
ip
route
add
12.1.1.0/24
via
192.168.73.201
dev
eth0;
\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
trap
:
TERM
INT;
sleep
infinity
&
wait;
"ip route add 12.1.1.0/24 via 192.168.73.202 dev eth0; sleep infinity"
"
]
command
:
[
"
/bin/bash"
,
"
-c"
,
"
trap
:
TERM
INT;
sleep
infinity
&
wait"
]
depends_on
:
depends_on
:
-
vpp-upf
-
vpp-upf
networks
:
networks
:
...
...
scripts/upf_conf/create_configuration.py
View file @
0005cbfc
...
@@ -52,6 +52,9 @@ class InitFile:
...
@@ -52,6 +52,9 @@ class InitFile:
f"ip route add 0.0.0.0/0 table
{
iface
[
'table_id'
]
}
via
{
iface
[
'ip_remote'
]
}
host-
{
iface
[
'name'
]
}
\n
"
)
f"ip route add 0.0.0.0/0 table
{
iface
[
'table_id'
]
}
via
{
iface
[
'ip_remote'
]
}
host-
{
iface
[
'name'
]
}
\n
"
)
def
create_upf_nwi
(
self
,
iface
):
def
create_upf_nwi
(
self
,
iface
):
if
not
iface
.
get
(
'nwi'
):
print
(
f"You need to specify NWI for interface
{
iface
[
'name'
]
}
"
)
exit
(
-
1
)
self
.
nwis
.
append
(
self
.
nwis
.
append
(
f"upf nwi name
{
iface
[
'nwi'
]
}
vrf
{
iface
[
'table_id'
]
}
\n
"
)
f"upf nwi name
{
iface
[
'nwi'
]
}
vrf
{
iface
[
'table_id'
]
}
\n
"
)
...
@@ -147,9 +150,12 @@ class Profile:
...
@@ -147,9 +150,12 @@ class Profile:
# TODO should we have a distinct value for endpointFQDN?
# TODO should we have a distinct value for endpointFQDN?
upf_ifaces
.
append
(
upf_iface
)
upf_ifaces
.
append
(
upf_iface
)
if
iface
[
"dnai"
]
:
if
iface
.
get
(
"dnai"
)
:
dnais
.
append
(
iface
[
"dnai"
])
dnais
.
append
(
iface
[
"dnai"
])
dnais_nw_instance
[
iface
[
"dnai"
]]
=
iface
[
"nwi"
]
dnais_nw_instance
[
iface
[
"dnai"
]]
=
iface
[
"nwi"
]
else
:
print
(
f"Warning: You did not configure DNAI for interface
{
iface
[
'name'
]
}
. "
f"Edge computing not supported."
)
profile
[
"nfInstanceId"
]
=
self
.
upf_conf
[
"uuid"
]
profile
[
"nfInstanceId"
]
=
self
.
upf_conf
[
"uuid"
]
profile
[
"capacity"
]
=
CAPACITY
profile
[
"capacity"
]
=
CAPACITY
profile
[
"fqdn"
]
=
self
.
upf_conf
[
"fqdn"
]
profile
[
"fqdn"
]
=
self
.
upf_conf
[
"fqdn"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment