open5gs: Avoid use of non-standard ports

Despite open5gs allowing to change the GTP ports in the config file, in
reality changing those values to something else than the standard prot
will fail. Hence, we must use the standard port. As a result, we must
use different IP addresses in each process to avoid ip+port collisions.
Let's use some loopback addresses which shouldn't require extra
configuration on the host, and still only requiring 1 run_node as per
existing EPCs, with the limitation that only 1 open5gs EPC instance can
be run at one in a given run_node.

Related: https://github.com/open5gs/open5gs/issues/897
Change-Id: Id3062c6ad9d6de4c6066547e1e46edad5da285c1
diff --git a/src/osmo_gsm_tester/templates/open5gs-mmed.yaml.tmpl b/src/osmo_gsm_tester/templates/open5gs-mmed.yaml.tmpl
index 9aec578..5c886e3 100644
--- a/src/osmo_gsm_tester/templates/open5gs-mmed.yaml.tmpl
+++ b/src/osmo_gsm_tester/templates/open5gs-mmed.yaml.tmpl
@@ -104,8 +104,7 @@
 #
 sgwc:
     gtpc:
-      - addr: ${epc.run_addr}
-        port: 2125
+      - addr: ${epc.addr_sgwc}
 
 #
 # smf:
@@ -146,8 +145,7 @@
 #        apn: volte
 smf:
     gtpc:
-      - addr: ${epc.run_addr}
-        port: 2124
+      - addr: ${epc.addr_smf}
 
 #
 # parameter:
diff --git a/src/osmo_gsm_tester/templates/open5gs-sgwcd.yaml.tmpl b/src/osmo_gsm_tester/templates/open5gs-sgwcd.yaml.tmpl
index 8d2bd1a..a1db7ed 100644
--- a/src/osmo_gsm_tester/templates/open5gs-sgwcd.yaml.tmpl
+++ b/src/osmo_gsm_tester/templates/open5gs-sgwcd.yaml.tmpl
@@ -52,11 +52,9 @@
 #
 sgwc:
     gtpc:
-      - addr: ${epc.run_addr}
-        port: 2125
+      - addr: ${epc.addr_sgwc}
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8805
+      - addr: ${epc.addr_sgwc}
 
 #
 # sgwu:
@@ -112,8 +110,7 @@
 #
 sgwu:
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8806
+      - addr: ${epc.addr_sgwu}
 
 #
 # parameter:
diff --git a/src/osmo_gsm_tester/templates/open5gs-sgwud.yaml.tmpl b/src/osmo_gsm_tester/templates/open5gs-sgwud.yaml.tmpl
index 27dd55c..f0e2384 100644
--- a/src/osmo_gsm_tester/templates/open5gs-sgwud.yaml.tmpl
+++ b/src/osmo_gsm_tester/templates/open5gs-sgwud.yaml.tmpl
@@ -49,8 +49,7 @@
 #
 sgwu:
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8806
+      - addr: ${epc.addr_sgwu}
     gtpu:
       - addr: ${epc.run_addr}
         port: 2152
@@ -67,8 +66,7 @@
 #
 sgwc:
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8805
+      - addr: ${epc.addr_sgwc}
 
 #
 # parameter:
diff --git a/src/osmo_gsm_tester/templates/open5gs-smfd.yaml.tmpl b/src/osmo_gsm_tester/templates/open5gs-smfd.yaml.tmpl
index 0e01337..4a030d6 100644
--- a/src/osmo_gsm_tester/templates/open5gs-smfd.yaml.tmpl
+++ b/src/osmo_gsm_tester/templates/open5gs-smfd.yaml.tmpl
@@ -20,6 +20,7 @@
 #
 logger:
     file: ${smf.log_filename}
+    level: debug
 #
 # smf:
 #
@@ -310,22 +311,17 @@
       - addr: ${epc.run_addr}
         port: 7777
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8808
+      - addr: ${epc.addr_smf}
     gtpc:
-      - addr: ${epc.run_addr}
-        port: 2124
+      - addr: ${epc.addr_smf}
     gtpu:
       - addr: ${epc.run_addr}
         port: 2153
     subnet:
-      - addr: 10.45.0.1/16
-      - addr: 2001:230:cafe::1/48
+      - addr: ${epc.tun_addr}/16
     dns:
       - 8.8.8.8
       - 8.8.4.4
-      - 2001:4860:4860::8888
-      - 2001:4860:4860::8844
     mtu: 1400
     freeDiameter: ${smf.diameter_filename}
 
@@ -415,8 +411,7 @@
 #
 upf:
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8807
+      - addr: ${epc.addr_upf}
 
 #
 # parameter:
diff --git a/src/osmo_gsm_tester/templates/open5gs-upfd.yaml.tmpl b/src/osmo_gsm_tester/templates/open5gs-upfd.yaml.tmpl
index 4f7a25d..4fd77f6 100644
--- a/src/osmo_gsm_tester/templates/open5gs-upfd.yaml.tmpl
+++ b/src/osmo_gsm_tester/templates/open5gs-upfd.yaml.tmpl
@@ -20,6 +20,7 @@
 #
 logger:
     file: ${upf.log_filename}
+    level: debug
 
 #
 # upf:
@@ -104,14 +105,12 @@
 #
 upf:
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8807
+      - addr: ${epc.addr_upf}
     gtpu:
       - addr: ${epc.run_addr}
         port: 2154
     subnet:
-      - addr: 10.45.0.1/16
-      - addr: 2001:230:cafe::1/48
+      - addr: ${epc.tun_addr}/16
 
 #
 # smf:
@@ -125,8 +124,7 @@
 #
 smf:
     pfcp:
-      - addr: ${epc.run_addr}
-        port: 8808
+      - addr: ${epc.addr_smf}
 
 #
 # parameter: