Professional Documents
Culture Documents
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.
18.3
Routing and Forwarding
18.4
Forwarding process
18.5
PACKET SWITCHING
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
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.
18.15
Three different notations in IPv4 addressing
18.18
Hierarchy in addressing
18.19
Classful Addressing
18.22
What is Classless Addressing?
Reason 1:
• As classful addressing failed in providing the fair share of
addresses to each organization there was a need to bring
change in the distribution process of addresses.
• As we know the classful addressing assigns a block from
class A, B & C to an organization which has a fixed
number of addresses.
• In classful addressing sometimes the addresses in a block
were more than enough and sometimes the addresses in the
block were less than required.
• Subnetting and supernetting in classful addressing also
failed to solve the problem of address depletion.
Reasons for Adopting Classes Addressing
Reason 2:
• As we all know in 1990 ‘Internet Service Provider’ (ISP) an organization
that became famous for providing internet access to midsize organizations,
small commercial companies or even to an individual that require internet
services such as e-mail services, surfing to extract information about
something and many more.
• Internet Corporation for Assigned Names and Numbers (ICANN) a global
authority that assigns a large block of addresses to ISP which it further
subdivides to provide a required range of addresses to small commercial
organizations.
• So, in 1996 a new architecture was introduced for the distribution of
addresses namely ‘Classless Addressing’.
• The classless addressing provides the block of addresses of variable length.
One can request for a block having 1 address, 2 addresses, 4 addresses, 8
addresses and so on. It means that the number of addresses that a customer
can request should be the power of 2.
• The classless addressing prevents the wastage of addresses.
Example 19.9 (continued)
Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by
bit. The result of ANDing 2 bits is 1 if both bits are 1s;
the result is 0 otherwise.
19.42
Example 19.9 (continued)
19.43
Example 19.9 (continued)
19.44
Block Allocation
Solution
There are 232– 24 = 256 addresses in this block. The first
address is 14.24.74.0/24; the last address is 14.24.74.255/24.
To satisfy the third requirement, we assign addresses to
subblocks, starting with the largest and ending with the
smallest one.
18.49
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
14.24.74.0/25; the last address is 14.24.74.127/25.
18.29
Example 18.5
(continued)
c. The number of addresses in the smallest subblock, which
requires 10 addresses, is not a power of 2. We allocate 16
addresses. The subnet mask for this subnet can be found as
n1 = 32 − log216= 28. The first address in this block is
14.24.74.192/28; the last address is 14.24.74.207/28.
18.51
Solution to Example 4.5
18.52
Network address
18.53
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.54
Figure 18.24: Example of address aggregation
18.55
DHCP
18.56
Operation of DHCP
18.57
NA
T
- A technology that can provide the mapping
between the private and universal addresses, and
at the same time support virtual private networks
18.58
NA
T
18.59
Address translation
18.60
Translation
18.61
Five-column translation table
18.62
NETWORK-LAYER PROTOCOLS
19.63
Position of IP and other network-layer protocols
in TCP/IP protocol suite
19.64
Datagram Format
- Header
- payload (data)
19.65
IP datagram
19.66
Multiplexing and demultiplexing using the value of
the protocol field
19.67
Example
19.1
Solution
There is an error in this packet. The 4 leftmost bits (0100)2
show the version, which is correct. The next 4 bits (0010)2
show an invalid header length (2 × 4 = 8). The minimum
number of bytes in the header must be 20. The packet has
been corrupted in transmission.
19.68
Example
19.2
Solution
The HLEN value is 8, which means the total number of
bytes in the header is 8 × 4, or 32 bytes. The first 20 bytes
are the base header, the next 12 bytes are the options.
19.69
19.70
Fragmentation
19.71
Maximum transfer unit (MTU)
19.72
Fragmentation example
19.73
Detailed fragmentation example
19.74