forked from gilsontsang/Network-CCNA-David-Bombal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Week 8 Notes
362 lines (311 loc) · 13.7 KB
/
Week 8 Notes
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
For EIGRP to work:
- EIGRP Neighbor must be on common subnet
- Neighbor K values must be equal
- Neighbor AS must be equal
- Note: Access List can block EIGRP
==See EIGRP info==
R1#show ip protocols
R1#show ip eigrp interfaces
_______________________________________________________
===EIGRP Simulations - Section485===
Enable EIGRP in AS 100
Advertise all networks using the classful mask
Router1> en
Router1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)# router eigrp 100
Router1(config-router)# network 10.0.0.0
Router2> en
Router2# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)# router eigrp 100
Router2(config-router)# network 10.0.0.0
_______________________________________________________
===EIGRP Simulations - Section486===
Enable EIGRP in AS 100
192.168.1.1/28 Advertise FastEthernet 0/0 in EIGRP using the exact network mask
10.1.1.1 /24 Advertise the Serial 0/0 interface using the exact network mask
172.16.1.1/32 Advertise Loopback 0 in EIGRP using the exact network mask
Router1> en
Router1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)# router eigrp 100
Router1(config-router)# network 192.168.1.0 0.0.0.15
Router1(config-router)# network 10.1.1.0 0.0.0.255
Router1(config-router)# network 172.16.1.1 0.0.0.0
_______________________________________________________
===EIGRP Simulations - Section487===
Enable EIGRP in AS 100 on Router1. Router2 has already been configured
Router1's Ethernet IP address is 10.1.1.1/24
Router1's Serial 0/1 IP address is the first in the subnet (192.168.168.184/30)in the diagram
Use IP address masks to advertise both networks (use /32 mask)
Router1> en
Router1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)# router eigrp 100
Router1(config-router)# network 10.1.1.1 0.0.0.0
Router1(config-router)# network 192.168.168.185 0.0.0.0
_______________________________________________________
===EIGRP Simulations - Section488===
Enable EIGRP in AS 100 with as few commands as posible to get a fully functioning network, but without using the network 0.0.0.0
Sart with Ethernet 0 (192.168.1.1/28), then Loopback 0 (172.16.1.1 /32) and then Serial 0 (10.1.1.1 /24)
Make sure that EIGRP advertises routes correctly (Hint: VLSM)
Router1> en
Router1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)# router eigrp 100
Router1(config-router)# network 192.168.1.1 0.0.015
Router1(config-router)# network 172.16.0.0
Router1(config-router)# network 10.0.0.0
Router1(config-router)# no auto-summary
_______________________________________________________
==Configure Gateway/default route==
R1#conf t
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.254
==Redistribute/External EIGRP==
> Advertise this default route to EIGRP neighbors
R1(config)#router eigrp 100
R1(config-router)#redistribute static metric 10000 100 255 1 1500
**Previously, If redistribute is not applied, then all routes are Internal EIGRP (90). But Gateway of Last Resort is from External EIGRP (170)
==NAT setup==
f0/0 R1 f0/1 <-> Cloud
R1#conf t
R1(config)#int f0/1
R1(config-if)#ip nat outside
R1(config-if)#int f0/0
R1(config-if)#ip nat inside
R1(config-if)#exit
==PAT / NAT Overload Access List setup==
> Permit all devices on the 10 network
R1(config)#ip nat inside source list 1 interface f0/1 overload
R1(config)#access-list 1 permit 10.0.0.0 0.255.255.255
==Enable DNS==
R1(config)#ip domain-lookup
R1(config)#ip name-server 8.8.8.8
_______________________________________________________
OSPF Open Shortest-Path First
- Mix routes between diff vendors
- Dijkstra Algorithm used for determining best route to destination
- Link state running protocol
> Link: router interface
> State: description of interface and its relationship to neighboring routers
- Collection of Link State = topological database / link state database
- Create neighbors by sending out Hellos using multicast 224.0.0.5 or unicast
- Above layer 3 (IP), below layer 4 (TCP 6/UDP 17)
- Port 89
- Default, synchronized every 30 minutes
OSPF Tables
1) IP OSPF Neighbor Table
- List of neighbors shown in Adjacency Table / OSPF Neighbor Table
==Show Table=
R1#show ospf neighbors
2) IP OSPF Topology Database (LSDB Link State Database)
- LSDB contains all routers and attached links in area/network
- All OSPF routers in the same area share the same database
3) IP Routing Table (Forwarding Table)
- Best routes are placed here
OSPF Packet Types
1) Hello
- Dynamically discover neighbors, forms and maintains those neighbors
- Discover Frequency: Ethernet (10 seconds)
- Discover Frequency: Serial/NBMA Non-broadcast multi-access environment (30 seconds)
- Dead Timer (if no response to Discover within Dead Timer, relationship is torn down)-> 4 times the Hello interval
2) DD/DBD Database Description
- Brief overview of LSA Link State Advertisements
3) LSR Link State REquest
- If DD/DBD is missing information, request for FULL LSA information
4) LSU Link State Update
- Contains FULL LSAs in response to LSR
5) LSAck Link State Acknowledgement
- Confirm receipt of LSU
OSPF Hierarchy (Areas)
- OSPF's network is its own AS
- When multiple OSPF's are used, they are broken up into Areas (Area 0 is the back bone - all traffic will traverse the backbone)
**Both sides of the link must be in the same Area
- Cisco recommends no more than 50 routers in a single Area
- Areas are useful in stopping the flood of LSA by breaking up the network into multiple areas
- Routers that border the backbone area and another area is known as ABR Area Border Routers
- ABRs are also backbone routers
- Routers that borders 2 AS (could be same or different routing systems), are call ASBR Autonomous Systems Border Routers (could be RIP and EIGRP)
OSPF ABR
- BENEFITS: Summarization of routes
ex. Area 1: 10.1.1.0/24 - 10.1.100.0/24, the ABR can summarize the routes as 10.1.0.0 /16
ex. Area 1: 10.2.1.0/24 - 10.2.100.0/24, the ABR can summarize the routes as 10.2.0.0 /16
OSPF Router ID
- Chosen based on:
1) Manual configuration
2) Highest Loopback interface (never go down)
3) Highest IP address (physical interface)
4) Everything else
==Specify OSPF Router ID==
> High IP address is 10.1.1.1
*****using ospf 1 is local to the router, it does not need to match other routers
R1#conf t
R1(config)#router ospf 1
==Refresh OSPF Router ID (assume there is a higher IP address than current)==
R1(config)#no router ospf 1
R1(config)#router ospf 1
==Manual OSPF Router ID==
R1(config)#router ospf 1
R1(config-router)#router-id 192.168.1.1 (arbitrary)
==Setup OSPF Network==
> This step is needed, otherwise OSPF will not work
R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
==Show OSPF info==
R1#show ip ospf int
R1#show ip ospf int brief
R1#show ip ospf neighbor
R1#show ip ospf database
==Enable OSPF inside interface==
R1(config)#int g0/0
R1(config)#ip address 10.1.1.0 0.0.0.255
R1(config-if)#ip ospf 1 area 0 (?)
==Configure OSPF timers==
> To adjust timers, simply adjust it to Broadcast, it might be set to Non-Broadcast
R1(config)#int g0/0
R1(config-if)#ip ospf network broadcast
OSPF Hello Packet
> Must be the same:
1) Hello and Dead intervals
2) Area ID
3) Authentication password
4) Stub area flag
OSPF DR Designated Router
- Criteria for DR: Chosen based on highest priority
*Priority is from 1-255 (0 excludes the router from being a DR) - default = 1, disable = 0
- DR/BDR can see 224.0.0.6 multicast update
- All other routers sees 224.0.0.5
OSPF DR Process
R1 (DR) <-> R2 (BDR Backup DR) <-> R3,4,5,6
1) R1 goes down, R1 updates R2 through multicast 224.0.0.6
2) R2 receives multicast 224.0.0.5, that R1 went down
3) R2 sends multicast 224.0.0.5 to all OSPF routers R3,4,5,6
4) All active OSPF routers are now acknowledged that network has gone down
**If no DR, then all routers are adjaceny routers and all routers will multicast to each other (saves update and duplicated traffic)
**Only Main DR and Backup DR has full relationships with all OSPF routers
**Every ethernet segment requires the maintenance and electric of its own DR (10.1.1.0/24 and 10.1.2.0/24 are two different)
***DR is not preemptive (ex. if R2 (priority 10) goes down and R5 (priority 5) becomes DR and R3 becomes BDR and if R2 comes back online, R2 will not become DR again because DR already exist even though R2 has highest priority - not preemptive. R2 will become DRO DR Other) - will not host another election
OSPF SPF Algorithm
- Default reference bandwidth = 100mbps (cost of 1)
- Cost = 10^8 / bandwidth
(Note: Bandwidth of 10Mbps = 10,000,000bps, therefore Cost of 10Mbps = 100,000,000 / 10,000,000 = 10)
(Note: Bandwidth of 1.544Mbps = 15,440,000bps, Cost = 64)
==Change reference bandwidth==
R1(config)#auto-cost reference-bandwidth X
==Change cost of an interface==
R1(config-if)#ip ospf cost X
OSPF stub nssa
- stub stubby area (i.e. loopback)
- nssa not so stubby area
- stub and nssa is used for reducing the routes in the routing table
Note: "Initial SPF schedule delay 5000 msecs" - when a network is going down or a new network is added, OSPF will wait 5 seconds allowing OSPF to stablize before running the new SPF algorithm
*****
==Total OSPF setup==
R1#conf t
R1(config)#interface f0/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#interface f0/1
R1(config-if)#ip address 10.1.2.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#router ospf 1
R1(config-router)#network 10.1.1.1 0.0.0.0 area 0
R1(config-router)#network 10.1.2.1 0.0.0.0 area 0
R1(config-router)#interface loop 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
> OR enable all networks [R1(config-router)#network 0.0.0.0 255.255.255.255 area 0]
*Routers that are connected to each other (usually via Serial) is Point-to-Point.
**Point-to-Point does not require an election
***Even if loopback's network is not a part of the OSPF interface, loopback's network will be the Router ID
==Optional:Change Router ID manually==
R1(config-router)#router-id 1.1.1.1
R1(config-router)#clear ip ospf process
OSPF Network Type
- Broadcast = fastEthernet
- Point_to_Point = Serial
OSPF Link Count
- 2 = Serial (point-to-point: 1 - transmitter's IP address, 1 - receiver's IP address)
- 1 = fastEthernet
- 1 = loopback
ex. router with 2x serial interfaces, 1 fastEthernet and 1 loopback = Link Count of 6
OSPF Link Count ex.
R1 10.1.2.1 255.255.255.0 <-> R2 2.2.2.2
1) Point-to-Point (Link connecting to neighboring router)
Link ID: 2.2.2.2
Link Data: 10.1.2.1
2) Stub Network (Actual subnet on point-to-point link)
Link ID: 10.1.2.0
Link Data: 255.255.255.0
OSPF States
Full - Between DR and BDR
2WAY - Between DROTHER DR Other
**DR and BDR relations do not take place on Serial links
***DR, BDR or DROtherare elected per segment basis (only on multiaccess links), not per router. I.e. if R1 has g0/0 and g0/1, one can be DR and the other can be BDR
OSPF DR Election Process
1) Hello packets are exchanged via IP multicast packets on each segment
2) Router with highest OSPF priority on a segment becomes the DR (default OSPF priority = 1, do not elect = 0)
3) Process repeats for BDR
4) In case of tie, router with highest RID will win
5) Priority of 0 will become the DROTHER
**OSPF DR Election Priority
1) Highest priority
2) Highest router ID
**Router ID is not based on the interface's IP address, but on the highest IP address on the Router
**Router ID must be UNIQUE
3) Highest Loopback IP address
4) Highest configured physical interface address
~Turning an expensive router into a PC
- Default gateway is set, therefore "no ip rout" was used
==Turn on logging==
R1(config)#logging console
==Turn on logging (telnet/ssh)==
R1(config)#term mon
***Router Types
- ABR Area Border Router - separate routers with different areas, always touch Backbone
- ASBR Autonomous System Border Router - seperates routers with different routing protocols (between EIRP and OSPF)
- Internal Router - does not touch other routers
==Convert EIGRP to OSPF (ABR Area Border Router)==
> Recall: EIGRP uses Bandwidth and Delay to determine best route
> Recall: OSPF only understands Bandwidth, therefore, we need to specify a seed metric
R1(config)#router eigrp 100
R1(config-router)#network 10.1.1.2 0.0.0.0
> Advertising OSPF in EIGRP
R1(config-router)#router ospf 1
R1(config-router)#network 10.1.2.1 0.0.0.0 area 1
> Advertising EIGRP in OSPF
R1(config-router)#redistribute eigrp 100
R1(config-router)#redistribute ospf 1 metric 10000 1000 255 1 1500 [memorize this]
EIGRP1 <-> OSPF1(Area1) <-> OSPF2(Area0) <-> OSPF3 (Area0)
**OSPF3#show ip route
> OSPF2 is an "Intra-area OSPF Route" (local)
> OSPF1 is an "Inter-area OSPF Route" (different local)
> EIGRP1 is an "External route" (different routing protocol)
LSA Link State Advertisement
1) Router LSA (Type 1)
- Router ID of directly connected routers
2) Net LSA (Type 2)
- Router ID of intra-routers
3) Summary Net LSA (Type 3)
- Router ID of inter-routers
4) Summary ASB Autonomous System Border Router (Type 4)
- Router ID of ABRs Area Border Routers
5) Type 5 LSA
- Router ID of external LSA
**OSPF Areas must border/touch Area 0 (Backbone)
**All areas must be adjacent to Area 0
(GOOD) Area 1 <-> Area 0 <-> Area 2
(GOOD) Area 1 <-> Area 0 <-> Area 1
(BAD) Area 1 <-> Area 2 <-> Area 0 (Area 1 and not bordering Area 0 - otherwise Area 1 must attach to Area 0 via Virtual Link/Tunnel)
==Create Virtual Link/Tunnel==
**Virtual Links must use Router ID (not IP Address)
**Virtual Links are labelled "DNA" Do Not Age
**No election takes place on Virtual Links
R3 Area 0 (Router ID = 3.3.3.3) <-> Area 1 <-> R5 Area 2 (Router ID = 5.5.5.5)
R3(config)#router ospf 1
> Area 1 is the Area we can traversing
R3(config-router)#area 1 virtual-link 5.5.5.5
>From R5
R5(config)#router ospf 1
R5(config-router)#area 1 virtual-link 3.3.3.3