Top Banner
Chapter 5 Link Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
17
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Week16 lec1

Chapter 5 Link Layer

Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith RossAddison-Wesley, July

2007.

Page 2: Week16 lec1

Last Lecture

Link Layer Switches

Page 3: Week16 lec1

Todays’ Lecture

Address Resolution Protocol (ARP)

Page 4: Week16 lec1

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

Page 5: Week16 lec1

Switch Table

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

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?

A

A’

B

B’

C

C’

switch with six interfaces(1,2,3,4,5,6)

1 23

45

6

Page 6: Week16 lec1

Switch: self-learning

switch learns which hosts can be reached through which interfaces when frame received,

switch “learns” location of sender: incoming LAN segment

records sender/location pair in switch table

A

A’

B

B’

C

C’

1 23

45

6

A A’

Source: ADest: A’

MAC addr interface TTL

Switch table (initially empty)

A 1 60

Page 7: Week16 lec1

Self-Learning,Forwarding:Example

A

A’

B

B’

C

C’

1 23

45

6

A A’

Source: ADest: A’

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A A’A A’A A’A A’A A’

frame destination unknown:flood

A’ A

destination A location known:

A’ 4 60

selective send

Page 8: Week16 lec1

Interconnecting Switches

switches can be connected together

A

B

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!)

S1

C D

E

FS2

S4

S3

H

I

G

Page 9: Week16 lec1

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 anotherDifferent links can operate at different

speeds and over different media Difference between Hubs and Switches?

Difference between Switches and Routers?

(Home Assignment)

Page 10: Week16 lec1

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

Page 11: Week16 lec1

MAC AddressesEach adapter on LAN has unique LAN address

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

= adapter

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

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

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

LAN(wired orwireless)

Page 12: Week16 lec1

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

Page 13: Week16 lec1

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-FF-FF-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

Page 14: Week16 lec1

Addressing: Routing to another LAN

R

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

222.222.222.220111.111.111.110

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

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

111.111.111.112

111.111.111.111

A74-29-9C-E8-FF-55

222.222.222.221

88-B2-2F-54-1A-0F

B222.222.222.222

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

Send datagram from A to B via Router (R) assume A knows B’s IP address

Router has two interfaces, two IP addresses, two ARP modules and two adapters

Page 15: Week16 lec1

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

R

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

222.222.222.220

111.111.111.110

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

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

111.111.111.112

111.111.111.111

A74-29-9C-E8-FF-55

222.222.222.221

88-B2-2F-54-1A-0F

B222.222.222.222

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

Page 16: Week16 lec1

AnnouncementsLab Final on Wednesday, 1st January

2014Every one has to be present at 2pmObjective paper: 25 min at 2pmHands-on Exam: 45 minFor Hands-on Exam: Class divided

into two groupsOn the Spot Marking of Hands-on

Exam

Page 17: Week16 lec1

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