23
© Jörg Liebeherr (modified by M. Veeraraghavan) 1 • Lower Layers • Local Area Network Standards • Point-to-Point Link Layer Protocols • ARP and RARP

Lower Layers Local Area Network Standards Point-to-Point Link Layer Protocols ARP and RARP

  • Upload
    jed

  • View
    40

  • Download
    1

Embed Size (px)

DESCRIPTION

Data Link Layer. Lower Layers Local Area Network Standards Point-to-Point Link Layer Protocols ARP and RARP. TCP/IP Suite and OSI Reference Model. The TCP/IP protocol stack does not define the lower layers of a complete protocol stack. - PowerPoint PPT Presentation

Citation preview

Page 1: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan)

1

• Lower Layers

• Local Area Network Standards

• Point-to-Point Link Layer Protocols

• ARP and RARP

Page 2: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 2

TCP/IP Suite and OSI Reference Model

ApplicationLayer

ApplicationLayer

PresentationLayer

SessionLayer

TransportLayer

NetworkLayer

(Data) LinkLayer

PhysicalLayer

TransportLayer

NetworkLayer

OSIReference

Model

(Data) LinkLayer

TCP/IP Suite

• The TCP/IP protocol stack does not define the lower layers of a complete protocol stack.

• In this lecture, we will review the data link layer and the MAC sublayer.

• Most of the material should be familiar from EL 536.

Page 3: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 3

Data Link Layer

• The main tasks of the data link layer are:• Transfer data from the network layer of one machine to

the network layer of another machine.• Convert the raw bit stream of the physical layer into

groups of bits (“frames”).• Perform flow control between sender and receiver.

NetworkLayer

Data LinkLayer

PhysicalLayer

NetworkLayer

Data LinkLayer

PhysicalLayer

Page 4: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 4

Types of Networks

• There are two types of communication networks:– Broadcast Networks: All stations share a single

communication channel. – Point-to-Point Networks: Pairs of hosts (or routers) are

directly connected.

• Typically, local area networks (LANs) are broadcast and wide area networks (WANs) are point-to-point.

Broadcast Network Point-to-Point Network

Page 5: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 5

Local Area Network

• Local area networks (LANs) typically connect computers within a building or a campus.

• Almost all LANs are broadcast networks.

• Typical topologies of LANs are bus or ring.

Bus LAN Ring LAN

Page 6: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 6

MAC and LLC

• In any broadcast network, the stations must ensure that only one station transmits at a time on the shared communication channel.

• The protocol that determines who can transmit on a broadcast channel is called Medium Access Control (MAC) protocol.

• The MAC protocol is implemented in the MAC sublayer which is the lower sublayer of the data link layer.

• The higher portion of the data link layer is often called Logical Link Control (LLC).

Logical LinkControl

Medium AccessControlD

ata

Link

Laye

r

to Physical Layer

to Network Layer

Page 7: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 7

IEEE 802 Standards

•IEEE 802 is a family of standards for LANs.

•The 802 defines the LLC and several MAC sublayers.

Higher Layers

802.1 Interface to Higher Layers

LLC

802.2 Logical Link Control

MAC

802.3 CSMA/CD (Ethernet)802.4 Token Bus802.5 Token Ring802.6 DQDB

Page 8: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 8

IEEE 802 LAN Standard

Higher

802.2

802.3

803.5

802.4

Data Link

Physical

OSI

Layers

Layer

Layer

Logical LinkControl

Medium AccessControl

802.6PhysicalLayer

IEEEReferenceModel

Page 9: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 9

•IEEE 802.2

•CSMA/CD

• L• L

• C• M

• A• C

• P• h

• y• s•

i• c• a•

l

•Unacknowledged connectionless service•Connection-oriented service•Acknowledged connectionless service

• I•E•

E•E•

• 8• 0

• 2• .•

3

•Broadband

•Unshielded•twisted pair:•1, 10 Mbps

•Optical•:Fiber•10 Mbps

•Token Bus

• I•E•

E•E•

• 8• 0

• 2• .•

4•Broadband•Coaxial:•1,5,10

•Carrierband•1,5,10

•Optical fiber•5,10,20

•Mbps

•Mbps

•Mbps

•Token Ring

• I•E•

E•E•

• 8• 0

• 2• .•

5

•Shielded •twisted•pair:•4, 16 Mbps

•Unshielded•twisted•pair:•4 Mbps

•coaxial:•10 Mbps

•FDDI

• F• D

• D• I

•Optical•fiber:•100•Mbps

•DQDB

• I•E•

E•E•

• 8• 0

• 2•.• 6

•Optical•fiber• or •coaxial•44.736•Mbps

IEEE 802 LAN Standard

Page 10: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 10

Functions of the LLC

• LLC can provide different services to the network layer:• acknowledged connectionless service• unacknowledged connectionless service• connection-oriented service

• Framing

• Error control

• Addressing

Page 11: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 11

Functions of the MAC sublayer

• The various MAC sublayers of the IEEE 802 standard are very different.

• We will discuss:– CSMA/CD a.k.a. Ethernet

Page 12: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 12

IEEE 802.3 (CSMA/CD)

Transceiver 802.3 standardizes the 1-persistent CSMA/CD multi-access

control protocol.

1. Each station listens before it transmits.

2. If the channel is busy, it waits until the channel goes idle, and then it transmits.

3. If the channel is idle it transmits immediately. Continue sensing.

4. If collision is detected, transmit a brief jamming signal, then cease transmission, wait for a random time, and retransmit.

Page 13: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 13

Different techniques

• 1-persistent: – if busy, constantly sense channel– if idle, send immediately– if collision is detected, wait a random amount of time before retransmitting

• Non-persistent:– sense channel when station has a packet to send– if busy, wait a random amount of time before sensing again;– if idle, transmit as soon as it is idle– collisions reduced because sensing is not immediately rescheduled– drawback: more delay

• p-persistent: combines 1-persistent goal of reduced idle channel time with the non-persistent goal of reduced collisions.

– sense constantly if busy and the station needs to send a packet– when the channel becomes idle, transmit packet with probability p

– with probability 1-p station waits an additional tprop before sensing again

Page 14: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 14

Collisions in Ethernet

• The collision resolution process of Ethernet requires that a collision is detected while a station is still transmitting.

• Assume: max. propagation delay on the bus is a.

A Begins TransmissionA B

B Begins TransmissionA B

t0

t0+a-

Page 15: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 15

Collisions in Ethernet

• Restrictions: Each frame should be at least twice as long as the time to detect a collision (2 · maximum propagation delay).

B Detects CollisionA B

t0+a

A Detects CollisionA B

t0+2a

Just Before Endof Transmission

Page 16: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 16

Different MAC schemes

• ALOHA: True free-for-all. When a node needs to send, it does so. It listens for an amount of time equal to the maximum round trip delay plus a fixed increment. If it hears an acknowledgment, fine; otherwise it resends. After several attempts, it gives up. Max. utilization: 18%

• Slotted ALOHA: improved utilization: 37% (with time slots; frames that overlap, overlap completely)

• CSMA: Sense carrier, if idle, send.Wait for ack. If there isn’t one, assume there was a collision, retransmit.

Page 17: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 17

CSMA/CD

• CSMA/CD: – In CSMA, if collision occurs, need to wait till damaged

frames have fully propagated. For long frames compared to propagation delay, this could lead to significant waste of capacity. So add collision detection.

– Rule: Frames should be long enough to allow collision detection prior to the end of transmission (pg 405, EL536 textbook)

Page 18: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 18

Exponential Backoff Algorithm

• If a station is involved in a collision, it waits a random amount of time before attempting a retransmission.

• The random time is determined by the following algorithm:

• Set “slot time” to 2a.• After first collision wait 0 or 1 time unit.• After i-th collision, wait a random number

between 0 and 2 i-1 time slots.• Do not increase random number range if i=10.• Give up after 16 collisions.

Page 19: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 19

Physical Layer Specifications for 802.3

• Many types of media are allowed for 802.3. These are the most popular:

Name Cable DataRate

(Mbps)

MaximumLength

(m)

Comments

10Base5 “ThickCoax”

10 500 The “original” from1985

10Base2 “Thin Coax” 10 185 Called “Cheapernet”or “thin Ethernet”

10BaseT Twistedpair

10 100 Uses a star topology(with a central hub).

100BaseT Twistedpair

100 “Fast Ethernet”

100BaseFX Fiber optics 100 2000 Fiber version of FastEthernet

Page 20: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 20

Ethernet and IEEE 802.3: Any Difference?

• On a conceptual level, they are identical. But there are subtle differences that are relevant if we deal with TCP/IP.

• “Ethernet”: • An industry standard from 1982 that is based on the first

implementation of CSMA/CD by Xerox.• Predominant version of CSMA/CD in the US.

• 802.3:• IEEE’s version of CSMA/CD from 1985.• Interoperates with 802.2 (LLC) as higher layer.

• Difference for our purposes: Ethernet and 802.3 use different methods to encapsulate an IP datagram.

Page 21: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 21

IEEE 802.2/802.3 Encapsulation (RFC 1042)

802.3 MAC

destinationaddress

6

sourceaddress

6

length

2

DSAPAA

1

SSAPAA

1

cntl03

1

org code0

3

type

2

data

38-1492

CRC

4

802.2 LLC 802.2 SNAP

- destination address, source address:MAC addresses are 48 bit

- lengt h : frame length in number of bytes- DSAP, SSAP : always set to 0xaa- Ctrl: set t o 3- org code: set to 0- type field identifies the content of the

data field- CRC: cylic redundancy check

0800

2

IP datagram

38-1492

0806

2

ARP request/reply

28

PAD

10

0835

2

RARP request/reply

28

PAD

10

Error: This should be 8035 not 0835

Page 22: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 22

Ethernet Encapsulation (RFC 894 and 893)

CRCDest.Addr

.

Src.Addr. Data

IPdatagram

ARP req./reply

RARP req./reply

Type

66

2 18

PAD

46-1500

28

0800

0806

8035

Type

Type

Type

28 18

PAD

2

2

2

46-1500

4

Page 23: Lower Layers  Local Area Network Standards  Point-to-Point Link Layer Protocols  ARP and RARP

© Jörg Liebeherr (modified by M. Veeraraghavan) 23

Interconnection of LANs

• LANs of different types can be interconnected by data link bridges.

BridgeToken-ring

IP

LLC

802.3 MAC 802.3 MAC 802.5 MAC

LLC

IP

LLC

802.5 MAC