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
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.
AS Path Attribute The list of autonomous system numbers that a route has traversed to reach a destination
Next-Hop Attribute
Origin Attribute
Local Preference Attribute
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 B as the best next hop because its MED of 150 is less than C.
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 originates = other paths = 0.
Determining the BGP Path Selection
Selecting a BGP Path
Path Selection with Multihomed Connection
6.6 Manipulating BGP Path Selection with Route Maps
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
Setting Local Preference with Route Maps Example Assume 35 percent of all traffic from AS has been going to 관리자 : Reverse Domain Name System (DNS) lookup 혹은 에서 Cisco 의 AS number 혹은 네트워크정보를 얻는다. Cisco networks 에 대하여, router B 에서 최고의 local preference 값을 선언. 그래서 Cisco 로 가는 모든 트래픽은 라우터 B 를 통하여 AS 를 나간다. 결과적으로 B 에서 유출되는 트래픽의 부하는 20% 에서 더 많이 증가시키고 A 의 부하를 60% 이하로 줄였다. 부하 균형유지
Setting Local Preference with Route Maps Example 가정 : AS 에서 유입 트래픽의 55% 가 라우트 A 의 /24 서브 네트워크로 간다. 그런데 라우트 A 에서 입력 채널은 10% 만 활용되고 있고, 75% 는 B 를 활용하 고 있다. 만약 AS 로 부터 A 를 통하여 들어오는 경로의 MED 를 낮게 설정하여 AS 에 알려줌으로써 부하를 분산시킬 수 있다. 트랙픽은 링크의 50% 를 넘지 않는 것이 좋다. 순간적 과부하가 flapping 초래
Changing the BGP Local Preference for All Routes
BGP Local Preference Example The best path to network in AS from router C in AS ? 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 (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 is through router A.
BGP Local Preference Example (continued) A traffic analysis for AS via B to : heavy(50%), via A to : hardly used at all(10%). 3 largest volume destination networks: , , and % to (via B); 20 % to (via B); 10 % : (via A). other 40 % : to other destinations divert traffic to network and send it out router A to the next hop of , loading balancing, A and B : 30%. 50% 10%
BGP Local Preference Example (continued)
Setting the MED with Route Maps
BGP Using Route Maps and the MED Example
BGP Using Route Maps and the MED Example (continued)
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