SlideShare a Scribd company logo
Chapter 5
Link Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Last Lecture

Link Layer Switches
Todays’ Lecture

Address Resolution Protocol
(ARP)
Switch
 Link-layer Device

Store, forward Ethernet frames
 Examine incoming frame’s MAC address
 Selectively forward frame to the outgoing link
 Switch itself is transparent to the nodes
 Nodes are unaware of presence of switches
 Plug-and-Play
 Switches do not need to be configured
 Two important functions:
 Filtering


• Determines whether a frame should be forwarded to
some interface or should be dropped.


Forwarding
• Determine the interface to which a frame should be
directed
Switch Table


Q: How does switch know that
A’ reachable via interface 4,
B’ reachable via interface 5?

A

C’

B

 A: Each switch has a switch

table, each entry:
 MAC address of a host
 Interface that leads
towards the host
 Time at which the entry
for the node as placed in
the table

 How is the table created?

6

1
5

2

3

4
C

B’

A’
switch with six interfaces
(1,2,3,4,5,6)
Switch: self-learning
 switch

learns which hosts

can be reached through
which interfaces




Source: A
Dest: A’

A A A’

C’

when frame received,
switch “learns” location of
sender: incoming LAN
segment
records sender/location
pair in switch table

B
1

6

5

2

3

4
C

B’

A’

MAC addr interface TTL
A

1

60

Switch table
(initially empty)
Self-Learning,Forwarding:Example

Source: A
Dest: A’

A A A’

C’

B

 frame destination
unknown: flood

6
A A’

1

2
4

5

 destination A

location known:
selective send

C

A’ A
B’

3

A’

MAC addr interface TTL
A
A’

1
4

60
60

Switch table
(initially empty)
Interconnecting Switches
 switches can be connected together
S4

S1

S2

A
B

S3

C

F

D
E

I
G

H

 Q: sending from A to G - how does S1 know to

forward frame destined to G via S4 and S3?
 A: self learning! (works exactly the same as in
single-switch case!)
Switch: Advantages

 Elimination of Collisions:
 Switches

buffer frames and never transmit
more than one frame on any segment at one
time
 Modern switches are Full Duplex
 Heterogeneous Links
 Switch isolates one link from another
 Different links can operate at different
speeds and over different media
Difference between Hubs and Switches?
Difference between Switches and Routers?
(Home Assignment)
MAC Addresses
 32-bit IP address:


network-layer address

used to get datagram to destination IP subnet
 MAC (or LAN or physical or Ethernet) address:
 A node also has a link layer address


• Nodes adapter


6 Bytes (48 bit) MAC address (for most LANs)
• Expressed in Hexadecimal notation

 No two adapters have the same MAC address
 IEEE manages the MAC address space
 MAC address does not change no matter where the adapter
goes
 MAC address: like NIC number

IP address: like postal address
MAC Addresses
Each adapter on LAN has unique LAN address

1A-2F-BB-76-09-AD

71-65-F7-2B-08-53

LAN
(wired or
wireless)

Broadcast address =
FF-FF-FF-FF-FF-FF

= adapter
58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98
ARP: Address Resolution Protocol
 How does the sending node A with IP

222.222.222.220 determine the MAC address for the
destination node B with IP address say
222.222.222.222?
 Job of Address Resolution Protocol (ARP)
 ARP module in the sending node
• Takes IP address on the same LAN as input
• Return corresponding MAC address
 Each node has an ARP table



Contains mapping of IP addresses to MAC addresses
The ARP table contains a time-to-live (TTL) value
• Indicates when each mapping will be deleted from the table
• Typical expiration time is 20 minutes
ARP: Same LAN (network)
 A wants to send datagram

to B, and B’s MAC address
not in A’s ARP table.
 A broadcasts ARP query
packet, containing B's IP
address
 Destination MAC
address = FF-FF-FF-FFFF-FF
 All machines on LAN
receive ARP query
 B receives ARP packet,
