Title: CPEG 419 Introduction to Networks
1CPEG 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.
2CRC Example I was right!
- Frame M 1010001101 x9x7x3x2x0.
- Pattern G 110101.
- Dividing (frame25) by pattern results in 01110.
- Thus MV 1010001101 01110.
- Receiver can detect errors unless received
message Tr is divisible by G.
3Fragmentation
- 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.
4Example Data Link Layer Protocol
- High-Level Data Link Control (HDLC)
- Widely-used (ISO standard).
- Single frame format.
- Synchronous transmission.
5HDLC 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.
flag
address
flag
control
data
FCS
8 bits
8 ext.
8 or 16
8
variable
16 or 32
6Other 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. MAC addr
LLC ctl.
Src. MAC addr
Dst. LLC addr
Src. LLC addr
MAC control
Data
FCS
7Other 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.
8Multiplexing
- 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.
MUX
DEMUX
.
.
.
.
.
.
9Multiplexing Techniques
- 3 basic types
- Frequency-Division Multiplexing (FDM).
- Time-Division Multiplexing (TDM).
- Statistical Time-Division Multiplexing (STDM).
10FDM 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.
11FDM 2
12TDM 1
- TDM or synchronous TDM.
- High data rate medium when compared to signals to
be transmitted.
13TDM 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.
U1
U2
...
UN
1
2
...
1
2
N
...
N
Time
frame
14TDM 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.
15Statistical TDM 1
- Or asynchronous TDM.
- Dynamically allocates time slots on demand.
- N input lines in statistical multiplexer, but
only k slots on TDM frame, where k lt n. - Multiplexer scans input lines collecting data
until frame is filled. - Demultiplexer receives frame and distributes data
accordingly.
16STDM 2
- Data rate on muxed line lt 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).
17LAN Systems - Chapter 14
- Examples of Link Layer
- MAC Layer Medium Access Control
- LLC Logical Link Layer
18Local Area Networks 1
- Interconnect devices over short distances.
- Within same floor,
- Building,
- Campus.
- Characterized by low delays.
19LANs 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.
20LAN Protocol Architecture
- LAN protocol standards collectively known as IEEE
802 reference model.
Application
OSI
Upper layer protocols
Presentation
Session
Transport
IEEE 802
Network
LLC
Data link
MAC
Physical
Physical
21LAN 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.
22802 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.
23802 standards 2
- MAC physical layers
- 802.3 802.5
- Bus/tree/star topologies. Ring topology.
- CSMA/CD. Token ring.
- E.g., Ethernet
- 802.4 FDDI
- Bus/tree/star topologies. Dual bus (optical).
- Token bus. Token ring.
- 802.11
- Wireless.
- CSMA.
24Encapsulation of Frame
Application data
TCP
header
IP
header
LLC
header
MAC
MAC
header
trailer
TCP segment
IP datagram
LLC PDU
MAC frame
25LLC 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.
26LLC Services
- 3 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.
27LLC (802.2) Protocol
- Similar to HDLC (ISO standard).
- LLC PDU
1 byte
1 or 2 bytes
1 byte
variable
Information
DSAP
SSAP
LLC control
28MAC Frame Format
Dst. MAC addr
Dst. LLC addr
Src. MAC addr
Src. LLC addr
MAC control
CRC
LLC PDU
MAC control protocol information (protocol type,
version ). Destination MAC address physical
address of LAN destination. Source MAC address
physical address of the LAN source.
29LAN Topologies
Star
Ring
Tree
Central node
Bus
30Bus 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.
31Tree Topology
- Tree is generalization of bus.
- Headend start of 1 or more cables (branches).
- Transmission from one station propagates to all
others.
32Issues
- Inherently, broadcast.
- Frames to transmit data.
- Need for specifying the destination.
- Addresses.
- Multi-access.
- Need for controlling access to medium.
- Avoid collisions.
- MAC protocol.
33Ring 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.
34Ring 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.
35Star Topology
- Each station directly connected to central node
via point-to-point link. - Central nodes 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.
36Medium Access Control
- Control access to shared medium.
- Where and how?
- Where centralized versus decentralized.
- How synchronous versus asynchronous.
37Centralized 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.
38Synchronous 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.
39Round-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).
40Reservation
- Time divided into slots.
- Station reserves slots in the future.
- Multiple slots for extended transmissions.
- Suited to stream traffic.
41Contention
- 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.
42Standardized MACs
Topologies
Bus
Ring
Techniques
Token bus (802.4) Polling (802.11)
Token ring (802.5 FDDI)
Round robin
Reservation
DQDB (802.6)
Contention
CSMA/CD (802.3) CSMA(802.11)
43Wireless LANs
- Use wireless transmission media.
- Infrared (IR) limited to indoors and single room
(IR light doesnt penetrate walls). - Radio
- Narrowband microwave.
- Spread Spectrum LANs.
44Wireless LAN Applications
- Nomadic access (e.g., users roaming around
campus). - LAN interconnection (e.g., across buildings).
- Ad Hoc Networks (e.g., disaster relief crew).
45MAC Protocols
- Contention-based
- ALOHA and Slotted ALOHA.
- CSMA.
- CSMA/CD.
- Round-robin token-based protocols.
- Token bus.
- Token ring.
46The ALOHA Protocol
- Developed _at_ U of Hawaii in early 70s.
- 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.
47Collisions
- 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.
48ALOHAs Performance 1
t0t
t03t
t0
t02t
Time
vulnerable
49ALOHAs 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 G0.5.
-
50Slotted 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.
51ALOHA 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.
52Carrier-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.
53CSMA 2
- Effective when average transmission time gtgt
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.
54CSMA 3
- Maximum utilization is function of frame size and
propagation time. - Longer frames or shorter propagation time, higher
utilization.
55CSMA Flavors
- 1-persistent CSMA (IEEE 802.3)
- If medium idle, transmit if medium busy, wait
until idle then transmit with p1. - 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.
56CSMA/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?
57CSMA/CD Protocol
- 1. If medium idle, transmit otherwise 2.
- 2. If medium busy, wait until idle, then transmit
with p1. - 3. If collision detected, transmit brief jamming
signal and abort transmission. - 4. After aborting, wait random time, try again.
58CSMA/CD Performance
- Wasted capacity restricted to time to detect
collision. - Time to detect collision lt 2maximum propagation
delay. - Rule in CSMA/CD protocols frames long enough to
allow collision detection prior to end of
transmission.
59IEEE 802.3 LAN Standards
- 802.3 10 Mbps Ethernet.
- 802.3u 100Mbps (Fast) Ethernet.
- 802.3z 1Gbps (Gigabit) Ethernet.
60Ethernet
- Most popular CSMA/CD protocol.
- 1-persistent.
- Developed at Xerox Parc (1976).
- Different implementations (10Mbps)
- Notation ltbpsgtltsignalinggtltmax seg size (100s of
meters)gt - Table page 409.
61Ethernet 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.
62Baseband 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.
63Ethernet (contd)
- Multiple segments can be connected using
repeaters.
Repeater
64Ethernet Frame Format
8
6
6
2
4
1
CRC
Data
Preamble
Type
DA
Postamble
SA
Type identifies upper layer protocol (for
demuxing) Data 0-1500 bytes (min. is 46
bytes). DA and SA destination and source
addresses. Example 62b3e001d
Broadcast all 1s. Multicast first bit is
1. Promiscuous mode stations accept all
frames.
65Ethernet Transmission
- If channel idle
- Send frame immediately (p1).
- Waits 2t between back-to-back transmissions.
- If channel busy
- Wait till free, then transmit (p1).
- If collision
- Jam for 512 bits (for both ends to detect
collision). - Waits for 0-2t (1st try), 0-4t (2nd try),...