Transcript Lecture 2
Protocol layering and data
Each layer takes data from above
adds header information to create new data
unit
passes new data unit to layer below
source
M
Ht M
Hn Ht M
Hl Hn Ht M
application
transport
network
link
physical
destination
application
Ht
transport
Hn Ht
network
link
Hl Hn Ht
physical
M
message
M
M
M
segment
datagram
frame
Protocol Headers
Data Link Header
IP Header
Pre DA SA 0800h version H L …
Ether Type
TCP Header
Trailer
6 … TCP Header Data FCS
Protocol
0x0800 Internet Protocol, Version 4
(IPv4)
0x0806 Address Resolution
Protocol (ARP)
0x8100 IEEE 802.1Q-tagged frame
0x86DD Internet Protocol, Version
6 (IPv6)
0x8847 MPLS unicast
0x8848 MPLS multicast
1: Internet Control Message
Protocol (ICMP)
2: Internet Group
Management Protocol (IGMP)
6: Transmission Control
Protocol (TCP)
17: User Datagram Protocol
(UDP)
89: Open Shortest Path First
(OSPF)
Ethernet
“dominant” LAN technology:
First widely used LAN technology
Simpler, cheaper than token LANs and ATM
Kept up with speed race: 10, 100, 1000 Mbps
Metcalfe’s Ethernet
sketch
Ethernet Technologies: 10Base2
10: 10Mbps; 2: under 200 meters max cable length
thin coaxial cable in a bus topology
repeaters used to connect up to multiple segments
repeater repeats bits it hears on one interface to its other
interfaces: physical layer device only!
has become a legacy technology
10BaseT and 100BaseT
10/100 Mbps rate; latter called “fast ethernet”
T stands for Twisted Pair
Nodes connect to a hub: “star topology”; 100 m
max distance between nodes and hub
nodes
hub
Ethernet hubs and switches
By definition of the term, Ethernet hubs:
Operate solely at Ethernet Layer 1
Repeat (regenerate) electrical signals to improve cabling
distances
Forward signals received on a port out all other ports (no
buffering)
Switches have the same cabling and signal
regeneration benefits as hubs, but switches do a lot
more—including sometimes reducing or even
eliminating collisions by buffering frames
When switches receive multiple frames on different
switch ports, they store the frames in memory buffers
to prevent collisions
Collision Domains
A collision domain is a set of devices that can send
frames that collide with frames sent by another device
in that same set of devices
Before the advent of LAN switches, Ethernets were
either physically shared (10BASE2 and 10BASE5) or
shared by virtue of shared hubs and their Layer 1
“repeat out all other ports” logic
Ethernet switches greatly reduce the number of
possible collisions, both through frame buffering and
through their more complete Layer 2 logic
Ethernet hubs and switches
Collision detection
CSMA/CD
The original Ethernet specifications expected collisions to occur
on the LAN
The media is shared
Any electrical signal induced onto the wire could collide with a
signal induced by another device
When two or more Ethernet frames overlap on the transmission
medium at the same instant in time, a collision occurs
The collision results in bit errors and lost frames
The original Ethernet specifications defined the Carrier Sense
Multiple Access with Collision Detection (CSMA/CD) algorithm to
deal with the inevitable collisions
CSMA/CD minimizes the number of collisions
CSMA/CD
A device with a frame to send listens until the Ethernet is not
busy (in other words, the device cannot sense a carrier
signal on the Ethernet segment).
When the Ethernet is not busy, the sender begins sending
the frame.
The sender listens to make sure that no collision occurred.
If there was a collision, all stations that sent a frame send a
jamming signal to ensure that all stations recognize the
collision.
After the jamming is complete, each sender of one of the
original collided frames randomizes a timer and waits that
long before resending. (Other stations that did not create the
collision do not have to wait to send.)
After all timers expire, the original senders can begin again
with Step 1
Ethernet :
Framing and Addressing
In many documents, the word frame refers to the bits and
bytes that include the Layer 2 header and trailer, along
with the data encapsulated by that header and trailer
The term packet is most often used to describe the Layer
3 header and data, without a Layer 2 header or trailer
Ethernet’s Layer 2 specifications relate to the creation,
forwarding, reception, and interpretation of Ethernet
frames
The original Ethernet specifications were owned by the
combination of Digital Equipment Corp., Intel, and Xerox—
hence the name “Ethernet (DIX)”
Ethernet :
Framing and Addressing
Ethernet at the Data Link layer is responsible for
Ethernet addressing, commonly referred to as
hardware addressing or MAC addressing
Ethernet is also responsible for framing packets
received from the Network layer and preparing them
for transmission on the local network
There are four different types of Ethernet frames
available:
Ethernet_II
IEEE 802.3
IEEE 802.2
SNAP
Ethernet :
Framing and Addressing
Ethernet :
Framing and Addressing
Following are the details of the different fields in the
802.3 and Ethernet frame types:
Preamble An alternating 1,0 pattern provides a 5MHz
clock at the start of each packet, which allows the
receiving devices to lock the incoming bit stream.
Start Frame Delimiter (SFD)/Synch The preamble is
seven octets and the SFD is one octet (synch). The SFD is
10101011.
Ethernet :
Framing and Addressing
Destination Address (DA) This transmits a 48-bit
value using the least significant bit (LSB) first. The DA
is used by receiving stations to determine whether an
incoming packet is addressed to a particular node. DA
may be unicast, broadcast or multicast.
Source Address (SA) The SA is a 48-bit MAC
address used to identify the transmitting device, and it
uses the LSB first. Broadcast and multicast address
formats are illegal within the SA field.
Length or Type 802.3 uses a Length field, but the
Ethernet frame uses a Type field to identify the
Network layer protocol. 802.3 cannot identify the
upper-layer protocol.
Ethernet :
Framing and Addressing
Data This is a packet sent down to the Data
Link layer from the Network layer. The size can
vary from 64 to 1500 bytes.
Frame Check Sequence (FCS) FCS is a field
at the end of the frame that’s used to store the
CRC.
Ethernet type II