Forouzan6e ch07 PPTs Accessible
Forouzan6e ch07 PPTs Accessible
Chapter 07
© 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom.
No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC.
Chapter 7: Outline
7.1 Services
7.3 Performance
When the Internet started, to make it simple, 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.
Propagation delay is the time it takes for a bit to travel from point
A to point B in the transmission media. The propagation delay for a
packet-switched network depends on the propagation delay of each
network (LAN or WAN). The propagation delay depends on the
propagation speed of the media, which is 3 ´ 108 meters/second in
a vacuum and normally much less in a wired medium; it also
depends on the distance of the link. In other words, propagation
delay is .
Assuming equal delays for the sender, routers, and receiver, the
total delay (source-to-destination delay) a packet encounters can
be calculated if we know the number of routers, n, in the whole
path.
With the growth of the Internet, it was clear that a larger address
space was needed as a long-term solution. The larger address
space, however, requires that the length of IP addresses also be
increased, which means the format of the IP packets needs to be
changed. Although the long-range solution has already been
devised and is called IPv6, a short-term solution was also devised
to use the same address space but to change the distribution of
addresses to provide a fair share to each organization. The short-
term solution still uses IPv4 addresses, but it is called classless
addressing.
The last address can be found by keeping the first 27 bits and
changing the rest of the bits to 1s.
Address: 167.199.170.82/27 10100111 11000111 10101010 01011111
Last address: 167.199.170.95/27 10100111 11000111 10101010 01011111
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.
Figure 7.11 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.
An IPv4
The receiver
packet
discards
has arrived
the packet.
with the first 8 bits as 01000010 2 .
Why?
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.
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.
Solution
The HLEN value is 5, which means the total number of bytes in the
header is 5 * 4, or 20 bytes (no options). The total length is 0028 16
or 40 bytes, which means the packet is carrying 20 bytes of data
(40 - 20).
An IPv4 packet has arrived with the first few hexadecimal digits as
shown
45000028000100000102 16
How many hops can this packet travel before being dropped? The
data belong to what upper-layer protocol?
Solution
To find the time-to-live field, we skip 8 bytes (16 hexadecimal
digits). The time-to-live field is the ninth byte, which is 0116 . This
means the packet can travel only one hop. The protocol field is the
next byte 02 16 , which means that the upper-layer protocol is
IGMP.
Each link-layer protocol has its own frame format. One of the
features of each format is the maximum size of the payload that can
be encapsulated in a frame, total size of the datagram must be less
than the maximum size (see Figure 7.16).
Solution
If the M bit is 0, it means that there are no more fragments; the
fragment is the last one. However, we cannot say if the original
packet was fragmented or not. A non-fragmented packet is
considered the last fragment.
Solution
If the M bit is 1, it means that there is at least one more fragment.
This fragment can be the first one or a middle one, but not the last
one. We don’t know if it is the first one or a middle one; we need
more information (the value of the fragmentation offset).
Solution
Because the M bit is 1, it is either the first fragment or a middle
one. Because the offset value is 0, it is the first fragment.
A packet has arrived in which the offset value is 100. What is the
number of the first byte? Do we know the number of the last byte?
Solution
To find the number of the first byte, we multiply the offset value by
8. This means that the first byte number is 800. We cannot
determine the number of the last byte unless we know the length of
the data.
A packet has arrived in which the offset value is 100, the value of
HLEN is 5, and the value of the total length field is 100. What are
the numbers of the first byte and the last byte?
Solution
The first byte number is 100 * 8 = 800. The total length is 100
bytes, and the header length is 20 bytes (5 * 4), which means that
there are 80 bytes in this datagram. If the first byte number is 800,
the last byte number must be 879.
The header of the IPv4 datagram is made of two parts: a fixed part
and a variable part. The fixed part is 20 bytes long and was
discussed in the previous section. The variable part comprises the
options that can be a maximum of 40 bytes (in multiples of 4 bytes)
to preserve the boundary of the header.
No Operation
A no-operation option is a 1-byte option used as a filler between
options.
End of Option
An end-of-option option is a 1-byte option used for padding at the
end of the option field. It, however, can only be used as the last
option.
There are several tools that can be used in the Internet for
debugging. We can determine the viability of a host or router. We
can trace the route of a packet. We introduce two tools that use
ICMP for debugging: ping and traceroute.
Bit Meaning
0 Registration required. No collocated care-of address.
1 Agent is busy and does not accept registration at this moment.
2 Agent acts as a home agent.
3 Agent acts as a foreign agent.
4 Agent uses minimal encapsulation.
5 Agent uses generic routing encapsulation (GRE).
6 Agent uses generic routing encapsulation (GRE).
7 Unused (0).
1. The mobile host must register itself with the foreign agent.
2. The mobile host must register itself with its home agent.
3. The mobile host must renew registration if it has expired.
4. The mobile host must cancel its registration when it returns.
Bit Meaning
0 Mobile host requests that home agent retain its prior care-of address.
1 Mobile host requests that home agent tunnel any broadcast message.
2 Mobile host is using collocated care-of address.
3 Mobile host requests that home agent use minimal encapsulation.
4 Mobile host requests generic routing encapsulation (GRE).
5 Mobile host requests header compression.
6 –7 Reserved bits.
Instead of Table 7.3, we can use Table 7.4, in which the network
address/mask is given in bits.
The main reason for migration from IPv4 to IPv6 was the small
size of the address space of IPv4. An IPv6 address is 128 bytes or
16 bytes, four times the address length in IPv4.
An IPv6 address is 128 bits or 16 bytes long; four times the address
length of IPv4.
340, 282, 366, 920, 938, 463, 374, 607, 431, 768, 211, 456
Like the address space of IPv4, the address space of IPv6 is divided
into several blocks of varying size and each block is allocated for a
special purpose. Most of the blocks are still unassigned and have
been set aside for future use. Table 7.5 shows only the assigned
blocks. In this table, the last column shows the fraction each block
occupies in the whole address space.
Solution
Theoretically, the first and second subnets should use the block
with subnet identifier 000116 and 000216. This means that the
blocks are
2000:1456:2474:0000/64
and
2000:1456:2474:0001/64.
Solution
We only need to change the seventh bit of the first octet from 0 to 1
and change the format to colon hex notation. The result is
F7A9:23EF:0714:7AD2.
Solution
We only need to change the seventh bit of the first octet from 0 to
1, insert two octet FFFE16 and change the format to colon hex
notation. The result is F7A9:23FF:FE14:7AD2 in colon hex.
Solution
IPv6 uses two large blocks for private addressing and one large
block for multicasting, as shown in Figure 7.45.
Solution
The host first creates its interface identifier as
F7A9:23FF:FE11:9BE2 using the Ethernet address read from its
card. The host then creates its link-local address as
FE80::F7A9:23FF:FE11:9BE2
3A21:1216:2165:A245:1232:F7A9:23FF:FE11:9BE2
The change of the IPv6 address size requires the change in the IPv4
packet format. The designer of IPv6 decided to implement remedies
for other shortcomings now that a change is inevitable. The
following shows other changes implemented in the protocol in
addition to changing address size and format.
• The record route option is not implemented in IPv6 because it was not used.
• The source route option is called the source route extension header in IPv6.
• The fragmentation fields in the base header section of IPv4 have moved to
the fragmentation extension header in IPv6.
www.mheducation.com
© 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom.
No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC.