Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

[Ebooks PDF] download Special Edition Using TCP IP Niit (Usa) Inc. full chapters

Download as pdf or txt
Download as pdf or txt
You are on page 1of 75

Full download ebook at ebookgate.

com

Special Edition Using TCP IP Niit (Usa) Inc.

https://ebookgate.com/product/special-edition-
using-tcp-ip-niit-usa-inc/

Download more ebook from https://ebookgate.com


More products digital (pdf, epub, mobi) instant
download maybe you interests ...

TCP IP Clearly Explained Pete Loshin

https://ebookgate.com/product/tcp-ip-clearly-explained-pete-
loshin/

TCP IP Network Administration 3rd Edition Craig Hunt

https://ebookgate.com/product/tcp-ip-network-administration-3rd-
edition-craig-hunt/

The ABCs of TCP IP 2nd Edition Gilbert Held

https://ebookgate.com/product/the-abcs-of-tcp-ip-2nd-edition-
gilbert-held/

TCP IP Lean Web Servers for Embedded Systems 2nd


Edition Jeremy Bentham

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/

Special Edition Using SOAP Special Edition Using John


Paul Mueller

https://ebookgate.com/product/special-edition-using-soap-special-
edition-using-john-paul-mueller/

Web Technologies TCP IP Web Java Programming and Cloud


Computing 3rd Edition Achyut S. Godbole

https://ebookgate.com/product/web-technologies-tcp-ip-web-java-
programming-and-cloud-computing-3rd-edition-achyut-s-godbole/

A Professional s Guide To Data Communication In a TCP


IP World E. Bryan Carne

https://ebookgate.com/product/a-professional-s-guide-to-data-
communication-in-a-tcp-ip-world-e-bryan-carne/

Special edition using Microsoft Windows Vista Robert


Cowart

https://ebookgate.com/product/special-edition-using-microsoft-
windows-vista-robert-cowart/
Contents at a Glance
Introduction 1

1 Introduction to Internetworking and TCP/IP 7


2 The Network Interface and Link Layers 25
3 The Internet Layer Protocol 43
4 Internet Control Message Protocol 61
5 Transmission Control and Data Flow 73
6 Timed Data Transmission and Performance
Concepts 97
7 User Datagram Protocol 113
8 File Transfer and Access 129
9 Remote Login 149

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

TCP/IP Second Edition


15
16
17
18
19
Subnetting and Classless Addressing 245
IP Routing 259
Routing Mechanisms 277
Routing on Autonomous Systems 291
Inter-autonomous System Routing Protocol—
EGP and BGP 311
20 Multicasting 321
21 Security Concepts and Private Network
Connection 335
22 IP Security 347
23 IP Over Asynchronous Transfer Mode (ATM) 363
24 Voice Over IP 379
25 Mobile IP 389
26 IPv6 403
27 Quality of Service 415

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

Evolution of TCP/IP and the Internet 8 Reverse Address Resolution Protocol 39

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

Differences Between SLIP and PPP 29 Transmission of Datagrams 54


Identification 56
Addressing 30 Flags 56
Physical Address 30 Fragmentation Offset 56
The IP Address 31 Advantages of Fragmentation 58
Class A Addressing Scheme 32 IP Options 58
Class B Addressing Scheme 33
Class C Addressing Scheme 34 Summary 60
Class D Addressing Scheme 34
Class E Addressing Scheme 35
iv Special Edition Using TCP/IP, Second Edition

4 Internet Control Message Protocol 61 Performance 103


Recovering from Congestion 104
Introduction to ICMP 62 Discovering Path MTU 105
Role of Hosts and Routers in Fault Performance Enhancing Segment
Isolation 62 Header Options 106
Performance Problems on Long Fat
Methods Used by a Host for Fault Pipes 107
Isolation 63 Enhanced Performance Using T/TCP
110
Transmission of ICMP Messages 64
ICMP Message Format 65 Summary 112
Query Messages 68
Ping 69 7 User Datagram Protocol 113
Tracert 71
Introduction to UDP 114
Summary 71 Features of UDP 115
Analyzing the UDP Datagram
5 Transmission Control and Data Flow 73 Structure 118
Understanding UDP Checksum 119
Introduction to TCP 74
Services Provided by TCP 75 Working with UDP 121
TCP Application Areas 80 Implementing UDP in an Application
TCP Segment Header 82 122
UDP Versus TCP 123
The Connection Process 87
Considerations for Choosing UDP
The Three-Way Handshake 87
124
Terminating a Connection 88
Applications Implementing UDP 125
Configuring Maximum Segment Size
89 Summary 128
Determining Connection States 90
TCP Connection State Machine 92 8 File Transfer and Access 129
Data Transfer Concepts 93 Introduction to FTP 130
Sliding Windows 93 The File Transfer Process 132
Sender Side Silly Window Syndrome File Transfer Data Formats 133
95 File Transfer Commands 135
Receiver Side Silly Window Syndrome
95 Trivial File Transfer 140

