chapter 7 osi data link layer

34
Slide จจจ St. Clair College in Windsor, [email protected]. จจจจจจจ จจ.จจจจจจ จจจจจจจ E-mail : [email protected] Twitter : http://twiter.com/cha Chapter 7 OSI Data Link Layer

Upload: sissy

Post on 05-Jan-2016

102 views

Category:

Documents


5 download

DESCRIPTION

Chapter 7 OSI Data Link Layer. OSI Data Link Layer. Accessing the Media. OSI Data Link Layer. Provides the user interface. Segmentation and managing communications. Organize data for network transfer. Exchange data over common media. Supporting and Connecting to Upper Layer. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 7 OSI Data Link Layer

Slide จาก St. Clair College in Windsor, [email protected].

อาจารย์� ดร.ชั�ชัวิ น นามม��น E-mail : [email protected]

Twitter : http://twiter.com/chatchawin

Chapter 7OSI Data Link

Layer

Page 2: Chapter 7 OSI Data Link Layer

OSI Data Link Layer

Accessing the Media

Page 3: Chapter 7 OSI Data Link Layer

OSI Data Link Layer

Segmentation and managing communicatio

ns

Segmentation and managing communicatio

ns

Provides the user interface

Provides the user interface

Organize data for network transfer

Organize data for network transfer

Exchange data over common media

Exchange data over common media

Page 4: Chapter 7 OSI Data Link Layer

Supporting and Connecting to Upper

Layer• Two basic functions:

• Allows the upper layers to accessthe media using framing.

• Controls how data is placed onthe media and received from themedia using media accesscontrol (MAC) and error detection.

Page 5: Chapter 7 OSI Data Link Layer

Supporting and Connecting to Upper Layer

Terminology

Terminology

Page 6: Chapter 7 OSI Data Link Layer

Supporting and Connecting to Upper Layer

Different protocols for

different media

Different protocols for

different media

Protocol governs how to format a frame for

use on that media

Protocol governs how to format a frame for

use on that media

Accept the frameDecapsulate to a packetConstruct a new frame for the mediaForward the new frame

Accept the frameDecapsulate to a packetConstruct a new frame for the mediaForward the new frame

Page 7: Chapter 7 OSI Data Link Layer

Controlling Transfer Across Local Media

• Layer 2 protocols specify the encapsulation of a packet into a frame and the techniques for getting the encapsulated packet on and off each media.

• The technique is termed the Media Access Control (MAC) method.

• Different media might require a different MAC method.•Each media type encountered can have different

characteristics. (Especially a router where several different media types can co-exist.)

Page 8: Chapter 7 OSI Data Link Layer

LAN HeaderLAN Header LAN TrailerLAN Trailer

WAN TrailerWAN TrailerWAN HeaderWAN Header

Controlling Transfer Across Local Media

PacketPacket

Different media…

Different characteristics…

Different MAC method…

LAN HeaderLAN Header LAN TrailerLAN TrailerPacketPacket

Page 9: Chapter 7 OSI Data Link Layer

Controlling Transfer Across Local Media

Different media…

Different characteristics…

Different MAC method…

The protocol can be configured on the

device and determines the type of

encapsulation (MAC method).

The protocol can be configured on the

device and determines the type of

encapsulation (MAC method).

Page 10: Chapter 7 OSI Data Link Layer

Creating a Frame• The description of a

frame is the keyelement of eachprotocol.

• Different protocolsrequire differentinformation tofunction properly.• Which nodes are in communication with each other.• When communication between individual nodes

begins and when it ends.• Which errors occurred while the nodes

communicated.• Which nodes will communicate next.

Page 11: Chapter 7 OSI Data Link Layer

Creating a Frame

• Frames travel the media as a stream of bits.• The framing of the packet inserts control information

in specific fields……MORE DETAILS LATER…..

Page 12: Chapter 7 OSI Data Link Layer

Connecting Upper-Layer Services to the Media

Network devices have both a

hardware and software

component.

Network devices have both a

hardware and software

component.

Page 13: Chapter 7 OSI Data Link Layer

Connecting Upper-Layer Services to the Media

• Data Link Layer prepares the packets from the upper layer software processes for transmission over the physical media.

Page 14: Chapter 7 OSI Data Link Layer

Standards

• Not defined byRFCs as in theother layers.

• Defined byengineeringorganizations.

Page 15: Chapter 7 OSI Data Link Layer

Connecting Upper-Layer Services to the Media

Logical Link Control (LLC) Logical Link Control (LLC) Sub-LayerSub-Layer

Frames the network layer packet

Identifies the network layer protocolMedia Access Control Media Access Control (MAC) Sub-Layer(MAC) Sub-Layer

Addresses the frame

Marks the beginning and end of the frame

IEEEIEEEIEEEIEEE

Page 16: Chapter 7 OSI Data Link Layer

Placing Data on the Media

• Regulating the placement of data on the media is termed Media Access Control.

Media sharing: If and how the nodes share the media.Media sharing: If and how the nodes share the media.Topology: How the connection appears to the Data Link Layer.Topology: How the connection appears to the Data Link Layer.

Page 17: Chapter 7 OSI Data Link Layer

MAC for Shared Media• Two Basic Methods:

More in Chapter 9More in Chapter 9

Page 18: Chapter 7 OSI Data Link Layer

MAC for Non-Shared Media

• Point-to-Point Connections: Type of communication.

Full DuplexFull DuplexHalf Duplex

Half Duplex

Page 19: Chapter 7 OSI Data Link Layer

Logical Topology vs Physical Topology

• Physical Topology:• Arrangement of the nodes and the

physical connections between them (More in Chapter 9).

• Logical Topology:• The way a network transfers frames

among nodes. The use of virtual connections between the nodes regardless of the actual physical connection.•Point-to-Point•Multiaccess•Ring

Page 20: Chapter 7 OSI Data Link Layer

Point-to-Point Logical Topology

• Concerned with full or half duplex.

Page 21: Chapter 7 OSI Data Link Layer

Multiaccess Logical Topology

• Enables a number of nodes to communicate using the same shared media. A sends

to EA sends

to ECheck for other

transmissions

Check for other

transmissions

Media available

Media availableTransmitTransmit

B needs to send to DB needs to send to D

Check for other

transmissions

Check for other

transmissions

Media NOT available

Media NOT available

I’ll wait……I’ll wait……XXXX

XX

Page 22: Chapter 7 OSI Data Link Layer

Ring Logical Topology• Each node receives a frame in turn.

If it is not addressed to the node, it passes it on.

A sends to D

A sends to D

Is it for me?

Is it for me?

NoNo

Is it for me?

Is it for me?

NoNo

Is it for me?

Is it for me?

Yes

Yes

Page 23: Chapter 7 OSI Data Link Layer

OSI Data Link LayerAddressing and Framing Data

Page 24: Chapter 7 OSI Data Link Layer

The Frame• There are many

different Data LinkLayer protocols….

• The Data LinkLayer protocoldescribes thefeatures requiredfor the transportof frames.• Integrated into the encapsulation process.

• No single frame protocol meets the needs of all data transportation across all types of media.

Page 25: Chapter 7 OSI Data Link Layer

The Frame• However, each Data Link Layer

protocol is constructed using the same basic format.• It’s the contents that differ….

Header Data Trailer

Page 26: Chapter 7 OSI Data Link Layer

Framing: Role of the Header

• Contains the control information required by the protocol.• Some sample fields……

•Start of Frame•Source and Destination MAC Addresses•Priority/Quality of Service•Type/Length•Logical Connection Control•Physical Link Control•Flow Control•Congestion Control

Page 27: Chapter 7 OSI Data Link Layer

Framing: Role of the Header

HeaderHeader

Data TrailerStarStartt

Address

Type/Length

Specific bit sequence that

indicates to the receiving

device that the frame starts

here.

Specific bit sequence that

indicates to the receiving

device that the frame starts

here.

The source and

destination MAC

addresses.

The source and

destination MAC

addresses.

A code identifying the type of frame OR

the total length of the frame.

A code identifying the type of frame OR

the total length of the frame.

For example:

For example:

Page 28: Chapter 7 OSI Data Link Layer

Addressing: Where the Frame Goes

• The addresses used this layer are referred to as physical addresses.

• They are the burned-in MAC addresses of the network device (PC: NIC, Router: Physical port).

• They are only used for local delivery.• If the frame must be transported to

another segment, the frame is re-encapsulated by the receiving device and forwarded.

HeaderHeader

Data TrailerStartStart

Address

Type/Length

Page 29: Chapter 7 OSI Data Link Layer

Addressing: Where the Frame Goes

• The Data Link Layer protocol will define the addressing required to move the frame through the network.

OR send as a broadcastOR send as a broadcast

Page 30: Chapter 7 OSI Data Link Layer

Framing: Role of the Trailer

Header DataTrailerTrailer

FCSFCS StopStop

Frame Check Sequence (FCS): Used to provide basic error checking, usually with a Cyclic Redundancy Check (CRC).

- Sending device uses an algorithm on the bits of the header and data portions.

- The resulting value is placed in the FCS field.

- Receiving device does the same thing.

- If the values match – no error.- If the values do not match –

frame discarded.

Frame Check Sequence (FCS): Used to provide basic error checking, usually with a Cyclic Redundancy Check (CRC).

- Sending device uses an algorithm on the bits of the header and data portions.

- The resulting value is placed in the FCS field.

- Receiving device does the same thing.

- If the values match – no error.- If the values do not match –

frame discarded.

A specific sequence of bits that indicate the end of the frame.

A specific sequence of bits that indicate the end of the frame.

Page 31: Chapter 7 OSI Data Link Layer

Sample: Data Link Layer Frames

Point-to-Point Point-to-Point Protocol Protocol (PPP)(PPP)Point-to-Point Point-to-Point Protocol Protocol (PPP)(PPP) High Level Data High Level Data

LinkLinkControl Protocol Control Protocol

(HDLC)(HDLC)

High Level Data High Level Data LinkLink

Control Protocol Control Protocol (HDLC)(HDLC)

Frame Frame RelayRelay

ProtocolProtocol

Frame Frame RelayRelay

ProtocolProtocol

EthernetEthernetProtocolProtocolEthernetEthernetProtocolProtocol

Page 32: Chapter 7 OSI Data Link Layer

Ethernet Protocol for LANs

Page 33: Chapter 7 OSI Data Link Layer

Point-to-Point Protocol for WANs

Page 34: Chapter 7 OSI Data Link Layer

Wireless Protocol for LANs