Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Configuring PyHSS with open5Gs #215

Open
alexeymx opened this issue Dec 16, 2024 · 4 comments
Open

Configuring PyHSS with open5Gs #215

alexeymx opened this issue Dec 16, 2024 · 4 comments

Comments

@alexeymx
Copy link

Hello everyone, i have several questions

I successfully installed Pyhss and could populace AcUs, Subscribers, apns,

how can i connect my open5gs setup to PyHSS to completely avoid using built-in hss and be able to run it as EPC / 4G ?

Thank you in advance, would be great to add some example here

@9600
Copy link

9600 commented Dec 16, 2024

In the Open5GS config:

  1. freeDiameter/mme.conf

The "connectPeer = " line, typically at the end of the file, would need to point to the PyHSS instance. The hostname should be the same as the OriginHost value set in PyHSS config.yaml and the IP obviously the address it is running on.

This is for the S6a interface from MME to HSS.

  1. freeDiameter/smf.conf

This should have the same "connectPeer =" line as above.

This is for the Gx interface from SMF to the PCRF provided by PyHSS.

Assuming you are running everything on the same host, you would probably also want to stop Open5GS HSS and PCRF from starting.

@alexeymx
Copy link
Author

In the Open5GS config:

  1. freeDiameter/mme.conf

The "connectPeer = " line, typically at the end of the file, would need to point to the PyHSS instance. The hostname should be the same as the OriginHost value set in PyHSS config.yaml and the IP obviously the address it is running on.

This is for the S6a interface from MME to HSS.

  1. freeDiameter/smf.conf

This should have the same "connectPeer =" line as above.

This is for the Gx interface from SMF to the PCRF provided by PyHSS.

Assuming you are running everything on the same host, you would probably also want to stop Open5GS HSS and PCRF from starting.

Hey! Thanks a lot for your reply, ok i understood that i'll stop open5gs hss and PCRF services.

is this setup enough to perform online charging ? i'm still a bit confused

There are 2 interfaces Gx and Gy, from what i understand connection SMF - PyHss implements Gx

But for credit control i need to implement Gy? how will i set this up

@9600
Copy link

9600 commented Dec 16, 2024

I don't know much about PCRF to be honest. My use case is for private networks and I just wanted to remove any reliance on Open5GS HSS/WebUI and MongoDB.

There are some PCRF notes in this repo, but I didn't see mention of Gy.

@ashokhs77
Copy link

Hello @9600 I am encountering the same issue now. I have followed your instructions above, but still the problem persists, attach fails.. with the following logs:

Under mme section, under freediameter, under connect, I gave the hss identity and the ip address. Did the same for freediameter connection under smf also. Hope its fine.

Updated the s1ap server address with the host address, updated the gummei and tai values appropriately.

Under sgwu, gtpu server address also I updated with host's ip address.

and disabled hss and pcrf and launched the EPC.

On the pyHSS config, I just updated the realm name with the same realm which was used by open5gs mme and the bind ip address and identity which was given for mme's freediameter.

Is this all I need to do or did I miss anything?

I launched the pyhss, added the APN, AUC, subscriber details and tried to attach a UE, initial authentication is passing and then attach is failing with diameter error 5030.

Attaching the epc console log for reference here.

02/27 19:13:30.225: [sgwc] INFO: [Added] Number of SGWC-Sessions is now 1 (../src/sgwc/context.c:924)
02/27 19:13:30.225: [sgwc] INFO: UE IMSI[404200100001915] APN[internet] (../src/sgwc/s11-handler.c:268)
02/27 19:13:30.225: [sgwu] INFO: UE F-SEID[UP:0xcbf CP:0xc87] (../src/sgwu/context.c:170)
02/27 19:13:30.225: [sgwu] INFO: [Added] Number of SGWU-Sessions is now 6 (../src/sgwu/context.c:175)
02/27 19:13:30.225: [smf] INFO: OLD Session Will Release [IMSI:404200100001915,APN:internet] (../src/smf/context.c:1407)
02/27 19:13:30.225: [smf] INFO: Removed Session: UE IMSI:[404200100001915] DNN:[internet:0] IPv4:[10.45.0.0] IPv6:[] (../src/smf/context.c:1693)
02/27 19:13:30.225: [smf] INFO: [Removed] Number of SMF-Sessions is now 0 (../src/smf/context.c:3198)
02/27 19:13:30.225: [smf] INFO: [Added] Number of SMF-Sessions is now 1 (../src/smf/context.c:3190)
02/27 19:13:30.225: [smf] INFO: UE IMSI[404200100001915] APN[internet] IPv4[10.45.0.0] IPv6[] (../src/smf/s5c-handler.c:303)
02/27 19:13:30.319: [smf] WARNING: ERROR DIAMETER Result Code(5030) (../src/smf/gx-path.c:888)
02/27 19:13:30.319: [smf] ERROR: Unexpected Diameter Result Code 5030/-1, defaulting to severe network failure (../src/smf/gsm-sm.c:57)
02/27 19:13:30.319: [sgwc] ERROR: No GTP TEID [Cause:125] (../src/sgwc/s5c-handler.c:143)
02/27 19:13:30.319: [sgwc] ERROR: No PDN Address Allocation [Cause:125] (../src/sgwc/s5c-handler.c:147)
02/27 19:13:30.320: [mme] ERROR: [404200100001915] No S11 TEID [Cause:103] (../src/mme/mme-s11-handler.c:285)
02/27 19:13:30.320: [mme] ERROR: [404200100001915] No S5C TEID [Cause:103] (../src/mme/mme-s11-handler.c:299)
02/27 19:13:30.320: [mme] ERROR: [404200100001915] No PDN Address Allocation [Cause:103] (../src/mme/mme-s11-handler.c:305)
02/27 19:13:30.320: [mme] ERROR: [404200100001915] Attach reject [Cause:103] (../src/mme/mme-s11-handler.c:318)
02/27 19:13:30.320: [mme] INFO: Removed Session: UE IMSI:[404200100001915] APN:[internet] (../src/mme/mme-gtp-path.c:416)
02/27 19:13:30.320: [mme] INFO: [Removed] Number of MME-Sessions is now 0 (../src/mme/mme-context.c:5055)
02/27 19:13:30.377: [mme] INFO: UE Context Release [Action:3] (../src/mme/s1ap-handler.c:1879)
02/27 19:13:30.377: [mme] INFO: ENB_UE_S1AP_ID[63] MME_UE_S1AP_ID[11] (../src/mme/s1ap-handler.c:1880)
02/27 19:13:30.377: [mme] INFO: IMSI[404200100001915] (../src/mme/s1ap-handler.c:1885)
02/27 19:13:30.377: [mme] INFO: [Removed] Number of eNB-UEs is now 0 (../src/mme/mme-context.c:5041)
02/27 19:13:30.377: [mme] INFO: [Removed] Number of MME-UEs is now 0 (../src/mme/mme-context.c:3695)

Please someone help me identify the issue and suggest the steps to overcome this.

Thanks & regards,
Ashok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants