2-1-Link Layer Addressing-V4

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

Computer Networks

Link Layer - Services and


Addressing
S.V.Jansi Rani
Associate Professor / CSE

1
Agenda
Introduction to Link Layer
Link, nodes, services , point ot point and
broadcast links

Link Layer Addressing


Three types of addressing, ARP protocol

2/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
3/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
INTRODUCTION

The Internet is a combination of networks glued


together by connecting devices (routers or
switches). If a packet is to travel from a host to
another host, it needs to pass through these
networks.

4/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.4
Communication at the data-link layer

5/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.5
Nodes and Links

- Node-to-node
- Data unit from one point in the Internet needs to
pass through many networks (LANs and WANs) to
reach another point.
- LANs and WANs are connected by routers.
- It is customary to refer to the two end hosts and the
routers as nodes and the networks in between as links.

6/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.6
Nodes and Links

7/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.7
Services

• The data-link layer is located between the physical


and the network layers
• Encapsulate datagram/packet in a frame and
decapsulate the datagram /packet from the frame -
Analogy
• Framing
• Flow Control - Producer -Consumer
• Error Control
• Congestion Control - sometimes in WAN

8/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.8
A communication with only three nodes

9/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.9
Two Categories of Links

Data-link layer controls how the medium is used

Point-to-point link or a broadcast link

10/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.10
Two Sublayers

Data Link Control (DLC) and media access control


(MAC)

Media access control (MAC) -specific to broadcast


link

11/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.11
Dividing the data-link layer into two sublayers

12/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.12
LINK-LAYER ADDRESSING

• The source and destination IP addresses define the


two ends but cannot define which links the packet
should pass through.
• Link Layer address / MAC Address/ Hardware
Address /Physical Address
• Encapsulated in a frame and two data-link addresses
are added to the frame header
• These two addresses are changed every time the
frame moves from one link to another.

13/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.13
Ld,Ls,Ns,Nd

14/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
IP addresses and link-layer addresses in a small internet

15/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.15
More....?
• If the IP address of a router does not appear in any
datagram sent from a source to a destination, why do we
need to assign IP addresses to routers?
• Why do we need more than one IP address in a router, one
for each interface?
• How are the source and destination IP addresses in a
packet determined?
• How are the source and destination link-layer addresses
determined for each link?

16/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
Three Types of addresses

Some link-layer protocols define three types of


addresses:
Unicast

Multicast

Broadcast

17/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.17
Example
Unicast link-layer addresses in the most common LAN,
Ethernet, are 48 bits (six bytes) that are presented as 12
hexadecimal digits separated by colons; for example, the
following is a link-layer address of a computer.
LSB of first byte should be 0.

A2:34:45:11:92:F1

18/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.18
Example
Multicast link-layer addresses in the most common LAN,
Ethernet, are 48 bits (six bytes) that are presented as 12
hexadecimal digits separated by colons. LSB of first byte
should be 1.

A3:34:45:11:92:F1

19/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.19
Example
Broadcast link-layer addresses in the most common LAN,
Ethernet, are 48 bits, all 1s, that are presented as 12
hexadecimal digits separated by colons. The following
shows a broadcast address:

20/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.20
Address Resolution Protocol (ARP)

Anytime a node has an IP datagram to send to another


node in a link, it has the IP address of the receiving
node. However, the IP address of the next node is not
helpful in moving a frame through a link; we need the
link-layer address of the next node. This is the time
when the Address Resolution Protocol (ARP)
becomes helpful.

21/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.21
Position of ARP in TCP/IP protocol suite

22/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.22
ARP operation

23/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.23
• Instead of sending one broadcast frame (ARP request), one
unicast frame (ARP response), and another unicast frame
(for sending the datagram), system A can encapsulate the
datagram and send it to the network. System B receives it
and keep it; other systems discard it.
• Eg: 20 systems. A to B. 180 frames , 18 frames

24/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
ARP packet

25/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.25
Example
A host with IP address N1 and MAC address L1 has a
packet to send to another host with IP address N2 and
physical address L2 (which is unknown to the first host).
The two hosts are on the same network.

26/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.26
Example 9.4

27/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.27
The internet for our example

28/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.28
Flow of packets at Alice site

29/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.29
Flow of activities at router R1

30/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.30
31/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

9.31
32/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
Outcome
Student should be able to
• Understand about link, nodes, point to point and broadcast
links

• Services of Data Link Layer

• Demonstrate the different addressing of link layer

• Explalin how ARP works

33/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
Test Your Understanding
• A message transfers from A to B via, R1,R2,R3. During
intial configuration when R2 sends ARP request, what is link
layer address of R3? ______________
• List out the functions of link layer __________,
_____,_________

34/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE
THANK YOU

35/35
S.V.JANSI RANI/Assoc Prof /CSE/SSNCE

You might also like