17 - winter 2005 ece ece 766 computer interfacing and protocols 1 local area networks need for high...

22
Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 17 - Local Area Networks Local Area Networks Need for high performance communications for physically close devices (e.g. office environment) Why “local”? Volume of locally created data Increasing local computation power Advantage of locality: High Speed! Design goals: High speed and high bandwidth Simple, maintainable, flexible, extendable Low cost

Upload: basil-george

Post on 05-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

117 -

Local Area NetworksLocal Area Networks

• Need for high performance communications for physically close devices (e.g. office environment)

• Why “local”?– Volume of locally created data– Increasing local computation power– Advantage of locality: High Speed!

• Design goals:– High speed and high bandwidth– Simple, maintainable, flexible, extendable– Low cost

Page 2: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

217 -

LAN TopologiesLAN Topologies

• Basic topologies revisited:

Hub

Page 3: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

317 -

Channel AccessChannel Access• Line discipline is important factor of overall

performance• Static allocation of resources results in poor

performance– From queuing theory: dividing resources in N equal

parts multiplies the mean waiting time by N• Polling vs. contention techniques

– Polling: Asking everyone if they have something to send

– Can be centralized or distributed (how?)– Contention:

Try to access the channel without prior arrangement

Page 4: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

417 -

Multiple Access ProtocolsMultiple Access Protocols

• Several different kinds of multiple access protocols exist:– Aloha

• Pure, slotted

– Carrier Sense Multiple Access (CSMA)• Persistent, non-persistent, p-persistent, CD

– Collision-Free Protocols• Bit map, binary count…

– Limited Contention Protocols• Adaptive tree walk…

Page 5: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

517 -

Pure AlohaPure Aloha

• Users send their frames as soon as they are available

• Collisions will occur, but wait for a random amount of time and send the frame once again

A1 A1 A2 A2

B1 B1 B2

C1C1

A

B

C

Page 6: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

617 -

Pure AlohaPure Aloha

• Performance of Pure Aloha– When sending a frame, we hope that no one else is

transmitting from 1 frame time before we start transmission until our transmission is over

t0 t0+t t0+2t t0+3t

Vulnerable period

Page 7: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

717 -

Slotted AlohaSlotted Aloha

• Different from Pure Aloha in the timing of channel access

• Time is partitioned into slots• When a host receives a frame, it waits until the

beginning of the next slot to transmit• The vulnerable period is reduced to half of Pure

Aloha• A maximum of one slot waiting time is possible

Page 8: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

817 -

CSMA ProtocolsCSMA Protocols

• Based on sensing the channel before sending the frame

• Send the frame if channel is free• Behavior after detecting a busy channel

determines the kind of CSMA protocol– 1-persistent: Send the frame if channel is available. If

busy, transmit the frame with probability 1 as soon as the channel is free. If collision occurs, wait a random amount of time and start over

– Nonpersistent: Send the frame if channel is available. If busy, wait a random amount of time and try sending once again

Page 9: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

917 -

CSMA ProtocolsCSMA Protocols

– P-persistent: Used in slotted channels. Send the frame with probability p if channel is available, defer to the next slot with probability 1-p. If busy, wait until the next slot and repeat the algorithm.

• CSMA protocols have higher throughput than Aloha protocols

• Nonpersistent protocol has higher throughput and delay than 1-persistent

• Performance of p-persistent depends on the value of p

Page 10: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1017 -

CSMA/CDCSMA/CD

• Carrier Sense Multiple Access / Collision Detection– Sense the channel before sending– If collision is detected, stop the transmission

(frame is damaged anyway)– Wait for a random amount of time before the

next attempt

• Collision detection is done by comparing the transmitted power to the received one

Page 11: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1117 -

CSMA/CDCSMA/CD

• How long does it take for a station to conclude that it seized the channel, i.e., what is the contention period?– Consider the worst case scenario– Largest propagation delay = τ– At t0, station 1 starts sending– At t0+ τ , station 2 sends its first bit, causes

collision, stops sending– Station 1 detects collision at t0+2τ– Hence, the contention period is 2τ

Page 12: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1217 -

Project 802Project 802

802.2 Logical Link Control (LLC)

802.1 Internetworking

802.3CSMA/CD

