aligungr / UERANSIM

Open source 5G UE and RAN (gNodeB) implementation.
GNU General Public License v3.0
791 stars 323 forks source link

Throughput of TUN & commercial cores #352

Open fefer opened 3 years ago

fefer commented 3 years ago

Hi,

Thank you for such a nice project!!

Don't know if you have tested it, but I am planning to test this repo over commercial 5G cores too. I'll keep you updated of the results. :)

Do you have plans to do the same for 4G?

Regarding the throughput, I was able to get an iperf of up to 500Mbps, which is awesome! However, when I tried to escalate over multiple UEs, I saw that the TUN was not able to get higher, I mean the total amount stayed around 500Mbps. Do you know is this is due to limitation over UERANSIM or TUN in general? My understanding is that the TUN is able to get more, as I have tested Open5GS (using TUN) with a real device and got up to 1Gbps.

Another point: is it possible to use a physical interface instead of a TUN? How would I achieve this? I thought maybe by changing the "src/utils/constants.hpp", but not quite sure if this would be enough. I am going to try in the meantime.

Once again, congrats for the project!!

BR

aligungr commented 3 years ago

Don't know if you have tested it, but I am planning to test this repo over commercial 5G cores too. I'll keep you updated of the results. :)

Thanks @fefer and I've tested UERANSIM with a single 5G commercial core network so far.

Do you have plans to do the same for 4G?

Unfortunately there is no such a plan because of the work load.

Do you know is this is due to limitation over UERANSIM or TUN in general

I think it's due to the limitation of UERANSIM's gNodeB, but actually I am not quite sure. Additional performance optimizations are planned in the roadmap in general.

Another point: is it possible to use a physical interface instead of a TUN

I think it's conceptually very difficult to properly inject packets to a physical interface. (But in general TUN interfaces are pretty much the same thing with physical interfaces in terms of performance.) Therefore UERANSIM only exposes TUN interfaces to utilize UE's internet connectivity.

Thanks

fefer commented 3 years ago

Thank you for your feedback @aligungr!

1- Would you be able to tell me which commercial core you have tested?

2- I am currently trying over a Huawei 5G and having trouble with the gNB:

root@ims-virtual-machine:/home/ims/UERANSIM/build# ./nr-gnb -c ../config/open5gs-gnb.yaml
UERANSIM v3.2.1
[2021-06-30 00:01:29.042] [sctp] [info] Trying to establish SCTP connection... (172.16.11.132:38412)
[2021-06-30 00:01:29.052] [sctp] [info] SCTP connection established (172.16.11.132:38412)
[2021-06-30 00:01:29.052] [sctp] [debug] SCTP association setup ascId[39]
[2021-06-30 00:01:29.052] [ngap] [debug] Sending NG Setup Request
[2021-06-30 00:01:29.063] [ngap] [debug] NG Setup Response received
[2021-06-30 00:01:29.063] [ngap] [info] NG Setup procedure is successful
[2021-06-30 00:03:18.351] [rrc] [debug] UE[1] new signal detected
root@ims-virtual-machine:/home/ims/UERANSIM/build# ./nr-ue -c ../config/open5gs-ue.yaml 
UERANSIM v3.2.1
[2021-06-30 00:03:18.350] [nas] [info] UE switches to state [MM-DEREGISTERED/PLMN-SEARCH]
[2021-06-30 00:03:18.351] [rrc] [debug] New signal detected for cell[1], total [1] cells in coverage
[2021-06-30 00:03:20.552] [nas] [error] No PLMN could be selected among [1] PLMNs
[2021-06-30 00:03:22.754] [nas] [error] No PLMN could be selected among [1] PLMNs
[2021-06-30 00:03:23.352] [rrc] [info] Selected cell plmn[724/03] tac[8101] category[ACCEPTABLE]
[2021-06-30 00:03:23.352] [nas] [info] UE switches to state [MM-DEREGISTERED/PS]
[2021-06-30 00:03:23.352] [nas] [info] UE switches to state [MM-DEREGISTERED/LIMITED-SERVICE]

Huawei.zip

I have no idea the reason :(

3- Regarding the 4G, do you know any similar project?

4- I´ve tried over ~40UEs and it seems to work pretty well, but increasing the number os UEs, like 100 seems to crash the gNB, is this expected?

Once again, thank you for such a nice project!! :)

aligungr commented 3 years ago

Thanks for the kind words. @fefer

Here's the relevant answers:

  1. I tested with the core network of a Turkish company i2i
  2. A possible reason can be mismatch of PLMN IDs. Please make sure that both the UE and the gNodeB are configured with the same PLMN ID.
  3. As far as I know srslte implements some minimal UE, eNodeB and EPC for 4G.
  4. Actually this is not expected, I will check this.
fefer commented 3 years ago

A possible reason can be mismatch of PLMN IDs. Please make sure that both the UE and the gNodeB are configured with the same PLMN ID.

True, I thought the same, but I believe 3GPP supports single gNB with a single PLMN and core with multiple PLMN. Is it possible to configure multiple PLMNs on UERANSIM? Tried a couple of combinations (separated by comma, quote, etc), but none of them works. In the meantime gonna check if its possible to configure the Huawei core with a single PLMN, if not...I can still check if the same occurs with similar config over Open5GS.

Last week I got up to 850Mbps using IPERF with TCP (without using internet). Curious thing, using Open5GS with a real device I was able to get to the internet with 930Mbps. Using UERANSIM connected to the same Open5GS core and with less hops than a real device I got ~100Mbps over the internet.

Actually this is not expected, I will check this.

Regarding the limitation, after testing the latest version, the code did not crash with 100 UEs, just a few of them is connecting the rest give me some error. Gonna check if this is something on Open5GS or UERANSIM. While is kind of nice to test a burst of UEs trying to connect at the same time, it would be nice to have a flag to have a delay...for example: let's say I want to connect 100 UEs, after the 10 first a delay of 1 second, and then another adds 10 more, etc.

Over the next weeks, I'll try to perform the tests and if I have sometime, I'll try to check code to check if I maybe I can give my 2 cents over this flag.

meena-devi commented 3 years ago

Hi @fefer

Have you succeeded configuring multiple PLMNs on UERANSIM and capture logs for the same?

If yes, please tell me the procedure. It will be highly appreciated.

Regards meena-devi