mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-30 13:35:19 +00:00
24 lines
887 B
Bash
Executable File
24 lines
887 B
Bash
Executable File
#!/bin/sh
|
|
|
|
ip netns add peerns
|
|
ip link add veth0 type veth peer name veth1
|
|
ifconfig veth0 192.168.2.1/24 up
|
|
echo "1"
|
|
#tc qdisc add dev veth0 root tbf rate 8mbit burst 8192 latency 1ms
|
|
#tc qdisc add dev veth0 root netem delay 50ms 5ms distribution normal
|
|
echo "2"
|
|
ip link set veth1 netns peerns
|
|
ip netns exec peerns ifconfig veth1 192.168.2.2/24 up
|
|
echo "3"
|
|
#ip netns exec peerns tc qdisc add dev veth1 root tbf rate 8mbit burst 8192 latency 1ms
|
|
#ip netns exec peerns tc qdisc add dev veth1 root netem delay 50ms 5ms distribution normal
|
|
echo "4"
|
|
ip netns exec peerns ip addr list
|
|
#ip netns exec peerns ./run -useconf=conf2.json
|
|
ip netns exec peerns ip link set dev lo up
|
|
ip netns exec peerns ./run -autoconf -pprof
|
|
#GODEBUG=gctrace=1 ip netns exec peerns ./run -autoconf
|
|
#ip netns exec peerns ./run -useconf=conf2.json -cpuprofile=cpu2.prof -memprofile=mem2.prof
|
|
#ip netns delete peerns
|
|
|