Docsity

IP Network Layer: Understanding Packets and Fragmentation, Exercises of Data Communication Systems and Computer Networks

Toggle sidebar
bg1
1
CHAPTER 20
Network Layer: Internet Protocol
Solutions to Odd-Numbered Review Questions and Exercises
Review Questions
1. The delivery of a frame in the data link layer is node-to-node. The delivery of a
packet at the network layer is host-to-host.
3. Each data link layer protocol has a limit on the size of the packet it can carry.
When a datagram is encapsulated in a frame, the total size of the datagram must be
less than this limit. Otherwise, the datagram must be fragmented. IPv4 allows
fragmentation at the host and any router; IPv6 allows fragmentation only at the
host.
5. Options can be used for network testing and debugging. We mentioned six
options: no-operation, end-of-option, record-route, strict-source-route, loose-
source-route, and timestamp. A no-operation option is a 1-byte option used as a
filler between options. An end-of-option option is a 1-byte option used for padding
at the end of the option field. A record-route option is used to record the Internet
routers that handle the datagram. A strict-source-route option is used by the
source to predetermine a route for the datagram. A loose-source-route option is
similar to the strict source route, but it is less rigid. Each router in the list must be
visited, but the datagram can visit other routers as well. A timestamp option is
used to record the time of datagram processing by a router.
7. In IPv4, priority is handled by a field called service type (in the early interpreta-
tion) or differential services (in the latest interpretation). In the former interpreta-
tion, the three leftmost bits of this field define the priority or precedence; in the
latter interpretation, the four leftmost bits of this field define the priority. In IPv6,
the four-bit priority field handles two categories of traffic: congestion-controlled
and noncongestion-controlled.
9. The checksum is eliminated in IPv6 because it is provided by upper-layer proto-
cols; it is therefore not needed at this level.
docsity.com
pf3
pf4

Partial preview of the text

Download IP Network Layer: Understanding Packets and Fragmentation and more Exercises Data Communication Systems and Computer Networks in PDF only on Docsity!

1

CHAPTER 20

Network Layer: Internet Protocol

Solutions to Odd-Numbered Review Questions and Exercises

Review Questions

  1. The delivery of a frame in the data link layer is node-to-node. The delivery of a packet at the network layer is host-to-host.
  2. Each data link layer protocol has a limit on the size of the packet it can carry. When a datagram is encapsulated in a frame, the total size of the datagram must be less than this limit. Otherwise, the datagram must be fragmented. IPv4 allows fragmentation at the host and any router; IPv6 allows fragmentation only at the host.
  3. Options can be used for network testing and debugging. We mentioned six options: no-operation, end-of-option, record-route, strict-source-route, loose- source-route, and timestamp. A no-operation option is a 1-byte option used as a filler between options. An end-of-option option is a 1-byte option used for padding at the end of the option field. A record-route option is used to record the Internet routers that handle the datagram. A strict-source-route option is used by the source to predetermine a route for the datagram. A loose-source-route option is similar to the strict source route, but it is less rigid. Each router in the list must be visited, but the datagram can visit other routers as well. A timestamp option is used to record the time of datagram processing by a router.
  4. In IPv4, priority is handled by a field called service type (in the early interpreta- tion) or differential services (in the latest interpretation). In the former interpreta- tion, the three leftmost bits of this field define the priority or precedence; in the latter interpretation, the four leftmost bits of this field define the priority. In IPv6, the four-bit priority field handles two categories of traffic: congestion-controlled and noncongestion-controlled.
  5. The checksum is eliminated in IPv6 because it is provided by upper-layer proto- cols; it is therefore not needed at this level.

Exercises

  1. If no fragmentation occurs at the router, then the only field to change in the base header is the time to live field. If any of the multiple-byte options are present, then there will be changes in the option headers as well (to record the route and/or timestamp). If fragmentation does occur, the total length field will change to reflect the total length of each datagram. The more fragment bit of the flags field and the fragmentation offset field may also change to reflect the fragmentation. If options are present and fragmentation occurs, the header length field of the base header may also change to reflect whether or not the option was included in the fragments.
  2. Advantages of a large MTU: โ–  Good for transferring large amounts of data over long distances โ–  No fragmentation necessary; faster delivery and no reassembly โ–  Fewer lost datagrams โ–  More efficient (less overhead)

Advantages of a small MTU: โ–  Good for transferring time-sensitive data such as audio or video โ–  Better suited for multiplexing

  1. The value of the header length field of an IP packet can never be less than 5 because every IP datagram must have at least a base header that has a fixed size of 20 bytes. The value of HLEN field, when multiplied by 4, gives the number of bytes contained in the header. Therefore the minimum value of this field is 5. This field has a value of exactly 5 when there are no options included in the header.
  2. If the size of the option field is 20 bytes, then the total length of the header is 40 bytes (20 byte base header plus 20 bytes of options). The HLEN field will be the total number of bytes in the header divided by 4, in this case ten (1010 in binary).
  3. Since there is no option information, the header length is 20, which means that the value of HLEN field is 5 or 0101 in binary. The value of total length is 1024 + 20 or 1044 ( 00000100 00010100 in binary).
  4. If the M ( more ) bit is zero, this means that the datagram is either the last fragment or the it is not fragmented at all. Since the offset is 0, it cannot be the last fragment of a fragmented datagram. The datagram is not fragmented.
  5. Let us first find the value of header fields before answering the questions: VER = 0x4 = 4 HLEN =0x5 = 5 โ†’ 5 ร— 4 = 20 Service =0x00 = 0 Total Length = 0x0054 = 84 Identification = 0x0003 = 3 Flags and Fragmentation = 0x0000 โ†’ D = 0 M= 0 offset = 0 Time to live = 0x20 = 32 Protocol = 0x06 = 6