Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can I use -n to create multiple UEs, but send an authentication request every few seconds? #469

Open
liuwei-network opened this issue Jan 8, 2022 · 17 comments

Comments

@liuwei-network
Copy link

Hi,

Can I use -n to create multiple UEs, but send an authentication request every few seconds? I found that sending more than 30 authentication requests at the same time would crash UDM.

Where should I start to make changes?

Best regards.

@liuwei-network liuwei-network changed the title I can use -n to create multiple UEs, but send an authentication request every few seconds? Can I use -n to create multiple UEs, but send an authentication request every few seconds? Jan 8, 2022
@aligungr
Copy link
Owner

aligungr commented Jan 8, 2022

Hi

It's not possible to delay the authentication when using -n command.

But you can run different nr-ue processeses with a Linux sleep command.

@liuwei-network
Copy link
Author

Hi,@aligungr
Thanks for reply.
That's what I'm currently doing, but this faces system resource issues:
sudo unable to fork resource temporarily unavailable

Here is my script, I create a ue process every ten seconds.

for((i=1;i<10000;i=i+15))
do
	s=`printf "%04d" $i`
	cmd1="/home/wei/testbed/UERANSIM/build/nr-ue -c /home/wei/testbed/UERANSIM/config/open5gs-ue.yaml -i imsi-90170000000"
	cmd="${cmd1}${s} -n 15 &"
	eval $cmd
	sleep 10
done

I changed the ulimit max user processes and open files, but it didn't alleviate the problem...

@liuwei-network
Copy link
Author

Here is screenshot of program.

Screenshot from 2022-01-08 16-44-20

@liuwei-network
Copy link
Author

Btw, I think it might be more important to send the authentication request in stages. If the number of -n is large, almost no open source 5g core can handle so many authentication requests at the same time.

@aligungr
Copy link
Owner

aligungr commented Jan 9, 2022

@VLiu7 You can bypass the TUN configuration in UE side by starting the UE with: nr-ue --no-route-config. I wonder if that fixes the problem in the screenshot.

@noormohammedli
Copy link

noormohammedli commented Mar 14, 2022

@VLiu7
Hello,
Did you fix the issue?
I need to run multiple UEs at the same time.
I run your code

#!/bin/bash
for((i=1;i<100;i=i+15))
do
s=printf "%04d" $i
cmd1="sudo build/nr-ue -c config/free5gc-uen10.yaml -i imsi-2089300000000"
#cmd="${cmd1}${s} -n 15 &"
eval $cmd1
sleep 10
done

But I get this error
ERROR: invalid IMSI value

In my free5gc-uen10.yaml the be link this :>>>
supi: 'imsi-208930000000001'

Is that right?

Thanks

@liuwei-network
Copy link
Author

Hi @noormohammedli
I think you should remove 208 and make sure the imsi is in your DB.

@noormohammedli
Copy link

noormohammedli commented Mar 16, 2022

Hello @VLiu7,

Thank you,

I have this in my DB " imsi-208930000000001"

I can run it but when i try to add multi UE same time i get an error.

when i try to do link this " sudo build/nr-ue -c config/free5gc-uen10.yaml -n 20" i got time expire.

I can run 7 users individually, but i need them to run from the file.

Thanks,

@liuwei-network
Copy link
Author

Hi, @noormohammedli

In fact, I'm not sure what problem you have, can you send me your test script and error log?

Did you make sure that all imsi you want to run are in the DB, not just the one in the config file?
As far as I know, free5gc doesn't give a script to insert imsi in batches, I'm not sure if you've done that.

Did you have same error with open5gs?

If all imsi are in DB, let's see the error log.

@noormohammedli
Copy link

Hello,
I do not think i have error in 5G core i can run 7 uses individual, they are working fine but when i try to add multi UE same time i get an error.

error when i run 10 ue at the same time.zip

this is my log files

Thanks

@liuwei-network
Copy link
Author

Sorry, I would like to help you but it is more than I can handle.
@aligungr Dear author, could you please help @noormohammedli fix that?
Thanks!

@aligungr
Copy link
Owner

Hello @noormohammedli There is a core network problem according to your files. It looks like AMF crashes in your scenario.

@elrandira
Copy link

You can eventually add a sleep in the loop that triggers all the UE registers in the code.

in src/ue.cpp at the very end of the file:
g_ueMap.invokeForeach([](const auto &ue) { ue.second->start(); sleep(3);});

Don't forget to include the standard library at the top:
#include <stdlib.h>

This is what we did on our side.

@noormohammedli
Copy link

Hello @elrandira,

Thanks for your comment.

I put this line at the end of the main function but i get this error when i built the UERANSIM.

Screenshot 2022-04-13 at 12 06 20 am

Thanks

@elrandira
Copy link

I don't understand your error. This method is part of the code you retrieved on github, it shouldn't fail.

Did you make more modifications that the sleep and the stdlib import? Maybe retry from the start.

@noormohammedli
Copy link

Hello @elrandira

Thanks for the replay,

Screenshot 2022-04-19 at 12 31 36 pm

I have this code in the last part of the file, I put the sleep as in the image i think your commands if for the new version of the code, I will update the code and let you know.

Thanks for your help and support,
Noor

@elrandira
Copy link

elrandira commented Apr 19, 2022

Yes, on the latest version it would look like this:

g_ueMap.invokeForeach([](const auto &ue) { ue.second->start(); sleep(10);});

aligungr added a commit that referenced this issue May 20, 2022
issue #469 - Add a tempo between two UE registrations
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants