Presentation is loading. Please wait.

Presentation is loading. Please wait.

5장. 네트워크 계층과 라우팅 내용 네트워크 계층(Network Layer) 소개 라우팅 알고리즘 IP 프로토콜

Similar presentations


Presentation on theme: "5장. 네트워크 계층과 라우팅 내용 네트워크 계층(Network Layer) 소개 라우팅 알고리즘 IP 프로토콜"— Presentation transcript:

1 5장. 네트워크 계층과 라우팅 내용 네트워크 계층(Network Layer) 소개 라우팅 알고리즘 IP 프로토콜
IP addressing IP 동작절차 ARP/RARP ICMP IPv6

2 Network layer functions
transport packet from sending to receiving hosts network layer protocols in every host, router three important functions: path determination: route taken by packets from source to dest. Routing algorithms switching: move packets from router’s input to appropriate router output call setup: some network architectures require router call setup along path before data flows application transport network data link physical network data link physical

3 The Internet Network layer
Host, router network layer functions: Transport layer: TCP, UDP IP protocol addressing conventions datagram format packet handling conventions Routing protocols path selection RIP, OSPF, BGP Network layer routing table ICMP protocol error reporting router “signaling” Link layer physical layer

4 Routing algorithms - Distance Vector - Link State
Distance Vector Routing Alg. 각 라우터는 주기적으로 그 이웃 각각과 명확한 경로 정보를 교환하는데, ARPANET에서 처음 사용 각 라우터는 네트워크의 다른 라우터에 대한 엔트리를 갖는 라우팅 테이블을 유지 각 엔트리는 목적지를 위해 사용할 출력회선과 그 행선지까지의 측정시간이나 거리 RIP is a form of Distance Vector Alg. RIP는 원래 Arpanet에서 사용 현재도 Internet에서 사용 Novell has adapted it as Novell RIP.

5 Distance Vector Routing 동작
매 T msec마다 각 라우터는 각 라우터까지의 측정된 지연시간 리스트를 각 이웃(neighbor)에 보낸다. 또한 라우터(J)는 각 이웃으로부터 비슷한 리스트를 받는다. 이들 테이블 중 하나가 이웃 X로 부터 방금 도착한 것이라 생각하자. 여기서 Xi 는 라우터 i에 도착하는데 걸리는 시간으로 X의 측정치 이다. 라우터(J)가 X까지 측정된 지연시간이 msec라고 한다면 X를 경유하여 라우터 i에 도착하는 지연시간이 Xi+m msec 임을 안다. 각 이웃에 대해 이와 같은 산출을 함으로 라우터는 그중에서 최상의 평가치를 알아내고 그 라우팅 정보와 링크를 사용한다. 예: [그림 5.13]

6 Link state routing It is increasingly popular within autonomous systems Link state protocols are contained in ISO’s OSPF (Open Shortest Path First) algorithm for connectionless network layer services in the NFSNET backbone IS-IS protocol in Novell’s NLSP Makes use of Dijkstra’s algorithm. Five steps.

7 Link State Routing algorithm
1. 각 라우터의 주변(neighbor) 라우터를 인지하고 그들의 네트워크 주소를 숙지 HELLO packet send, 주변의 라우터는 응답 2. 주변 라우터의 각각에 대한 지연시간 또는 비용을 측정 ECHO packet send, 다른 라우터는 즉시 응답 3. Link state를 주변 라우터에게 알려주기 위한 패킷을 생성 [그림 5.14] 4. 이 패킷을 모든 라우터에게 분배 flooding algorithm 사용 [그림 5.15] 5. 모든 라우터로의 최단 경로(shortest path)를 계산

8 TCP/IP 주소지정 세가지 호스트 식별자 Host name IP address Physical Hardware address
예: kowon.dongseo.ac.kr IP address 예: Physical Hardware address 48비트 MAC address

9 식별자 변환 호스트 이름을 인터넷 주소로의 변환 인터넷 주소를 물리적인 하드웨어 주소로의 변환 DNS /etc/hosts
인터넷 주소를 물리적인 하드웨어 주소로의 변환 ARP: Address Resolution Protocol RARP: Reverse ARP

10 인터넷 주소지정 32비트 길이이며 두 부분 즉 네트워크 식별자와 호스트 식별자로 구성
IP는 IP 데이타그램이 송신측 호스트에서 목적지 호스트로 전송되는 라우팅(routing)기능을 수행 인터넷을 통해 전달되는 IP 데이타그램 각각의 헤더는 송신측 호스트의 인터넷 주소와 목적지 호스트의 인터넷 주소를 포함 인터넷 주소 형식 32비트 길이이며 두 부분 즉 네트워크 식별자와 호스트 식별자로 구성 네트워크 식별자의 앞쪽 비트들은 인터넷 주소가 어느 등급(class)에 속해있는지를 식별

