osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38341?usp=email )


Change subject: ggsn: testenv: run SUT on bridge instead of lo
......................................................................

ggsn: testenv: run SUT on bridge instead of lo

Adjust configs to run the SUT on 172.18.3.202 (testenv0 bridge) instead
of 127.0.0.2 (lo). Later on when we can use QEMU with osmo-ggsn, it
will run on this IP as well. So with this change we can use the same IP
for both the QEMU and the non-QEMU case.

Change-Id: Ib768603b0050fe62baff39cab982a850eb91f49a
---
M ggsn_tests/GGSN_Tests.cfg
M ggsn_tests/open5gs/freediameter.conf
M ggsn_tests/open5gs/open5gs-smf.yaml
M ggsn_tests/open5gs/open5gs-upf.yaml
M ggsn_tests/open5gs/testenv.sh
M ggsn_tests/osmo-ggsn/osmo-ggsn-all.confmerge
M ggsn_tests/osmo-ggsn/osmo-ggsn-v4_only.confmerge
M ggsn_tests/osmo-ggsn/osmo-ggsn-v4v6_only.confmerge
M ggsn_tests/osmo-ggsn/osmo-ggsn-v6_only.confmerge
M ggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
M ggsn_tests/osmo-ggsn/testenv.sh
M ggsn_tests/testenv_osmo_ggsn_all.cfg
M ggsn_tests/testenv_osmo_ggsn_v4_only.cfg
M ggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
M ggsn_tests/testenv_osmo_ggsn_v6_only.cfg
15 files changed, 41 insertions(+), 37 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/41/38341/1

diff --git a/ggsn_tests/GGSN_Tests.cfg b/ggsn_tests/GGSN_Tests.cfg
index 6b27bf6..b6811fb 100644
--- a/ggsn_tests/GGSN_Tests.cfg
+++ b/ggsn_tests/GGSN_Tests.cfg
@@ -9,19 +9,19 @@
 [LOGGING]
 *.JUnitLogger.testsuite_name := "osmo-ttcn3-hacks/ggsn_tests"

-
 [TESTPORT_PARAMETERS]
+*.GGSNVTY.CTRL_HOSTNAME := "172.18.3.202"

 [MODULE_PARAMETERS]
 # our Own IP address
-GGSN_Tests.m_bind_ip_gtpc := "127.0.0.1"
-GGSN_Tests.m_bind_ip_gtpu := "127.0.0.1"
+GGSN_Tests.m_bind_ip_gtpc := "172.18.3.201"
+GGSN_Tests.m_bind_ip_gtpu := "172.18.3.201"
 # GGSN IP address
-GGSN_Tests.m_ggsn_ip_gtpc := "127.0.0.2"
-GGSN_Tests.m_ggsn_ip_gtpu := "127.0.0.2"  # For open5gs: 127.0.0.222
+GGSN_Tests.m_ggsn_ip_gtpc := "172.18.3.202"
+GGSN_Tests.m_ggsn_ip_gtpu := "172.18.3.202"  # For open5gs: 172.18.3.203
 # GGSN announced DNS address
-GGSN_Tests.m_ggsn_ip4_dns1 := "172.18.3.201"
-GGSN_Tests.m_ggsn_ip6_dns1 := "fd02:db8:3::201"
+GGSN_Tests.m_ggsn_ip4_dns1 := "172.18.3.202"
+GGSN_Tests.m_ggsn_ip6_dns1 := "fd02:db8:3::202"

 # local T3-RESPONSE timeout, seconds:
 GGSN_Tests.mp_t3_response := 1;
diff --git a/ggsn_tests/open5gs/freediameter.conf 
b/ggsn_tests/open5gs/freediameter.conf
index 6311878..af582a6 100644
--- a/ggsn_tests/open5gs/freediameter.conf
+++ b/ggsn_tests/open5gs/freediameter.conf
@@ -79,7 +79,7 @@
 #ListenOn = "202.249.37.5";
 #ListenOn = "2001:200:903:2::202:1";
 #ListenOn = "fe80::21c:5ff:fe98:7d62%eth0";
-ListenOn = "127.0.0.2";
+ListenOn = "172.18.3.202";


 ##############################################################
