Hi Free5GC team,
Would u please help, I don’t want to use 127.0.0.1 for AMF, SMF, UDR, UDM, AUSF and PCF.
Instead, I want to change it to 127.0.0.5, 127.0.0.6, 127.0.0.7, 127.0.0.9, 127.0.0.10, 127.0.0.11.
Please let me know what changes I should do in config files to make the script ./run.sh and ./tesh.sh work ?
I will also tell What I did to make it work and what issue I faced with my changes
1st. I changed IP’s of NF’s as mentioned above in the config files.
2nd. Modified connectAMF ip in registeration_test.go and ngsetup_test.go for test.sh to work.
Note: I am not touching NRFs config file. Let it be 127.0.0.1 itself.
when I run ./tesh.sh Registration, I got below error:
2020-12-16T12:33:48Z [ERRO][AMF][Gmm] Nausf_UEAU Authenticate Request Error: server no response
2020-12-16T12:33:48Z [ERRO][AMF][Gmm] Authentication procedure failed
Diff of what I tried:
root@free5gc:~/free5gc# git diff
diff --git a/config/amfcfg.conf b/config/amfcfg.conf
index fb591d3…47934fd 100644
— a/config/amfcfg.conf
+++ b/config/amfcfg.conf
@@ -5,11 +5,11 @@ info:
configuration:
amfName: AMF
ngapIpList:
-
- 127.0.0.1
-
- 127.0.0.5
sbi:
scheme: http
- 127.0.0.5
- registerIPv4: 127.0.0.1 # IP used to register to NRF
- bindingIPv4: 127.0.0.1 # IP used to bind the service
- registerIPv4: 127.0.0.5 # IP used to register to NRF
- bindingIPv4: 127.0.0.5 # IP used to bind the service
port: 29518
serviceNameList:- namf-comm
diff --git a/config/amfcfg.n3test.conf b/config/amfcfg.n3test.conf
index af00850…25f1bf1 100644
— a/config/amfcfg.n3test.conf
+++ b/config/amfcfg.n3test.conf
@@ -8,8 +8,8 @@ configuration: - 10.200.200.1
sbi:
scheme: http
- namf-comm
- registerIPv4: 127.0.0.1 # IP used to register to NRF
- bindingIPv4: 127.0.0.1 # IP used to bind the service
- registerIPv4: 127.0.0.5 # IP used to register to NRF
- bindingIPv4: 127.0.0.5 # IP used to bind the service
port: 29518
serviceNameList:- namf-comm
diff --git a/config/ausfcfg.conf b/config/ausfcfg.conf
index 84011be…c27344c 100644
— a/config/ausfcfg.conf
+++ b/config/ausfcfg.conf
@@ -5,8 +5,8 @@ info:
configuration:
sbi:
scheme: http
- namf-comm
- registerIPv4: 127.0.0.1 # IP used to register to NRF
- bindingIPv4: 127.0.0.1 # IP used to bind the service
- registerIPv4: 127.0.0.6 # IP used to register to NRF
- bindingIPv4: 127.0.0.6 # IP used to bind the service
port: 29509
serviceNameList:- nausf-auth
diff --git a/config/pcfcfg.conf b/config/pcfcfg.conf
index 7408d1b…60eb984 100644
— a/config/pcfcfg.conf
+++ b/config/pcfcfg.conf
@@ -6,8 +6,8 @@ configuration:
pcfName: PCF
sbi:
scheme: http
- nausf-auth
- registerIPv4: 127.0.0.1 # IP used to register to NRF
- bindingIPv4: 127.0.0.1 # IP used to bind the service
- registerIPv4: 127.0.0.12 # IP used to register to NRF
- bindingIPv4: 127.0.0.12 # IP used to bind the service
port: 29507
timeFormat: 2019-01-02 15:04:05
defaultBdtRefId: BdtPolicyId-
diff --git a/config/smfcfg.conf b/config/smfcfg.conf
index ec4ef30…88b3312 100644
— a/config/smfcfg.conf
+++ b/config/smfcfg.conf
@@ -6,8 +6,8 @@ configuration:
smfName: SMF
sbi:
scheme: http
- registerIPv4: 127.0.0.1 # IP used to register to NRF
- bindingIPv4: 127.0.0.1 # IP used to bind the service
- registerIPv4: 127.0.0.7 # IP used to register to NRF
- bindingIPv4: 127.0.0.7 # IP used to bind the service
port: 29502
tls:
key: free5gc/support/TLS/smf.key
diff --git a/config/udmcfg.conf b/config/udmcfg.conf
index 21ce460…0a3eed6 100644
— a/config/udmcfg.conf
+++ b/config/udmcfg.conf
@@ -11,8 +11,8 @@ configuration:- nudm-pp
sbi:
scheme: http
- nudm-pp
- registerIPv4: 127.0.0.1 # IP used to register to NRF
- bindingIPv4: 127.0.0.1 # IP used to bind the service
- registerIPv4: 127.0.0.11 # IP used to register to NRF
- bindingIPv4: 127.0.0.11 # IP used to bind the service
port: 29503
tls:
log: free5gc/udmsslkey.log
@@ -21,7 +21,7 @@ configuration:
udrclient:
scheme: http
- ipv4Addr: 127.0.0.1
- ipv4Addr: 127.0.0.13
port: 29504
nrfclient:
diff --git a/config/udrcfg.conf b/config/udrcfg.conf
index 45100aa…96debdd 100644
— a/config/udrcfg.conf
+++ b/config/udrcfg.conf
@@ -5,8 +5,8 @@ info:
configuration:
sbi:
scheme: http
- registerIPv4: 127.0.0.1 # IP used to register to NRF
- bindingIPv4: 127.0.0.1 # IP used to bind the service
-
registerIPv4: 127.0.0.13 # IP used to register to NRF
-
bindingIPv4: 127.0.0.13 # IP used to bind the service
port: 29504
mongodb:
name: free5gc
diff --git a/src/test/ngsetup_test.go b/src/test/ngsetup_test.go
index 5c4b963…996f651 100644
— a/src/test/ngsetup_test.go
+++ b/src/test/ngsetup_test.go
@@ -78,7 +78,7 @@ func TestNGSetup(t *testing.T) {
var recvMsg = make([]byte, 2048)// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // send NGSetupRequest Msg
diff --git a/src/test/registration_test.go b/src/test/registration_test.go
index 789705e…a505401 100644
— a/src/test/registration_test.go
+++ b/src/test/registration_test.go
@@ -43,7 +43,7 @@ func TestRegistration(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // RAN connect to UPF
@@ -277,7 +277,7 @@ func TestDeregistration(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // send NGSetupRequest Msg
@@ -469,7 +469,7 @@ func TestServiceRequest(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // send NGSetupRequest Msg
@@ -685,7 +685,7 @@ func TestGUTIRegistration(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) require.Nil(t, err) // send NGSetupRequest Msg
@@ -985,7 +985,7 @@ func TestPDUSessionReleaseRequest(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // send NGSetupRequest Msg
@@ -1186,7 +1186,7 @@ func TestXnHandover(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // send NGSetupRequest Msg
@@ -1203,7 +1203,7 @@ func TestXnHandover(t *testing.T) {
time.Sleep(10 * time.Millisecond)
-
conn2, err1 := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9488)
-
conn2, err1 := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9488) assert.Nil(t, err1) // send Second NGSetupRequest Msg
@@ -1389,7 +1389,7 @@ func TestPaging(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMFcd
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // send NGSetupRequest Msg
@@ -1627,7 +1627,7 @@ func TestN2Handover(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN1 connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // RAN1 connect to UPF
@@ -1649,7 +1649,7 @@ func TestN2Handover(t *testing.T) {
time.Sleep(10 * time.Millisecond)
// RAN2 connect to AMF
-
conn2, err1 := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9488)
-
conn2, err1 := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9488) assert.Nil(t, err1) // RAN2 connect to UPF
@@ -1971,7 +1971,7 @@ func TestDuplicateRegistration(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err) // RAN connect to UPF
@@ -2216,7 +2216,7 @@ func TestReSynchronisation(t *testing.T) {
var recvMsg = make([]byte, 2048)
// RAN connect to AMF
-
conn, err := test.ConntectToAmf("127.0.0.1", "127.0.0.1", 38412, 9487)
-
conn, err := test.ConntectToAmf("127.0.0.5", "127.0.0.1", 38412, 9487) assert.Nil(t, err)