Summary 96 Problems in the TFTP Specification 141

Network File Access 143


6 Timed Data Transmission and
NFS Core Protocols 143
Performance Concepts 97
Remote Procedure Calls 145
Timeout and Retransmission
Summary 147
Concepts 98
Estimating Round Trip Time 98
Karn’s Algorithm 99
Probe Timers 101
Contents v

9 Remote Login 149 12 Simple Network Management Protocol


(SNMP) 193
Telnet Protocol 150
Typical Telnet Protocol Network Management 194
Implementation 151
Telnet Commands 153 Components of the SNMP Architecture
Telnet Modes 157
196
Managed Devices 197
Telnet Options 158
SNMP Agents 197
Rlogin 160 SNMP Manager 197
Rlogin Control Commands 161 Managed Objects 198
Management Information Base 198
Summary 162 Structure of Management Information
198
10 Messaging Protocols 163 SNMP Communities 202
Commands Used by Managers and
Messaging Concepts and SMTP 164
Agents 203
Components Used for Messaging 165
Format of an SNMP Message 205
Functioning of SMTP 167
SMTP Commands 168 Summary 207
Relaying Mail Using SMTP 170
Format of a Mail Address 171 13 Domain Name System (DNS) 209
POP 171 The Need for DNS 210
IMAP 172 Advantages of Using DNS 212
MIME 173 Naming Conventions Used in DNS 213
Summary 174 Transfer of DNS Messages 215

11 Hypertext Transmission 175 Components and Steps Involved in Name


Resolution 216
Web Fundamentals and HTTP Basics Resolver 216
176 Zones 217
Connections 179 Name Resolution Process 219
DNS Caching 221
Components of an HTTP Message 182
DNS Message Format 221
The HTTP Request 183
The HTTP Response 185 Summary 228
The Header Component 187

Negotiating Client/Server Capabilities


14 Bootstrapping Protocols: BOOTP and
187 DHCP 229

HTTP Performance 189 Bootstrap Protocol—An Overview 230

Caching 189 BOOTP Performance 231

Summary 191 The BOOTP Message Format 233


vi Special Edition Using TCP/IP, Second Edition

Subfields in the Options Field 235 17 Routing Mechanisms 277


Dynamic Host Configuration Protocol Introduction to Routing Mechanisms
236 278

DHCP Performance 238 Evolution of Network Routing


Architecture 279
The DHCP Message Format 241
Routing Algorithms 283
Relay Agent 242 Routing Algorithm Design
Summary 242 Prerequisites 284
Static Routing Algorithms 286
15 Subnetting and Classless Addressing 245 Dynamic Routing Algorithms 287

IP Addressing Schemes 246 Summary 289

Subnetting 247 18 Routing on Autonomous Systems 291


Advantages of Creating Subnets 248
Hierarchical System of Assigning IP Autonomous System Routing Architecture
292
Addresses for Subnetworks 248
Creating Subnets 249 Introduction to Interior Gateway
Private Address Space 250 Protocols 295
Using Subnet Masks 251 Routing Information Protocol 295
Open Shortest Path First 301
Supernetting 254
OSPF Message Formats 301
Implementing Supernetworks 256
Enhanced Interior Gateway Routing
Summary 258 Protocol 306

Summary 308
16 IP Routing 259

Routing Concepts 260 19 Inter-autonomous System Routing


Routing Principles 260 Protocol—EGP and BGP 311
Analyzing the Routing Table 260
EGP 312
Static Versus Dynamic Routing 262
Autonomous Systems—An Overview
Configuring Static Routes 266
312
Error Handling 269 Basics of Exterior Gateway Protocol
ICMP Error Messages 269 313
ICMP and Router Control 271 EGP Header 314
ICMP and Router Redirect Errors EGP Update Statement 316
271
BGP 318
ICMP and Router Location 274
The Operation of BGP 318
Summary 276 BGP Messages 319

Summary 320
Contents vii

