HewlettPackard / PacketRusher

High performance 5G UE/gNB Simulator and CP/UP load tester.
Apache License 2.0
109 stars 25 forks source link

How to trigger XN handover #62

Closed LiuYu97 closed 9 months ago

LiuYu97 commented 9 months ago

I want to know how to create two gnb

corenet@corenet-virtual-machine:~/PacketRusher$ sudo ./packetrusher multi-ue -n 1 --xnh 1000 INFO[0000] Loaded config at: /home/corenet/PacketRusher/config/config.yml INFO[0000] PacketRusher version 1.0.1
INFO[0000] ---------------------------------------
INFO[0000] [TESTER] Starting test function: Testing registration of multiple UEs INFO[0000] [TESTER][UE] Number of UEs: 1
INFO[0000] [TESTER][GNB] gNodeB control interface IP/Port: 10.103.238.161/38412 INFO[0000] [TESTER][GNB] gNodeB data interface IP/Port: 10.103.238.161/2152 INFO[0000] [TESTER][AMF] AMF IP/Port: 10.103.239.31/38412 INFO[0000] ---------------------------------------
WARN[0000] [TESTER] We are increasing the number of gNodeB to two for handover test cases. Make you sure you fill the requirements for having two gNodeBs. INFO[0000] [GNB] SCTP/NGAP service is running
INFO[0000] [GNB] Initiating NG Setup Request
FATA[0000] Error incannot assign requested address image

linouxis9 commented 9 months ago

Hi @LiuYu97,

Thanks for using PacketRusher :-)

To use Xn Handover with the command and the configuration you mentioned, you need to have both 10.103.238.159 and 10.103.238.160 IP address configured on your virtual machine. Can you try adding 10.103.238.160 as the second IP of your VM's Ethernet interface and see if it works? eg. sudo ip addr add 10.103.238.160 dev <INTERFACE> where is the interface with the 10.103.238.159 IP. Make sure 10.103.238.160 is not used by another of your VM as well.

When you use PacketRusher Xn Handover feature, the second gNodeB will automatically use the IP next to the one configured for the first gNodeB (eg. 10.103.238.159 in your config.yml).

We'll try to improve this so the second gNodeB can be configured from the config.yml, we'll also make the error "Error incannot assign requested address" clearer in what IP it was unable to bind to. (cc: @Raguideau)

Thanks a lot! Valentin

LiuYu97 commented 9 months ago

In my VM, there are two network interfaces, and the IP are 10.103.238.159 and 10.103.238.161 respectively. Can you give me 'config.yml' demo for Xn handover?

image

linouxis9 commented 9 months ago

You cannot add two gNodeB in the config for now, you must have only a single gNodeB: https://github.com/HewlettPackard/PacketRusher/blob/main/config/config.yml When using the --xnh or the --ngh option, PacketRusher automatically creates a second gNodeB with the same configuration as the first gNodeB, but with the first IP next to the first gNodeB: if the first gNodeB has IP 10.103.238.159, the second gNodeB created automatically by PacketRusher will have IP 10.103.238.160 and this cannot be configured differently for now.

Using the configuration I shared, the first gNodeB will have IP 192.168.11.13, and the second gNodeB will automatically have 192.168.11.14.

As such, I would recommend you to use two sequential IP for your two network interfaces.

Thanks and cheers! Valentin

LiuYu97 commented 9 months ago

I think i have understood, thank you very much for your response. Thank you.

linouxis9 commented 9 months ago

Great to hear! Feel free to reopen an issue if you need help with something else :-)