11 IP address 구조

12 점-십진(Dotted-decimal) 표기
등급 B는 에서 까지의 범위 등급 C는 에서 까지의 범위

13 Subnetting 원래 TCP/IP 주소지정 방식은 네트워크 식별자와 호스트 식별자로 단지 2단계 계층만을 허용
서브넷 식별자: [그림 6.9] 서브넷 마스크(mask): [그림 6.10] 인터넷 주소중 몇 비트가 네트워크를 식별하기 위해 사용되는지 그리고 몇 비트가 호스트를 식별하기 위해 사용되는지 구분 예: 등급 A: , 등급 B:

14 주소 구조(하나의 서브넷에 여러개의 망)

15 IP addresses: how to get one?
Hosts (host portion): hard-coded by system admin in a file DHCP: Dynamic Host Configuration Protocol: dynamically get address: “plug-and-play” host broadcasts “DHCP discover” msg DHCP server responds with “DHCP offer” msg host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg

16 IP(Internet Protocol)
IP는 TCP/IP 인터넷 계층에서 동작되며 데이터 단위를 출발지 호스트에서 목적지 호스트로 전달 IP에서의 데이터 단위: IP 데이타그램 또는 패킷 IP 데이타그램의 헤더부분 출발지 호스의 인터넷 주소와 목적지 호스트의 인터넷 주소를 포함 IP는 비연결 데이터 전달 서비스를 제공 흐름제어나 오류회복을 하지 않는다. 가능한 오류 손실된 IP 데이타그램 순서화 되지 않은(out-of-sequence) IP 데이타그램 복제(duplicate) IP 데이타그램 TCP : 오류들을 탐지해서 회복할 수 있는 기능을 책임

17 IP 데이타그램(패킷) 구조

18 IP routing [그림 6.12] Sample Network

19 Node a.ncat.edu wants to send one IP packet to www.acme.com.
가정:None of the nodes have any cached data. The only information they have is what is shown in the diagram. The table below shows all of the packets that would be sent.

20 IP routing 동작절차 [그림 6.13] 호스트에서의 IP routing할때 두가지 경우
목적지가 같은 네트워크내에 있는 경우 바로 목적지 호스트에게 IP 데이타그램 전달 목적지가 다른 네트워크에 있는 경우 IP 라우팅 기능을 사용하여 라우터에게 전달 각 호스트는 각각의 라우팅 테이블을 유지 라우팅 테이블은 적어도 하나의 default router의 주소를 포함하는 엔트리를 포함

21 3) 호스트 A의 IP 프로세스는 ARP 캐쉬를 조회
같은 네트워크 상에서의 데이타그램 전달의 예 [그림 6.13]에 있는 호스트 A에서 호스트 B로 IP 데이타그램 전달 1) B의 네트워크 ID 값과 A 자신의 네트워크 ID 값을 비교하기 위해 서브넷 마스크를 사용 2) A와 B의 네트워크 ID 값은 서로 같으므로 IP 데이타그램을 직접 전달하기 위해 B의 물리적인 하드웨어 주소를 알아야 함 3) 호스트 A의 IP 프로세스는 ARP 캐쉬를 조회 4-1) 조회하여 있으면 호스트 IP 데이타그램을 직접 호스트 B로 전달 4-2) 조회하여 없으면 ARP 프로토콜 동작

22 3) A의 IP 프로세스는 default router의 물리적인 하드웨어 주소를 알기 위하여 다시 ARP 캐쉬를 조회
다른 네트워크로의 데이타그램 전달 [그림 6.13]에 있는 호스트 A에서 호스트 D로 IP 데이타그램 전달 1) D의 네트워크 ID 값과 A 자신의 네트워크 ID 값을 비교하기 위해 서브넷 마스크를 사용 2) A와 D의 네트워크 ID 값은 서로 다르므로 IP 데이타그램의 A는 자신의 라우팅 테이블을 검색(이경우 default router 사용) 3) A의 IP 프로세스는 default router의 물리적인 하드웨어 주소를 알기 위하여 다시 ARP 캐쉬를 조회 4-1) 조회하여 있으면 호스트 IP 데이타그램을 직접 default router로 전달 4-2) 조회하여 없으면 ARP 프로토콜 동작 5) default router는 1) ~4) 동작을 반복