20 Multicasting 321 22 IP Security 347


Fundamentals of Multicasting 322 Introduction to IP Security 348
Security Threats on the Internet 348
Advantages of Multicasting 323 Broad Overview of IPSec 350
Implementation of Multicasting 323 The Authentication Header 352
The Role of Network Technology in
Multicasting 324 Outbound and Inbound AH Field
Multicasting by Using IP 325 Processing 354
Class D Addresses 326
Encapsulated Security Payload 355
Multicast Groups 327
Transmission of Multicast Messages Outbound and Inbound ESP Field
327 Processing 357
Forwarding Multicast Datagrams Over
an Internetwork 328 Security Association and Internet Key
Role of IP in Handling Incoming Exchange 359
Multicast Datagrams 328
Summary 362
Internet Group Management Protocol
329 23 IP Over Asynchronous Transfer Mode
(ATM) 363
Communication Between Hosts and
Routers Using IGMP 330 Introduction to Asynchronous Transfer
Mode 364
Summary 333
ATM Data Transmission Basics 367
21 Security Concepts and Private Network
IP Data Transmission Models for ATM
Connection 335
371
Virtual Private Networks 336 Classical IP Over ATM 371
Different Types of Virtual Private Enhancements to the Classical IP Over
Networks 337 ATM Model 375
Addressing in a VPN 338
Summary 377
Protocols Required to Implement a
VPN 339
24 Voice Over IP 379
Data Transfer Between Computers on a
VPN 340 The Need for Voice Over IP 380
Role of IP in Transmission of Voice
Network Address Translation 341
Files 382
Types of NAT 343
The Role of the Receiver in
NAT Implementation Problems 344
Minimizing Delay and Jitter 383
Summary 346 Standards and Protocols Used to
Implement VoIP 383
Real-Time Transport Protocol 384

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

Mobile IPv6 400 E Programming Structures for Data


Formats 447
Summary 401
F TCP Application Ports 451
26 IPv6 403

IPv6: An Overview 404 Glossary 455

The IPv6 Message Format 405 Index 469


IPv6 Extension Headers 407
Hop-by-Hop Options 409
Routing 410
Fragmentation 411
Destination Options 413
Authentication 413
Encapsulated Security Payload 413

IPv6 Addressing 413

Summary 414

27 Quality of Service 415

Introducing Quality of Service 416

Resource Reservation Protocol 417

Differentiated Services 422

Summary 424

Appendixes

A RFCs 425

B Local Area Networking Basics 431

Local Area Networks 432


Ethernet 432
Fiber Distributed Data Interface 434
About the Authors
Ramadas Shanmugam brings with him a rich experience of training and instructional
design. He is a computer science student and is passionate about computers and writing.
Ramadas is currently working as an instructional designer at NIIT where he designs and
authors books on a wide range of subjects. He has co-authored books and instructional
training material on Lotus Notes, Windows NT, Mozilla Open Source Browser
Programming, and Microsoft Visio. Ramadas is a Microsoft Certified Solutions Developer.
Padmini.R, a graduate in computer science, has been involved in training technical courses
on a wide variety of subjects thus gaining extensive exposure in training and instructional
design. She has designed and created instructional training material for the Microsoft
Windows 2000 Server certification exams, Microsoft Office, and Java Servlets program-
ming.
Nivedita.S, a postgraduate in biochemistry, loves to learn and believes that teaching is the
best way to learn. She has designed and developed training material on topics such as
StarOffice Suite, FrontPage 2000, and Visual Basic. She has also edited books on C#,
Wireless LANs, and Storage Area Networks.
Dedication
To Chuchi Amma
—Ramadas Shanmugam
To my family
—Padmini.R
To my beloved family
—Nivedita.S

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

Mail: David Culverwell


Que
201 West 103rd Street
Indianapolis, IN 46290 USA
INTRODUCTION

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.

This Book Is for You


If you are looking to gain thorough knowledge in TCP/IP, this book is for you. A certain
degree of exposure to the basics of computing and networking might be required but is not
necessary (for an introduction to networking basics, you can read Appendix B, “Local Area
Networking Basics”). Network administrators who have been working with TCP/IP imple-
mentations on various operating systems might want to know what happens behind the
scenes. This book is also targeted at network administrators who want to learn about the
fundamental and advanced networking concepts that drive TCP/IP implementations on
various operating systems.

How This Book Is Organized


