Chapter 18
Introduction to Network Layer
Communication at the network layer
18.2
Packetizing
- encapsulating the payload in a network-layer
packet at the source and decapsulating the
payload from the network-layer packet at the
destination.
- In other words, one duty of the network layer is
to carry a payload from the source to the
destination without changing it or using it.
- Similar to the service of a carrier such as the
postal office
18.3
Routing and Forwarding
Other duties of the network layer are
- routing
- forwarding
18.4
Forwarding process
Forwarding Send the packet
value out of interface 2
B Data B Data
18.5
PACKET SWITCHING
A router is a switch that creates a connection between
an input port and an output port (or a set of output
ports
18.6
Datagram Approach
- The network layer was designed to provide a
connectionless service in which the network-layer
protocol treats each packet independently, with
each packet having no relationship to any other
packet.
- The idea was that the network layer is only
responsible for delivery of packets from the
source to the destination.
- In this approach, the packets in a message may
or may not travel the same path to their
destination.
18.7
A connectionless packet-switched network
18.8
Virtual-Circuit Approach
- There is a relationship between all packets
belonging to a message.
- Before all datagrams in a message can be sent, a
virtual connection should be set up to define the
path for the datagrams.
- After connection setup, the datagrams can all
follow the same path.
- In this type of service, not only must the packet
contain the source and destination addresses, it
must also contain a flow label, a virtual circuit
identifier that defines the virtual path the packet
should follow.
18.9
A virtual-circuit packet-switched network
18.10
Forwarding process in a router when used in a virtual
circuit network
18.11
Sending request packet in a virtual-circuit network
A to B
A to B
A to B A to B
18.12
Sending acknowledgments in a virtual-circuit network
18.13
Flow of one packet in an established virtual circuit
18.14
NETWORK-LAYER PERFORMANCE
The performance of a network can be measured in
terms of delay, throughput, and packet loss.
Congestion control is an issue that can improve the
performance.
18.15
Delay
The delays in a network can be divided into four
types:
- transmission delay
- propagation delay
- processing delay
- queuing delay
18.16
Throughput
- is defined as the number of bits passing through
the point in a second, which is actually the
transmission rate of data at that point.
- In a path from source to destination, a packet
may pass through several links (networks), each
with a different transmission rate.
- How can we determine the throughput of the
whole path?
18.17
Throughput in a path with three links in a series
18.18
A path through the Internet backbone
18.19
Effect of throughput in shared links
18.20
Packet Loss
- Another issue that severely affects the
performance of communication is the number of
packets lost during transmission.
- The effect of packet loss on the Internet network
layer is that the packet needs to be resent, which
in turn may create overflow and cause more
packet loss.
18.21
IPv4 ADDRESSES
- The identifier used in the IP layer of the TCP/IP
protocol suite to identify the connection of each
device to the Internet.
- An IPv4 address is a 32-bit address that uniquely
and universally defines the connection of a host or
a router to the Internet.
- The IP address is the address of the connection,
not the host or the router.
18.22
Three different notations in IPv4 addressing
18.23
Hierarchy in addressing
18.24
Classful Addressing
- The whole address space was divided into five
classes (class A, B, C, D, and E)
- This scheme is referred to as classful addressing.
18.25
Occupation of the address space in classful addressing
18.26
Network address
18.27
Example 18.5
An organization is granted a block of addresses with the
beginning address [Link]/24. The organization needs to
have 3 subblocks of addresses to use in its three subnets: one
subblock of 10 addresses, one subblock of 60 addresses, and
one subblock of 120 addresses. Design the subblocks.
Solution
There are 232– 24 = 256 addresses in this block. The first
address is [Link]/24; the last address is [Link]/24.
To satisfy the third requirement, we assign addresses to
subblocks, starting with the largest and ending with the
smallest one.
18.28
Example 18.5 (continued)
a. The number of addresses in the largest subblock, which
requires 120 addresses, is not a power of 2. We allocate 128
addresses. The subnet mask for this subnet can be found as
n1 = 32 − log2 128 = 25. The first address in this block is
[Link]/25; the last address is [Link]/25.
b. The number of addresses in the second largest subblock,
which requires 60 addresses, is not a power of 2 either. We
allocate 64 addresses. The subnet mask for this subnet can
be found as n2 = 32 − log2 64 = 26. The first address in this
block is [Link]/26; the last address is
[Link]/26.
18.29
Example 18.5 (continued)
c. The number of addresses in the largest subblock, which
requires 120 addresses, is not a power of 2. We allocate 128
addresses. The subnet mask for this subnet can be found as
n1 = 32 − log2 128 = 25. The first address in this block is
[Link]/25; the last address is [Link]/25.
If we add all addresses in the previous subblocks, the result
is 208 addresses, which means 48 addresses are left in
reserve. The first address in this range is [Link]. The
last address is [Link]. We don’t know about the prefix
length yet.
18.30
Solution to Example 4.5
18.31
Example 18.6
Figure 18.24 shows how four small blocks of addresses are
assigned to four organizations by an ISP. The ISP combines
these four blocks into one single block and advertises the
larger block to the rest of the world. Any packet destined for
this larger block should be sent to this ISP. It is the
responsibility of the ISP to forward the packet to the
appropriate organization. This is similar to routing we can
find in a postal network. All packages coming from outside
a country are sent first to the capital and then distributed to
the corresponding destination.
18.32
Figure 18.24: Example of address aggregation
18.33
DHCP
After a block of addresses are assigned to an
organization, the network administration can
manually assign addresses to the individual hosts or
routers. However, address assignment in an
organization can be done automatically using the
Dynamic Host Configuration Protocol (DHCP).
DHCP is an application-layer program, using the
client-server paradigm, that actually helps TCP/IP at
the network layer.
18.34
Operation of DHCP
18.35
NAT
- A technology that can provide the mapping
between the private and universal addresses, and
at the same time support virtual private networks
- allows a site to use a set of private addresses for
internal communication and a set of global
Internet addresses (at least one) for
communication with the rest of the world.
18.36
NAT
18.37
Address translation
18.38
Translation
18.39
Five-column translation table
18.40