Module 6: BGP. Contents 6.5 Selecting a BGP Path.

27
Module 6: BGP

Transcript of Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Page 1: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Module 6: BGP

Page 2: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Contents

Page 3: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

6.5 Selecting a BGP Path

Page 4: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Characteristics of BGP Attributes The update messages : contain one or more routes and a set

of BGP metrics (path attributes) attached to the routes . Path attributes categories:

Well-known mandatory

Well-known discretionary

Optional transitive

Optional nontransitive

Page 5: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

BGP Attributes Well-known mandatory attributes

Autonomous system path Next hop Origin

Well-known discretionary attributes Local preference Atomic aggregate

Optional transitive attribute Aggregator

Optional nontransitive attribute Multi-exit discriminator (MED)

Cisco weight configured locally on a router and is not propagated to any other

BGP routers.

Page 6: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

AS Path Attribute The list of autonomous system numbers that a route has traversed to reach a destination

Page 7: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Next-Hop Attribute

Page 8: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Origin Attribute

Page 9: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Local Preference Attribute

Page 10: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

MED Attribute is an indication to EBGP neighbors about the preferred

path into an autonomous system exchanged between autonomous systems. but do not pass it on to the next autonomous system. MED influences inbound traffic to an autonomous

system, and local preference influences outbound traffic.

A chooses Bas the best next hop because its MED of 150 is less than C.

Page 11: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Weight Attribute configured locally on a router and is not propagated to any other routers. applies when using one router with multiple exit points in autonomous

system. (Ref) the local preference : used when two or more routers provide multiple

exit points. Value

0 to 65535. originates = 32768 other paths = 0.

Page 12: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Determining the BGP Path Selection

Page 13: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Selecting a BGP Path

Page 14: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Path Selection with Multihomed Connection

Page 15: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

6.6 Manipulating BGP Path Selection with Route Maps

Page 16: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Setting Local Preference with Route Maps

if the load averages 60 percent and has temporary bursts above 100 percent of the bandwidth, this situation causes lost packets, higher latency, and higher CPU usage

Page 17: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Setting Local Preference with Route Maps Example

Assume 35 percent of all traffic from AS 65001 has been going to www.cisco.com. 관리자 : Reverse Domain Name System (DNS) lookup 혹은 www.arin.net 에서

Cisco 의AS number 혹은 네트워크정보를 얻는다 .

Cisco networks 에 대하여 , router B 에서 최고의 local preference 값을 선언 . 그래서 Cisco 로 가는 모든 트래픽은 라우터 B 를 통하여 AS 65001 를 나간다 .결과적으로 B 에서 유출되는 트래픽의 부하는 20% 에서 더 많이 증가시키고 A 의 부하를 60% 이하로 줄였다 .

부하 균형유지

Page 18: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Setting Local Preference with Route Maps Example

가정 : AS 65001 에서 유입 트래픽의 55% 가 라우트 A 의 192.168.25.0/24 서브 네트워크로 간다 .

그런데 라우트 A 에서 입력 채널은 10% 만 활용되고 있고 , 75% 는 B 를 활용하고 있다 .

만약 AS 65004 로 부터 A 를 통하여 들어오는 경로의 MED 를 낮게 설정하여 AS 65004 에 알려줌으로써 부하를 분산시킬 수 있다 .

트랙픽은 링크의 50% 를 넘지 않는 것이 좋다 . 순간적 과부하가 flapping 초래

Page 19: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Changing the BGP Local Preference for All Routes

Page 20: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

BGP Local Preference Example

The best path to network 172.16.0.0 in AS 65003 from router C in AS 65001 ? Steps 1 and 2 look at weight and local preference and use the default settings of weight

equaling 0 and local preference equaling 100 for all routes that are learned from the IBGP neighbors of A and B.

Step 3 does not help decide the best path because the three AS routes are not owned or originated by AS 65001. (originator?)

Step 4 prefers the shortest autonomous system path. The options are two autonomous systems (65002, 65003) through router A or three autonomous systems through IBGP neighbor router B (65005, 65004, 65003). Thus, the shortest autonomous system path from router C to AS 65003 is through router A.

Page 21: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

BGP Local Preference Example (continued)

A traffic analysis for AS 65001 via B to 172.20.50.1: heavy(50%), via A to 192.168.28.1 : hardly used at all(10%). 3 largest volume destination networks: 172.30.0.0, 172.24.0.0, and 172.16.0.0. 30% to 172.24.0.0 (via B); 20 % to 172.30.0.0 (via B); 10 % : 172.16.0.0 (via A).

other 40 % : to other destinations divert traffic to network 172.30.0.0 and send it out router A to the next hop of

192.168.28.1, loading balancing, A and B : 30%.

50%

10%

Page 22: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

BGP Local Preference Example (continued)

Page 23: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Setting the MED with Route Maps

Page 24: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

BGP Using Route Maps and the MED Example

Page 25: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

BGP Using Route Maps and the MED Example (continued)

Page 26: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

BGP Using Route Maps and the MED Example (continued)

Page 27: Module 6: BGP. Contents 6.5 Selecting a BGP Path.

Implementing BGP in the Enterprise

The enterprise routers connected to the ISPs run EBGP with the ISP routers and IBGP between themselves (A & B); thus all routers in the transit path within the enterprise autonomous system run IBGP.

These routers pass default routes to the other routers in the enterprise rather than redistributing BGP into the interior routing protocol