diff --git a/routers/router_topo.py b/routers/router_topo.py index 69d3210..397e882 100755 --- a/routers/router_topo.py +++ b/routers/router_topo.py @@ -129,18 +129,27 @@ def run(): info(net['r2'].cmd("ip route add 10.101.0.0/24 via 10.103.0.2 dev r2-eth3 metric 200")) info(net['r3'].cmd("ip route add 10.0.0.0/24 via 10.101.0.1 dev r3-eth2")) - info(net['r3'].cmd("ip route add 10.3.0.0/24 via 10.102.0.2 dev r3-eth3")) + info(net['r3'].cmd("ip route add 10.3.0.0/24 via 10.102.0.2 dev r3-eth3 metric 100")) + info(net['r3'].cmd("ip route add 10.3.0.0/24 via 10.101.0.1 dev r3-eth2 metric 200")) info(net['r3'].cmd("ip route add 10.1.0.0/24 via 10.102.0.2 dev r3-eth3 metric 100")) info(net['r3'].cmd("ip route add 10.1.0.0/24 via 10.101.0.1 dev r3-eth2 metric 200")) - info(net['r3'].cmd("ip route add 10.103.0.0/24 via 10.102.0.2 dev r3-eth3")) - info(net['r3'].cmd("ip route add 10.100.0.0/24 via 10.101.0.1 dev r3-eth2")) + info(net['r3'].cmd("ip route add 10.103.0.0/24 via 10.102.0.2 dev r3-eth3 metric 100")) + info(net['r3'].cmd("ip route add 10.103.0.0/24 via 10.101.0.1 dev r3-eth2 metric 200")) + info(net['r3'].cmd("ip route add 10.100.0.0/24 via 10.101.0.1 dev r3-eth2 metric 100")) + info(net['r3'].cmd("ip route add 10.100.0.0/24 via 10.102.0.2 dev r3-eth3 metric 200")) + - info(net['r4'].cmd("ip route add 10.1.0.0/24 via 10.103.0.1 dev r4-eth3")) - info(net['r4'].cmd("ip route add 10.2.0.0/24 via 10.102.0.1 dev r4-eth2")) + info(net['r4'].cmd("ip route add 10.1.0.0/24 via 10.103.0.1 dev r4-eth3 metric 100")) + info(net['r4'].cmd("ip route add 10.1.0.0/24 via 10.102.0.1 dev r4-eth2 metric 200")) + info(net['r4'].cmd("ip route add 10.2.0.0/24 via 10.102.0.1 dev r4-eth2 metric 100")) + info(net['r4'].cmd("ip route add 10.2.0.0/24 via 10.103.0.1 dev r4-eth3 metric 200")) info(net['r4'].cmd("ip route add 10.0.0.0/24 via 10.102.0.1 dev r4-eth2 metric 100")) info(net['r4'].cmd("ip route add 10.0.0.0/24 via 10.103.0.1 dev r4-eth3 metric 200")) - info(net['r4'].cmd("ip route add 10.101.0.0/24 via 10.102.0.1 dev r4-eth2")) + info(net['r4'].cmd("ip route add 10.101.0.0/24 via 10.102.0.1 dev r4-eth2 metric 100")) + info(net['r4'].cmd("ip route add 10.101.0.0/24 via 10.103.0.1 dev r4-eth3 metric 200")) info(net['r4'].cmd("ip route add 10.103.0.0/24 via 10.103.0.1 dev r4-eth3")) + info(net['r3'].cmd("ip route add 10.100.0.0/24 via 10.102.0.1 dev r4-eth2 metric 100")) + info(net['r3'].cmd("ip route add 10.100.0.0/24 via 10.103.0.1 dev r4-eth3 metric 200")) net.start() CLI(net)