• 3000 BC : Abacus • 1642 : Pascal : numerical wheel calculator

advertisement
•
•
•
•
•
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
•
•
•
•
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 !
2005 Yanghee Choi
MMlab
1
2005 Yanghee Choi
MMlab
2
3
2005 Yanghee Choi
MMlab
4
인터넷 등장 배경
• 미 국방성의 요구: 많은 통신 시설이 파괴되더라도
계속 살아 남는 통신 네트워크를 고안할 것.
다양한 통신기술을 활용할 수 있을 것.
• 과학기술계의 결론
subnet
subnet
5
2005 Yanghee Choi
MMlab
6
a human protocol and a computer network protocol:
Hi
– Message formats, timing
– Describes how a computer responds when a
message arrives
– Specifies how a computer handles errors or
other abnormal conditions
TCP connection
req.
Hi
TCP connection
reply.
Got the
time?
Get http://gaia.cs.umass.edu/index.htm
2:00
<file>
time
• All network services are described by
protocols
MMlab
Router
Packet
• Protocol: rules for communication
2005 Yanghee Choi
Host
subnet
Host
• 전체의 70% 이상이 파괴되어도 계속 생존하여
통신기능 유지함
MMlab
Packet
subnet
– 패킷 (packet) 방식의 통신네트워크
– 연결을 만들지 않음
2005 Yanghee Choi
subnet
7
2005 Yanghee Choi
MMlab
8
• Syntax
End-end resources
reserved for “call”
– Data formats
– Signal levels
• link bandwidth, switch
capacity
• dedicated resources: no
sharing
• circuit-like (guaranteed)
performance
• call setup required
• Semantics
– Control information
– Error handling
• Timing
– Speed matching
– Sequencing
2005 Yanghee Choi
MMlab
9
2005 Yanghee Choi
MMlab
10
패킷이란
each end-end data stream
divided into packets
• user A, B packets share
network resources
• each packet uses full link
bandwidth
• resources used as needed,
2005 Yanghee Choi
MMlab
resource contention:
• aggregate resource
demand can exceed
amount available
• congestion: packets
queue, wait for link use
• store and forward:
packets move one hop at
a time
– transmit over link
– wait turn at next link
11
•
•
Packet ÅÆ Circuit 대응개념
보내야 할 정보를 취급하기 쉬운 작은 단위 (패킷이라 부름)로 쪼갬
– 예 : 소설을 엽서로 옮겨 적어 보낸다.
– 예 : 많은 화물은 여러 대의 트럭에 나누어 실어 보낸다
•
통신망은 패킷을 일일이 따로 구분하여 처리
– 엽서마다 보내는 이, 받는 이의 주소를 반복하여 적고 우체국은 엽서마다
이를 확인한다
•
•
받는 쪽에서 정보를 모아서 원래대로 재생
왜 패킷인가 ?
– 전송효율/ 네트워크 구축비용 절감 : 화물회사마다 전용차선이 있다면 낭비
– 다양한 트래픽을 쉽게 지원 : 전보, 편지, 음성, 영상, 컴퓨터 데이타
2005 Yanghee Choi
MMlab
12
패킷 통신의 예
10 Mbs
Ethernet
A
A
A
•
A
B
B
•
A
B
B
••
회선 공유
A
A
B
A
B
B
1.5 Mbs
queue of packets
waiting for output
link
45 Mbs
D
2005 Yanghee Choi
MMlab
C
statistical multiplexing
E
13
2005 Yanghee Choi
MMlab
14
15
2005 Yanghee Choi
MMlab
16
• Task of communication broken up into
modules
• For example file transfer could use three
modules
– File transfer application
– Communication service module
– Network access module
2005 Yanghee Choi
MMlab
• Network Access Layer
• Transport Layer
• Application Layer
2005 Yanghee Choi
MMlab
• 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.)
17
• Reliable data exchange
• Independent of network being used
• Independent of application
2005 Yanghee Choi
MMlab
2005 Yanghee Choi
MMlab
18
• Support for different user applications
• e.g. e-mail, file transfer
19
2005 Yanghee Choi
MMlab
20
•
•
•
•
Required for devices to communicate
Vendors have more marketable products
Customers can insist on standards based equipment
Two standards:
– OSI Reference model
• Never lived up to early promises
– TCP/IP protocol suite
• Most widely used
• Also: IBM Systems Network Architecture (SNA)
2005 Yanghee Choi
MMlab
21
• 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
2005 Yanghee Choi
MMlab
2005 Yanghee Choi
MMlab
22
• 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
23
2005 Yanghee Choi
MMlab
24
2005 Yanghee Choi
MMlab
• application: supporting network
applications
– ftp, smtp, http
• transport: host-host data transfer
– tcp, udp
• network: routing of datagrams from
source to destination
– ip, routing protocols
• link: data transfer between
neighboring network elements
25
2005 Yanghee Choi
MMlab
26
27
2005 Yanghee Choi
MMlab
28
application
transport
network
link
physical
– ppp, ethernet
• physical: bits “on the wire”
2005 Yanghee Choi
MMlab
2005 Yanghee Choi
MMlab
29
2005 Yanghee Choi
MMlab
30
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
local
ISP
regional ISP
NBP B
NAP
NAP
NBP A
– Guided medium
• e.g. twisted pair, optical fiber
– Unguided medium
• e.g. air, water, vacuum
regional ISP
– connect into NBPs
• Transmitter
• Receiver
• Medium
local
ISP
• local ISP, company
– connect into regional ISPs
2005 Yanghee Choi
MMlab
31
2005 Yanghee Choi
MMlab
32
• Direct link
• Simplex
– No intermediate devices
– One direction
• e.g. Television
• Point-to-point
• Half duplex
– Direct link
– Only 2 devices share link
– Either direction, but only one way at a time
• e.g. police radio
• Multi-point
• Full duplex
– More than two devices share the link
– Both directions at the same time
• e.g. telephone
2005 Yanghee Choi
MMlab
33
• Time domain concepts
2005 Yanghee Choi
MMlab
34
• Data rate
– Analog signal
– In bits per second
– Rate at which data can be communicated
• Various in a smooth way over time
– Digital signal
• Bandwidth
• Maintains a constant level then changes to another constant
level
– In cycles per second of Hertz
– Constrained by transmitter and medium
– Periodic signal
• Pattern repeated over time
– Aperiodic signal
• Pattern not repeated over time
2005 Yanghee Choi
MMlab
35
2005 Yanghee Choi
MMlab
36
2005 Yanghee Choi
MMlab
37
•
•
•
•
•
•
• Twisted Pair
• Coaxial cable
• Optical fiber
2005 Yanghee Choi
2005 Yanghee Choi
MMlab
39
MMlab
38
Dialup via modem
ADSL: asymmetric digital subscriber line
VDSL
Cable Modem
LAN
Wireless LAN etc.
2005 Yanghee Choi
MMlab
40
Physical Media: coax, fiber
Coaxial cable:
• physical link:
transmitted data bit
propagates across link
• guided media:
Twisted Pair (TP)
• two insulated copper
wires
– Category 3: traditional
phone wires, 10 Mbps
Ethernet
– Category 5 TP: 100Mbps
Ethernet
– signals propagate in solid
media: copper, fiber
• unguided media:
– signals propagate freely
e.g., radio
2005 Yanghee Choi
MMlab
41
Fiber optic cable:
• wire (signal carrier)
within a wire (shield)
• glass fiber carrying light
pulses
– baseband: single channel on • high-speed operation:
cable
– broadband: multiple channel
on cable
• bidirectional
• common use in 10Mbs
Ethernet
2005 Yanghee Choi
– 100Mbps Ethernet
– high-speed point-to-point
transmission (e.g., 5 Gps)
• low error rate
MMlab
42
Physical media: radio
Radio link types:
• signal carried in
electromagnetic
spectrum
• no physical “wire”
• bidirectional
• propagation environment
effects:
• microwave
– e.g. up to 45 Mbps channels
• LAN (e.g., waveLAN)
– 2Mbps, 11Mbps
• wide-area (e.g., cellular)
– Asynchronous
– Synchronous
– e.g. CDPD, 10’s Kbps
• satellite
– up to 50Mbps channel (or
multiple smaller channels)
– 270 Msec end-end delay
– geosynchronous versus LEOS
– reflection
– obstruction by objects
– interference
2005 Yanghee Choi
• Timing problems require a mechanism to
synchronize the transmitter and receiver
• Two solutions
MMlab
43
2005 Yanghee Choi
MMlab
44
• Data transmitted on character at a time
– 5 to 8 bits
• Timing only needs maintaining within each
character
• Resynchronize with each character
2005 Yanghee Choi
MMlab
45
2005 Yanghee Choi
MMlab
46
47
2005 Yanghee Choi
MMlab
48
• Need to indicate start and end of block
• Use preamble and postamble
– e.g. series of SYN (hex 16) characters
– e.g. block of 11111111 patterns ending in 11111110
• More efficient (lower overhead) than async
2005 Yanghee Choi
MMlab
최양희
서울대학교 컴퓨터공학부
MMlab
49
2005 Yanghee Choi
– e.g., PCMCIA card, Ethernet card
– typically includes: RAM, DSP chips, host bus interface,
and link interface
– host-router, router-router, host-host
• unit of data: frame
Ht
M
Hn Ht
Hl Hn Ht
M
M
2005 Yanghee Choi
application
transport
network
link
physical
M
data link
protocol
phys. link
adapter card
MMlab
50
• implemented in “adapter”
• two physically connected devices:
M
MMlab
network
link
physical
Hl Hn Ht
frame
51
M
Ht
M
Hn Ht
Hl Hn Ht
M
M
application
transport
network
link
physical
2005 Yanghee Choi
data link
protocol
phys. link
adapter
card
MMlab
network
link
physical
Hl Hn Ht
frame
52
M
• Framing, link access:
• Flow Control:
– pacing between sender and receivers
– encapsulate datagram into frame, adding header, trailer
– implement channel access if shared medium,
– ‘physical addresses’ used in frame headers to identify source, dest
• different from IP address!
• Error Detection:
– errors caused by signal attenuation, noise.
– receiver detects presence of errors:
• Reliable delivery between two physically connected
devices:
• signals sender for retransmission or drops frame
• Error Correction:
– receiver identifies and corrects bit error(s) without
resorting to retransmission
– seldom used on low bit error link (fiber, some twisted pair)
– wireless links: high error rates
2005 Yanghee Choi
MMlab
53
• Ensuring the sending entity does not
overwhelm the receiving entity
• Transmission time
– Time taken to emit all bits into medium
• Propagation time
– Time for a bit to traverse the link
MMlab
MMlab
54
• Source transmits frame
• Destination receives frame and replies with
acknowledgement
• Source waits for ACK before sending next
frame
• Destination can stop flow by not send ACK
• Works well for a few large frames
– Preventing buffer overflow
2005 Yanghee Choi
2005 Yanghee Choi
55
2005 Yanghee Choi
MMlab
56
• Allow multiple frames to be in transit
• Receiver has buffer W long
• Transmitter can send up to W frames without
ACK
• Each frame is numbered
• ACK includes number of next frame expected
• Sequence number bounded by size of field (k)
– Frames are numbered modulo 2k
2005 Yanghee Choi
MMlab
57
2005 Yanghee Choi
MMlab
58
• Additional bits added by transmitter for error
detection code
• Parity
– Value of parity bit is such that character has even
(even parity) or odd (odd parity) number of ones
– Even number of bit errors goes undetected
2005 Yanghee Choi
MMlab
59
2005 Yanghee Choi
MMlab
60
Single Bit Parity:
Two Dimensional Bit Parity:
Detect and correct single bit errors
Detect single bit errors
• For a block of k bits transmitter generates n
bit sequence
• Transmit k+n bits which is exactly divisible by
some number
• Receive divides frame by that number
– If no remainder, assume no error
0
2005 Yanghee Choi
0
MMlab
61
2005 Yanghee Choi
MMlab
62
Checksumming: Cyclic Redundancy
Check
• view data bits, D, as a binary number
• choose r+1 bit pattern (generator), G
• goal: choose r CRC bits, R, such that
•
•
•
•
– <D,R> exactly divisible by G (modulo 2)
– receiver knows G, divides <D,R> by G. If non-zero remainder: error
detected!
– can detect all burst errors less than r+1 bits
• widely used in practice (ATM, HDCL)
2005 Yanghee Choi
MMlab
Detection and correction of errors
Lost frames
Damaged frames
Automatic repeat request
–
–
–
–
63
Error detection
Positive acknowledgment
Retransmission after timeout
Negative acknowledgement and retransmission
2005 Yanghee Choi
MMlab
64
• Stop and wait
• Go back N
• Selective reject (selective retransmission)
2005 Yanghee Choi
MMlab
65
2005 Yanghee Choi
MMlab
66
2005 Yanghee Choi
MMlab
68
• Based on sliding window
• If no error, ACK as usual with next frame
expected
• Use window to control number of outstanding
frames
• If error, reply with rejection
– Discard that frame and all future frames until error
frame received correctly
– Transmitter must go back and retransmit that frame
and all subsequent frames
2005 Yanghee Choi
MMlab
67
• Also called selective retransmission
• Only rejected frames are retransmitted
• Subsequent frames are accepted by the
receiver and buffered
• Minimizes retransmission
• Receiver must maintain large enough buffer
2005 Yanghee Choi
MMlab
69
2005 Yanghee Choi
MMlab
70
• HDLC
• ISO 33009, ISO 4335
최양희
서울대학교 컴퓨터공학부
2005 Yanghee Choi
MMlab
71
MMlab
72
Frame
Transmission
on Bus LAN
2005 Yanghee Choi
MMlab
73
2005 Yanghee Choi
•
•
•
•
2005 Yanghee Choi
MMlab
75
MMlab
74
Encoding/decoding
Preamble generation/removal
Bit transmission/reception
Transmission medium and topology
2005 Yanghee Choi
MMlab
76
• Interface to higher levels
• Flow and error control
• Assembly of data into frame with address and
error detection fields
• Disassembly of frame
– Address recognition
– Error detection
• Govern access to transmission medium
– Not found in traditional layer 2 data link control
• For the same LLC, several MAC options may
be available
2005 Yanghee Choi
MMlab
77
2005 Yanghee Choi
MMlab
78
• Where
– Central
•
•
•
•
•
Greater control
Simple access logic at station
Avoids problems of co-ordination
Single point of failure
Potential bottleneck
– Distributed
• How
– Synchronous
• Specific capacity dedicated to connection
– Asynchronous
• In response to demand
2005 Yanghee Choi
MMlab
79
2005 Yanghee Choi
MMlab
80
• Round robin
– Good if many stations have data to transmit over extended period
• Reservation
– Good for stream traffic
“dominant” LAN technology:
• cheap $20 for 100Mbs!
• first widely used LAN technology
• Simpler, cheaper than token LANs and ATM
• Kept up with speed race: 10, 100M, 1, 10 Gbps
• Contention
–
–
–
–
–
–
Good for bursty traffic
All stations contend for time
Distributed
Simple to implement
Efficient under moderate load
Tend to collapse under heavy load
2005 Yanghee Choi
MMlab
Metcalfe’s Etheret
sketch
81
2005 Yanghee Choi
• Carriers Sense Multiple Access with Collision
Detection
• Xerox - Ethernet
• IEEE 802.3
• Random Access
2005 Yanghee Choi
2005 Yanghee Choi
MMlab
83
MMlab
82
– Stations access medium randomly
• Contention
– Stations content for time on medium
MMlab
84
•
•
With CSMA, collision occupies medium for duration
of transmission
Stations listen whilst transmitting
1.
2.
3.
4.
If medium idle, transmit, otherwise, step 2
If busy, listen for idle, then transmit
If collision detected, jam then cease transmission
After jam, wait random time then start from step 1
2005 Yanghee Choi
MMlab
85
Preamble:
• 7 bytes with pattern 10101010 followed by one byte
with pattern 10101011
• used to synchronize receiver, sender clock rates
MMlab
MMlab
86
• Addresses: 6 bytes, frame is received by all adapters
on a LAN and dropped if address does not match
• Type: indicates the higher layer protocol, mostly IP
but others may be supported such as Novell IPX and
AppleTalk)
• CRC: checked at receiver, if error is detected, the
frame is simply dropped
Sending adapter encapsulates IP datagram (or other
network layer protocol packet) in Ethernet frame
2005 Yanghee Choi
2005 Yanghee Choi
87
2005 Yanghee Choi
MMlab
88
• 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
2005 Yanghee Choi
MMlab
• Each connected LAN referred to as LAN segment
• Hubs do not isolate collision domains: node may collide
with any node residing at any segment in LAN
• Hub Advantages:
– simple, inexpensive device
– Multi-tier provides graceful degradation: portions of the
LAN continue to operate if one hub malfunctions
– extends maximum distance between node pairs (100m per
Hub)
89
2005 Yanghee Choi
MMlab
90
91
2005 Yanghee Choi
MMlab
92
• Read all frames transmitted on one LAN and
accept those address to any station on the other
LAN
• Using MAC protocol for second LAN, retransmit
each frame
• Do the same the other way round
2005 Yanghee Choi
MMlab
• bridges learn which hosts can be reached through which
interfaces: maintain filtering tables
– when frame received, bridge “learns” location of sender:
incoming LAN segment
– records sender location in filtering table
• filtering table entry:
– (Node LAN Address, Bridge Interface, Time Stamp)
– stale entries in Filtering Table dropped (TTL can be 60
minutes)
• bridges filter packets
– same-LAN -segment frames not forwarded onto other
LAN segments
• forwarding:
– how to know which LAN segment on which to forward
frame?
– looks like a routing problem
2005 Yanghee Choi
MMlab
93
2005 Yanghee Choi
MMlab
94
Suppose C sends frame to D and D replies back with
frame to C
• D generates reply to C, sends
– bridge sees frame from D
– bridge notes that D is on interface 2
– bridge knows C on interface 1, so selectively forwards
frame out via interface 1
• C sends frame, bridge has no info about D, so floods
to both LANs
– bridge notes that C is on port 1
– frame ignored on upper LAN
– frame received by D
2005 Yanghee Choi
MMlab
95
2005 Yanghee Choi
MMlab
96
•
•
•
•
•
• for increased reliability, desirable to have redundant,
alternate paths from source to dest
• with multiple simultaneous paths, cycles result bridges may multiply and forward frame forever
• solution: organize bridges in a spanning tree by
disabling subset of interfaces
Bridge automatically develops routing table
Automatically update in response to changes
Frame forwarding
Address learning
Loop resolution
2005 Yanghee Choi
MMlab
Disabled
97
• layer 2 (frame) forwarding,
filtering using LAN addresses
• Switching: A-to-B and A’-to-B’
simultaneously, no collisions
• large number of interfaces
• often: individual hosts, starconnected into switch
– Ethernet, but no collisions!
2005 Yanghee Choi
MMlab
2005 Yanghee Choi
MMlab
98
• IEEE 802.11 standard:
– MAC protocol
– unlicensed frequency spectrum: 900Mhz, 2.4Ghz
• Basic Service Set (BSS)
– wireless hosts
– access point (AP)
99
2005 Yanghee Choi
MMlab
100
2005 Yanghee Choi
MMlab
101
2005 Yanghee Choi
MMlab
102
• 802.11a
–
–
–
–
5-GHz band
Uses orthogonal frequency division multiplexing (OFDM)
Not spread spectrum
Data rates 6, 9, 12, 18, 24, 36, 48, and 54 Mbps
• 802.11b
– Max 11Mbps
– Popular at Hotspots (Nespot)
2005 Yanghee Choi
MMlab
103
2005 Yanghee Choi
MMlab
104
• hidden terminals: A, C cannot hear each other
– obstacles, signal attenuation
– collisions at B
• goal: avoid collisions at B
• CSMA/CA: CSMA with Collision Avoidance
802.11 CSMA: sender
- if sense channel idle for DIFS sec.
then transmit entire frame (no collision
detection)
-if sense channel busy
then binary backoff
802.11 CSMA receiver:
if received OK
return ACK after SIFS
2005 Yanghee Choi
MMlab
105
• CSMA/CA: explicit channel
reservation
– sender: send short RTS:
request to send
– receiver: reply with short
CTS: clear to send
• CTS reserves channel for
sender, notifying (possibly
hidden) stations
• avoid hidden station
collisions
2005 Yanghee Choi
MMlab
2005 Yanghee Choi
MMlab
106
• adaptation layer: only at edge of ATM network
– data segmentation/reassembly
– roughly analogous to Internet transport layer
• ATM layer: “network” layer
– cell switching, routing
• physical layer
107
2005 Yanghee Choi
MMlab
108
• 5-byte ATM cell header
• 48-byte payload
– Why?: small payload -> short cell-creation delay for
digitized voice
• ATM Adaptation Layer (AAL): “adapts” upper layers (IP
or native ATM applications) to ATM layer below
• AAL present only in end systems, not in switches
• AAL layer segment (header/trailer fields, data)
fragmented across multiple ATM cells
– halfway between 32 and 64 (compromise!)
Cell header
– analogy: TCP segment in many IP packets
Cell format
2005 Yanghee Choi
MMlab
109
Different versions of AAL layers, depending on ATM service
class:
• AAL1: for CBR (Constant Bit Rate) services, e.g. circuit emulation
• AAL2: for VBR (Variable Bit Rate) services, e.g., MPEG video
• AAL5: for data (eg, IP datagrams)
User data
2005 Yanghee Choi
MMlab
110
• AAL5: low overhead AAL used to carry IP
datagrams
– 4 byte cyclic redundancy check
– PAD ensures payload multiple of 48bytes
– large AAL5 data unit to be fragmented into 48-byte
ATM cells
AAL PDU
ATM cell
2005 Yanghee Choi
MMlab
111
2005 Yanghee Choi
MMlab
112
• VC transport: cells carried on VC from source to dest
– call setup, teardown for each call before data can flow
– each packet carries VC identifier (not destination ID)
– every switch on source-dest path maintain “state” for each passing
connection
– link,switch resources (bandwidth, buffers) may be allocated to VC: to
get circuit-like perf.
• Permanent VCs (PVCs)
– long lasting connections
– typically: “permanent” route between to IP routers
• Switched VCs (SVC):
– dynamically set up on per-call basis
2005 Yanghee Choi
MMlab
113
Download