1. Introduction and Overview 최양희 서울대학교 컴퓨터공학부 MMlab 1 Internet Timeline • • • • • 3000 BC : Abacus 1642 : Pascal : numerical wheel calculator 1822 : Babbage : difference engine 1945 : Eckert : ENIAC 1969 : first ARPANET connection – UCLA, SRI, UCSB, Utah • 1972 : CYCLADES (France) • 1974 : V. Cerf : TCP 2012 Yanghee Choi MMlab 2 Internet Timeline • • • • 1977 : e-mail over Telenet 1980 : IBM : Bitnet 1981 : IBM : PC 1982 : Time : Computer • • • • • • • • 1984 : Domain Name System 1988 : Morris : Worm, and CERT 1989 : number of hosts exceeds 100,000 1991 : Al Gore : High Performance Computing Act 1991 : Tim Berners-Lee : WWW 1992 : Internet Society 1993 : Andreessen : Mosaic 1994 : Yahoo ! 2012 Yanghee Choi MMlab 3 인터넷 등장 배경 • 미 국방성의 요구: 많은 통신 시설이 파괴되더라도 계속 살아 남는 통신 네트워크를 고안할 것. 다양한 통신기술을 활용할 수 있을 것. • 과학기술계의 결론 – 패킷 (packet) 방식의 통신네트워크 – 연결을 만들지 않음 • 전체의 70% 이상이 파괴되어도 계속 생존하여 통신기능 유지함 2012 Yanghee Choi MMlab 4 패킷이란 ? • Packet Circuit 대응개념 • 보내야 할 정보를 취급하기 쉬운 작은 단위 (패킷이라 부름)로 쪼갬 – 예 : 소설을 엽서로 옮겨 적어 보낸다. – 예 : 많은 화물은 여러 대의 트럭에 나누어 실어 보낸다 • 통신망은 패킷을 일일이 따로 구분하여 처리 – 엽서마다 보내는 이, 받는 이의 주소를 반복하여 적고 우체국은 엽서마다 이를 확인한다 • 받는 쪽에서 정보를 모아서 원래대로 재생 • 왜 패킷인가 ? – 전송효율/ 네트워크 구축비용 절감 : 화물회사마다 전용차선이 있다면 낭비 – 다양한 트래픽을 쉽게 지원 : 전보, 편지, 음성, 영상, 컴퓨터 데이타 2012 Yanghee Choi MMlab 5 패킷 통신의 예 A A • A B 2012 Yanghee Choi B • A B B 회선 공유 MMlab •• A A A B B 6 Internet Configuration subnet Packet Host subnet subnet Host subnet Router Packet subnet 2012 Yanghee Choi MMlab 7 Internet structure: network of networks • roughly hierarchical • national/international backbone providers (NBPs) local ISP regional ISP NBP B – e.g. BBN/GTE, Sprint, AT&T, IBM, UUNet – interconnect (peer) with each NAP other privately, or at public Network Access Point (NAPs) • regional ISPs NAP NBP A regional ISP local ISP – connect into NBPs • local ISP, company – connect into regional ISPs 2012 Yanghee Choi MMlab 8 Protocols • Protocol: rules for communication – Message formats, timing – Describes how a computer responds when a message arrives – Specifies how a computer handles errors or other abnormal conditions • All network services are described by protocols 2012 Yanghee Choi MMlab 9 What’s a protocol? a human protocol and a computer network protocol: Hi TCP connection req. Hi TCP connection reply. Got the time? Get http://gaia.cs.umass.edu/index.htm 2:00 <file> time 2012 Yanghee Choi MMlab 10 Key Elements of a Protocol • Syntax – Data formats – Signal levels • Semantics – Control information – Error handling • Timing – Speed matching – Sequencing 2012 Yanghee Choi MMlab 11 A Three Layer Model • Network Access Layer • Transport Layer • Application Layer 2012 Yanghee Choi MMlab 12 Simplified File Transfer Architecture 2012 Yanghee Choi MMlab 13 Network Access Layer • Exchange of data between the computer and the network • Sending computer provides address of destination • May invoke levels of service • Dependent on type of network used (LAN, packet switched etc.) 2012 Yanghee Choi MMlab 14 Transport Layer • Reliable data exchange • Independent of network being used • Independent of application 2012 Yanghee Choi MMlab 15 Application Layer • Support for different user applications • e.g. e-mail, file transfer 2012 Yanghee Choi MMlab 16 OSI • Open Systems Interconnection • Developed by the International Organization for Standardization (ISO) • Seven layers • A theoretical system delivered too late! • TCP/IP is the de facto standard 2012 Yanghee Choi • A layer model • Each layer performs a subset of the required communication functions • Each layer relies on the next lower layer to perform more primitive functions • Each layer provides services to the next higher layer • Changes in one layer should not require changes in other layers MMlab 17 OSI Layers 2012 Yanghee Choi MMlab 18 Internet protocol stack • application: supporting network applications – ftp, smtp, http • transport: host-host data transfer – tcp, udp • network: routing of packets from source to destination – ip, routing protocols • link: data transfer between neighboring network elements application transport network link physical – ppp, Ethernet • physical: bits on the wire 2012 Yanghee Choi MMlab 19 OSI v TCP/IP 2012 Yanghee Choi MMlab 20 Some Protocols in TCP/IP Suite 2012 Yanghee Choi MMlab 21 Access Technologies • • • • • • • • • • Dialup via modem DSL: digital subscriber line : ADSL, VDSL Cable Modem LAN (wired, wireless : IEEE 802), WiBro (mobile WiMax) 802.16e Wireless Mesh Bluetooth Satellite Cellular (2, 2.5, 3, 4G) FTTH Sensor network 2012 Yanghee Choi MMlab 22 Data Link Layer • two physically connected devices: – host-router, router-router, host-host • unit of data: frame M Ht M Hn Ht Hl Hn Ht M M 2012 Yanghee Choi application transport network link physical data link protocol phys. link MMlab network link physical Hl Hn Ht frame 23 M Link Layer Services • Framing, link access: – encapsulate datagram into frame, adding header, trailer – implement channel access if shared medium, – ‘physical addresses’ used in frame headers to identify source, destination • different from IP address • Reliable delivery between two physically connected devices: 2012 Yanghee Choi MMlab 24 Link Layer Services (more) • Flow Control: – pacing between sender and receivers • Error Detection: – errors caused by signal attenuation, noise. – receiver detects presence of errors: • signals sender for retransmission or drops frame • Error Correction: – receiver identifies and corrects bit error(s) without resorting to retransmission 2012 Yanghee Choi MMlab 25 Stop and Wait • The source transmits one frame • The destination receives one frame and replies with an acknowledgement • The source waits for ACK before sending the next frame • The destination can stop the flow by not sending ACK 2012 Yanghee Choi MMlab 26 Sliding Windows Flow Control • Allow multiple frames to be in transit • Receiver has buffer (size = W frames) • Transmitter can send up to W frames without ACK • Each frame is numbered • ACK includes the number of next frame expected • Sequence number 2012 Yanghee Choi MMlab 27 Error Control • • • • Detection and correction of errors Lost frames Damaged frames Automatic repeat request – – – – Error detection Positive acknowledgment Retransmission after timeout Negative acknowledgement and retransmission 2012 Yanghee Choi MMlab 28 Automatic Repeat Request (ARQ) • Stop and wait • Go back N • Selective reject (selective retransmission) 2012 Yanghee Choi MMlab 29 Stop and Wait Diagram 2012 Yanghee Choi MMlab 30 Go Back N • Based on sliding window • If no error, ACK as usual with the number of the next frame expected • Use window to control the number of outstanding frames • If error, reply with rejection – Discard the bad frame and all future frames until the error frame is received correctly – Transmitter must go back and retransmit the bad frame and all subsequent frames 2012 Yanghee Choi MMlab 31 Go Back N : Diagram 2012 Yanghee Choi MMlab 32 Ethernet : CSMA/CD • Carriers Sense Multiple Access with Collision Detection • IEEE 802.3 – Random Access • Stations access medium randomly – Contention • Stations contend for time on medium 2012 Yanghee Choi 1. If medium idle, transmit, otherwise, step 2 2. If busy, listen for idle, then transmit 3. If collision detected, jam then cease transmission 4. After jam, wait random time then start from step 1 MMlab 33 Hubs • Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces • Hubs can be arranged in a hierarchy (or multi-tier design), with backbone hub at its top 2012 Yanghee Choi MMlab 34 IEEE 802.11 Wireless LAN • IEEE 802.11 standard: – MAC protocol – unlicensed frequency spectrum: 900Mhz, 2.4Ghz • Basic Service Set (BSS) – wireless hosts – access point (AP) 2012 Yanghee Choi MMlab 35