Skip to content

Commit c0c6e69

Browse files
authored
fix t0-isolated-d96u32s2 topo (sonic-net#17110)
What is the motivation for this PR? Fixed port mapping: first 16 ports are uplink, the rest of the ports are downlink. Updated generate_topo.py to match with the correct port-mapping. How did you verify/test it? Verified in local testbed.
1 parent fd08059 commit c0c6e69

File tree

2 files changed

+92
-83
lines changed

2 files changed

+92
-83
lines changed

ansible/generate_topo.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
"panel_port_step": 2},
3232
'o128': {"ds_breakout": 2, "us_breakout": 2, "ds_link_step": 1, "us_link_step": 1,
3333
"panel_port_step": 1},
34+
'o128t0': {"ds_breakout": 2, "us_breakout": 2, "ds_link_step": 1, "us_link_step": 1,
35+
'uplink_ports': list(range(16)), 'peer_ports': [64, 65],
36+
'skip_ports': [],
37+
"panel_port_step": 1},
3438
'c256-sparse': {"ds_breakout": 8, "us_breakout": 8, "ds_link_step": 8, "us_link_step": 8,
3539
"panel_port_step": 2},
3640
'c224o8-sparse': {"ds_breakout": 8, "us_breakout": 2, "ds_link_step": 8, "us_link_step": 2,
@@ -108,6 +112,9 @@ class HostInterface:
108112
def __init__(self, port_id: int):
109113
self.port_id = port_id
110114

115+
def __repr__(self):
116+
return f"HostInterface(port_id={self.port_id})"
117+
111118

112119
class Vlan:
113120
""" Class to represent a VLAN in the topology """
@@ -292,14 +299,16 @@ def main(role: str, keyword: str, template: str, port_count: int, uplinks: str,
292299
- ./generate_topo.py -r t1 -k isolated -t t1-isolated -c 64 -u 12,16,44,48 -l 'c224o8'
293300
- ./generate_topo.py -r t1 -k isolated -t t1-isolated -c 64 -u 12,16,44,48 -l 'c224o8-sparse' -s 16,44,48
294301
- ./generate_topo.py -r t0 -k isolated -t t0-isolated -c 64 -u 25,26,27,28,29,30,31,32 -l 'o128'
302+
- ./generate_topo.py -r t0 -k isolated -t t0-isolated -c 64 -p 64,65 -l 'o128t0'
295303
- ./generate_topo.py -r t0 -k isolated -t t0-isolated -c 64 -u 8,10,12,14,16,18,20,22,40,42,44,46,48,50,52,54 \
296304
-p 64,65 -l 'c256'
297305
- ./generate_topo.py -r t0 -k isolated -t t0-isolated -c 64 -u 8,10,12,14,16,18,20,22,40,42,44,46,48,50,52,54 \
298306
-p 64,65 -l 'c256-sparse'
299307
"""
300-
uplink_ports = [int(port) for port in uplinks.split(",")] if uplinks != "" else []
301-
peer_ports = [int(port) for port in peers.split(",")] if peers != "" else []
302-
skip_ports = [int(port) for port in skips.split(",")] if skips != "" else []
308+
uplink_ports = [int(port) for port in uplinks.split(",")] if uplinks != "" else \
309+
hw_port_cfg[link_cfg]['uplink_ports']
310+
peer_ports = [int(port) for port in peers.split(",")] if peers != "" else hw_port_cfg[link_cfg]['peer_ports']
311+
skip_ports = [int(port) for port in skips.split(",")] if skips != "" else hw_port_cfg[link_cfg]['skip_ports']
303312

304313
vm_list, downlinkif_list, uplinkif_list = generate_topo(role, port_count, uplink_ports, peer_ports,
305314
skip_ports, link_cfg)

ansible/vars/topo_t0-isolated-d96u32s2.yml

+80-80
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
11
topology:
22
host_interfaces:
3-
- 0
4-
- 1
5-
- 2
6-
- 3
7-
- 4
8-
- 5
9-
- 6
10-
- 7
11-
- 8
12-
- 9
13-
- 10
14-
- 11
15-
- 12
16-
- 13
17-
- 14
18-
- 15
19-
- 16
20-
- 17
21-
- 18
22-
- 19
23-
- 20
24-
- 21
25-
- 22
26-
- 23
27-
- 24
3+
- 32
4+
- 33
5+
- 34
6+
- 35
7+
- 36
8+
- 37
9+
- 38
10+
- 39
11+
- 40
2812
- 41
2913
- 42
3014
- 43
@@ -73,6 +57,22 @@ topology:
7357
- 86
7458
- 87
7559
- 88
60+
- 89
61+
- 90
62+
- 91
63+
- 92
64+
- 93
65+
- 94
66+
- 95
67+
- 96
68+
- 97
69+
- 98
70+
- 99
71+
- 100
72+
- 101
73+
- 102
74+
- 103
75+
- 104
7676
- 105
7777
- 106
7878
- 107
@@ -99,131 +99,131 @@ topology:
9999
VMs:
100100
ARISTA01T1:
101101
vlans:
102-
- 25
102+
- 0
103103
vm_offset: 0
104104
ARISTA02T1:
105105
vlans:
106-
- 26
106+
- 1
107107
vm_offset: 1
108108
ARISTA03T1:
109109
vlans:
110-
- 27
110+
- 2
111111
vm_offset: 2
112112
ARISTA04T1:
113113
vlans:
114-
- 28
114+
- 3
115115
vm_offset: 3
116116
ARISTA05T1:
117117
vlans:
118-
- 29
118+
- 4
119119
vm_offset: 4
120120
ARISTA06T1:
121121
vlans:
122-
- 30
122+
- 5
123123
vm_offset: 5
124124
ARISTA07T1:
125125
vlans:
126-
- 31
126+
- 6
127127
vm_offset: 6
128128
ARISTA08T1:
129129
vlans:
130-
- 32
130+
- 7
131131
vm_offset: 7
132132
ARISTA09T1:
133133
vlans:
134-
- 33
134+
- 8
135135
vm_offset: 8
136136
ARISTA10T1:
137137
vlans:
138-
- 34
138+
- 9
139139
vm_offset: 9
140140
ARISTA11T1:
141141
vlans:
142-
- 35
142+
- 10
143143
vm_offset: 10
144144
ARISTA12T1:
145145
vlans:
146-
- 36
146+
- 11
147147
vm_offset: 11
148148
ARISTA13T1:
149149
vlans:
150-
- 37
150+
- 12
151151
vm_offset: 12
152152
ARISTA14T1:
153153
vlans:
154-
- 38
154+
- 13
155155
vm_offset: 13
156156
ARISTA15T1:
157157
vlans:
158-
- 39
158+
- 14
159159
vm_offset: 14
160160
ARISTA16T1:
161161
vlans:
162-
- 40
162+
- 15
163163
vm_offset: 15
164164
ARISTA17T1:
165165
vlans:
166-
- 89
166+
- 16
167167
vm_offset: 16
168168
ARISTA18T1:
169169
vlans:
170-
- 90
170+
- 17
171171
vm_offset: 17
172172
ARISTA19T1:
173173
vlans:
174-
- 91
174+
- 18
175175
vm_offset: 18
176176
ARISTA20T1:
177177
vlans:
178-
- 92
178+
- 19
179179
vm_offset: 19
180180
ARISTA21T1:
181181
vlans:
182-
- 93
182+
- 20
183183
vm_offset: 20
184184
ARISTA22T1:
185185
vlans:
186-
- 94
186+
- 21
187187
vm_offset: 21
188188
ARISTA23T1:
189189
vlans:
190-
- 95
190+
- 22
191191
vm_offset: 22
192192
ARISTA24T1:
193193
vlans:
194-
- 96
194+
- 23
195195
vm_offset: 23
196196
ARISTA25T1:
197197
vlans:
198-
- 97
198+
- 24
199199
vm_offset: 24
200200
ARISTA26T1:
201201
vlans:
202-
- 98
202+
- 25
203203
vm_offset: 25
204204
ARISTA27T1:
205205
vlans:
206-
- 99
206+
- 26
207207
vm_offset: 26
208208
ARISTA28T1:
209209
vlans:
210-
- 100
210+
- 27
211211
vm_offset: 27
212212
ARISTA29T1:
213213
vlans:
214-
- 101
214+
- 28
215215
vm_offset: 28
216216
ARISTA30T1:
217217
vlans:
218-
- 102
218+
- 29
219219
vm_offset: 29
220220
ARISTA31T1:
221221
vlans:
222-
- 103
222+
- 30
223223
vm_offset: 30
224224
ARISTA32T1:
225225
vlans:
226-
- 104
226+
- 31
227227
vm_offset: 31
228228
ARISTA01PT0:
229229
vlans:
@@ -239,45 +239,45 @@ topology:
239239
one_vlan_a:
240240
Vlan1000:
241241
id: 1000
242-
intfs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
242+
intfs: [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
243243
prefix: 192.168.0.1/21
244244
prefix_v6: fc02:1000::1/64
245245
tag: 1000
246246
two_vlan_a:
247247
Vlan1000:
248248
id: 1000
249-
intfs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
249+
intfs: [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79]
250250
prefix: 192.168.0.1/22
251251
prefix_v6: fc02:100::1/64
252252
tag: 1000
253253
Vlan1100:
254254
id: 1100
255-
intfs: [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
255+
intfs: [80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
256256
prefix: 192.168.4.1/22
257257
prefix_v6: fc02:101::1/64
258258
tag: 1100
259259
four_vlan_a:
260260
Vlan1000:
261261
id: 1000
262-
intfs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
262+
intfs: [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55]
263263
prefix: 192.168.0.1/22
264264
prefix_v6: fc02:100::1/64
265265
tag: 1000
266266
Vlan1100:
267267
id: 1100
268-
intfs: [24, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
268+
intfs: [56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79]
269269
prefix: 192.168.4.1/22
270270
prefix_v6: fc02:101::1/64
271271
tag: 1100
272272
Vlan1200:
273273
id: 1200
274-
intfs: [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87]
274+
intfs: [80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103]
275275
prefix: 192.168.8.1/22
276276
prefix_v6: fc02:102::1/64
277277
tag: 1200
278278
Vlan1300:
279279
id: 1300
280-
intfs: [88, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
280+
intfs: [104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
281281
prefix: 192.168.12.1/22
282282
prefix_v6: fc02:103::1/64
283283
tag: 1300
@@ -915,34 +915,34 @@ configuration:
915915
asn: 65100
916916
peers:
917917
65100:
918-
- 10.0.0.64
919-
- fc00::81
918+
- 10.0.1.0
919+
- fc00::201
920920
interfaces:
921921
Loopback0:
922-
ipv4: 100.1.0.33/32
923-
ipv6: 2064:100:0:21::/128
922+
ipv4: 100.1.0.129/32
923+
ipv6: 2064:100:0:81::/128
924924
Ethernet1:
925-
ipv4: 10.0.0.65/31
926-
ipv6: fc00::82/126
925+
ipv4: 10.0.1.1/31
926+
ipv6: fc00::202/126
927927
bp_interface:
928-
ipv4: 10.10.246.34/24
929-
ipv6: fc0a::22/64
928+
ipv4: 10.10.246.130/24
929+
ipv6: fc0a::82/64
930930
ARISTA02PT0:
931931
properties:
932932
- common
933933
bgp:
934934
asn: 65100
935935
peers:
936936
65100:
937-
- 10.0.0.66
938-
- fc00::85
937+
- 10.0.1.2
938+
- fc00::205
939939
interfaces:
940940
Loopback0:
941-
ipv4: 100.1.0.34/32
942-
ipv6: 2064:100:0:22::/128
941+
ipv4: 100.1.0.130/32
942+
ipv6: 2064:100:0:82::/128
943943
Ethernet1:
944-
ipv4: 10.0.0.67/31
945-
ipv6: fc00::86/126
944+
ipv4: 10.0.1.3/31
945+
ipv6: fc00::206/126
946946
bp_interface:
947-
ipv4: 10.10.246.35/24
948-
ipv6: fc0a::23/64
947+
ipv4: 10.10.246.131/24
948+
ipv6: fc0a::83/64

0 commit comments

Comments
 (0)