2017-12-28 22:16:20 -06:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
ip netns add peerns3
|
|
|
|
ip link add veth23 type veth peer name veth32
|
|
|
|
ip link set veth23 netns peerns
|
|
|
|
ip netns exec peerns ifconfig veth23 192.168.3.1/24 up
|
|
|
|
#ip netns exec peerns tc qdisc add dev veth23 root tbf rate 8mbit burst 8192 latency 1ms
|
|
|
|
#ip netns exec peerns tc qdisc add dev veth23 root netem delay 50ms 5ms distribution normal
|
|
|
|
ip link set veth32 netns peerns3
|
|
|
|
ip netns exec peerns3 ifconfig veth32 192.168.3.2/24 up
|
|
|
|
#ip netns exec peerns3 tc qdisc add dev veth32 root tbf rate 8mbit burst 8192 latency 1ms
|
|
|
|
#ip netns exec peerns3 tc qdisc add dev veth32 root netem delay 50ms 5ms distribution normal
|
|
|
|
ip netns exec peerns3 ip route add 192.168.2.0/24 via 192.168.3.1
|
|
|
|
|
|
|
|
#ip link add veth13 type veth peer name veth31
|
|
|
|
#ifconfig veth13 192.168.4.1/24 up
|
|
|
|
#ip netns exec peerns tc qdisc add dev veth23 root tbf rate 8mbit burst 8192 latency 1ms
|
|
|
|
#ip netns exec peerns tc qdisc add dev veth23 root netem delay 50ms 5ms distribution normal
|
|
|
|
#ip link set veth31 netns peerns3
|
|
|
|
#ip netns exec peerns3 ifconfig veth32 192.168.4.3/24 up
|
|
|
|
#ip netns exec peerns3 tc qdisc add dev veth32 root tbf rate 8mbit burst 8192 latency 1ms
|
|
|
|
#ip netns exec peerns3 tc qdisc add dev veth32 root netem delay 50ms 5ms distribution normal
|
|
|
|
#ip netns exec peerns3 ip route add 192.168.2.0/24 via 192.168.3.1
|
|
|
|
|
|
|
|
ip netns exec peerns3 ip addr list
|
|
|
|
#ip netns exec peerns3 ./run -useconf=conf3.json
|
2018-02-03 14:14:35 -06:00
|
|
|
ip netns exec peerns3 ifconfig lo up
|
2017-12-28 22:16:20 -06:00
|
|
|
ip netns exec peerns3 ./run -autoconf
|
|
|
|
#ip netns delete peerns3
|