23 Introduction - the future of IP (IPv6)
Current version of IP - version 4 - is 20 years old IPv4 has shown remarkable ability to move to new technologies IETF has proposed entirely new version to address some specific problems IP has accommodated dramatic changes since original design Basic principles still appropriate today Scaling Size - from a few tens to a few tens of millions of computers Speed - from 56Kbps to 1Gbps

24 IP 변화의 필요성 Address space Type of service Multicast
32 bit address space allows for over a million networks But...most are Class C and too small for many organizations 2**14 Class B network addresses already almost exhausted Type of service Different applications have different requirements for delivery reliability and speed Current IP has type of service that's not often implemented Multicast

25 New features Address size - IPv6 addresses are 128bits
Header format - entirely different Extension headers - Additional information stored in optional extension headers, followed by data Support for audio and video - flow labels and quality of service allow audio and video applications to establish appropriate connections Extensible - new features can be added more easily

26 IPv6 address notation 128-bit address--> dotted decimal; requires 16 numbers Groups of 16-bit numbers in hex separated by colons- colon hexadecimal (or colon hex) DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF Zero-compression - series of zeroes indicated by two colons FF0C:0:0:0:0:0:0:B1 FF0C::B1 IPv6 address with 96 leading zeros is interpreted to hold an IPv4 address

27 IPv6 Initial motivation: 32-bit address space completely allocated by 2008. Additional motivation: header format helps speed processing/forwarding header changes to facilitate QoS new “anycast” address: route to “best” of several replicated servers IPv6 datagram format: fixed-length 40 byte header no fragmentation allowed

28 IPv6 Header (Cont) Priority: identify priority among datagrams in flow
Flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). Next header: identify upper layer protocol for data

29 Other Changes from IPv4 Checksum: removed entirely to reduce processing time at each hop Options: allowed, but outside of header, indicated by “Next Header” field ICMPv6: new version of ICMP additional message types, e.g. “Packet Too Big” multicast group management functions

30 Transition From IPv4 To IPv6
Not all routers can be upgraded simultaneous no “flag days” How will the network operatewith mixed IPv4 and IPv6 routers? Two proposed approaches: Dual Stack: some routers with dual stack (v6, v4) can “translate” between formats Tunneling: IPv6 carried as payload n IPv4 datagram among IPv4 routers

31 Dual Stack Approach

32 Tunneling IPv6 inside IPv4 where needed

33 ARP(Address Resolution Protocol)
계층간의 주소 구조 IP 계층: IP 주소 IP 하위 계층: 물리적인 하드웨어 주소(PHA) 동일한 망내 호스트 들간의 패킷 교환 IP 계층에 망내 호스트 들의 “IP 주소, PHA 주소” 테이블 (ARP cache) IP 계층 동작 패킷의 수신지 IP 주소에 해당하는 PHA 주소로 패킷 전송 ARP IP 주소에 해당하는 PHA 주소를 모르는 경우

34 ARP의 동작 절차 1) ARP request packet 을 LAN상에 broadcast
ARP request packet 내용: 알고자 하는 호스트의 IP 주소 자신의 IP 주소, PHA 주소 2) LAN상의 모든 호스트에서 동작하는 ARP 프로세스는 ARP request packet 수신 3) B는 자신의 PHA 주소를 포함하는 ARP response packet을 송신측에 전송 4) A가 ARP 응답 패킷을 받을 때 호스트 A는 그 ARP 캐쉬 내에 호스트 B의 물리적인 하드웨어 주소를 저장 5) A는 ARP 캐쉬 엔트리에 있는 정보를 사용 [그림 6.16], [그림 6.17], [그림 6.18]

35 RARP(Reverse ARP) PHA 주소를 알고, 그에 해당하는 IP 주소를 모르는 경우
디스크 없는 워크스테이션(Diskless Workstation)에서 사용

36 인터넷 제어 메시지 프로토콜(ICMP) ICMP(Internet Control Message Protocol)의 기능
에러 보고(Error Reporting) 도착 가능 검사(Reachability Testing) 혼잡 제어 수신측 경로 변경 [그림 6.19] [그림 6.20] [그림 6.21]

37 ICMP: Internet Control Message Protocol
used by hosts, routers, gateways to communication network-level information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping) network-layer “above” IP: ICMP msgs carried in IP datagrams ICMP message: type, code plus first 8 bytes of IP datagram causing error Type Code description echo reply (ping) dest. network unreachable dest host unreachable dest protocol unreachable dest port unreachable dest network unknown dest host unknown source quench (congestion control - not used) echo request (ping) route advertisement router discovery TTL expired bad IP header


Download ppt "5장. 네트워크 계층과 라우팅 내용 네트워크 계층(Network Layer) 소개 라우팅 알고리즘 IP 프로토콜"

Similar presentations


Ads by Google