ee/cs 450 spring 001 cpeg 419 introduction to networks znew homework is on the web. it is due in two...
Post on 20-Dec-2015
222 views
TRANSCRIPT
EE/CS 450 Spring 00 1
CPEG 419 Introduction to Networks
New Homework is on the web. It is due in two weeks. No class on Thursday.Most likely, I will not miss any more classes in October.
University of Delaware CPEG 419 2
CRC Example – I was right!
Frame M 1010001101 = x9+x7+x3+x2+x0.
Pattern G 110101.Dividing (frame*25) by pattern results
in 01110.Thus [M|V] = 1010001101 | 01110.Receiver can detect errors unless
received message Tr is divisible by G.
University of Delaware CPEG 419 3
Fragmentation
A packet is broken up into smaller pieces. Each fragment is sent as a frame. Link layer has an upper bound on the size of frame. E.g.,
ethernet frames must be smaller than 1500 bytes. ATM must be 53 bytes, cable modem use 204 bytes.
P1 = (1-Pb)^F. So the smaller the F, the smaller P1. But the smaller the F, the lower the throughput. The
frame has overhead, e.g., the destination address, source address, etc. So a frame of 64 byte Ethernet frame will only contain 38 bytes of data.
University of Delaware CPEG 419 4
Example Data Link Layer Protocol
High-Level Data Link Control (HDLC) Widely-used (ISO standard). Single frame format. Synchronous transmission.
University of Delaware CPEG 419 5
HDLC: Frame Format
Flag: frame delimiters (01111110). Address field for multipoint links. 16-bit or 32-bit CRC. Refer to book (pages 214-221) for more
details.
8bits
8ext.
8 or16
variable 16 or32
8
flag address control data FCS flag
University of Delaware CPEG 419 6
Other DLL Protocols 2
LLC: Logical Link Control 802.2 Part of the 802 protocol family for LANs. Link control functions divided between
the MAC layer and the LLC layer. LLC layer operates on top of MAC layer.
Dst.MACaddr
Src.MACaddr
FCSDst.LLCaddr
Src.LLCaddr
LLCctl. DataMAC
control
University of Delaware CPEG 419 7
Other DLL Protocols 3
SLIP: Serial Line IP Dial-up protocol. No error control. Not standardized.
PPP: Point-to-Point Protocol Internet standard for dial-up
connections. Provides framing similar to HDLC.
University of Delaware CPEG 419 8
Multiplexing
Sharing a link/channel among multiple source-destination pairs.
Example: high-capacity long-distance trunks (fiber, microwave links) carry multiple connections at the same time.
MU
X
...
DE
MU
X ...
University of Delaware CPEG 419 9
Multiplexing Techniques
3 basic types: Frequency-Division Multiplexing (FDM). Time-Division Multiplexing (TDM). Statistical Time-Division Multiplexing
(STDM).
University of Delaware CPEG 419 10
FDM 1
High bandwidth medium when compared to signals to be transmitted.
Widely used (e.g., TV, radio).Various signals carried simultaneously
where each one modulated onto different carrier frequency, or channel.
Channels separated by guard bands (unused) to prevent interference.
University of Delaware CPEG 419 12
TDM 1
TDM or synchronous TDM.High data rate medium when
compared to signals to be transmitted.
Time
Frequency
12
N
University of Delaware CPEG 419 13
TDM 2
Time divided into time slots.Frame consists of cycle of time slots.In each frame, 1 or more slots
assigned to a data source.
1 2 N... 1 2 ... N
frame Time
U1 U2 ... UN
University of Delaware CPEG 419 14
TDM 3
No control info at this level.Flow and error control?
To be provided on a per-channel basis. Use DLL protocol such as HDLC.
Examples: SONET (Synchronous Optical Network) for optical fiber.
+’s: simple, fair.-’s: inefficient.
University of Delaware CPEG 419 15
Statistical TDM 1Or asynchronous TDM.Dynamically allocates time slots on
demand.N input lines in statistical multiplexer, but
only k slots on TDM frame, where k < n.Multiplexer scans input lines collecting
data until frame is filled.Demultiplexer receives frame and
distributes data accordingly.
University of Delaware CPEG 419 16
STDM 2
Data rate on mux’ed line < sum of data rates from all input lines.
Can support more devices than TDM using same link.
Problem: peak periods. Solution: multiplexers have some buffering
capacity to hold excess data. Tradeoff data rate and buffer size (response time). When two sources transmit at the same time, a
decision must eb made as to who gets to go first (fairness is an issue).
EE/CS 450 Spring 00 17
LAN Systems - Chapter 14
Examples of Link Layer MAC Layer – Medium Access
Control LLC – Logical Link Layer
University of Delaware CPEG 419 18
Local Area Networks 1
Interconnect devices over short distances. Within same floor, Building, Campus.
Characterized by low delays.
University of Delaware CPEG 419 19
LANs 2
Typically use common broadcast medium. Hosts share same communication medium. Also called multiple-access networks.
LANs are characterized by: Topology – how nodes are hooked together. Transmission medium. Medium access control mechanism.
University of Delaware CPEG 419 20
LAN Protocol Architecture
LAN protocol standards collectively known as IEEE 802 reference model.
Physical
Data link
Network
Transport
Session
Presentation
Application
PhysicalMACLLC
OSI
IEEE802
Upper layerprotocols
University of Delaware CPEG 419 21
LAN Protocols
MAC sublayer: performs functions that control access to shared medium.
LLC – logical link control (the past two lectures): performs flow and error control and provides services to upper layer.
University of Delaware CPEG 419 22
802 standards 1
LLC: IEEE 802.2 connectionless and connection oriented
services. Reliable and unreliable. Ethernet (802.3) includes 802.2, but
typically does not use the reliable features. So what why is 802.2 included? Just in case you wanted to make the link reliable.
University of Delaware CPEG 419 23
802 standards 2MAC + physical layers
802.3 802.5Bus/tree/star topologies. Ring topology.CSMA/CD. Token ring.E.g., Ethernet
802.4 FDDIBus/tree/star topologies. Dual bus
(optical).Token bus. Token ring.
802.11 Wireless.CSMA.
University of Delaware CPEG 419 24
Encapsulation of FrameApplication data
header
header
header
header
TCP
IP
LLC
MAC MACtrailer
TCP segmentIP datagram
LLC PDUMAC frame
University of Delaware CPEG 419 25
LLC for LANs
Similar functions as general LLCs.But it has to interface with MAC
sublayer.LLC functions:
Addressing: source and destination.LLC address versus MAC address.
Control data exchange between 2 users.User as higher-layer protocol in the station.
University of Delaware CPEG 419 26
LLC Services3 different services:
Unacknowledged connectionless (type 1).No error or flow control.No delivery guarantees.
Connection-mode (type 2).Logical connection established.Flow and congestion control provided.
Acknowledged connectionless (type 3).No logical connection.Flow and error control.
University of Delaware CPEG 419 27
LLC (802.2) Protocol
Similar to HDLC (ISO standard).LLC PDU:
DSAP SSAP LLC control Information
1 byte 1 byte 1 or 2 bytes variable
University of Delaware CPEG 419 28
MAC Frame Format
Dst.MACaddr
Src.MACaddr
CRCDst.LLCaddr
Src.LLCaddr
LLC PDUMACcontrol
MAC control: protocol information (protocol type, version #).Destination MAC address: physical address of LAN destination.Source MAC address: physical address of the LAN source.
University of Delaware CPEG 419 30
Bus Topology
Use of multipoint medium.Stations attach to bus through tap.
Full-duplex communication allows data to be sent to/received from bus.
Transmission from any station propagates in both directions and is received by all. Media Access Control is required to gain
control of the bus.
University of Delaware CPEG 419 31
Tree Topology
Tree is generalization of bus.Headend: start of 1 or more cables
(branches).Transmission from one station
propagates to all others.
University of Delaware CPEG 419 32
Issues
Inherently, broadcast. Frames to transmit data. Need for specifying the destination. Addresses.
Multi-access. Need for controlling access to medium.
Avoid collisions.MAC protocol.
University of Delaware CPEG 419 33
Ring Topology 1
Stations attach to repeaters.Repeaters are linked to each other
by point-to-point links forming a closed loop.
Links are unidirectional.Repeaters: receive data from one
link and repeat it on the other with no buffering.
University of Delaware CPEG 419 34
Ring 2
Stations transmit/receive via repeater.
Frames circulate past all stations; destination copies frame as it goes by; source removes frame.
Ring shared by multiple stations. Need MAC protocol to determine when
each station may insert frame.
University of Delaware CPEG 419 35
Star Topology
Each station directly connected to central node via point-to-point link.
Central node’s modes of operation: Broadcast mode: node broadcasts received
frame on all other links; logically works like bus. Switching mode: node sends frame out only on
the link to the destination. MAC is easy.
Central node as single-point of failure.
University of Delaware CPEG 419 36
Medium Access Control
Control access to shared medium.Where and how?Where: centralized versus
decentralized.How: synchronous versus
asynchronous.
University of Delaware CPEG 419 37
Centralized versus Distributed MAC
Centralized approaches: Controller grants access to medium. Simple, greater control: priorities, QoS. But, single point of failure and
performance bottleneck. Decentralized schemes:
All stations collectively run MAC to decide when to transmit.
University of Delaware CPEG 419 38
Synchronous versus Asynchronous
Synchronous approaches: Static channel allocation. Examples: FDM, TDM. Simple but inefficient.
Asynchronous or dynamic: Example: STDM. 3 categories: round-robin, reservation,
and contention.
University of Delaware CPEG 419 39
Round-Robin MAC
Each station is allowed to transmit; station may decline or transmit (bounded by some maximum transmit time).
Centralized (e.g., polling) or distributed control of who is next to transmit.
When done, station relinquishes and right to transmit goes to next station.
Efficient when many stations have data to transmit over extended period (stream).
University of Delaware CPEG 419 40
Reservation
Time divided into slots.Station reserves slots in the future.Multiple slots for extended
transmissions.Suited to stream traffic.
University of Delaware CPEG 419 41
Contention
No control.Stations try to acquire the medium.Distributed in nature.Perform well for bursty traffic.Can get very inefficient under heavy load.
NOTE: round-robin and contention are the most common.
University of Delaware CPEG 419 42
Standardized MACs
TopologiesBus Ring
Round robin
Reservation
Contention
Token bus(802.4)Polling (802.11)
DQDB(802.6)
CSMA/CD(802.3)CSMA(802.11)
Token ring(802.5; FDDI)
Techniques
University of Delaware CPEG 419 43
Wireless LANs
Use wireless transmission media. Infrared (IR): limited to indoors and
single room (IR light doesn’t penetrate walls).
RadioNarrowband microwave.Spread Spectrum LANs.
University of Delaware CPEG 419 44
Wireless LAN Applications
Nomadic access (e.g., users roaming around campus).
LAN interconnection (e.g., across buildings).
Ad Hoc Networks (e.g., disaster relief crew).
University of Delaware CPEG 419 45
MAC Protocols
Contention-based ALOHA and Slotted ALOHA. CSMA. CSMA/CD.
Round-robin : token-based protocols. Token bus. Token ring.
University of Delaware CPEG 419 46
The ALOHA Protocol
Developed @ U of Hawaii in early 70’s.Packet radio networks.“Free for all”: whenever station has a
frame to send, it does so. Station listens for maximum RTT for an ACK. If no ACK, re-sends frame for a number of
times and then gives up. Receivers check FCS and destination address
to ACK.
University of Delaware CPEG 419 47
Collisions
Invalid frames may be caused by channel noise or
Because other station(s) transmitted at the same time: collision.
Collision happens even when the last bit of a frame overlaps with the first bit of the next frame.
University of Delaware CPEG 419 49
ALOHA’s Performance 2
S = G e-2G, where S is the throughput (rate of successful transmissions) and G is the offered load.
S = Smax = 1/2e = 0.184 for G=0.5.
University of Delaware CPEG 419 50
Slotted Aloha
Doubles performance of ALOHA.Frames can only be transmitted at
beginning of slot: “discrete” ALOHA.Vulnerable period is halved.S = G e-G.S = Smax = 1/e = 0.368 for G = 1.
University of Delaware CPEG 419 51
ALOHA Protocols
Poor utilization.Key property of LANs: propagation
delay between stations is small compared to frame transmission time.
Consequence: stations can sense the medium before transmitting.
University of Delaware CPEG 419 52
Carrier-Sense Multiple Access (CSMA) 1
Station that wants to transmit first listens to check if another transmission is in progress (carrier sense).
If medium is in use, station waits; else, it transmits.
Collisions can still occur.Transmitter waits for ACK; if no ACKs,
retransmits.
University of Delaware CPEG 419 53
CSMA 2Effective when average transmission
time >> propagation time.Collisions can occur only when 2 or more
stations begin transmitting within short time.
If station transmits and no collisions during the time leading edge of frame propagates to farthest station, then NO collisions.
University of Delaware CPEG 419 54
CSMA 3
Maximum utilization is function of frame size and propagation time. Longer frames or shorter propagation
time, higher utilization.
University of Delaware CPEG 419 55
CSMA Flavors
1-persistent CSMA (IEEE 802.3) If medium idle, transmit; if medium busy,
wait until idle; then transmit with p=1. If collision, waits random period to re-send.
Non-persistent CSMA: after collision, node waits a random time before retransmitting.
P-persistent: when channel idle detected, transmits packet in the first slot with p.
University of Delaware CPEG 419 56
CSMA/CD 1
CSMA with collision detection.Problem: when frames collide, medium
is unusable for duration of both (damaged) frames.
For long frames (when compared to propagation time), considerable waste.
What if station listens while transmitting?
University of Delaware CPEG 419 57
CSMA/CD Protocol
1. If medium idle, transmit; otherwise 2.2. If medium busy, wait until idle, then
transmit with p=1.3. If collision detected, transmit brief
jamming signal and abort transmission.4. After aborting, wait random time, try
again.
University of Delaware CPEG 419 58
CSMA/CD Performance
Wasted capacity restricted to time to detect collision.
Time to detect collision < 2*maximum propagation delay.
Rule in CSMA/CD protocols: frames long enough to allow collision detection prior to end of transmission.
University of Delaware CPEG 419 59
IEEE 802.3 LAN Standards
802.3: 10 Mbps Ethernet.802.3u: 100Mbps (Fast) Ethernet.802.3z: 1Gbps (Gigabit) Ethernet.
University of Delaware CPEG 419 60
Ethernet
Most popular CSMA/CD protocol.1-persistent.Developed at Xerox Parc (1976).Different implementations (10Mbps):
Notation: <bps><signaling><max seg size (100’s of meters)>
Table page 409.
University of Delaware CPEG 419 61
Ethernet Implementations
10Base5 (thick net): up to 500m segments and 100 stations; coaxial cable(10mm); baseband (Manchester); bus.
10Base2 (thin net): up to 200m segments and 30 stations; coaxial cable(5mm); baseband (Manchester); bus.
10BaseT: up to 100m segments; unshielded TP; baseband (Manchester); star.
University of Delaware CPEG 419 62
Baseband and Broadband
Signaling techniques.Baseband: signals transmitted
without modulation; digital signals represented by different voltages (e.g., using Manchester encoding).
Broadband: analog signaling; if digital, modulation required.
University of Delaware CPEG 419 63
Ethernet (cont’d)
Multiple segments can be connected using repeaters.
Repeater
University of Delaware CPEG 419 64
Ethernet Frame Format
Preamble DA SA Type Data CRC Postamble
Type: identifies upper layer protocol (for demux’ing)Data: 0-1500 bytes (min. is 46 bytes).DA and SA: destination and source addresses. Example: 6:2b:3e:0:0:1d Broadcast: all 1’s. Multicast: first bit is 1. Promiscuous mode: stations accept all frames.
8 6 6 2 4 1
University of Delaware CPEG 419 65
Ethernet TransmissionIf channel idle:
Send frame immediately (p=1). Waits 2t between back-to-back transmissions.
If channel busy: Wait till free, then transmit (p=1).
If collision: Jam for 512 bits (for both ends to detect
collision). Waits for 0-2t (1st try), 0-4t (2nd try),...