-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_ulcl_simple_topology.sh
More file actions
42 lines (29 loc) · 1.17 KB
/
test_ulcl_simple_topology.sh
File metadata and controls
42 lines (29 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
set -e
PCAP_DIR="./pcaps"
NETWORK_IF="br-free5gc"
echo "Cleaning up previous runs//containers etc..."
#sudo docker compose -f docker-compose-ulcl-build.yaml down -v
sudo rm -rf "$PCAP_DIR"
mkdir -p "$PCAP_DIR"
#echo "Building and starting the network topology that contain one i-upf and psa-upf..."
#sudo docker compose -f docker-compose-ulcl-build.yaml up -d --build
#echo "Waiting for core services (docker containers) to init..."
#sleep 30
echo "Starting tcpdump on the Docker network interface ($NETWORK_IF)..."
sudo timeout 60 tcpdump -i "$NETWORK_IF" -w "$PCAP_DIR"/ulcl_test.pcap &
TCPDUMP_PID=$!
echo " running UE attach and PDU session..."
sudo docker exec ueransim ./nr-ue -c config/uecfg.yaml > "$PCAP_DIR"/ueransim_output.log 2>&1 &
UE_PID=$!
sleep 90
echo "Stopping tcpdump..."
sudo kill -2 $TCPDUMP_PID
wait $TCPDUMP_PID 2>/dev/null || true
#echo "Cleaning up UERANSIM process..."
#kill -9 $UE_PID 2>/dev/null || true
echo "test completed;; PCAP saved to: $PCAP_DIR/ulcl_test.pcap"
echo "ueransim output saved to: $PCAP_DIR/ueransim_output.log"
#echo "shutting down the network..."
#sudo docker compose -f docker-compose-ulcl-build.yaml down -v
echo "ALl done"