[srslte-users] LTE SPGW /30 ip addressing woes
Roderick Groesbeek
R.Groesbeek at wearetriple.com
Sun Jul 28 21:20:56 UTC 2019
Hi list,
I have a setup like
EPC&ENB <----> 4x Sierra Wireless 7455 modem
We retrieve the 4x IP's on UE side via "dhclient".
But I experience the following (I think) DHCLIENT behavior:
* /30 subnet rollouts
* /29 subnet rollouts
My guess is that dhclient configures a /30 and allocates 1 Gateway, and 1 Client IP address, where
the SPGW just allocates 1 ip to the UE, never minding the Gateway IP that dhclient also provisions.
(For connection #1 the Gateway IP, can be given out as a client IP on Connection #2)
Resume:
=======
So if you rollout multiple LTE connections on 1 host, you could get routing and subnetting problems.
* Ip conflicts
* Subnetting translation problems
What would be the best rollout/solution/fix for this?
Maybe rollout only static ip addressing and then modulo 2?
I see the code for generating a new IP is pretty straightforward, and do not expect a bug there..
in_addr_t spgw::gtpc::get_new_ue_ipv4(uint64_t imsi)
{
struct in_addr ue_addr;
std::map<uint64_t, struct in_addr>::const_iterator iter = m_imsi_to_ip.find(imsi);
if (iter != m_imsi_to_ip.end()) {
ue_addr = iter->second;
m_gtpc_log->info("SPGW: get_new_ue_ipv4 static ip addr %s\n", inet_ntoa(ue_addr));
} else {
if (m_ue_ip_addr_pool.empty()) {
m_gtpc_log->error("SPGW: ue address pool is empty\n");
ue_addr.s_addr = 0;
} else {
ue_addr.s_addr = *m_ue_ip_addr_pool.begin();
m_ue_ip_addr_pool.erase(ue_addr.s_addr);
m_gtpc_log->info("SPGW: get_new_ue_ipv4 pool ip addr %s\n", inet_ntoa(ue_addr));
}
}
return ue_addr.s_addr;
}
What would be the best setup to avoid this subnet/ip conflicting?
Is there a way to keep it dynamic but more controlling on the ENB side?
GR,
RG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.srsran.com/pipermail/srsran-users/attachments/20190728/1f33437d/attachment.htm>
More information about the srsran-users
mailing list