-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProtocols.txt
More file actions
4830 lines (3600 loc) · 165 KB
/
Protocols.txt
File metadata and controls
4830 lines (3600 loc) · 165 KB
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
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*************************************************************/
* CCNA: From IT University Online Classes *
* CCNA: From Andrew Crouthamel Youtube Series *
/*************************************************************/
ICND-1
- MAC Adrress: 24 bits OUI --> Organization Unique ID
24 bits vendor assigned. Org can use anything.
- Cisco's OUI: 00:03:68
HUBs:
* Use 802.3 communication mode: CSMA/CD
* Uniform port speeds.
* Loops can be created.
* Half Duplex communication.
SWITCHEs:
* Can support ports of different speeds.
* Can prevent forwarding loops.
* Full Duplex communication.
LAN Media:
* Coaxial - Copper cable. Not used anymore.
* CAT5 UTP - Unshielded Twisted Pair. Copper cable. Variant of Coaxial.
* Fiber
UTP Cabling:
- Cat3: Used for telephones.
- Cat5: 10mb-100mb
- Cat5e: 1000mb
- Cat6: 3gb-10gb
- Cat6a: 10g
Cabling Types: Straight through & Crossover.
Crossover Cable - Connects SIMILAR devices.
Straight through - Connects DISIMILAR devices.
- If crossover cable is working when connected to similar devices or vice-versa
then there must be a feature called: Auto MPX.
Fiber Optic Cables:
- Multi Mode fiber: Used for short range distances: 1g at 600 meters.
- Single Mode fiber: Used for long range: 10g at 10km (32000 feet).
- Ethernet has a distance limitation of 330 ft (about 100meters).
IOS Basics:
---
- To establish console connection, rollover cable needs to have following
settings: 9600 baud, 8 data bits, 1 stop bit, no parity, no flow.
- Rollover cable is also called Serial cable.
IOS Modes:
---
- User (Read-Only Mode)
- Privileged/Exec/Enable
- Global Config
- Interface
- Sub-Intf
- ROM
Commands:
cisco(config)# hostname <name>
cisco(config)# banner MOTD # <message goes here. Hastag is needed>
/* user to exec mode password. This is stored in clear text in config file. */
cisco(config)# enable password <pass>
/* user to exec mode password. This is stored as a hash in config file. */
cisco(config)# enable secret <pass>
cisco(config)# username <> password <>
Remote Access:
---
cisco(config)# enable password <>
cisco(config)# line vty 0 4
cisco(config-line)# password <>
cisco(config-line)# login
IOS from Cisco Routers of following series can be used in GNS3
2600 3600 7200
POST - Power On Selft Test
- Verifies hardware and components are operational.
- Find and Load IOS software.
- Find and Load config (NVRAM).
Cisco Switches have a default vlan 1.
cisco(config)# interface vlan 1
cisco(config-if)# ip addr 10.10.10.2/24
cisco(config-if)# no shut
cisco(config-if)# exit
cisco(config)# ip default-gateway 10.10.10.1 <<< needed to connect to switch
cisco(config)# show ip interface br
- When "status" is UP. Physical interface is UP (L1 and L2 are working).
- When "Protocol" is UP.
Status/Protocol Combination:
-----
down/down (not connected) - Nothing is connected.
down/down
up/down - Intf is Up. Something wrong with L1/L2.
Administratively down/down - Intf was "shut"down by admin.
Up/Up - All is good.
cisco# show mac address-table /* contents of CAM table */
cisco# clear mac address-table
- PVST+ - Per vLAN Spanning Tree, defines one instance of STP per VLAN. It's
Cisco proprietary but interoperable with non-Cisco devices. Re-converges in
1s, instead of 50s for STP.
VLAN configuration:
cisco(config)# vlan 3
cisco(config-vlan)# name Accounting /* Inside VLAN mode */
cisco(config-vlan)# vlan 4
cisco(config-vlan)# name Sales
cisco(config-if)# switchport mode access
cisco(config-if)# switchport access vlan 4
Voice VLAN
- Cisco switches have a special vlan called Voice VLAN.
- If there is an IP Phone on access port, place that in Voice VLAN. Otherwise,
use whichever data VLAN is assigned.
cisco(config)# interface fast ethernet0/1
cisco(config-if)# switchport mode access
cisco(config-if)# switchport access vlan 3
cisco(config-if)# switchport voice-vlan 100
VLAN Trunking
----
- Trunk interface passes all (or selected) VLANs.
- Both ends of trunk interface must have same native VLAN or else trunk will not
work.
- Obviously, the interface must be in "trunk" mode and not "acess" mode.
/* MUST BE DONE FIRST */
cisco(config)# switchport trunk encap dot1q
/* makes interface as trunk */
cisco(config)# switchport mode trunk
/* OPTIONAL: only if you want to change native vlan. It MUST match on both
* sides. */
cisco(config)# switchport trunk native vlan 20
/* OPTIONAL: only allow following VLANs */
cisco(config)# switchport trunk allowed vlans 1, 10, 20, 30, 41, 45, 300
>>>>>>>> Andrew Crouthamel Youtube Series <<<<<<<<<<<
IANA Ports List
- Well known ports: 0-1023
- Registered ports: 1024-49151
- Dynamic/Private ports (aka Ephemeral ports).
49152-65535
- Nodes that are explicitly configured to listen to multicast address will
receive multicast traffic.
Usable IP address ranges:
Host IP: 0.0.0.0 to 223.255.255.255
Multicast: 224.0.0.0 to 239.255.255.255
Experimental: 240.0.0.0 to 255.255.255.255 << never used
Private: 10.0.0.0/8
192.168.0.0/16
172.16.0.0/12
These are NOT routable. Routers drop packets with these IP.
Sepcial Addresses:
0.0.0.0 Default Route
127.0.0.1 Loopback
169.254.0.0 to
169.254.255.255 Link-Local or APIPA
(Automatic Private IP Addressing)
Classful Addressing
---
Class A: 1-127 (/8)
Class B: 128-191 (/16)
Class C: 192-223 (/24)
Class D: 224-239 Multicast
Class E: 240-255 Experimental
IPv6 Addressing
---
- Types of IPv6 addresses:
* Global Unicast - Routable, can be assigned using DHCP.
* Link Local - Not routable. Only for local subnet.
* Loopback - all zeros except last bit--> ::1/128
* Unspecified - It's all zeros (or just ::)
* Unique Local - Similar to private addresses of IPv4
FC00::/7 to FDFF::/7
* Multicast -
* Anycast - Unicast address assigned to multiple devices.
* Subnetting - Recommended on /64 boundary.
2001:0DB1:ACAD:0000::/64
2001:0DB1:ACAD:0001::/64
2001:0DB1:ACAD:0002::/64
IPv6 Unicast and Multicast
---
- Global Unicast Addresses has 3 parts
* Global routing prefix
* Subnet ID
* Interface ID
- Dynamic IPv6 Address assignment.
* SLAAC or DHCPv6.
* SLAAC = Stateless Address Autoconfiguration
- ICMPv6
- Router Advertisement (RA) tells how to configure your device with IPv6
address.
-
TODO: Watch lessons on IPV6 again.
Data Link Layer
---
- Two parts: LLC and MAC
* LLC - Logical Link Control. Identifies the protocol to be used to send
pkts out.
* MAC
- LL Protocols are:
* Ethernet - Uses CSMA/CD
* 802.11 Wireless - Uses CSMA/CA
* PPP
* HDLC, Frame Relay
Physical Layer
---
- MAC addresses has OID and DID (Manufactures ID and Device ID).
Few types of encodings:
- Manchester Encoding to transmit bits
* Going from high to low = 0
* Going from low to high = 1
- Non-Return to Zero (NRZ)
*
- 4B/5B
- 8B/10B
+ On Radio Waves, modulations is used (amplitude and frequency) or Pulse Code
Modulation (PCM)
Network Media Types
---
- Copper
+ Interference is biggest issue
* EMI - Flourescent lighting
* RFI - Microwaves
* Crosstalk - wires picking electrical signals from other wires. But not
so much these days. Twisted pair reduces it.
@ UTP (Unshielded Twisted Pair) - cheaper; uses RJ45 connector.
@ STP (Shielded Twisted Pair) - costly; uses RJ45 connector.
@ Coaxial - Cable and TV installations.
- UTP cables: Cat 5 (100 Mbps), 5e (1 Gbps), 6 (1 Gbps), 6a
- Types of UTP: Straight Through, Crossover, Rollover.
* Straight Through - End device to switch
* Crossover - similar devices (host to host or switch to switch)
* Rollover - Cisco implementation
- Fiber Optic
+ Single Mode Fibre and Multi Mode Fibre
+ SMF - Uses Laser and range is in kilometer. Costly. Yellow color.
+ MMF - Uses LED and in range of few meters. Cheap. Orange color.
- Wireless: 802.11 (WiFi), 802.15 (Bluetooth), 802.16 (WiMax)
+ 2.4 GHz - can penetrate through walls.
+ 5 GHz - line of sight.
- Within 802.11 (WiFi), lot of substandards
+ 802.11a - 5 GHz - 54 Mbps
+ 802.11b - 2.4 GHz - 11 Mbps
+ 802.11g - 2.4 GHz - 54 Mbps
+ 802.11n - 2.4 or 5 GHz - 100 to 600 Mbps
+ 802.11ac - 2.4 and 5 GHz - 250 to 1.3 Gbps
+ 802.11ad - 2.4 and 5 and 60 GHz - WiGig - up to 7 Gbps
These standards are backwards compatible.
Topology Basics
---
- Ethernet Bus
- Point to Point
- (a) Star Topology (b) Hub and Spoke Topology
- Mesh
- Ring Topology
Ethernet Basics
---
- LAN (L2 protocol). Data Link Layer tech.
- 10, 100, 1 G, 10 G, 40 G, 100 Gbps
- LLC is done in software
- MAC in hardware
- Max size of Ethernet pkt = 1518 bytes
- Min size of Ethernet pkt = 64 bytes
- If it's less than 64 bytes, it's either a collison pkt or runt frame (bad FCS)
and discarded.
- If larger than 1518 bytes it's discarded unless it's 802.3ac which is 1522
bytes allowing VLANs.
Ethernet Fields
---
Preamble
Start Frame
Dest MAC
Src MAC
Length
Data
FCS
- Unicast, Multicast and Broadcast addresses
- Multicast starts with 01-00-5E
ARP
---
- L2 destination resolution, given an L3 address.
- L3 destination resolution is DNS (but only name to IP resolution).
Reverse ARP
---
- Given MAC, provide IP.
Switch Basics
---
- Two ways of packet forwarding
(a) Store and Forward
* Read entire frame
* Do CRC check and foward frame.
* Slow
(b) Cut Through
* Fast-Forward: Forward after reading Dest MAC
* Fragment Free: Save first 64 bytes because if there's collision, it's
usually in first 64 bytes. Doesn't do CRC checks.
- Buffering:
(a) Port based - One queue per port
(b) Shared - Common queue
IOS Device Basics
---
IOS Commands Basics
---
Switch Config Basics
---
VLAN Basics
---
- Default VLAN is 1
- Data VLAN
- Voice VLAN
- Trunk: Allows multiple VLANs per cable.
- Management VLAN
- Native - untagged traffic
Creating VLANs
---
- Standard Range - 1 to 1005; 1002 to 1005 are for Token Ring and FDDI
+ VLAN 1, 1002 to 1005 are already created by Cisco devices.
+ Stored on VLAN.dat file on compact flash.
- Extended Range - 1006 to 4094
+ Not on VLAN.dat file
+ Not learnt through VTP (VLAN Trunking Protocol).
- VTP - Cisco proprietary protocol
+ GVRP - Non-Cisco protocol
VLAN Trunks
---
-
/*************************************************************/
* CCNA Syllabus *
* Refer to 200-120_composite2.pdf file
/*************************************************************/
/*************************************************************/
* Table of Contents *
/*************************************************************/
1 Ethernet Fundamentals
2 Spanning Tree Protocol (STP)
3 Rapid Spanning Tree Protocol (RSTP)
4 VLAN
5 LAG/LACP
Cisco CCNA Notes (Perhaps from DeAnza College Course)
6 IP
7 Chapter 2: Static Routing Overview
7.1 Cisco Discovery Protocol (CDP)
8 Chapter 3: Dynamic Routing Protocols
9 Chapter 4: Distance Vector Routing Protocols
9.1 RIP
9.2 EIGRP
10 Chapter 5: RIP v1
11 Chapter 6: VLSM and CIDR
12 Chapter 7: RIP v2
13 Chapter 8: Routing Table: A Closer Look
14 Chapter 9: EIGRP
<<<<< End of Cisco Course notes
15 IS-IS Primer
16 OSPF Primer
17 OSPF 101
18 RIB
19 BGP Primer
20 MPLS Overview
21 MPLS Fundamentals
22 MPLS L3VPN Primer v2
23 VPLS Overview
24 IP QoS Intro (PWFQ Intro)
25 QoS Primer
26 ARP
27 ICMP
28 UDP
29 VPN Technologies
29.1 EVPN
Todo: TCP, UDP, IP, IGMP, ICMP, DCHP, DNS, ARP, RARP, SNMP, IGMP
/************************************************************/
CCNA Cisco Net Academy Notes
from Cisco Class Notes at
DeAnza College
/************************************************************/
/*************************************************************/
INTERNET PROTOCOL (IP)
Foothill College Notes
Cisco Academy
/*************************************************************/
- OSI Model
layer 7 - Application: Interacts with applications.
layer 6 - Presentation: Converts code and reformats data
layer 5 - Session: coordinates interaction between end-to-end
application processes.
layer 4 - Transport: Provides end-to-end data integrity and QoS
layer 3 - Network: Switches and routes data to the appropriate n/w
device.
layer 2 - Data Link: Transfers units of data to other end of physical
link.
layer 1 - Physical: Transmits and recv on n/w medium.
- Layer 1: Physical:
- Layer 2: Ethernet, Frame Relay, PPP
- Layer 3: Logical addressing (end-to-end addressing), Routing, Path
determination. IPv4, IPv6 and IPx
- Layer 4: TCP, UDP, SCTP
- Layer 5: SAP, NetBIOS
- Layer 6: Encryption, Compression, MIME, TLS, SSL,
- Layer 7: Authentication, FTP, HTTP, Telnet.
OSI Model TCP/IP Model
+-------------+--------------+--------------+
| Application | | |
+-------------+ | Application |
|Presentation | | Layer |
+-------------+ | |
| Session | | |
+-------------+--------------+--------------+ <-- port number
| Transport | | Transport |
+-------------+--------------+--------------+ <-- protocol number
| Network | |Internet Layer|
+-------------+--------------+--------------+ <-- type code
| Data Link | | |
+-------------+ | Link Layer |
| Physical | | |
+-------------+ +--------------+
- IPv4 Packet Header
0 15 16 31
+---------------+---------------+---------------+---------------+
| Vers | IHL | Service Type | Packet Length |
+---------------+---------------+---------------+---------------+
| Identification | Flag | Frag. Offset |
+---------------+---------------+---------------+---------------+
| TTL | Protocol | Header Checksum |
+---------------+---------------+---------------+---------------+
| Source IP Address |
+---------------+---------------+---------------+---------------+
| Destination IP Address |
+---------------+---------------+---------------+---------------+
- IP Header in a packet travels unchanged throughout the network.
- Only MAC header changes with every hop.
- Unreliable, connectionless datagram delivery service.
- Unreliable: Best effort service. If IP receives error packet, its
discarded and an ICMP message is send to sender.
- Connectionless: No state information of packets/datagram is saved.
Vers (4-bit): IPv4
Header Length (4-bit): HL in 32-bit size. Hence, max of 60 byte header is
possible.
Service Type (8-bits):
3-bits: unused
1-bit: minimize delay
1-bit: maximize throughput
1-bit: maximize reliability
1-bit: minimize monetary costs
Only one of the above 4 can be on.
Last-bit: always set to zero
Packet Length (16 bits): Packets up to 65536 bytes can be sent/recvd by
IP. However, lower layers cannot handle it and fragmentation happens.
Identification (16-bits):
Flag ():
Frag. Offset ():
TTL (8-bits):
Protocol (8-bits):
Header Checksum (16-bit):
Source IP (32-bit):
Dest IP (32-bit):
Table of Contents
/**************************************************************/
* *
* Routing Protocols & Concepts *
* *
/**************************************************************/
Chapter 1: Introduction to Routing and Packet Forwarding
- ROM in a router stores the following
(a) Bootstrap instructions
(b) Basic diagnostic software
(c) Scaled-down version of IOS
- Router Boot-up Process
(a) Perform POST
(b) Load bootstrap program
(c) Locate and load Cisco IOS software
(d) Load startup config file
- Main job of bootstrap program is to locate Cisco IOS and load it in to RAM
- Cisco IOS can be either on Flash or other places like a TFTP server
- Management Ports:
- Not used for packet forwarding
- Used for router configuration
- Two types
(a) Console Port
(b) Auxiliary Port
- Router interfaces can be divided in to two types
(a) LAN Interfaces - such as Ethernet and FastEthernet
(b) WAN Interfaces - such as serial, ISDN and Frame Relay
>>>>> Endianness <<<<<
- 0th bit is MSB and 7th bit is LSB. When sending out, data is sent in 0
to 7, 8 to 15 bits and so on. This is Big Endian or Network Byte Order.
Chapter 2: Static Routing
- For WAN connections, Cisco routers supports the following cable types
(a) EIA/TIA-232
(b) EIA/TIA-449
(c) V.35
(d) X.21
(e) EIA/TIA-530
- Don't have to remember them. On Cisco side, DB-60 port is used. Other
end is the type above cables provide.
- Like devices are those whose ports have similar pins and unlike devices are those
whose ports have different pins.
- Routers and PCs are like devices. Switches and Hubs are like devices. Naturally,
switches and routers are unlike devices.
- Within Ethernet LANS, two types of cables are used:
(a) Straight-through: to connect unlike devices
- switches to routers
- switches to PC
- Hubs to routers
- Hubs to PC
(b) Crossover Cable: to connect like devices
- switch to switch
- PC-to-PC
- switch to hub
- hub-to-hub
- Router-to-Router
- Router-to-Server
- On serial links, one end is DTE and one is DCE.
- "Administratively Down" means that interface is "shutdown".
- "Line Protocol Down" means interface is not receiving carrier signal from peer.
- Ethernet interfaces on a router participates in ARP.
>>>> Configuring Interfaces
>> Serial Interface
interface serial 0/0/0
ip address 172.10.2.1 255.255.255.0
no shut
>> Configuring Serial Links in Lab
- Cisco serial interfaces are DTE by default but can be configured as DCE.
- To configure an interface as DCE, connect the DCE end of the cable to intf
and configure "clock rate" command.
- DCE = female connector, DTE = male connector
/*************************************************************/
>>>> Cisco Discovery Protocol [CDP] <<<<
/*************************************************************/
- CDP is a powerful info gathering tool used to get info about directly
connected Cisco devices.
- Its an L2 protocol, meaning only physically connected devices are considered
neighbors.
- Allows to access summary of protocol and address info about connected
Cisco devices.
- Its a proprietary tool.
- CDP Advertisements contain: router interfaces, model numbers, intf used
to make connections etc
- "show cdp neighbor" and "show cdp neighbor detail" gives info about neighbor
- To disable CDP on the entire box: (config)#no cdp run
- To disable CDP on an interface: (config-if)#no cdp enable
- show cdp neighbor
- show cdp neighbor detail
>>>> Static Routes <<<<
- Static routes [ip route ...] are configured when routing from a network to
a stub network.
- When an exit intf goes down [shutdown], the static route cannot be resolved
to an exit intf. Then it is removed from the routing table.
- The entries are still in the running-config. So, if the intf comes back up
again [no shutdown] then they are installed in the routing table.
- There are certain protocols used on point-to-point serial link such as HDLC
and PPP where next-hop IP address is not used. The IP packet, in HDLC case,
is encapsulated with L2 broadcast destination address.
- Static Route Summarization.
- Helps reduce routing table size
- Lookups are faster
- When instead of exit interface, if an exit IP is configured, then there will
be two lookups to resolve exit interface. This is called Recursive Route Lookup.
[RRL]
- To avoid RRL, we can configure exit interface instead of exit IP. This is
only possible for serial interfaces as there is only one device [router] at
other end in serial intf.
- Ethernet intf is a multi-access intf and there could be multiple devices
sharing that end point. By having Ethernet intf, router doesn't know the
end point.
- For Ethernet intf, configure both exit intf and next-hop IP.
- Route Summarization reduces routing table size. Multiple static routes can be summarized into a single static route if:
a) The destination networks can be summarized into a single network address, and
b) The multiple static routes all use the same exit-interface or next-hop IP address
>> Default Static Route
- ip route 0.0.0.0 0.0.0.0 [exit interface]
- Default route need not be static route, but it usually is.
Chapter 3: Dynamic Routing Protocols
|<-- Dist. Vect. --->|<---- Link State ---->|<--Path Vect-->
-----------+---------+----------+-----------+------------+--------------+
Classful | RIP | IGRP | | | EGP |
-----------+---------+----------+-----------+------------+--------------+
Classless | RIPv2 | EIGRP | OSPFv2 | IS-IS | BGPv4 |
-----------+---------+----------+-----------+------------+--------------+
IPv6 | RIPng | EIGRPv6 | OSPFv3 | IS-ISv6 | BPGv6 |
-----------+---------+----------+-----------+------------+--------------+
- Interior Gateway Protocols [IGP] are used for routing within an Autonomous
Systems (routing domain). Examples: RIP, IGRP, EIGRP, OSPG and IS-IS
- Exterios Gateway Protocols [EGP] are used for routing between Autonomous Systems.
Examples: BGP, its the only practical solution.
- IGP comprises of Distance Vector and Link State protocols
>>>> Distance Vector Protocols <<<<
- Distance Vector := Distance + Direction
Distance := hop count or similar metric
Direction := exit interface or IP of next hop router
- DV uses Bellman-Ford algo to determine best path
- DV works best when
- simple and flat network like hub/spoke n/w
- worst-case convergence times are not a concern
>>>> Link State Protocols <<<<
- A router configured with Link State protocol can get a "complete view"
of the network.
- LS works best when
- Network design is hierarchical
- Fast convergence is crucial
- Classful routing: Subnet mask not included. Network is either Class A, B, C or D
- Example: RIPv1, IGRP
- Classless routing: Subnet mask is included.
- Example: RIPv2, EIGRP, OSPF, IS-IS, BGP
- Metrics generally used in routing protocols
Hop Count
Bandwidth
Load - Considers traffic utilization of a certain link
Delay
Reliability - probability of error
Cost - can represent a metric or combo of metrics/policy
- RIP uses Hop Count
- IGRP & EIGRP use Bandwidth, Delay, Reliability and Load.
- IS-IS & OSPF use Cost. IOS or network admin determines this cost.
- All protocols in CCNA course are capable of load balancing upto 4 equal cost
routes.
- EIGRP can load balance between unequal cost routes.
>>>> Administrative Distance <<<<
- AD defines the preference of one routing source to the other. Lower AD, higher
preference. 0 <= AD <= 255
- Directly connected routes have 0 AD and it cannot be changed.
- AD of 255 means that router does not trust the source and route is NOT
installed in the routing table.
Source AD
-------------------
Connected 0
Static 1
EIGRP Summary 5
External BGP 20
Internal EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120
External EIGRP 170
Internal BGP 200
>>>> Static Route <<<<
- Static route has an AD of 1
- "Floating Static Route": When a route to a network exists in routing table
due to a dynamic protocol, but admin configures a static route with AD greater
than that of routing protocol, then such a static route is called "Floating
Static Route".
Chapter 4: Distance Vector Routing Protocol
DVRP include RIP, IGRP and EIGRP
RIP
-- Hop count is used as metric.
-- If hop count > 15, RIP cannot supply route to that network.
-- Updates are broadcast or multicast every 30 seconds, by default.
IGRP
-- Cisco's proprietary protocol
-- A combination of bandwidth, delay, load and reliability is used
as metric.
-- Updates are broadcast every 90 seconds, by default.
-- Its obsolete now. EIGRP is used now.
EIGRP
-- Can perform unequal cost load balancing.
-- Uses Diffusing Update Algorithm [DUAL] to calculate shortest path.
-- Updates are sent only when there is a change.
| Distance Vector | Link State
--------------------------------------------------------------------------
| RIPv1 | RIP v2 | IGRP | EIGRP | OSPF | IS-IS
--------------------------------------------------------------------------
A | Slow | Slow | Slow | Fast | Fast | Fast
--------------------------------------------------------------------------
B | Small | Small | Small | Large | Large | Large
--------------------------------------------------------------------------
C | No | Yes | No | Yes | Yes | Yes
--------------------------------------------------------------------------
D | Low | Low | Low | Medium | High | High
--------------------------------------------------------------------------
E | Simple | Simple | Simple | Complex | Complex | Complex
A = Speed of convergence
B = Scalability - Size of network
C = Use of VLSM
D = Resource usage
E = Implementation & Maintenance
>>>> Routing Information Protocol [RIPv1] <<<<<<
- The following timers exists for RIPv1
(a) Update [30s default]
Time when routing updates are sent to neighbors.
(b) Invalid [180s default]
Time to keep a route in the table of an update to refresh if not received.
Route is marked invalid by setting the hop count to 16 and kept in table
until flush timer expires.
(c) Flush [240s default]
When this timer expires, route is removed from the table.
(d) Holddown [180s default]
This timer is used to stabilize the routing info when topology is yet to
converge. Once a route is marked unreachable, the route has to wait for
holddown seconds to learn about it again.
- "show ip protocols" and "show ip route" will give info about the timers.
- Triggered updates are sent [without having to wait for update timer] when
the following happens
(a) An interface state changes.
(b) A route has entered [or exited] the "unreachable" state.
(c) A route is installed in routing table.
- When all routers send updates simultaneously, collisions can occur. So, Cisco
introduced RIP_JITTER variable that subtracts [0-15%] from update timer. Now,
the update timer becomes, somewhere between 25-30s
>> Routing Loop Avoidance
- There are numerous mechanisms to eliminate routing loops
(a) Defining max limit on certain metrics [such as TTL] to avoid count
to infinity.
(b) Holddown timers
(c) Split horizon
(d) Route poisoning or poison reverse
(e) Triggered updates
- Holddown Timer: Used to prevent regular updates due to inappropriately
installing a route in routing table [may be due to interface flapping etc]
- Workings of Holddown Timer
(a) Router receives an update that a certain network is down
(b) Router marks this route as "Down" and starts the Holddown Timer
(c) If an update for that route with a better metric is received, timer
is invalidated and the better route is installed.
(d) If an update with same or worse metric is received, its ignored.
(e) Router still forwards packets to "Down" route, to cover for
intermittent connectivity issues.
- Split Horizon: A router should not advertise a network through the interface
from which the udpate came.
- Route Poisoning [or Poison Reverse]: is used to mark the route as unreachable
in a routing update sent to other routers.
- Split Horizon with Poison Reverse: When sending updates out a specific
interface, designate any networks that were learned on that interface as
unreachable.
>>>>> RIP <<<<<
- Standardized routing protocol that works in mixed vendor router environment.
- Easiest protocols to configure; good choice for small networks.
RIPv1 Features:
- Supports split horizon with poison reverse to prevent loops
- Capable of load balancing up to six equal cost paths. Default is four equal
cost paths.
RIPv2 Features:
- Includes subnet mask in routing updates, making it classless routing [RIPv2]
- Has authentication mechanism to secure routing table updates.
- Supports variable length subnet mask [VLSM]
- Uses multicast addresses instead of broadcast.
- Supports manual route summarization.
>>>>> EIGRP <<<<<
- Enhanced IGRP is a classless, DV proprietary routing protocol from Cisco.
EIGRP Features:
- Triggered updates [there is no periodic updates]
- Use of a topology table to maintain ALL the routes received from neighbor
[not just the best route]
- Establishment of adjacencies with neighbors using "Hello Protocol".
- Support for VLSM and manual route summarization.
- Also, supports CIDR.
- Metric is complex.
Advantages of EIGRP:
- Metric is based on bandwidth and cumulative delay of the path.
- Fast convergence due to Diffusing Update Algorithm [DUAL] route calculation.
- Bounded updates (meaning, only the changed info is sent), resulting in less
bandwidth consumption in large networks.
- EIGRP supports multiple network layer protocols through protocol dependent
modules.
- Sits on top of IP. Doesn't use TCP or UDP. It uses RTP (Reliable Transport
Protocol) to deliver pkts to neighbors.
- Supports Equal and Unequal Cost Load Balancing.
EIGRP Messages:
---
HELLO, ACK, UPDATE, QUERY, REPLY
EIGRP HELLO Pkts
- Used to discover EIGRP neighbors and form adjacencies.
- EIGRP HELLO pkts are sent to multicast group address. IPv4 on 224.0.0.10 and
IPv6 on FF02::A
- There is no ACKs for HELLO packets.
- Sent every 5s (every 60s on low speed NBMA networks).
- Hold timer = 3 * Hello timer (5s). If HELLO pkts are not received within hold
timer, neighbor is unreachable.
- In IP header (v4 or v6), EIGRP is identified as by Protocol Number 88. EIGRP
doesn't run on TCP or UDP.
R1 <---------------------------------------------> R2
HELLO, I am R1 ->
<- HELLO, I am R2
NEIGHBOR table <- UPDATE, here is my routing table.
is filled
ACK, thanks for info ->
UPDATE, here is my routing info ->
TOPOLOGY table TOPOLOGY table
is filled is filled