This book is divided into five sections. The first section introduces you to the concept of
internetworking and the core protocols that form the fundamentals of the TCP/IP protocol
suite. The next section deals with the software applications and utilities that use TCP/IP for
network communication. Third, we delve into subnetting and routing features provided by
TCP/IP. Next deals with the security features inherent in the protocol suite. Finally, we
delve into some of the advanced TCP/IP technologies with an outlook into the future of
TCP/IP.
The first seven chapters introduce basic internetworking concepts and the core protocols
that make the fundamentals of TCP/IP for internetworks.
■ Chapter 1, “Introduction to Internetworking and TCP/IP,” deals with the fundamen-
tals of Internetworking. The chapter also delves into the basics of TCP/IP.
■ Chapter 2,“The Network Interface and Link Layers,” introduces you to the Network
Layer and the Link layer of the TCP/IP reference model.
■ Chapter 3, “The Internet Layer Protocol,” deals with one of the core TCP/IP proto-
cols called the Internet Protocol.
How This Book Is Organized 3

■ 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

■ Chapter 17, “Routing Mechanisms,” provides an overview of the routing mechanisms


implemented by TCP/IP.
■ Chapter 18, “Routing on Autonomous Systems,” explores the world of autonomous
systems and delves into the routing mechanisms implemented within autonomous sys-
tems.
■ Chapter 19, “Inter-autonomous System Routing Protocol—EGP and BGP,” deals with
routing between autonomous systems using Exterior Gateway Protocol and Border
Gateway Protocol.
■ Chapter 20, “Multicasting,” introduces you to multicasting and delves into how multi-
casting can be implemented on a TCP/IP network. The chapter also explores the role
played by Internet Group Management Protocol in multicasting datagrams.

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 appendixes in this book contain a quick reference to


■ Networking basics
■ TCP application port numbers
■ HTTP status codes and header fields
Conventions Used in This Book 5

■ Request For Comments


■ Troubleshooting tips
■ Programming structures for data formats

Conventions Used in This Book


This book uses various stylistic and typographic conventions to make it easier to use.
Code snippets and commands that run utilities are specified within a syntax. For example,
to show how the Ping command must be used, the following code snippet can be provided
within syntax.
ping xxx.xxx.xxx.xxx

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.

Tips introduce techniques applied by experienced developers to simplify a task or to


produce a better design. The goal of a tip is to help you apply standard practices that
lead to robust and maintainable applications.

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

Evolution of TCP/IP and the Internet


One of the primal instincts that has contributed to the survival of humankind has been its
ability to connect with its environment. This instinct resulted in the creation of primitive
family units, tribes, communities, villages, cities, and countries. In the course of time, the
human race thrived on its connectivity instinct by linking places with roads, continents with
ships, and outerspace with rockets and satellites. The later half of the twentieth century was
witness to one of these acts of instinct in the form of linking computers. In the early days of
computing, each computer was an island of information that was devoted to processing and
providing output to the supplied input. However, when the need to connect computers was
realized, a small group of computers were linked together to form a commune of linked
computers called a network.
As in any commune, each computer shared the common resources available in the network
with other computers in the network. To use these shared resources, the computers are con-
nected to one another by means of hardware equipment such as cables, hubs, and switches.
However, computers must first communicate with each other to cohabit in a network.
Although the language of zeros and ones is all that it takes for a computer to say “hello” to
another computer, certain rules need to be followed. For example, when another person
talks to you, it is very important that you listen to that person first and then put forth your
opinion. We do this as an unwritten rule to converse easily with others, but a computer
needs to be programmed with these rules to enable smooth communication with other com-
puters. Such a set of communication rules came to be known as a protocol.
Typically, a protocol defines the ways and means for establishing, maintaining, and terminat-
ing communication with another computer. When the concept of networking started to
grow, the need to standardize protocol implementations was felt. All computers must com-
municate in the same language to ensure uniformity in data exchange. Therefore, a stan-
dardized networking protocol called Transmission Control Protocol/Internet Protocol
(TCP/IP) was developed.
As the name suggests, TCP/IP is a protocol suite that provides two kinds of services, pack-
aging data and routing the packaged data. Take a scenario where you need to move your
house from one city to another. You take the help of a packing and moving service to man-
age the transit of all your household equipments to your new location. The packing and
moving service is responsible for providing secure packaging for all your belongings before
transferring them. It is also responsible for transporting your belongings in the shortest pos-
sible route to deliver them at your new location within a short period. The TCP/IP proto-
col suite is similar to the packaging and moving service except for the fact that data is not
only packaged and moved to the correct destination but is also unpacked and delivered to
the correct application on the destination computer. TCP provides packaging, reassembling,
flow control, and error detection services, whereas IP manages the determination of the
shortest possible path to the destination computer. An important point to note is that
TCP/IP is not a software in itself but a proposed framework with rules and formats that
help in the creation of protocol software.
Evolution of TCP/IP and the Internet 9

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).

