Commit 0005cbfc authored by Stefan Spettel's avatar Stefan Spettel

fix(upf): docker-compose.yml and better error message in create_configuration.py

parent 3f283b89
......@@ -31,7 +31,7 @@ import pyshark
NRF_IP_ADDRESS = '192.168.71.130'
SMF_IP_ADDRESS = '192.168.71.133'
UPF_IP_ADDRESS = '192.168.71.134'
UPF_N4_IP_ADDRESS = '192.168.71.202'
UPF_N4_IP_ADDRESS = '192.168.71.201'
# PGCP Constants
PFCP_MSG_TYPE__SX_HEARTBEAT_REQUEST = '1'
......@@ -69,7 +69,7 @@ def check_if_upf_registers_to_nrf(pcap_file):
status201 = True
result = re.search('json_value_string', str(pkt.http2.field_names))
if result is not None:
if pkt.http2.json_value_string == 'gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org':
if pkt.http2.json_value_string == 'vpp-upf.node.5gcn.mnc95.mcc208.3gppnetwork.org':
upf_fqdn = True
res['upf_nrf_fqdn'] = pkt.http2.json_value_string
if status201 and upf_fqdn:
......
......@@ -140,7 +140,7 @@ services:
- USE_NETWORK_INSTANCE=yes
- USE_FQDN_DNS=no
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:
- oai-amf
volumes:
......@@ -158,25 +158,25 @@ services:
privileged: true
container_name: "vpp-upf"
environment:
- NWI_N3=access.oai.org
- NWI_N6=core.oai.org
- GW_ID=1
- MNC03=95
- IF_1_IP=192.168.71.201
- IF_1_TYPE=N4
- IF_2_IP=192.168.72.201
- 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
- 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_CORE_WORKER=1
# - VPP_PLUGIN_PATH=/usr/lib64/vpp_plugins/ # RHEL7
- VPP_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/vpp_plugins/ # Ubntu18.04
- INTERFACE_ACCESS=eth0
- INTERFACE_CORE=eth1
- INTERFACE_CP=eth2
- NSSAI_SD_0=222
- SST=123
- SNSSAI_SD=222
- SNSSAI_SST=123
- DNN=default
- REGISTER_NRF=yes
- NRF_IP_ADDR=192.168.71.130
......@@ -195,14 +195,13 @@ services:
public_net_core:
ipv4_address: 192.168.73.134
oai-ext-dn:
image: ubuntu:bionic
image: trf-gen-cn5g:latest
privileged: true
container_name: "oai-ext-dn"
entrypoint: /bin/bash -c \
"apt update; apt install -y iptables iproute2 iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"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"]
entrypoint: [ "/bin/bash", "-c", "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; \
ip route add 12.1.1.0/24 via 192.168.73.201 dev eth0; \
trap : TERM INT; sleep infinity & wait;
" ]
depends_on:
- vpp-upf
networks:
......
......@@ -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")
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(
f"upf nwi name {iface['nwi']} vrf {iface['table_id']}\n")
......@@ -147,9 +150,12 @@ class Profile:
# TODO should we have a distinct value for endpointFQDN?
upf_ifaces.append(upf_iface)
if iface["dnai"]:
if iface.get("dnai"):
dnais.append(iface["dnai"])
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["capacity"] = CAPACITY
profile["fqdn"] = self.upf_conf["fqdn"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment