Skip to content

Commit 19cd6d9

Browse files
committed
network topology generation
1 parent 5dedd2b commit 19cd6d9

32 files changed

+47546
-3
lines changed

examples/scion/S08-topo-generation-01/1221_r0.cch

Lines changed: 378 additions & 0 deletions
Large diffs are not rendered by default.

examples/scion/S08-topo-generation-01/15_geo_rel.xml

Lines changed: 4746 additions & 0 deletions
Large diffs are not rendered by default.

examples/scion/S08-topo-generation-01/5_geo_rel.xml

Lines changed: 1218 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env python3
2+
3+
from seedemu.compiler import Docker,Graphviz
4+
from seedemu.generators import DefaultScionGenerator, CommonRouterForAllIF
5+
from seedemu.generators.providers import CaidaDataProvider
6+
from seedemu.core import Emulator, Binding, Filter
7+
from seedemu.core.enums import NetworkType
8+
from seedemu.generators.intra import IntraASTopoReader,ASTopology, TopoFormat
9+
from seedemu.layers import ScionBase, ScionRouting, ScionIsd, Scion,Ospf,Ibgp
10+
from seedemu.layers.Scion import LinkType as ScLinkType
11+
12+
""" ___ _____ __ __ __
13+
/ | / ___/ / /_____ ____ ____ / /___ ____ ___ __ ________ ____ _____/ /__ _____
14+
/ /| | \__ \ / __/ __ \/ __ \/ __ \/ / __ \/ __ `/ / / / / ___/ _ \/ __ `/ __ / _ \/ ___/
15+
/ ___ |___/ / / /_/ /_/ / /_/ / /_/ / / /_/ / /_/ / /_/ / / / / __/ /_/ / /_/ / __/ /
16+
/_/ |_/____/ \__/\____/ .___/\____/_/\____/\__, /\__, / /_/ \___/\__,_/\__,_/\___/_/
17+
/_/ /____//____/ 2024
18+
"""
19+
20+
provider = CaidaDataProvider("5_geo_rel.xml")
21+
22+
generator = DefaultScionGenerator(provider,CommonRouterForAllIF)
23+
24+
emu = generator.generate(2,7)
25+
26+
27+
base = emu.getLayer('Base')
28+
reg = emu.getRegistry()
29+
for asn in provider.getASes():
30+
31+
_as = base.getAutonomousSystem(asn)
32+
_as.setBeaconingIntervals('90s', '90s', '90s')
33+
host = _as.createHost('host00')
34+
for netname in _as.getNetworks():
35+
net = _as.getNetwork(netname)
36+
if net.getType() == NetworkType.Local:
37+
host.joinNetwork(net.getName())
38+
break
39+
40+
41+
42+
emu.render()
43+
44+
# Compilation
45+
emu.compile(Docker(), './output')
46+
#emu.compile(Graphviz(), './output_graph')
47+
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
0 1
2+
0 2
3+
0 3
4+
0 4
5+
0 5
6+
1 11
7+
1 12
8+
1 13
9+
1 14
10+
2 30
11+
2 12
12+
2 38
13+
2 39
14+
3 116
15+
3 135
16+
3 13
17+
3 155
18+
4 30
19+
4 135
20+
4 32
21+
4 170
22+
5 171
23+
11 15
24+
11 16
25+
11 17
26+
11 18
27+
12 16
28+
12 40
29+
12 41
30+
13 118
31+
13 17
32+
13 158
33+
14 359
34+
15 20
35+
15 21
36+
15 22
37+
15 23
38+
16 21
39+
16 43
40+
16 44
41+
17 121
42+
17 22
43+
17 159
44+
18 369
45+
20 25
46+
20 26
47+
20 27
48+
20 28
49+
21 26
50+
21 47
51+
21 48
52+
22 125
53+
22 27
54+
22 163
55+
23 377
56+
25 30
57+
25 31
58+
25 32
59+
25 33
60+
26 31
61+
26 49
62+
26 50
63+
27 130
64+
27 32
65+
27 164
66+
28 385
67+
30 35
68+
30 36
69+
31 35
70+
31 56
71+
31 57
72+
32 132
73+
32 166
74+
33 393
75+
35 38
76+
35 58
77+
35 59
78+
36 401
79+
38 40
80+
38 61
81+
38 62
82+
39 410
83+
40 43
84+
40 66
85+
40 67
86+
41 413
87+
43 47
88+
43 72
89+
43 73
90+
44 421
91+
47 49
92+
47 76
93+
47 77
94+
48 432
95+
49 56
96+
49 78
97+
49 79
98+
50 446
99+
56 58
100+
56 81
101+
56 82
102+
57 478
103+
58 61
104+
58 84
105+
58 85
106+
59 481
107+
61 66
108+
61 89
109+
61 90
110+
62 487
111+
66 72
112+
66 91
113+
66 92
114+
67 499
115+
72 76
116+
72 94
117+
72 95
118+
73 519
119+
76 78
120+
76 98
121+
76 99
122+
77 530
123+
78 81
124+
78 103
125+
78 104
126+
79 533
127+
81 84
128+
81 109
129+
81 110
130+
82 539
131+
84 89
132+
84 111
133+
84 112
134+
85 589
135+
89 91
136+
89 116
137+
89 117
138+
90 681
139+
91 94
140+
91 118
141+
91 119
142+
92 697
143+
94 98
144+
94 121
145+
94 122
146+
95 707
147+
98 103
148+
98 125
149+
98 126
150+
99 719
151+
103 109
152+
103 130
153+
103 131
154+
104 731
155+
109 111
156+
109 132
157+
109 133
158+
110 746
159+
111 116
160+
111 135
161+
111 136
162+
112 749
163+
116 118
164+
116 140
165+
117 761
166+
118 121
167+
118 141
168+
119 764
169+
121 125
170+
121 143
171+
122 774
172+
125 130
173+
125 146
174+
126 786
175+
130 132
176+
130 148
177+
131 798
178+
132 135
179+
132 152
180+
133 801
181+
135 153
182+
136 810
183+
140 822
184+
141 825
185+
143 835
186+
146 847
187+
148 856
188+
152 868
189+
153 871
190+
155 880
191+
158 892
192+
159 895
193+
163 907
194+
164 910
195+
166 917
196+
170 929
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
0 1
2+
0 2
3+
0 3
4+
0 4
5+
0 5
6+
1 11
7+
1 12
8+
1 13
9+
1 14
10+
2 30
11+
2 12
12+
2 38
13+
2 39
14+
3 116
15+
3 135
16+
3 13
17+
3 155
18+
4 30
19+
4 135
20+
4 32
21+
4 170
22+
11 15
23+
11 16
24+
11 17
25+
11 18
26+
12 16
27+
12 40
28+
12 41
29+
13 118
30+
13 17
31+
13 158
32+
30 25
33+
30 35
34+
30 36
35+
38 35
36+
38 40
37+
38 61
38+
38 62
39+
116 89
40+
116 111
41+
116 118
42+
116 140
43+
135 111
44+
135 132
45+
135 153
46+
32 25
47+
32 27
48+
32 132
49+
32 166
50+
15 20
51+
15 21
52+
15 22
53+
15 23
54+
16 21
55+
16 43
56+
16 44
57+
17 121
58+
17 22
59+
17 159
60+
40 43
61+
40 66
62+
40 67
63+
118 91
64+
118 121
65+
118 141
66+
20 25
67+
20 26
68+
20 27
69+
20 28
70+
21 26
71+
21 47
72+
21 48
73+
22 125
74+
22 27
75+
22 163
76+
43 47
77+
43 72
78+
43 73
79+
121 94
80+
121 125
81+
121 143
82+
25 31
83+
25 33
84+
26 31
85+
26 49
86+
26 50
87+
27 130
88+
27 164
89+
47 49
90+
47 76
91+
47 77
92+
125 98
93+
125 130
94+
125 146
95+
31 35
96+
31 56
97+
31 57
98+
49 56
99+
49 78
100+
49 79
101+
130 103
102+
130 132
103+
130 148
104+
35 58
105+
35 59
106+
56 58
107+
56 81
108+
56 82
109+
132 109
110+
132 152
111+
58 61
112+
58 84
113+
58 85
114+
61 66
115+
61 89
116+
61 90
117+
66 72
118+
66 91
119+
66 92
120+
72 76
121+
72 94
122+
72 95
123+
76 78
124+
76 98
125+
76 99
126+
78 81
127+
78 103
128+
78 104
129+
81 84
130+
81 109
131+
81 110
132+
84 89
133+
84 111
134+
84 112
135+
89 91
136+
89 117
137+
91 94
138+
91 119
139+
94 98
140+
94 122
141+
98 103
142+
98 126
143+
103 109
144+
103 131
145+
109 111
146+
109 133
147+
111 136

0 commit comments

Comments
 (0)