1 / 22

TCP/IP 통신망 특론

TCP/IP 통신망 특론. 2 장 Link Layer. 컴퓨터 네트워크 실험실 이희규. 목 차. 2.1 Introduction 2.2 Ethernet and IEEE 802 Encapsulation 2.3 Trailer Encapsulation 2.4 SLIP : Serial Line IP 2.5 Compressed SLIP 2.6 PPP : Point-to-Point Protocol 2.7 Loopback Interface

Télécharger la présentation

TCP/IP 통신망 특론

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TCP/IP 통신망 특론 2장 Link Layer 컴퓨터 네트워크 실험실 이희규

  2. 목 차 2.1 Introduction 2.2 Ethernet and IEEE 802 Encapsulation 2.3 Trailer Encapsulation 2.4 SLIP : Serial Line IP 2.5 Compressed SLIP 2.6 PPP : Point-to-Point Protocol 2.7 Loopback Interface 2.8 MTU (maximum transmission unit) 2.9 Path MTU 2.10 Serial Line Throughput Calculations 2.11 요약

  3. 2.1 Introduction • 링크계층의 목적 • IP module을 위한 IP datagram의 send/receive • ARP module을 위한 ARP request와 reply • RARP module을 위한 RARP request와 reply • TCP/IP는 서로 다른 Link Layer를 지원한다 • 즉, TCP/IP 아키텍처는 어떤 종류의 물리적 네트워크 상에서도 수행할 수 있도록 설계되어 있다. • Ethernet, token ring, FDDI, RS-232 serial line, etc.

  4. 2.2 Ethernet and IEEE 802 Encapsulation • Ethernet • 일반적으로 DEC, Intel, Xerox사가 1982년에 제안한 표준을 의미하며 CSMA/CD (Carrier Sense, Multiple Access with Collision Detection) 라고 하는 access method를 사용 • 전송속도 10Mbps, 48-bit address • IEEE 802 위원회 • 802.2 LLC(Logical Link Control) • 802.3 CSMA/CD • 802.4 token bus • 802.5 token ring

  5. 2.2 Ethernet and IEEE 802 Encapsulation (Cont’d) • IP datagram encapsulation define • Ethernet에 대한 RFC 894 • IEEE 802 network에 대한 RFC 1042

  6. 2.2 Ethernet and IEEE 802 Encapsulation (Cont’d) • Host Requirement RFC • RFC 894(Ethernet) encapsulation을 사용하는 packet을 송수신할 수 있어야 한다 • RFC 894 packet과 혼합된 RFC 1042(IEEE 802) packet을 수신할 수 있어야 한다 • RFC 1042 encapsulation을 사용한 packet을 송신할 수도 있어야 한다. 호스트가 두 타입의 packet을 송신할 수 있다면 송신한 packet의 타입을 구성할 수 있어야 하고 구성 옵션은 RFC 894를 따라야 한다. • RFC 894 encapsulation이 가장 일반적으로 사용되고 있다.

  7. IEEE 802.2/802.3 Encapsulation(RFC 1042) 802.3 MAC 802.2 LLC 802.2 SNAP cntl dest src DSAP SSAP org code type data CRC leng 03 addr addr AA AA 00 6 6 2 1 1 1 3 2 38-1492 4 type IP datagram 0800 2 38-1492 type ARP request/reply PAD 0806 2 28 10 type RARP request/reply PAD 0835 Ethernet 2 28 10 Encapsulation 46-1500 bytes (RFC 894) dest src data CRC type addr addr 6 6 2 46-1500 4 IEEE 802.2/802.3 캡슐화(RFC 1042)와 이더넷 캡슐화(RFC 894) type IP datagram 0800 2 46-1500 type ARP request/reply PAD 0806 2 28 18 type RARP request/reply PAD 0835 2 28 18

  8. 2.3 Trailer Encapsulation • RFC 893은 trailer encapsulation이라고 하는 또 다른 형태의 Ethernet encapsulation을 설명 • 이것은 IP datagram의 필드 순서를 바꿈으로서 성능 개선을 꾀한 실험에서 비롯되었음 • 즉, IP와 TCP header를 data 부분의 끝으로 옮김으로써 data가 kernel내로 복사될 때 memory to memory copy가 효율적으로 이루어지도록 한 것임 • 현재는 사용되지 않음

  9. 2.4 SLIP : Serial Line IP • RFC 1055 • RS-232 serial port를 통해 Internet에 접속할 때 사용 • framing rule • IP datagram의 앞뒤에 special character END(0xc0)를 추가. 이는 어떤 line noise가 데이터로 해석되는 것을 막기 위함. • IP datagram 내에 0xc0는 0xdb, 0xdc로 변환하여 전송(0xdb는 SLIP ESC character라 함) • IP datagram 내에 0xdb는 0xdb, 0xdd로 변환하여 전송

  10. 2.4 SLIP : Serial Line IP(Cont’d) • SLIP의 단점 • 각 end system은 서로의 IP address를 알고 있어야 한다. 즉, IP address를 알려 줄 방법이 없다. • Ethernet의 type field와 유사한 type field가 없다. 어떤 serial line이 SLIP을 사용하고 있다면 동시에 다른 protocol을 사용할 수 없다. • SLIP은 Ethernet의 CRC와 같은 아무런 checksum을 하지 않는다. SLIP을 통해 전송하고 있는 datagram은 잡음으로 인해 잘못될 수 있고, 이는 상위 계층이 검출해야 한다. 따라서 IP의 header checksum, TCP의 header와 data checksum, UDP의 header와 data(optional) checksum이 이를 담당한다.

  11. 2.5 Compressed SLIP • RFC 1144 [Jacobson 1990a] • SLIP line은 저속(19200bits/sec or below)이며 interactive traffic(TCP를 사용하는 Telnet or Rlogin)에 빈번히 사용 : 1 byte를 전송하기 위해 40bytes(TCP 20, IP20)의 overhead가 있음. • 이러한 성능상의 결점을 해결하기 위해 CSLIP을 고안 • 일반적으로 어떤 접속에 사용되는 두 header의 일부 field는 바뀌지 않는다는 성질을 이용하여 40 bytes의 header를 3 or 5 bytes로 줄여서 전송. 따라서 이러한 작은 header는 interactive response time을 많이 개선한다.

  12. 2.6 PPP : Point-to-Point Protocol • PPP는 SLIP의 모든 단점을 수정하며 다음과 같은 3개의 요소로 구성된다. • Serial link상의 IP datagram을 encapsulation하는 방법. PPP는 8 bits data, no parity를 사용하는 asynchronous link와 bit-oriented synchronous link를 모두 지원한다. • Data-link connection을 설정, 구성, 테스트 하기 위한 LCP(Link Control Protocols). 따라서 각 end system은 다양한 option을 협상할 수 있다. • NCP (Network Control Protocols)로 다른 네트워크 계층의 프로토콜 지정.현재 IP, OSI network layer, DECnet, AppleTalk를 위한 RFC가 존재.

  13. 2.6 PPP : Point-to-Point Protocol(Cont’d) • RFC 1331 : encapsulation method and link control protocol • RFC 1332 : network control protocol for IP

  14. 2.6 PPP : Point-to-Point Protocol(Cont’d) • information field에 0x7e가 나타난 경우 • 동기식 링크인 경우 bit stuffing • 비동기식 링크인 경우 escape character(0x7d) 사용하며 escape character가 PPP frame에 나타난 경우(두 번째 바이트의 6번째 bit를 보수로 바꿈) • 0x7e는 0x7d, 0x5e • 0x7d는 0x7d, 0x5d • 0x20보다 작은 값은 무조건 투명유지 작업을 하게 된다. 예를 들면 0x01은 0x7d, 0x21로 바꾸어 전송. 이는 호스트나 모뎀상의 serial driver가 ASCII control character로 인식하는 것을 막기 위함.

  15. 2.6 PPP : Point-to-Point Protocol(Cont’d) • SLIP과 마찬가지로 constant(flag, address)를 생략하고 protocol을 1 byte로 줄여 사용할 수 있다. 그러나 이 경우에도 3 byte(CRC 2, protocol 1)의 overhead가 생김. 또한 CSLIP과 마찬가지로 IP, TCP header의 크기를 줄여서 사용할 수 있다. • SLIP보다 PPP가 주는 장점 • 한 serial line에 multiple protocol을 제공 • 각 frame에 cyclic redundancy check • IP network control protocol을 사용하여 IP address의 동적 협상 가능 • CSLIP과 유사한 TCP, IP header compression • link control protocol을 통한 다수의 data-link option 협상 • 결과적으로 이러한 이점은 3 byte의 overhead, link를 설정할 때 협상을 하기 위한 몇 개의 frame, 훨씬 더 복잡한 구현에 대한 대가이다.

  16. 2.7 Loopback Interface • 같은 호스트내의 client와 server가 TCP/IP를 이용하여 통신하기 위해 대부분 loopback interface를 제공 • 이름은 localhost, IP address는 127.0.0.1

  17. 2.7 Loopback Interface (cont’d) • Key points • loopback address로 보내진 모든 것은 IP input에 나타난다. • broadcast or multicast address로 보내진 datagram은 loopback interface로 복사되고 Ethernet으로 보내진다. 이는 broadcasting과 multicasting의 정의가 sending host를 포함하기 때문이다. • 자신의 IP address 중 하나로 보내진 어떤 것도 loopback interface로 보내진다. • 모든 transport와 IP layer가 loopback data를 처리하는 것이 비효율적으로 보일지도 모르겠지만 이는 network layer에게 loopback interface가 단지 다른 link layer로 보이기 때문에 설계를 단순화 시킨다. • 또한 자신의 IP address 중 하나로 송신한 IP datagram은 네트워크 상에 절대로 나타날 수가 없다는 것을 암시한다.

  18. 2.8 MTU • frame의 크기를 제한하는 link layer의 특성을 MTU (maximum transmission unit)라 한다. • IP datagram이 link layer의 MTU보다 크면 fragmentation이 일어나며 각 fragment는 MTU보다 작아야 한다. • 이 중 Point-to-Point에 대한 MTU는 network media의 물리적 특성에 따른 것이 아니라 대화형 응용의 적당한 response를 제공하기 위한 논리적인 제한. Network MTU(bytes) Hyperchannel 65535 16 Mbits/sec token ring(IBM) 17914 4 Mbits/sec token ring(IEEE 802.5) 4464 FDDI 4352 Ethernet 1500 IEEE 802.3/802.2 1492 X.25 576 Point-to-Point(low delay) 296

  19. 2.9 Path MTU • 두 호스트가 같은 network 상에서 통신할 때는 MTU가 중요한 factor이다. • 그러나 두 호스트 사이에 multiple network가 개입되어 있는 경우 두 호스트가 접속한 network의 MTU 보다는 중계 network의 가장 작은 MTU가 더 중요하며 이를 path MTU라 한다. • Path MTU는 일정하지 않으며 이는 어떤 시점에 사용된 경로에 의존하기 때문이다. • 또한 routing은 대칭이 아니다. 즉, A에서 B로 가는 경로와 B에서 A로 가는 경로가 다를 수 있기 때문이다. 따라서 path MTU는 두 방향이 서로 다를 수 있다. • RFC 1191에는 path MTU를 결정하기 위한 방법(path MTU discovery mechanism)을 설명하고 있다.

  20. 2.10 Serial Line Throughput Calculations • line speed 9600bps, data 8 bits, start 1 bit, stop 1bit인 경우 960 byte/sec이며 1024 byte packet 전송에 1066ms가 소요된다. • 이러한 가정하에 SLIP link 상에서 1024 byte frame을 나르는 application과 interactive application이 사용되는 경우 interactive packet을 보내는데 평균 1066/2 = 533ms를 기다려야 한다. • Interactive traffic은 100-200ms를 넘어서면 좋지 않은 것으로 판단한다[Jacobson 1990a](인간 공학 연구) • MTU가 256인 경우 266ms(256/960) 소요되며 평균 wait는 133ms이다. 133이 완벽한 throughput은 아니나 64나 128보다는 utilization이 좋다.

  21. 2.10 Serial Line Throughput Calculations(Cont’d) • Point-to-Point link에서 MTU를 296으로 정한 이유 • 256+40(TCP + IP header)=296이다. 그러나 CSLIP을 사용하는 경우 40을 5로 줄이기 때문에 261byte frame이 되고 261 중에서 98.1%(256/261)는 data, 1.9%(5/261)가 header이므로 좋은 utilization 이라고 할 수 있다.

  22. 2.11 요약 • 이더넷과 IEEE 802.2/802.3캡슐화의 차이점 • SLIP과 PPP 캡슐화 차이점 • SLIP과 PPP는 둘 다 저속 링크에서 사용되기 때문에 종종 변하지 않는 필드는 압축하는 방법사용 • 루프백 인터페이스 • MTU와 path MTU

More Related