DCN - 3 - Introduction To Data Link Layer
DCN - 3 - Introduction To Data Link Layer
Note
To be transmitted,
data must be transformed to electromagnetic signals.
•11
•Physical Layer
The physical layer defines the means of transmitting raw bits rather than
logical data packets over a physical link connecting network nodes.
The bit stream may be grouped into code words or symbols and
converted to a physical signal that is transmitted over a hardware
transmission medium.
Datagram
Frame
Electrical and
Optical signals
9.1.2 Services
Relationship between packets and frames.
9.1.2 Services
• Provide service interface to the network layer
• Access control
• Resolve how multiple nodes share the same data channel
• Framing
– A packet at the data-link layer is normally called a frame.
– Layer 2 uses framing to organize or group the bits.
– Determines how the bits of the physical layer are grouped into
frames (framing).
• Physical addressing (MAC address)
• Layer 2 uses an addressing process to identify computers.
9.1.2 Services
• Flow control
• pacing between adjacent sending and receiving nodes
• Constrain sender from overwhelming receiver
• Regulating data flow
• Slow receivers not swamped by fast senders
• Error control
• Dealing with transmission errors
• Adding error detection/correction bits
• Detect error, correct error
• errors caused by signal attenuation, noise
• receiver detects presence of errors:
•
Data Link Layer
• Home Work-3.1 :
– Why we are having error checking at Transport Layer
(End to end ) when error checking is also there at Data
link Layer (Hop to hop) ?
1 2 3 4 5
Hop to Hop
Argon Neon
•Example device:
•Ethernet switch/hub
•WiFi access point
•9.1.3 Two Categories of Links
• Although two nodes are physically connected by a transmission
medium such as cable or air, we need to remember that the data-link
layer controls how the medium is used.
• We can have a data-link layer that uses the whole capacity of the
medium; we can also have a data-link layer that uses only part of
the capacity of the link.
•35
•9.1.3 Two Categories of Links
• In a point-to-point link, the link is dedicated to the two
devices.
– For example, when two friends use the traditional home phones to
chat, they are using a point-to-point link.
•36
•9.1.4 Two Sub layers
• To better understand the functionality of and the
services provided by the link layer, we can divide
the data-link layer into two sub layers:
– Data link control (DLC)
– Media Access control (MAC).
• Data link control (DLC) sub layer deals with all issues
common to both point-to-point and broadcast links.
•40
•Why IP address is not sufficient ?
• In a connectionless internetwork (such as the Internet),
we cannot make a datagram reach its destination using
only IP addresses. The two reasons are :
•41
•Why IP address is not sufficient ?
2. IP addresses in a datagram should not be changed.
• If the destination IP address in a datagram changes,
the packet never reaches its destination .
• Further if the source IP address in a datagram
changes, the destination host or a router can never
communicate with the source if a response needs to
be sent back or an error needs to be reported back to
the source (sometimes in some Protocols).
•5-44
•MAC Address vs. IP Address
• MAC addresses
– Hard-coded in read-only memory when adaptor is built
– Like a social security number
– Flat name space of 48 bits (e.g., 00-0E-9B-6E-49-76)
– Portable, and can stay the same as the host moves (can move LAN card from one LAN to
another )
– Used to get packet between interfaces on same network
• IP addresses
– Configured, or learned dynamically
– Like a postal mailing address
– Hierarchical (not portable ) name space of 32 bits (e.g., 12.178.66.9) and depends on IP
subnet to which node is attached
– Not portable, and depends on where the host is attached
– Used to get a packet to destination IP subnet
•MAC Address vs. IP Address
• One can think of IP addressing as supporting the
software implementation and MAC addresses as
supporting the hardware implementation of the network
stack.
•46
•MAC Address vs. IP Address
• IP networks maintain a mapping (association) between
the IP address of a device and its MAC address.
– This mapping is known as the ARP cache or ARP table.
– ARP, the Address Resolution Protocol, supports the logic for
obtaining this mapping and keeping the cache up to date.
•48
•Three Types of addresses
• Unicast Address
– Each host or each interface of a router is assigned a
unicast address.
– Unicasting means one-to-one communication.
– A frame with a unicast address destination is destined
only for one entity in the link.
• These two addresses are changed every time the frame moves
from one link to another
• 0000.0c12.3456 .
•MAC address format
• MAC addresses are sometimes referred to as
burned-in addresses (BIAs) .
24 bits 24 bits
00e0.fc01.2345 00e0.fc01.2345
Rom
Ram
•Example
• Who is manufacturer of , 00:A0:C9:14:C8:29 ?
• Answer:
– The prefix 00A0C9 indicates the manufacturer is Intel
Corporation
Destination Address
Source Address
•Technologies Using MAC-48 Identifier
• The least significant bit of the first byte defines the type of address.
• If the bit is 0, the address is unicast;
• otherwise, it is multicast.
• The broadcast destination address is a special case of the multicast
address in which all bits are 1s.
•81
•Standard networking protocols
(communications standards)
Host A PDU
Upper layer
IP header
data Network layer Packet
Upper layer
LLC header FCS
data
Data link layer Frame
Upper layer
MAC header FCS
data
Host B
Application
Upper layer data
layer
Transport
TCP Upper layer data
layer
er
head
Network TCP+ upper layer data
IP
layer der
hea
IP+TCP+ upper layer data
Data link LLC
der
hea
layer
LLC header+ IP+TCP+ upper layer data
C
MA
Physical der
hea
layer 0101110101001000010
•Two Sub-layers WHY ?
1. LLC sublayer
• Refers to the functions required for the establishment and
control of logical links between local devices on a network.
Packet
Packet Frame