osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/27457 )
Change subject: net/templates/run: one variable for stp4cn/stp4ran
......................................................................
net/templates/run: one variable for stp4cn/stp4ran
Make it consistent with osmo-mgw and osmo-bsc where we also have more
than one config, and the config is not part of the variable.
Change-Id: I83301d75814070c29c6362c59fade9044aa2c0cc
---
M net/templates/run.sh
1 file changed, 4 insertions(+), 5 deletions(-)
Approvals:
osmith: Looks good to me, approved; Verified
diff --git a/net/templates/run.sh b/net/templates/run.sh
index 1b4bcdd..a73f645 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -199,8 +199,7 @@
#mgw="strace osmo-mgw"
mgw="osmo-mgw"
hlr="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-hlr --db-upgrade"
-stp4cn="osmo-stp -c osmo-stp-cn.cfg"
-stp4ran="osmo-stp -c osmo-stp-ran.cfg"
+stp="osmo-stp"
bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc"
bscnat="osmo-bsc-nat"
bts="osmo-bts-virtual"
@@ -250,10 +249,10 @@
term "$ggsn" GGSN
if [ "${STP_CN_IP}" = "${STP_RAN_IP}" ]; then
- term "$stp4cn" STP
+ term "$stp -c osmo-stp-cn.cfg" STP
else
- term "$stp4cn" STP4CN
- term "$stp4ran" STP4RAN
+ term "$stp -c osmo-stp-cn.cfg" STP4CN
+ term "$stp -c osmo-stp-ran.cfg" 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/+/27457
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I83301d75814070c29c6362c59fade9044aa2c0cc
Gerrit-Change-Number: 27457
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/27458 )
Change subject: net: move cmds for network components to config
......................................................................
net: move cmds for network components to config
Instead of hardcoding wrappers such as gdb for various commands in
run.sh, put all commands into a config file so the user can add
gdb/valgrind/strace/udtrace/... to the program they are currently
interested in debugging in their own config.
Change-Id: Ifce731ab61d263e9df7a8dc87dd572ca3d30f8dd
---
M net/README
M net/config_2g3g
M net/templates/run.sh
3 files changed, 69 insertions(+), 51 deletions(-)
Approvals:
osmith: Looks good to me, approved; Verified
diff --git a/net/README b/net/README
index 3ca15fe..59f5f58 100644
--- a/net/README
+++ b/net/README
@@ -131,6 +131,31 @@
all windows and the whole tmux session. This does work over SSH.
+=== Wrap commands in gdb, valgrind, udtrace etc.
+
+During development it's useful to wrap Osmocom programs inside gdb, valgrind or
+other tools. For each program where you want to do this, copy the CMD_ line
+from config_2g3g to your config and adjust it accordingly.
+
+==== Examples: gdb, valgrind, strace
+
+CMD_MSC="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-msc"
+CMD_MSC="valgrind osmo-msc"
+CMD_MSC="strace osmo-msc"
+
+==== Example: udtrace
+
+To use udtrace on the MNCC socket, use the following with an adjusted
+/path/to/udtrace. Explanation of the enviornment variables:
+- LD_LIBRARY_PATH allows linking to titan if udtrace was compiled with titan
+ support
+- LD_PRELOAD of libasan allows building osmo-msc with the sanitize.opts
+- the tee saves the stderr logging as well as the udtrace output to new file
+ current_log/osmo-msc.out, since udtrace will not show in osmo-msc.log
+
+CMD_MSC="LD_LIBRARY_PATH=/usr/lib/titan LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5:/path/to/udtrace/libudtrace.so osmo-msc 2>&1 | tee -a current_log/osmo-msc.out"
+
+
=== Logging and pcaps
The run.sh script automatically stores all configs, logs and pcap traces in
diff --git a/net/config_2g3g b/net/config_2g3g
index 6111b24..83cef72 100644
--- a/net/config_2g3g
+++ b/net/config_2g3g
@@ -167,3 +167,22 @@
LOG_OUTPUT0_TYPE=stderr
LOG_OUTPUT1_TYPE=file current_log/${_name}.log
LOG_OUTPUT2_TYPE=gsmtap 127.0.0.9
+
+# Commands to execute for various network components. In your config, you can
+# wrap these in gdb, valgrind, strace, udtrace etc. See README for details.
+CMD_BSC="osmo-bsc"
+CMD_BSCNAT="osmo-bsc-nat"
+CMD_BTS="osmo-bts-virtual"
+CMD_FREESWITCH="./freeswitch/freeswitch.sh"
+CMD_GBPROXY="osmo-gbproxy"
+CMD_GGSN="osmo-ggsn"
+CMD_HLR="osmo-hlr"
+CMD_HNBGW="osmo-hnbgw"
+CMD_KAMAILIO="kamailio"
+CMD_MGW="osmo-mgw"
+CMD_MS="mobile"
+CMD_MSC="osmo-msc"
+CMD_SGSN="osmo-sgsn"
+CMD_SIPCON="osmo-sip-connector"
+CMD_STP="osmo-stp"
+CMD_VIRTPHY="virtphy"
diff --git a/net/templates/run.sh b/net/templates/run.sh
index a73f645..a7b0f9a 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -184,41 +184,15 @@
find_term
kill_pids
-hnbgw="osmo-hnbgw"
-msc="gdb -ex run --args $(which osmo-msc)"
-# To enable udtrace on osmo-msc MNCC socket, use this with adjusted /path/to/udtrace:
-# - LD_LIBRARY_PATH allows linking to titan if udtrace was compiled with titan support.
-# - LD_PRELOAD of libasan allows building osmo-msc with the sanitize.opts.
-# - the tee saves the stderr logging as well as the udtrace output to new file current_log/osmo-msc.out, since udtrace
-# will not show in osmo-msc.log
-#msc="LD_LIBRARY_PATH=/usr/lib/titan LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5:/path/to/udtrace/libudtrace.so osmo-msc 2>&1 | tee -a current_log/osmo-msc.out"
-gbproxy="osmo-gbproxy"
-sgsn="osmo-sgsn"
-ggsn="osmo-ggsn"
-#mgw="gdb -ex run --args osmo-mgw"
-#mgw="strace osmo-mgw"
-mgw="osmo-mgw"
-hlr="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-hlr --db-upgrade"
-stp="osmo-stp"
-bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc"
-bscnat="osmo-bsc-nat"
-bts="osmo-bts-virtual"
-virtphy="virtphy -D lo"
-ms="mobile -c mobile.cfg"
-
if [ "x${MSC_MNCC}" != "xinternal" ]; then
- sipcon="osmo-sip-connector -c osmo-sip-connector.cfg"
-
case "${PBX_SERVER}" in
"kamailio")
# Require kamailio (PATH hack is needed for Debian)
- kamailio="$(PATH="$PATH:/usr/sbin:/sbin" which kamailio)"
- if [ -z "$kamailio" ]; then
+ if [ -z "$(PATH="$PATH:/usr/sbin:/sbin" which kamailio)" ]; then
echo "ERROR: kamailio is not installed."
echo "After installing it, make sure that it does *not* run as daemon."
exit 1
fi
- kamailio="$kamailio -f kamailio.cfg -D -e -E"
;;
"freeswitch")
if [ -z "$(which freeswitch)" ]; then
@@ -246,59 +220,59 @@
sudo tcpdump -i lo -n -w current_log/lo.single.pcap -U not port 22 &
echo "$!" > "$PIDFILE_TCPDUMP_LO"
-term "$ggsn" GGSN
+term "${CMD_GGSN}" GGSN
if [ "${STP_CN_IP}" = "${STP_RAN_IP}" ]; then
- term "$stp -c osmo-stp-cn.cfg" STP
+ term "${CMD_STP} -c osmo-stp-cn.cfg" STP
else
- term "$stp -c osmo-stp-cn.cfg" STP4CN
- term "$stp -c osmo-stp-ran.cfg" STP4RAN
- term "$mgw -c osmo-mgw-for-bsc-nat.cfg" MGW4BSCNAT
- term "$bscnat" BSCNAT
+ term "${CMD_STP} -c osmo-stp-cn.cfg" STP4CN
+ term "${CMD_STP} -c osmo-stp-ran.cfg" STP4RAN
+ term "${CMD_MGW} -c osmo-mgw-for-bsc-nat.cfg" MGW4BSCNAT
+ term "${CMD_BSCNAT}" BSCNAT
fi
-term "$hlr" HLR
-term "$sgsn" SGSN
+term "${CMD_HLR} --db-upgrade" HLR
+term "${CMD_SGSN}" SGSN
if [ "${GBPROXY_RUN_IN_OSMO_DEV}" = 1 ]; then
- term "$gbproxy" GBPROXY
+ term "${CMD_GBPROXY}" GBPROXY
fi
-term "$mgw -c osmo-mgw-for-msc.cfg" MGW4MSC
-term "$msc" MSC
-term "$hnbgw" HNBGW
+term "${CMD_MGW} -c osmo-mgw-for-msc.cfg" MGW4MSC
+term "${CMD_MSC}" MSC
+term "${CMD_HNBGW}" HNBGW
if [ "$BSC_COUNT" = 1 ]; then
- term "$mgw -c osmo-mgw-for-bsc-0.cfg" MGW4BSC
- term "$bsc -c osmo-bsc-0.cfg" BSC
+ term "${CMD_MGW} -c osmo-mgw-for-bsc-0.cfg" MGW4BSC
+ term "${CMD_BSC} -c osmo-bsc-0.cfg" BSC
else
- term "$mgw -c osmo-mgw-for-bsc-0.cfg" MGW4BSC0
- term "$mgw -c osmo-mgw-for-bsc-1.cfg" MGW4BSC1
- term "$bsc -c osmo-bsc-0.cfg" BSC0
- term "$bsc -c osmo-bsc-1.cfg" BSC1
+ term "${CMD_MGW} -c osmo-mgw-for-bsc-0.cfg" MGW4BSC0
+ term "${CMD_MGW} -c osmo-mgw-for-bsc-1.cfg" MGW4BSC1
+ term "${CMD_BSC} -c osmo-bsc-0.cfg" BSC0
+ term "${CMD_BSC} -c osmo-bsc-1.cfg" BSC1
fi
${foreach(BTS)}
if [ "${BTSn_RUN_IN_OSMO_DEV}" = 1 ]; then
- term "$bts -c osmo-bts-${BTSn}.cfg" BTS${BTSn}
+ term "${CMD_BTS} -c osmo-bts-${BTSn}.cfg" BTS${BTSn}
fi
${foreach_end}
if [ "${MS_RUN_IN_OSMO_DEV}" = 1 ]; then
- term "$virtphy" VIRTPHY
- term "$ms" MS
+ term "${CMD_VIRTPHY} -D lo" VIRTPHY
+ term "${CMD_MS} -c mobile.cfg" MS
fi
if [ "x${MSC_MNCC}" != "xinternal" ]; then
- term "$sipcon" SIPCON
+ term "${CMD_SIPCON} -c osmo-sip-connector.cfg" SIPCON
case "${PBX_SERVER}" in
"kamailio")
- term "$kamailio" KAMAILIO
+ term "${CMD_KAMAILIO} -f kamailio.cfg -D -e -E" KAMAILIO
;;
"freeswitch")
- term "./freeswitch/freeswitch.sh" FREESWITCH
+ term "${CMD_FREESWITCH}" FREESWITCH
;;
esac
fi
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27458
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ifce731ab61d263e9df7a8dc87dd572ca3d30f8dd
Gerrit-Change-Number: 27458
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/27454 )
Change subject: net/templates/run.sh: only one variable for mgw
......................................................................
net/templates/run.sh: only one variable for mgw
Prepare to add another MGW for the BSCNAT. Use only one variable for the
mgw, always append the -c configfile parameter further below in the
script where it gets used.
Change-Id: I6f3fe11109107b35059ebe731e0a74a91a04504c
---
M net/templates/run.sh
1 file changed, 7 insertions(+), 8 deletions(-)
Approvals:
osmith: Looks good to me, approved; Verified
diff --git a/net/templates/run.sh b/net/templates/run.sh
index c19c081..29e5347 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -185,10 +185,9 @@
gbproxy="osmo-gbproxy"
sgsn="osmo-sgsn"
ggsn="osmo-ggsn"
-mgw4msc="osmo-mgw -c osmo-mgw-for-msc.cfg"
-#mgw4bsc="gdb -ex run --args osmo-mgw"
-#mgw4bsc="strace osmo-mgw"
-mgw4bsc="osmo-mgw"
+#mgw="gdb -ex run --args osmo-mgw"
+#mgw="strace osmo-mgw"
+mgw="osmo-mgw"
hlr="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-hlr --db-upgrade"
stp4cn="osmo-stp -c osmo-stp-cn.cfg"
stp4ran="osmo-stp -c osmo-stp-ran.cfg"
@@ -255,17 +254,17 @@
term "$gbproxy" GBPROXY
fi
-term "$mgw4msc" MGW4MSC
+term "$mgw -c osmo-mgw-for-msc.cfg" MGW4MSC
term "$msc" MSC
term "$hnbgw" HNBGW
if [ "$BSC_COUNT" = 1 ]; then
- term "$mgw4bsc -c osmo-mgw-for-bsc-0.cfg" MGW4BSC
+ term "$mgw -c osmo-mgw-for-bsc-0.cfg" MGW4BSC
term "$bsc -c osmo-bsc-0.cfg" BSC
else
- term "$mgw4bsc -c osmo-mgw-for-bsc-0.cfg" MGW4BSC0
- term "$mgw4bsc -c osmo-mgw-for-bsc-1.cfg" MGW4BSC1
+ term "$mgw -c osmo-mgw-for-bsc-0.cfg" MGW4BSC0
+ term "$mgw -c osmo-mgw-for-bsc-1.cfg" MGW4BSC1
term "$bsc -c osmo-bsc-0.cfg" BSC0
term "$bsc -c osmo-bsc-1.cfg" BSC1
fi
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27454
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I6f3fe11109107b35059ebe731e0a74a91a04504c
Gerrit-Change-Number: 27454
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( 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(-)
Approvals:
osmith: Looks good to me, approved; Verified
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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/27456 )
Change subject: net/templates/run: log name input: display last
......................................................................
net/templates/run: log name input: display last
Make it easier for the user to follow a consistent naming scheme for the
log files if they want do do so, by displaying the last log name.
enter name to save log (last: 2022-03-07_04-test-log-name):
Change-Id: I6c5b64e15d9a8dabaf65022d6b82b69523a3ca6b
---
M net/templates/run.sh
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
osmith: Looks good to me, approved; Verified
diff --git a/net/templates/run.sh b/net/templates/run.sh
index 3165f53..1b4bcdd 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -171,6 +171,16 @@
done
}
+read_log_name() {
+ log_name_last="$(ls -Art "log" | tail -n1)"
+ if [ -n "$log_name_last" ]; then
+ log_name_last=" (last: $log_name_last)"
+ fi
+
+ echo "enter name to save log$log_name_last:"
+ read log_name
+}
+
find_term
kill_pids
@@ -309,8 +319,7 @@
cp *.cfg "$logdir"/
echo
-echo enter name to save log
-read log_name
+read_log_name
if [ -n "$log_name" ]; then
newlogdir="log/$log_name"
#scp "bts:/tmp/{bts,pcu}.log" "bts:neels/osmo-{bts,pcu}.cfg" "$logdir"
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27456
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I6c5b64e15d9a8dabaf65022d6b82b69523a3ca6b
Gerrit-Change-Number: 27456
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( 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(-)
Approvals:
osmith: Looks good to me, approved; Verified
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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( 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(-)
Approvals:
osmith: Looks good to me, approved; Verified
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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged