herlesupreeth / docker_open5gs

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker
BSD 2-Clause "Simplified" License
321 stars 180 forks source link

Invalid APN[ims], [ims]APN unknown #373

Closed Sticcolet closed 1 month ago

Sticcolet commented 1 month ago

I have successfully installed and started Open5Gs core+Kaimilio IMS, and I have run srslte independently outside of the Docker environment. Now by registering user information in the HSS of Open5GS, my phone can access the network normally through the [internet] APN, but the mme log shows that the [ims] APN cannot be recognized. How can I check my problem?

herlesupreeth commented 1 month ago

[internet] APN, but the mme log shows that the [ims] APN cannot be recognized. How can I check my problem?

i think you haven´t configured ims APN in HSS of open5gs. Also, please always attach a pcap taken on the docker_open5gs machine to know exactly what the issue is.

Sticcolet commented 1 month ago

Yes, you are right. I configured the internet and IMS under different SSTs in Open5GS. Now I have encountered a new problem. My IMS APN successfully established a connection, but I couldn't see any SIP messages. Then I immediately disconnected from IMS. What's going on? Here is my pcap file. nosip.zip

Sticcolet commented 1 month ago

[internet] APN, but the mme log shows that the [ims] APN cannot be recognized. How can I check my problem?

i think you haven´t configured ims APN in HSS of open5gs. Also, please always attach a pcap taken on the docker_open5gs machine to know exactly what the issue is.

I can see GTPU data in enb.log, indicating that the address allocated by the terminal sent a message to pcscf, but the message cannot be captured in Wireshark. Is it a problem with my enb configuration? Since I am running open5gs inside Docker and enb outside Docker, should I modify some configurations?

Sticcolet commented 1 month ago

These are some of my settings and corresponding log files: ims_test.zip In the ENB configuration file, I attempted to set gtp_bind_addr to the IP of the host and Docker bridge respectively, and both were able to start enb normally. However, when set as the host IP, it will prompt TCID error, and both settings cannot see GTPU messages in pcap.

herlesupreeth commented 1 month ago

My IMS APN successfully established a connection, but I couldn't see any SIP messages. Then I immediately disconnected from IMS. What's going on? Here is my pcap file.

Thats because after certain number of repeated failed attempts at registering with IMS the phone gives up. The only way to make the phone retry is rebooting it

please follow the steps mentioned here - https://github.com/herlesupreeth/docker_open5gs?tab=readme-ov-file#multihost-setup-configuration

In general, if you are running eNB on the host you need to have the following settings

mme_addr => IP of the machine where docker_open5gs is running NOT the MME container IP gtp_bind_addr => IP of the machine where you running eNB s1c_bind_addr => IP of the machine where you running eNB

Sticcolet commented 1 month ago

Thats because after certain number of repeated failed attempts at registering with IMS the phone gives up. The only way to make the phone retry is rebooting it

I have seen an issue describing this method and I have tried it, but it has not been effective. Actually, I saw the GTPU message in the log of the base station, but it seems that this message was not sent correctly to the core network. And not only IMS, there are also no GTPU messages on the internet.

mme_addr => IP of the machine where docker_open5gs is running NOT the MME container IP

Now my settings are using the IP address of the mme container and it seems to be working properly. Do I need to change it to the IP address of the host? As recorded in the pcap file below, the terminal 192.168.101/100. * did indeed send a request, but it could not be caught on the core network side and displayed a strange local loopback request with GTP messages from 192.168.10.1:2152 to 192.168.10.1:2152. What is this meaning? self.zip

herlesupreeth commented 1 month ago

Now my settings are using the IP address of the mme container and it seems to be working properly

it should be the IP address of the host. And, please follow instructions in the link I mentioned above (it has all the settings you need to run eNB and EPC on separate machines), you also need to set the SGWU_ADVERTISE_IP to the IP address of the host running the docker_open5gs

Sticcolet commented 1 month ago

Now my settings are using the IP address of the mme container and it seems to be working properly

it should be the IP address of the host. And, please follow instructions in the link I mentioned above (it has all the settings you need to run eNB and EPC on separate machines), you also need to set the SGWU_ADVERTISE_IP to the IP address of the host running the docker_open5gs

When I set mme_dedr to the host's IP, ENB reported an error: Failed to initiate S1 connection. In fact, I only have one host running Docker with Open5GS, and the physical network card address of this host is 192.168.10.1. It is connected to USRPX310 through the network card, and the USRP address is 192.168.10.2. The remaining steps are entirely carried out according to the connection.

herlesupreeth commented 1 month ago

aaah, so basically you are running eNB + open5gs EPC on one machine, its just that you are running the srslte binary (not as part of docker setup). Then, you dont need to follow as mentioned here - https://github.com/herlesupreeth/docker_open5gs?tab=readme-ov-file#multihost-setup-configuration)

you need to have the configuration as follows in enb.conf

mme_addr => MME container IP gtp_bind_addr => 172.22.0.1 s1c_bind_addr => 172.22.0.1

NOTE: Ensure that you run/deploy the EPC first. Because the interface with IP 172.22.0.1 only gets created once you deploy EPC

Sticcolet commented 1 month ago

Sadly, it still doesn't work (QAQ). But it provided me with some other ideas, and I speculate that there may have been some issues with the forwarding rules of the host, causing the message to be discarded locally. I will double check from this perspective and report any progress here. What I don't understand is why the core network or ENB would reply with [unknown TEID]. If you have any better suggestions or ideas, I hope you can continue to help me. Thank you very much.

Sticcolet commented 1 month ago

In the end, I solved this problem. The SGW address needs to be set to the Docker container address in .env, and the host's gateway needs to be set to the local address.