Figure 1.1 Ethernet Token ring


Many different net- network network
work or hardware
technologies exist,
such as those using Intermediate
token ring, Ethernet, devices
and FDDI.

FDDI Ethernet
network network

The process of constructing and managing communication among different networks is


called internetworking or internetting. Internetworking also refers to the products, concepts,
and technologies used to develop the connections among disparate networks. Thus, inter-
networking enables communication across networks regardless of the underlying network
technologies used to build them. The internetwork must also address the problems that
could arise in reliability, connectivity, flexibility, and network management. Although inter-
networking might sound simple, in reality, it is quite complex because the constituent net-
works might use different protocols, have different topologies, or the underlying
technology could be different.
Networks can be classified as circuit-switched networks or packet-switched networks. This
classification has been done based on the way in which data is passed between the source
and the destination computers. In the case of a circuit-switched network (see Figure 1.2),
Internetworking 11

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

Figure 1.2 Network 1 Network 2


The data in a circuit-
switched connection
is transmitted through
a predetermined
direct physical con- Circuit-switched network
nection unlike a Computer A Computer B
packet-switched net-
work in which data
packets can take dif-
ferent paths to reach
the destination.

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

Figure 1.3 Fax


Intermediate devices,
such as routers and
switches, can be used
to connect and regu- Ch
late traffic between Head Office:
two networks. With 1,000+
users
1
xxx.xxx.xxx.1 xxx.xxx.xxx.2 xxx.xxx.xxx.3 connected
with a Switch.

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.

In the context of the Internet, gateways are synonymous with routers.


16 Chapter 1 Introduction to Internetworking and TCP/IP

The Open Systems Interconnection Model


In a network, all the network components must work in synchronization to enable proper
communication over the network. 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 applications to function irrespective of the under-
lying hardware architecture. This reference model describes how the communication system
between computers that need to communicate should be designed. The OSI model facili-
tates the creation of a network architecture that is efficient and supports interoperability
among computers of dissimilar configurations.

A reference model is a set of specifications that designate how communication should


take place on a network. The reference model covers all aspects of communication on
a network. The reference model contains layers, which take care of specific processes
in the communication. This type of a communication system in which communication
happens through a group of layers is called a layered architecture. The strength of lay-
ered architecture is that it makes communication between computers and networks
that work on different technologies possible. Moreover, developers of network applica-
tions can concentrate on one aspect of communication. This architecture also ensures
that a change to the functionality of one layer does not affect the other layers. If a
change has to be implemented, only the relevant layer undergoes a change.

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.

Layers in the OSI Model


Ch
The OSI model, as shown in Figure 1.4, consists of the following layers:
■ Application layer
1
■ Presentation layer
■ Session layer
■ Transport layer
■ Network layer
■ Data Link layer
■ Physical layer

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.

The Application Layer


The Application layer enables a user to access the network by providing a set of services.
These services include remote file and directory access, remote login, and e-mail access. In
the OSI model, the services that are available in the Application layer are File Transfer,
Access, and Management (FTAM), Virtual Terminal Protocol (VTP), and Common
Management Information Protocol (CMIP).

The Presentation Layer


Taking care of translating data sent by the Application layer is done in the Presentation
layer. The functions of the Presentation layer include changing data to a format that is
compatible with the destination computer, encrypting and decrypting data, compressing
and decompressing data, and so on. The Presentation layer interacts with the file system
and the operating system to implement data conversion. Common file formats enable easy
exchange of information among computers on a network. The Presentation layer is also
responsible for representing data using standard formats, such as ASCII and UNICODE.

The Session Layer


This layer is responsible for controlling the communication between the two systems by
handling dialog control. The role of the Session layer is to establish and terminate connec-
tion between the systems. The communication between two computers could be simplex,
half-duplex, or full-duplex communication. Communication that can happen in only one
direction is called simplex communication. In some situations, communication can happen in
both the directions, but not simultaneously. This type of communication is called as half-
duplex communication. Another category of communication is full-duplex communication,
which enables data transmission in two directions simultaneously. The Session layer con-
trols communication by logically dividing a session into three phases. A session is a group of
The Open Systems Interconnection Model 19

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

