Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

This chapter is from the book

This chapter is from the book

Network Models

Let's start with a few definitions. A network model reflects a design or architecture to accomplish communication between different systems. Network models are also referred to as network stacks or protocol suites. Examples of network models includes TCP/IP, Sequenced Packet Exchange/Internet Packet Exchange (SPX/ IPX) used by Novelle Netware, the Network Basic Input Output System (Net-BIOS), which comprises the building blocks for most Microsoft networking and network applications; and AppleTalk, the network model for Apple Macintosh computers.

A network model usually consists of layers. Each layer of a model represents specific functionality. Within the layers of a model, there are usually protocols specified to implement specific tasks. You may think of a protocol as a set of rules or a language. Thus, a layer is normally a collection of protocols.

There are a number of different network models. Some of these models relate to a specific implementation, such as the TCP/IP network model. Others simply describe the process of networking, such as the International Organization for Standardization/Open System Interconnection Reference Model (ISO/ OSI-RM, or more simply, OSI-RM).


The International Organization for Standardization (ISO) is a worldwide body that promotes standards internationally. In the late 1970s, ISO began work on developing a standard for multivendor computer interconnectivity. The result, published in the late 1980s, was the Open System Interconnection (OSI) model. The OSI model incorporates protocols that can be used to implement a network stack. These protocols are not used extensively largely due to the popularity of the TCP/IP protocol suite. Consequently, the OSI model, with its well-defined layers, is used primarily as a reference model, hence, OSI-RM. Many network models are described by way of OSI-RM and so we provide a description of it here. The OSI-RM is depicted in Figure 1–1.

Figure 1–1 The OSI-RM

As indicated in Figure 1–1, each of the layers are numbered 1 through 7 from physical to application layer.

LAYER 7 All of the capabilities of networking begin in the Application layer. File transfer, messaging, web browsing, and other applications are in this layer. Each such application will appropriately invoke processing of data for transmission through well-defined interfaces to layer(s) below this one.

LAYER 6 The Presentation layer is responsible for data formatting. It takes care of such things as bit and byte ordering and floating point representation. Examples include External Data Representation (XDR) and Abstract Syntax Notation (ASN).

LAYER 5 The Session layer handles the exchange of data through dialog procedures or chat or conversation protocols. This layer is largely designed for mainframe and terminal communications. It has no relevance with respect to TCP/IP networking.

LAYER 4 The Transport layer is responsible for the reliable transfer of data between systems. It manages the communication session including flow control, ordering of information, error detection, and recovery of data.

LAYER 3 The Network layer owns the responsibility of delivering data between different systems in different interconnected networks (internets 1).

LAYER 2 The Data Link layer provides rules for sending and receiving data between two connected nodes over a particular physical medium.

LAYER 1 The Physical layer defines the required hardware, such as cables and interfaces, for a given medium of communication, such as electrical, radio frequency, and light-based. In this way, methods for transmitting and receiving bit-streams of information are defined.


There is a great deal more to the OSI model than we have discussed here. For complete details on this standard, visit


Also, see "For Further Reading" on page 15 for more resources on this topic.

Next, we discuss the TCP/IP model and begin our journey into the world of TCP/IP networking. We will compare it with the OSI model at the end of the next section.

The TCP/IP Network Model

The TCP/IP network model takes its name from two of its protocols, the Transmission Control Protocol (TCP) and the Internet Protocol (IP). Figure 1–2 provides a five-layer 2 representation of the TCP/IP Model. By utilizing a five-layer model, the lower four layers are numbered identically to the lower four layers of the OSI-RM model.

The lower four layers of the model represent functionality performed internally by the Linux kernel. The Application layer includes commands and daemons.

The process of initiating a network communication, like executing telnet hostname, causes the initiator (usually the client) to encapsulate application data, beginning at the top of the model and moving down, for the network transmission. In other words, each layer wraps the data passed to it by the previous layer with information used to determine where the packet is supposed to go and which service needs to be invoked to handle the application data itself. The information added by each layer is called a header when it is prefixed to the data from the previous layer, and a trailer when it is suffixed. On the left-hand side of Figure 1–2, you see an increasing number of rectangles as you scan down the layers. The area in gray represents the information added by each layer.

The receiving system, normally the server, performs the same steps except in reverse (bottom to top), deencapsulating the data. Each layer is responsible for

Figure 1–2 The TCP/IP Model

interpreting the header generated by the same layer on the sending system. This process is known as peer-to-peer communication.

The information produced during encapsulation, or read during deencapsula-tion by each layer is ascribed a name as shown in Figure 1–2. For Layer 5, if the underlying Transport layer protocol is the TCP, then the data produced or read by Layer 5 is called a stream; if the underlying Transport layer protocol is the User Datagram Protocol (UDP), then it is called a message. For Layer 4, if the protocol used is TCP, then the data produced or read by Layer 4 is called a segment. Otherwise, if it is UDP, then it is called a packet. The data of Layer 3 is called a datagram; of Layer 2, a frame or cell; and of Layer 1, a signal.


The term packet is commonly used instead of signal and/or frame.

In the following sections, we will briefly review the information generated by each layer and its purpose.

The Hardware Layer

