[Ebooks PDF] download Special Edition Using TCP IP Niit (Usa) Inc. full chapters
[Ebooks PDF] download Special Edition Using TCP IP Niit (Usa) Inc. full chapters
[Ebooks PDF] download Special Edition Using TCP IP Niit (Usa) Inc. full chapters
com
https://ebookgate.com/product/special-edition-
using-tcp-ip-niit-usa-inc/
https://ebookgate.com/product/tcp-ip-clearly-explained-pete-
loshin/
https://ebookgate.com/product/tcp-ip-network-administration-3rd-
edition-craig-hunt/
https://ebookgate.com/product/the-abcs-of-tcp-ip-2nd-edition-
gilbert-held/
https://ebookgate.com/product/tcp-ip-lean-web-servers-for-
embedded-systems-2nd-edition-jeremy-bentham/
Sams teach yourself TCP IP in 24 hours 3rd Edition Joe
Casad
https://ebookgate.com/product/sams-teach-yourself-tcp-ip-
in-24-hours-3rd-edition-joe-casad/
https://ebookgate.com/product/special-edition-using-soap-special-
edition-using-john-paul-mueller/
https://ebookgate.com/product/web-technologies-tcp-ip-web-java-
programming-and-cloud-computing-3rd-edition-achyut-s-godbole/
https://ebookgate.com/product/a-professional-s-guide-to-data-
communication-in-a-tcp-ip-world-e-bryan-carne/
https://ebookgate.com/product/special-edition-using-microsoft-
windows-vista-robert-cowart/
Contents at a Glance
Introduction 1
Using 10
11
12
13
Messaging Protocols 163
Hypertext Transmission 175
Simple Network Management Protocol (SNMP) 193
Domain Name System (DNS) 209
14 Bootstrapping Protocols: BOOTP and DHCP 229
Appendixes
A RFCs 425
B Local Area Networking Basics 431
NIIT C Troubleshooting TCP/IP 437
D HTTP Status Codes and Header Fields 443
E Programming Structures for Data Formats 447
F TCP Application Ports 451
Glossary 455
Index 469
Que Publishing
201 W. 103rd Street
Indianapolis, Indiana 46290
Special Edition Using TCP/IP, Second Edition Associate Publisher
David Culverwell
Copyright 2002 by Que Publishing
Executive Editor
All rights reserved. No part of this book shall be repro- Candace Hall
duced, stored in a retrieval system, or transmitted by any Acquisitions Editor
means, electronic, mechanical, photocopying, recording, or Dean Miller
otherwise, without written permission from the publisher. Development Editor
No patent liability is assumed with respect to the use of the Fran Hatton
information contained herein. Although every precaution
Managing Editor
has been taken in the preparation of this book, the pub- Thomas Hayes
lisher and author assume no responsibility for errors or
Project Editor
omissions. Nor is any liability assumed for damages result-
Tricia S. Liebig
ing from the use of the information contained herein.
Copy Editor
International Standard Book Number: 0-7897-2709-9 Kate Givens
Library of Congress Catalog Card Number: 2002102858 Indexer
Ken Johnson
Printed in the United States of America
Proofreader
First Printing: May 2002 Sarah Cisco
05 04 03 02 4 3 2 1 Technical Editor
Michelle Truman
Trademarks Team Coordinator
Cindy Teeters
All terms mentioned in this book that are known to be
trademarks or service marks have been appropriately capi- Interior Designer
talized. Que cannot attest to the accuracy of this informa- Ruth Harvey
tion. Use of a term in this book should not be regarded as Cover Designers
affecting the validity of any trademark or service mark. Dan Armstrong
Ruth Harvey
Warning and Disclaimer
Page Layout
Every effort has been made to make this book as complete Ayanna Lacey
and as accurate as possible, but no warranty or fitness is
implied. The information provided is on an “as is” basis.
The author(s) and the publisher shall have neither liability
nor responsibility to any person or entity with respect to
any loss or damages arising from the information con-
tained in this book.
Contents
Introduction 1 Address Resolution 35
Logical Mapping 36
1 Introduction to Internetworking and Dynamic Binding 36
TCP/IP 7 Address Resolution Using ARP 36
Internetworking 10 Summary 41
Advantages of Internetworking 11
Network Technologies 12 3 The Internet Layer Protocol 43
Intermediate Devices 13
The Internet Layer 44
The Open Systems Interconnection Model
16 Internet Protocol 45
Layers in the OSI Model 17 Data Transmission Using IP 45
Functions of IP 46
The TCP/IP Reference Model 21 IP Hourglass Model 46
The Application Layer 22
The Transport Layer 22 Format of an IP Datagram 47
The Internet Layer 22 Version 48
The Network Interface Layer 23 Header Length 48
Information Exchange Between Layers Total Length 48
in the TCP/IP Reference Model 24 Service Type 49
Time to Live 50
Summary 24 Protocol 51
Source Address 51
2 The Network Interface and Link Layers Destination Address 51
25 Data 52
Header Checksum 52
Network Interface Layer 26
Algorithm to Calculate the Header
The Link Layer 28 Checksum 52
Summary 308
16 IP Routing 259
Summary 320
Contents vii
Summary 387
25 Mobile IP 389 C Troubleshooting TCP/IP 437
An Introduction to IP Mobility 390 Troubleshooting Utilities 440
Agent Discovery Process 393 D HTTP Status Codes and Header Fields
Registering Care-of Addresses 396 443
Summary 414
Summary 424
Appendixes
A RFCs 425
Acknowledgments
Looking back from where we started, writing this book has been a gratifying experience.
Apart from the long hours and the heated discussions in a language that no one could
understand, it was fun writing this book. However, we couldn’t have made it happen with-
out the guidance and assistance from:
Kumar, who has been our guiding spirit and source of inspiration.
Sudhir, who flagged off our long journey.
Rajiv, Uma, and Abi, who gave us a helping hand when we needed it the most.
Sindhu, Rashmi, and Parul, who translated the networking imagery with their graphics.
Ranjana and Geetha, who guided our grammar.
Shantanu, who coordinated the reviews for the book.
Fran, Michelle, and Mark, for smoothing the language and technical aspects.
Our family, friends, and colleagues who encouraged us all the way.
Tell Us What You Think!
As the reader of this book, you are our most important critic and commentator. We value
your opinion and want to know what we’re doing right, what we could do better, what areas
you’d like to see us publish in, and any other words of wisdom you’re willing to pass our
way.
As Publisher for Que, I welcome your comments. You can fax, e-mail, or write me directly
to let me know what you did or didn’t like about this book—as well as what we can do to
make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this book, and that
due to the high volume of mail I receive, I might not be able to reply to every message.
When you write, please be sure to include this book’s title and author as well as your name
and phone or fax number. I will carefully review your comments and share them with the
author and editors who worked on the book.
Fax: 317-581-4666
E-mail: feedback@quepublishing.com
In this introduction
This Book Is for You 2
How This Book Is Organized 2
Conventions Used in This Book 5
2 Introduction
TCP/IP is a protocol suite that enables reliable, secure, and instant communication over a
network or a network of networks, also called an internetwork. With the tremendous
growth of networking in the past few decades, TCP/IP has provided a standardized com-
munication and data exchange mechanism that encompasses the hardware and software
requirements needed to sustain smooth communication over internetworks.
In its simplest form, TCP/IP can be described as a set of communication standards that has
evolved over the past three decades. These standards, documented in the form of Request
for Comments, provide instructions and rules for designing network architectures apart
from a host of software specifications. With contributions from networking pioneers and
experts, the TCP/IP standards have evolved as a premier internetwork communication
mechanism that has stood the test of time. Today, the protocol suite provides specifications
for implementing mobile communication, realtime multimedia transmission, Quality of
Service, and a high degree of data communication security.
■ Chapter 4, “Internet Control Message Protocol,” delves into the error tracking and
isolation features offered by TCP/IP using the Internet Control Message Protocol.
■ Chapter 5, “Transmission Control and Data Flow,” gives you an insight into
Transmission Control Protocol, which is another core protocol in the TCP/IP protocol
suite.
■ Chapter 6, “Timed Data Transmission and Performance Concepts,” continues with the
exploration of Transmission Control Protocol features. The chapter delves into timed
data transmission and performance enhancement features offered by Transmission
Control Protocol.
■ Chapter 7, “User Datagram Protocol,” explores how unreliable data transmission can
be implemented using the User Datagram Protocol.
Chapters 8–14 deal with software applications that operate from the Application layer of the
TCP/IP reference model.
■ Chapter 8, “File Transfer and Access,” deals with remote file transfer and access using
protocols such as File Transfer Protocol, Trivial File Transfer Protocol, and Network
File Access.
■ Chapter 9, “Remote Login,” deals with protocols such as Telnet and Rlogin that enable
remote computer logins.
■ Chapter 10, “Messaging Protocols,” delves into how TCP/IP implements mailing fea-
tures using the Simple Mail Transfer Protocol.
■ Chapter 11, “Hypertext Transmission,” enables you to learn how TCP/IP provides
hypertext data transmission using Hypertext Transfer Protocol.
■ Chapter 12, “Simple Network Management Protocol (SNMP),” delves into the net-
work management features implemented using TCP/IP’s Simple Network
Management Protocol.
■ Chapter 13, “Domain Name System (DNS),” introduces you to the domain naming
and resolving features implemented by TCP/IP using Domain Naming Services.
■ Chapter 14, “Bootstrapping Protocols: BOOTP and DHCP,” deals with application
protocols such as BOOTP and DHCP, which provide bootstrapping and dynamic host
configuration features.
Chapters 15–20 delve into the intricacies of the IP addressing scheme and the IP address
conversation feature provided by subnetting apart from information on routing architec-
tures and mechanisms provided by TCP/IP.
■ Chapter 15, “Subnetting and Classless Addressing,” delves into the IP addressing
scheme and the classless addressing feature that overcomes the shortage of IP
addresses.
■ Chapter 16, “IP Routing,” introduces routing concepts and routing error handling
features implemented in TCP/IP.
4 Introduction
The next two chapters are a relatively smaller but highly significant section of the book that
delves into the security features provided by the TCP/IP protocol suite.
■ In Chapter 21, “Security Concepts and Private Network Connection,” you will learn
about private networking architectures and security concepts implemented through pri-
vate internetworking.
■ Chapter 22, “IP Security,” delves into how TCP/IP addresses fundamental security
issues by implementing the IPSec framework.
The last five chapters explore the advanced networking technologies implemented by
TCP/IP apart from looking into TCP/IP technologies that will take internetworking into
the future.
■ Chapter 23, “IP Over Asynchronous Transfer Mode (ATM),” introduces you to asyn-
chronous data transmission using ATM and how IP can be implemented over the ATM
framework.
■ Chapter 24, “Voice Over IP,” delves into the standards and protocols provided by
TCP/IP that enable realtime voice transmission.
■ In Chapter 25, “Mobile IP,” you will learn how mobility support is implemented in IP
by using the Mobile IP framework.
■ The next generation Internet Protocol implementation, IPv6, is introduced in
Chapter 26, “IPv6.”
■ With the advent of internetworking as a profitable business area, providing Quality of
Service has become a vital survival strategy. Chapter 27, “Quality of Service,” delves
into how TCP/IP implements quality of service on Internetworks.
The monospace font is used within the syntax to represent code in a different font. When
commands or terms appearing in syntax is specified in normal text, it is represented in
monospace. For example, the Ping command is represented in monospace to ensure that
the command is not confused with other terms in normal text.
When you see a note in this book, it indicates additional information that can help you
better understand a topic or avoid problems related to the subject at hand.
Cautions warn you of hazardous procedures (for example, actions that have the poten-
tial to compromise the security of a system).
Cross-references are used throughout the book to help you quickly access related informa-
tion in other chapters.
➔ For an introduction to the terminology associated with transactions, see “Understanding Transactions,”
p. 100
CHAPTER
1
Introduction to Internetworking
and TCP/IP
In this chapter
Evolution of TCP/IP and the Internet 8
Internetworking 10
The Open Systems Interconnection Model 16
The TCP/IP Reference Model 21
Summary 24
8 Chapter 1 Introduction to Internetworking and TCP/IP
With the implementation of TCP/IP as the standard networking protocol and with the
growth in the popularity of networking, a large number of networks started appearing on
the networking horizon. This resulted in the creation of a “network of networks” and cre-
ated the concept of internetworking. Before delving into internetworking, let us take a brief
Ch
look into the history of internetworking in general and the Internet in particular.
The Internet, the global network of networks, connects millions of computers across the 1
globe. It was born as a result of the need to develop a reliable information exchange system
in the United States to enable scientists and administrators to share important data. Defense
Advanced Research Projects Agency (DARPA) wanted to create a well-connected network
across the United States through which it could monitor and control the functions of all the
strategic locations in the United States. The network had to be such that even if parts of the
network are affected or disconnected, the functioning of the network should not be dis-
rupted. In addition, the network must not have any central controlling authority because if
the control is centralized, any damage to it would throw the network out of gear.
Any node on the network should be able to generate, send, and receive data. Based on these
requirements, DARPA envisioned a network in which data would be divided into packets.
Each of these packets would be addressed and sent across the network. The packet would
move from one machine to another machine on the network until it reached the intended
recipient. The routes taken by these packets might be different.
Meanwhile, research on a similar technology, the packet-switching technology, was going on
and DARPA was funding the research. It decided to implement this technology on a net-
work that had just four computers. This network was called the ARPAnet. It connected acad-
emic and military research centers. Slowly, as the need to exchange data increased, more
universities joined the network, and from then on, this primitive Internet grew in leaps and
bounds. DARPA wanted to create more such networks and interconnect them. Different
types of networks started emerging.
After some time, many networks were created that used different technologies and proto-
cols. To enable information exchange across these networks, a common mode of communi-
cation, called a protocol, had to be established and followed. This triggered the
development of a number of protocols, which were combined to form the ARPAnet proto-
col suite. This protocol suite was the predecessor of TCP/IP protocol suite, which took
shape in 1978. TCP/IP protocol suite is a repertoire of protocols developed for different
purposes, the predominant ones being TCP and IP, hence the name. As the Internet began
to take shape, DARPA converted machines attached to its research networks to TCP/IP.
Thus, the Internet, with ARPANET as the backbone, became the test bed for TCP/IP. In
January 1983, the Office of the Secretary of Defense asked all the computers that were con-
nected to networks to use TCP/IP.
Although TCP/IP evolved as a protocol for the Internet, it can be used for any type of
an internetwork.
10 Chapter 1 Introduction to Internetworking and TCP/IP
Internetworking
The concept of networking is more than just connecting two or more computers together.
Networks were developed to facilitate sharing resources, such as software or hardware
devices, among computers. To communicate with one another, different networks need to be
interconnected, just as the computers are linked to form the individual network. For exam-
ple, if a company has branches spread across a country, the networks in the branch offices
should be able to communicate with one another for the most effective functioning of the
company. Otherwise, resources, such as files and databases, might become redundant
because they will be duplicated across locations. This kind of problem necessitated connect-
ing two or more networks with each other.
However, a couple requirements had to be met before connecting two networks. The net-
works should use the same protocol for communication. The networks also must use the
same or compatible hardware technologies.
But most networks that had to communicate were using different protocols and hardware
technologies. This triggered the creation of standards that would bridge the gaps and enable
communication between disparate physical networks.
Two or more networks connected to each other form an internetwork or internet. The net-
works that are connected to form an internetwork might be dissimilar (see Figure 1.1).
FDDI Ethernet
network network
a direct physical connection is established between the sender and receiver. The data needs
to be sent only through the connection that has been established. The other computers
cannot use the communication channel until it is released.
Ch
An internet or an internetwork refers to a group of networks that are connected to
each other. However, the Internet or the Net refers to the global network of networks
1
and is the largest internetwork. The Internet uses TCP/IP for connecting the different
networks.
In the case of packet-switched networks (see Figure 1.2), data that is to be transmitted, such
as a file, is divided into manageable units of data called packets or data packets. The data pack-
ets can take different paths to reach the destination. A connection is not established between
the sender and the receiver. Now, a question arises as to how the receiver will recognize all
the data packets that belong to a single group and reassemble them together. This problem
is solved by adding headers to the packets that are used by the intermediate hosts and the
destination to regroup the data packets together. The advantage of packet-switching is that
the data transmission will not be affected even if one path is disrupted because the data
packets can be transmitted through a different path. In addition, intermediate devices called
routers can be used to identify the shortest path to a destination and transmit the data pack-
ets through that path.
Packet-switched networks can also be classified according to the distances they cover
as a local area network (LAN), wide area network (WAN), and metropolitan area net-
work (MAN). LANs are groups of computers that usually span different floors in a
building. MANs span different locations in a city and use high-speed connections, such
as fiber-optic cables. WANs operate across different countries and use satellite connec-
tions for communication.
Advantages of Internetworking
Internetworking enables networks with dissimilar configurations to communicate with each
other. The following are some of the important advantages of internetworking:
1. The design of the networks that form the internetwork need not be changed or, at the
most, may require minimal changes to support connectivity with other networks.
2. The network management is distributed and will thus become efficient. Managing
smaller networks will be easier and the network administrators will have more control
over the network.
3. Internetworks can connect and effectively transmit data even across networks that
operate at varying speeds.
12 Chapter 1 Introduction to Internetworking and TCP/IP
Packet 1
Network 1 R4 Network 2
R1 R3
Computer A Computer B
R2
Packet 2
Packet-switched network
Network Technologies
The Fiber Distributed Data Interconnect (FDDI) can be described as the foremost network
technology that was popular in the early days of networking. In the networks of today,
Ethernet is the most prevalent network technology. We will discuss some of the features of
these technologies in the following sections.
➔ For more information on network technologies, see “Networking Basics,” p. 425
Ethernet
Ethernet is a packet-switched LAN technology that was created by Xerox Corporation to
transmit data in a network. It also defines a set of standards, such as the speed of data trans-
mission, the access mechanism of the network, and the maximum amount of data that can be
transmitted over the network at any given time. Ethernet uses 10Mbps bus topology because
all computers share a single communication channel. One of the access mechanisms used by
Ethernet is called Carrier Sense Multiple Access/Collision Detect (CSMA/CD). If a computer on
a network that uses Ethernet technology needs to transmit the data to another computer on
the same network, it places the data packets in the communication channel. The communi-
cation channel is common to all the computers on the network, and so data collision might
Internetworking 13
occur on the network. If a computer is unable to transmit data, it waits for a specific time
interval and then retransmits the data.
➔ For more information on Ethernet, see “Networking Basics,” p. 425
Ch
Fiber Distributed Data Interconnect (FDDI)
FDDI is also a LAN technology that is used to transmit data over optical fiber cables. 1
Therefore, networks that use the FDDI technology transmit data faster than the networks
that use the Ethernet technology. The most common access control mechanism that is used
by FDDI is token ring. In this technique, data transmission is controlled by a token that is
passed on the network. A token is a special data packet that moves on the network. If a com-
puter needs to transmit data, it obtains the token and starts transmitting the data. After the
transmission is over, the token is released to the network and the same set of steps is fol-
lowed again. Data collision is prevented because only one computer can hold the token at a
time.
➔ For more information on FDDI, see “Networking Basics,” p. 425
Intermediate Devices
To extend a network or connect different networks and form an internetwork, you need net-
working devices such as repeaters, bridges, routers, LAN Switches, and gateways. These
devices are also known as intermediate devices. An intermediate device can be used to connect
networks using dissimilar network technologies, protocols, and media types.
Sometimes, to ease the administration of large networks, you can divide the large net-
work into smaller networks and connect them by using intermediate devices.
Repeaters
Electrical signals that represent data to be transmitted might weaken when it passes
through the networks if they have to cover long distances. This might lead to loss of data.
To overcome this problem, devices called repeaters, are used to regenerate the signals. The
placement of a repeater on the network, such as Ethernet, plays an important role in net-
work design. Repeaters are not smart devices.
The function of a repeater is to get data from one network, regenerate the signals, and pass
it on to the other networks. Repeaters are not smart devices. They cannot perform complex
tasks, such as finding the route in which a data packet can be sent. In addition, if data that is
passed from one network to the other is corrupted, the corrupted signals are also regener-
ated. To put it differently, repeaters do not check the data for errors. The advantage of
using repeaters is that they have a very simple circuitry and can be implemented easily.
14 Chapter 1 Introduction to Internetworking and TCP/IP
Bridges
A bridge is a device that is used to connect two networks, which can be dissimilar or similar.
Bridges are independent of the network architecture and the access mechanism of the net-
works. A bridge is a smart device unlike a repeater. A bridge accepts data from the sender
and passes the data to the appropriate destination, whereas repeaters pass data from one net-
work to another mechanically. Using bridges is advantageous because they do not replicate
noise. A kind of bridge, called an adaptive bridge, is capable of deciding which kind of frames
must be forwarded.
A frame is the unit of data that can be passed over the physical medium, which is
nothing but the cables that connect the computers on a network.
Routers
Routers are used to connect two or more networks that have dissimilar architectures. The
data packets on a network can take any path to reach its destination. If a data packet is
passed to a router, the router finds the best path and transmits the data packet to the desti-
nation. Routers can also be used to connect networks that work with different cabling sys-
tems and protocols.
There are a few differences between bridges and routers. They are stated in the following
list:
■ Although a bridge and a router can determine multiple paths to a destination, a bridge
can use only one path between two networks whereas a router can transmit data
through multiple paths or routes. A bridge shuts down all paths except one by using a
protocol called the spanning tree protocol.
■ Bridges are faster than routers because they do not perform complex functions as
routers do.
LAN Switches
Switches, like bridges, are used to connect two dissimilar networks. They operate at the
hardware level, which makes them operate at higher speeds compared to bridges. The other
difference between switches and bridges is that switches can connect two networks with dis-
similar bandwidths. Figure 1.3 displays two networks that are connected using switches and
routers.
A hub is a device that is used to connect hosts on a network that uses the star topol-
ogy. A star topology describes a physical layout in which all the computers are con-
nected to a central device, which is the hub. The data transmission between computers
on the network happens through the hub.
Internetworking 15
Switch
Router
Internet Traffic
Router
Hub
Branch Office:
With 20 users;
inexpensive
xxx.xxx.xxx.1 xxx.xxx.xxx.2 xxx.xxx.xxx.3 solution with a
Hub.
Printer
Gateways
Gateways are devices that are used to connect networks working on dissimilar protocols,
data formats, and architectures. For example, a gateway can convert data used by one proto-
col to a format that is compatible with a different protocol. Gateways can be implemented as
hardware, software, or a combination of both.
The OSI model has seven layers. Before understanding the different layers of the OSI
model, you must understand the different steps involved in the communication between
computers. Consider a situation in which Computer A needs to send data to Computer B.
The steps that are involved in data transmission are as follows:
1. Computer A sends a data file, which can be an e-mail or an audio file, to Computer B.
Depending on the type of information that needs to be transmitted, specific services
are invoked. The data files are converted to a standard format and the file is encrypted,
if required. Data compression is also done at this stage.
2. After the format of the data is changed, Computer A needs to find the address of the
destination computer. In addition, a session is created for data transmission.
3. The data is divided into a group of packets called frames and is sent to the destination.
The network system also adds information to the frames called headers, which are used
to ensure the security and integrity of data being transferred. This means that if four
groups of data are transferred, all of them must be properly received at the other and in
the same order. Data loss might occur if the signals are weaker or if there are distur-
bances in the communication channel. The network architecture must also include
provisions to retransmit data, if required.
4. The final step in data transmission is transmitting the data as raw bits over the physical
medium. The physical medium of communication could be an optical fiber cable or a
coaxial cable.
The Open Systems Interconnection Model 17
These different stages of data transmission can be mapped to the different layers of the OSI
model.
Figure 1.4
Application
The OSI model is a
standard reference Presentation
model for communi-
cation on a network. Session
Transport
Network
Data link
Physical
The first five layers in the OSI model are implemented as software, whereas the last two
layers are implemented as a combination of hardware and software. The lower layers of the
reference model handle data transport and the higher layers take care of connection estab-
lishment and data presentation.
The layers of the OSI model play a key role in transmitting data. All these layers must be
present at the receiving and sending end of the communication system connecting the com-
puters. Each layer has a well-defined function in transmitting data from one computer to
another. The model states what each layer should do to enable data transfer on a network in
spite of the hardware constraints. Movement of data across the layers can be categorized as
logical movement of data and physical movement of data. The first five layers of the OSI
model handle the logical movement of data, whereas the last two layers are responsible for
moving the data through the physical medium, which can be a telephone line or an optical
fiber cable.
18 Chapter 1 Introduction to Internetworking and TCP/IP
For example, when a computer sends data to another computer on the network, the data
from the source computer traverses down the layers starting from the Application layer to
the Physical layer. The Physical layer transmits the data to the destination computer. In the
receiving computer, the data travels up through these layers starting from the Physical layer.
The layers in the OSI reference model are numbered from 1 to 7 starting with the
Physical layer and ending with the Application layer. For example, the Application layer
is also referred to as Layer 7.
The functionality defined for every layer in the OSI reference model is implemented
through one or more protocols. The protocols that operate in a layer communicate
only with the protocols in the same layer of the other computer. This type of communi-
cation is called peer-level communication.
transactions that take place between the source computer and the destination computer.
They are connection establishment, data transfer, and connection release. The connection
for any communication between two hosts is implemented in these three phases.
Ch
The Transport Layer
The Transport layer is responsible for converting data into small packets of information and 1
ensuring that the data reaches the destination properly. There are two main methods used
for communication in this layer, the connectionless service or the connection-oriented service.
Sending an e-mail is an example of a connectionless service. This is because when an e-mail
is sent, it is not necessary for destination users to have a connection open at their end. To
download mail, users can open a connection with the mail server later. However, in the case
of online chat services, the sender and the receiver need to establish a connection with the
chat server during the chat session. This type of data transfer is known as connection-
oriented communication. When an error occurs during data transfer, it is communicated
to the receiver through an acknowledgement. The data is then retransmitted to the
destination. In a few cases, such as voice and audio transmission, data needs to be
transmitted without any delay.
In addition to the connection-related services the Transport layer also enables another type
of communication called request-reply. Request-reply is used in client/server communication.
For example, the client might pass a request to authenticate the username and password of a
user to the server and wait for the server to reply. However, it is important to note that,
irrespective of the type of communication implemented between the client and the server,
the computers would use either a connection-oriented or connectionless mode of data trans-
mission. For example, File Transfer Protocol (FTP) or Telnet clients and servers use a
connection-oriented data transmission mode while implementing request-reply for
username and password authentication. On the other hand, BOOTP uses a connectionless
data transmission mechanism while implementing request-reply for transmitting bootstrap
information.
➔ For more information on TCP that is a protocol that operates from the Transport layer, see “Transmission
Control and Data Flow,” p. 73
➔ For more information on UDP that operates from the Transport layer, see “UDP,” p. 113
A route is defined as the path that is taken by data to reach its destination.
20 Chapter 1 Introduction to Internetworking and TCP/IP
➔ For more information on IP that operates from the Network layer, see “Internet Protocol: The Internet
Layer Protocol,” p. 43
➔ For more information on ICMP that operates from the Network layer, see “Internet Layer and Internet
Control Message Protocol,” p. 61
Repeaters operate from the Physical layer of the OSI reference model. Bridges operate
from the Data Link layer and the Physical layer of the OSI reference model. Gateways
can operate from all seven layers of the OSI reference model.
Ch
1
The TCP/IP Reference Model
As the number of networks that were connected to the ARPAnet increased, communication
among the computers became a problem. Common standards were required for communi-
cation because the hardware and the software that were used were vendor-specific. A com-
mon protocol was necessary for communication between the computers. This led to the
creation of TCP and IP. With the increase in the number of requirements, several protocols
were created to address all the requirements. This also led to the creation of a new reference
model, called the TCP/IP reference model. The TCP/IP reference model consists of four
layers: Application, Transport, Internet, and Network Interface, as shown in Figure 1.5.
Transport Transport
Network Internet
Data link
Network
Interface
Physical
The TCP/IP specifications are not owned by any single organization or institution.
These standards and the changes that are made to the technology are documented as
Request for Comments (RFC) for TCP/IP. The area managers of the IETF are responsi-
ble for making changes to the RFC documents. The RFCs are numbered chronologically
in the order of their release.
A group of related protocols through which a data packet passes in the OSI and TCP/IP
reference models is called a protocol stack. When data is transferred from one com-
puter to another, data passes down the protocol stack in every layer. At the destination
computer, the data packets travel up the layers in the reference model. The header
and the trailer information added by the upper layers are treated as data by the lower
layers. Every layer adds its own header information, and sometimes trailer information,
to the data and passes it on to the other layers.
22 Chapter 1 Introduction to Internetworking and TCP/IP
Figure 1.6
A wide array of proto-
cols operate from the
different layers of the
TCP/IP reference Source Destination
model. Sending Data Receiving Data
IP ICMP IP ICMP
frame frame
24 Chapter 1 Introduction to Internetworking and TCP/IP
The header part of a datagram or a frame added by a layer is a group of fields used by
the protocols in that layer to perform specific tasks. For example, when data needs to
be transmitted from one computer to another, the source and destination addresses
are required. This information also forms a part of the header information.
A unit of data transfer on the Physical layer is called the frame. The Physical layers between
two computers communicate with each other by using frames. At the destination, as the
data moves up, the layers read the information sent as a header by their counterparts and
pass just the data to upper layers. This data includes header information added by the other
layers along with the actual data, which are read at the corresponding layers at the destina-
tion. A datagram is the unit of transfer between the Internet layers. The data that is sent by
the Application layer is usually referred to as a message.
The rest of the book uses the Microsoft implementation of TCP/IP, which conforms to
the IETF standards. To enable you to understand the concepts better, some chapters
use tools and command references that are Windows-based. However, the concepts
and discussions will revolve around the generic TCP/IP standards.
Summary
An internetwork is a group of networks that are connected to one another. The process of
constructing and managing internetworks is called internetworking. The International
Standards Organization (ISO) created a set of specifications called the Open Systems
Interconnection (OSI) model for designing a network architecture that would enable data
transfer across networks irrespective of the underlying hardware architecture. The OSI
model comprises seven layers and each one of them plays a vital role in communication.
The TCP/IP reference model, which is based on the OSI model, acts as a standard for
communication on the Internet. The TCP/IP reference model is comprised of four layers.
CHAPTER
2
The Network Interface and Link
Layers
In this chapter
Network Interface Layer 26
The Link Layer 28
Differences Between SLIP and PPP 29
Addressing 30
Address Resolution 35
Reverse Address Resolution Protocol 39
Summary 41
26 Chapter 2 The Network Interface and Link Layers
Figure 2.1
Every layer in the
TCP/IP reference adds
its own header infor-
mation, which is
finally packed into a
Frame
frame and sent over
the physical medium.
Data Data
Message Message
TCP/UDP TCP/UDP
datagram datagram
IP datagram IP datagram
Frame Frame
A frame consists of two components, the frame header and data. The data component of
the frame consists of data that has been received from the upper layers, such as the
Application, Transport, and the Internet layers. However, the components of a frame
header differ with the network technology that is used. For example, frames being
Network Interface Layer 27
transmitted over a network implementing Ethernet technology contain fields, such as source
address, destination address, type, and cyclic redundancy checksum. On the other hand,
frame headers for frames transmitted over an FDDI network contains fields such as pream-
ble, start delimiter, frame control, destination address, source address, frame check
sequence, end delimiter, and frame status. Let us analyze the contents of an Ethernet frame
header. The following list describes the fields provided by an Ethernet frame header (see
Figure 2.2):
■ Source Address—This field holds the address of the sending computer. The size of this
field is 6 bytes.
■ Destination Address—This field holds the address of the destination computer. This Ch
field is also 6 bytes in size. 2
■ Type—This field represents the protocol whose data is held in the frame. For example,
if the frame contains data that is sent by Internet Protocol (IP), the value in the type
field is set to 080016. A few more values that can be provided in this field are 080616 for
an ARP message and 803516 for a RARP message. The size of this field is 2 bytes.
■ Cyclic Redundancy Checksum (CRC)—This field is used to store a checksum value that
is used to verify the quality of the data. The CRC value can be used to identify whether
the data contained in the frame is altered during transit. This field is also referred to as
Frame Check Sequence (FCS).
Figure 2.2
The information sent Physical
by the upper layer medium
protocols forms the
data part of a frame
and is sent over the Frame 1 Frame 2
physical medium.
Data
There are different types of frames that can be created for Ethernet. They are Ethernet
II, IEEE 802.3, IEEE 802.2, and sub-network access protocol (SNAP). Except for the
Type field that is replaced by the Length in certain frame types, the other fields
remain the same. The length field is used to indicate the number of bytes that are
located following this field in the frame.
28 Chapter 2 The Network Interface and Link Layers
Figure 2.3
The Link layer is used
for address resolution Application Layer
and communication FTP TFTP HTTP
over serial lines.
Telnet SMTP DNS
Transport Layer
TCP UDP
Internet Layer
IP ICMP
Link Layer
ARP RARP
Network Layer
Differences Between SLIP and PPP 29
PPP is an Internet standard for transporting data over point-to-point serial connections. It
can be used to transport data that is created by multiple protocols, such as TCP/IP or IPX,
over the same point-to-point connection. PPP, in turn, interacts with a protocol called the
Link Control Protocol (LCP) for establishing and terminating connections. PPP also inter-
acts with a group of protocols called Network Control Protocols (NCPs) to configure the
Network layer protocols.
If SLIP is used for communication, the destination and source IP address must be known.
However, when a host needs to connect to the Internet by using PPP, all that the application
will require to establish the connection is the telephone number of the telephone used for
dialing up the ISP, the user ID, and the password. In addition, PPP can be used with proto- Ch
cols other than TCP/IP.
2
Link Control Protocol is used for establishing and testing connections over a telephone
line. Both the sender and the receiver must agree upon the format of the LCP packets.
The Internet layer protocols of the TCP/IP reference model or the Network layer proto-
cols of the OSI reference model is associated with an NCP that controls the transmis-
sion of data packets created by the protocols over telephone lines. For example, the
name of the NCP that is associated with IP is called an IP Control Protocol (IPCP). NCP
encapsulates the data sent by the Internet layer protocol or the Network protocol and
passes it to the Physical layer for data transmission.
Addressing
Addressing is the process of assigning addresses to the hosts on a network. Apart from
assigning addresses to the hosts, every network must be identified by a unique address.
Communication between computers can happen only if each and every computer on the
network is uniquely identified by an address. There are two types of addresses that can be
assigned to a computer on a network—the physical or hardware address and the logical or
Internet Protocol (IP) address. There are a few rules that are used to assign addresses to the
hosts and networks. These rules form the IP addressing scheme.
The physical or the hardware address of a computer is the number that is assigned to the
Network Interface Unit or the Network Interface Card (NIC) of the computer. Network
Interface Card (NIC) is a piece of hardware that must be attached to every computer for it to
connect to a network. The address that is assigned to the NIC is the one that uniquely iden-
tifies the computer on the network. A few computers on a network can contain more than
one NIC, each representing an interface to the network to which the computer is con-
nected. A computer that has more than one NIC is also known as a multihomed computer.
A router is an example of a multihomed computer because it has a NIC for every net-
work to which it is connected.
Physical Address
The physical address; of a computer is the address that is assigned to its NIC. In an
Ethernet network, the physical address is a 48-bit address that is imprinted at the time of
manufacturing the card. The Network Interface layer in the TCP/IP reference model can
communicate with other computers only by using the physical address (see Figure 2.4).
The physical address of a computer is of two types, fixed and configurable. The addresses of
cards, such as proNET and ARCNET, can be changed and are thus called configurable cards.
However, the addresses of Ethernet cards cannot be changed because they are imprinted
during the manufacturing of the cards.
The hardware address of an Ethernet card is also known as the Media Access Control
(MAC) address. Thus, in the context of Ethernet, the MAC address and the hardware
address can be used interchangeably.
Figure 2.4
The physical address
of a computer is vital
for communication.
Ch
The proNET network is based on the token ring technology developed by the Proteon
Technology. Like ARCNET NICs, addresses of the proNET NICs are also configurable.
One precaution to be taken by the network administrator while assigning IP addresses
is that the same address must not be duplicated.
The IP Address
The TCP/IP protocol suite should enable communication between computers irrespective
of the underlying hardware technologies. As the hardware address or the physical address of
the computer is dependent on the manufacturer and the hardware technology used, a com-
mon addressing scheme that is independent of the underlying technology must be used.
This common addressing scheme is the IP addressing scheme, in which every IP address com-
prises of 4 bytes. The way in which the IP address is represented is called dotted-quad. The
network administrator assigns the IP addresses to a computer when installing the operating
system.
An address of a computer on a network is identified by two components, the network to
which the computer is connected and the number assigned to the computer on the network.
These two components are called the network ID and the host ID, respectively.
Depending on the number of bytes allotted to the network and host IDs, IP addresses can
be classified into five address classes: A, B, C, D, and E. This method of classifying the IP
addresses is also known as classful IP addressing. The address classes enable easy administra-
tion of a network. They are also used to make efficient use of the 4 bytes that can be used
for assigning IP addresses.
Classful addressing scheme has a few limitations. First, the number of addresses in the
address space is becoming insufficient to cater to the exponential growth of the
Internet. Second, it is observed that the addresses that are allotted to the organizations
are not being used efficiently. This is due to the allocation of a fixed number of bits for
the network number and host number. Due to these limitations, a different scheme
called the classless addressing scheme was created. This enables network administra-
tors to overcome the limitations of classful addressing by breaking the rigid demarca-
tion between the network number and host numbers. Most of the protocols support
classless IP addressing. Rather than referring to an address as a Class C address, it is
now commonly referred to as a /24 network. This indicates that 24 bits are allotted for
representing the network. Classless IP addressing is also referred to as Classless Inter-
domain Routing (CIDR).
Network ID Host ID
(8 bits) (24 bits)
Addressing 33
In Figure 2.5, N represents the network ID and H represents the host ID. In the 8 bits that
are allotted for the network ID, the first bit is set to 0 and only seven bits can be used for
the network ID. A maximum of 27 class A networks can be set up. However, two addresses,
0.0.0.0 and 127.0.0.0, are reserved for the default route and the loopback address, respec-
tively. Thus, a total of 27–2, which is equal to 126, networks can be set up as class A net-
works. A maximum of 16,777,214 hosts can be connected to each network.
127.0.0.0 is referred to as the loopback address and is used for testing the TCP/IP
software on the local computer.
Ch
2
The default path that is taken by a data packet if there are no entries in the routing
table is called the default route. In other words, if the sender is not aware of the route
through which a data packet needs to be transmitted, the data packets are forwarded
to the default gateway.
A routing table is a table stored on every host on the network to maintain a list of
routes through which a data packet can be sent.
Class A addressing scheme is allotted for large networks that have a limited number of
servers and many hosts connected to them. Class A networks are also called /8 networks
because the first 8 bits are used to identify the network. Typically, class A addresses are not
used by organizations. Instead, a class A network is further subdivided into smaller net-
works called subnets. This technique is referred to as subnetting. With a single class A
address, many small networks can be created. This also avoids unnecessary procurement of
class A addresses.
➔ For more information on subnetting, see “Subnetting and Classless Addressing,” p. 245
Network ID Host ID
(16 bits) (16 bits)
IPv4 address space refers to the total number of networks and hosts that can be cre-
ated by using IPv4, a version of Internet Protocol.
Network ID Host ID
(24 bits) (8 bits)
The network ID of a class C address can range between 192 and 223. Class C networks are
also called /24 networks because the first 24 bits are used to represent the network ID.
Class C networks represent 12.5% of the IPv4 address space.
Figure 2.8
Class D addresses are 1110 Multicast Address
reserved for multicast
addresses.
Ch
Figure 2.9
Class E addresses are 1111 Reserved for future use
reserved for experi-
mentation.
To make IP addresses easier for users to represent, they are represented as four deci-
mal numbers called the dotted-quad or the dotted decimal notation.
Address Resolution
The Internet layer and the Network Interface layer follow different ways of addressing a
computer and therefore, a method by which you can resolve a software address and get the
corresponding hardware address or vice versa is required. This process is called address reso-
lution. If on a network, a computer, Computer A, needs to communicate with another com-
puter, Computer B, on the same network, Computer A uses the IP address of Computer B
to send data. However, as the Network Interface layer requires the hardware address of
Computer B to transmit data over the physical medium, there needs to be a method by
which the corresponding hardware address can be found from the IP address. This is done
by a Link layer protocol called Address Resolution Protocol (ARP).
ARP is used to resolve IP addresses to the physical address of a computer. It is a generic
protocol that can be used to resolve the physical address of any type of network technology.
In general, there are two types for resolving IP addresses to the corresponding hardware
addresses. They are logical mapping and dynamic binding.
36 Chapter 2 The Network Interface and Link Layers
Logical Mapping
Logical mapping is a technique of mapping an IP address to the corresponding physical
address. In this method, information derived from a component of the IP address is used to
obtain the physical address of a computer. This technique is used with technologies such as
proNET and ARCNET.
Dynamic Binding
Dynamic binding is the process of mapping an Ethernet address to the corresponding soft-
ware address. This process is implemented by using the ARP. The steps involved in dynamic
binding are discussed along with ARP.
➔ For more information on Ethernet and Address Resolution Protocol, see “RFCs,” p. 425
ARP Cache
ARP cache is a location on the memory of a host, containing a list of IP addresses and the
corresponding physical addresses. The cache is created with a Time to Live (TTL) value or
an expiration time value. The cache performs the role of a digital diary which is used to
store the names, addresses and other important information about the people with whom
you communicate frequently. Every host maintains its own “digital diary” in the form of an
ARP cache. The lifetime of the ARP entry is decided by the expiration time. The expiration
time for a cache entry is operating system–dependent. There are certain specific situations
where the ARP cache timeout value must be modified. For example, it is quite possible that
ARP entries related to computers that do not exist on the network are present in the cache.
The dynamic nature of any internetwork makes it possible for such redundant entries to be
cached. Therefore, ARP cache entries must be cleared from time to time using a predefined
timeout value.
Address Resolution 37
When an ARP entry is recorded in the cache, the time at which the entry was created is also
recorded. For example, if the timeout interval for the ARP cache entries is five minutes, the
entry is deleted five minutes after it was recorded in the cache. However, deletion of ARP
cache entries based on the timeout period is not applicable to routers and default gateways.
Typically, a Windows 2000 host maintains an unused ARP entry for a maximum of two min-
utes. If the entry is being used every two minutes, Windows 2000 maintains the entry for a
maximum of 10 minutes. This type of cache entry is called a dynamic ARP cache entry.
Entries that are recorded using the arp command with an –s option are maintained on the
host until the host is rebooted. Such entries are called static ARP cache entries. You will
learn more about the arp command in the following sections. ARP cache saves you the cost
Ch
of broadcasting a request every time a message is to be transmitted. Consider a situation in
which Computer A needs to send data to Computer B. The first step in the data transfer is 2
to find the hardware address of Computer B. To do this, Computer A first examines the
entries in the ARP cache. If there are matching entries in the ARP cache, the information is
picked up from the ARP cache and the broadcast is not sent. By storing entries locally on
the ARP cache, broadcast messages that are required for address resolution can be reduced,
increasing the efficiency of the network. After the address resolution process is complete,
the other phases of data transfer are done as usual.
The ARP entries can be displayed using the ARP –a command (see Figure 2.10). The MAC
address is displayed as six pairs of hexadecimal numbers separated by a hyphen in Windows.
The format in which the hardware addresses are displayed might depend on the oper-
ating system. The command used to display the contents of the ARP cache might vary
with the operating system used.
Figure 2.10
The ARP –a com-
mand displays the
entries in the ARP
cache.
Cache Timeout
Consider a situation in which Computer A needs to transfer data to Computer B. However,
Computer B crashed and thus is not connected to the network anymore. Computer A con-
tinues to transmit data packets to Computer B, in spite of Computer B not being on the
network, by using the ARP cache entries. Transmission of data continues as before because
Another random document with
no related content on Scribd:
† Essay on Style, p. 19.
† Short View of Tragedy.
† Cf. A. Clutton-Brock, The Times, 11th July 1922, p. 13.
* No merit, that is, in this connection. There may be some
exceptions to this, cases in which the explicit recognition of the truth
of a statement as opposed to the simple acceptance of it, is
necessary to the full development of the further response. But I
believe that such cases will on careful examination be found to be
very rare with competent readers. Individual differences,
corresponding to the different degrees to which individuals have
their belief feelings, their references, and their attitudes entangled,
are to be expected. There are, of course, an immense number of
scientific beliefs present among the conditions of every attitude. But
since acceptances would do equally well in their place they are not
necessary to it.
* In view of a possible misunderstanding at this point, compare
Chapter X, especially the final paragraph. If a belief in Retributive
Justice, for example, is fatal to Prometheus Unbound, so in another
way is the belief that the Millennium is at hand. To steer an
unperplexed path between these opposite dangers is extremely
difficult. The distinctions required are perhaps better left to the
reader’s reflection than laboured further in the faulty terminology
which alone at present is available.
* Cf. Gurney, The Power of Sound, p. 126. “A splendid melodic
phrase seems continually not like an object of sense, but like an
affirmation; not so much prompting admiring ejaculation as
compelling passionate assent.” His explanation, through association
with speech, seems to me inadequate. He adds that the use of
terms such as “expressiveness and significance, as opposed to
meaninglessness and triviality, may be allowed, without the
implication of any reference to transcendental views which one may
fail to understand, or theories of interpretation which one may
entirely repudiate.”
† Percy Dearmer, The Necessity of Art, p. 180.
† A.W. Pollard, ibidem, p. 135.
*** END OF THE PROJECT GUTENBERG EBOOK PRINCIPLES OF
LITERARY CRITICISM ***
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.