Networking Basics

Networking Basics

Like any other technical subject, networking is full of terminology and jargon that a newcomer might find daunting. This section introduces some basic concepts of networking, starting with a layered model of networking and proceeding to details of Ethernet and TCP/IP network protocols.

The OSI Seven-Layer Model

A widely used conceptual model of networking is the seven-layer Open Systems Interconnection (OSI) reference model, developed by the International Organizaton for Standardization (ISO). The OSI reference model describes the flow of data between the physical connection to the network and the end-user application. Each layer is responsible for providing particular functionality, as shown in Figure 6-1.

Figure 6-1: The OSI Seven-Layer Reference Model of Networking.

As Figure 6-1 shows, the OSI layers are numbered from bottom to top. Basic functions, such as physically sending data bits through the network cable, are at the bottom; functions that deal with higher-level abstractions of the data are at the top. The purpose of each layer is to provide services to the next-higher layer in a manner such that the higher layer does not have to know how the services are actually implemented. In fact, each layer is designed so that it does not have to know how the other layers work.

The purposes of the seven layers in the OSI reference model are as follows:

  • Physical layer (Layer 1)—Transmits raw bits of data across the physical medium (the networking cable or electromagnetic waves, in the case of wireless networks). This layer carries the data generated by all the higher layers. The physical layer deals with three physical components:

    • Network topology (such as bus or star), which specifies how various nodes of a network are physically connected

    • Transmission medium (such as RG-58 coaxial cable, shielded or unshielded twisted pair, fiber-optic cable, and microwave) that carries the actual signals representing data

    • Transmission technique (such as Carrier Sense Multiple Access with Collision Detection [CSMA/CD], used by Ethernet; and token-based techniques, used by token-ring and Fiber Distributed Data Interface [FDDI]), which defines the hardware protocols for data transfer

  • Data link layer (Layer 2)—Deals with logical packets (or frames) of data. This layer packages raw bits from the physical layer into frames, the exact format of which depends on the type of network, such as Ethernet or token ring. The frames the data-link layer uses contain the physical addresses of the sender and the receiver of data.

  • Network layer (Layer 3)—Contains information about the logical network addresses and how to translate logical addresses to physical ones. At the sending end, the network layer converts larger logical packets to smaller physical data frames. At the receiving end, the network layer reassembles the data frames into their original logical packet structure.

  • Transport layer (Layer 4)—Responsible for the reliable delivery of messages that originate at the application layer. At the sending end, this layer divides long messages into several packets. At the receiving end, the transport layer reassembles the original messages and sends an acknowledgment of receipt. The transport layer also ensures that data is received in the correct order in a timely manner. In case of errors, the transport layer requests retransmission of data.

  • Session layer (Layer 5)—Enables applications on different computers to initiate, use, and terminate a connection (the connection is called a session). The session layer translates the names of systems to appropriate addresses (for example, IP addresses in TCP/IP networks).

  • Presentation layer (Layer 6)—Manages the format used to exchange data between networked computers. Data encryption and decryption, for example, are in this layer. Most network protocols do not have a presentation layer.

  • Application layer (Layer 7)—The gateway through which application processes access network services. This layer represents services (such as file transfers, database access, and electronic mail) that directly support applications.

The OSI model is not specific to any hardware or software; it simply provides an architectural framework and gives us a common terminology for discussing various networking capabilities.

A Simplified Four-Layer TCP/IP Network Model

The OSI seven-layer model is not a specification; it provides guidelines for organizing all network services. Most implementations adopt a layered model for networking services, and these layered models can be mapped to the OSI reference model. The TCP/IP networking model, for example, can be adequately represented by a simplified model.

Network-aware applications usually deal with the top three layers (session, presentation, and application) of the OSI seven-layer reference model. Thus, these three layers can be combined into a single layer called the application layer.

The bottom two layers of the OSI model—physical and data link—also can be combined into a single physical layer. These combinations result in a simplified four-layer model, as shown in Figure 6-2.

Click To expand
Figure 6-2: A Simplified Four-Layer TCP/IP Networking Model.

At each of these layers, information is exchanged through one of many network protocols.

Network Protocols

A network protocol refers to a detailed process the sender and receiver agree upon for exchanging data at a specific layer of the networking model. Thus, you find the following protocols in the simplified four-layer network model of Figure 6-2:

  • Physical-layer protocols, such as Ethernet, token ring, and FDDI

  • Network-layer protocols, such as the Internet Protocol (IP), which is part of the TCP/IP protocol suite

  • Transport-layer protocols, such as the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), which are part of the TCP/IP protocol suite

  • Application-layer protocols, such as File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP), Domain Name Service (DNS), Telnet, HyperText Transfer Protocol (HTTP), and Simple Network Management Protocol (SNMP), which are also part of the TCP/IP protocol suite

The term protocol suite refers to a collection of two or more protocols from these layers that form the basis of a network. The following are some of the well-known protocol suites:

  • IPX/SPX (Internet Packet Exchange/Sequenced Packet Exchange) protocol suite, used by Novell NetWare

  • NetBIOS and NetBEUI (Network BIOS Extended User Interface), used by Microsoft’s operating systems

  • TCP/IP protocol suite

Of these protocol suites, you are probably most interested in the TCP/IP protocol suite, because that’s what Linux and other UNIX systems support well.

Cross Ref 

In addition to the TCP/IP protocol, Linux supports the IPX protocol but not the SPX protocol necessary for NetWare. Linux’s support for NetBIOS comes in the form of a software package named Samba, included on the companion CD-ROMs and described in Chapter 19.

Learning More about TCP/IP

This chapter gives you an overview of TCP/IP and Ethernet networking, then moves on to Linux-specific instructions for setting up TCP/IP networking. A single chapter simply isn’t enough to provide all available information about TCP/IP. For more information on TCP/IP, consult one of the following books:

  • Douglas E. Comer and Ralph E. Droms, Computer Networks and Internets, with Internet Applications, 3rd Edition, Prentice Hall, 2001

  • Douglas E. Comer, Internetworking with TCP/IP, Volume 1: Principles, Protocols, and Architecture, Fourth Edition, Prentice Hall, 2000

  • W. Richard Stevens, UNIX Network Programming, Second Edition, Prentice Hall, 1998