Borjis131 / docker-open5gs

Open5GS 5G Core Docker images and Docker compose deployments
GNU Affero General Public License v3.0
30 stars 15 forks source link

multi-ue problem roaming scenario #13

Open paaszti opened 1 week ago

paaszti commented 1 week ago

I have an issue about using multi UEs. My docker-compose file:

  packetrusher:
    container_name: packetrusher
    image: "ghcr.io/borjis131/packetrusher:main"
    command: "--config /PacketRusher/config/packetrusher.yaml multi-ue -n 5 --tunnel --dedicatedGnb"
    networks:
      open5gs:
        aliases:
          - gnb.packetrusher.org
    configs:
      - source: packetrusher_config
        target: /PacketRusher/config/packetrusher.yaml
    privileged: true
    cap_add:
      - ALL
    depends_on:
      - v-amf

Logs from packetrusher:

time="2024-10-09T13:25:37Z" level=info msg="Selecting 10.33.33.12 for host amf.5gc.mnc070.mcc999.3gppnetwork.org as AMF's IP address"
time="2024-10-09T13:25:37Z" level=info msg="Selecting 10.33.33.19 for host gnb.packetrusher.org as gNodeB's N3/Data IP address"
time="2024-10-09T13:25:37Z" level=info msg="Selecting 10.33.33.19 for host gnb.packetrusher.org as gNodeB's N2/Control IP address"
time="2024-10-09T13:25:37Z" level=info msg="Loaded config at: /PacketRusher/config/packetrusher.yaml"
time="2024-10-09T13:25:37Z" level=info msg="PacketRusher version 1.0.1"
time="2024-10-09T13:25:37Z" level=info msg=---------------------------------------
time="2024-10-09T13:25:37Z" level=info msg="[TESTER] Starting test function: Testing registration of multiple UEs"
time="2024-10-09T13:25:37Z" level=info msg="[TESTER][UE] Number of UEs: 5"
time="2024-10-09T13:25:37Z" level=info msg="[TESTER][GNB] gNodeB control interface IP/Port: 10.33.33.19/38412~"
time="2024-10-09T13:25:37Z" level=info msg="[TESTER][GNB] gNodeB data interface IP/Port: 10.33.33.19/2152"
time="2024-10-09T13:25:37Z" level=info msg="[TESTER][AMF] AMF IP/Port: 10.33.33.12/38412"
time="2024-10-09T13:25:37Z" level=info msg=---------------------------------------
time="2024-10-09T13:25:37Z" level=info msg="[GNB] SCTP/NGAP service is running"
time="2024-10-09T13:25:37Z" level=info msg="[GNB] Initiating NG Setup Request"
time="2024-10-09T13:25:37Z" level=fatal msg="Error incannot assign requested address"

This time I have added UEs to the database
Best regards

Borjis131 commented 6 days ago

Hi @paaszti, I did not test this setup but I think I know the problem.

When you are using PacketRusher with the multi-ue option and using the --tunnel and --dedicatedGnb flags, PacketRusher tries to create a gNB per each UE you are giving on the multi-ue -nflag, in your case 5. For this PacketRusher grabs the IP that you gave it on the config file (e.g. 10.33.33.19) and uses it for the first gNB and then uses the next IP address (e.g. 10.33.33.20) for the next gNB, and so on.

So it is a bit tricky to configure this on Docker without creating multiple networks and even if you did that it would be a mess because PacketRusher is expecting to use the next IP address.

For this particular scenario that you need 5 UEs and PacketRusher will create 5 gNBs for them I would suggest to modify the docker-compose.yaml file and add 5 packetrusher containers each one with its own IP address and all. That way you will have the same effect on the network.

Hope this helps!