최 최 최 최최최최최 최최최최최최 MMlab 1 1. Introduction and Overview
Feb 23, 2016
MMlab 1
최 양 희서울대학교 컴퓨터공학부
1. Introduction and Overview
MMlab 22012 Yanghee Choi
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
MMlab 32012 Yanghee Choi
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 !
MMlab 42012 Yanghee Choi
인터넷 등장 배경
• 미 국방성의 요구 : 많은 통신 시설이 파괴되더라도 계속 살아 남는 통신 네트워크를 고안할 것 . 다양한 통신기술을 활용할 수 있을 것 .
• 과학기술계의 결론 – 패킷 (packet) 방식의 통신네트워크 – 연결을 만들지 않음
• 전체의 70% 이상이 파괴되어도 계속 생존하여 통신기능 유지함
MMlab 52012 Yanghee Choi
패킷이란 ?• Packet Circuit 대응개념• 보내야 할 정보를 취급하기 쉬운 작은 단위 ( 패킷이라 부름 ) 로 쪼갬
– 예 : 소설을 엽서로 옮겨 적어 보낸다 .– 예 : 많은 화물은 여러 대의 트럭에 나누어 실어 보낸다
• 통신망은 패킷을 일일이 따로 구분하여 처리– 엽서마다 보내는 이 , 받는 이의 주소를 반복하여 적고 우체국은 엽서마다
이를 확인한다• 받는 쪽에서 정보를 모아서 원래대로 재생• 왜 패킷인가 ?
– 전송효율 / 네트워크 구축비용 절감 : 화물회사마다 전용차선이 있다면 낭비
– 다양한 트래픽을 쉽게 지원 : 전보 , 편지 , 음성 , 영상 , 컴퓨터 데이타
MMlab 62012 Yanghee Choi
패킷 통신의 예
A A
BB
B BA A A• •
•
• 회선 공유
AA
B B
MMlab 72012 Yanghee Choi
Internet Configuration
subnet
subnet
subnet
subnet
subnet
Host
Host
Packet
Packet
Router
MMlab 82012 Yanghee Choi
Internet structure: network of networks
• roughly hierarchical• national/international
backbone providers (NBPs)– e.g. BBN/GTE, Sprint, AT&T,
IBM, UUNet– interconnect (peer) with each
other privately, or at public Network Access Point (NAPs)
• regional ISPs– connect into NBPs
• local ISP, company– connect into regional ISPs
NBP A
NBP BNAP NAP
regional ISP
regional ISP
localISP
localISP
MMlab 92012 Yanghee Choi
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
MMlab 102012 Yanghee Choi
What’s a protocol?a human protocol and a computer network protocol:
Hi
HiGot thetime?2:00
TCP connection req.TCP connectionreply.Get http://gaia.cs.umass.edu/index.htm
<file>time
MMlab 112012 Yanghee Choi
Key Elements of a Protocol
• Syntax– Data formats– Signal levels
• Semantics– Control information– Error handling
• Timing– Speed matching– Sequencing
MMlab 122012 Yanghee Choi
A Three Layer Model
• Network Access Layer• Transport Layer• Application Layer
MMlab 132012 Yanghee Choi
Simplified File Transfer Architecture
MMlab 142012 Yanghee Choi
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.)
MMlab 152012 Yanghee Choi
Transport Layer
• Reliable data exchange• Independent of network being used• Independent of application
MMlab 162012 Yanghee Choi
Application Layer
• Support for different user applications• e.g. e-mail, file transfer
MMlab 172012 Yanghee Choi
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
• 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 182012 Yanghee Choi
OSI Layers
MMlab 192012 Yanghee Choi
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– ppp, Ethernet
• physical: bits on the wire
application
transport
network
link
physical
MMlab 202012 Yanghee Choi
OSI v TCP/IP
MMlab 212012 Yanghee Choi
Some Protocols in TCP/IP Suite
MMlab 222012 Yanghee Choi
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
MMlab 232012 Yanghee Choi
Data Link Layer• two physically connected devices:
– host-router, router-router, host-host• unit of data: frame
applicationtransportnetwork
linkphysical
networklink
physical
MMMM
HtHtHnHtHnHl MHtHnHl
framephys. link
data linkprotocol
MMlab 242012 Yanghee Choi
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:
MMlab 252012 Yanghee Choi
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
MMlab 262012 Yanghee Choi
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
MMlab 272012 Yanghee Choi
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
MMlab 282012 Yanghee Choi
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
MMlab 292012 Yanghee Choi
Automatic Repeat Request (ARQ)
• Stop and wait• Go back N• Selective reject (selective retransmission)
MMlab 302012 Yanghee Choi
Stop and Wait -Diagram
MMlab 312012 Yanghee Choi
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
MMlab 322012 Yanghee Choi
Go Back N : Diagram
MMlab 332012 Yanghee Choi
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
1. If medium idle, transmit, otherwise, step 22. If busy, listen for idle, then transmit3. If collision detected, jam then cease transmission4. After jam, wait random time then start from step 1
MMlab 342012 Yanghee Choi
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
MMlab 352012 Yanghee Choi
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)