Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
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-RAN
Commits
4ff57bdd
Commit
4ff57bdd
authored
Jul 15, 2026
by
Yan Kuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add GNB_IPV4_ADDRESS_FOR_NGU_EXTERNAL
parent
5de8d669
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
58 additions
and
11 deletions
+58
-11
executables/nr-softmodem.c
executables/nr-softmodem.c
+1
-0
openair2/COMMON/e1ap_messages_types.h
openair2/COMMON/e1ap_messages_types.h
+2
-0
openair2/E1AP/e1ap.c
openair2/E1AP/e1ap.c
+8
-1
openair2/E1AP/e1ap_setup.c
openair2/E1AP/e1ap_setup.c
+15
-2
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+1
-0
openair2/GNB_APP/gnb_config_ng.c
openair2/GNB_APP/gnb_config_ng.c
+1
-0
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+3
-1
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+17
-0
openair3/ocp-gtpu/gtp_itf.h
openair3/ocp-gtpu/gtp_itf.h
+2
-0
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.273PRB.oxgrf.conf
...S/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.273PRB.oxgrf.conf
+8
-7
No files found.
executables/nr-softmodem.c
View file @
4ff57bdd
...
...
@@ -232,6 +232,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
uint32_t
gnb_port_for_NGU
=
0
;
char
*
gnb_ipv4_address_for_S1U
=
NULL
;
uint32_t
gnb_port_for_S1U
=
0
;
char
*
gnb_ipv4_address_for_NGU_external
=
NULL
;
paramdef_t
NETParams
[]
=
GNBNETPARAMS_DESC
;
char
aprefix
[
MAX_OPTNAME_SIZE
*
2
+
8
];
sprintf
(
aprefix
,
"%s.[%i].%s"
,
GNB_CONFIG_STRING_GNB_LIST
,
0
,
GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG
);
...
...
openair2/COMMON/e1ap_messages_types.h
View file @
4ff57bdd
...
...
@@ -187,6 +187,8 @@ typedef struct {
char
*
localAddressF1U
;
uint16_t
localPortF1U
;
char
*
localAddressN3
;
/* Optional: address advertised to CN/UPF (e.g. public IP behind NAT). If NULL, localAddressN3 is used. */
char
*
externalAddressN3
;
uint16_t
localPortN3
;
uint16_t
remotePortN3
;
}
e1ap_net_config_t
;
...
...
openair2/E1AP/e1ap.c
View file @
4ff57bdd
...
...
@@ -553,7 +553,14 @@ void cuup_init_n3(instance_t instance)
strcpy
(
tmp
.
originHost
,
nc
->
localAddressN3
);
sprintf
(
tmp
.
originService
,
"%d"
,
nc
->
localPortN3
);
sprintf
(
tmp
.
destinationService
,
"%d"
,
nc
->
remotePortN3
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s, port : %s
\n
"
,
tmp
.
originHost
,
tmp
.
originService
);
if
(
nc
->
externalAddressN3
!=
NULL
&&
nc
->
externalAddressN3
[
0
]
!=
'\0'
)
strncpy
(
tmp
.
advertiseHost
,
nc
->
externalAddressN3
,
sizeof
(
tmp
.
advertiseHost
)
-
1
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s, port : %s%s%s
\n
"
,
tmp
.
originHost
,
tmp
.
originService
,
tmp
.
advertiseHost
[
0
]
?
", advertise : "
:
""
,
tmp
.
advertiseHost
[
0
]
?
tmp
.
advertiseHost
:
""
);
// Fixme: fully inconsistent instances management
// dirty global var is a bad fix
extern
instance_t
legacyInstanceMapping
;
...
...
openair2/E1AP/e1ap_setup.c
View file @
4ff57bdd
...
...
@@ -14,13 +14,14 @@
#include "common/config/config_paramdesc.h"
#include "common/config/config_userapi.h"
static
void
get_NGU_S1U_addr
(
char
**
addr
,
uint16_t
*
port
)
static
void
get_NGU_S1U_addr
(
char
**
addr
,
uint16_t
*
port
,
char
**
external_addr
)
{
int
num_gnbs
=
0
;
char
*
gnb_ipv4_address_for_NGU
=
NULL
;
uint32_t
gnb_port_for_NGU
=
0
;
char
*
gnb_ipv4_address_for_S1U
=
NULL
;
uint32_t
gnb_port_for_S1U
=
0
;
char
*
gnb_ipv4_address_for_NGU_external
=
NULL
;
// get gNB params
GET_PARAMS
(
GNBSParams
,
GNBSPARAMS_DESC
,
NULL
);
...
...
@@ -48,6 +49,18 @@ static void get_NGU_S1U_addr(char **addr, uint16_t *port)
if
(
strchr
(
address
,
'/'
))
*
strchr
(
address
,
'/'
)
=
0
;
*
addr
=
address
;
*
external_addr
=
NULL
;
if
(
gnb_ipv4_address_for_NGU_external
!=
NULL
&&
gnb_ipv4_address_for_NGU_external
[
0
]
!=
'\0'
)
{
char
*
ext
=
strdup
(
gnb_ipv4_address_for_NGU_external
);
if
(
strchr
(
ext
,
'/'
))
*
strchr
(
ext
,
'/'
)
=
0
;
*
external_addr
=
ext
;
LOG_I
(
GTPU
,
"NG-U external/advertise address: %s (bind: %s)
\n
"
,
ext
,
address
);
}
else
{
*
external_addr
=
address
;
LOG_I
(
GTPU
,
"NG-U external/advertise address is not set, using NG-U IPv4 address: %s(bind: %s)
\n
"
,
address
,
address
);
}
return
;
}
...
...
@@ -114,7 +127,7 @@ MessageDef *RCconfig_NR_CU_E1(const E1_t *entity)
e1ap_nc
->
remotePortF1U
=
*
(
GNBParamList
.
paramarray
[
0
][
GNB_REMOTE_S_PORTD_IDX
].
uptr
);
e1ap_nc
->
localAddressF1U
=
strdup
(
*
(
GNBParamList
.
paramarray
[
0
][
GNB_LOCAL_S_ADDRESS_IDX
].
strptr
));
e1ap_nc
->
localPortF1U
=
*
(
GNBParamList
.
paramarray
[
0
][
GNB_LOCAL_S_PORTD_IDX
].
uptr
);
get_NGU_S1U_addr
(
&
e1ap_nc
->
localAddressN3
,
&
e1ap_nc
->
localPortN3
);
get_NGU_S1U_addr
(
&
e1ap_nc
->
localAddressN3
,
&
e1ap_nc
->
localPortN3
,
&
e1ap_nc
->
externalAddressN3
);
e1ap_nc
->
remotePortN3
=
e1ap_nc
->
localPortN3
;
AssertFatal
(
config_isparamset
(
gnbParms
,
GNB_GNB_ID_IDX
),
"%s is not defined in configuration file
\n
"
,
GNB_CONFIG_STRING_GNB_ID
);
...
...
openair2/GNB_APP/gnb_config.c
View file @
4ff57bdd
...
...
@@ -2385,6 +2385,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
uint32_t
gnb_port_for_NGU
=
0
;
char
*
gnb_ipv4_address_for_S1U
=
NULL
;
uint32_t
gnb_port_for_S1U
=
0
;
char
*
gnb_ipv4_address_for_NGU_external
=
NULL
;
/* Some default/random parameters */
X2AP_REGISTER_ENB_REQ
(
msg_p
).
eNB_id
=
gnb_id
;
...
...
openair2/GNB_APP/gnb_config_ng.c
View file @
4ff57bdd
...
...
@@ -21,6 +21,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i)
uint32_t
gnb_port_for_NGU
=
0
;
char
*
gnb_ipv4_address_for_S1U
=
NULL
;
uint32_t
gnb_port_for_S1U
=
0
;
char
*
gnb_ipv4_address_for_NGU_external
=
NULL
;
GET_PARAMS
(
GNBSParams
,
GNBSPARAMS_DESC
,
NULL
);
AssertFatal
(
i
<
GNBSParams
[
GNB_ACTIVE_GNBS_IDX
].
numelt
,
...
...
openair2/GNB_APP/gnb_paramdef.h
View file @
4ff57bdd
...
...
@@ -602,6 +602,7 @@ typedef enum {
#define GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF "GNB_IPV4_ADDRESS_FOR_NG_AMF"
#define GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU "GNB_IPV4_ADDRESS_FOR_NGU"
#define GNB_CONFIG_STRING_GNB_PORT_FOR_NGU "GNB_PORT_FOR_NGU"
#define GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU_EXTERNAL "GNB_IPV4_ADDRESS_FOR_NGU_EXTERNAL"
/* X2 interface configuration parameters names */
#define GNB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C "GNB_IPV4_ADDRESS_FOR_X2C"
...
...
@@ -618,7 +619,8 @@ typedef enum {
{GNB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, .uptr=NULL, .defintval=0L, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1U, NULL, 0, .strptr=&gnb_ipv4_address_for_S1U, .defstrval="127.0.0.1",TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_PORT_FOR_S1U, NULL, 0, .uptr=&gnb_port_for_S1U, .defintval=2152L, TYPE_UINT, 0} \
{GNB_CONFIG_STRING_GNB_PORT_FOR_S1U, NULL, 0, .uptr=&gnb_port_for_S1U, .defintval=2152L, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU_EXTERNAL, NULL, 0, .strptr=&gnb_ipv4_address_for_NGU_external, .defstrval=NULL, TYPE_STRING, 0} \
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
...
...
openair3/ocp-gtpu/gtp_itf.cpp
View file @
4ff57bdd
...
...
@@ -586,6 +586,23 @@ static int udpServerSocket(openAddr_s addr)
return
-
1
;
}
/* Optionally override the address advertised in GTP tunnel setup (e.g. public IP behind NAT) */
if
(
addr
.
advertiseHost
[
0
]
!=
'\0'
)
{
struct
in_addr
adv4
;
if
(
inet_pton
(
AF_INET
,
addr
.
advertiseHost
,
&
adv4
)
==
1
)
{
memcpy
(
globGtp
.
instances
[
sockfd
].
foundAddr
,
&
adv4
.
s_addr
,
sizeof
(
adv4
.
s_addr
));
globGtp
.
instances
[
sockfd
].
foundAddrLen
=
sizeof
(
adv4
.
s_addr
);
globGtp
.
instances
[
sockfd
].
ipVersion
=
4
;
LOG_I
(
GTPU
,
"GTP bind %s:%s, advertise Transport Layer Address %s
\n
"
,
addr
.
originHost
,
addr
.
originService
,
addr
.
advertiseHost
);
}
else
{
LOG_E
(
GTPU
,
"Invalid advertiseHost '%s', keeping bind address for tunnel endpoints
\n
"
,
addr
.
advertiseHost
);
}
}
int
sendbuff
=
1000
*
1000
*
10
;
AssertFatal
(
0
==
setsockopt
(
sockfd
,
SOL_SOCKET
,
SO_SNDBUF
,
&
sendbuff
,
sizeof
(
sendbuff
)),
""
);
LOG_D
(
GTPU
,
...
...
openair3/ocp-gtpu/gtp_itf.h
View file @
4ff57bdd
...
...
@@ -69,6 +69,8 @@ typedef struct gtpv1u_gnb_delete_tunnel_req_s gtpv1u_gnb_delete_tunnel_req_t;
char
originService
[
HOST_NAME_MAX
];
char
destinationHost
[
HOST_NAME_MAX
];
char
destinationService
[
HOST_NAME_MAX
];
/* Optional: if set, used as Transport Layer Address in tunnel setup (bind still uses originHost) */
char
advertiseHost
[
HOST_NAME_MAX
];
instance_t
originInstance
;
}
openAddr_t
;
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.273PRB.oxgrf.conf
View file @
4ff57bdd
...
...
@@ -135,10 +135,10 @@ gNBs =
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity
=
5
;
nrofDownlinkSlots
=
3
;
dl_UL_TransmissionPeriodicity
=
6
;
nrofDownlinkSlots
=
7
;
nrofDownlinkSymbols
=
6
;
nrofUplinkSlots
=
1
;
nrofUplinkSlots
=
2
;
nrofUplinkSymbols
=
4
;
ssPBCH_BlockPower
= -
25
;
...
...
@@ -157,13 +157,14 @@ gNBs =
//////////
AMF
parameters
:
amf_ip_address
= ({
ipv4
=
"1
72.11.200.14
"
; });
amf_ip_address
= ({
ipv4
=
"1
8.119.182.0
"
; });
NETWORK_INTERFACES
:
{
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"172.11.200.1/24"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"172.11.200.1/24"
;
GNB_IPV4_ADDRESS_FOR_NG_AMF
=
"192.168.199.102/24"
;
GNB_IPV4_ADDRESS_FOR_NGU
=
"192.168.199.102/24"
;
GNB_IPV4_ADDRESS_FOR_NGU_EXTERNAL
=
"111.198.54.3"
;
GNB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
...
...
@@ -204,7 +205,7 @@ RUs = (
eNB_instances
= [
0
];
sl_ahead
=
2
;
#clock_src = "internal";
sdr_addrs
=
"dev=pciex:0,auxdac1=1
48
8"
;
sdr_addrs
=
"dev=pciex:0,auxdac1=1
62
8"
;
}
);
...
...
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