Learning the Basics of TCPIP

Learning the Basics of TCP/IP

TCP/IP is the dominant network protocol suite today. Even Novell has been using it for years on its NetWare servers, and Microsoft uses TCP/IP even though it developed the rival NetBIOS suite.

TCP/IP is the language of the Internet, and is therefore generally the only protocol suite you need to know.

The TCP/IP Model

The TCP/IP model of networking includes four levels. The levels are roughly comparable to the OSI model. As shown in Figure 20.2, the TCP/IP Application level is somewhat functionally equivalent to the top three levels of the OSI model. The TCP/IP Link level is comparable to the bottom two levels of the OSI model.

click to expand
Figure 20.2: The TCP/IP model of networking

Naturally, the TCP/IP levels are better suited to different TCP/IP protocols. For example, Chapter 27 describes secure versions of FTP that manage communications between a client and server, which is an OSI Session-level function. They translate data into ASCII or binary code, which is an OSI Presentation-level function. And they translate your FTP commands, which is an OSI Application-level function.

Major Protocols

There are hundreds of TCP/IP protocols. You ve probably heard of many of them, such as FTP, HTTP, SMTP, SNMP, TCP, IP, just to name a few. Some of these protocols are detailed in the following sections.

TCP/IP Application-Level Protocols

For a full list of TCP/IP Application-level protocols, see /etc/services . As shown in Figure 20.3, this file includes the name of a service, such as ftp , ssh , and smtp , the associated port number, and related comments.

click to expand
Figure 20.3: /etc/services      

TCP/IP has 65,536 available ports. Each port works conceptually like a TV channel. When you direct your Linux computer to the right port, you can receive the data associated with that port. The well-known ports are assigned by the Internet Assigned Numbers Authority ( www.iana.org ). Typical ports include 80 for HTTP (web pages), 21 for FTP communication, and 110 for POP3 e-mail.

Table 20.1 lists several important TCP/IP Application-level protocols and their associated ports.

Table 20.1: TCP/IP Application-Level Protocols






File Transfer Protocol; optimized for sending and receiving files



Secure Shell; encrypts communication between computers



Connects in clear text to remote computers



Simple mail transfer protocol for outgoing e-mail



Hypertext Transfer Protocol for web pages



Post Office Protocol for receiving e-mail



Simple Network Management Protocol for diagnosing networks



Secure HTTP



Internet Print Protocol, associated with the Common Unix Print System (CUPS)



Samba web administration tool



Network File Service for communication between Linux/Unix computers

TCP/IP Transport-Level Protocols

By far, the two most important Transport-level protocols are TCP and UDP. Both take fully qualified domain names , such as www.sybex.com , and try to send your messages to those computers. TCP, also known as the Transmission Control Protocol, will keep sending a message until it gets an acknowledgment from the target computer. TCP is also known as a connection-oriented protocol.

On the other hand, UDP, also known as the User Datagram Protocol, does not need an acknowledgment. The assumption is that the network you re using is so reliable that any lost data doesn t really matter. UDP is also known as a connectionless protocol.

TCP/IP Network-Level Protocols

The key Network-layer protocol is IP, the Internet Protocol. This is most commonly associated with IP addresses such as Both version 4 and version 6 IP addresses are discussed in detail toward the end of this chapter.

There is one other notable TCP/IP Network-layer protocol, the Internet Control Message Protocol (ICMP). This is most closely associated with the ping utility, which allows you to check the connection between your computer and every connected component on your network. You ll use ping and related utilities in Chapter 21 .


The TCP/IP Network level is also known as the Internet level.

TCP/IP Link-Level Protocols

The TCP/IP Link-level protocols are most closely associated with networking technologies such as Ethernet, Token Ring, and ATM. This is where network packets are organized. Once organized, they are grouped into a stream of bits (1s and 0s). Next, the bits are sent through the network cable or other transmission media.

While the focus of networks today is on Ethernet, you may encounter several other important networking technologies. This is just a short list of the available technologies:

Ethernet Regular Ethernet follows the IEEE 802.3 standard. It allows for data transfer at a theoretical maximum speed of 10Mbps. Because Ethernet packets wait to avoid collisions on a busy network, actual speeds are often less than half the maximum.

Fast Ethernet Fast Ethernet, which follows the IEEE 802.3u standard, allows for data transfer at a theoretical maximum speed of 100Mbps. It requires cables with a rating of Category 5 ( Cat 5 ) or better.

Gigabit Ethernet Gigabit Ethernet, which follows the IEEE 802.3ae standard, allows for data transfer at a theoretical maximum speed of 1000Mbps. It requires transmission media such as fiber- optic cables.

Token Ring Token Ring follows the IEEE 802.5 standard, which allows for data transfer at a theoretical maximum speed of 16Mbps. Since only the computer with the token is allowed to transmit data, it is more efficient than Ethernet, at least with respect to the maximum speed.

Asynchronous Transfer Mode (ATM) ATM networks are a popular option for higher speed networks, because they can transfer data at 155Mbps or 622Mbps. While support for ATM is considered to be experimental, ATM network cards are explicitly listed in the Linux Hardware-HOWTO. Developers are working on creating ATM networks with transfer speeds of over 2Gbps.

Point-to-Point Protocol (PPP) No discussion of networking protocols can be complete without reference to the protocol that has served us so well through regular telephone modems. While speeds are still limited to 56Kbps (53Kbps in the United States), PPP has served us well. And for those of you with high-speed Internet access, please remember that as of this writing, fewer than 20 percent of U.S. Internet users use high-speed services such as cable modems or DSL adapters.


The TCP/IP Link level is also known as the Network Access level.

Important Service Definitions

This section includes a basic list of major TCP/IP network services. If you are not too familiar with TCP/IP, this list can help you understand the services that are available. While you ll learn to configure some of these services in detail in later chapters, it can be useful to have a brief summary of each of the following services:

Domain Name System (DNS) The Domain Name System is a database of fully qualified domain names, such as linux1.mommabears.com , and IP addresses, such as When you connect to the Internet and search for a site such as www.redhat.com , your Linux computer looks for a DNS server. Once it has an IP address, this information is added to your requests . Your message can then be sent from network to network until it reaches the Red Hat website.

Dynamic Host Configuration Protocol (DHCP) You can assign IP addresses to every computer on your network. But you need to be careful; if you accidentally assign the same IP address to two different computers, your network could fail. The Dynamic Host Configuration Protocol automates this process.

Address Resolution Protocol (ARP) The Address Resolution Protocol associates IP addresses with the hardware address of a computer s network card. These hardware addresses are also known as MAC addresses. Computers on a network communicate with hardware addresses. Your network can have problems if the IP address is assigned to the wrong MAC address.


Mastering Red Hat Linux 9
Building Tablet PC Applications (Pro-Developer)
ISBN: 078214179X
EAN: 2147483647
Year: 2005
Pages: 220

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net