TCPIP 10 Computer Network Lab 1 Introduction cont

TCP/IP 통신망 특론 제 10장 동적 라우팅 Computer Network Lab. 1


Introduction (cont. ) n n Dynamic routing protocols l RIP(Routing Information Protocol) l OSPF(Open Shortest Path First) l BGP(Border Gateway Protocol) CIDR(Classless Inter. Domain routing) l class B 네트워크 수를 보존하기 위하여 Internet상에서 구현되기 시작한 새로운 라우팅 기술 Computer Network Lab. 3



Dynamic Routing(Cont. ) n EGP(Exterior gateway protocol) AS사이의 라우터들이 주고 받는 프로토콜 l외부 도메인 프로토콜(Extradomain Protocol) l현재 NSFNET 백본과 여기에 접속되어 있는 몇 개의 지 역 네트워크에서 이용 l종 류 : EGP, BGP(Border Gateway Protocol) l다른 Computer Network Lab. 6

UNIX Routing Daemons n Routed vs. gated Daemon Interior Gateway Protocol Hello routed gated, Version 2 gated, Version 3 RIP Exterior Gateway Protocol OSPF EGP BGP V 2 . . V 1 V 2, V 3 V 1. . V 1, V 2 – Routed : 규모가 적거나 중간 크기의 네트워크에서 사용 (RIP만을 사용) – Gated : IGP와 EGP를 모두지원 Computer Network Lab. 7

RIP: Routing Information Protocol n Message Format (UDP datagram으로 캡슐화) IP datagram UDP datagram IP header 20 bytes UDP header RIP message 8 bytes Figure 10. 2 RIP message encapsulated within a UDP datagram Computer Network Lab. 8

RIP(Cont. ) n Message Format (IP 주소를 사용할 때) command(1 -6) Version(1) (must be zero) address family(2) (must be zero) 32 -bit IP address (must be zero) 20 bytes metric(1 -16) (up to 24 more roues, with same format as previous 20 bytes) Computer Network Lab. 9

RIP(Cont. ) n Normal Operation 초기화 l request 수신 l l response 수신 l 일반적인 라우팅 update l triggered update l RIP 를 사용하는 시스템이 3분 동안 update되지 않는 route를 발견하면, 그 route의 metric를 infinity(16)으로 설정 Computer Network Lab. 10

RIP(Cont. ) n Metrics l hop count l AS안에 여러 개의 path가 있을 경우, 라우터는 최소 hop count를 가지는 path를 선택 l 최대 hop count는 15, 16이면 no route Computer Network Lab. 11


RIP(Cont. ) n Example gateway 140. 252. 1 netb sun 140. 252. 13 Figure 10. 5 라우팅 테이블을 조회하는 2개의 라우터 netb와 gateway Computer Network Lab. 13

RIP(Cont. ) n Example òsun으로 부터 다음 hop 라우터인 netb에 대한 라우팅 정보를 얻기 위한 명령 sun % ripquery -n netb 504 bytes from netb (140. 252. 1. 183) 140. 252. 1. 0, metric 1 140. 252. 13. 0, metric 1 244 bytes from netb (140. 252. 1. 183) Computer Network Lab. 14

RIP(Cont. ) n Example òtcpdump를 이용한 패킷 교환의 예 sun % tcpdump -s 600 -I s 10 1 0. 0 sun. 2879 > netb. route: rip-poll 24 2 5. 014702(5. 0147) sun. 2879 > netb. route: rip-req 24 3 5. 560427(0. 5457) netb. route > sun. 2879: rip-resp 25: 4 5. 710251(0. 1498) netb. route > sun. 2879: rip-resp 12: Computer Network Lab. 15

RIP(Cont. ) n Example ònetb의 목적지 라우터 gateway로 가면, 서브넷 (140. 252. 13. 0)에 대한 메트릭을 확인하기 위한 명령 sun % ripquery -n gateway 504 bytes from gateway(140. 252. 1. 4): 140. 252. 1. 0, metric 1 140. 252. 13. 0, metric 2 Computer Network Lab. 16

