TCP/IP Illustrated Vol.1 Ch.10 : Dynamic Routing Protocls 2005. 3. 16 (수) 안진섭 [email protected] 10.2 Dynamic Routing (1/2) Dynamic Routing Routing Protocol 각 router와 연결되어 있는 network 정보를 인접한 라우터들과 교환 인접한 라우터들과 routing information을 교환하기 위한 통신 규약 Routing Daemon 인접 라우터로 부터 받은 routing information을 이용하여 kernel내의 routing table을 update routing policy 10.2 Dynamic Routing (2/2) AS(Autonomous System) 인터넷을 구성하는 기본 집합 독자적인 관리구조와 routing information을 구성 ex> InterNOC, ICANN KT, DACOM 기업, 대학 캠퍼스 IGP(Interior Gateway Protocol) AS 내부에서 라우터들간에 routing information을 교환하는데 사용하는 프로토콜 ex> Hello, RIP, OSPF EGP(Exterior Gateway Protocol) 서로 다른 AS들간에 routing information을 교환하는데 사용 ex> EGP, BGP 10.3 Unix Routing Daemons Figure 10.1 Routing protocols supported by routed and gated routed TCP/IP 기반 RIPv1 지원(for small to medium-size network) gated : IGP, BGP 모두 지원 Linux – Zebra : BGP-4, RIPv1/v2, OSPFv2 지원 10.4 RIP : Routing Information Protocol RFC 1058,1988 UDP로 전달(well-known Port :520) Figure 10.2 RIP message encapsulated within a UDP program 10.4 RIP : Routing Information Protocol Figure 10.3 Format of a RIP message Command Request(1), reply(2), *poll(5), *poll-entry(6) Metric : 16 = infinity RIP message당 25개의 route 전달 4+20*25 = 504 byte 10.4 RIP : Routing Information Protocol Normal operation Initialization Request received 새로운 entry의 추가 기존 entry의 수정 및 제거 Regular routing updates 매 30초마다 전송 (broadcast) Triggered update specified address에 대한 metric을 갖고 있을 경우 routing table을 참조하여 set. (없을 경우 16) Response received request(1), address family(0), metric(16) routing table의 metric 변경시 해당 entry에 부분만 전송 3분(6번)동안 update가 안될경우 metric = 16(inf), 60초간 entry 유지 후 삭제 10.4 RIP : Routing Information Protocol Figure 10.4 Example routers and networks 10.4 RIP : Routing Information Protocol Problem Subnet mask 표현 불가능 CIDR 지원안됨 Router/Link의 failure 후에 stabilize에는 상당한 시간소요 Loop 발생 가능성 Metric에 hop count만 사용 Metric의 최대값(15)으로 인해 RIP를 적용할 수 있는 network 규모 제한 Update/request message는 모두 broadcast 네트워크의 각 node들의 load 증가 10.4 RIP : Routing Information Protocol Example Sun에서 ‘netb’에 대한 routing information 얻기(poll) poll에 대한 응답이 5초 이내에 없음 Entire routing table을 얻기 위한 poll message Figure 10.5 Two routers netb and gateway that we’ll query for their routing tables 10.5 RIP Version 2 Figure 10.10 Format of a RIP-2 message Multicast 지원 : RIP 라우터만 rounting information 송/수신 Route tag : EGP, BGP 지원(AS number) Submask, nexthop IP address 추가 Simple authentication scheme 적용 10.6 OSPF : Open Shortest Path First (1/5) RIP의 단점을 보완 Link-state protocol (OSPFv2 : RFC 1247) Router는 link-state를 통해 routing table 생성 네트워크의 link 변화에 distance-vector protocol 보다 convergence가 빠름 10.6 OSPF : Open Shortest Path First (2/5) OSPF header Contents Version Packet type Length Router id Area id Checksum Authentication type & data OSPF message type #neighbor listed and/or LSA type Protocol field = 89 in IP header 10.6 OSPF : Open Shortest Path First (3/5) OSPF Router types ASBR(AS Boundary Router) ABR(Area Border Router) DR(Designated Router) BDR(Backup DR) 6 Area 1 Area 0 2 ASBR 9 Area 2 0/0 192.168.3.9 192.168.2.6 192.168.1.2 2610XM 1 4 3 0/0 192.168.1.1 Catalyst 2950 Switch 192.168.1.3 5 ABR 8 0/1 192.168.2.1 2611XM 0/0 192.168.2.5 Catalyst 2950 Switch ABR 7 192.168.2.7 2611XM 12 0/1 192.168.3.5 2611XM 0/1 192.168.14.9 Catalyst 2950 Switch 0/0 192.168.3.13 13 ASBR 2611XM 0/1 192.168.15.13 10.6 OSPF : Open Shortest Path First (4/5) ‘Hello’ packet // 224.0.0.5 : all OSPF routers Area 1 2 192.168.1.2 2610XM 1 4 3 0/0 192.168.1.1 Catalyst 2950 Switch 192.168.1.3 ABR 0/1 192.168.2.1 2611XM 10.6 OSPF : Open Shortest Path First (5/5) ‘Area1’과 link를 해제했을 때 ‘Area 1’과 link 해제 시점 Dead time interval (40sec) Router #1의 연결 해제를 알림 192.168.2.5의 주기적인 Hello pkt. LSU에 대한 ACK LSU에 대한 ACK 6 Area 0 0/0 192.168.3.9 192.168.2.6 1 0/0 192.168.1.1 5 ABR 8 0/1 192.168.2.1 X 2611XM ASBR 9 Area 2 ABR Catalyst 2950 Switch 2611XM 7 192.168.2.7 DR 2611XM 12 0/1 192.168.3.5 0/0 192.168.2.5 0/1 192.168.14.9 Catalyst 2950 Switch 0/0 192.168.3.13 13 ASBR 2611XM 0/1 192.168.15.13 10.7 BGP : Border Gateway Protocol(1/3) 서로 다른 AS간의 routing information을 교환하는데 사용하는 protocol(EGP 대체) BGPv3 (RFC 1267), BGPv4 (RFC 1467) Network reachability 정보를 다른 BGP system과 교환 Traffic이 네트워크에 도달하기 위해 거쳐야 하는 AS의 full path AS 연결 그래프 구성 Routing loop 제거 10.7 BGP : Border Gateway Protocol(2/3) IP datagram의 분류 local traffic:그 AS안에서 시작해서 끝나는 트래픽. Source와 dest가 그 AS안에 존재 transit traffic: local traffic이외의 traffic BGP의 주요한 목적은 transit traffic을 줄이는 것 BGP의 특징 policy-based routing RIP와 OSPF와 다르게 TCP를 사용 distancd-vector protocol AS number를 이용 keepalive 메시지를 보냄으로서 링크나 호스트의 결함을 발견 (30초 간격) 10.7 BGP : Border Gateway Protocol(3/3) ‘Singly homed’ AS subscriber may not need BGP ‘Multi-homed’ AS 10.8 CIDR : Classless Interdomain Routing IP address 낭비 방지 및 과도한 Routing table의 크기를 줄임 (CIDR을 사용하지 않는다면 class C network 마다 하나의 routing table entry 필요) Supernetting (RFC 1518, 1519) 연속된 class C IP address를 묶어서 사용 Summarization 여러 개의 IP address들이 동일한 high-order bit를 공유 Routing table은 32bit IP address와 32bit subnet mask를 사용할 수 있도록 확장 Ex> 192.168.8.0 192.168.9.0 192.168.10.0 192.168.11.0 192.168.12.0 192.168.13.0 192.168.14.0 192.168.15.0 192.168.8.0/21 192.168.8.0 11000000 . 10101000 . 00001000 . 00000000 /21 11111111 . 11111111 . 11111000 . 00000000 255.255.248.0 -----------------------------------------------------------------------11000000 . 10101000 . 00001000 . 00000000 192.168.8.0 ~ 11000000 . 10101000 . 00001111 . 00000000 192.168.15.0
© Copyright 2026 Paperzz