Skip to content

Commit 48fb370

Browse files
authored
Ubuntu Host Rev 1.1 (#102)
* add uplink mac to preserved env variables * add uplink mac to ubuntu host - increase revision * update entrypoint for ubuntu container * set techlib labs to use ubuntu host rev 1.1
1 parent 19c5a50 commit 48fb370

File tree

8 files changed

+43
-60
lines changed

8 files changed

+43
-60
lines changed

.github/workflows/container_build_host_ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
container_name: "host-ubuntu"
2222
# the rev number will be updated with each run
23-
image_tags: "latest,rev1.0"
23+
image_tags: "latest,rev1.1"
2424
from_image: "ubuntu"
2525
from_variant: "24.04"
2626
username: "admin"

containers/host-ubuntu/.devcontainer/entrypoint.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# preserve environment variables
44
if [ "$(id -u)" != "0" ]; then
5-
exec sudo --preserve-env=TMODE,TACTIVE,TBACKUP,SSH_PASSWORD,IPV4,IPV6,GW,STATIC_ROUTE "$0" "$@"
5+
exec sudo --preserve-env=TMODE,TACTIVE,TBACKUP,SSH_PASSWORD,UPLINK_MAC,IPV4,IPV6,GW,STATIC_ROUTE "$0" "$@"
66
fi
77

88
# set admin password for SSH access
@@ -46,10 +46,6 @@ if [ "$TMODE" == 'lacp' ]; then
4646
sudo ip link set eth1 master ${UPLINK}
4747
sudo ip link set eth2 master ${UPLINK}
4848

49-
if [ -z "$UPLINK_MAC" ]; then
50-
UPLINK_MAC="c0:d6:82:00:$(openssl rand -hex 1):$(openssl rand -hex 1)"
51-
fi
52-
sudo ip link set dev ${UPLINK} address "${UPLINK_MAC}"
5349
sudo ip link set ${UPLINK} up
5450

5551
elif ! [ -z "${PHONE}" ] ; then
@@ -59,11 +55,6 @@ elif ! [ -z "${PHONE}" ] ; then
5955
# Create br0
6056
sudo ip link add name br0 type bridge
6157

62-
if [ -z "$UPLINK_MAC" ]; then
63-
UPLINK_MAC="30:86:2d:00:$(openssl rand -hex 1):$(openssl rand -hex 1)"
64-
fi
65-
sudo ip link set dev ${UPLINK} address "${UPLINK_MAC}"
66-
6758
# Disable STP, provide add'l visibility
6859
sudo ip link set ${UPLINK} type bridge stp_state 0
6960
sudo ip link set ${UPLINK} type bridge vlan_stats_per_port 1
@@ -82,7 +73,14 @@ elif ! [ -z "${PHONE}" ] ; then
8273
# lldpcli configure ports eth1,eth2,br0 lldp status rx-only
8374
fi
8475

85-
# configure IP addresses and routes
76+
# configure MAC address, IP addresses and routes
77+
if [ -z "$UPLINK_MAC" ]; then
78+
UPLINK_MAC="30:86:2d:00:$(openssl rand -hex 1):$(openssl rand -hex 1)"
79+
fi
80+
sudo ip link set ${UPLINK} down
81+
sudo ip link set dev ${UPLINK} address "${UPLINK_MAC}"
82+
sudo ip link set ${UPLINK} up
83+
8684
if ! [ -z "${IPV4}" ]; then
8785
sudo ip addr add ${IPV4} dev ${UPLINK}
8886
fi

labs/techlib-eos-tips/clab/topology.clab.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ topology:
1212
enforce-startup-config: true
1313
image: arista/ceos:latest
1414
linux:
15-
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.0
15+
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.1
1616

1717
defaults:
1818
kind: ceos
@@ -67,6 +67,7 @@ topology:
6767
STATIC_ROUTE: 10.0.0.0/8
6868
GW: 10.10.10.1
6969
IPV6: 2001:db8:10:10::101/64
70+
UPLINK_MAC: 00:01:01:01:01:01
7071
labels:
7172
topoViewer-role: client
7273
graph-group: "End Hosts"
@@ -83,6 +84,7 @@ topology:
8384
STATIC_ROUTE: 10.0.0.0/8
8485
GW: 10.20.20.1
8586
IPV6: 2001:db8:20:20::101/64
87+
UPLINK_MAC: 00:02:02:02:02:02
8688
labels:
8789
topoViewer-role: client
8890
graph-group: "End Hosts"

labs/techlib-rcf-quickstart/clab/topology.clab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topology:
2121
ceos:
2222
image: arista/ceos:latest
2323
linux:
24-
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.0
24+
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.1
2525
binds:
2626
- /techlib-rcf-quickstart:/workspace:ro
2727

labs/techlib-vxlan-domain-a/clab/topology.clab.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topology:
2121
ceos:
2222
image: arista/ceos:latest
2323
linux:
24-
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.0
24+
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.1
2525
binds:
2626
- /techlib-vxlan-domain-a:/workspace:ro
2727

@@ -146,6 +146,7 @@ topology:
146146
STATIC_ROUTE: 10.0.0.0/8
147147
GW: 10.10.10.1
148148
IPV6: 2001:db8:10:10::101/64
149+
UPLINK_MAC: 00:01:01:00:00:A1
149150

150151
# HostA2 is connected to LEAF1 eth8 and LEAF2 eth8
151152
HostA2:
@@ -157,6 +158,7 @@ topology:
157158
STATIC_ROUTE: 10.0.0.0/8
158159
GW: 10.30.30.1
159160
IPV6: 2001:db8:30:30::101/64
161+
UPLINK_MAC: 00:01:01:00:00:A2
160162

161163
# HostA3 is a Linux host with a single interface connected to LEAF3 eth7
162164
HostA3:
@@ -167,6 +169,7 @@ topology:
167169
STATIC_ROUTE: 10.0.0.0/8
168170
GW: 10.50.50.1
169171
IPV6: 2001:db8:50:50::101/64
172+
UPLINK_MAC: 00:01:01:00:00:A3
170173

171174
# HostA4 is connected to LEAF3 eth8 and LEAF4 eth8
172175
HostA4:
@@ -178,6 +181,7 @@ topology:
178181
STATIC_ROUTE: 10.0.0.0/8
179182
GW: 10.10.10.1
180183
IPV6: 2001:db8:10:10::102/64
184+
UPLINK_MAC: 00:01:01:00:00:A4
181185

182186
# HostA5 is connected to LEAF4 eth7
183187
HostA5:
@@ -188,6 +192,7 @@ topology:
188192
STATIC_ROUTE: 10.0.0.0/8
189193
GW: 10.30.30.1
190194
IPV6: 2001:db8:30:30::102/64
195+
UPLINK_MAC: 00:01:01:00:00:A5
191196

192197
# HostA6 is connected to LEAF5 eth7 and LEAF6 eth7
193198
HostA6:
@@ -199,6 +204,7 @@ topology:
199204
STATIC_ROUTE: 10.0.0.0/8
200205
GW: 10.70.70.1
201206
IPV6: 2001:db8:70:70::101/64
207+
UPLINK_MAC: 00:01:01:00:00:A6
202208

203209
#########################
204210
# Backbone #

labs/techlib-vxlan-domain-b/clab/topology.clab.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topology:
2121
ceos:
2222
image: arista/ceos:latest
2323
linux:
24-
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.0
24+
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.1
2525
binds:
2626
- /techlib-vxlan-domain-b:/workspace:ro
2727

@@ -162,6 +162,7 @@ topology:
162162
STATIC_ROUTE: 10.0.0.0/8
163163
GW: 10.20.20.1
164164
IPV6: 2001:db8:20:20::101/64
165+
UPLINK_MAC: 00:01:01:00:00:B1
165166

166167
# HostB2 is connected to LEAF1 eth8 and LEAF2 eth8
167168
HostB2:
@@ -173,6 +174,7 @@ topology:
173174
STATIC_ROUTE: 10.0.0.0/8
174175
GW: 10.40.40.1
175176
IPV6: 2001:db8:40:40::101/64
177+
UPLINK_MAC: 00:01:01:00:00:B2
176178

177179
# HostB3 is connected to LEAF3 eth7
178180
HostB3:
@@ -183,6 +185,7 @@ topology:
183185
STATIC_ROUTE: 10.0.0.0/8
184186
GW: 10.60.60.1
185187
IPV6: 2001:db8:60:60::101/64
188+
UPLINK_MAC: 00:01:01:00:00:B3
186189

187190
# HostB4 is connected to LEAF3 eth8 and LEAF4 eth8
188191
HostB4:
@@ -194,6 +197,7 @@ topology:
194197
STATIC_ROUTE: 10.0.0.0/8
195198
GW: 10.10.10.1
196199
IPV6: 2001:db8:10:10::103/64
200+
UPLINK_MAC: 00:01:01:00:00:B4
197201

198202
# HostB5 is connected to LEAF4 eth7
199203
HostB5:
@@ -204,6 +208,7 @@ topology:
204208
STATIC_ROUTE: 10.0.0.0/8
205209
GW: 10.70.70.1
206210
IPV6: 2001:db8:70:70::102/64
211+
UPLINK_MAC: 00:01:01:00:00:B5
207212

208213
# HostB6 is connected to B-SW1 eth3
209214
HostB6:
@@ -214,6 +219,7 @@ topology:
214219
STATIC_ROUTE: 10.0.0.0/8
215220
GW: 10.40.40.1
216221
IPV6: 2001:db8:40:40::102/64
222+
UPLINK_MAC: 00:01:01:00:00:B6
217223

218224
# HostB7 is connected to B-SW1 eth4
219225
HostB7:
@@ -224,6 +230,7 @@ topology:
224230
STATIC_ROUTE: 10.0.0.0/8
225231
GW: 10.80.80.1
226232
IPV6: 2001:db8:80:80::101/64
233+
UPLINK_MAC: 00:01:01:00:00:B7
227234

228235
#########################
229236
# Backbone #

labs/techlib-vxlan-domain-c/clab/topology.clab.yml

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topology:
2121
ceos:
2222
image: arista/ceos:latest
2323
linux:
24-
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.0
24+
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.1
2525
binds:
2626
- /techlib-vxlan-domain-c:/workspace:ro
2727

@@ -202,13 +202,7 @@ topology:
202202
STATIC_ROUTE: 10.0.0.0/8
203203
GW: 10.10.10.1
204204
IPV6: 2001:db8:10:10::104/64
205-
labels:
206-
topoViewer-role: client
207-
graph-group: "Data Center Host"
208-
graph-level: "5"
209-
graph-posX: "-135"
210-
graph-posY: "285"
211-
graph-groupLabelPos: bottom-center
205+
UPLINK_MAC: 00:01:01:00:00:C1
212206

213207
# HostC2 is connected to LEAF3 eth7
214208
HostC2:
@@ -219,13 +213,7 @@ topology:
219213
STATIC_ROUTE: 10.0.0.0/8
220214
GW: 10.20.20.1
221215
IPV6: 2001:db8:20:20::102/64
222-
labels:
223-
topoViewer-role: client
224-
graph-group: "Data Center Host"
225-
graph-level: "5"
226-
graph-posX: "-25"
227-
graph-posY: "285"
228-
graph-groupLabelPos: bottom-center
216+
UPLINK_MAC: 00:01:01:00:00:C2
229217

230218
# HostC3 is connected to LEAF3 eth8 and LEAF4 eth8
231219
HostC3:
@@ -237,13 +225,7 @@ topology:
237225
STATIC_ROUTE: 10.0.0.0/8
238226
GW: 10.60.60.1
239227
IPV6: 2001:db8:60:60::102/64
240-
labels:
241-
topoViewer-role: client
242-
graph-group: "Data Center Host"
243-
graph-level: "5"
244-
graph-posX: "5"
245-
graph-posY: "285"
246-
graph-groupLabelPos: bottom-center
228+
UPLINK_MAC: 00:01:01:00:00:C3
247229

248230
# HostC4 is connected to LEAF4 eth7
249231
HostC4:
@@ -254,13 +236,7 @@ topology:
254236
STATIC_ROUTE: 10.0.0.0/8
255237
GW: 10.50.50.1
256238
IPV6: 2001:db8:50:50::102/64
257-
labels:
258-
topoViewer-role: client
259-
graph-group: "Data Center Host"
260-
graph-level: "5"
261-
graph-posX: "35"
262-
graph-posY: "285"
263-
graph-groupLabelPos: bottom-center
239+
UPLINK_MAC: 00:01:01:00:00:C4
264240

265241
# HostC5 is connected to LEAF5 eth7 and LEAF6 eth7
266242
HostC5:
@@ -272,13 +248,7 @@ topology:
272248
STATIC_ROUTE: 10.0.0.0/8
273249
GW: 10.20.20.1
274250
IPV6: 2001:db8:20:20::103/64
275-
labels:
276-
topoViewer-role: client
277-
graph-group: "Data Center Host"
278-
graph-level: "5"
279-
graph-posX: "95"
280-
graph-posY: "285"
281-
graph-groupLabelPos: bottom-center
251+
UPLINK_MAC: 00:01:01:00:00:C5
282252

283253
# HostC6 is connected to LEAF5 eth8 and LEAF6 eth8
284254
HostC6:
@@ -290,13 +260,7 @@ topology:
290260
STATIC_ROUTE: 10.0.0.0/8
291261
GW: 10.60.60.1
292262
IPV6: 2001:db8:60:60::103/64
293-
labels:
294-
topoViewer-role: client
295-
graph-group: "Data Center Host"
296-
graph-level: "5"
297-
graph-posX: "155"
298-
graph-posY: "285"
299-
graph-groupLabelPos: bottom-center
263+
UPLINK_MAC: 00:01:01:00:00:C6
300264

301265
#########################
302266
# Backbone #

labs/techlib-vxlan-domain-d/clab/topology.clab.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topology:
2121
ceos:
2222
image: arista/ceos:latest
2323
linux:
24-
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.0
24+
image: ghcr.io/aristanetworks/aclabs/host-ubuntu:rev1.1
2525
binds:
2626
- /techlib-vxlan-domain-d:/workspace:ro
2727

@@ -145,6 +145,7 @@ topology:
145145
STATIC_ROUTE: 10.0.0.0/8
146146
GW: 10.10.10.1
147147
IPV6: 2001:db8:10:10::105/64
148+
UPLINK_MAC: 00:01:01:00:00:D1
148149

149150
# HostD2 is connected to LEAF1 eth8 and LEAF2 eth8
150151
HostD2:
@@ -156,6 +157,7 @@ topology:
156157
STATIC_ROUTE: 10.0.0.0/8
157158
GW: 10.90.90.1
158159
IPV6: 2001:db8:90:90::101/64
160+
UPLINK_MAC: 00:01:01:00:00:D2
159161

160162
# HostD3 is connected to LEAF3 eth7
161163
HostD3:
@@ -166,6 +168,7 @@ topology:
166168
STATIC_ROUTE: 10.0.0.0/8
167169
GW: 10.50.50.1
168170
IPV6: 2001:db8:50:50::103/64
171+
UPLINK_MAC: 00:01:01:00:00:D3
169172

170173
# HostD4 is connected to LEAF3 eth8 and LEAF4 eth8
171174
HostD4:
@@ -177,6 +180,7 @@ topology:
177180
STATIC_ROUTE: 10.0.0.0/8
178181
GW: 10.10.10.1
179182
IPV6: 2001:db8:10:10::106/64
183+
UPLINK_MAC: 00:01:01:00:00:D4
180184

181185
# HostD5 is connected to LEAF4 eth7
182186
HostD5:
@@ -187,6 +191,7 @@ topology:
187191
STATIC_ROUTE: 10.0.0.0/8
188192
GW: 10.90.90.1
189193
IPV6: 2001:db8:90:90::102/64
194+
UPLINK_MAC: 00:01:01:00:00:D5
190195

191196
# HostD6 is connected to LEAF5 eth7 and LEAF6 eth7
192197
HostD6:
@@ -198,6 +203,7 @@ topology:
198203
STATIC_ROUTE: 10.0.0.0/8
199204
GW: 10.70.70.1
200205
IPV6: 2001:db8:70:70::103/64
206+
UPLINK_MAC: 00:01:01:00:00:D6
201207

202208
#########################
203209
# Backbone #

0 commit comments

Comments
 (0)