osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/27455 )
Change subject: net: add mgw for osmo-bsc-nat
......................................................................
net: add mgw for osmo-bsc-nat
Start the OsmoBSCNAT's own instance of OsmoMGW. Launch it on a separate
IP, such as the other MGWs, so it's easy to differentiate in wireshark
which traffic relates to which MGW.
Related: https://osmocom.org/projects/osmo-bscnat/wiki/Ladder_diagrams_for_key_proce…
Change-Id: Iaeebb693c81d3aa4b1a46d2543c9872bd49b87c3
---
M net/config_2g3g
A net/templates/osmo-mgw-for-bsc-nat.cfg
M net/templates/run.sh
3 files changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/55/27455/1
diff --git a/net/config_2g3g b/net/config_2g3g
index 379f505..6111b24 100644
--- a/net/config_2g3g
+++ b/net/config_2g3g
@@ -96,6 +96,10 @@
MGW4BSC1_PORT="2427"
MGW4BSC1_VTY_IP="127.0.0.11"
+MGW4BSCNAT_IP="127.0.0.14"
+MGW4BSCNAT_PORT="2427"
+MGW4BSCNAT_VTY_IP="127.0.0.14"
+
BSC_COUNT=1
BSC0_IP="${TO_RAN_IP}"
diff --git a/net/templates/osmo-mgw-for-bsc-nat.cfg b/net/templates/osmo-mgw-for-bsc-nat.cfg
new file mode 100644
index 0000000..d0ef957
--- /dev/null
+++ b/net/templates/osmo-mgw-for-bsc-nat.cfg
@@ -0,0 +1,16 @@
+${include(common_template_warning)}
+mgcp
+ domain bscnat
+ bind ip ${MGW4BSCNAT_IP}
+ bind port ${MGW4BSCNAT_PORT}
+ rtp net-range 50004 60000
+ number endpoints 1024
+line vty
+ bind ${MGW4BSCNAT_VTY_IP}
+
+${foreach(LOG_OUTPUT)}
+log ${LOG_OUTPUTn_TYPE}
+${include(common_logging)}
+ logging level rtp info
+ logging level lmgcp info
+${foreach_end}
diff --git a/net/templates/run.sh b/net/templates/run.sh
index 29e5347..3165f53 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -244,6 +244,7 @@
else
term "$stp4cn" STP4CN
term "$stp4ran" STP4RAN
+ term "$mgw -c osmo-mgw-for-bsc-nat.cfg" MGW4BSCNAT
term "$bscnat" BSCNAT
fi
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27455
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Iaeebb693c81d3aa4b1a46d2543c9872bd49b87c3
Gerrit-Change-Number: 27455
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/27451 )
Change subject: net: virtphy, osmo-bts-virtual: use loopback-dev
......................................................................
net: virtphy, osmo-bts-virtual: use loopback-dev
Use the loopback device for virtual Um traffic, so it doesn't slow down
other net devs.
Change-Id: Ibc7ff3aaaca4872f4105825167eb33b66bc23342
---
M net/templates/common_osmo_bts
M net/templates/run.sh
2 files changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/51/27451/1
diff --git a/net/templates/common_osmo_bts b/net/templates/common_osmo_bts
index 4244e34..06bd439 100644
--- a/net/templates/common_osmo_bts
+++ b/net/templates/common_osmo_bts
@@ -3,6 +3,7 @@
phy 0
instance 0
+ virtual-um net-device lo
bts 0
band ${BTS_BAND}
diff --git a/net/templates/run.sh b/net/templates/run.sh
index a5a8720..e4e8356 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -46,6 +46,18 @@
sudo ip addr add ${TO_RAN_IU_IP}/32 dev $dev
fi
+# Enable multicast on lo for virtual MS
+if [ "${MS_RUN_IN_OSMO_DEV}" = 1 ]; then
+ if [ -z "$(ip link show lo | grep MULTICAST)" ]; then
+ echo "Loopback device doesn't have multicast enabled! Hit enter to enable it"
+ read enter_to_continue
+ sudo ip link set lo multicast on
+ fi
+ if [ -z "$(ip route show dev lo | grep '224\.0\.0\.0/4')" ]; then
+ sudo ip route add 224.0.0.0/4 dev lo
+ fi
+fi
+
logdir="current_log"
piddir="run/pids"
launcherdir="run/launchers"
@@ -183,7 +195,7 @@
bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc"
bscnat="osmo-bsc-nat"
bts="osmo-bts-virtual"
-virtphy="virtphy"
+virtphy="virtphy -D lo"
ms="mobile -c mobile.cfg"
if [ "x${MSC_MNCC}" != "xinternal" ]; then
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27451
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ibc7ff3aaaca4872f4105825167eb33b66bc23342
Gerrit-Change-Number: 27451
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/27449 )
Change subject: net: don't run osmo-gbproxy by default
......................................................................
net: don't run osmo-gbproxy by default
osmo-gbproxy is not part of any of the convenience make targets in
gen_makefile.py (cn, cn-bsc, usrp). When using the typical workflow of
building one of these convenience targets first, then attempting to run
the network, the osmo-gbproxy window just says command not found.
With the default config_2g3g, it is not needed when only using one BTS,
so add a new config variable GBPROXY_RUN_IN_OSMO_DEV=0 and use it in
run.sh.
Change-Id: Ib1349809997ea6062ec3c43df92abab9fbfad1ea
---
M net/config_2g3g
M net/templates/run.sh
2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/49/27449/1
diff --git a/net/config_2g3g b/net/config_2g3g
index 2149c39..bd27cf7 100644
--- a/net/config_2g3g
+++ b/net/config_2g3g
@@ -79,6 +79,7 @@
GBPROXY_IP="${TO_RAN_IP}"
GBPROXY_GB_PORT=7777
+GBPROXY_RUN_IN_OSMO_DEV=0
PCU_GB_LOCAL_PORT=23000
diff --git a/net/templates/run.sh b/net/templates/run.sh
index e1cf226..a5a8720 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -238,7 +238,11 @@
term "$hlr" HLR
term "$sgsn" SGSN
-term "$gbproxy" GBPROXY
+
+if [ "${GBPROXY_RUN_IN_OSMO_DEV}" = 1 ]; then
+ term "$gbproxy" GBPROXY
+fi
+
term "$mgw4msc" MGW4MSC
term "$msc" MSC
term "$hnbgw" HNBGW
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27449
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ib1349809997ea6062ec3c43df92abab9fbfad1ea
Gerrit-Change-Number: 27449
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange