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

Update router_topo.py #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
21 changes: 15 additions & 6 deletions routers/router_topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down