Chapter 5 Network Layer
Chapter 5 Network Layer
Network Layer
Computer
Networking: A
Top Down
Approach
6th edition
Jim Kurose, Keith
Ross
Addison-Wesley
March 2012
transport layer
network data link data link
data link physical physical
physical
network layer
protocols in every
host, router
router examines Network Layer 4-3
Two key network-layer
functions
forwarding: move analogy:
packets from
router’s input to
routing: process of
appropriate router planning trip from
output source to dest
routing: determine
forwarding: process
route taken by of getting through
packets from source single interchange
to dest.
routing algorithms
value in arriving
packet’s header
0111 1
3 2
link layer
physical layer
6. 223.1.2.2
An IPv4 address
usually has three
parts.
Subnets
223.1.1.0/24
223.1.2.0/24
IP address: 223.1.1.1
subnet part - high
order bits 223.1.1.2 223.1.2.1
host part - low 223.1.1.4 223.1.2.9
addresses are
being wasted 223.1.9.2 223.1.7.2
for each
subnet?
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.2
223.1.2.6 223.1.3.27
/27
=
11111111111111111111111111100
000
255 . 255 . 255 . 224
Exercises
Network 10.10.10.0/25
How many addresses in total?
How many usable addresses?
What are the lowest and highest usable
addresses?
Network 10.10.20.0/22
How many addresses in total?
How many usable addresses?
What the the lowest and highest usable
addresses?
NAT: network address
translation
rest of local network
Internet (e.g., home network)
10.0.0/24 10.0.0.1
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
Unicast Transmission
In an IPv4 network, the hosts can communicate one of three different ways:
Unicast, Broadcast, and Multicast
#1 Unicast – the
process of sending a
packet from one host to
an individual host.
IPv4 Unicast, Broadcast, and Multicast
Broadcast Transmission
In an IPv4 network, the hosts can communicate one of three
different ways: Unicast, Broadcast, and Multicast.
#2 Broadcast – the
process of sending a
packet from one host to Directed broadcast
all hosts in the network. • Destination 172.16.4.255
• Hosts within the
NOTE: Routers do 172.16.4.0/24 network
not forward a
limited broadcast!
Directed broadcast
Destination
172.16.4.255
Hosts within the
172.16.4.0/24 network
IPv4 Unicast, Broadcast, and Multicast
Multicast Transmission
In an IPv4 network, the hosts can communicate one of three different ways:
Unicast, Broadcast, and Multicast.
IPv4 Limitations
IP address depletion
More and more IP-enabled devices are
connecting
Internet routing table expansion
The Internet routing tables continue to grow which means
Internet core routers require more processing power, memory,
and overhead.
Lack of true end-to-end model
IPv4 networks typically use NAT as the solution to address
depletion.
However, NAT hides the true source address of traffic, which
can cause other issues.
Lack of end-to-end connectivity
Chapter 4: outline
4.5 routing
4.1 introduction
algorithms
4.2virtual
link state
circuit and datagram networks
distance vector
4.3 what’s inside a router
hierarchical routing
4.4 IP: Internet Protocol
4.6routing in the Internet
datagram format
RIP
IPv4 addressing
OSPF
ICMP
BGP
IPv6
4.7 broadcast and multicast routing
IPv6 datagram
IPv4 datagram
Network Layer 4-42
Tunneling
A B IPv4 tunnel E F
connecting IPv6 routers
logical view:
IPv6 IPv6 IPv6 IPv6
A B C D E F
physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
data data
A-to-B: E-to-F:
IPv6 B-to-C: B-to-C: IPv6
IPv6 inside IPv6 inside
IPv4 IPv4 Network Layer 4-43
Chapter 4: outline
4.5 routing
4.1 introduction
algorithms
4.2 virtual
link state
circuit and datagram networks
distance vector
4.3 what’s inside a router
hierarchical routing
4.4 IP: Internet Protocol
4.6 routing
datagram informat
the Internet
RIP
IPv4 addressing
OSPF
ICMP
BGP
IPv6
4.7 broadcast and multicast routing
Interior Gateway
Protocols (IGP) -
Used for routing
within an AS
Include RIP, EIGRP,
OSPF, and IS-IS
Exterior Gateway
Protocols (EGP) -
Used for routing
between AS
Official routing
protocol used by the
Internet
Interior gateway propotals
most common routing protocols:
RIP: Routing Information Protocol
OSPF: Open Shortest Path First
z
w x y
A D B
C
routing table in router D
destination subnet next router # hops to dest
w A 2
y B 2
z B 7
x -- 1
…. …. ....
Network Layer 4-76
RIP: example
A-to-D advertisement
dest next hops
w - 1
x - 1
z C 4
…. … ... z
w x y
A D B
C
routing table in router D
destination subnet next router # hops to dest
w A 2
y B 2
A 5
z B 7
x -- 1
…. …. ....
Network Layer 4-77
RIP: link failure, recovery
if no advertisement heard after 180 sec -->
neighbor/link declared dead
routes via neighbor invalidated
new advertisements sent to neighbors
neighbors in turn send out new advertisements
(if tables changed)
link failure info quickly (?) propagates to entire
net
poison reverse used to prevent ping-pong
loops (infinite distance = 16 hops)
transport transprt
(UDP) (UDP)
network forwarding forwarding network
(IP) table table (IP)
link link
physical physical
backbone
area
border
routers
area 3
internal
routers
area 1
area 2