Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Commit 4f8ea00

Browse files
author
Hiroki Shirokura
committed
Add examples/basic_rift
1 parent e159100 commit 4f8ea00

File tree

8 files changed

+195
-0
lines changed

8 files changed

+195
-0
lines changed

examples/basic_rift/README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
# RIFT: Routing In Fat Tree
3+
4+
This is evaluation of rift-python powered by IETF.
5+
6+
- draft-ietf-rift-rift-03 https://tools.ietf.org/html/draft-ietf-rift-rift-03
7+
- rift-python https://github.com/brunorijsman/rift-python
8+
- juniper's explanation (ppt) https://www.ripe.net/participate/forms/uploads/fobi_plugins/file/see7/Szarkowicz_RIFT_RIPE_TM_bbd50ec4-6dab-4c14-acea-1e767ef7f9da.pptx
9+
- Kobayashi-san's good explanation jp, (this is talking about rift-01).
10+
https://www.slideshare.net/MasayukiKobayashi/rift-a-new-routing-protocol-for-ip-fabrics
11+
- Miyasaka-san's good explanation jp about IETF100-report that includes about RIFT.
12+
https://www.isoc.jp/wiki.cgi?action=ATTACH&file=s4%2Dmiyasaka%2Epdf&page=IETF100Update
13+
14+
15+
![](./topo.png)
16+
17+
```
18+
tn upconf | sudo sh
19+
docker exec -it Spine1 telnet localhost `docker exec Spine1 cat /rift`
20+
Trying 127.0.0.1...
21+
Connected to localhost.
22+
Escape character is '^]'.
23+
Spine1> show interfaces
24+
+-----------+------------+-----------+-----------+
25+
| Interface | Neighbor | Neighbor | Neighbor |
26+
| Name | Name | System ID | State |
27+
+-----------+------------+-----------+-----------+
28+
| net0 | Leaf1:net0 | 1001 | THREE_WAY |
29+
+-----------+------------+-----------+-----------+
30+
| net1 | Leaf2:net0 | 1002 | THREE_WAY |
31+
+-----------+------------+-----------+-----------+
32+
```
33+
34+
Basically In the RIFT world, Southbound side was received to-Northbound-route
35+
as a default-route (0.0.0.0/0, 0::/0). We can check that with following cli
36+
```
37+
docker exec Leaf1 ip -4 route list
38+
default proto 99
39+
nexthop via 99.1.2.2 dev net0 weight 2
40+
nexthop via 99.3.4.4 dev net1 weight 2
41+
77.1.0.0/24 dev net2 proto kernel scope link src 77.1.0.1
42+
99.1.2.0/24 dev net0 proto kernel scope link src 99.1.2.1
43+
99.3.4.0/24 dev net1 proto kernel scope link src 99.3.4.3
44+
```
45+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nr-leaf-nodes-per-pod: 2
2+
nr-spine-nodes-per-pod: 2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
shards:
2+
- id: 0
3+
nodes:
4+
- name: Leaf1
5+
level: 0
6+
systemid: 1001
7+
interfaces:
8+
- name: net0 # leaf1:net0 -> spine1:net0
9+
- name: net1 # leaf1:net1 -> spine2:net0
10+
- name: net2
11+
v4prefixes:
12+
- address: 88.0.1.1
13+
mask: 32
14+
metric: 1
15+
- address: 77.1.0.0
16+
mask: 24
17+
metric: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
shards:
2+
- id: 0
3+
nodes:
4+
- name: Leaf2
5+
level: 0
6+
systemid: 1002
7+
interfaces:
8+
- name: net0 # leaf2:net0 -> spine1:net1
9+
- name: net1 # leaf2:net1 -> spine2:net1
10+
- name: net2
11+
v4prefixes:
12+
- address: 88.0.2.1
13+
mask: 32
14+
metric: 1
15+
- address: 77.2.0.0
16+
mask: 24
17+
metric: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
shards:
2+
- id: 0
3+
nodes:
4+
- name: Spine1
5+
level: 1
6+
systemid: 101
7+
interfaces:
8+
- name: net0 # spine1:net0 -> leaf1:net0
9+
- name: net1 # spine1:net1 -> leaf2:net0
10+
v4prefixes:
11+
- address: 88.1.1.1
12+
mask: 32
13+
metric: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
shards:
2+
- id: 0
3+
nodes:
4+
- name: Spine2
5+
level: 1
6+
systemid: 102
7+
interfaces:
8+
- name: net0 # spine2:net0 -> leaf1:net1
9+
- name: net1 # spine2:net1 -> leaf2:net1
10+
v4prefixes:
11+
- address: 88.1.2.1
12+
mask: 32
13+
metric: 1

examples/basic_rift/spec.yaml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
2+
postinit:
3+
- cmds:
4+
- cmd: docker cp ietf_rift_python/rift_spine1.yaml Spine1:/root/config.yaml
5+
- cmd: docker cp ietf_rift_python/rift_spine2.yaml Spine2:/root/config.yaml
6+
- cmd: docker cp ietf_rift_python/rift_leaf1.yaml Leaf1:/root/config.yaml
7+
- cmd: docker cp ietf_rift_python/rift_leaf2.yaml Leaf2:/root/config.yaml
8+
9+
nodes:
10+
- name: Spine1
11+
image: slankdev/rift:ietf-rift-03
12+
interfaces:
13+
- { name: net0, type: direct, args: Leaf1#net0 }
14+
- { name: net1, type: direct, args: Leaf2#net0 }
15+
- name: Spine2
16+
image: slankdev/rift:ietf-rift-03
17+
interfaces:
18+
- { name: net0, type: direct, args: Leaf1#net1 }
19+
- { name: net1, type: direct, args: Leaf2#net1 }
20+
- name: Leaf1
21+
image: slankdev/rift:ietf-rift-03
22+
interfaces:
23+
- { name: net0, type: direct, args: Spine1#net0 }
24+
- { name: net1, type: direct, args: Spine2#net0 }
25+
- { name: net2, type: direct, args: Serv1#net0 }
26+
- name: Leaf2
27+
image: slankdev/rift:ietf-rift-03
28+
interfaces:
29+
- { name: net0, type: direct, args: Spine1#net1 }
30+
- { name: net1, type: direct, args: Spine2#net1 }
31+
- { name: net2, type: direct, args: Serv2#net0 }
32+
- name: Serv1
33+
image: slankdev/ubuntu:18.04
34+
interfaces: [ { name: net0, type: direct, args: Leaf1#net2 } ]
35+
- name: Serv2
36+
image: slankdev/ubuntu:18.04
37+
interfaces: [ { name: net0, type: direct, args: Leaf2#net2 } ]
38+
39+
node_configs:
40+
- name: Spine1
41+
cmds:
42+
- cmd: ip addr add 88.1.1.1/32 dev lo
43+
- cmd: ip addr add 99.1.2.2/24 dev net0
44+
- cmd: ip addr add 99.5.6.6/24 dev net1
45+
- cmd: >-
46+
nohup bash -c "source rift-python/env/bin/activate;
47+
python rift-python/rift --telnet-port-file /rift config.yaml" &
48+
- name: Spine2
49+
cmds:
50+
- cmd: ip addr add 88.1.2.1/32 dev lo
51+
- cmd: ip addr add 99.3.4.4/24 dev net0
52+
- cmd: ip addr add 99.7.8.8/24 dev net1
53+
- cmd: >-
54+
nohup bash -c "source rift-python/env/bin/activate;
55+
python rift-python/rift --telnet-port-file /rift config.yaml" &
56+
- name: Leaf1
57+
cmds:
58+
- cmd: ip addr add 88.0.1.1/32 dev lo
59+
- cmd: ip addr add 99.1.2.1/24 dev net0
60+
- cmd: ip addr add 99.3.4.3/24 dev net1
61+
- cmd: ip addr add 77.1.0.1/24 dev net2
62+
- cmd: >-
63+
nohup bash -c "source rift-python/env/bin/activate;
64+
python rift-python/rift --telnet-port-file /rift config.yaml" &
65+
- name: Leaf2
66+
cmds:
67+
- cmd: ip addr add 88.0.2.1/32 dev lo
68+
- cmd: ip addr add 99.5.6.5/24 dev net0
69+
- cmd: ip addr add 99.7.8.7/24 dev net1
70+
- cmd: ip addr add 77.2.0.1/24 dev net2
71+
- cmd: >-
72+
nohup bash -c "source rift-python/env/bin/activate;
73+
python rift-python/rift --telnet-port-file /rift config.yaml" &
74+
- name: Serv1
75+
cmds:
76+
- cmd: ip addr add 77.1.0.2/24 dev net0
77+
- cmd: ip route add default via 77.1.0.1
78+
- name: Serv2
79+
cmds:
80+
- cmd: ip addr add 77.2.0.2/24 dev net0
81+
- cmd: ip route add default via 77.2.0.1
82+
83+
test:
84+
- name: p2p
85+
cmds:
86+
- cmd: echo slankdev slankdev
87+
- cmd: echo slankdev slankdev
88+

examples/basic_rift/topo.png

117 KB
Loading

0 commit comments

Comments
 (0)