3rd Edition: Chapter 4

Download Report

Transcript 3rd Edition: Chapter 4

Chapter 4
Network Layer
A note on the use of these ppt slides:
We’re making these slides freely available to all (faculty, students, readers).
They’re in PowerPoint form so you see the animations; and can add, modify,
and delete slides (including this one) and slide content to suit your needs.
They obviously represent a lot of work on our part. In return for use, we only
ask the following:
 If you use these slides (e.g., in a class) that you mention their source
(after all, we’d like people to use our book!)
 If you post any slides on a www site, that you note that they are adapted
from (or perhaps identical to) our slides, and note our copyright of this
material.
Computer
Networking: A Top
Down Approach
6th edition
Jim Kurose, Keith Ross
Addison-Wesley
March 2012
Thanks and enjoy! JFK/KWR
All material copyright 1996-2012
J.F Kurose and K.W. Ross, All Rights Reserved
Network Layer 4-1
4.1 Introduction: Network layer





transport segment from
sending to receiving host
on sending side
encapsulates segments
into datagrams
on receiving side, delivers
segments to transport
layer
network layer protocols
in every host, router
router examines header
fields in all IP datagrams
passing through it
application
transport
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
application
transport
network
data link
physical
Network Layer 4-2
4.1 Introduction: Two key network-layer functions


forwarding: move packets
from router’s input to
appropriate router
output
routing: determine route
taken by packets from
source to destination
 routing algorithms
analogy:


routing: process of
planning trip from source
to destination
forwarding: process of
getting through single
interchange
Network Layer 4-3
4.1 Introduction
: Interplay between routing and forwarding
routing algorithm
routing algorithm determines
end-end-path through network
local forwarding table
header value output link
forwarding table determines
local forwarding at this router
0100
0101
0111
1001
3
2
2
1
value in arriving
packet’s header
0111
1
3 2
Network Layer 4-4
4.1 Introduction: The Internet network layer
host, router network layer functions:
transport layer: TCP, UDP
IP protocol
routing protocols
network
layer
• addressing conventions
• datagram format
• packet handling conventions
• path selection
• RIP, OSPF, BGP
forwarding
table
ICMP protocol
• error reporting
• router
“signaling”
link layer
physical layer
Network Layer 4-5
4.1 Introduction: The Internet network layer



RIP (Routing Information Protocol)
- for managing router information
- uses hop count as a cost metric; each link has a cost of 1
- costs are actually from source router to a destination subnet
OSPF (Open Shortest Path First)
- conceived as the successor to RIP
- constructs a complete graph of the entire autonomous system
and then determines a shortest-path tree to all subnets with a
Dijkstra’s shortest-path algorithm
BGP (Border Gateway Protocol)
- is the standard inter-AS routing protocol in today’s Internet
- makes routing decisions based on paths, network policies or rulesets configured by a network administrator
Network Layer 4-6
4.1 Introduction: The Internet network layer


IP (Internet Protocol Protocol)
- the principal communications protocol by which data is sent from
one computer to another on the Internet
ICMP (Internet Control Message Protocol)
- used by hosts and routers to communicate network-layer
information to each other
- most typical use for error reporting
(ex) error message such as “Destination network unreachable”
Network Layer 4-7
IP datagram format
IP protocol version
number
header length
(bytes)
“type” of data
max number
remaining hops
(decremented at
each router)
upper layer protocol
to deliver payload to
how much overhead?
 20 bytes of TCP
 20 bytes of IP
 = 40 bytes + app
layer overhead
32 bits
head. type of
length
ver
len service
fragment
flgs
16-bit identifier
offset
upper
time to
header
layer
live
checksum
total datagram
length (bytes)
for
fragmentation/
reassembly
32 bit source IP address
32 bit destination IP address
options (if any)
data
(variable length,
typically a TCP
or UDP segment)
e.g. timestamp,
record route
taken, specify
list of routers
to visit.
Network Layer 4-8
Routers vs. Switches vs. Hubs



They look alike on the outside, but they’re very different on the
inside.
Each is designed to allow computers to connect to it. Each features
a number of physical ports on the front or back of the unit that
provide the connection points for these computers
Hub
- also known as a repeater, is a network device that can operate on
layer-1 (I.e. the physical layer) to connect network devices for
communication
- commonly used to connect segments of a LAN
- typically the least expensive, least intelligent, and least complicated
- acts on individual bits rather than frames; when a bit arrives
from one interface, the hub re-creates the bit and transmits the
bit onto all the other interfaces
Network Layer 4-9
Routers vs. Switches vs. Hubs


Switch
- a.k.a. intelligent hub, is a network device that stores and forwards
packets between LAN segments
- operates at the link layer (layer 2) (i.e. forward packets using MAC
addresses)
- can identify the intended destination of the packet that they
receive, so they send that packet to only the computers that
are supposed to receive it
Router
- network devices that operate at Layer-3
- as layer-3 protocols have access to logical address (IP addresses)
so routers have the capability to forward data across networks
- far more feature rich as compared to switches
- maintain routing table for data forwarding
Network Layer 4-10