@@ -259,8 +259,8 @@
 # Examples:
 #ConnectPeer = "aaa.wide.ad.jp";
 #ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; 
Port=3868; } ;
-ConnectPeer = "pcrf.localdomain" { ConnectTo = "127.0.0.1"; Port = 3868; 
No_TLS;  TcTimer = 2; };
-ConnectPeer = "ocs.localdomain" { ConnectTo = "127.0.0.1"; Port = 3869; 
No_TLS;  TcTimer = 2; };
+ConnectPeer = "pcrf.localdomain" { ConnectTo = "172.18.3.201"; Port = 3868; 
No_TLS;  TcTimer = 2; };
+ConnectPeer = "ocs.localdomain" { ConnectTo = "172.18.3.201"; Port = 3869; 
No_TLS;  TcTimer = 2; };


 ##############################################################
diff --git a/ggsn_tests/open5gs/open5gs-smf.yaml 
b/ggsn_tests/open5gs/open5gs-smf.yaml
index 0e26550..fd34c6a 100644
--- a/ggsn_tests/open5gs/open5gs-smf.yaml
+++ b/ggsn_tests/open5gs/open5gs-smf.yaml
@@ -10,24 +10,24 @@
 smf:
     pfcp:
       server:
-        - address: 127.0.0.2
+        - address: 172.18.3.202
       client:
         upf:
-          - address: 127.0.0.222
+          - address: 172.18.3.203
     gtpc:
       server:
-        - address: 127.0.0.2
+        - address: 172.18.3.202
           option:
-            so_bindtodevice: lo
+            so_bindtodevice: testenv0
     gtpu:
       server:
-        - address: 127.0.0.2
+        - address: 172.18.3.202
           port: 2152
           option:
-            so_bindtodevice: lo
+            so_bindtodevice: testenv0
     metrics:
       server:
-        - address: 127.0.0.2
+        - address: 172.18.3.202
           port: 9090
     session:
       - subnet: 176.16.16.1/20
@@ -39,9 +39,9 @@
       - subnet: 2001:780:44:2100:0:0:0:1/56
         dnn: inet46
     dns:
-      - 172.18.3.201
+      - 172.18.3.202
       - 8.8.8.8
-      - fd02:db8:3::201
+      - fd02:db8:3::202
       - 2001:4860:4860::8844
     mtu: 1400
     ctf:
diff --git a/ggsn_tests/open5gs/open5gs-upf.yaml 
b/ggsn_tests/open5gs/open5gs-upf.yaml
index 7e38eea..a73f144 100644
--- a/ggsn_tests/open5gs/open5gs-upf.yaml
+++ b/ggsn_tests/open5gs/open5gs-upf.yaml
@@ -10,13 +10,13 @@
 upf:
     pfcp:
       server:
-        - address: 127.0.0.222
+        - address: 172.18.3.203
     gtpu:
       server:
-        - address: 127.0.0.222
+        - address: 172.18.3.203
           port: 2152
           option:
-            so_bindtodevice: lo
+            so_bindtodevice: testenv0
     session:
       - subnet: 176.16.16.1/20
         dnn: internet
@@ -33,7 +33,7 @@

 smf:
     pfcp:
-      - address: 127.0.0.2
+      - address: 172.18.3.202

 parameter:

diff --git a/ggsn_tests/open5gs/testenv.sh b/ggsn_tests/open5gs/testenv.sh
index e06d771..418ed3a 100755
--- a/ggsn_tests/open5gs/testenv.sh
+++ b/ggsn_tests/open5gs/testenv.sh
@@ -12,7 +12,7 @@
 adjust_ttcn3_config() {
        sed -i 's/^GGSN_Tests.m_ggsn_impl := .*/GGSN_Tests.m_ggsn_impl := 
GGSN_IMPL_OPEN5GS/' \
                ../testsuite/GGSN_Tests.cfg
-       sed -i 's/^GGSN_Tests.m_ggsn_ip_gtpu := .*/GGSN_Tests.m_ggsn_ip_gtpu := 
"127.0.0.222"/' \
+       sed -i 's/^GGSN_Tests.m_ggsn_ip_gtpu := .*/GGSN_Tests.m_ggsn_ip_gtpu := 
"172.18.3.203"/' \
                ../testsuite/GGSN_Tests.cfg
 }