RIP(Cont. ) n Another Example ò호스트 solaris 상에서 sun의 tcpdump와 유사한 명령인 snoop를 실행 solaris % snoop -P -tr udp port 500 0. 00000 R 6. tuc. noao. edu -> 140. 252. 1. 255 RIP R (1 ) 4. 49708 R 4. tuc. noao. edu -> 140. 252. 1. 255 RIP R (1 ) 6. 30506 R 2. tuc. noao. edu -> 140. 252. 1. 255 RIP R (1 ) ……. 17. 02187 gateway. tuc. noao. edu -> 140. 252. 1. 255 RIP R (15 dest. ) 20. 68009 R 10. tuc. noao. edu -> BROADCAST RIP R (4 dest. ) Computer Network Lab. 17

RIP(Cont. ) n Another Example ò 140. 251는 noao. edu망에 존재하지 않는 경로임. RIP: Adress Metric RIP: 140. 251. 0. 0 16(not reachable) RIP: 140. 252. 9. 0 1 RIP: 140. 252. 10. 0 1 RIP: 140. 252. 11. 0 1 Computer Network Lab. 18

RIP(Cont. ) ògateway로 부터의 RIP 응답 Solaris % snoop -P -v -tr udp port 520 host gateway RIP: Opcode = 2 (route response) RIP: Version = 1 RIP: Address Metric RIP: 140. 252. 101. 0 1 RIP: 140. 252. 104. 0 1 RIP: 140. 252. 51. 0 2 RIP: 140. 252. 81. 0 2 RIP: 140. 252. 105. 0 2 RIP: 140. 252. 106. 0 2 ……. Computer Network Lab. 19


RIP Version 2(Cont. ) n RIP-2 message format command(1 -6) Version(2) routing domain address family(2) Routing tag 32 -bit IP address 32 -bit subnet mask 32 -bit next-hop IP address metric(1 -16) 20 bytes (up to 24 more roues, with same format as previous 20 bytes) Computer Network Lab. 21

OSPF(Open Shortest Path First) n RIP의 문제점을 해결 n distance-vector protocol이 아니라 link-state protocol n l 각 라우터는 링크의 상태 정보로 routing table를 생성 l 라우터나 링크의 다운 후에 distance-vector protocol보 다 더 빠르게 안정화됨 TCP/UDP가 아닌 IP를 사용 Computer Network Lab. 22

OSPF(Cont. ) n OSPF의 특징 l Multiple routing table entries ä l 각 IP type-of-service에 따라 여러 개의 route load balancing ä 동일한 비용의 route가 여러 개 있을 경우, 트래 픽을 동일하게 분산 l subnet 지원 l unnumbered network ä Point-to-point link에서 각 종단의 IP 주소를 필요로 하지 않음 Computer Network Lab. 23

OSPF(Cont. ) l Simple authentication scheme 사용 l broadcasting 대신 multicasting 이용 Computer Network Lab. 24

BGP(Border Gateway Protocol) n 다른 AS상에 있는 라우터들 사이의 통신 프로토콜로 ARPNET에서 사용된 EGP를 대체 BGP version 3 (RFC 1267) l BGP version 4 (RFC 1467) l n network reachability 정보를 다른 BGP 시스템과 교환 l 트래 픽이 그 네트워크에 도달하기 위하여 거쳐야 하는 AS의 full path ä AS 연결 그래프를 구성 ä routing loop 제거 Computer Network Lab. 25

BGP(Cont. ) n IP datagram의 분류 l local traffic: 그 AS안에서 시작해서 끝나는 트래픽. Source와 dest가 그 AS안에 존재 l transit traffic: local traffic이외의 traffic ä BGP의 주요한 목적은 transit traffic을 줄이는 것 Computer Network Lab. 26


BGP(Cont. ) n BGP의 특징 l policy-based routing l RIP와 OSPF와 다르게 TCP를 사용 l distancd-vector protocol ä l AS number를 이용 keepalive 메시지를 보냄으로서 링크나 호스트의 결함 을 발견 (30초 간격) Computer Network Lab. 28

CIDR(Classless Interdomain Routing) 인터넷 routing table의 크기가 커지는 것을 막기 위한 방법 제공 n supernetting (RFC 1518, 1519) n n 기본 개념 l 여러 개의 IP address들을 더 작은 수의 routing table entries로 summarization하는 방법 Computer Network Lab. 29

CIDR(Cont. ) n Summarization을 위한 기능 l 여러 개의 IP address들이 동일한 high-order bit를 공유 l routing table과 routing algorithm l 사용 라우팅 테이블은 32비트 IP 주소와 32 비트 마스 크를 전송할 수 있도록 확장 Computer Network Lab. 30
- Slides: 30