Commit 3d1ad18d authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'fix_upf_interface_naming' into 'prepare-public-release'

changed interface naming style

See merge request oai/cn5g/oai-cn5g-upf-vpp!7
parents b6ab68c3 aed7fb98
...@@ -18,7 +18,7 @@ services: ...@@ -18,7 +18,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
networks: networks:
public_net_core: public_net_cp:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-nrf: oai-nrf:
container_name: "oai-nrf" container_name: "oai-nrf"
...@@ -31,7 +31,7 @@ services: ...@@ -31,7 +31,7 @@ services:
- INSTANCE=0 - INSTANCE=0
- PID_DIRECTORY=/var/run - PID_DIRECTORY=/var/run
networks: networks:
public_net_core: public_net_cp:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes: volumes:
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
...@@ -105,7 +105,7 @@ services: ...@@ -105,7 +105,7 @@ services:
timeout: 15s timeout: 15s
retries: 5 retries: 5
networks: networks:
public_net_core: public_net_cp:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "oai-smf" container_name: "oai-smf"
...@@ -151,34 +151,30 @@ services: ...@@ -151,34 +151,30 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
networks: networks:
public_net_core: public_net_cp:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
vpp-upf: vpp-upf:
image: oai-upf-vpp:latest image: oai-upf-vpp:latest
privileged: true privileged: true
container_name: vpp-upf container_name: vpp-upf
environment: environment:
- NWI_CORE=core.oai.org - NWI_N3=access.oai.org
- NWI_ACCESS=access.oai.org - NWI_N6=core.oai.org
- NWI_SGI=sgi.oai.org
- GW_ID=1 - GW_ID=1
- MNC03=95 - MNC03=95
- MCC=208 - MCC=208
- REALM=3gppnetwork.org - REALM=3gppnetwork.org
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- N3_IPV4_ADDRESS_REMOTE=192.168.72.141 - N3_IPV4_ADDRESS_REMOTE=192.168.72.141 # GNB IP Address
- N3_IPV4_ADDRESS_LOCAL=192.168.72.202 - N4_IPV4_ADDRESS_REMOTE=192.168.71.133 # SMF IP Address
- N4_IPV4_ADDRESS_REMOTE=192.168.71.133 - N6_IPV4_ADDRESS_REMOTE=192.168.73.135 # EXT-DN IP Address
- N4_IPV4_ADDRESS_LOCAL=192.168.71.202
- N6_IPV4_ADDRESS_REMOTE=192.168.73.135
- N6_IPV4_ADDRESS_LOCAL=192.168.73.202
- 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 - INTERFACE_ACCESS=eth0
- INTERFACE_CORE=eth1 - INTERFACE_CORE=eth1
- INTERFACE_SGI=eth2 - INTERFACE_CP=eth2
- NSSAI_SD_0=222 - NSSAI_SD_0=222
- SST=123 - SST=123
- DNN=default - DNN=default
...@@ -192,11 +188,11 @@ services: ...@@ -192,11 +188,11 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
networks: networks:
public_net_core: public_net_cp:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
public_net_access: public_net_access:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
public_net_sgi_lan: 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: ubuntu:bionic
...@@ -210,11 +206,11 @@ services: ...@@ -210,11 +206,11 @@ services:
depends_on: depends_on:
- vpp-upf - vpp-upf
networks: networks:
public_net_sgi_lan: public_net_core:
ipv4_address: 192.168.73.135 ipv4_address: 192.168.73.135
networks: networks:
public_net_core: public_net_cp:
name: oai-public-core name: oai-public-cp
ipam: ipam:
config: config:
- subnet: 192.168.71.0/24 - subnet: 192.168.71.0/24
...@@ -227,10 +223,10 @@ networks: ...@@ -227,10 +223,10 @@ networks:
- subnet: 192.168.72.0/24 - subnet: 192.168.72.0/24
driver_opts: driver_opts:
com.docker.network.bridge.name: "cn5g-access" com.docker.network.bridge.name: "cn5g-access"
public_net_sgi_lan: public_net_core:
name: oai-public-sgi-lan name: oai-public-core
ipam: ipam:
config: config:
- subnet: 192.168.73.0/24 - subnet: 192.168.73.0/24
driver_opts: driver_opts:
com.docker.network.bridge.name: "cn5g-sgi" com.docker.network.bridge.name: "cn5g-core"
...@@ -19,7 +19,7 @@ Here in our network configuration, we need to pass the "GIT PROXY" configuration ...@@ -19,7 +19,7 @@ Here in our network configuration, we need to pass the "GIT PROXY" configuration
## 3.1 On a Ubuntu 18.04 Host ## ## 3.1 On a Ubuntu 18.04 Host ##
```bash ```bash
$ docker build --target oai-upf-vpp --tag vpp-upg:develop \ $ docker build --target oai-upf-vpp --tag oai-upf-vpp:latest \
--file docker/Dockerfile.upf-vpp.ubuntu18 \ --file docker/Dockerfile.upf-vpp.ubuntu18 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
``` ```
...@@ -27,7 +27,7 @@ $ docker build --target oai-upf-vpp --tag vpp-upg:develop \ ...@@ -27,7 +27,7 @@ $ docker build --target oai-upf-vpp --tag vpp-upg:develop \
## 3.2 On a RHEL 7 Host ## ## 3.2 On a RHEL 7 Host ##
```bash ```bash
$ docker build --target oai-upf-vpp --tag vpp-upg:develop \ $ docker build --target oai-upf-vpp --tag oai-upf-vpp:latest \
--file docker/Dockerfile.upf-vpp.rhel7 \ --file docker/Dockerfile.upf-vpp.rhel7 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
``` ```
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
set -euo pipefail set -euo pipefail
CONFIG_DIR="/openair-upf/etc" CONFIG_DIR="/openair-upf/etc"
SGI_IPV4=$(ifconfig $INTERFACE_SGI | grep "inet " | awk '{print $2}') SGI_IPV4=$(ifconfig $INTERFACE_CORE | grep "inet " | awk '{print $2}')
ACCESS_IPV4=$(ifconfig $INTERFACE_ACCESS | grep "inet " | awk '{print $2}') ACCESS_IPV4=$(ifconfig $INTERFACE_ACCESS | grep "inet " | awk '{print $2}')
CORE_IPV4=$(ifconfig $INTERFACE_CORE | grep "inet " | awk '{print $2}') CORE_IPV4=$(ifconfig $INTERFACE_CP | grep "inet " | awk '{print $2}')
N3_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_ACCESS | grep "inet " | awk '{print $2}' | cut -d"." -f1-3)".202" N3_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_ACCESS | grep "inet " | awk '{print $2}' | cut -d"." -f1-3)".202"
N4_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_CORE | grep "inet " | awk '{print $2}' | cut -d"." -f1-3)".202" N4_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_CP | grep "inet " | awk '{print $2}' | cut -d"." -f1-3)".202"
N6_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_SGI | grep "inet " | awk '{print $2}' | cut -d"." -f1-3)".202" N6_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_CORE | grep "inet " | awk '{print $2}' | cut -d"." -f1-3)".202"
############################### ###############################
# UPF Config # UPF Config
...@@ -82,18 +82,18 @@ done ...@@ -82,18 +82,18 @@ done
# #
ip link set $INTERFACE_ACCESS down ip link set $INTERFACE_ACCESS down
ip link set $INTERFACE_ACCESS name access ip link set $INTERFACE_ACCESS name n3
ip link set access up ip link set n3 up
ip link set $INTERFACE_CORE down ip link set $INTERFACE_CP down
ip link set $INTERFACE_CORE name core ip link set $INTERFACE_CP name n4
ip link set core up ip link set n4 up
ip link set $INTERFACE_SGI down ip link set $INTERFACE_CORE down
ip link set $INTERFACE_SGI name sgi ip link set $INTERFACE_CORE name n6
ip link set sgi up ip link set n6 up
ip route add $NETWORK_UE_IP via $SGI_IPV4 dev sgi ip route add $NETWORK_UE_IP via $SGI_IPV4 dev n6
echo "Done setting the configuration" echo "Done setting the configuration"
......
ip table add 1 ip table add 1
ip table add 2 ip table add 2
create host-interface name sgi create host-interface name n6
set interface mtu 1500 host-sgi set interface mtu 1500 host-n6
set interface ip table host-sgi 1 set interface ip table host-n6 1
set interface ip address host-sgi @N6_IPV4_ADDRESS_LOCAL@/24 set interface ip address host-n6 @N6_IPV4_ADDRESS_LOCAL@/24
set interface state host-sgi up set interface state host-n6 up
create host-interface name core create host-interface name n4
set interface mtu 1500 host-core set interface mtu 1500 host-n4
set interface ip table host-core 0 set interface ip table host-n4 0
set interface ip address host-core @N4_IPV4_ADDRESS_LOCAL@/24 set interface ip address host-n4 @N4_IPV4_ADDRESS_LOCAL@/24
set interface state host-core up set interface state host-n4 up
create host-interface name access create host-interface name n3
set interface mtu 1500 host-access set interface mtu 1500 host-n3
set interface ip table host-access 2 set interface ip table host-n3 2
set interface ip address host-access @N3_IPV4_ADDRESS_LOCAL@/24 set interface ip address host-n3 @N3_IPV4_ADDRESS_LOCAL@/24
set interface state host-access up set interface state host-n3 up
ip route add 0.0.0.0/0 table 2 via @N3_IPV4_ADDRESS_REMOTE@ host-access ip route add 0.0.0.0/0 table 2 via @N3_IPV4_ADDRESS_REMOTE@ host-n3
ip route add 0.0.0.0/0 table 0 via @N4_IPV4_ADDRESS_REMOTE@ host-core ip route add 0.0.0.0/0 table 0 via @N4_IPV4_ADDRESS_REMOTE@ host-n4
ip route add 0.0.0.0/0 table 1 via @N6_IPV4_ADDRESS_REMOTE@ host-sgi ip route add 0.0.0.0/0 table 1 via @N6_IPV4_ADDRESS_REMOTE@ host-n6
upf pfcp endpoint ip @N4_IPV4_ADDRESS_LOCAL@ vrf 0 upf pfcp endpoint ip @N4_IPV4_ADDRESS_LOCAL@ vrf 0
upf node-id fqdn gw@GW_ID@.vppupf.node.5gcn.mnc@MNC03@.mcc@MCC@.@REALM@ upf node-id fqdn gw@GW_ID@.vppupf.node.5gcn.mnc@MNC03@.mcc@MCC@.@REALM@
upf nwi name @NWI_CORE@ vrf 0 upf nwi name @NWI_N3@ vrf 2
upf nwi name @NWI_ACCESS@ vrf 2 upf nwi name @NWI_N6@ vrf 1
upf nwi name @NWI_SGI@ vrf 1
upf specification release 16 upf specification release 16
upf gtpu endpoint ip @N3_IPV4_ADDRESS_LOCAL@ nwi @NWI_ACCESS@ teid 0x000004d2/2 upf gtpu endpoint ip @N3_IPV4_ADDRESS_LOCAL@ nwi @NWI_N3@ teid 0x000004d2/2
...@@ -24,15 +24,15 @@ ...@@ -24,15 +24,15 @@
} }
}], }],
"interfaceUpfInfoList": [{ "interfaceUpfInfoList": [{
"endpointFqdn": "@NWI_ACCESS@", "endpointFqdn": "@NWI_N3@",
"interfaceType": "N3", "interfaceType": "N3",
"ipv4EndpointAddresses": ["@ACCESS_IPV4@"], "ipv4EndpointAddresses": ["@ACCESS_IPV4@"],
"networkInstance": "@NWI_ACCESS@" "networkInstance": "@NWI_N3@"
}, { }, {
"endpointFqdn": "@NWI_CORE@", "endpointFqdn": "@NWI_N6@",
"interfaceType": "N6", "interfaceType": "N6",
"ipv4EndpointAddresses": ["@CORE_IPV4@"], "ipv4EndpointAddresses": ["@CORE_IPV4@"],
"networkInstance": "@NWI_CORE@" "networkInstance": "@NWI_N6@"
}] }]
} }
......
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