@@ -69,7 +69,7 @@
 # Add a bridge reachable through the GTP tunnel that can answer ICMP
 # pings (for e.g. TC_pdp4_act_deact_gtpu_access). The bridge is also used to
 # connect the SUT when it runs in QEMU.
-add_remove_testenv0_bridge.sh
+EXTRA_IPS="172.18.3.202 172.18.3.203 fd02:db8:3::202" 
add_remove_testenv0_bridge.sh

 case "$TESTENV_CLEAN_REASON" in
        prepare)
diff --git a/ggsn_tests/osmo-ggsn/osmo-ggsn-all.confmerge 
b/ggsn_tests/osmo-ggsn/osmo-ggsn-all.confmerge
index 57dbd79..6ec0e34 100644
--- a/ggsn_tests/osmo-ggsn/osmo-ggsn-all.confmerge
+++ b/ggsn_tests/osmo-ggsn/osmo-ggsn-all.confmerge
@@ -4,7 +4,7 @@
   tun-device tun4
   type-support v4
   ip prefix dynamic 176.16.16.0/20
-  ip dns 0 172.18.3.201
+  ip dns 0 172.18.3.202
   ip dns 1 8.8.8.8
   ip ifconfig 176.16.16.0/20
   no shutdown
@@ -13,7 +13,7 @@
   tun-device tun6
   type-support v6
   ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56
-  ipv6 dns 0 fd02:db8:3::201
+  ipv6 dns 0 fd02:db8:3::202
   ipv6 dns 1 2001:4860:4860::8844
   ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56
   no shutdown
@@ -22,11 +22,11 @@
   tun-device tun46
   type-support v4v6
   ip prefix dynamic 176.16.32.0/20
-  ip dns 0 172.18.3.201
+  ip dns 0 172.18.3.202
   ip dns 1 8.8.8.8
   ip ifconfig 176.16.32.0/20
   ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56
-  ipv6 dns 0 fd02:db8:3::201
+  ipv6 dns 0 fd02:db8:3::202
   ipv6 dns 1 2001:4860:4860::8844
   ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56
   no shutdown
diff --git a/ggsn_tests/osmo-ggsn/osmo-ggsn-v4_only.confmerge 
b/ggsn_tests/osmo-ggsn/osmo-ggsn-v4_only.confmerge
index a39a4d4..39c5e9b 100644
--- a/ggsn_tests/osmo-ggsn/osmo-ggsn-v4_only.confmerge
+++ b/ggsn_tests/osmo-ggsn/osmo-ggsn-v4_only.confmerge
@@ -4,7 +4,7 @@
   tun-device tun4
   type-support v4
   ip prefix dynamic 176.16.16.0/20
-  ip dns 0 172.18.3.201
+  ip dns 0 172.18.3.202
   ip dns 1 8.8.8.8
   ip ifconfig 176.16.16.0/20
   no shutdown
diff --git a/ggsn_tests/osmo-ggsn/osmo-ggsn-v4v6_only.confmerge 
b/ggsn_tests/osmo-ggsn/osmo-ggsn-v4v6_only.confmerge
index 6351ebe..1b58764 100644
--- a/ggsn_tests/osmo-ggsn/osmo-ggsn-v4v6_only.confmerge
+++ b/ggsn_tests/osmo-ggsn/osmo-ggsn-v4v6_only.confmerge
@@ -4,11 +4,11 @@
   tun-device tun46
   type-support v4v6
   ip prefix dynamic 176.16.32.0/20
-  ip dns 0 172.18.3.201
+  ip dns 0 172.18.3.202
   ip dns 1 8.8.8.8
   ip ifconfig 176.16.32.0/20
   ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56
-  ipv6 dns 0 fd02:db8:3::201
+  ipv6 dns 0 fd02:db8:3::202
   ipv6 dns 1 2001:4860:4860::8844
   ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56
   no shutdown
diff --git a/ggsn_tests/osmo-ggsn/osmo-ggsn-v6_only.confmerge 
b/ggsn_tests/osmo-ggsn/osmo-ggsn-v6_only.confmerge
index 5e3f000..4f6d53b 100644
--- a/ggsn_tests/osmo-ggsn/osmo-ggsn-v6_only.confmerge
+++ b/ggsn_tests/osmo-ggsn/osmo-ggsn-v6_only.confmerge
@@ -4,7 +4,7 @@
   tun-device tun6
   type-support v6
   ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56