The Hardware layer is responsible for exactly that_hardware. This includes cables, interface cards, and repeaters. It accepts the data passed to it by the Network Interface layer and prefixes something called the Preamble, which is a well-known sequence of 64 bits used for synchronization purposes. When it finishes its work, it generates a signal to be submitted to the media (electrically-based cables in most cases). The Hardware layer also imposes the maximum transfer unit (MTU) used by the Internet layer to ensure that the Hardware layer does not get frames 3 that are too large or too small. For Ethernet, the MTU for the signal is 1526 octets, and the minimum signal size is 72 octets.4 There are two hardware devices which operate at this layer: repeaters and amplifiers. A repeater is a device with a number of ports (usually four or more) that is capable of receiving signals, filtering out noise (phenomena not related to the communication at hand), and repeating the signals to every port except the ingress (incoming) port. Amplifiers perform the same task, except that they do not filter noise. Consequently, repeaters are employed in electrical communications environments and amplifiers are employed in light-based communications environments. These devices are often called hubs or concentrators. We will discuss this layer in greater detail in Chapter 2.

The Network Interface Layer

You may think of the Network Interface layer as a collection of device drivers. Its responsibility is to prepare the data passed to it from the Internet layer for signaling. It does this by prefixing its header (indicated as NILH in Figure 1–2), computing a Cyclic Redundancy Check (CRC_a 32-bit checksum), appending the CRC to the datagram, and passing this information to the device (interface) for signaling in what is called a frame. In particular, this layer understands physical addresses (often referred to as Media Access Control [MAC] addresses). When using Ethernet, this is often called an Ethernet address. Physical addresses are local and only need to be unique within the local network. For Ethernet interface chipsets, they are 48-bit addresses permanently written into the programmable read-only memory (PROM).

The Network Interface layer writes both the destination and source physical address into its header during encapsulation. Consequently, it is at this layer that, during deencapsulation, initial decisions are made about whether or not to continue processing an incoming frame up the stack. This is discussed in detail in Chapter 2.

There is one device associated with this layer. It is a switch. Switches look very much like repeaters, a piece of hardware with at least two network ports, but are more intelligent than repeaters. Since they operate at the Network Interface layer, they are able to make decisions based on physical addresses. Switches are sometimes called hubs or bridges or layer 2 routers.


Switches are sometimes called bridges (or the other way around, if you like). Bridge is an older term that is not commonly used today. Unfortunately, the terms switching, layer 2 switching, and layer 3 switching all confound the issue of what is really being described. Most of the variation in the base term "switch" comes from vendors of switches and routers. An argument could be made that the proper term for the layer 2 device that is capable of making packet-forwarding decisions based on physical addresses is "bridge." A similar argument could be made for the term switch. I could coin a new term, say swidge, but I haven't got the courage, and, besides, it would probably make matters worse. After all, companies like Cisco aren't likely to change their terminology just because I say so. I had to make a decision about which term to use. So I decided to use switch. Throughout this book, I will make no distinction between bridge and switch and will use the term switch to mean a layer 2 device that is capable of making packet-forwarding decisions based on physical addresses.

The Internet Layer

The Internet layer is responsible for a variety of tasks. In order to accomplish these tasks it uses three principal protocols. The Internet Protocol (IP), the Internet Control Messaging Protocol (ICMP), and the Internet Group Management Protocol (IGMP). The IP is responsible for routing and fragmentation.5 The ICMP generates error messages, assists routing through redirection, may implement rudimentary flow control, supports the ping command, supports router discovery, and may generate timestamp and netmask queries and responses. The IGMP supports Internet Layer multicasting. Each of these protocols has two available versions: 4 and 6.

The device that operates at this layer is a router. Routers are nodes that implement the intelligence of the Internet layer protocols and forward datagrams to the appropriate networks or subnetworks (discussed in Chapter 4) based on IP addresses and the routing algorithm (described in Chapter 6). Routers are sometimes called layer 3 switches. Unfortunately, routers are also sometimes called hubs.

The Internet layer produces or reads the Internet layer header. The header contains a lot of information and, in particular, includes the source and destination IP address associated with the packet. There are two versions of the protocols in this layer: version 4 and version 6. IPv4 addresses are 4 octets while IPv6 addresses are 16 octets. These are global addresses, meaning that all nodes throughout a collection of networks that are interconnected (internet) must be uniquely identified by this address. Data is passed through such an internet by the process of routing. Routing is performed by examining a portion of an IP address in order to determine to which network the data needs to be sent (effectively the purpose of the routing algorithm). Linux systems can act as routers. This header, together with the overall functionality of the Internet layer, is largely discussed in Chapters 4, 5, and 6. Additional details of the Internet layer and Linux router functionality are given in the last six chapters of this book.

The Transport Layer

The Transport Layer is responsible for the end-to-end flow of data. There are two primary protocols used within this layer (TCP and the UDP). An application will use one or the other of these protocols for a given communication. These protocols, the headers they produce or read, and the Transport layer are described in Chapter 7.

The Application Layer

This is the layer where all the applications live. These applications are responsible for understanding the data format as well as interpreting the data. Example applications include the Domain Name Service (DNS), the Dynamic Host Configuration Protocol (DHCP), the Network File System (NFS), Samba, electronic mail (e-mail), the file transfer protocol (FTP), and the telnet utility. The Application layer is discussed in Chapter 8.

The device that operates at this layer is the gateway. Unfortunately, gateway is a term, somewhat like hub, that is used in many ways. We generally define it to mean a link between distinct and/or different computer networks. Often, it is used to refer to a system that is capable of converting from one network protocol stack to another, such as a system that is interconnected into both a TCP/IP network and a Netware network. Gateway is often used to refer to a system that interconnects an internal internetwork and an external network such as the Internet. Other uses of the term gateway are described as they arise.

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.


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.


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.


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.


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


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


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.


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.


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