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
value in arriving
packet’s header
0111 1
3 2
link layer
physical layer
that in chapter 5, 6.
223.1.3.27
223.1.1.3
223.1.2.2
An IPv4 address
usually has three
parts.
Subnets
223.1.1.0/24
IP address: 223.1.2.0/24
223.1.1.1
subnet part - high order bits
host part - low order bits
223.1.1.2 223.1.2.1
what’s a subnet ? 223.1.1.4 223.1.2.9
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.2
223.1.2.6 223.1.3.27
subnet host
part part
11001000 00010111 00010000 00000000
200.23.16.0/24
/27 =
11111111111111111111111111100000
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, hosts can communicate in 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, hosts can communicate in 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
#3 Multicast – The process of sending a packet from one host to a selected
group of hosts, possibly in different networks.
Reduces traffic
Reserved for addressing multicast groups – 224.0.0.0 to 239.255.255.255.
Link local – 224.0.0.0 to 224.0.0.255 (Example: routing information
exchanged by routing protocols)
Globally scoped addresses – 224.0.1.0 to 238.255.255.255 (Example:
224.0.1.1 has been reserved for Network Time Protocol)
Types of IPv4 Address
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.2 virtual
link state
circuit and datagram networks
4.3 what’s
distance vector
inside a router
hierarchical routing
4.4 IP: Internet Protocol
4.6 routing in the Internet
datagram format
RIP
IPv4 addressing
OSPF
ICMP
BGP
IPv6
4.7 broadcast and multicast routing
3 probes 3 probes
3 probes
Network Layer 4-44
IPv6: motivation
initial motivation: 32-bit address space soon to be
completely allocated.
additional motivation:
header format helps speed processing/forwarding
header changes to facilitate QoS
IPv6 datagram
IPv4 datagram
Network Layer 4-50
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-51
Chapter 4: outline
4.5 routing
4.1 introduction
algorithms
4.2 virtual
link state
circuit and datagram networks
4.3 what’s
distance vectora router
inside
hierarchical routing
4.4 IP: Internet Protocol
4.6 routing
datagramin format
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 protocols
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-84
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-85
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)
In a computer network that uses RIP or other distance
vector routing protocols, a poison reverse is a way in
which a gateway node tells its neighbor gateways that one
of the gateways is no longer connected.
transport transprt
(UDP) (UDP)
network forwarding forwarding network
(IP) table table (IP)
link link
physical physical