The Network Layer


This layer is responsible for sending the data packets to the correct destination. This layer
receives data from the Data Link layer and transmits the data to the destination. The
Network layer resolves the address of the destination computer and finds the route through
which the data can be sent. If more than one route is found, the Network layer finds the
best route through which data can be transmitted. In addition, if a route is affected due to
problems on the network, this layer finds an alternative route to send the data. However, the
Network layer need not take care of data integrity.

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

The Data Link Layer


This layer is responsible for splitting the data that needs to be transmitted into groups called
frames. For example, if you need to transmit a file from one computer to another, the Data
Link layer divides the contents logically into frames. In addition to this, the Data Link layer
needs to ensure that the frames reach their destination properly. If the frames do not reach
the destination, this layer must retransmit the frames. The destination computer will
acknowledge the receipt of data through special frames called acknowledgement frames.
However, during data transmission, all the frames of a file that hold data might not be sent
in sequence to the destination. To overcome this problem, extra information can be added to
the frames to indicate the group to which a particular frame belongs.
The Data Link layer must also avoid duplicate frames being sent to the destination.
Furthermore, this layer must synchronize the speed of data transmission between the source
computer and the destination computer. If the buffer size of the destination computer is
small, the speed of data transmission can be adjusted accordingly.
If the line that is used for data transmission can transmit data in both directions, the Data
Link layer needs to take care of problems that might arise due to data congestion. In case of
broadcasting, all the computers on the network must be able to share the communication
channel. Sharing the communication channel might lead to problems, such as data collision.
The medium access sublayer, which is a part of the Data Link layer, is responsible for han-
dling problems related to the sharing of the communication channel.

The Physical Layer


This layer of the OSI model is responsible for transmitting information over the cable,
which is the medium of transmission. This layer must ensure that the data transmission
speed of the sender and the receiver are the same. If the speed of the receiver is low com-
pared to that of the sender, data packets might not be received properly leading to data loss.
On the other hand, if the speed of the receiver is more than that of the sender, the receiver
will spend more time waiting for data, which will affect the performance of the computer.
This layer must also ensure that the data sent is received properly at the other end. This
layer takes care of handling intricate communication details, such as the voltage that is
required to transmit data, initiate connections, and terminate connections. If the distance
between the sender and the receiver is more, the signals might weaken leading to data loss.
However, intermediate devices, such as repeaters, can be used to amplify the signals and
ensure proper data transmission.
The TCP/IP Reference Model 21

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.

Figure 1.5 OSI Model TCP/IP Reference Model


The TCP/IP reference
model is a standard Application
reference model for Presentation Application
communication in the
Internet. Session

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

The Application Layer


This layer enables users to access the network by providing a few services to the user. Some
of the protocols and services available to the user are File Transport Protocol (FTP) for
transferring files, Telnet for remote login, and Simple Mail Transfer Protocol (SMTP) for
exchanging mail messages. The Application layer interacts with the operating system and
the file system for data conversion and encryption. You will learn more about the various
protocols of the Application layer in the next part of the book.

The Transport Layer


Communication between computers is handled by the Transport layer, which is comprised
of Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). This
layer divides the data into logical units called packets before transmitting them. TCP offers a
reliable transport of data, whereas UDP does not. TCP is a connection-oriented protocol
that ensures that data is transmitted properly to the destination. If there is an error in data
transmission, TCP takes the responsibility of transmitting data again to the destination.
However, UDP being connectionless, it does not ensure the data packets have reached the
destination properly. However, both TCP and UDP seek the help of IP to route the infor-
mation to the appropriate destination.
➔ For more information on TCP, see “Transmission Control and Data Flow,” p. 73
➔ For more information on UDP, see “UDP,” p. 113

The Internet Layer


The Internet layer is responsible for routing the data packets to the appropriate destination.
Internet Protocol (IP) is responsible for ensuring that the data reaches the destination prop-
erly. However, ensuring data integrity is not a function of IP. IP interacts with Address
Resolution Protocol (ARP) and Reverse Address Resolution Protocol (RARP) for address
resolution. ARP and RARP operate from a layer called the Link layer. This layer is imple-
mented as a combination of software and hardware and acts as an interface between the
Internet layer and the Network Interface layer. The other protocols that operate from the
Link layer are Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP).
These two protocols are used for communication over serial lines.
IP interacts with ARP to get the hardware address or the Media Access Control (MAC)
address of a computer. The Network Interface layer uses the hardware address to transmit
data over the physical medium. The ICMP generates error messages if there are problems
in data transmission.
➔ For more information on ARP, RARP, PPP, and SLIP, see “Network Interface Layer and Link Layers,”
p. 25
➔ For more information on IP, see “Internet Protocol,” p. 45
➔ For more information on ICMP, see “Internet Control Message Protocol,” p. 61
The TCP/IP Reference Model 23