replies to A with its (B's)
MAC address


Frame sent to A’s MAC
address (unicast)

 A caches (saves) IP-to-

MAC address pair in its
ARP table until information
becomes old (times out)

 ARP is “plug-and-play”:
 nodes create their ARP
tables without
intervention from
network administrator
Addressing: Routing to another LAN
Send datagram from A to B via Router (R)
assume A knows B’s IP address
88-B2-2F-54-1A-0F

74-29-9C-E8-FF-55

A

111.111.111.111

E6-E9-00-17-BB-4B
1A-23-F9-CD-06-9B

222.222.222.220
111.111.111.110
111.111.111.112

R

222.222.222.221

222.222.222.222

B

49-BD-D2-C7-56-2A

CC-49-DE-D0-AB-7D

 Router has two interfaces, two IP addresses, two ARP

modules and two adapters
 A creates IP datagram with destination IP of B
 A uses ARP to get MAC address of R (111.111.111.110)
 A creates link-layer frame with R's MAC address as dest,







frame contains A-to-B IP datagram
A’s adapter sends frame
R’s adapter receives frame
R removes IP datagram from frame, sees its destined to B
R uses ARP to get B’s MAC address
R creates frame containing A-to-B IP datagram and sends to
B
88-B2-2F-54-1A-0F

74-29-9C-E8-FF-55

A

E6-E9-00-17-BB-4B

111.111.111.111

222.222.222.220
111.111.111.110
111.111.111.112

CC-49-DE-D0-AB-7D

222.222.222.221

1A-23-F9-CD-06-9B

R

222.222.222.222

B

49-BD-D2-C7-56-2A
Announcements
 Lab Final on Wednesday, 1st January 2014
Every

one has to be present at 2pm
Objective paper: 25 min at 2pm
Hands-on Exam: 45 min
For Hands-on Exam: Class divided into
two groups
On the Spot Marking of Hands-on
Exam
Announcements
 Research Presentations/Demos
 Thursday

2nd January, 2014
• 12pm-1pm and 3pm-5pm
 Friday 3rd January, 2014
• 11am-1pm and 2pm- 4pm
 Bring hardcopy of your allocated Paper and
report


Viva/Report for programming project

 Paper Showing on 15th January, 2014 after

exam of Software Engineering at 1pm.


Venue will be notified via email

More Related Content

PPTX
Week15 lec1
PPTX
Week13 lec2
PPTX
Week13 lec1
PPTX
Week14 lec2
PPTX
Distance Vector Routing Protocols
PPT
Routing, Different types of forwarding technique
PDF
Routing
PPT
Routing
Week15 lec1
Week13 lec2
Week13 lec1
Week14 lec2
Distance Vector Routing Protocols
Routing, Different types of forwarding technique
Routing
Routing

What's hot (20)

PPT
Routing
PPTX
Routing algorithm
PPTX
Distance Vector & Link state Routing Algorithm
PDF
PPT
Network layer
PPTX
Lecture 3 network layer
PPTX
Routing Technique Table Type by Umar danjuma maiwada.ppt
PDF
Network layer ip address assignment and routing
PPSX
OSPF - Routing Protocol
PPT
Routing table and routing algorithms
PPT
Routing protocols
PPTX
Network Layer
PPTX
Computer Network - Network Layer
PPT
Chapter 5 : Link Layer
PPT
Aodv slide final
PPT
Evolution of Routing Techniques
PPTX
Unit 3 - Data Link Layer - Part B
PPTX
Pathlet routing_Demo2
Routing
Routing algorithm
Distance Vector & Link state Routing Algorithm
Network layer
Lecture 3 network layer
Routing Technique Table Type by Umar danjuma maiwada.ppt
Network layer ip address assignment and routing
OSPF - Routing Protocol
Routing table and routing algorithms
Routing protocols
Network Layer
Computer Network - Network Layer
Chapter 5 : Link Layer
Aodv slide final
Evolution of Routing Techniques
Unit 3 - Data Link Layer - Part B
Pathlet routing_Demo2
Ad

Viewers also liked (16)

PPTX
Fusf presentation to share 11.20
PPT
Russell Drake Miami
PPTX
Ledelse i det digitale landskapet - Foredrag Social Media Days 2016
PPTX
Sweater for women by geoffrey kachale banda
PDF
2014 PEPSG(2Jan2015 ver)
PDF
Amar s olar energy-prezentare generala
PPTX
TRABAJO
PPS
Fot qué fotografías
PPTX
Bullying
PPTX
2.5 fractions w
PPTX
Revolutionary 7-day Weight Loss Plan to Shed Pounds
PPT
Questionnaire analysis
PPTX
Analysing magazines
PPTX
Your_ideal_pet
PDF
Cara Hosting di 0fees
PPTX
Style sheet
Fusf presentation to share 11.20
Russell Drake Miami
Ledelse i det digitale landskapet - Foredrag Social Media Days 2016
Sweater for women by geoffrey kachale banda
2014 PEPSG(2Jan2015 ver)
Amar s olar energy-prezentare generala
TRABAJO
Fot qué fotografías
Bullying
2.5 fractions w
Revolutionary 7-day Weight Loss Plan to Shed Pounds
Questionnaire analysis
Analysing magazines
Your_ideal_pet
Cara Hosting di 0fees
Style sheet
Ad

Similar to Week16 lec1 (20)

PPTX
Lecture 26 Link Layer .pptx
PDF
Communication networks_ARP
PPT
ARP.ppt
PPT
link layer
PPTX
Computer networks module 2 data link layer
PPT
Lecture2 mac learning
PDF
networking.pdf
PPTX
Layer 2 switching
PPT
Lecture 07
PPT
11 switches
PPT
Switch & hub
PPT
Ch5 data layer network
PPTX
Advanced Networking link layer..chap-5.pptx
PPTX
Address resolution protocol (ARP)
PPTX
Introduction to data link layer
PPTX
mao nani run saun nalang jud ni sir-Chp5.pptx
PDF
Lec11 on Computer Networks by Tarun Mangla.pdf
PPT
Address resolution protocol
PDF
Arp config-arp
PDF
CCNP_qefwqqw3fqwfq2wrffqwf2qwfwqwfS1.pdf
Lecture 26 Link Layer .pptx
Communication networks_ARP
ARP.ppt
link layer
Computer networks module 2 data link layer
Lecture2 mac learning
networking.pdf
Layer 2 switching
Lecture 07
11 switches
Switch & hub
Ch5 data layer network
Advanced Networking link layer..chap-5.pptx
Address resolution protocol (ARP)
Introduction to data link layer
mao nani run saun nalang jud ni sir-Chp5.pptx
Lec11 on Computer Networks by Tarun Mangla.pdf
Address resolution protocol
Arp config-arp
CCNP_qefwqqw3fqwfq2wrffqwf2qwfwqwfS1.pdf

More from syedhaiderraza (20)

PPTX
Week14 lec1
PPTX
Week11 lec2
PPTX
Week11 lec1
PPTX
Week10 lec1
PPTX
Week9 lec1
PPTX
Week8 lec2-bscs1
PPTX
Week8 lec1-bscs1
PPTX
Week5 lec3-bscs1
PPTX
Week5 lec2-bscs1
PPT
Week5 lec1-bscs1
PPTX
Week4 lec2-bscs1
PPTX
Week4 lec1-bscs1
PPTX
Week3 lec3-bscs1
PPTX
Week3 lec 2
PPTX
Week3 lec 1
PPTX
Week2 lec3-bscs1
PPTX
Week2 lec2-bscs1
PPTX
Week2 lec1-bscs1
PPT
Week1 lec2-bscs1
PPT
Week1 lec1-bscs1
Week14 lec1
Week11 lec2
Week11 lec1
Week10 lec1
Week9 lec1
Week8 lec2-bscs1
Week8 lec1-bscs1
Week5 lec3-bscs1
Week5 lec2-bscs1
Week5 lec1-bscs1
Week4 lec2-bscs1
Week4 lec1-bscs1
Week3 lec3-bscs1
Week3 lec 2
Week3 lec 1
Week2 lec3-bscs1
Week2 lec2-bscs1
Week2 lec1-bscs1
Week1 lec2-bscs1
Week1 lec1-bscs1

Recently uploaded (20)

PPTX
Lesson notes of climatology university.
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Empowerment Technology for Senior High School Guide
PDF
IGGE1 Understanding the Self1234567891011
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Classroom Observation Tools for Teachers
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Computing-Curriculum for Schools in Ghana
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Lesson notes of climatology university.
Digestion and Absorption of Carbohydrates, Proteina and Fats
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Unit 4 Skeletal System.ppt.pptxopresentatiom
Empowerment Technology for Senior High School Guide
IGGE1 Understanding the Self1234567891011
Weekly quiz Compilation Jan -July 25.pdf
History, Philosophy and sociology of education (1).pptx
What if we spent less time fighting change, and more time building what’s rig...
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Classroom Observation Tools for Teachers
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Supply Chain Operations Speaking Notes -ICLT Program
Computing-Curriculum for Schools in Ghana
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation

Week16 lec1

  • 1. Chapter 5 Link Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 4. Switch  Link-layer Device Store, forward Ethernet frames  Examine incoming frame’s MAC address  Selectively forward frame to the outgoing link  Switch itself is transparent to the nodes  Nodes are unaware of presence of switches  Plug-and-Play  Switches do not need to be configured  Two important functions:  Filtering  • Determines whether a frame should be forwarded to some interface or should be dropped.  Forwarding • Determine the interface to which a frame should be directed
  • 5. Switch Table  Q: How does switch know that A’ reachable via interface 4, B’ reachable via interface 5? A C’ B  A: Each switch has a switch table, each entry:  MAC address of a host  Interface that leads towards the host  Time at which the entry for the node as placed in the table  How is the table created? 6 1 5 2 3 4 C B’ A’ switch with six interfaces (1,2,3,4,5,6)
  • 6. Switch: self-learning  switch learns which hosts can be reached through which interfaces   Source: A Dest: A’ A A A’ C’ when frame received, switch “learns” location of sender: incoming LAN segment records sender/location pair in switch table B 1 6 5 2 3 4 C B’ A’ MAC addr interface TTL A 1 60 Switch table (initially empty)
  • 7. Self-Learning,Forwarding:Example Source: A Dest: A’ A A A’ C’ B  frame destination unknown: flood 6 A A’ 1 2 4 5  destination A location known: selective send C A’ A B’ 3 A’ MAC addr interface TTL A A’ 1 4 60 60 Switch table (initially empty)
  • 8. Interconnecting Switches  switches can be connected together S4 S1 S2 A B S3 C F D E I G H  Q: sending from A to G - how does S1 know to forward frame destined to G via S4 and S3?  A: self learning! (works exactly the same as in single-switch case!)
  • 9. Switch: Advantages  Elimination of Collisions:  Switches buffer frames and never transmit more than one frame on any segment at one time  Modern switches are Full Duplex  Heterogeneous Links  Switch isolates one link from another  Different links can operate at different speeds and over different media Difference between Hubs and Switches? Difference between Switches and Routers? (Home Assignment)
  • 10. MAC Addresses  32-bit IP address:  network-layer address used to get datagram to destination IP subnet  MAC (or LAN or physical or Ethernet) address:  A node also has a link layer address  • Nodes adapter  6 Bytes (48 bit) MAC address (for most LANs) • Expressed in Hexadecimal notation  No two adapters have the same MAC address  IEEE manages the MAC address space  MAC address does not change no matter where the adapter goes  MAC address: like NIC number IP address: like postal address
  • 11. MAC Addresses Each adapter on LAN has unique LAN address 1A-2F-BB-76-09-AD 71-65-F7-2B-08-53 LAN (wired or wireless) Broadcast address = FF-FF-FF-FF-FF-FF = adapter 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98
  • 12. ARP: Address Resolution Protocol  How does the sending node A with IP 222.222.222.220 determine the MAC address for the destination node B with IP address say 222.222.222.222?  Job of Address Resolution Protocol (ARP)  ARP module in the sending node • Takes IP address on the same LAN as input • Return corresponding MAC address  Each node has an ARP table   Contains mapping of IP addresses to MAC addresses The ARP table contains a time-to-live (TTL) value • Indicates when each mapping will be deleted from the table • Typical expiration time is 20 minutes
  • 13. ARP: Same LAN (network)  A wants to send datagram to B, and B’s MAC address not in A’s ARP table.  A broadcasts ARP query packet, containing B's IP address  Destination MAC address = FF-FF-FF-FFFF-FF  All machines on LAN receive ARP query  B receives ARP packet, replies to A with its (B's) MAC address  Frame sent to A’s MAC address (unicast)  A caches (saves) IP-to- MAC address pair in its ARP table until information becomes old (times out)  ARP is “plug-and-play”:  nodes create their ARP tables without intervention from network administrator
  • 14. Addressing: Routing to another LAN Send datagram from A to B via Router (R) assume A knows B’s IP address 88-B2-2F-54-1A-0F 74-29-9C-E8-FF-55 A 111.111.111.111 E6-E9-00-17-BB-4B 1A-23-F9-CD-06-9B 222.222.222.220 111.111.111.110 111.111.111.112 R 222.222.222.221 222.222.222.222 B 49-BD-D2-C7-56-2A CC-49-DE-D0-AB-7D  Router has two interfaces, two IP addresses, two ARP modules and two adapters
  • 15.  A creates IP datagram with destination IP of B  A uses ARP to get MAC address of R (111.111.111.110)  A creates link-layer frame with R's MAC address as dest,      frame contains A-to-B IP datagram A’s adapter sends frame R’s adapter receives frame R removes IP datagram from frame, sees its destined to B R uses ARP to get B’s MAC address R creates frame containing A-to-B IP datagram and sends to B 88-B2-2F-54-1A-0F 74-29-9C-E8-FF-55 A E6-E9-00-17-BB-4B 111.111.111.111 222.222.222.220 111.111.111.110 111.111.111.112 CC-49-DE-D0-AB-7D 222.222.222.221 1A-23-F9-CD-06-9B R 222.222.222.222 B 49-BD-D2-C7-56-2A
  • 16. Announcements  Lab Final on Wednesday, 1st January 2014 Every one has to be present at 2pm Objective paper: 25 min at 2pm Hands-on Exam: 45 min For Hands-on Exam: Class divided into two groups On the Spot Marking of Hands-on Exam
  • 17. Announcements  Research Presentations/Demos  Thursday 2nd January, 2014 • 12pm-1pm and 3pm-5pm  Friday 3rd January, 2014 • 11am-1pm and 2pm- 4pm  Bring hardcopy of your allocated Paper and report  Viva/Report for programming project  Paper Showing on 15th January, 2014 after exam of Software Engineering at 1pm.  Venue will be notified via email