802.4Token Bus

802.5Token Ring

...

Project 802

Network

Data Link Layer

Physical

OSI Model

Page 13: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1317 -

Ethernet (802.3)Ethernet (802.3)

• Xerox, DEC, Intel• Properties:

– Simple, low cost, low delay– High speed (10, 100, 1000 Mbps)– Aims data exchange at data link level– Fairness in channel access– Single node, group, broadcast addressing– No unused fields, no variants– Stability: increase in offered traffic should not choke

the system

Page 14: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1417 -

Ethernet (802.3)Ethernet (802.3)

• Properties (not so attractive ones):– Not full duplex– Limited error control

• Detection of and recovery from collision• Error detection using CRC, retransmissions left to

higher level

– No security integrated– Best effort service– No measures against malicious users

Page 15: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1517 -

Ethernet (802.3)Ethernet (802.3)

• Limit on cable length– Minimum frame size is 64 bytes– At 10Mbps, it takes 51.2μsec to transmit the

shortest frame– 51.2μsec = 2τ 2500 meter cable length– To achieve 1Gbps:

• Keep cable length at 2500m, minimum frame size becomes 6400 bytes

• Keep minimum frame size at 64 bytes, maximum cable length becomes 25m

Page 16: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1617 -

Ethernet (802.3)Ethernet (802.3)

• Binary Exponential Backoff Algorithm– Slot time = 51.2μsec – When collision occurs, wait 0 or 1 slot time– If another collision occurs, wait a random

number of slot times between 0 and 3– After kth collision, randomly wait 0-(2k-1) slot

times– Maximum slot time to be waited is 1023– Give up after 16 consecutive collisions

Page 17: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1717 -

Ethernet (802.3)Ethernet (802.3)

• Frame format

– Preamble used for sender/receiver clock synchronization

– MSB of destination address marks single (0) or group communication (1)

PreambleDestination

AddressSourceAddress

Data Pad Checksum

7 1 2-6 2-6 2 0-1500 0-46 4 Bytes

Start of framedelimiter

Length of data

Page 18: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1817 -

Other Ethernet NetworksOther Ethernet Networks

• Switched Ethernet:– Switch isolates communication between two stations– Medium is no longer truly broadcast medium

• Fast Ethernet:– Reduce the cable size to 250m, increase the speed to

100Mbps

• Gigabit Ethernet:– 1Gbps speed– 25m with cable, 550/5000m with multi/single mode

optical fiber

Page 19: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

1917 -

Token Ring (802.5)Token Ring (802.5)

• Unidirectional ring

• Stations are either active or let the frames pass

• Medium access:– Station waits for token– Capture token and transmit your message

instead– Wait until you get your own message, then

place the token on the line

Page 20: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

2017 -

Token Ring (802.5)Token Ring (802.5)

• Token format

• Frame format

SD AC EDSD/ED: Starting/Ending DelimiterAC: Access control1 byte each

SDDestination

AddressSourceAddress

Data FCS

1 6 6 No limit 14 Bytes

AC FC ED FS

1 1 1

Start of FrameSequence

FCS Coverage End of FrameSequence

FC: Frame ControlFCS: Frame Check SequenceFS: Frame Status

Page 21: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

2117 -

Token Ring (802.5)Token Ring (802.5)• Starting Delimiter: J K 0 J K 0 0 0

– Violations of Differential Manchester encoding– J: Cancel both transitions– K: Cancel middle transition only

• Access Control: P P P T M R R R– P: Priority bits indicating which stations are allowed to

use token– T: Token bit, 1 if token or abort, 0 if data or command– M: Monitor bit, used by active monitor station to

detect orphan frames– R: Reservation bits to reserve the next token, cannot

be set to less than priority of the frame How does it ever decrease?

Page 22: 17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices

Winter 2005

ECE

ECE 766Computer Interfacing and Protocols

2217 -

Token Ring (802.5)Token Ring (802.5)

• Frame Control:– Used to distinguish data frames from control frames

• Frame Status:– Includes A and C bits– A is set when destination passes the frame– C is set when destination copies the frame

• AC=00: Destination not powered up or not present• AC=10: Destination present, but frame not accepted• AC=11: Destination present and frame accepted

– Automatic acknowledgment of frames