Chapter 13 Routing Protocols RIP OSPF BGP Http
Chapter 13 Routing Protocols (RIP, OSPF, BGP) Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 1
CONTENTS • • INTERIOR AND EXTERIOR ROUTING RIP OSPF BGP Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 2
13. 1 Http: //netwk. hannam. ac. kr INTERIOR AND EXTERIOR ROUTING HANNAM UNIVERSITY 5
13. 1 내부와 외부 라우팅 <자율 시스템 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 8
13. 2 Http: //netwk. hannam. ac. kr RIP: Routing Information Protocol HANNAM UNIVERSITY 9
13. 2 RIP <라우팅 테이블 Destination Hop Count Next Hop ------------------163. 5. 0. 0 7 172. 6. 23. 4 197. 5. 13. 0 5 176. 3. 6. 17 189. 45. 0. 0 4 200. 5. 1. 6 115. 0. 0. 0 6 131. 4. 7. 19 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 12
13. 2 RIP < RIP갱신 알고리즘 1. Receive : a response RIP Message 2. Add one hop to the hop count for each advertised destination. 3. Repeat the following steps for each advertised destination: 1. If(destination not in the routing information to the table. 1. Add the advertised information to the table. 2. Else 1. If(next-hop field is the same) 1. Replace entry in the table with the advertised one. 2. Else 1. If(advertised hop count smaller than one in the table) 2. Replace entry in the routing table 4. Return. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 13
13. 2 RIP <라우팅 테이블 갱신 예 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 14
13. 2 RIP <라우팅 테이블 초기화 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 15
13. 2 RIP <이전 그림의 마지막 라우팅 테이블 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 16
13. 2 RIP <RIP메시지 형식 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 17
13. 2 RIP Example 1 What is the periodic response sent by router R 1 in Figure 13. 8 (next slide)? Assume R 1 knows about the whole autonomous system. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 20
13. 2 RIP <예제 1 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 21
13. 2 RIP Solution R 1 can advertise three networks 144. 2. 7. 0, 144. 2. 9. 0, and 144. 2. 12. 0. The periodic response (update packet) is shown in Figure 13. 9 (next slide). Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 22
13. 2 RIP <예제 1에 대한 해결책 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 23
13. 2 RIP <RIP 타이머 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 24
13. 2 RIP Example 2 A routing table has 20 entries. It does not receive information about five routes for 200 seconds. How many timers are running at this time? Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 26
13. 2 RIP Solution The timers are listed below: Periodic timer: 1 Expiration timer: 20 - 5 = 15 Garbage collection timer: 5 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 27
13. 2 RIP <홉 카운트(Hop count) Ü홉 수를 15로 제한 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 29
13. 2 RIP <불안정(Instability) Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 30
13. 2 RIP <poison reverse : 수평 분할의 변형 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 32
13. 2 RIP <RIP 버전 2 형식 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 33
13. 2 RIP version 2 supports CIDR. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 35
13. 2 RIP <인증 Ü메시지 보호를 위해 사용 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 36
13. 2 RIP uses the services of UDP on well-known port 520. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 38
13. 3 OSPF: Open Shortest Path First Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 39
13. 3 OSPF <자율 시스템 내 지역 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 43
13. 3 OSPF(계속) <링크의 유형 ÜOSPF 용어에서 네트워크 지칭 Ü링크 유형 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 45
13. 3 OSPF(계속) <경유(transient) 링크 Ü몇 개의 라우터가 연결되어 있는 네트워크 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 47
13. 3 OSPF <인터넷의 예 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 49
13. 3 OSPF <인터넷의 그림 표현 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 50
13. 3 OSPF <링크 상태 광고(LSA : link state advertisement) Ü이웃에 대한 정보 교환 ÜLSA 유형 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 51
13. 3 OSPF <라우터 링크 Ü실제 라우터의 링크들을 정의 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 52
13. 3 OSPF <네트워크 링크 Ü네트워크의 링크들을 정의 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 53
13. 3 OSPF Example 3 In Figure 13. 31 (next slide), which router(s) sends out router link LSAs? Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 57
13. 3 OSPF <예제 3과 예제 4 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 58
13. 3 OSPF Solution All routers advertise router link LSAs. R 1 has two links, Net 1 and Net 2. R 2 has one link, Net 1 in this AS. R 3 has two links, Net 2 and Net 3. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 59
13. 3 OSPF Example 4 In Figure 13. 31, which router(s) sends out the network link LSAs? Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 60
13. 3 OSPF Solution All three network must advertise network links: Advertisement for Net 1 is done by R 1 because it is the only router and therefore the designated router. Advertisement for Net 2 can be done by either R 1, R 2, or R 3, depending on which one is chosen as the designated router. Advertisement for Net 3 is done by R 3 because it is the only router and therefore the designated router. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 61
13. 3 OSPF In OSPF, all routers have the same link state database. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 62
13. 3 OSPF < 딕스트라 알고리즘(Dijkstra Algorithm) Ü 라우팅 테이블 계산 알고리즘 1. Start with the local node(router) : the root of the tree. 2. Assign a cost of 0 to this node and make it the first permanent node. 3. Examine each neighbor node of the node that was the last permanent node. 4. Assign a cumulative cost to each node and make it tentative. 5. Among the list of tentative nodes 1. Find the node with the smallest cumulative cost and make it permanent. 2. If a node can be reached from more than one direction 1. Select the direction with the shortest cumulative cost. 6. Repeat steps 3 to 5 until every node becomes permanent. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 64
13. 3 OSPF(계속) <최단 경로 계산 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 65
13. 3 OSPF <최단 경로 계산 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 66
13. 3 OSPF <최단 경로 계산 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 67
13. 3 OSPF < 라우팅 테이블 Ü지역내의 각 네트워크에 도달하는 비율 Ü라우터 A에 대한 링크 상태 라우팅 테이블 Network -----N 1 N 2 N 3 N 4 N 5 Http: //netwk. hannam. ac. kr Cost -----5 7 10 11 15 Next Router --------C D B D HANNAM UNIVERSITY 68
13. 3 OSPF < 패킷의 종류 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 69
13. 3 OSPF < OSPF 패킷 헤더 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 70
13. 3 OSPF <데이터베이스 기술 패킷 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 75
13. 3 OSPF <LSA 헤더 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 79
13. 3 OSPF < 라우터 링크 LSA Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 81
13. 3 OSPF < 링크 종류, 링크 식별자와 링크 데이터 Link Type Link Identification Link Data Type 1: Point-to-Point connection to another router Address of neighborrouter Interface number Type 2: Connection to any -to-any network Address of designated router Router address Type 3: Connection to stubnetwork Network address Network mask Type 4: Virtual link Address of neighborrouter Router address Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 83
13. 3 OSPF Example 5 Give the router link LSA sent by router 10. 24. 7. 9 in Figure 13. 41. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 84
13. 3 OSPF <예제 5 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 85
13. 3 OSPF Solution This router has three links: two of type 1 (point-topoint) and one of type 3 (stub network). Figure 13. 42 shows the router link LSA. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 86
13. 3 OSPF <예제 5의 해결책 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 87
13. 3 OSPF Example 6 Give the network link LSA in Figure 13. 44. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 89
13. 3 OSPF <예제 6 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 90
13. 3 OSPF Solution The network, for which the network link advertises, has three routers attached. The LSA shows the mask and the router addresses. See Figure 13. 45. Note that only one of the routers, the designated router, advertises the network link. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 91
13. 3 OSPF <예제 6의 해결책 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 92
13. 3 OSPF < 네트워크 LSA의 요약 링크 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 94
13. 3 OSPF packets are encapsulated in IP datagrams. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 98
13. 4 BGP: Border Gateway Protocol Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 99
13. 4 BGP <Border Gateway Protocol <자율 시스템간 라우팅 프로토콜 <경로 벡터 라우팅(path vector routing) 방법 적용 <경로 벡터 라우팅 테이블(표 13. 4로 대체 374) Network -----N 01 N 02 N 03 N 04 Http: //netwk. hannam. ac. kr Next Router -------R 01 R 05 R 06 R 12 Path -----------AS 14, AS 23, AS 67 AS 22, AS 67, AS 05, AS 89 AS 67, AS 89, AS 09, AS 34 AS 62, AS 09 HANNAM UNIVERSITY 100
13. 4 BGP < 패킷 종류 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 103
13. 4 BGP supports classless addressing and CIDR. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 104
13. 4 BGP < Keepalive 메시지 Ü 상대방에게 자신이 동작하고 있음을 알리는 메시지 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 110
13. 4 BGP < Notification 메시지 Ü 오류 상황 감지 또는 연결을 닫기 원할 때 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 111
13. 4 BGP < 오류 코드 Error Code Description Error Subcode Description Message message error Three different subcodes are define for this type of error: synchroniation problem(1), bad message length(2), and bad message type(3) Open message error Six different subcodes are defined for this type of error: unsupported version number(1), bad peer AS(2), bad BGP identifier(3), unsupported optional parameter(4), authentication famiure(5), and unacceptable hold time(6) 3 Update message error Eleven different subcodes are defined for this type of error: malformed attribute list(1), unrecognized well-known attribute(2), missing well-known attribute(3), attribute flag error(4), attribute length error(5), invalid oriin attribute(8), optional attribute error(9), invalid network field(10), malformed ASPATH(11) 4 Hold timer expired No subcode defined. 5 Finite state machine This defines the procedural error. No subcode defined. 6 Cease No subcode defined 1 2 Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 112
13. 4 BGP uses the services of TCP on port 179. Http: //netwk. hannam. ac. kr HANNAM UNIVERSITY 113
- Slides: 113