Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add graph #59

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,28 @@ ue/ping/%:
@# pings from ue1 to ue2
@TARGET=$(shell docker exec -it ue$(@F)-debug bash -c "ip --brief address show uesimtun0|awk '{print \$$3; exit}'|cut -d"/" -f 1");\
docker exec -it ue$(*D)-debug bash -c "ping $$TARGET"

.PHONY: ue/switch-edge
ue/switch-edge/%:
@# swich edge for ue
@UE_IP=$(shell docker exec -it ue$(@F)-debug bash -c "ip --brief address show uesimtun0|awk '{print \$$3; exit}'|cut -d"/" -f 1");\
@UE_IP=$(shell docker exec ue$(@F)-debug bash -c "ip --brief address show uesimtun0|awk '{print \$$3; exit}'|cut -d"/" -f 1");\
scripts/switch.py $(BCONFIG) $$UE_IP

.PHONY: graph/latency-switch
graph/latency-switch:
@echo "[1/6] Configuring testbed"
@$(MAKE) set/dataplane/nextmn-srv6
@$(MAKE) set/nb-ue/1
@$(MAKE) set/nb-edges/2
@echo "[2/6] Starting containers"
@$(MAKE) up
@echo "[3/6] Adding latency on instance s0"
@docker exec s0-debug bash -c "tc qdisc add dev edge-0 root netem delay 5ms"
@sleep 2
@docker exec ue1-debug bash -c "ping -c 1 10.4.0.1 > /dev/null" # check instance is reachable
@echo "[4/6] [$$(date --rfc-3339=seconds)] Scheduling instance switch in 30s"
@bash -c 'sleep 30 && $(MAKE) ue/switch-edge/1 && echo "[5.5/6] [$$(date --rfc-3339=seconds)] Switching to edge 1"' &
@echo "[5/6] [$$(date --rfc-3339=seconds)] Start ping for 60s"
@docker exec ue1-debug bash -c "ping -D -w 60 10.4.0.1 -i 0.1 > /volume/ping.txt"
@echo "[6/6] Stopping containers"
@$(MAKE) down
2 changes: 2 additions & 0 deletions doc/how-to-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
5. `make t/s0`/`make t/s1` and optinaly add latency on an instance with for example `tc qdisc add dev edge-0 root netem delay 20ms`; then start capture with `tshark -i edge-0 -f icmp`
6. `make ue/switch-edge/1` to swich between edges
8. When done with the test, `make d`

Alternatively: `make graph/latency-switch`
Loading