13
1 CS4550: Computer Networks II Review Data Link Layer

1 CS4550: Computer Networks II Review Data Link Layer

Embed Size (px)

Citation preview

Page 1: 1 CS4550: Computer Networks II Review Data Link Layer

1

CS4550:

Computer Networks II

Review

Data Link Layer

Page 2: 1 CS4550: Computer Networks II Review Data Link Layer

data link layer • phys. layer subject to errors; not reliable; and

only moves information as bits, which alone are not meaningful. DL layer adds these, and combines bits into frames, or messages.

• purpose of DL: transform unreliable physical bit stream into reliable data communications link...

• PHY + DL = DATA COMMUNICATIONS

• MAC layer (media access control) - takes place of DL layer in LANs (together with LLC)

Page 3: 1 CS4550: Computer Networks II Review Data Link Layer

data link layer : functions

• framing and frame synchronization

– frames marked by sync/async technique

• error control

• flow control

• addressing

• control access, data on same link (unlike EIA232)

• link management (3 phases)

Page 4: 1 CS4550: Computer Networks II Review Data Link Layer

HDLC: high level data link control

• ISO standard for a data link protocol

• other DL standards exist, but are very similar; e.g., PPP

• HDLC combines various functions of the DL layer - flow control, error control, sequencing, framing, etc. - into a single protocol standard

Page 5: 1 CS4550: Computer Networks II Review Data Link Layer

HDLC• frame types and formats

f a c data fcs f

I-frame(information/data) S-frame (supervisory)U-frame (Ip datagrams with a = 11111111)

0 seq p/f next

1 0 type p/f next

1 1 type p/f modifier

Page 6: 1 CS4550: Computer Networks II Review Data Link Layer

data link layer : error control• 3 basic techniques in this course (more complex

techniques exist)– parity checking

• very simple and easy error detection

– CRC - cyclic redundancy check• more complex, but very effective and efficient

– Hamming code • limited error correction; based on complex combinations of parity

checks

Page 7: 1 CS4550: Computer Networks II Review Data Link Layer

data link layer : flow and error control

• purpose : regulate the flow of data from sender S to receiver R, so that R is neither overwhelmed nor kept idle unnecessarily.

• secondary purpose may also be used to avoid swamping the network or link with traffic.

• technique : send control information between S and R, synchronizing on buffer space, transmission rates, etc.

• protocols: – stop-and-wait, alternating bit– sliding window (go-back-N, selective repeat/reject)

Page 8: 1 CS4550: Computer Networks II Review Data Link Layer

CSMA / CD : basic protocol• transmissions are stopped when collisions are detected.

• first version used bus -broadcast topology

when the MAC receives a packet to transmit:

(1) sense the carrier; {LISTEN}

if no signal is detected

then begin Xmitting message & continue sensing;

if collision detected

then Xmit jam, stop Xmitting, wait(BACKOFF), goto (1);

when end-of-packet Xmitted, END.

else {carrier is busy} go to (1)

Page 9: 1 CS4550: Computer Networks II Review Data Link Layer

CSMA / CD : frame format

length: 64 to 1518 bytes

preamble : 7 bytes; SOF : 1 byte;

DA,SA : 2/6 bytes; length : 2 bytes;

data : 0-1500; pad : 0-46; FCS : 4

Page 10: 1 CS4550: Computer Networks II Review Data Link Layer

CSMA / CD : standards

IEEE 802.3 : several physical configurations:

• 10BASE5 : baseband coaxial cable; original

• 10BASE2 : thin coaxial cable; cheaper alternative

• 10BASE-T : twisted pair, hub configuration

• 10BROAD36 : uses broadband coax (TV cable)

• 10BASE-F : fiber

• 100BASE-X : fiber OR twisted pair

NOTE: all use the same frame format and basic MAC protocol

Page 11: 1 CS4550: Computer Networks II Review Data Link Layer

Token Ring

• access controlled by token

Page 12: 1 CS4550: Computer Networks II Review Data Link Layer

Token Ring Network - general

• each station receives a bit, checks it, and passes it on; this introduces delay of about 1-1.5 bits per station

• note that a station does not receive entire message before passing it on

• only node with token transmits; others repeat.

• frames removed by station that generated them

• THT (token holding timer) limits time a station holds the token

• token passed when (a) no more data or (b) THT expires

Page 13: 1 CS4550: Computer Networks II Review Data Link Layer

Token Ring : frame formats

token

SD: JK0JK000 ED: JK1JK1IE

frame

AC: access control (8) FS: frame status (8)

SD AC ED

FC DA SA INFO FCS ED FSSD AC

P P P R R R T M A C r r A C r r