Transcript
Netmanias 기술문서: BGP(Border Gateway Protocol)상세동작원리
BGP(Border Gateway Protocol)상세동작원리
2010년7월10일
NMC Consulting Group(tech@netmanias.com)
2
Contents
1. BGP Overview
1.1 BGP Overview
1.2 Routing Algorithm of BGP
1.3 eBGPvs. iBGP
2. BGP Parameter
2.1 BGP Session Type
2.2 BGP 상태변화
2.3 BGP Message 송수싞젃차
2.4 BGP Attributes
2.5 Route-Reflector
2.6 동일한BGP 경로수싞시Best 경로선택순서
2.7 Route Selection among various Routing Protocol
2.8 Synchronization vs. No Synchronization
2.9 Route Flap Dampening
3. Filter
3.1 Distribute-List
3.2 Prefix-List
3.3 Filter-List
4. Route-Map
5. BGP Convergence
5.1 BGP Timer
5.2 Graceful Restart
3
1. BGP Overview
1.1 BGP Overview
1.2 Routing Algorithm of BGP
1.3 eBGP vs. iBGP
4
1.1 BGPOverview (1/5)
Access Router
Border Router
Core Router
5
1.1 BGPOverview .Capacity (2/5)
6
1.1 BGPOverview .Demarcation Point (3/5)
맊약에맊약에, AS갂에OSPF로연동했다면.AS 내부의Topology Change가LSA Flooding을통해다른AS로젂달.타AS내의SPF Calculation을유발.서로영향을끼침
반면, BGP는? .Topology 정보(Link state info)없이Network Prefix맊AS 갂에젂달
7
1.1 BGPOverview .Administration (4/5)
8
1.1 BGPOverview .eBGP vs iBGP (5/5)
9
1.2 Routing Algorithm of BGP
.Route entry가AS들갂에교홖됨
.각Route entry는하나의AS를거칠때마다AS number가덧붙여짐
.이AS-Path의길이가짧은경로를Best Path로선택하여Routing Table에install함
.이상은기본Path-Vector algorithm에대한설명일뿐, 실제로는다양한parameter가정의되어있어AS-Path 이외의맋은사항을고려하여Best Path를판정함
10
1.3 eBGPvs. iBGP
.서로다른AS갂의BGP session .external BGP
.동일AS 내의BGP router 갂의BGP session .internal BGP
AS 101
AS 102
AS 100
eBGP
eBGP
iBGP
10.0.0.0/8
AS100
10.0.0.0/8
10.0.0.0/8
10.0.0.0/8
AS100
10.0.0.0/8
AS101
AS100
11
2. BGP Parameter
2.1 BGP Session Type
2.2 BGP 상태변화
2.3 BGP Message 송수싞젃차
2.4 BGP Attributes
2.5 Route-Reflector
2.6 Route Selection among various Routing Protocol
2.7 Synchronization vs No Synchronization
2.8 Route Flap Dampening
12
2.1 BGP Session Type .IBGP 연결
13
2.1 BGP Session Type .EBGP 연결
14
2.2 BGP 상태변화
15
2.3 BGP Message 송수신절차
16
2.4 BGP Attributes
17
2.4.1 BGP Attributes .Weight값을이용한Packet경로변경
18
2.4.2 BGP Attributes .Local Preference 값을이용한Packet경로변경
19
2.4.3 BGP Attributes .AS-PATH를이용한Packet경로변경
20
2.4.4 BGP Attributes .Origin값을이용한Packet경로변경
21
2.4.5 BGP Attributes -MED값을이용한Packet경로변경
22
2.4.6 기타BGP Attributes .Atomic Aggregate & Aggregator (1)
23
2.4.6 기타BGP Attributes .Atomic Aggregate & Aggregator (2)
24
2.4.7 기타BGP Attributes .Next-Hop
25
2.4.7 BGP Nexthop
.eBGPpeer에게NLRI를보낼때, Next-hop Attribute에자싞의interface address를씀
.iBGPpeer에게젂달할때에는Next-hop을변경하지않고그대로보냄
.수싞한BGP NLRI는, nexthopaddress가IGP routing table에서reachable하여야맊유효하다.
.그런데, 아래예와같이Nexthopaddress가unreachable하면Routing Fail
.AS100~AS101 갂의physical link의address가AS101 내에서OSPF로advertise되지않은경우임
.해결책은? (Next page)
AS 101
AS 102
AS 100
eBGP
eBGP
iBGP
192.168.0.0/16
192.168.0.0/16
10.0.0.0/30
0.1
0.2
20.0.0.0/30
0.1
0.2
AS100
192.168.0.0/16, NH=10.0.0.1
192.168.0.0/16, NH=20.0.0.1
AS101
AS100
AS100
192.168.0.0/16, NH=10.0.0.1
I can’t reach Nexthop 10.0.0.1
Not advertised ‘cause NH 10.0.0.1 is unreachable
26
2.4.7 BGP Nexthop (cont)
AS 101
AS 102
AS 100
eBGP
eBGP
iBGP
192.168.0.0/16
192.168.0.0/16
10.0.0.0/30
0.1
0.2
20.0.0.0/30
0.1
0.2
AS100
192.168.0.0/16, NH=10.0.0.1
192.168.0.0/16, NH=20.0.0.1
AS101
AS100
AS100
192.168.0.0/16, NH=10.0.0.1
I have OSPF route to Nexthop 10.0.0.1
OSPF passive
Configure eBGP link as OSPF “passive interface” to advertise into OSPF domain
1
27
2.4.7 BGP Nexthop (cont)
AS 101
AS 102
AS 100
eBGP
eBGP
iBGP
192.168.0.0/16
192.168.0.0/16
10.0.0.0/30
0.1
0.2
20.0.0.0/30
0.1
0.2
AS100
192.168.0.0/16, NH=10.0.0.1
192.168.0.0/16, NH=20.0.0.1
AS101
AS100
AS100
192.168.0.0/16, NH=1.1.1.1
I have OSPF route to Nexthop 1.1.1.1
Next-hop-self
Configure “next-hop-self” on ASBR to replace BGP-Nexthopattribute with its own RID
2
RID 1.1.1.1
RID 1.1.1.2
28
2.5.1 Route-Reflector
29
2.5.2 Route-Reflector .Loop 방지기법
30
2.6 Route Selection among various Routing Protocol
How Route Is Learned
Default Preference
Directly connected network
0
System routes
4
Static
5
MPLS
7
LDF
8
LDP
9
OSPF internal route
10
IS-IS Level 1 internal route
15
IS-IS Level 2 internal route
18
Default
20
Redirects
30
Kernel
40
SNMP
50
Router Discovery
55
RIP
100
RIPng
100
PIM
105
DVMRP
110
Routes to interfaces that are down
120
Aggregate
130
OSPF AS external routes
150
IS-IS Level 1 external route
160
IS-IS Level 2 external route
165
BGP
170
MSDP
175
Administrative Distance (Cisco)
Routing Protocol Preference (Juniper)
AD값, Preference값이작은것을우선시한다.
31
2.8 Synchronization 기능(1)
32
2.8 Synchronization 기능(2)
33
2.8 Synchronization 기능(3)
34
2.9 Route Flap Dampening
35
3. Filter
3.1 Distribute-List
3.2 Prefix-List
3.3 Filter-List
36
3.1 Distribute-List
37
3.2 Prefix-List
38
3.3 Filter-List
39
4. Route-Map
40
4.1 Route-Map 설명
41
5. BGP Convergence
5.1 BGP Timer
5.2 Graceful Restart
42
5.1 BGP Timer
43
5.2 Graceful Restart (1)
44
5.2 Graceful Restart (2)
45
References
.Russ White, Danny McPherson, SrihariSangli. Practical BGP. Addison Wesley, 2005
.John W. Stewart III. BGP4(Inter-Domain Routing in the Internet). Addison Wesley, 1999
.Jeff Doyle, Jennifer DeHavenCarroll. Routing TCP/IP Volume II. Cisco Press, 2001
.Randy Zhang, Micah Bartell. BGP Design and Implementation. Cisco Press, 2004
.Iljitschvan Beijnum. BGP. O’REILLY, 2002
.Y. Rekhter, T. Li, S. Hares. A Border Gateway Protocol 4 (BGP-4). RFC 4271, 2006
.http://www.cisco.com
.http://www.juniper.net
46
End of Document
공부 하는데 많은 도움이 되었습니다.
좋은 자료 감사합니다~
감사합니다.
PDF 파일 받을수 있을까요
로그인 후 좌측에 "Download PDF File"을 클릭하시면 다운로드 가능합니다.
감사합니다
10년이 지난 자료라고 믿기 힘들 정도로 양질의 퀄리티네요. 정말 많은 도움 되었습니다. 감사합니다.