-
Notifications
You must be signed in to change notification settings - Fork 1
/
mod2-06.html
577 lines (531 loc) · 29.1 KB
/
mod2-06.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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Advanced Networking - Module 2 Chapter 6 - Static Routing</title>
<meta name="description" content="Abilitante alle certificazioni Cisco CCENT e CCNA">
<meta name="author" content="Hacklab Cosenza">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>Advanced Networking</h1>
<h2>Routing & Switching:<h2>
<h2>Routing & Switching Essentials</h2>
<h3>Chapter 6: Static Routing</h3>
<p>
<small><a href="http://hlcs.it">Hacklab Cosenza</a> / Centro di Ricerca su Tecnologia e Innovazione</small>
</p>
</section>
<section>
<h2>The Routing Problem</h2>
<img src="http://i.imgur.com/nWBIzba.png">
<p>Routing is about <strong>forwarding communications</strong> among different networks, along a variety of possible paths, </strong>in the most efficient and reliable possible way</strong>.</p>
</section>
<section>
<h2>Routing Tables and Routes</h2>
<p>The <strong>routing table</strong> contains informations about directly connected and remote networks reachability. The rows on this table are called <strong><em>routes</em></strong>.</p>
<p><u>Each router interface belongs to a different IP network</u>. A <strong>directly connected</strong> route is added when an interface is configured with an IP address and activated.</p>
<p><strong>Remote routes</strong> are paths to remote networks (<strong>not locally attached</strong> but connected to other routers). For not directly connected networks, the router can learn routes:</p>
<ul>
<li><strong>statically</strong> - <u>manually entered</u> by the administrator.</li>
<li><strong>dynamically</strong> - <u>automatically learned</u> through routing protocols.</li>
</ul>
</section>
<section>
<h2>Anatomy of a Route</h2>
<p>A route is a line on the routing table that contains all the information needed to reach the <u>specified network</u>.</p>
<p>It has <u>four main components</u>: destination network, subnet mask, next hop and route cost, also know as <em>metric</em>.</p>
<p>The next hop can be <strong>expressed in two forms</strong>: as the IP of another router/gateway or the exit interface of the packet.</p>
<pre><code class="no-highlight" style="max-height: 250px;">R0#show ip route
.....
1.0.0.0/30 is subnetted, 4 subnets
C 1.1.1.0 is directly connected, FastEthernet0/1
O 1.1.1.4 [110/2] via 1.1.1.2, 00:10:04, FastEthernet0/1
O 1.1.1.8 [110/2] via 1.1.1.13, 00:10:04, FastEthernet0/0
C 1.1.1.12 is directly connected, FastEthernet0/0
172.16.0.0/24 is subnetted, 4 subnets
C 172.16.0.0 is directly connected, Ethernet0/0/0
O 172.16.1.0 [110/11] via 1.1.1.2, 00:10:04, FastEthernet0/1
O 172.16.2.0 [110/12] via 1.1.1.13, 00:09:24, FastEthernet0/0
[110/12] via 1.1.1.2, 00:09:24, FastEthernet0/1
O 172.16.3.0 [110/11] via 1.1.1.13, 00:10:04, FastEthernet0/0</code></pre>
</section>
<section>
<section>
<h2>Types of routes</h2>
<p>There are <strong>4 main kinds of routes</strong> to be found in routing tables:</p>
<h3>Directly Connected Routes (C)</h3>
<ul>
<li>Automatically added when a router interface is up/up, modified when the interface configuration changes, removed when the interface is shut down.</li>
</ul>
<h3>Static Routes (S)</h3>
<ul>
<li>Manually configured by an administrator, it isn’t modified or removed unless an administrator does so by hand.</li>
</ul>
</section>
<section>
<h2>Types of routes</h2>
<h3>Dynamically Updated Routes (R, O, D, ...)</h3>
<ul>
<li><em>Dynamic routes</em>, for short.</li>
<li>Added, modified and deleted <strong>automatically by routing protocols</strong> (<em>protocols</em> from now on, for short).</li>
<li>Protocols send and receive messages containing updated routes with other routers using the same protocol.</li>
<li>Multiple protocols can run on a router. The routes learned through them are labeled with a code specific to each.</li>
</ul>
<h3>Default Route (*)</h3>
<ul>
<li>It is the Default Gateway of the router, also known as <strong><em>Gateway of Last Resort</em></strong>.</li>
</ul>
</section>
</section>
<section>
<section>
<h2>Static vs Dynamic Routing</h2>
<p>The <u>advantages</u> of one are the shortcomings of the other.</p>
<ul>
<li><strong>Configuration</strong> - The bigger the network, the more time is spent on inital implementation of static routing. <u>Dynamic routing deployment time doesn’t grow with network size</u>.</li>
<li><strong>Maintainance</strong> - Every change in a static routing config requires manual intervention, keeping track of the topology, and it’s very easy to make mistakes. <u>Dynamic routing automatically adapts to changes in topology</u>.</li>
<li><strong>Convergence</strong> - Static routing actually have the worst convergence time, because nothing is automated. <u>Dynamic routing is faster to converge</u>.</li>
</ul>
</section>
<section>
<h2>Static vs Dynamic Routing</h2>
<ul>
<li><strong>Scaling</strong> - Static routing is just too complex to deploy and maintain in anything other than small nets or specific tasks. <u>Dynamic routing can be used at larger scales</u>.</li>
<li><strong>Security</strong> - <u>With static routes traffic can be routed on a path known to be secure</u>. Routing protocols could be hacked to divert traffic for interception and tampering.</li>
<li><strong>Resource usage</strong> - <u>Static routing use no resources on topology changes</u>: none for recomputing the route, and none of the bandwidth dynamic routing needs to transmit the new topology informations.</li>
<li><strong>Predictability</strong> - <u>Static routes have no dependency on external factors</u>, while dynamic routes are never a given especially in fluctuating topologies.</li>
</ul>
</section>
</section>
<section>
<h2>When to use static routes</h2>
<p>Static and dynamic routing can be used simultaneously, although <strong>static routes will take precedence over dynamically learned</strong> one (because of the lower AD).</p>
<p>Static routes are typically deployed:</p>
<ul>
<li>In smaller networks.</li>
<li>In networks that only have one path to reach other ones. Such networks are known as <strong><em>stub networks/routers</em></strong>.</li>
<li>For specific types of traffic that we want on a specific path, perhaps for security or control reasons.</li>
<li>For the default route/Gateway of Last Resort.</li>
<li>To provide backup (<em>floating</em>) routes.</li>
<li>To summarize multiple routes into a single one.</li>
</ul>
</section>
<section>
<section>
<h2>Types of static routes</h2>
<h3>Standard static route</h3>
<ul>
<li>Routes entered to <strong>connect to specific networks</strong>.</li>
<li>Particularly used to route to/from stub networks.</li>
</ul>
<h3>Default static route</h3>
<ul>
<li><strong>It applies to all packets</strong> in absence of a more specific (static or dynamic) route to the destination network.</li>
<li>It takes the form of a route to the <strong>destination network 0.0.0.0/0</strong> (or 0.0.0.0 0.0.0.0), which is <strong>least-specific possible route</strong> (Only 1 bits of network address needs to match to take precedence).</li>
<li>Useful on <strong>stub router, that only have one neighbour</strong> router to which packets could be sent.</li>
</ul>
</section>
<section>
<h2>Types of static routes</h2>
<h3>Summary static route</h3>
<ul>
<li><strong>A route that replaces a multitude of other routes</strong>, provided that <u>a)</u> the routes to be replaced are contiguos, <u>b)</u> it is possible to summarize them in a single network address and <u>c)</u> the outgoing interface is the same.</li>
</ul>
<h3>Floating static route</h3>
<ul>
<li>A route that is <strong>used in place of another (static or dynamic) route</strong>, but only when the primary route disappear.</li>
</ul>
</section>
</section>
<section>
<h2>Setting up a static route</h2>
<p><code>ip/ipv6 route</code> inserts static routes to the routing table. <u>Based on how the next hop is specified</u>, we have:</p>
<ul>
<li><strong>Next-hop routes</strong> (only the IP of the GW is entered):</li>
<pre><code class="no-highlight"># ip route [destination_network] [subnet_mask] [gateway_address]
R1(config)#ip route 192.168.16.0 255.255.255.0 192.168.15.1</code></pre>
<li><strong>Directly connected static routes</strong> (outgoing interface only):</li>
<pre><code class="no-highlight"># ip route [destination_network] [subnet_mask] [exit_interface]
R1(config)#ip route 192.168.16.0 255.255.255.0 S0/0/0</code></pre>
<li><strong>Fully specified static routes</strong> (both are entered):</li>
<pre><code class="no-highlight">ip route [destination_network] [mask] [exit_interface] [gateway_address]
R1(config)#ip route 192.168.16.0 255.255.255.0 S0/0/0 192.168.15.1</code></pre>
<li><strong>Default static routes</strong> destination net/mask is 0.0.0.0/0.</li>
</ul>
</section>
<section>
<section>
<h2>Next Hop and recursive lookup</h2>
<p>Even if a static route matching an incoming packet is found, the packet is forwarded only when the route is <strong><em>resolved</em>, which means determining the outgoing interface</strong>.</p>
<p>When the matching route is a next-hop route, <strong>to resolve it the router needs to search the routing table again</strong>, this time for a route matching the next-hop IP address.</p>
<p>This resolvability process will continue until either no route will match the next-hop IP examined, or an exit interface is finally determined. This is known as <strong><em>recursive lookup</em></strong>.</p>
</section>
<section>
<h2>Next Hop and recursive lookup</h2>
<p>This recursion is very resource-intensive and should be avoided, for instance by <strong>entering only fully specified static routes</strong>.</p>
<p>It's not possible to add an <strong>invalid recursive route</strong>, that is a route that <strong>doesn’t directly or indirectly resolve</strong> at insertion-time.</p>
</section>
</section>
<section>
<h2>Ethernet vs Serial Next-Hop</h2>
<p><strong>To eliminate recursive lookups, a directly connected static routes can be entered</strong> instead of a next-hop one.</p>
<p>However <u>this may not work in certain topologies when the outgoing interface is an Ethernet</u>. To forward the packet <strong>the router must determine the next-hop MAC address</strong>, but <u>ARP can't be used without the IP address</u>.</p>
<p>This is a problem <strong>due to the multi-point/multi-access nature of Ethernet</strong>. On a serial, point-to-point connections there is <u>only one possible next-hop device on the medium</u>.</p>
<p>To avoid this potential issue, <u>only use fully specified static routes when the outgoing interface is an Ethernet</u>.</p>
</section>
<section>
<h2>Cisco Express Forwarding</h2>
<p>If the forwarding method enabled on the router is CEF, <strong>2 main data structures</strong> are used for the routing process:</p>
<ul>
<li>a <strong>FIB</strong> (<em>Forwarding Information Base</em>), only storing next-hop informations.</li>
<li>an <strong>adjacency table</strong> maintaining Layer 2 switching informations.</li>
</ul>
<p>When the two are combined, there is <strong>no need for recursive lookups</strong>. Next-hop ip addresses can always be directly resolved with a single lookup.</p>
<p>CEF also allows the use of next-hop or directly connected routes even when the outgoing interface is Ethernet.</p>
</section>
<section>
<h2>Verify static routes</h2>
<p>Useful commands to verify static routes include:</p>
<ul>
<li><code>show ip/ipv6 route</code></li>
<li><code>show ip/ipv6 route static</code></li>
<li><code>show ip/ipv6 route [network]</code></li>
<li><code>ping</code></li>
<li><code>traceroute</code></li>
</ul>
</section>
<section>
<h2>IPv6 - Link-Local as next-hop</h2>
<p>There is <u>a situation when using static routing with IPv6 where it is not possible to specify a next-hop or directly connected route</u>: when using a IPv6 link-local address as the next-hop.</p>
<p>In such cases, <strong>a fully specified static route must be used</strong>, because:</p>
<ul>
<li>IPv6 link-local addresses are <strong>not present in the routing table</strong>.</li>
<li>IPv6 link-local addresses are <strong>not guaranteed to be unique</strong>: the same link-local address could be present on multiple links/network segments/outgoing interfaces.</li>
</ul>
</section>
<section>
<section>
<h2>[R] Classful Addressing</h2>
<img src="http://i.imgur.com/fQAqxLy.jpg">
<small>RFC 1700 divides the unicast ranges into classes of a specific network size and assigned within specific IP blocks. </small>
</section>
<section>
<h2>[R] Classful Addressing</h2>
<p><strong>Classful addressing</strong> refers to the (legacy) practice of assigning entire networks these pre-defined classes.</p>
<ul>
<li><strong>Class A</strong> [0.0.0.0/8 to 127.0.0.0/8]: designed for enormous networks, it divided 50% of the IPv4 space into 128 /8 networks supporting up to 16 mln hosts.</li>
<li><strong>Class B</strong> [128.0.0.0/16 to 191.255.0.0/16]: designed for medium and large networks, 25% of the space was divided into 16000 /16 networks supporting up to 65000 hosts.</li>
<li><strong>Class C</strong> [192.0.0.0/24 to 233.255.255.0/24]: designed for small networks, 12.5% of the total IPv4 space splitted into 2+ mln networks of up 254 hosts.</li>
</ul>
</section>
</section>
<section>
<h2>Classful Routing Protocols</h2>
<p>The fact that each classful class has its <strong>specific, fixed subnet mask allowed for routing protocols to be simpler</strong>: exchanged messages <u>didn’t need to report the subnet mask</u> along with the network IP addresses.</p>
<p>When receiving an update, the router either:</p>
<ul>
<li>applied the <strong>same subnet mask that was applied on the ingress interface</strong>, if that interface had an address of the same classful class.</li>
<li>applied the <strong>classful subnet mask</strong> of the received network address class.</li>
</ul>
</section>
<section>
<h2>[R] CIDR</h2>
<p>Classfull addressing was <strong>highly inefficient</strong>, leading to many wasted addresses, so it was progressively abandoned.</p>
<p><strong>Classless addressing</strong>, also known as <strong>Classless Inter-Domain Routing (CIDR)</strong>, allows to allocate address ranges from the public space with prefix lengths other than /8, /16 or /24.</p>
<p>By "freeing" the subnet mask from a specific class, <strong>CIDR can then reduce the size of routing tables</strong> through 2 mechanisms, both of which will be explained shortly:</p>
<ul>
<li>Route summarization.</li>
<li>Supernetting, which is a specific type of route summarization.</li>
</ul>
</section>
<section>
<h2>[R] VLSM</h2>
<p><strong>With basic</strong> (fixed-length) <strong>subnetting, every subnet has the same size</strong>. When the number of hosts needed in each is very different, that would lead to significant <strong>waste and unused addresses</strong>.</p>
<p>Subnets too large for the actual requirements will also <strong>limit growth</strong> by needlessly reducing available subnets.</p>
<p>The solution to these scenarios is a subnetting method called <em>Variable Length Subnet Mask (VLSM)</em>.</p>
<p>It does what the name says: the number of bits borrowed (hence, the subnet mask) <strong>varies with each subnet</strong>.</p>
</section>
<section>
<h2>[R] How does VLSM work?</h2>
<img src="http://i.imgur.com/8JdgAJz.png">
<p>With VLSM, you still <strong>borrow bits</strong> to create subnets. The <strong>subnetting formulas</strong> are <u>still valid</u>.</li>
<p>The difference is <strong>it's not a single-pass process</strong> anymore:</p>
<ul>
<li>The network is subnetted, and <strong>subnets are subnetted again</strong>.</li>
<li>This <strong>process repeats</strong>, creating the various sizes needed.</li>
</ul>
</section>
<section>
<section>
<h2>[R] VLSM Scenario</h2>
<img src="http://i.imgur.com/QMjXJ6M.jpg" style="width: 544px; height: 300px;">
<p>We need 9 subnets, so 4 bits to borrow: a /24 network into 16 subnets with a /28 prefix, each capable of 14 hosts.</p>
<p>This means <u>12 wasted address on each PtP link</u>, 48 total!</p>
<p>And 14 hosts/subnet are a bit low, aren't they?</p>
</section>
<section>
<h2>[R] VLSM Scenario</h2>
<h3>Traditional Subnetting</h3>
<pre><code class="no-highlight">Original Network Address 192.168.1.0/24
New Subnet Mask 255.255.255.240 = /28
Subnet 0 192.168.1.0/28
Subnet 1 192.168.1.16/28
Subnet 2 192.168.1.32/28
Subnet 3 192.168.1.48/28
[...]
Subnet 14 192.168.1.224/28
Subnet 15 192.168.1.240/28</code></pre>
<p>Wasteful. So let's take the first /28 and subnet it again:</p>
<ul>
<li>2 hosts needed mean 2 host bits (2<sup>2</sup> - 2 = 2 hosts)</li>
<li>this left us with 2 bits to borrow: 2<sup>2</sup> = 4 subnets.</li>
</ul>
<p>So we turned a single /28 subnet into <strong>4 /30 subnets</strong> each capable of 2 hosts: <u>0 wasted addresses</u>!</p>
</section>
<section>
<h2>[R] VLSM Scenario</h2>
<h3>VLSM Applied</h3>
<pre><code class="no-highlight">Subnet 0 - PtP #1 192.168.1.0/30 # subnetted from 192.168.1.0/28
Subnet 1 - PtP #2 192.168.1.4/30 # subnetted from 192.168.1.0/28
Subnet 2 - PtP #3 192.168.1.8/30 # subnetted from 192.168.1.0/28
Subnet 3 - PtP #4 192.168.1.12/30 # subnetted from 192.168.1.0/28
Subnet 4 192.168.1.16/28
Subnet 5 192.168.1.32/28
Subnet 6 192.168.1.48/28
[...]
Subnet 12 192.168.1.144/28
Subnet 13 192.168.1.160/27 # 30 hosts capable
Subnet 14 192.168.1.192/27 # 30 hosts capable
Subnet 15 192.168.1.224/27 # 30 hosts capable</code></pre>
<p>In addition to the perfect fit for the PtP links, VLSM also allows us to create <strong>more flexible subnetting</strong>.</p>
<p>In this example we ditched the last 6 /28 subnets for 3 /27 subnets in which we can host up to 30 devices.</p>
</section>
<section>
<h2>[R] VLSM Charts</h2>
<img src="http://i.imgur.com/WgSJYKv.jpg" style="width:800px; height: 488px;">
</section>
</section>
<section>
<section>
<h2>Route Summarization</h2>
<p><strong><em>Route summarization</em></strong> (or <em>route aggregation</em>) is the process of <strong>replacing routes to a contiguous set of network addresses with a single route</strong> with a shorter (i.e. less-specific) subnet mask.</p>
<p>Routes candidate for summarization <strong><u>must have the same exit interface or next hop address</u></strong>. Advantages are:</p>
<ul>
<li>smaller number of entries in routing table and routing protocol updates, leading to</li>
<li>reduced bandwidth used for routing protocols and</li>
<li>faster routing table lookups.</li>
</ul>
</section>
<section>
<h2>Supernetting</h2>
<p><strong><em>Supernetting</em></strong> is nowadays mainly used as a <u>synonimous for route summarization</u>.</p>
<p>At first, it was conceived to identify the situation <strong>when the summarization process produces a summary route that has a subnet mask shorter than the classful class</strong>.</p>
</section>
</section>
<section>
<section>
<h2>IPv4 Route Summarization</h2>
<ol>
<li>Translate networks in binary format:</li>
<pre><code class="no-highlight">129.20.0.0/16 -> 10000001.00010100.00000000.000000000
129.21.0.0/16 -> 10000001.00010101.00000000.000000000
129.22.0.0/16 -> 10000001.00010110.00000000.000000000
129.23.0.0/16 -> 10000001.00010111.00000000.000000000</code></pre>
<li>Count the far-left matching bits in the network address. Their number will be the network prefix of the summary route:</li>
<pre><code class="no-highlight">129.20.0.0/16 -> 10000001.00010100.00000000.000000000
129.21.0.0/16 -> 10000001.00010101.00000000.000000000
129.22.0.0/16 -> 10000001.00010110.00000000.000000000
129.23.0.0/16 -> 10000001.00010111.00000000.000000000
{-- 14 bits --}</code></pre>
</ol>
</section>
<section>
<h2>IPv4 Route Summarization</h2>
<ol start="3">
<li>Add zeros to the right of the matching bits. This will give you the summarized network address.</li>
<pre><code class="no-highlight">10000001.00010100.00000000.000000000 -> 129.20.0.0
</code></pre>
<li>(If required) Translate the new network prefix in decimal dotted notiation.</li>
</ol>
</section>
<section>
<h2>IPv6 Route Summarization</h2>
<pre><code class="no-highlight">Example: 2001:BF8:1234:1::/64, 2001:BF8:1234:2::/64, 2001:BF8:1234:3::/64, 2001:BF8:1234:4::/64</code></pre>
<ol>
<li>Identify the differing part of the address.</li>
<li>If in abbreviated format, expand the differing octect.</li>
<li>Convert the differing octect to binary.</li>
<pre><code class="no-highlight">2001:BF8:1234:0000000000000001::/64
2001:BF8:1234:0000000000000010::/64
2001:BF8:1234:0000000000000011::/64
2001:BF8:1234:0000000000000100::/64
^^^
--- Differing bits</code></pre>
<li>Then it’s identical to IPv4, but converting back to hex.</li>
</ol>
<p>So the resulting summary is 2001:BF8:1234::/61, with addresses ranging from 2001:BF8:1234:: to 2001:BF8:1234:7::.</p>
</section>
</section>
<section>
<section>
<h2>Configure static summarization</h2>
<p>After calculating the summary route, we can configure it on the router by:</p>
<ul>
<li>removing the single more specific routes with the command:</li>
<pre><code class="no-highlight">no ip route [network] [subnet mask] { next-hop | exit-intf }</code></pre>
<li>adding the summarized route with the command:</li>
<pre><code class="no-highlight">ip route [network] [subnet mask] { next-hop | exit-intf }</code></pre>
</ul>
<p>They are the same for IPv4/IPv6 (with the <code>ipv6</code> keyword).</p>
</section>
<section>
<h2>Configure static summarization</h2>
<h3>IPv4 example</h3>
<img src="http://i.imgur.com/3tJQeBc.jpg">
<pre><code class="no-highlight">R3(config)# no ip route 129.20.0.0 255.255.0.0 FastEthernet 0/0
R1(config)# no ip route 129.21.0.0 255.255.0.0 FastEthernet 0/0
R1(config)# no ip route 129.22.0.0 255.255.0.0 FastEthernet 0/0
R1(config)# no ip route 129.23.0.0 255.255.0.0 FastEthernet 0/0
R1(config)# ip route 129.20.0.0 255.252.0.0 FastEthernet 0/0</code></pre>
</section>
</section>
<section>
<section>
<h2>[R] Administrative Distance</h2>
<p>A router has multiple route sources, and <strong>many routing protocols can simultaneously be running</strong>. Routes to the same destination can be learned through 2 or more of them.</p>
<p>When this happens, the router has to decide wich of these "duplicates" to <em>install</em> in the routing table.</p>
<p>The router uses the <strong><em>administrative distance (AD)</em></strong>, which is a number used only to <strong>rank which route source is the most "trusted"</strong> when 2 of them are <u>competing for a specific route</u>.</p>
</section>
<section>
<h2>[R] Administrative Distance</h2>
<small>
<table>
<tr>
<td><strong>Route Source</strong></td>
<td><strong>AD</strong></td>
</tr>
<tr>
<td>Directly Connected</td>
<td>0</td>
</tr>
<tr>
<td>Static</td>
<td>1</td>
</tr>
<tr>
<td>EIGRP Summary Route</td>
<td>5</td>
</tr>
<tr>
<td>External BGP</td>
<td>20</td>
</tr>
<tr>
<td>Internal EIGRP</td>
<td>90</td>
</tr>
<tr>
<td>IGRP</td>
<td>100</td>
</tr>
<tr>
<td>OSPF</td>
<td>110</td>
</tr>
<tr>
<td>IS-IS</td>
<td>115</td>
</tr>
<tr>
<td>RIP</td>
<td>120</td>
</tr>
<tr>
<td>External EIGRP</td>
<td>170</td>
</tr>
<tr>
<td>Internal BGP</td>
<td>200</td>
</tr>
</table>
</small>
</section>
</section>
<section>
<section>
<h2>Floating Static Routes</h2>
<p>A <em>floating static route</em> for a network is a static route <strong>with an administrative distance higher than the other</strong> (static or dynamic) routes toward the same network.</p>
<p>This route is <u>not used until the primary route with the lower administrative distance is active</u>.</p>
<p>It works as <strong>backup route</strong>: only when the preferred route disappear the floating route becomes active.</p>
</section>
<section>
<h2>Floating Static Routes</h2>
<p>To configure a floating static route <strong>add the value of the administrative distance</strong> at the end of the <code>ip route</code> command:</p>
<pre><code class="no-highlight">R2# configure terminal
R2(config)# ip route 10.55.10.0 255.255.255.0 10.62.21.1 200</code></pre>
<p><strong>Testing a floating static route</strong> takeover is very simple: just shut down the current outgoing interface.</p>
</section>
</section>
<section>
<h2>Troubleshooting routing issues</h2>
<p>When a routing problem occurs in the network, the administrator must use the right tools to quickly <strong>track down and isolate the problem</strong>. The most useful are:</p>
<ul>
<li><code>ping</code> - for end-to-end communication testing.</li>
<li><code>traceroute</code> - for path identification.</li>
<li><code>show ip route</code> - for examining the routing table.</li>
<li><code>show ip interface brief</code> - to see the status and errors of interfaces.</li>
<li><code>show cdp neighbors</code> - to map the network looking at neighbors of routers and switches.</li>
</ul>
</section>
<section>
<h1>End of Lesson</h1>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>