-  ipv6 dns 0 fd02:db8:3::201
+  ipv6 dns 0 fd02:db8:3::202
   ipv6 dns 1 2001:4860:4860::8844
   ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56
   no shutdown
diff --git a/ggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg 
b/ggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
index 23a21f4..49e2811 100644
--- a/ggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
+++ b/ggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
@@ -2,7 +2,7 @@
 ! OpenGGSN (0.94.1-adac) configuration saved from vty
 !!
 !
-log gsmtap 127.0.0.1
+log gsmtap 172.18.3.201
  logging level set-all debug
  logging filter all 1
 !
@@ -42,11 +42,11 @@
 !
 line vty
  no login
- bind 0.0.0.0
+ bind 172.18.3.202
 !
 ggsn ggsn0
  gtp state-dir /tmp
- gtp bind-ip 127.0.0.2
+ gtp bind-ip 172.18.3.202
  timer gtp T3 1
  timer gtp T1003 2
  timer gtp X3 2
diff --git a/ggsn_tests/osmo-ggsn/testenv.sh b/ggsn_tests/osmo-ggsn/testenv.sh
index 0275ad2..439ed7b 100755
--- a/ggsn_tests/osmo-ggsn/testenv.sh
+++ b/ggsn_tests/osmo-ggsn/testenv.sh
@@ -52,7 +52,7 @@
 # Add a bridge reachable through the GTP tunnel that can answer ICMP
 # pings (for e.g. TC_pdp4_act_deact_gtpu_access). The bridge is also used to
 # connect the SUT when it runs in QEMU.
-add_remove_testenv0_bridge.sh
+EXTRA_IPS="172.18.3.202 fd02:db8:3::20" add_remove_testenv0_bridge.sh

 case "$TESTENV_CLEAN_REASON" in
        prepare)
diff --git a/ggsn_tests/testenv_osmo_ggsn_all.cfg 
b/ggsn_tests/testenv_osmo_ggsn_all.cfg
index 54660be..ca82fe1 100644
--- a/ggsn_tests/testenv_osmo_ggsn_all.cfg
+++ b/ggsn_tests/testenv_osmo_ggsn_all.cfg
@@ -9,3 +9,4 @@
 copy=osmo-ggsn
 clean=osmo-ggsn/testenv.sh all
 vty_port=4260
+vty_host=172.18.3.202
diff --git a/ggsn_tests/testenv_osmo_ggsn_v4_only.cfg 
b/ggsn_tests/testenv_osmo_ggsn_v4_only.cfg
index 3b55af2..881e9e8 100644
--- a/ggsn_tests/testenv_osmo_ggsn_v4_only.cfg
+++ b/ggsn_tests/testenv_osmo_ggsn_v4_only.cfg
@@ -9,3 +9,4 @@
 copy=osmo-ggsn
 clean=osmo-ggsn/testenv.sh v4_only
 vty_port=4260
+vty_host=172.18.3.202
diff --git a/ggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg 
b/ggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
index da738f2..2ff3292 100644
--- a/ggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
+++ b/ggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
@@ -9,3 +9,4 @@
 copy=osmo-ggsn
 clean=osmo-ggsn/testenv.sh v4v6_only
 vty_port=4260
+vty_host=172.18.3.202
diff --git a/ggsn_tests/testenv_osmo_ggsn_v6_only.cfg 
b/ggsn_tests/testenv_osmo_ggsn_v6_only.cfg
index 4d65b73..4569874 100644
--- a/ggsn_tests/testenv_osmo_ggsn_v6_only.cfg
+++ b/ggsn_tests/testenv_osmo_ggsn_v6_only.cfg
@@ -9,3 +9,4 @@
 copy=osmo-ggsn
 clean=osmo-ggsn/testenv.sh v6_only
 vty_port=4260
+vty_host=172.18.3.202

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38341?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib768603b0050fe62baff39cab982a850eb91f49a
Gerrit-Change-Number: 38341
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>

Reply via email to