0% found this document useful (0 votes)
51 views19 pages

Link Layer: Computer Networking: A Top Down Approach

This document summarizes the key protocols and steps involved when a student requests a web page from www.google.com using their campus laptop. It describes how the request travels down the protocol stack using DNS to resolve the domain name to an IP address, ARP to determine the MAC address of the router, TCP for reliable data transfer, and HTTP for the actual request and response. The communication involves protocols at each layer, including physical, link, network, transport, and application layers, with routing between the campus network and ISP network to reach the destination web server.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views19 pages

Link Layer: Computer Networking: A Top Down Approach

This document summarizes the key protocols and steps involved when a student requests a web page from www.google.com using their campus laptop. It describes how the request travels down the protocol stack using DNS to resolve the domain name to an IP address, ARP to determine the MAC address of the router, TCP for reliable data transfer, and HTTP for the actual request and response. The communication involves protocols at each layer, including physical, link, network, transport, and application layers, with routing between the campus network and ISP network to reach the destination web server.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

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


Address Resolution Protocol(ARP)

Todays Lecture

A Day in the Life of a Web Page


Request

Switch
Link-layer Device

Store, forward Ethernet frames


Examine incoming frames 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: Allows Multiple Simultaneous


Transmissions
A

Hosts have dedicated,

direct connection to switch


Switches buffer packets
Ethernet protocol used on
each incoming link, but no
collisions; full duplex

Switching: A-to-A and Bto-B simultaneously,


without collisions

1
5

4
C

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

Switch Table

Q: How does switch know that


A reachable via interface 4,
B reachable via interface 5?

A
C

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?

1
5

4
C

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

Switch: self-learning
learns which hosts
can be reached through
which interfaces

switch

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

4
C

MAC addr interface TTL


A

60

Switch table
(initially empty)

Self-Learning,Forwarding:Example

Source: A
Dest: A

A A A
C

frame destination
unknown: flood

A6A

2
4

destination A

location known:
selective send

A A
B

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

D
E

I
G

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

Institutional network
to external
internet

mail server
router

web server

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 Bs MAC address


not in As 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 As 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 Bs IP address
88-B2-2F-54-1A-0F

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

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

222.222.222.221

222.222.222.222

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


As adapter sends frame
Rs adapter receives frame
R removes IP datagram from frame, sees its destined to B
R uses ARP to get Bs 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

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

111.111.111.111

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

222.222.222.220
111.111.111.110
111.111.111.112

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

222.222.222.221

222.222.222.222

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

A Day in the Life of a Web Page Request

Journey down protocol stack complete!


application, transport, network, link

Putting-it-all-together:

Goal: identify, review, understand protocols (at


all layers) involved in seemingly simple scenario:
requesting a web page
Scenario: student attaches laptop to campus
network, requests/receives www.google.com
Schools router is connected to ISP
(comcast.net), that provides DNS service.

A Day in the life of a Web Page Request


DNS
DNS
DNS
ARP query

DNS
UDP
IP
ARP
Eth
Phy

ARP
ARP reply

Eth
Phy

before sending HTTP request,


need IP address of www.google.com:
DNS
DNS query created, encapsulated
in UDP, encapsulated in IP,
encapsulated in Ethernet. In
order to send frame to router,
need MAC address of router
interface: ARP
ARP query broadcast, received
by router, which replies with
ARP reply giving MAC address
of router interface
client now knows MAC address
of first hop router, so can now
send frame containing DNS
query

A day in the life using DNS


DNS
DNS
DNS
DNS

DNS

DNS
UDP
IP
Eth
Phy

DNS
DNS

DNS

IP datagram containing DNS


query forwarded via LAN
switch from client to 1st hop
router

DNS

DNS
UDP
IP
Eth
Phy

DNS server

Comcast network
68.80.0.0/13

IP datagram forwarded from


campus network into comcast
network, routed (tables created
by RIP, OSPF and BGP routing
protocols) to DNS server

DNS server replies to


client with IP address of
www.google.com

A day in the life TCP connection carrying HTTP


HTTP

HTTP
TCP
IP
Eth
Phy

SYNACK
SYN
SYNACK
SYN
SYNACK
SYN

SYNACK
SYN
SYNACK
SYN
SYNACK
SYN

TCP
IP
Eth
Phy

web server
64.233.169.105

to send HTTP request,


client first opens TCP
socket to web server
TCP SYN segment (step 1
in 3-way handshake) interdomain routed to web
server
web server responds with
TCP SYNACK (step 2 in 3way handshake)
TCP connection established!

A day in the life HTTP request/reply


HTTP
HTTP

HTTP
TCP
IP
Eth
Phy

HTTP
HTTP
HTTP
HTTP
HTTP
HTTP

HTTP
HTTP
HTTP
HTTP

HTTP
TCP
IP
Eth
Phy

web server
64.233.169.105

web page finally (!!!)


displayed (after multiple
requests)

HTTP request sent into


TCP socket

IP datagram containing
HTTP request routed to
www.google.com

web server responds with


HTTP reply (containing
web page, or image, etc.)

IP datagram containing
HTTP reply routed back to
client

You might also like