The Network Interface Layer


The functions of the Data Link layer and the Physical layer of the OSI model have been
combined into a single layer called the Network Interface layer in the TCP/IP reference
model. This layer is responsible for dividing the data sent by the Internet layer into logical Ch
groups called frames. Depending on the type of connection, which could be connection-
oriented or connectionless, this layer adds appropriate headers to the frames. If the session 1
is a connection-oriented session, the headers must indicate the number of frames in the
group and the order in which the frames need to be reassembled in the destination. The
Network layer at the receiving end then assembles all the constituent frames and sends them
to the other layers. This layer ensures that all the frames are received properly by a method
called the Cyclic Redundancy Check (CRC). Figure 1.6 shows the layers and the constituent
protocols specified by the TCP/IP reference model.

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

Application Layer Application Layer

FTP TFTP HTTP FTP TFTP HTTP


Telnet SMTP DNS Telnet SMTP DNS

Transport Layer Transport Layer

TCP UDP TCP UDP

Internet Layer Internet Layer

IP ICMP IP ICMP

Link Layer Link Layer

ARP RARP ARP RARP

Network Layer Network Layer

frame frame
24 Chapter 1 Introduction to Internetworking and TCP/IP

Information Exchange Between Layers in the TCP/IP Reference Model


The data that needs to be transmitted to a computer is “qualified” with additional informa-
tion in the form of headers and trailers. These headers and trailers are used by the layers to
communicate information to the corresponding layers in the destination computer. For
example, IP adds information that is required for routing a data packet as a header, which, in
turn, is used by the Internet layer in the destination computer. The message that is sent by
the Application layer is encapsulated in an UDP datagram or an IP datagram, which, in turn,
is encapsulated in a frame by the Network Interface layer.

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

Network Interface Layer


You can buy the best of gifts for Christmas, package them in the most beautiful gift wrap,
and choose the best mail delivery service to send your gift, but it all depends on the mail
carrier to ensure a safe and timely delivery of your gift to your loved ones. The Network
Interface layer acts as the mail carrier in the TCP/IP reference model. This layer is respon-
sible for transmitting data over the physical medium. Information is sent over the physical
medium in the form of units called frames. The information required by the physical
medium for transferring data from the source to the destination is specified in the frame. In
addition, the data that is provided by the higher layers of the TCP/IP reference model are
encapsulated in a frame before being transmitted over the physical medium. Figure 2.1
shows you how the Link layer manages data encapsulated before transmission and reassem-
bly on receipt at the destination computer.

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

Application layer Application layer

Message Message

Transport layer Transport layer

TCP/UDP TCP/UDP
datagram datagram

Internet layer Internet layer

IP datagram IP datagram

Network layer Network layer

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.

Source Destination Frame


Type CRC
Address Address Header

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

The Link Layer


Before data can be sent over the physical medium, the software address that is used by the
Internet layer to identify the hosts must be converted to a hardware address that can be rec-
ognized by the Network layer. Therefore, an address translation mechanism that translates
addresses provided by the Network layer must be implemented. The Link layer, which acts
as an interface between the Internet layer and the Network Interface layer performs this
vital role (see Figure 2.3). It helps in bridging the gap between the different addressing for-
mats that are used by both the layers. This task of resolving the software address to the cor-
responding hardware address is performed by a protocol called Address Resolution Protocol
(ARP), which operates from the Link layer. In addition, the Link layer also provides the
Reverse Address Resolution Protocol (RARP) to translate hardware addresses to the corre-
sponding software addresses.
Address resolution is the process of mapping a software address to the corresponding hard-
ware address and vice versa. The protocols that are used for address resolution are ARP and
RARP. The Link layer also contains protocols that are used for transmission of data over
serial lines, which are Point-to-Point Protocol (PPP) and Serial Line Internet Protocol
(SLIP).

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.

Differences Between SLIP and PPP


Although SLIP evolved as the first protocol for transmitting data over serial lines, it has a
few limitations. PPP is an enhancement of SLIP and offers a few advantages. The differ-
ences between SLIP and PPP are discussed in Table 2.1.

