enb: add optional gtp_bind_addr paramter to enb class
this allows to optionally specify a the GTP bind_address for a enb object in the resources.conf this address is then used for binding the listening socket for gtp connections which, in turn, allows to run the enb and epc on the same host. when gtp_bind_addr is not specified, addr is used by default this is especially useful if eNB and EPC run on the same host and ZMQ is used for RF between eNB and UE. Two eNB addresses are needed in this case, one bind address and one "remote-accessable" address for the UEs ZMQ radio to connect to Change-Id: I4fe38f31401428ed3e74e1d0b64960f0af122d37
This commit is contained in:
parent
0e6ab424a4
commit
4b5a09a83c
|
@ -32,6 +32,9 @@ class eNodeB(log.Origin, metaclass=ABCMeta):
|
|||
self._addr = conf.get('addr', None)
|
||||
if self._addr is None:
|
||||
raise log.Error('addr not set')
|
||||
self._gtp_bind_addr = conf.get('gtp_bind_addr', None)
|
||||
if self._gtp_bind_addr is None:
|
||||
self._gtp_bind_addr = self._addr
|
||||
self.set_name('%s_%s' % (name, self._addr))
|
||||
self._txmode = 0
|
||||
self._num_prb = 0
|
||||
|
@ -52,6 +55,7 @@ class eNodeB(log.Origin, metaclass=ABCMeta):
|
|||
config.overlay(values, dict(enb={ 'num_ports': self.num_ports() }))
|
||||
assert self._epc is not None
|
||||
config.overlay(values, dict(enb={ 'mme_addr': self._epc.addr() }))
|
||||
config.overlay(values, dict(enb={ 'gtp_bind_addr': self._gtp_bind_addr }))
|
||||
return values
|
||||
|
||||
def num_ports(self):
|
||||
|
|
|
@ -88,6 +88,7 @@ RESOURCES_SCHEMA = {
|
|||
'enb[].type': schema.STR,
|
||||
'enb[].remote_user': schema.STR,
|
||||
'enb[].addr': schema.IPV4,
|
||||
'enb[].gtp_bind_addr': schema.IPV4,
|
||||
'enb[].num_prb': schema.UINT,
|
||||
'enb[].transmission_mode': schema.LTE_TRANSMISSION_MODE,
|
||||
'enb[].num_cells': schema.UINT,
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
],
|
||||
/* GTP bind address (=address of the ethernet interface connected to
|
||||
the MME). Must be modified if the MME runs on a different host. */
|
||||
gtp_addr: "${enb.addr}",
|
||||
gtp_addr: "${enb.gtp_bind_addr}",
|
||||
|
||||
/* high 20 bits of SIB1.cellIdentifier */
|
||||
enb_id: 0x19B,
|
||||
|
|
|
@ -23,7 +23,7 @@ enb_id = 0x19B
|
|||
mcc = ${enb.mcc}
|
||||
mnc = ${enb.mnc}
|
||||
mme_addr = ${enb.mme_addr}
|
||||
gtp_bind_addr = ${enb.addr}
|
||||
gtp_bind_addr = ${enb.gtp_bind_addr}
|
||||
s1c_bind_addr = ${enb.addr}
|
||||
n_prb = ${enb.num_prb}
|
||||
tm = ${enb.transmission_mode}
|
||||
|
|
Loading…
Reference in New Issue