-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
422 lines (343 loc) · 10.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>DD-IX Hackday #01</title>
<link rel="stylesheet" href="modules/reveal.js/dist/reset.css">
<link rel="stylesheet" href="modules/reveal.js/dist/reveal.css">
<link rel="stylesheet" href="modules/ddix-assets/css/dd-ix.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="modules/reveal.js/plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<img src="modules/ddix-assets/img/ddix-logo-noslogan.svg">
<h2>Hackday #01</h2>
<h3>Routing Foundamentals</h3>
</section>
<section>
<h2>grober Fahrplan</h2>
<ol>
<li>Vorstellungsrunde</li>
<li>statisches IP Routing</li>
<li>dynamisches IP Routing</li>
<li>Provider Netzwerke</li>
<li>Private & Transit Peerings</li>
</ol>
</section>
<section>
<h2>Vorstellungsrunde</h2>
</section>
<section>
<h2>Pod Equipment</h2>
<ul>
<li>1x Linux Router<br /><small>Lanner NCA-1510A; 4x 1G Base-T, 2x SFP</small></li>
<li>1x L3 Switch oder Router<br />
<small>Cisco 3560CG: 10x 1G Base-T, 2x SFP(+)</small><br />
<small>Cisco 890 ISR: 8x 1G Base-T Switch, 2x SFP Routed Ports</small>
</li>
<li>SFP's für "WAN" Verbindungen 😉</li>
</ul>
</section>
<section>
<h2>Pod Setup</h2>
<img src="img/pods.drawio.svg" style="width: 100%">
</section>
<section>
<h2>Inter Pod</h2>
<img src="img/inter-pods.drawio.svg" style="width: 100%">
</section>
<section>
<h2>Default Free Zone</h2>
<img src="img/pods-dfz.drawio.svg" style="width: 100%">
</section>
<section>
<h2>statisches IP Routing</h2>
<ol>
<li>Konfiguration L3 Switch oder Router<br /><small>serielle (USB-)Konsole</small></li>
<li>Anbinden Laptops<br />
<small>SSH, ping, traceroute, …</small>
</li>
<li>Installation Linux Router
<br /><small>serielle (USB-)Konsole, USB Bootstick</small>
</li>
<li>Inter Pod Routing</li>
</ol>
</section>
<section>
<h3>Serielle Konsolen</h3>
<ul style="margin-bottom: 3em">
<li>Cisco<br /><small>9600 Baud, 8 bit, no parity, 1 stop bit (9600 8N1)</small></li>
<li>BIOS, Boot Loader, Linux<br /><small>115.200 Baud, 8 data bits, no parity, 1 stop
bits (115.200 8N1)</small></li>
<li><b>kein</b> Flow Control</li>
<li>Terminalprogramme<br />
<small>
<ul>
<li>Linux: minicom, screen, tmux</li>
<li>Windows: PuTTY</li>
</ul>
</small>
<pre style="width: 51%; margin: 1em 0 0 0">
<code data-trim>
$ minicom -D /dev/ttyUSB0
</code>
</pre>
</li>
</ul>
<img src="img/minicom.png" style="position: absolute; bottom: -.5em; right: -1.5em; width: 45%">
</section>
<section>
<h3>cisco commands</h3>
<pre>
<code data-trim style="max-height: 100%">
! change to priv lvl 15 (→ "root")
enable
! change to priv lvl 1
disable
! show commands
show run
show int descr
show int status
show ip int brief
show ip route …
show ip arp …
! filters
show run | incl vlan
show run | excl interface
show run | section router ospf
! config mode
conf t
! save config
wr m
! reset config
erase startup-config
erase flash:vlan.dat
</code>
</pre>
</section>
<section>
<h3>basic cisco settings</h3>
<pre>
<code data-trim style="max-height: 100%">
! increase memory log size
logging buffered 65536
! local hostname
hostname rtr-pod5-pop1
! disable dns
no ip domain-lookup
! auth stuff
enable secret routeL0C4L
username ddix secret routeL0C4L
aaa new-model
! enable ntp (for later)
ntp server 195.248.83.255
! increase console+vty timeout
line con 0
exec-timeout 1440 0
line vty 0 15
exec-timeout 1440 0
</code>
</pre>
</section>
<section>
<h3>static ip config</h3>
<pre>
<code data-trim style="max-height: 100%">
interface GigabitEthernet0/2
description RP 1G svr-pop5-fiasko
no switchport
ip address 195.248.83.? 255.255.255.254
arp timeout 300
</code>
</pre>
<img src="img/pods.drawio.svg" style="width: 80%">
</section>
<section>
<h2>Linux Router</h2>
</section>
<section>
<h3>Alpine Linux</h3>
<ul>
<li>schlanke (Rolling) Linux Distro</li>
<li><b>muslc</b> als libc</li>
<li><b>BusyBox</b> als coreutils</li>
<li>apk als <b>deklarativer</b> Paketmanager</li>
<li><b>KISS</b> Prinzip (<s>sudo</s>, <s>systemd</s>)</li>
<li>Diskless Mode</li>
</ul>
</section>
<section>
<h3>Installation</h3>
<ul>
<li>USB-Stick booten<br /><small><a
href)"https://mirrors.ibh.net/ibh/alpine/iso/">https://mirrors.ibh.net/ibh/alpine/iso/</a></small>
</li>
<li>util-linux installieren<br /><small># apk add util-linux</small></li>
<li>SSD partitionieren<br /><small># fdisk /dev/sda</small></li>
<li>Diskless Installation<br /><small># setup-bootable /dev/sdb /dev/sda1</small></li>
<li>reboot</li>
</ul>
</section>
<section>
<h3>Setup</h3>
<pre class="language-bash">
<code data-trim style="max-height: 100%">
# finish installation (no networking, no remote repositories)
setup-alpine
# install basic tools
apk add ethtool ifstate tcpdump $EDITOR
# configure ifstate
mkdir /etc/ifstate
ifstatecli show > /etc/ifstate/config.yml
rc-update add ifstate
$EDITOR /etc/ifstate
</code>
</pre>
</section>
<section>
<h3>ifstate</h3>
<p>
https://ifstate.net/ → <a href="https://ifstate.net/examples.html">Examples</a> | <a
href="https://ifstate.net/schema/">Schema</a>
</ul>
<pre class="language-yaml">
<code data-trim style="max-height: 100%">
interfaces:
- name: eth0
addresses:
- 195.248.83.240/31
link:
state: up
kind: physical
businfo: '0000:04:00.0'
routing:
routes:
- to: 0.0.0.0/0
via: 212.111.253.254
rules: []
</code>
</pre>
</section>
<section>
<h3>Diskless Mode</h3>
<pre class="language-bash">
<code data-trim style="max-height: 100%">
# show changes of protected files
# → /etc/apk/protected_paths.d/
lbu status
# show changes
lbu diff
# make changes persistent
# → /media/sda1/$HOSTNAME.apkovl.tar.gz
lbu commit
</code>
</pre>
<p>
alpine.iso + $HOSTNAME.apkovl.tar.gz → State
</p>
</section>
<section>
<h2>dynamisches<br />IP Routing</h2>
</section>
<section>
<img src="img/tracketpacer-ospf.png" height="580px">
<p>
<small><a href="https://infosec.exchange/@tracketpacer">@[email protected]</a></small>
</p>
</section>
<section>
<h3>Cisco OSPF</h2>
<pre>
<code data-trim style="max-height: 100%">
! configure ospf router
router ospf 6500?
router-id 195.248.83.?
redistribute connected subnets
passive-interface default
! enable ospf
interface GigabitEthernet0/1
ip ospf 6500? area 0
ip ospf dead-interval 5
ip ospf hello-interval 1
</code>
</pre>
</section>
<section>
<h3>BIRD Routing Daemon</h2>
<pre class="language-bash">
<code data-trim style="max-height: 100%">
# install & enable bird
apk add bird
rc-update add bird
# configure
$EDITOR /etc/bird.conf
</code>
</pre>
</section>
<section>
<h3>BIRD Config</h2>
<pre>
<code data-trim style="max-height: 100%">
</code>
</pre>
</section>
<section>
<h2>Provider Netze</h2>
</section>
<section>
<h3>IGP vs. EGP</h3>
<h4>Interior Gateway Protocol</h4>
<ul style="font-size: 80%">
<li>Einsatz <b>innerhalb</b> eines autonomen Systems</li>
<li>Austausch der Netztopologie (LSDB)</li>
<li>Protokoll: OSPF, EIRGP, IS-IS, …</li>
</ul>
<h4 style="margin-top: 2em">Exterior Gateway Protocol</h4>
<ul style="font-size: 80%">
<li>Einsatz <b>innerhalb</b> (iBGP) und <b>außerhalb</b> (eBGP)<br />eines AS</li>
<li>Austausch erreichbarer Prefixe (Netze)</li>
<li>Protokoll: BGP bzw. MP-BGP</li>
</ul>
</section>
<section>
<img src="img/tracketpacer-bgp.png" height="580px">
<p>
<small><a href="https://infosec.exchange/@tracketpacer">@[email protected]</a></small>
</p>
</section>
<section>
<h3>BGP Route Selection (BIRD)</h3>
<ul style="font-size: 75%">
<li>Prefer route with the highest Local Preference attribute.</li>
<li>Prefer route with the shortest AS path.</li>
<li>Prefer IGP origin over EGP and EGP origin over incomplete.</li>
<li>Prefer the lowest value of the Multiple Exit Discriminator.</li>
<li>Prefer routes received via eBGP over ones received via iBGP.</li>
<li>Prefer routes with lower internal distance to a boundary router.</li>
<li>Prefer the route with the lowest value of router ID of the advertising router.</li>
</ul>
</section>
</div>
</div>
<script src="modules/reveal.js/dist/reveal.js"></script>
<script src="modules/reveal.js/plugin/notes/notes.js"></script>
<script src="modules/reveal.js/plugin/markdown/markdown.js"></script>
<script src="modules/reveal.js/plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Hide presentation control arrows
controls: false,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes]
});
</script>
</body>
</html>