Table 2.1 SLIP Versus PPP


SLIP PPP
Can be used only with TCP/IP. Can be used with multiple protocols.
Supports only synchronous Supports synchronous as well as
transmission of data. asynchronous data transmission.

CSLIP (compressed SLIP) is an advanced version of SLIP. CSLIP supports more


throughput compared to SLIP because it uses a compressed version of the IP header
unlike SLIP, which does not compress the IP header.
30 Chapter 2 The Network Interface and Link Layers

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.

ARCNET, the Attached Resource Computer Network, was developed by Datapoint


Corporation in 1977. The address of an ARCNET NIC is configurable unlike Ethernet
addresses, which are imprinted at the time of manufacturing the card.
Addressing 31

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.

A host is any computer that is connected to a network.


32 Chapter 2 The Network Interface and Link Layers

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).

The range of numbers that can be assigned to every octet is 0–255.

Class A Addressing Scheme


In the class A addressing scheme, the first byte is used for the network ID and the last three
bytes are used for the host ID. The format of a class A address is shown in Figure 2.5.
If a company needs to set up a class A network, the network ID is assigned by an organiza-
tion called the Network Information Center (NIC). The other three bytes are administered
locally according to the requirements of the organization.

Figure 2.5 A total of 126 A total of 16,777,214 hosts


In class A addresses, networks can be can be connected
the first byte is used created. to each network.
for the network ID.

ONNNNNNNN HHHHHHHH HHHHHHHH HHHHHHHH

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

Class B Addressing Scheme


In the class B addressing scheme, 16 bits are used for identifying the network ID and 16
bits for the host ID (see Figure 2.6). In a class B network, the first two bits in the network
ID are set to 1 and 0, respectively. Thus, network numbers from 128 to 191 can be used for
class B networks.
Class B networks are also called /16 networks because the first 16 bits are used to represent
a network. By using the class B addressing scheme, a maximum of 214 networks can be set
16
up and 2 –2 hosts can be connected to each network. Class B networks represent 25% of
the IPv4 address space.
34 Chapter 2 The Network Interface and Link Layers

Figure 2.6 A total of 16,384 A total of 65,534 hosts


In class B addresses, networks can be can be connected
the first two bytes created. to each network.
are used for the net-
work ID.

10NNNNNN NNNNNNNN HHHHHHHH HHHHHHHH

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.

Class C Addressing Scheme


In the class C addressing scheme, 24 bits are used for the network ID and 8 bits are used for
the host ID (see Figure 2.7). In the class C addressing scheme, 2,097,152 networks can be
created and each network can have a maximum of 254 hosts connected to it.

Figure 2.7 A total of 2,097,152 A total of 254 hosts


In class C addresses, networks can be can be connected
the first three bytes created. to each network.
are used for the net-
work ID.

110NNNNN NNNNNNNN NNNNNNNN HHHHHHHH

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.

Class D Addressing Scheme


A multicast address is an address assigned to a group of computers on a network. Class D
addresses (see Figure 2.8) are reserved for multicast addresses. In class D addresses, the net-
work number can range between 224 and 239. Class D addresses are used for multicasting.
Address Resolution 35

Multicasting is different from broadcasting. Broadcasting refers to the process of send-


ing messages to all computers on a network, whereas multicasting refers to the
process of sending messages to a group of computers on a network.

Figure 2.8
Class D addresses are 1110 Multicast Address
reserved for multicast
addresses.

Ch

Class E Addressing Scheme 2


Class E addresses (see Figure 2.9) are reserved for experimental purposes and the network
number in this scheme can range from 240 to 255.

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.

Address Resolution Using ARP


The following are the steps involved in the process of address resolution using ARP:
1. The computer that needs to transmit data broadcasts the IP address of the receiver over
the network.
2. The computer whose IP address matches the address sent over the network responds by
sending a reply that contains the IP address and the MAC address. The receiving com-
puter sends the reply to the computer that originated the request.
3. The sender uses the MAC address that it received from the receiver to transmit the data
packets.
4. The sender obtains the MAC address and stores it in the local cache, which is also
called the ARP cache. If data needs to be transmitted to the same IP address, the sender
checks the ARP cache for the MAC address. If the ARP cache does not contain the
address, steps 1 through 3 are repeated to obtain the physical address.

➔ 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 ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

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. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

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.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• 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 provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.

You might also like