Skip to content
Snippets Groups Projects
Commit 64adfbb5 authored by turletti's avatar turletti
Browse files

handle n2/n3 ifname for gnb/cu*/du when multus is not used

parent 876f2b46
Branches new-jenkins
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ data:
(
{
type = "cp";
ipv4_cucp = "@CUCP_IP_ADDRESS@";
ipv4_cucp = "@E1_IP_ADDRESS@";
port_cucp = 38462;
ipv4_cuup = "0.0.0.0";
port_cuup = 38462;
......
......@@ -116,13 +116,13 @@ spec:
args:
- AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}');
AMF_IP_ADDRESS=$(if [[ $AMF_IP_ADDRESS ]]; then echo $AMF_IP_ADDRESS; else echo $AMF_HOST;fi)
N2_IP_ADDRESS=$(/sbin/ip -f inet addr show $N2_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
F1_IP_ADDRESS=$(/sbin/ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
CUCP_IP_ADDRESS=$(/sbin/ip -f inet addr show $E1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
sed -e s/@N2_IP_ADDRESS@/$N2_IP_ADDRESS/g
N2_IP_ADDRESS=$(ip -4 addr show $N2_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
F1_IP_ADDRESS=$(ip -4 addr show $F1_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
E1_IP_ADDRESS=$(ip -4 addr show $E1_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
sed -e s/@AMF_IP_ADDRESS@/$AMF_IP_ADDRESS/g
-e s/@GNB_N2_IP_ADDRESS@/$N2_IP_ADDRESS/g
-e s/@F1_IP_ADDRESS@/$F1_IP_ADDRESS/g
-e s/@CUCP_IP_ADDRESS@/$CUCP_IP_ADDRESS/g
-e s/@AMF_IP_ADDRESS@/$AMF_IP_ADDRESS/g
-e s/@E1_IP_ADDRESS@/$E1_IP_ADDRESS/g
/opt/oai-gnb/etc/cucp.conf | tee /tmp/cucp.conf;
/opt/oai-gnb/bin/nr-softmodem -O /tmp/cucp.conf $USE_ADDITIONAL_OPTIONS;
{{- else}}
......
......@@ -44,7 +44,7 @@ multus:
n2Interface:
create: @MULTUS_CUCP_N2@
ipAdd: "@IP_CUCP_N2@"
name: "n2"
name: "@GNB_N2_IF_NAME@"
netmask: "@NETMASK_CUCP_N2@"
# if Mac is empty then it will be removed
mac: "@MAC_CUCP_N2@"
......@@ -78,7 +78,7 @@ config:
sst2: "@SST2@" #currently only 4 standard values are allowed 1,2,3,4
sd2: "@SD2@" # must be in HEX format
amfhost: "@HOST_AMF@" # "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94
n2IfName: "@N2IFNAME_CUCP@" # if multus.n2Interface.create is true then use n2
n2IfName: "@GNB_N2_IF_NAME@" # if multus.n2Interface.create is true then use n2
f1IfName: "f1c" # "eth0" #if multus.f1Interface.create is true then use f1
e1IfName: "@E1IFNAME@" # "eth0" #if multus.e1Interface.create is true then use e1
f1cuPort: "@F1CUPORT@"# "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
......
......@@ -61,8 +61,8 @@ data:
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "@CU_UP_N2_IP_ADDRESS@"; # "@N3_IP_ADDRESS@" _TO CHECK !_
GNB_IPV4_ADDRESS_FOR_NGU = "@CU_UP_N3_IP_ADDRESS@"; # "@N3_IP_ADDRESS@" _TO CHECK !_
GNB_IPV4_ADDRESS_FOR_NG_AMF = "@N3_IP_ADDRESS@"
GNB_IPV4_ADDRESS_FOR_NGU = "@N3_IP_ADDRESS@"
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
......
......@@ -114,15 +114,14 @@ spec:
args:
- CU_CP_IP_ADDRESS=$(getent hosts $CU_CP_HOST | awk '{print $1}');
CU_CP_IP_ADDRESS=$(if [[ $CU_CP_IP_ADDRESS ]]; then echo $CU_CP_IP_ADDRESS; else echo $CU_CP_HOST;fi)
CU_UP_IP_ADDRESS=$(/sbin/ip -f inet addr show $E1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
N3_IP_ADDRESS=$(/sbin/ip -f inet addr show $N3_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
F1_IP_ADDRESS=$(/sbin/ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
E1_IP_ADDRESS=$(/sbin/ip -f inet addr show $E1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
sed -e s/@N3_IP_ADDRESS@/$N3_IP_ADDRESS/g
CU_UP_IP_ADDRESS=$(ip -4 addr show $E1_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
N3_IP_ADDRESS=$(ip -4 addr show $N3_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
F1_IP_ADDRESS=$(ip -4 addr show $F1_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
sed -e s/@CU_CP_IP_ADDRESS@/$CU_CP_IP_ADDRESS/g
-e s/@CU_UP_IP_ADDRESS@/$CU_UP_IP_ADDRESS/g
-e s/@N3_IP_ADDRESS@/$N3_IP_ADDRESS/g
-e s/@F1_IP_ADDRESS@/$F1_IP_ADDRESS/g
-e s/@E1_IP_ADDRESS@/$E1_IP_ADDRESS/g
-e s/@CU_CP_IP_ADDRESS@/$CU_CP_IP_ADDRESS/g
-e s/@CU_UP_IP_ADDRESS@/$CU_UP_IP_ADDRESS/g
/opt/oai-gnb/etc/cuup.conf | tee /tmp/cuup.conf;
exec /opt/oai-gnb/bin/nr-cuup -O /tmp/cuup.conf $USE_ADDITIONAL_OPTIONS;
{{- else}}
......
......@@ -43,7 +43,7 @@ multus:
hostInterface: "@IF_NAME_CUUP_E1@" # "bond0" # Interface of the host machine on which this pod will be scheduled
n3Interface:
create: @MULTUS_CUUP_N3@
name: "n3"
name: "@GNB_N3_IF_NAME@"
ipAdd: "@IP_CUUP_N3@"
netmask: "@NETMASK_CUUP_N3@"
# if mac is empty then it will be removed
......@@ -78,7 +78,7 @@ config:
sst2: "@SST2@" #currently only 4 standard values are allowed 1,2,3,4
sd2: "@SD2@" # must be in HEX format
cuCpHost: "@HOST_CUCP@" # "oai-cu" #
n3IfName: "@N3IFNAME_CUUP@" # if multus.n3Interface.create is true then use n3 or eth0
n3IfName: "@GNB_N3_IF_NAME@" # if multus.n3Interface.create is true then use n3 or eth0
f1IfName: "f1u" # "eth0" #if multus.f1Interface.create is true then use f1
e1IfName: "@E1IFNAME@" # "eth0" #if multus.e1Interface.create is true then use e1
f1cuPort: "@F1CUPORT@" # "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
......
......@@ -58,8 +58,8 @@ data:
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "@GNB_N2_IP_ADDRESS@";
GNB_IPV4_ADDRESS_FOR_NGU = "@GNB_N3_IP_ADDRESS@";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "@N2_IP_ADDRESS@";
GNB_IPV4_ADDRESS_FOR_NGU = "@N3_IP_ADDRESS@";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
......
......@@ -116,13 +116,13 @@ spec:
args:
- AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}');
AMF_IP_ADDRESS=$(if [[ $AMF_IP_ADDRESS ]]; then echo $AMF_IP_ADDRESS; else echo $AMF_HOST;fi)
N2_IP_ADDRESS=$(/sbin/ip -f inet addr show $N2_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
N3_IP_ADDRESS=$(/sbin/ip -f inet addr show $N3_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
F1_IP_ADDRESS=$(/sbin/ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
sed -e s/@N2_IP_ADDRESS@/$N2_IP_ADDRESS/g
N2_IP_ADDRESS=$(ip -4 addr show $N2_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
N3_IP_ADDRESS=$(ip -4 addr show $N3_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
F1_IP_ADDRESS=$(ip -4 addr show $F1_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
sed -e s/@AMF_IP_ADDRESS@/$AMF_IP_ADDRESS/g
-e s/@N2_IP_ADDRESS@/$N2_IP_ADDRESS/g
-e s/@N3_IP_ADDRESS@/$N3_IP_ADDRESS/g
-e s/@F1_IP_ADDRESS@/$F1_IP_ADDRESS/g
-e s/@AMF_IP_ADDRESS@/$AMF_IP_ADDRESS/g
/opt/oai-gnb/etc/cu.conf | tee /tmp/cu.conf;
exec /opt/oai-gnb/bin/nr-softmodem -O /tmp/cu.conf $USE_ADDITIONAL_OPTIONS;
{{- else}}
......@@ -138,7 +138,7 @@ spec:
- name: OAI_GDBSTACKS
value: "1"
- name: AMF_HOST
value: {{ .Values.config.amfhost }}
value: {{ .Values.config.amfHost }}
- name: N2_IF_NAME
value: {{ .Values.config.n2IfName }}
- name: N3_IF_NAME
......
......@@ -43,7 +43,7 @@ multus:
n2Interface:
create: @MULTUS_CU_N2@
ipAdd: "@IP_CU_N2@"
name: "n2"
name: "@GNB_N2_IF_NAME@"
netmask: "@NETMASK_CU_N2@"
# if mac is empty then it will be removed
mac: "@MAC_CU_N2@"
......@@ -54,7 +54,7 @@ multus:
n3Interface:
create: @MULTUS_CU_N3@
ipAdd: "@IP_CU_N3@"
name: "n3"
name: "@GNB_N3_IF_NAME@"
netmask: "@NETMASK_CU_N3@"
# if mac is empty then it will be removed
mac: "@MAC_CU_N3@"
......@@ -78,9 +78,9 @@ config:
sd1: "@SD1@" # must be in HEX format
sst2: "@SST2@" #currently only 4 standard values are allowed 1,2,3,4
sd2: "@SD2@" # must be in HEX format
amfhost: "@HOST_AMF@" # "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94
n2IfName: "@N2IFNAME_CU@" # if multus.n2Interface.create is true then use n2
n3IfName: "@N3IFNAME_CU@" # if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0
amfHost: "@HOST_AMF@" # "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94
n2IfName: "@GNB_N2_IF_NAME@" # if multus.n2Interface.create is true then use n2
n3IfName: "@GNB_N3_IF_NAME@" # if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0
f1IfName: "f1" # "eth0" #if multus.f1Interface.create is true then use f1
f1cuPort: "@F1CUPORT@" # 2153 if using same interface for f1 and n3 else standard port 2152 should be used if f1 and n3 interface are different
f1duPort: "@F1DUPORT@" # 2153 if using same interface for f1 and n3 else standard port 2152 should be used if f1 and n3 interface are different
......
......@@ -137,7 +137,9 @@ spec:
protocol: SCTP
command: [ "/bin/bash", "-c" ]
args:
- N2_IP_ADDRESS=$(ip -4 addr show $N2_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
- AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}');
AMF_IP_ADDRESS=$(if [[ $AMF_IP_ADDRESS ]]; then echo $AMF_IP_ADDRESS; else echo $AMF_HOST;fi)
N2_IP_ADDRESS=$(ip -4 addr show $N2_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
N3_IP_ADDRESS=$(ip -4 addr show $N3_IF_NAME | grep inet | awk '{ print $2 }' | cut -d/ -f1);
RU1_IP_ADDRESS=$(ip -4 addr show ru1 | grep inet | awk '{ print $2 }' | cut -d/ -f1);
sed -e s/@AMF_IP_ADDRESS@/$AMF_IP_ADDRESS/g
......@@ -170,8 +172,8 @@ spec:
value: {{ .Values.config.timeZone }}
- name: USE_ADDITIONAL_OPTIONS
value: {{ .Values.config.useAdditionalOptions }}
- name: AMF_IP_ADDRESS
value: {{ .Values.config.amfIpAddress }}
- name: AMF_HOST
value: {{ .Values.config.amfHost }}
- name: N2_IF_NAME
value: {{ .Values.config.n2IfName }}
- name: N3_IF_NAME
......
......@@ -94,7 +94,7 @@ config:
tac: "@TAC@" # check the information with AMF
sst: "1" #currently only 4 standard values are allowed 1,2,3,4 # configured by demo-oai.sh script
usrp: "@RRU_TYPE@" #allowed values rfsim, b2xx, n3xx or x3xx
amfIpAddress: "@AMF_IP_ADDRESS@" # amf ip-address or service-name oai-amf-svc
amfHost: "@HOST_AMF@" # amf ip-address or service-name oai-amf-svc
n2IfName: "@GNB_N2_IF_NAME@" # n2 or eth0 if no multus
n3IfName: "@GNB_N3_IF_NAME@" # n3 or eth0 if no multus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment