Home > Articles > Networking

Like this article? We recommend

Transmission of Datagrams

Datagrams from the Internet layer are sent to the Network Interface layer where the data is transmitted over the physical medium. The Network Interface layer transmits data in the form of frames. A datagram is packaged into a frame by the Network Interface layer (see Figure 3.4).

Figure 3.4 An IP datagram is encapsulated in a frame and transmitted over the cables.

However, there are a few factors that need to be considered while encapsulating a datagram within a frame. They are as follows:

  • The amount of data that can be transmitted in a single frame is called Maximum Transfer Unit (MTU) and varies with the network technology that is used. MTU size is measured in bytes. For example, the MTU for Ethernet is 1,500 bytes, whereas it is 4,352 bytes for FDDI. If a datagram cannot be accommodated in a single frame, it is divided or fragmented and sent in multiple frames. The process of dividing a datagram into multiple groups called fragments is called fragmentation.

  • The steps that are followed for fragmenting the datagram is depicted by using the following pseudocode:

    if (Size of the datagram >= MTU)
    {
      if (allowfragmentation==true)
      {
       Fragment data
      }
      else
      {
       Discard data packets
      }
    else
    {
      Encapsulate the datagram into the frame and start transmission
    }

NOTE

IP datagrams have an option, called the Don't Fragment bit, in the Flags field that can be used to disallow fragmentation of the transmitted datagram. This can be done by setting the value of the Don't Fragment bit to 1, which is discussed later in this chapter.

  • If data needs to be sent across two different networks, each working on a different technology, such as Ethernet or FDDI, encapsulating the datagram within a frame is not possible. This is because of the varying MTU values between each type of network. Therefore, the datagram might have to be fragmented. For example, if data is sent from an Ethernet network to a token ring network, data needs to be fragmented because the MTU for Ethernet is higher than that of token ring.

The process of combining all the fragments at the destination is called reassembling.

The fields in the datagram that are used for fragmentation are as follows:

  • Identification

  • Flags

  • Fragmentation Offset

Identification

The Identification field is used to identify a datagram. The size of the Identification field is 16 bits. A combination of the IP address and the number specified in this field is used to identify the datagram to which a component belongs. An identification number is created for a datagram and the same value is copied to the Identification field of all the fragments of the datagram.

The Identification field is used to identify all the fragments that are obtained by fragmenting a datagram. For example, if a datagram is split into five fragments, all the five fragments will have the same identification number. This will help the destination computer to reassemble all the fragments that belong to a datagram.

Flags

The Flag field has two functions. It helps in determining whether a datagram can be fragmented. It also indicates whether there are any more fragments following the current one. This field is also known as the More Fragment field.

The size of this field is 3 bits. The first bit is not used. The second bit is used to indicate whether fragmentation can be done. This field is called the Don't Fragment bit. If the value of this bit is set to 1, the datagram must not be fragmented. Otherwise, the datagram is fragmented, if necessary. If the datagram must be fragmented, but the value in the second bit is set to 1, the datagram is discarded.

The last bit in this field is used to indicate whether there are any fragments following the current one. If the value of this field is set to 0, it indicates that the current fragment is the last fragment in the datagram.

Fragmentation Offset

The Fragmentation Offset field is used by the destination to find out the position of a fragment with respect to the entire datagram. The size of the Fragmentation Offset field is 13 bits. This field, along with the Identification and Flag fields, is used by the destination to ensure that all the fragments that belong to a particular datagram are reassembled together. Even if one fragment is not delivered correctly, the entire datagram is discarded. If a datagram is discarded, an error message is sent to the Transport layer by ICMP.

Certain rules need to be followed during the process of fragmentation. They are as follows:

  • Only the data part of a datagram can be fragmented. The header occupies 20–60 bytes and the remaining space is allotted for the data that needs to be sent. For example, if the total size of the datagram is 5,000 bytes, a minimum of 20 bytes are used to store the header information. Thus, of the 5,000 bytes allotted for the datagram, only 4,980 bytes are used to store the data. The size of a datagram must be divisible by 8. If the size of a datagram is 300 octets, only 296 bytes can be sent in the fragment and the rest should be sent in another fragment.

  • The Fragmentation Offset field is used to indicate the relative position of a fragment with respect to the other fragments of a datagram. The position of the datagram is not represented in terms of the exact position. It contains the number of octets that the fragment contains. The Fragmentation Offset is numbered starting from zero.

Consider a case in which fragments need to be created for a datagram of size 2,500 bytes and are to be sent through an Ethernet network. Assuming that the header size is 20 bytes, the size of data that needs to be fragmented is 2,500–20, which is 2,480 bytes. MTU of an Ethernet network is 1,500, therefore two fragments need to be created for the data. One more point to note is that, in the 1,500 bytes that is provided as MTU, 20 bytes will be required to store the header information for the fragments. That is, only 1,480 bytes can be accommodated in one fragment. The remaining 1,000 bytes must be sent in the next fragment. The fragmentation offset field for the first fragment will be set to 0 and the value for the same in the second fragment will be 185 (1,480÷8). The destination computer also checks for the value in the More Fragment field to check if any more fragments are following the current one.

NOTE

If the number of bytes that need to be transferred is not in multiples of eight and is a few bytes less than the nearest multiple of eight, extra spaces are included in the data to ensure that the size of the data is divisible by eight. The exact length of the data can be found using the Total Length field and the Padding fields.

NOTE

Every destination computer has a predefined time by which all the fragments of an IP datagram need to arrive. The fragments received are retained in the memory of the destination computer until all the fragments of a datagram reach it. If all the fragments that belong to a particular datagram do not reach the destination in the time defined, an error message is sent to the sender using ICMP.

For more information on the error message sent to the sender, see "Internet Control Message Protocol," p. 61

Advantages of Fragmentation

IP, as mentioned earlier, is used to route data packets to the destination irrespective of the underlying hardware technology. IP implements this by supporting fragmentation. If the MTU is large enough to hold an entire datagram, the network traffic will be low and congestion will also be avoided. The sender can also determine the optimum size for avoiding fragmentation during the transmission of data. This function is carried out by TCP by a mechanism called path MTU discovery.

To learn more about path MTU discovery and TCP, see "Transmission Control and Data Flow," p. 73

IP Options

The IP Options field is not a mandatory field. Even without the information provided in this field, data can be transferred from the source to the destination. The IP Options field is only used for providing additional features, such as Record Route, Strict Source Route, and so on, during data transmission. The default size of the IP Options field is zero. The maximum size of this field is 40 bytes. The IP Options field is also responsible for the security of the datagrams. In addition, the field is used for testing and debugging a network. The length of the field is variable and depends on the IP options that are selected.

An IP datagram can consist of more than one IP option. An IP option can be represented in two forms. In the first form only one octet, called Option-Type, is used to represent the option. The second form includes three octets: Option-Type, Option-Length, and Option-Data. The second form requires three octets for each field. The Option-Length field is the sum of the length of the other fields in the option. The Option-Data field is used for storing data related to the Option-Type. The Option-Type is divided into three components: Copy, Option-Class, and Option-Number, which specify the operations that must be performed.

Copy

The Copy field is used to specify whether the option values must be copied to all the fragments. The size of the Copy field is 1 bit. If the value of this bit is set to 0, the option values need to be copied only to the first fragment. If the value in this field is set to 1, the options values must be copied to all the fragments.

Option-Class

The values that can be taken by the Option-Class field are 0 to 3. If the value in this field is 0, the datagram is used for network control. If the value in this field is 2, the datagram is used for debugging the network. Values 1 and 3 are reserved for future use.

Option-Number

The Option-Number field indicates the type of operation to be performed. The size of the Option-Number field is 5 bits. Two most commonly used options are Record Route and Strict Source Route. The values that can be taken by an Option-Type field are listed in Table 3.2.

Table 3.2 Various Options That Cab Provided in the IP Options Field of an IP Datagram

Option-Class

Option-Number

Option-Length

Fields

0

0

-

End of Option

0

1

-

No Operation

0

2

11

Security

0

3

Variable

Loose Source Routing

0

9

Variable

Strict Source Route

0

7

Variable

Record Route

2

4

Variable

Internet Timestamp


NOTE

The End of Option field marks the end of all the options in an IP datagram.

NOTE

The No Operation field is used for handling the alignment between options in an IP datagram.

NOTE

The Security field is used to send security-related information.

The value of the Option-Class of the last option is 2, which indicates that it is used for debugging and measuring. However, the other values are used for network control.

In Strict Source Route and Loose Source Routing, the sender specifies the path that must be taken by a datagram. In Strict Source Route, the sender specifies a list of IP addresses that a source must take. There must be no deviation from the path that is specified by the sender. Like Strict Source Route, the sender specifies the list of IP addresses that a datagram must pass through in the case of Loose Source Routing also. The only difference between the former and the later is that in the case of Loose Source Routing, the path taken between two specified IP addresses can vary.

A router can also be made to track the path that is taken by a datagram. Thus, the route taken by a datagram is a dynamically growing route list. This is defined as the Record Route option. The Option-Data field is used to store the dynamically growing route list.

The Internet Timestamp option is used for debugging and measuring. This option is used to record timestamp values in the route taken by a datagram. The timestamp values can be used to find the time taken by a datagram to reach a destination. The values that are obtained can be used to measure the performance of the network.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020