Layer 2: Concepts

fullgorgedcutNetworking and Communications

Oct 24, 2013 (3 years and 10 months ago)

73 views

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Year 1
-

Chapter 6

Layer 2: Concepts


www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Objectives


Understand how LANs operate at Layer 2


Understand hexadecimal numbers


Understand MAC addressing


Describe framing


Describe Media Access Control (MAC)

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Layer 1 vs. Layer 2


Layer 1


Cannot communicate with
the upper
-
layer protocols



Cannot name or identify
computers


Can describe only streams
of bits


Cannot decide which
computer will transmit data
from a group in which all are
trying to transmit at the
same time


Layer 2


Communicates with upper
-
layer protocols using
logical link control (LLC)


Provides an addressing
(or naming) process


Uses framing to organize
or group the bits


Uses a system called
Media Access Control
(MAC) to control
transmissions

Layer 2 deals with the limitations of Layer 1

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Comparing LAN Standards

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

OSI Layer 1 and 2 Together
Are the Access Protocols


These are the delivery
system protocols


Independent of:


Network OS


Upper
-
level protocols


TCP/IP, IPX/SPX


Sometimes called:


Access methods


Access protocols


Access technologies


Media access


LAN protocols


WAN protocols

Ethernet, Fast Ethernet, Gigabit
Ethernet, Token Ring, FDDI, Frame
Relay, ATM, PPP, and so on

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

IEEE Standard


Divided OSI Layer 2 into two sublayers


Media Access Control (MAC)


traditional L2 features


Transitions down to media


Logical link control (LLC)


new L2 features


Transitions up to the network layer

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Logical Link Control (LLC)


Allows part of the data link layer to function
independent of LAN access technologies
(protocols / methods)


Provides services to network layer protocols, while
communicating with access technologies below it


LAN access technologies:



Ethernet


Token Ring


FDDI

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Logical Link Control (LLC)


Participates in the data encapsulation process.


LLC PDU between Layer 3 and MAC sublayer


Adds control information to the network layer data to
help deliver the packet. It adds two fields:


Destination Service Access Point (DSAP)


Source Service Access Point (SSAP)


Supports both connectionless and connection
-
oriented upper
-
layer protocols


Allows multiple higher layer protocols to share a
single physical data link

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Media Access Control (MAC)


Provides MAC Addressing (naming)


Depending on access Technology
(Ethernet, Token Ring, FDDI), Provides:


Data transmission control


Collision resolution (retransmission)


Layer 2 frame preparation (data framing)


Frame Check Sequence (FCS)

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Media Access Control (MAC)
Protocols


Ethernet (IEEE 802.3)


Logical bus topology


Physical star or extended star


Nondeterministic


First
-
come, first
-
served


Token Ring (IEEE 802.5)


Logical ring


Physical star topology


Deterministic


Token controls traffic


Older declining technology


FDDI (IEEE 802.5)


Logical ring topology


Physical dual
-
ring topology


Deterministic


Token controls traffic


Near
-
end
-
of
-
life technology

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Ethernet (CSMA/CD)

Carrier Sense Multiple Access with Collision Detection


www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Four Main Layer 2 Concepts
for CCNAs to Know


Layer 2:


Communicates with the upper
-
level layers through
logical link control (LLC)


Uses a flat naming convention


Naming refers to the assignment of unique identifiers
(addresses)


Uses framing to organize or group the data bits


Uses Media Access Control (MAC) to choose
which computer will transmit binary data, from a
group trying to transmit at the same time

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Hexadecimal Numbers


As MAC addresses


Basic hexadecimal (hex) numbering


Converting decimal numbers to HEX


Converting HEX values to decimal


HEX to Binary conversions

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

HEX Values in MAC
Addresses


MAC addresses are:


48 bits in length (12 hexadecimal digits)


First 6 hex digits identify the manufacturer or vendor
-

organizational
unique identifier (OUI)


Remaining 6 hex digits identify the interface serial number


Sometimes called burned
-
in addresses (BIAs) because they are burned into
read
-
only memory (ROM)


Copied into RAM when the NIC initializes

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Basic Hexadecimal (Hex)
Numbering

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Converting Hex to Decimal

HEX Value: 1234

HEX Value: 1C3F

HEX Value: FF

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Converting Decimal to Hex

Decimal Value: 191

HEX equivalent: BF

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Hexadecimal and Binary
Numbers


To convert binary to hex:


Break binary value into 4
-
bit numbers
beginning from the right side.


If the value doesn't break evenly into
4 bits, add 0s to the left end until it
does.


Convert each 4
-
bit value to its hex
equivalent.


Some find it easier to go binary to
decimal to hex.


This technique will work regardless of
the size of the binary number.

To convert
11100111

binary to hex:

1.

Break value into two 4
-
bit numbers:


1110

and
0111

2.

1110

=
14

in decimal or

E

in hexadecimal.

3.
0111

=
7

in both


so the result is
E7
.

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

MAC Addressing


Data link layer MAC identifiers


MAC address and NICs


How the NIC uses MAC addresses


Layer 2 address encapsulation and de
-
encapsulation


Limitations of MAC addressing

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Layer 2 MAC Identifiers


Without MAC addresses, you have a group of nameless
computers on your LAN.


Layer 2 header contains both a source and destination
MAC address.


Used by the access technology (protocol)
-

Ethernet, Token
Ring or FDDI

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

MAC Addresses and NICs


Every network computer needs a unique address.


The MAC address is the
physical

address.


No two LAN physical addresses can be the same.


Physical address is located on the NIC.

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

NICs

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

How the NIC Uses MAC
Addresses

Legacy (Broadcast) Ethernet:


Source host builds a Layer 2 data frame.


Its own MAC is the source address.


The MAC of the target is the destination address.


All devices on the segment see the frame.


Only the target’s NIC recognizes its MAC address in
the Destination Address field.


Target host copies and processes the frame.

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Layer 2 Address Encapsulation
and De
-
encapsulation

Source and
Destination MAC
address fields are part
of the frame header.

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Limitations of MAC
Addressing


Good news


Ample possible addresses
(16.78 Million Owners each with 16.78 Million addresses)


Bad news


No hierarchical pattern to the addresses


The more hosts, the greater the problem

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Framing


Why framing is necessary


Frame format diagram


Generic frame format

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Why Framing Is Necessary


Binary data is a stream of 1s and 0s.


Framing breaks the stream into decipherable groupings:


Start and stop indicator fields


Naming or addressing fields


Data fields


Quality
-
control fields


Framing is the Layer 2 encapsulation process.


A frame is the Layer 2 protocol data unit.

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Generic Frame Format


Start Frame Field


Address Fields (Source & Destination MAC)


Type / Length Field


Data Field


FCS (Frame Check Sequence) Field


Frame Stop Field

www.ciscopress.com

Copyright 2002

Cisco Press: CCNA Instructor’s Manual

Chapter #6 Test Next Week


This Class:


Chapter 4 Labs due!


Eng Journal due next week (ch 1 to 5)


Finish Labs:


Chapter 5


no Labs for Chapter 6!


# conversion exercises


Next Class:


Test (miss class on Monday!!)


Need to Study