1 | % Advanced Routing Workshop |
---|
2 | % Basic BGP Lab |
---|
3 | |
---|
4 |  |
---|
5 | |
---|
6 | \pagebreak |
---|
7 | |
---|
8 | # Introduction |
---|
9 | |
---|
10 | The purpose of this exercise is to: |
---|
11 | |
---|
12 | * Understand the routing implications of |
---|
13 | connecting to multiple external routing domains |
---|
14 | * Learn to configure basic eBGP to exchange routing |
---|
15 | information with multiple external peers and iBGP |
---|
16 | to carry that information inside your network. |
---|
17 | |
---|
18 | # Pre-requisites |
---|
19 | |
---|
20 | This exercise builds upon the configurations implemented in |
---|
21 | the OSPF + Static routing lab. You must be able to: |
---|
22 | |
---|
23 | * Ping your neighbor router in the same AS using its |
---|
24 | loopback address (both IPv4 and IPv6!). |
---|
25 | * Ping your neighbor routers in other ASs using their |
---|
26 | point-to-point link addresses. |
---|
27 | |
---|
28 | *Note: Actually, if everyone configured their OSPF and static |
---|
29 | routes properly in the previous exercise, you should be able |
---|
30 | to ping every other router using their loopback address.* |
---|
31 | |
---|
32 | # Address Space Allocation |
---|
33 | |
---|
34 | ## Regional REN (RREN) |
---|
35 | |
---|
36 | We only need one: |
---|
37 | |
---|
38 | RREN IPv4 IPv6 ASN |
---|
39 | ----- ------------ ------------- ------- |
---|
40 | 1 10.100.0.0/16 fd00:100::/32 100 |
---|
41 | |
---|
42 | ## National RENs (NRENs) |
---|
43 | |
---|
44 | NREN IPv4 IPv6 ASN |
---|
45 | ----- ------------ ------------- ------- |
---|
46 | 1 10.101.0.0/16 fd00:101::/32 101 |
---|
47 | 2 10.102.0.0/16 fd00:102::/32 102 |
---|
48 | |
---|
49 | ... and so on. |
---|
50 | |
---|
51 | # iBGP Configuration |
---|
52 | |
---|
53 | ## Enable the BGP process |
---|
54 | |
---|
55 | Before we set up iBGP, we need to do some basic preparation |
---|
56 | on the router. The IOS defaults are not optimized, so before |
---|
57 | we bring up BGP sessions, we should set the parameters that we |
---|
58 | require. |
---|
59 | The default distance for eBGP is 20, the default distance for iBGP |
---|
60 | is 200, and the default distance for OSPF is 110. This means that |
---|
61 | there is a potential for a prefix learned by eBGP to override the |
---|
62 | identical prefix carried by OSPF. To protect against accidents, the |
---|
63 | eBGP distance is set to 200 also. |
---|
64 | |
---|
65 | The command to do this is the *distance bgp* subcommand: |
---|
66 | |
---|
67 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
68 | distance bgp <external-routes> <internal-routes> <local-routes> |
---|
69 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
70 | |
---|
71 | We also want to: |
---|
72 | |
---|
73 | * Enable logging of BGP neighbor state changes |
---|
74 | * Disable the requirement that a route must be present in the IGP |
---|
75 | table before it can be advertised by BGP (synchronization). |
---|
76 | * Disable auto-summarization of routes to classful network boundaries |
---|
77 | * Disable the automatic exchange of IPv4 unicast routes on every |
---|
78 | peering session. |
---|
79 | |
---|
80 | This must be done in all future BGP configurations of this workshop: |
---|
81 | |
---|
82 | On both R11 and R12: |
---|
83 | |
---|
84 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
85 | router bgp 10 |
---|
86 | distance bgp 200 200 200 |
---|
87 | bgp log-neighbor-changes |
---|
88 | no synchronization |
---|
89 | no auto-summary |
---|
90 | no bgp default ipv4-unicast |
---|
91 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
92 | |
---|
93 | |
---|
94 | ## Configure iBGP neighbors |
---|
95 | |
---|
96 | Again, make sure that you can ping the neighbor router |
---|
97 | using its loopback address, otherwise the BGP session |
---|
98 | will not come up! |
---|
99 | |
---|
100 | On R11: |
---|
101 | |
---|
102 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
103 | router bgp 10 |
---|
104 | address-family ipv4 |
---|
105 | neighbor 10.10.255.2 remote-as 10 |
---|
106 | neighbor 10.10.255.2 update-source loopback 0 |
---|
107 | neighbor 10.10.255.2 description iBGP to R12 |
---|
108 | neighbor 10.10.255.2 password N$RC |
---|
109 | address-family ipv6 |
---|
110 | neighbor fd00:10:ff::2 remote-as 10 |
---|
111 | neighbor fd00:10:ff::2 update-source loopback 0 |
---|
112 | neighbor fd00:10:ff::2 description iBGP to R12 |
---|
113 | neighbor fd00:10:ff::2 password N$RC |
---|
114 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
115 | |
---|
116 | On R12: |
---|
117 | |
---|
118 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
119 | router bgp 10 |
---|
120 | address-family ipv4 |
---|
121 | neighbor 10.10.255.1 remote-as 10 |
---|
122 | neighbor 10.10.255.1 update-source loopback 0 |
---|
123 | neighbor 10.10.255.1 description iBGP to R11 |
---|
124 | neighbor 10.10.255.1 password N$RC |
---|
125 | address-family ipv6 |
---|
126 | neighbor fd00:10:ff::1 remote-as 10 |
---|
127 | neighbor fd00:10:ff::1 update-source loopback 0 |
---|
128 | neighbor fd00:10:ff::1 description iBGP to R11 |
---|
129 | neighbor fd00:10:ff::1 password N$RC |
---|
130 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
131 | |
---|
132 | Check that the BGP sessions are up on both sides. |
---|
133 | |
---|
134 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
135 | show ip bgp summary |
---|
136 | show bgp ipv6 unicast summary |
---|
137 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
138 | |
---|
139 | ## Advertise your network |
---|
140 | |
---|
141 | 1. Use the 'network' command to tell BGP which |
---|
142 | prefixes you want to announce. |
---|
143 | |
---|
144 | On R11 and R12: |
---|
145 | |
---|
146 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
147 | router bgp 10 |
---|
148 | address-family ipv4 |
---|
149 | network 10.10.0.0 mask 255.255.0.0 |
---|
150 | address-family ipv6 |
---|
151 | network fd00:10::/32 |
---|
152 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
153 | |
---|
154 | Get the list of learned paths: |
---|
155 | |
---|
156 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
157 | show ip bgp |
---|
158 | show bgp ipv6 unicast |
---|
159 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
160 | |
---|
161 | Q. Do you see any paths? |
---|
162 | |
---|
163 | 2. Create a static route for the prefix being |
---|
164 | announced on each router: |
---|
165 | |
---|
166 | On R11 and R12: |
---|
167 | |
---|
168 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
169 | ip route 10.10.0.0 255.255.0.0 null0 |
---|
170 | ipv6 route fd00:10::/32 null0 |
---|
171 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
172 | |
---|
173 | *These are called a "pull up routes"* |
---|
174 | |
---|
175 | Get the list of learned paths again. You should see |
---|
176 | both your prefix and the neighbor's. |
---|
177 | |
---|
178 | Q. Why are these routes needed? |
---|
179 | |
---|
180 | # Multihoming - eBGP Configuration |
---|
181 | |
---|
182 | ## Connect to the NREN |
---|
183 | |
---|
184 | 1. Configure your RX1 router to connect to the NREN |
---|
185 | with a a point-to-point link. |
---|
186 | |
---|
187 | NRENs: Use configuration in Appendix. |
---|
188 | |
---|
189 | On R11: |
---|
190 | |
---|
191 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
192 | interface GigabitEthernet1/0 |
---|
193 | description P2P Link to NREN1 |
---|
194 | ip address 10.101.254.2 255.255.255.252 |
---|
195 | no ip directed-broadcast |
---|
196 | no ip redirects |
---|
197 | no ip proxy-arp |
---|
198 | ipv6 address fd00:101:fe::1/127 |
---|
199 | ipv6 nd ra suppress |
---|
200 | no shutdown |
---|
201 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
202 | |
---|
203 | Make sure that it's up and that you can ping the other |
---|
204 | side: |
---|
205 | |
---|
206 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
207 | ping 10.101.254.1 |
---|
208 | ping fd00:101:fe::0 |
---|
209 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
210 | |
---|
211 | Do some traceroutes to other networks again: |
---|
212 | |
---|
213 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
214 | R11# traceroute 10.20.255.1 |
---|
215 | R11# traceroute 10.30.255.1 |
---|
216 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
217 | |
---|
218 | Has anything changed since the last exercise? |
---|
219 | |
---|
220 | Notice that before we had only one connection to |
---|
221 | the Internet - via the ISP. Now we have two. |
---|
222 | But we are still using a default route pointing |
---|
223 | to the ISP only! |
---|
224 | |
---|
225 | We could add another default route pointing to the |
---|
226 | NREN, but that would not give us much flexibility |
---|
227 | in terms of traffic policies. Keep going. |
---|
228 | |
---|
229 | ## BGP-peer with the NREN and the ISP |
---|
230 | |
---|
231 | 1. Configure eBGP sessions to the ISP and the NREN |
---|
232 | |
---|
233 | On R11: |
---|
234 | |
---|
235 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
236 | router bgp 10 |
---|
237 | address-family ipv4 |
---|
238 | neighbor 10.101.254.1 remote-as 101 |
---|
239 | neighbor 10.101.254.1 description eBGP to NREN1 |
---|
240 | neighbor 10.101.254.1 password N$RC |
---|
241 | address-family ipv6 |
---|
242 | neighbor fd00:101:fe:: remote-as 101 |
---|
243 | neighbor fd00:101:fe:: description eBGP to NREN1 |
---|
244 | neighbor fd00:101:fe:: password N$RC |
---|
245 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
246 | |
---|
247 | Q. **Notice that with eBGP we no longer use the |
---|
248 | loopback address as the endpoint of the BGP session, |
---|
249 | as we did with iBGP** |
---|
250 | |
---|
251 | On R12: |
---|
252 | |
---|
253 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
254 | router bgp 10 |
---|
255 | address-family ipv4 |
---|
256 | neighbor 10.201.254.1 remote-as 201 |
---|
257 | neighbor 10.201.254.1 description eBGP to ISP1 |
---|
258 | neighbor 10.201.254.1 password N$RC |
---|
259 | address-family ipv6 |
---|
260 | neighbor fd00:201:fe:: remote-as 201 |
---|
261 | neighbor fd00:201:fe:: description eBGP to ISP1 |
---|
262 | neighbor fd00:201:fe:: password N$RC |
---|
263 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
264 | |
---|
265 | Check that the BGP sessions are up on both routers: |
---|
266 | |
---|
267 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
268 | show ip bgp summary |
---|
269 | show bgp ipv6 unicast summary |
---|
270 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
271 | |
---|
272 | Once those are up, check if you are learning any prefixes: |
---|
273 | |
---|
274 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
275 | R11# show ip bgp nei 10.101.254.1 routes |
---|
276 | R11# sh bgp ipv6 uni neigh fd00:101:fe:: routes |
---|
277 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
278 | |
---|
279 | Inject the point-to-point subnets that connect to |
---|
280 | your upstreams into your IGP (OSPF), to make sure |
---|
281 | that the external next hops are in the routing tables |
---|
282 | of each iBGP peer. |
---|
283 | |
---|
284 | On R11 and R12: |
---|
285 | |
---|
286 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
287 | interface GigabitEthernet1/0 |
---|
288 | ip ospf 10 area 0 |
---|
289 | ipv6 ospf 10 area 0 |
---|
290 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
291 | |
---|
292 | Verify what you are advertising to the NREN: |
---|
293 | |
---|
294 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
295 | R11# show ip bgp nei 10.101.254.1 advertised-routes |
---|
296 | R11# sh bgp ipv6 uni neigh fd00:101:fe:: advertised |
---|
297 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
298 | |
---|
299 | ... and to the ISP: |
---|
300 | |
---|
301 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
302 | R12# show ip bgp neighbor 10.201.254.1 advertised-routes |
---|
303 | R12# sh bgp ipv6 uni neigh fd00:201:fe:: advertised |
---|
304 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
305 | |
---|
306 | Are you perhaps announcing other prefixes that don't |
---|
307 | originate in your AS? If so, can you remember what |
---|
308 | serious negative implications this could have? |
---|
309 | Please stop and think about this. Ask the instructors |
---|
310 | if you need clarification. |
---|
311 | |
---|
312 | ## Filter what you send and receive |
---|
313 | |
---|
314 | 1. Create prefix lists for your inbound/outbound |
---|
315 | filters. |
---|
316 | |
---|
317 | On R11: |
---|
318 | |
---|
319 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
320 | ip prefix-list out-peer permit 10.10.0.0/16 le 32 |
---|
321 | ip prefix-list nren-in-peer deny 10.10.0.0/16 le 32 |
---|
322 | ip prefix-list nren-in-peer permit 0.0.0.0/0 le 32 |
---|
323 | ipv6 prefix-list ipv6-out-peer permit fd00:10::/32 le 128 |
---|
324 | ipv6 prefix-list ipv6-nren-in-peer deny fd00:10::/32 le 128 |
---|
325 | ipv6 prefix-list ipv6-nren-in-peer permit ::/0 le 128 |
---|
326 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
327 | |
---|
328 | On R12: |
---|
329 | |
---|
330 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
331 | ip prefix-list out-peer permit 10.10.0.0/16 le 32 |
---|
332 | ip prefix-list isp-in-peer deny 10.10.0.0/16 le 32 |
---|
333 | ip prefix-list isp-in-peer permit 0.0.0.0/0 le 32 |
---|
334 | ipv6 prefix-list ipv6-out-peer permit fd00:10::/32 le 128 |
---|
335 | ipv6 prefix-list ipv6-isp-in-peer deny fd00:10::/32 le 128 |
---|
336 | ipv6 prefix-list ipv6-isp-in-peer permit ::/0 le 128 |
---|
337 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
338 | |
---|
339 | 2. Now create inbound/outbound filters using those |
---|
340 | prefix lists |
---|
341 | |
---|
342 | R11: |
---|
343 | |
---|
344 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
345 | router bgp 10 |
---|
346 | address-family ipv4 |
---|
347 | neighbor 10.101.254.1 prefix-list nren-in-peer in |
---|
348 | neighbor 10.101.254.1 prefix-list out-peer out |
---|
349 | address-family ipv6 |
---|
350 | neighbor fd00:101:fe:: prefix-list ipv6-nren-in-peer in |
---|
351 | neighbor fd00:101:fe:: prefix-list ipv6-out-peer out |
---|
352 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
353 | |
---|
354 | R12: |
---|
355 | |
---|
356 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
357 | router bgp 10 |
---|
358 | address-family ipv4 |
---|
359 | neighbor 10.201.254.1 prefix-list isp-in-peer in |
---|
360 | neighbor 10.201.254.1 prefix-list out-peer out |
---|
361 | address-family ipv6 |
---|
362 | neighbor fd00:201:fe:: prefix-list ipv6-isp-in-peer in |
---|
363 | neighbor fd00:201:fe:: prefix-list ipv6-out-peer out |
---|
364 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
365 | |
---|
366 | Use the *BGP refresh* capability to resend the |
---|
367 | information to the peer: |
---|
368 | |
---|
369 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
370 | R11#clear ip bgp 10.101.254.1 out |
---|
371 | R11#clear bgp ipv6 unicast fd00:101:fe:: out |
---|
372 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
373 | |
---|
374 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
375 | R12#clear ip bgp 10.201.254.1 out |
---|
376 | R12#clear bgp ipv6 unicast fd00:201:fe:: out |
---|
377 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
378 | |
---|
379 | You should now be advertising only your own address space. |
---|
380 | Check with the ISP and NREN administrators to make sure |
---|
381 | that they are receiving your prefix. |
---|
382 | |
---|
383 | ### Remove static routes |
---|
384 | |
---|
385 | 1. The ISPs remove their static routes towards |
---|
386 | their customers. |
---|
387 | |
---|
388 | Now your ISP has learned a route to reach your |
---|
389 | network, correct? The ISPs can now safely remove |
---|
390 | the static routes pointing to you and the other |
---|
391 | customers: |
---|
392 | |
---|
393 | ISP1: |
---|
394 | |
---|
395 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
396 | no ip route 10.10.0.0 255.255.0.0 10.201.254.2 |
---|
397 | no ip route 10.20.0.0 255.255.0.0 10.201.254.6 |
---|
398 | no ip route 10.30.0.0 255.255.0.0 10.201.254.10 |
---|
399 | ! |
---|
400 | no ipv6 route fd00:10::/32 fd00:201:fe::1 |
---|
401 | no ipv6 route fd00:20::/32 fd00:201:fe::3 |
---|
402 | no ipv6 route fd00:30::/32 fd00:201:fe::5 |
---|
403 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
404 | |
---|
405 | ISP2: |
---|
406 | |
---|
407 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
408 | no ip route 10.40.0.0 255.255.0.0 10.202.254.2 |
---|
409 | no ip route 10.50.0.0 255.255.0.0 10.202.254.6 |
---|
410 | no ip route 10.60.0.0 255.255.0.0 10.202.254.10 |
---|
411 | ! |
---|
412 | no ipv6 route fd00:40::/32 fd00:202:fe::1 |
---|
413 | no ipv6 route fd00:50::/32 fd00:202:fe::3 |
---|
414 | no ipv6 route fd00:60::/32 fd00:202:fe::5 |
---|
415 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
416 | |
---|
417 | 2. Remove your static default routes |
---|
418 | |
---|
419 | In the previous exercise, we created default |
---|
420 | routes on both routers. But thanks to BGP, we |
---|
421 | should now be receiving routes from our NREN and |
---|
422 | our ISP. |
---|
423 | |
---|
424 | Let's check first (do this on both routers): |
---|
425 | |
---|
426 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
427 | show ip bgp |
---|
428 | show bgp ipv6 unicast |
---|
429 | show ip route |
---|
430 | show ipv6 route |
---|
431 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
432 | |
---|
433 | You should be learning routes advertised by other |
---|
434 | groups, and also from the NRENs and the ISPs. |
---|
435 | |
---|
436 | Remove your static default routes: |
---|
437 | |
---|
438 | R11: |
---|
439 | |
---|
440 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
441 | no ip route 0.0.0.0 0.0.0.0 10.10.254.2 |
---|
442 | no ipv6 route ::/0 fd00:10:fe::1 |
---|
443 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
444 | |
---|
445 | R12: |
---|
446 | |
---|
447 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
448 | no ip route 0.0.0.0 0.0.0.0 10.201.254.1 |
---|
449 | no ipv6 route ::/0 fd00:201:fe:: |
---|
450 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
451 | |
---|
452 | You should be able to ping any other router now. |
---|
453 | If you can't, wait for other groups to finish, |
---|
454 | or ask the instructors. |
---|
455 | |
---|
456 | Use traceroute to verify the paths that packets |
---|
457 | are following towards various destinations: |
---|
458 | |
---|
459 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
460 | R11# traceroute 10.100.255.1 |
---|
461 | R11# traceroute 10.30.255.2 |
---|
462 | ... |
---|
463 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
464 | |
---|
465 | Repeat the same tests from the other router in |
---|
466 | your AS and compare. Use the diagram to help you |
---|
467 | visualize it. |
---|
468 | |
---|
469 | # Traffic Exchange (Peering) |
---|
470 | |
---|
471 | Direct traffic exchanges are usually established at no |
---|
472 | charge between two autonomous systems that want to save |
---|
473 | costs. The savings are achieved by not having to carry |
---|
474 | that traffic over expensive transit links via commercial |
---|
475 | providers. Also, these direct exchanges have the added |
---|
476 | benefit of reducing latency because there are fewer hops. |
---|
477 | |
---|
478 | Usually traffic exchanges occur at public exchange points, |
---|
479 | also known as IXPs. The simplest kind of exchange point is |
---|
480 | a Layer-2 switch. In this exercise, we will simply configure |
---|
481 | direct links between routers, which from the point of view of |
---|
482 | BGP is equivalent to connecting through a switch. |
---|
483 | |
---|
484 |  |
---|
485 | |
---|
486 | ## Connect to your neighbor AS |
---|
487 | |
---|
488 | 1. Configure a point-to-point link to your neighbor AS |
---|
489 | as shown in the diagram. You will have to agree with |
---|
490 | your peer on which address space to use. **Make sure to |
---|
491 | pick a point-to-point subnet that is not already used!** |
---|
492 | |
---|
493 | The instructor will draw a map of the network at the front |
---|
494 | of the class and will ask you to document the subnet |
---|
495 | that was used for the peering session, so everybody can |
---|
496 | use that information when troubleshooting. |
---|
497 | |
---|
498 | For example, on R12: |
---|
499 | |
---|
500 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
501 | interface GigabitEthernet3/0 |
---|
502 | description Link to R21 |
---|
503 | ip address 10.10.254.5 255.255.255.252 |
---|
504 | no ip directed-broadcast |
---|
505 | no ip redirects |
---|
506 | no ip proxy-arp |
---|
507 | ipv6 address fd00:10:fe::2/127 |
---|
508 | ipv6 nd ra suppress |
---|
509 | no shutdown |
---|
510 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
511 | |
---|
512 | Don't forget to inject that subnet into OSPF. |
---|
513 | |
---|
514 | R12: |
---|
515 | |
---|
516 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
517 | interface GigabitEthernet3/0 |
---|
518 | ip ospf 10 area 0 |
---|
519 | ipv6 ospf 10 area 0 |
---|
520 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
521 | |
---|
522 | Q. Remember why this is needed? If not, please ask. |
---|
523 | |
---|
524 | 2. Configure prefix lists for your inbound filters |
---|
525 | |
---|
526 | On R12: |
---|
527 | |
---|
528 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
529 | ip prefix-list AS20-in-peer permit 10.20.0.0/16 le 32 |
---|
530 | ipv6 prefix-list ipv6-AS20-in-peer permit fd00:20::/32 le 128 |
---|
531 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
532 | |
---|
533 | *The equivalent needs to be done in R21.* |
---|
534 | |
---|
535 | 3. Configure prefix lists for your outbound filters |
---|
536 | |
---|
537 | You should have these from a previous step. You can verify |
---|
538 | like this: |
---|
539 | |
---|
540 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
541 | R12#show ip prefix-list out-peer |
---|
542 | R12#show ipv6 prefix-list ipv6-out-peer |
---|
543 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
544 | |
---|
545 | 4. Now create the BGP sessions and apply those |
---|
546 | inbound/outbound filters: |
---|
547 | |
---|
548 | On R12: |
---|
549 | |
---|
550 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
551 | router bgp 10 |
---|
552 | address-family ipv4 |
---|
553 | neighbor 10.10.254.6 remote-as 20 |
---|
554 | neighbor 10.10.254.6 description eBGP to AS20 |
---|
555 | neighbor 10.10.254.6 password N$RC |
---|
556 | neighbor 10.10.254.6 prefix-list out-peer out |
---|
557 | neighbor 10.10.254.6 prefix-list AS20-in-peer in |
---|
558 | address-family ipv6 |
---|
559 | neighbor fd00:10:fe::3 remote-as 20 |
---|
560 | neighbor fd00:10:fe::3 description eBGP to AS20 |
---|
561 | neighbor fd00:10:fe::3 password N$RC |
---|
562 | neighbor fd00:10:fe::3 prefix-list ipv6-out-peer out |
---|
563 | neighbor fd00:10:fe::3 prefix-list ipv6-AS20-in-peer in |
---|
564 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
565 | |
---|
566 | The equivalent needs to be done in R21. |
---|
567 | |
---|
568 | Verify that the sessions are up: |
---|
569 | |
---|
570 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
571 | show ip bgp summary |
---|
572 | show ipv6 bgp unicast summary |
---|
573 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
574 | |
---|
575 | ..and that you are learning the prefix directly |
---|
576 | from the neighbor: |
---|
577 | |
---|
578 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
579 | R12#show ip bgp neighbor 10.10.254.6 routes |
---|
580 | R12#show bgp ipv6 unicast neighbors fd00:10:fe::3 routes |
---|
581 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
582 | |
---|
583 | 5. Do some traceroutes towards your peer and |
---|
584 | make sure that the path is direct. |
---|
585 | |
---|
586 | Remember to save your configurations. |
---|
587 | |
---|
588 | You are done! You have configured BGP in a multihomed |
---|
589 | environment and BGP is selecting the paths based on |
---|
590 | default values. |
---|
591 | |
---|
592 | |
---|
593 | \pagebreak |
---|
594 | |
---|
595 | # Appendix A - RREN Configuration |
---|
596 | |
---|
597 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
598 | hostname RREN |
---|
599 | aaa new-model |
---|
600 | aaa authentication login default local |
---|
601 | aaa authentication enable default enable |
---|
602 | username nsrc secret nsrc |
---|
603 | enable secret nsrc |
---|
604 | service password-encryption |
---|
605 | line vty 0 4 |
---|
606 | transport preferred none |
---|
607 | line console 0 |
---|
608 | transport preferred none |
---|
609 | no logging console |
---|
610 | logging buffered 8192 debugging |
---|
611 | no ip domain-lookup |
---|
612 | ip subnet-zero |
---|
613 | ip classless |
---|
614 | no ip source-route |
---|
615 | ipv6 unicast-routing |
---|
616 | ! |
---|
617 | interface Loopback0 |
---|
618 | ip address 10.100.255.1 255.255.255.255 |
---|
619 | ipv6 address fd00:100:ff::1/128 |
---|
620 | ! |
---|
621 | interface GigabitEthernet1/0 |
---|
622 | description P2P Link to RREN1 |
---|
623 | ip address 10.100.254.1 255.255.255.252 |
---|
624 | no ip directed-broadcast |
---|
625 | no ip redirects |
---|
626 | no ip proxy-arp |
---|
627 | ipv6 address fd00:100:fe::/127 |
---|
628 | ipv6 nd ra suppress |
---|
629 | no shutdown |
---|
630 | ! |
---|
631 | interface GigabitEthernet2/0 |
---|
632 | description P2P Link to RREN2 |
---|
633 | ip address 10.100.254.5 255.255.255.252 |
---|
634 | no ip directed-broadcast |
---|
635 | no ip redirects |
---|
636 | no ip proxy-arp |
---|
637 | ipv6 address fd00:100:fe::2/127 |
---|
638 | ipv6 nd ra suppress |
---|
639 | no shutdown |
---|
640 | ! |
---|
641 | interface GigabitEthernet3/0 |
---|
642 | description Link to IXP |
---|
643 | ip address 10.251.1.3 255.255.255.0 |
---|
644 | no ip directed-broadcast |
---|
645 | no ip redirects |
---|
646 | no ip proxy-arp |
---|
647 | ipv6 address fd00:251:1::3/64 |
---|
648 | ipv6 nd ra supress |
---|
649 | no shutdown |
---|
650 | ! |
---|
651 | router bgp 100 |
---|
652 | bgp log-neighbor-changes |
---|
653 | no synchronization |
---|
654 | no auto-summary |
---|
655 | no bgp default ipv4-unicast |
---|
656 | distance bgp 200 200 200 |
---|
657 | address-family ipv4 |
---|
658 | network 10.100.0.0 mask 255.255.0.0 |
---|
659 | neighbor 10.100.254.2 remote-as 101 |
---|
660 | neighbor 10.100.254.2 description eBGP to AS101 |
---|
661 | neighbor 10.100.254.2 password N$RC |
---|
662 | neighbor 10.100.254.6 remote-as 102 |
---|
663 | neighbor 10.100.254.6 description eBGP to AS102 |
---|
664 | neighbor 10.100.254.6 password N$RC |
---|
665 | neighbor 10.251.1.1 remote-as 201 |
---|
666 | neighbor 10.251.1.1 description eBGP to AS201 |
---|
667 | neighbor 10.251.1.1 password N$RC |
---|
668 | neighbor 10.251.1.2 remote-as 202 |
---|
669 | neighbor 10.251.1.2 description eBGP to AS202 |
---|
670 | neighbor 10.251.1.2 password N$RC address-family ipv6 |
---|
671 | network fd00:100::/32 |
---|
672 | neighbor fd00:100:fe::1 remote-as 101 |
---|
673 | neighbor fd00:100:fe::1 description eBGP to AS101 |
---|
674 | neighbor fd00:100:fe::1 password N$RC |
---|
675 | neighbor fd00:100:fe::3 remote-as 102 |
---|
676 | neighbor fd00:100:fe::3 description eBGP to AS102 |
---|
677 | neighbor fd00:100:fe::3 password N$RC |
---|
678 | neighbor fd00:251:1::1 remote-as 201 |
---|
679 | neighbor fd00:251:1::1 description eBGP to AS201 |
---|
680 | neighbor fd00:251:1::1 password N$RC |
---|
681 | neighbor fd00:251:1::2 remote-as 202 |
---|
682 | neighbor fd00:251:1::2 description eBGP to AS202 |
---|
683 | neighbor fd00:251:1::2 password N$RC |
---|
684 | ! |
---|
685 | ip route 10.100.0.0 255.255.0.0 null0 |
---|
686 | ipv6 route fd00:100::/32 null0 |
---|
687 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
688 | |
---|
689 | |
---|
690 | \pagebreak |
---|
691 | |
---|
692 | # Appendix B - NREN1 Configuration Example |
---|
693 | |
---|
694 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
695 | hostname NREN1 |
---|
696 | aaa new-model |
---|
697 | aaa authentication login default local |
---|
698 | aaa authentication enable default enable |
---|
699 | username nsrc secret nsrc |
---|
700 | enable secret nsrc |
---|
701 | service password-encryption |
---|
702 | line vty 0 4 |
---|
703 | transport preferred none |
---|
704 | line console 0 |
---|
705 | transport preferred none |
---|
706 | no logging console |
---|
707 | logging buffered 8192 debugging |
---|
708 | no ip domain-lookup |
---|
709 | ip subnet-zero |
---|
710 | ip classless |
---|
711 | no ip source-route |
---|
712 | ipv6 unicast-routing |
---|
713 | ! |
---|
714 | interface Loopback0 |
---|
715 | ip address 10.101.255.1 255.255.255.255 |
---|
716 | ipv6 address fd00:101:ff::1/128 |
---|
717 | ! |
---|
718 | interface GigabitEthernet1/0 |
---|
719 | description P2P Link to RREN |
---|
720 | ip address 10.100.254.2 255.255.255.252 |
---|
721 | no ip directed-broadcast |
---|
722 | no ip redirects |
---|
723 | no ip proxy-arp |
---|
724 | ipv6 address fd00:100:fe::1/127 |
---|
725 | ipv6 nd ra suppress |
---|
726 | no shutdown |
---|
727 | ! |
---|
728 | interface GigabitEthernet2/0 |
---|
729 | description P2P Link to ISP1 |
---|
730 | ip address 10.101.254.13 255.255.255.252 |
---|
731 | no ip directed-broadcast |
---|
732 | no ip redirects |
---|
733 | no ip proxy-arp |
---|
734 | ipv6 address fd00:101:fe::6/127 |
---|
735 | ipv6 nd ra suppress |
---|
736 | no shutdown |
---|
737 | ! |
---|
738 | interface GigabitEthernet3/0 |
---|
739 | description P2P Link to R11 |
---|
740 | ip address 10.101.254.1 255.255.255.252 |
---|
741 | no ip directed-broadcast |
---|
742 | no ip redirects |
---|
743 | no ip proxy-arp |
---|
744 | ipv6 address fd00:101:fe::0/127 |
---|
745 | ipv6 nd ra suppress |
---|
746 | no shutdown |
---|
747 | ! |
---|
748 | ip prefix-list AS10-in-peer permit 10.10.0.0/16 le 32 |
---|
749 | ipv6 prefix-list ipv6-AS10-in-peer permit fd00:10::/32 le 128 |
---|
750 | ! |
---|
751 | router bgp 101 |
---|
752 | bgp log-neighbor-changes |
---|
753 | no synchronization |
---|
754 | no auto-summary |
---|
755 | no bgp default ipv4-unicast |
---|
756 | distance bgp 200 200 200 |
---|
757 | address-family ipv4 |
---|
758 | network 10.101.0.0 mask 255.255.0.0 |
---|
759 | neighbor 10.101.254.2 remote-as 10 |
---|
760 | neighbor 10.101.254.2 description eBGP to AS10 |
---|
761 | neighbor 10.101.254.2 password N$RC |
---|
762 | neighbor 10.101.254.2 prefix-list AS10-in-peer in |
---|
763 | neighbor 10.101.254.14 remote-as 201 |
---|
764 | neighbor 10.101.254.14 description eBGP to AS201 |
---|
765 | neighbor 10.101.254.14 password N$RC |
---|
766 | neighbor 10.100.254.1 remote-as 100 |
---|
767 | neighbor 10.100.254.1 description eBGP to AS100 |
---|
768 | neighbor 10.100.254.1 password N$RC |
---|
769 | address-family ipv6 |
---|
770 | network fd00:101::/32 |
---|
771 | neighbor fd00:101:fe::1 remote-as 10 |
---|
772 | neighbor fd00:101:fe::1 description eBGP to AS10 |
---|
773 | neighbor fd00:101:fe::1 password N$RC |
---|
774 | neighbor fd00:101:fe::1 prefix-list ipv6-AS10-in-peer in |
---|
775 | neighbor fd00:101:fe::7 remote-as 201 |
---|
776 | neighbor fd00:101:fe::7 description eBGP to AS201 |
---|
777 | neighbor fd00:101:fe::7 password N$RC |
---|
778 | neighbor fd00:100:fe:: remote-as 100 |
---|
779 | neighbor fd00:100:fe:: description eBGP to AS100 |
---|
780 | neighbor fd00:100:fe:: password N$RC |
---|
781 | ! |
---|
782 | |
---|
783 | ip route 10.101.0.0 255.255.0.0 null0 |
---|
784 | ipv6 route fd00:101::/32 null0 |
---|
785 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
786 | |
---|
787 | \pagebreak |
---|
788 | |
---|
789 | # Appendix C - ISP1 Configuration Example |
---|
790 | |
---|
791 | Note: *This is in addition to what was configured |
---|
792 | in the previous exercise*. |
---|
793 | |
---|
794 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
795 | interface GigabitEthernet2/0 |
---|
796 | description P2P Link to NREN1 |
---|
797 | ip address 10.101.254.14 255.255.255.252 |
---|
798 | no ip directed-broadcast |
---|
799 | no ip redirects |
---|
800 | no ip proxy-arp |
---|
801 | ipv6 address fd00:101:fe::7/127 |
---|
802 | ipv6 nd ra suppress |
---|
803 | no shutdown |
---|
804 | ! |
---|
805 | ip prefix-list AS10-in-peer permit 10.10.0.0/16 le 32 |
---|
806 | ipv6 prefix-list ipv6-AS10-in-peer permit fd00:10::/32 le 128 |
---|
807 | ! |
---|
808 | |
---|
809 | router bgp 201 |
---|
810 | bgp log-neighbor-changes |
---|
811 | no synchronization |
---|
812 | no auto-summary |
---|
813 | no bgp default ipv4-unicast |
---|
814 | bgp deterministic-med |
---|
815 | distance bgp 200 200 200 |
---|
816 | address-family ipv4 |
---|
817 | network 10.201.0.0 mask 255.255.0.0 |
---|
818 | neighbor 10.201.254.2 remote-as 10 |
---|
819 | neighbor 10.201.254.2 description eBGP to AS10 |
---|
820 | neighbor 10.201.254.2 password N$RC |
---|
821 | neighbor 10.201.254.2 prefix-list AS10-in-peer in |
---|
822 | neighbor 10.101.254.13 remote-as 101 |
---|
823 | neighbor 10.101.254.13 description eBGP to AS101 |
---|
824 | neighbor 10.101.254.13 password N$RC |
---|
825 | neighbor 10.251.1.2 remote-as 202 |
---|
826 | neighbor 10.251.1.2 description eBGP to AS202 |
---|
827 | neighbor 10.251.1.2 password N$RC |
---|
828 | neighbor 10.251.1.3 remote-as 100 |
---|
829 | neighbor 10.251.1.3 description eBGP to AS100 |
---|
830 | neighbor 10.251.1.3 password N$RC |
---|
831 | address-family ipv6 |
---|
832 | network fd00:201::/32 |
---|
833 | neighbor fd00:201:fe::1 remote-as 10 |
---|
834 | neighbor fd00:201:fe::1 description eBGP to AS10 |
---|
835 | neighbor fd00:201:fe::1 password N$RC |
---|
836 | neighbor fd00:201:fe::1 prefix-list AS10-in-peer in |
---|
837 | neighbor fd00:101:fe::6 remote-as 101 |
---|
838 | neighbor fd00:101:fe::6 description eBGP to AS101 |
---|
839 | neighbor fd00:101:fe::6 password N$RC |
---|
840 | neighbor fd00:251:1::2 remote-as 202 |
---|
841 | neighbor fd00:251:1::2 description eBGP to AS202 |
---|
842 | neighbor fd00:251:1::2 password N$RC |
---|
843 | neighbor fd00:251:1::3 remote-as 100 |
---|
844 | neighbor fd00:251:1::3 description eBGP to AS100 |
---|
845 | neighbor fd00:251:1::3 password N$RC |
---|
846 | ! |
---|
847 | |
---|
848 | ip route 10.201.0.0 255.255.0.0 null0 |
---|
849 | ipv6 route fd00:201::/32 null0 |
---|
850 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
851 | |
---|
852 | |
---|
853 | |
---|