20
1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

Embed Size (px)

Citation preview

Page 1: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

1

Link Layer 3

Mozafar Bag-Mohammadi

University of Ilam

Page 2: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

2

Token Ring Overview

Examples 16Mbps IEEE 802.5 (based on earlier IBM ring) 100Mbps Fiber Distributed Data Interface (FDDI)

Page 3: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

3

Token Ring (cont) Idea

Frames flow in one direction: upstream to downstream special bit pattern (token) rotates around ring must capture token before transmitting release token after done transmitting

immediate release delayed release

remove your frame when it comes back around stations get round-robin service

Frame Format

Control

8 8 8 24

CRCStart offrame

End offrame

Destaddr

Body

4848

Srcaddr

Status

32

Page 4: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

4

Wireless LANs IEEE 802.11 Physical Media

spread spectrum radio (2.4GHz) diffused infrared (10m)

Page 5: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

5

Spread Spectrum

Idea spread signal over wider frequency band than required originally designed to thwart jamming

Frequency Hopping Direct Sequence

Page 6: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

6

Frequency Hopping transmit over random

sequence of frequencies

sender and receiver share… pseudorandom

number generator seed

802.11 uses 79 x 1MHz-wide frequency bands

Page 7: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

7

Direct Sequence for each bit, send XOR of that bit and n

random bits random sequence known to both sender and

receiver called n-bit chipping code 802.11 defines an 11-bit chipping code

Random sequence: 0100101101011001

Data stream: 1010

XOR of the two: 1011101110101001

0

0

0

1

1

1

Page 8: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

8

Glossary of 802.11 Wireless Terms

Station (STA): A computer or device with a wireless network interface.

Access Point (AP): Device used to bridge the wireless-wired boundary, or to increase distance as a wireless packet repeater.

Ad Hoc Network: A temporary one made up of stations in mutual range.

Infrastructure Network: One with one or more Access Points. Channel: A radio frequency band, or Infrared, used for shared

communication. Basic Service Set (BSS): A set of stations communicating

wirelessly on the same channel in the same area, Ad Hoc or Infrastructure.

Extended Service Set (ESS): A set BSSs and wired LANs with Access Points that appear as a single logical BSS.

Page 9: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

9

Supporting Mobility

Case 1: ad hoc networking Case 2: access points (AP)

tethered each mobile node associates with an AP

B

H

A

F

G

D

AP-2

AP-3AP-1

EC

Distribution system

Page 10: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

10

Overview, 802.11 Architecture

STASTA

STA STA

STASTASTA STA

APAP

ESS

BSS

BSSBSS

BSS

Existing Wired LAN

Infrastructure Network

Ad Hoc Network

Ad Hoc Network

Page 11: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

11

Mobility (cont)

Scanning (selecting an AP) node sends Probe frame all AP’s w/in reach reply with ProbeResponse frame node selects one AP; sends it AssociateRequest frame AP replies with AssociationResponse frame new AP informs old AP via tethered network

modes active: when join or move passive: AP periodically sends Beacon frame

Page 12: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

12

MACAW Sender transmits

RequestToSend (RTS) frame Receiver replies with

ClearToSend (CTS) frame Neighbors…

see CTS: keep quiet see RTS but not CTS: ok to

transmit Receiver sends ACK when it

has frame neighbors silent until see ACK

Collisions no collisions detection known when don’t receive CTS exponential backoff

Page 13: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

13

Hidden & Exposed nodes

Page 14: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

14

Collisions Avoidance

Similar to Ethernet Problem: hidden and exposed nodes

Hidden node

Exposed node

Sending node

A B C D

Page 15: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

15

Point to Point Data Link Control one sender, one receiver, one link: easier than broadcast

link: no Media Access Control no need for explicit MAC addressing e.g., dialup link, ISDN line

popular point-to-point Data Link Control protocols: PPP (point-to-point protocol)

Protocol choice for dialup link.

Page 16: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

16

Dial-Up Access

AccessRouter

Modems

Point-to-Point (serial) links

Many data link connections are point-to-point serial links: Dial-in or DSL access connects hosts to

access routers Routers are connected by

high-speed point-to-point links

IP hosts and routers are connected by a serial cable Data link layer protocols for point-

to-point links are simple: Main role is encapsulation of IP

datagrams No media access control needed

Point-to-Point Links

Router

Router

Router Router

Page 17: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

17

Data Link Protocols for Point-to-Point links

SLIP (Serial Line IP) First protocol for sending IP datagrams over dial-up links

(from 1988) Encapsulation, not much else

PPP (Point-to-Point Protocol):• Successor to SLIP (1992), with added functionality• Used for dial-in and for high-speed routers

HDLC (High-Level Data Link) :• Widely used and influential standard (1979)• Default protocol for serial links on Cisco routers• Actually, PPP is based on a variant of HDLC

Page 18: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

18

PPP - IP encapsulation The frame format of PPP is similar to HDLC and the 802.2 LLC frame

format:

PPP assumes a duplex circuit Note: PPP does not use addresses Usual maximum frame size is 1500

7E

flag

1

FF

addr

1

03

ctrl

1 2

protocol

<= 1500

data

2

CRC

7E

flag

1

0021 IP datagram

C021 link control data

8021 network control data

Page 19: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

19

Additional PPP functionality

In addition to encapsulation, PPP supports: multiple network layer protocols (protocol multiplexing) Link configuration Link quality testing Error detection Option negotiation Address notification Authentication

The above functions are supported by helper protocols: LCP PAP, CHAP NCP

Page 20: 1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam

20

PPP Support protocols

Link management: The link control protocol (LCP) is responsible for establishing, configuring, and negotiating a data-link connection. LCP also monitors the link quality and is used to terminate the link.

Authentication: Authentication is optional. PPP supports two authentication protocols: Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP).

Network protocol configuration: PPP has network control protocols (NCPs) for numerous network layer protocols. The IP control protocol (IPCP) negotiates IP address assignments and other parameters when IP is used as network layer.