TCPIP 2 Link Layer Computer Network Lab 2
TCP/IP 통신망 특론 2장 Link Layer 컴퓨터 네트워크 실험실 이희규 Computer Network Lab.
목 차 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 요약 Computer Network Lab. 2
2. 1 Introduction n n 링크계층의 목적 l IP module을 위한 IP datagram의 send/receive l ARP module을 위한 ARP request와 reply l RARP module을 위한 RARP request와 reply TCP/IP는 서로 다른 Link Layer를 지원한다 l 즉, TCP/IP 아키텍처는 어떤 종류의 물리적 네트워크 상에서도 수행할 수 있도록 설계되어 있다. l Ethernet, token ring, FDDI, RS-232 serial line, etc. Computer Network Lab. 3
2. 2 Ethernet and IEEE 802 Encapsulation n Ethernet 일반적으로 DEC, Intel, Xerox사가 1982년에 제안한 표준을 의미하며 CSMA/CD (Carrier Sense, Multiple Access with Collision Detection) 라고 하는 access method를 사용 l 전송속도 10 Mbps, 48 -bit address l n IEEE 802 위원회 802. 2 LLC(Logical Link Control) l 802. 3 CSMA/CD l 802. 4 token bus l 802. 5 token ring l Computer Network Lab. 4
2. 2 Ethernet and IEEE 802 Encapsulation (Cont’d) n IP datagram encapsulation define l Ethernet에 대한 RFC 894 l IEEE 802 network에 대한 RFC 1042 Computer Network Lab. 5
2. 2 Ethernet and IEEE 802 Encapsulation (Cont’d) n Host Requirement RFC l RFC 894(Ethernet) encapsulation을 사용하는 packet을 송수신할 수 있어야 한다 l RFC 894 packet과 혼합된 RFC 1042(IEEE 802) packet을 수신할 수 있어야 한다 l RFC 1042 encapsulation을 사용한 packet을 송신할 수도 있어야 한 다. 호스트가 두 타입의 packet을 송신할 수 있다면 송신한 packet 의 타입을 구성할 수 있어야 하고 구성 옵션은 RFC 894를 따라야 한다. l RFC 894 encapsulation이 가장 일반적으로 사용되고 있다. Computer Network Lab. 6
IEEE 802. 2/802. 3 캡슐화(RFC 1042)와 이더넷 캡슐화(RFC 894) IEEE 802. 2/802. 3 Encapsulation(RFC 1042) 802. 3 MAC 802. 2 LLC dest addr src addr leng 6 6 2 DSAP AA SSAP AA 1 1 802. 2 SNAP cntl 03 1 org code 00 type 3 2 type 0800 2 type 0806 2 type 0835 Ethernet Encapsulation (RFC 894) dest addr src addr 6 6 2 data CRC 38 -1492 4 IP datagram 38 -1492 ARP request/reply 28 RARP request/reply 28 PAD 10 46 -1500 bytes data type 2 46 -1500 type 0800 46 -1500 ARP request/reply 2 type 0835 4 IP datagram 2 type 0806 CRC 28 RARP request/reply 2 Computer Network Lab. 28 PAD 18 7
2. 4 SLIP : Serial Line IP n RFC 1055 n RS-232 serial port를 통해 Internet에 접속할 때 사용 n framing rule l IP datagram의 앞뒤에 special character END(0 xc 0)를 추가. 이는 어떤 line noise가 데이터로 해석되는 것을 막기 위함. l IP datagram 내에 0 xc 0는 0 xdb, 0 xdc로 변환하여 전송(0 xdb는 SLIP ESC character라 함) l IP datagram 내에 0 xdb는 0 xdb, 0 xdd로 변환하여 전송 Computer Network Lab. 9
2. 4 SLIP : Serial Line IP(Cont’d) n SLIP의 단점 l 각 end system은 서로의 IP address를 알고 있어야 한다. 즉, IP address를 알려 줄 방법이 없다. l Ethernet의 type field와 유사한 type field가 없다. 어떤 serial line 이 SLIP을 사용하고 있다면 동시에 다른 protocol을 사용할 수 없다. l SLIP은 Ethernet의 CRC와 같은 아무런 checksum을 하지 않는 다. SLIP을 통해 전송하고 있는 datagram은 잡음으로 인해 잘 못될 수 있고, 이는 상위 계층이 검출해야 한다. 따라서 IP의 header checksum, TCP의 header와 data checksum, UDP의 header 와 data(optional) checksum이 이를 담당한다. Computer Network Lab. 10
2. 5 Compressed SLIP n RFC 1144 [Jacobson 1990 a] n SLIP line은 저속(19200 bits/sec or below)이며 interactive traffic(TCP 를 사용하는 Telnet or Rlogin)에 빈번히 사용 : 1 byte를 전송하기 위 해 40 bytes(TCP 20, IP 20)의 overhead가 있음. n 이러한 성능상의 결점을 해결하기 위해 CSLIP을 고안 n 일반적으로 어떤 접속에 사용되는 두 header의 일부 field는 바뀌지 않는다는 성질을 이용하여 40 bytes의 header를 3 or 5 bytes로 줄여 서 전송. 따라서 이러한 작은 header는 interactive response time을 많 이 개선한다. Computer Network Lab. 11
2. 6 PPP : Point-to-Point Protocol n PPP는 SLIP의 모든 단점을 수정하며 다음과 같은 3개의 요소로 구성된다. l Serial link상의 IP datagram을 encapsulation하는 방법. PPP는 8 bits data, no parity를 사용하는 asynchronous link와 bit-oriented synchronous link를 모두 지원한다. l Data-link connection을 설정, 구성, 테스트 하기 위한 LCP(Link Control Protocols). 따라서 각 end system은 다양한 option을 협상할 수 있다. l NCP (Network Control Protocols)로 다른 네트워크 계층의 프로 토콜 지정. 현재 IP, OSI network layer, DECnet, Apple. Talk를 위한 RFC 가 존재. Computer Network Lab. 12
2. 6 PPP : Point-to-Point Protocol(Cont’d) n RFC 1331 : encapsulation method and link control protocol n RFC 1332 : network control protocol for IP Computer Network Lab. 13
2. 6 PPP : Point-to-Point Protocol(Cont’d) n SLIP과 마찬가지로 constant(flag, address)를 생략하고 protocol을 1 byte로 줄여 사용할 수 있다. 그러나 이 경우에도 3 byte(CRC 2, protocol 1)의 overhead가 생김. 또한 CSLIP과 마찬가지로 IP, TCP header의 크기를 줄여서 사용할 수 있다. n SLIP보다 PPP가 주는 장점 n l 한 serial line에 multiple protocol을 제공 l 각 frame에 cyclic redundancy check l IP network control protocol을 사용하여 IP address의 동적 협상 가능 l CSLIP과 유사한 TCP, IP header compression l link control protocol을 통한 다수의 data-link option 협상 결과적으로 이러한 이점은 3 byte의 overhead, link를 설정할 때 협상을 하 기 위한 몇 개의 frame, 훨씬 더 복잡한 구현에 대한 대가이다. Computer Network Lab. 15
2. 7 Loopback Interface n 같은 호스트내의 client와 server가 TCP/IP를 이용하여 통신하기 위 해 대부분 loopback interface를 제공 n 이름은 localhost, IP address는 127. 0. 0. 1 Computer Network Lab. 16
2. 7 Loopback Interface (cont’d) n Key points l loopback address로 보내진 모든 것은 IP input에 나타난다. l broadcast or multicast address로 보내진 datagram은 loopback interface로 복사되고 Ethernet으로 보내진다. 이는 broadcasting과 multicasting의 정의가 sending host를 포함하기 때문이다. l 자신의 IP address 중 하나로 보내진 어떤 것도 loopback interface로 보 내진다. n 모든 transport와 IP layer가 loopback data를 처리하는 것이 비효율 적으로 보일지도 모르겠지만 이는 network layer에게 loopback interface가 단지 다른 link layer로 보이기 때문에 설계를 단순화 시 킨다. n 또한 자신의 IP address 중 하나로 송신한 IP datagram은 네트워크 상에 절대로 나타날 수가 없다는 것을 암시한다. Computer Network Lab. 17
2. 8 MTU frame의 크기를 제한하는 link layer의 특성을 MTU (maximum transmission unit)라 한다. n IP datagram이 link layer의 MTU보다 크면 fragmentation이 일어나며 각 fragment는 MTU보다 작아야 한다. n 이 중 Point-to-Point에 대한 MTU는 network media의 물리적 특성에 따른 것이 아니라 대화형 응용의 적당한 response를 제공하기 위한 논리적인 제한. n Network Hyperchannel 16 Mbits/sec token ring(IBM) 4 Mbits/sec token ring(IEEE 802. 5) FDDI Ethernet IEEE 802. 3/802. 2 X. 25 Point-to-Point(low delay) Computer Network Lab. MTU(bytes) 65535 17914 4464 4352 1500 1492 576 296 18
2. 10 Serial Line Throughput Calculations n line speed 9600 bps, data 8 bits, start 1 bit, stop 1 bit인 경우 960 byte/sec이며 1024 byte packet 전송에 1066 ms가 소요된다. l 이러한 가정하에 SLIP link 상에서 1024 byte frame을 나르는 application과 interactive application이 사용되는 경우 interactive packet을 보내는데 평균 1066/2 = 533 ms를 기다려야 한다. l Interactive traffic은 100 -200 ms를 넘어서면 좋지 않은 것으로 판 단한다[Jacobson 1990 a](인간 공학 연구) ä MTU가 256인 경우 266 ms(256/960) 소요되며 평균 wait는 133 ms이다. 133이 완벽한 throughput은 아니나 64나 128보 다는 utilization이 좋다. Computer Network Lab. 20
2. 10 Serial Line Throughput Calculations(Cont’d) n Point-to-Point link에서 MTU를 296으로 정한 이유 l 256+40(TCP + IP header)=296이다. 그러나 CSLIP을 사 용하는 경우 40을 5로 줄이기 때문에 261 byte frame이 되고 261 중에서 98. 1%(256/261)는 data, 1. 9%(5/261)가 header이므로 좋은 utilization 이라고 할 수 있다. Computer Network Lab. 21
- Slides: 22