Distributed environment testing


TestRegistration.pcap (2.0 KB)

I have started the all the NFs and the UPF,and manually exec the test command:
/usr/local/go/bin/go test -v -vet=off -run TestRegistration

the AMF receives the HTTP2 response of nnrf-disc from the NRF,but not to request “/nausf-auth/v1/ue-authentications” to the AUSF?

the AMF info:

DEBU[2020-06-08T14:46:09+08:00]/lib/ngap/ngapSctp/sctp.go:105 free5gc/lib/ngap/ngapSctp.Accept() Accepted Connection from RemoteAddr: 10.200.200.1:9487 NGAP=NGAP
DEBU[2020-06-08T14:46:09+08:00]/lib/ngap/ngapSctp/sctp.go:109 free5gc/lib/ngap/ngapSctp.Accept() A new Connection 1. NGAP=NGAP
INFO[2020-06-08T14:46:09+08:00]/src/amf/ngap/sctp/sctp.go:42 free5gc/src/amf/ngap/sctp.Server.func1() [AMF] NGAP SCTP Accept from: 10.200.200.1:9487 AMF=NGAP
DEBU[2020-06-08T14:46:09+08:00]/lib/ngap/ngapSctp/sctp.go:134 free5gc/lib/ngap/ngapSctp.Start() Read: 10.200.200.1:9487, R@ free5gcf@@, 00150035000004001b00080002f83910000102005240090300667265653567630066001000000000010002f839000010080102030015400140 NGAP=NGAP
DEBU[2020-06-08T14:46:09+08:00]/src/amf/ngap/sctp/sctp.go:100 free5gc/src/amf/ngap/sctp.(*SCTPListener).forwardData() Packet get: 0x00150035000004001b00080002f83910000102005240090300667265653567630066001000000000010002f839000010080102030015400140 AMF=NGAP
INFO[2020-06-08T14:46:09+08:00]/src/amf/ngap/handler.go:50 free5gc/src/amf/ngap.HandleNGSetupRequest() [AMF] NG Setup request AMF=NGAP
INFO[2020-06-08T14:46:09+08:00]/src/amf/ngap/message/send.go:79 free5gc/src/amf/ngap/message.SendNGSetupResponse() [AMF] Send NG-Setup response AMF=NGAP
DEBU[2020-06-08T14:46:09+08:00]/src/amf/ngap/message/send.go:32 free5gc/src/amf/ngap/message.SendToRan() [NGAP] Send To Ran [IP: 10.200.200.1:9487] AMF=NGAP
DEBU[2020-06-08T14:46:09+08:00]/lib/ngap/ngapSctp/sctp.go:145 free5gc/lib/ngap/ngapSctp.SendMsg() Write: 10.200.200.1:9487, 1AMF
DEBU[2020-06-08T14:46:10+08:00]/lib/ngap/ngapSctp/sctp.go:134 free5gc/lib/ngap/ngapSctp.Start() Read: 10.200.200.1:9487, @JU& ~A, 000f404a000005005500020001002600201f7e004119000c0102f839f0ff0000000047781001072e08ffffffff000000000079000f4002f839000000001002f839000001005a4001100070400100 NGAP=NGAP
DEBU[2020-06-08T14:46:10+08:00]/src/amf/ngap/sctp/sctp.go:100 free5gc/src/amf/ngap/sctp.(*SCTPListener).forwardData() Packet get: 0x000f404a000005005500020001002600201f7e004119000c0102f839f0ff0000000047781001072e08ffffffff000000000079000f4002f839000000001002f839000001005a4001100070400100 AMF=NGAP
INFO[2020-06-08T14:46:10+08:00]/src/amf/ngap/handler.go:883 free5gc/src/amf/ngap.HandleInitialUEMessage() [AMF] Initial UE Message AMF=NGAP
DEBU[2020-06-08T14:46:10+08:00]/src/amf/ngap/handler.go:952 free5gc/src/amf/ngap.HandleInitialUEMessage() New RanUe [RanUeNgapID: 1] AMF=NGAP
DEBU[2020-06-08T14:46:10+08:00]/src/amf/ngap/handler.go:1008 free5gc/src/amf/ngap.HandleInitialUEMessage() Trigger initial Context Setup procedure AMF=NGAP
INFO[2020-06-08T14:46:10+08:00]/src/amf/gmm/handler.go:519 free5gc/src/amf/gmm.HandleRegistrationRequest() [AMF] Handle Registration Request AMF=Gmm
DEBU[2020-06-08T14:46:10+08:00]/src/amf/gmm/handler.go:540 free5gc/src/amf/gmm.HandleRegistrationRequest() RegistrationType: Initial Registration AMF=Gmm
DEBU[2020-06-08T14:46:10+08:00]/src/amf/gmm/handler.go:564 free5gc/src/amf/gmm.HandleRegistrationRequest() SUCI: suci-0-208-93-0-0-0-00007487 AMF=Gmm
INFO[2020-06-08T14:46:10+08:00]/src/amf/gmm/handler.go:1617 free5gc/src/amf/gmm.startAuthenticationProcedure() Start authentication procedure AMF=Gmm
ERRO[2020-06-08T14:48:43+08:00]/src/amf/nas/handler.go:41 free5gc/src/amf/nas.HandleNAS() Send to Nas Error: server no response AMF=NGAP
DEBU[2020-06-08T15:00:10+08:00]/lib/ngap/ngapSctp/sctp.go:127 free5gc/lib/ngap/ngapSctp.Start() Error EOF NGAP=NGAP
DEBU[2020-06-08T15:00:10+08:00]/lib/ngap/ngapSctp/sctp.go:158 free5gc/lib/ngap/ngapSctp.closeConnection() Now, 0 connections is alive. NGAP=NGAP

When you run the NF distribute and manually, you shouldn’t run the test. The test is for all in one and will automatically bring up each NF on the same host and connect to each others.

If you want to test for distributed environment, you can try to modify the test script.

TestRegistration1.pcap (29.3 KB)

I have tested the registration procedure manually, but found that the AMF’s HTTP2 request was sent slowly.sometimes, each request takes a few minutes.

in the line 250 of /usr/local/go/src/net/http/client.go
resp,err = rt.RoundTrip(req)