Borjis131/docker-ueransim

How can I change my configuration?

Closed this issue · 8 comments

I followed the steps but get the error shown in the picture.

  1. vi /docker-ueransim/configs

amfConfigs:

  • address: 192.168.100.50
    port: 38412

AMF is in a different VM, so I modified the IP

  1. docker buildx bake

  2. docker run --name gnb gnb:v3.2.6

image

The configuration doesn't seem to change inside the container.

Hello @ChoB100, this repository only contains the necessary files to build the container images for UERANSIM.

To change the configuration you need to override the CMD that is running.

If you are using Docker Compose you can look at this example.

If you are using Docker as you showed in your question, then mount the configuration file that you want to use as a volume and override the CMD like this:

docker run --name gnb gnb:v3.2.6 -c /path/to/your/mounted/config.yaml

With your help, we are gradually solving the problem.

docker run --name gnb -v ./configs/gnb.yaml:/UERANSIM/config/gnb.yaml gnb:v3.2.6 -c /UERANSIM/config/gnb.yaml

I'm configuring my testbed with your open source.

VM1 (Core): docker-open5gs
VM2 (gNB): docker-ueransim
VM3 (UE): docker-ueransim

However, I'm getting the following error

image

I will try to solve it in my time, thank you.

Hi @ChoB100, I am not a 100% sure but I think that if you want your container to have an IP address in an specific subnet you first need to create a Docker network and then assign an IP address from that network.

Try this:

# Create the Docker network called <your_network_name>
docker network create --subnet=192.168.100.0/24 <your_network_name>

# Assign an IP address from <your_network_name> to the gNB container
docker run --name gnb --net <your_network_name> --ip 192.168.100.50 -v ./configs/gnb.yaml:/UERANSIM/config/gnb.yaml gnb:v3.2.6 -c /UERANSIM/config/gnb.yaml

I usually use Docker Compose because all of this seems easier using it, just configure it in a docker-compose.yaml file and run all the containers there.

Hope it helps!

Hi @Borjis131, I did the following tests as follows.

1. build utilizing docker-open5gs open source

I used the network-slicing configuration file and docker-compose.yaml.

The core network works fine and I can connect the gNB and UE.

However, when the UE (container) sends a ping to 8.8.8.8, it is not encapsulated in a GTP packet, and the gNB receives the error shown in the figure regarding GTP.

image

2. build utilizing docker-ueransim open source

When I assigned linkIP, ngapIP, and gtpIP as gNB container IP in gNB.yaml, the other errors disappeared and only SCTP error occurred.

mcc: '001'
mnc: '01'

nci: '0x000000010'
idLength: 32
tac: 1

linkIp: 172.17.0.2
ngapIp: 172.17.0.2
gtpIp: 172.17.0.2

amfConfigs:
  - address: 192.168.100.50
    port: 38412

slices:
  - sst: 1

ignoreStreamIds: true
image

My guess is that implementing IP routing between host and containers will solve it. I'll need some more time for it.

Hi @ChoB100, I am not understanding your current setup.

If you are using the Docker Compose deployment called network slicing from the docker-open5gs project you should get everything configured right out of the box, the deployment starts a gNB and two UEs.

To check if they are working just run:

# To see the realtime logs of the UERANSIM gNB
docker logs -f gnb

# To see the realtime logs of the UERANSIM UEs
docker logs -f ue1
# or
docker logs -f ue2

Also, I am not understanding why you are executing the ./nr-gnb command. It gets automatically executed when you start the deployment. You can see everything here

If you are getting any error, please check that you are using the latest docker-open5gs version.

I understood your advice, I was getting the error because I was running a duplicate command in an already running gNB container.

So I use docker-open5gs again to build.

ue1 looks fine, but I get the error in ue2.

[2024-06-07 08:35:47.322] [nas] [debug] Aborting SM procedure for PTI[1], PSI[1]
[2024-06-07 08:35:47.941] [nas] [debug] Sending PDU Session Establishment Request
[2024-06-07 08:35:47.941] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2024-06-07 08:35:47.943] [nas] [error] SM forwarding failure for message type[193] with cause[PAYLOAD_NOT_FORWARDED]
[2024-06-07 08:35:47.943] [nas] [debug] Aborting SM procedure for PTI[1], PSI[1]

I will also send you the smf2 logs and upf2 logs.

  • smf2 logs
Open5GS daemon v2.7.1

06/07 08:19:26.833: [app] INFO: Configuration: '/etc/open5gs/custom/smf2.yaml' (../lib/app/ogs-init.c:133)
06/07 08:19:26.833: [app] INFO: File Logging: '/var/log/open5gs/smf.log' (../lib/app/ogs-init.c:136)
06/07 08:19:26.937: [sock] ERROR: getaddrinfo(0:smf2.open5gs.orgg:8805:0x0) failed (../lib/core/ogs-sockaddr.c:116)
06/07 08:19:26.937: [pfcp] FATAL: ogs_pfcp_context_parse_config: Assertion `rv == OGS_OK' failed. 
  • upf2 logs
Open5GS daemon v2.7.1

06/07 08:19:25.258: [app] INFO: Configuration: '/etc/open5gs/custom/upf2.yaml' (../lib/app/ogs-init.c:133)
06/07 08:19:25.258: [app] INFO: File Logging: '/var/log/open5gs/upf.log' (../lib/app/ogs-init.c:136)
06/07 08:19:25.324: [pfcp] INFO: pfcp_server() [10.33.33.5]:8805 (../lib/pfcp/path.c:30)
06/07 08:19:25.324: [gtp] INFO: gtp_server() [10.33.33.5]:2152 (../lib/gtp/path.c:30)
06/07 08:19:25.341: [app] INFO: UPF initialize...done (../src/upf/app.c:31)

Hi @ChoB100, you pointed me to an error on the smf2.yaml config file:

06/07 08:19:26.937: [sock] ERROR: getaddrinfo(0:smf2.open5gs.orgg:8805:0x0) failed (../lib/core/ogs-sockaddr.c:116)

In that line you can se the smf2.open5gs.orgg as the PFCP server address. I already fixed that error in the docker-open5gs repository.

I hope this fixes all the errors now and thanks for pointing that out!

Great! Everything seems to be working fine.

image

Thank you!