Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Morgan Kaufmann-The Illustrated Network_ How TCP_IP Works in a Modern Network 2008
PREMIUM
Số trang
829
Kích thước
13.5 MB
Định dạng
PDF
Lượt xem
1219

Morgan Kaufmann-The Illustrated Network_ How TCP_IP Works in a Modern Network 2008

Nội dung xem thử

Mô tả chi tiết

The Illustrated Network

The Morgan Kaufmann Series in Networking

Series Editor, David Clark, M.I.T.

The Illustrated Network

Walter Goralski

P2P Networking and Applications

John Buford, Heather Yu, and Eng Lua

Broadband Cable Access Networks: The HFC

Plant

David Large and James Farmer

Technical, Commercial, and Regulatory

Challenges of QoS: An Internet Service Model

Perspective

XiPeng Xiao

MPLS: Next Steps

Bruce S. Davie and Adrian Farrel

Wireless Networking

Anurag Kumar, D. Manjunath, and Joy Kuri

Bluetooth Application Programming with the

Java APIs, Essentials Edition

Timothy J. Thompson, Paul J. Kline, and C Bala

Kumar

Internet Multimedia Communications Using

SIP

Rogelio Martinez Perea

Information Assurance: Dependability and

Security in Networked Systems

Yi Qian, James Joshi, David Tipper, and Prashant

Krishnamurthy

Network Simulation Experiments Manual,

Second Edition

Emad Aboelela

Network Analysis, Architecture, and Design,

Third Edition

James D. McCabe

Wireless Communications & Networking: An

Introduction

Vijay K. Garg

Ethernet Networking for the Small Offi ce and

Professional Home Offi ce

Jan L. Harrington

IPv6 Advanced Protocols Implementation

Qing Li, Tatuya Jinmei, and Keiichi Shima

Computer Networks: A Systems Approach,

Fourth Edition

Larry L. Peterson and Bruce S. Davie

Network Routing: Algorithms, Protocols, and

Architectures

Deepankar Medhi and Karthikeyan Ramaswami

Deploying IP and MPLS QoS for Multiservice

Networks: Theory and Practice

John Evans and Clarence Filsfi ls

Traffi c Engineering and QoS Optimization of

Integrated Voice & Data Networks

Gerald R. Ash

IPv6 Core Protocols Implementation

Qing Li, Tatuya Jinmei, and Keiichi Shima

Smart Phone and Next-Generation Mobile

Computing

Pei Zheng and Lionel Ni

GMPLS: Architecture and Applications

Adrian Farrel and Igor Bryskin

Network Security: A Practical Approach

Jan L. Harrington

Content Networking: Architecture, Protocols,

and Practice

Markus Hofmann and Leland R. Beaumont

Network Algorithmics: An Interdisciplinary

Approach to Designing Fast Networked Devices

George Varghese

Network Recovery: Protection and Restoration

of Optical, SONET-SDH, IP, and MPLS

Jean Philippe Vasseur, Mario Pickavet, and Piet

Demeester

Routing, Flow, and Capacity Design in

Communication and Computer Networks

Michał Pióro and Deepankar Medhi

Wireless Sensor Networks: An Information

Processing Approach

Feng Zhao and Leonidas Guibas

Communication Networking: An Analytical

Approach

Anurag Kumar, D. Manjunath, and Joy Kuri

The Internet and Its Protocols: A Comparative

Approach

Adrian Farrel

Modern Cable Television Technology: Video,

Voice, and Data Communications, 2e

Walter Ciciora, James Farmer, David Large, and

Michael Adams

Bluetooth Application Programming with the

Java APIs

C Bala Kumar, Paul J. Kline, and Timothy

J. Thompson

Policy-Based Network Management: Solutions

for the Next Generation

John Strassner

MPLS Network Management: MIBs, Tools, and

Techniques

Thomas D. Nadeau

Developing IP-Based Services: Solutions for

Service Providers and Vendors

Monique Morrow and Kateel Vijayananda

Telecommunications Law in the Internet Age

Sharon K. Black

Optical Networks: A Practical Perspective,

Second Edition

Rajiv Ramaswami and Kumar N. Sivarajan

Internet QoS: Architectures and Mechanisms

Zheng Wang

TCP/IP Sockets in Java: Practical Guide for

Programmers

Michael J. Donahoo and Kenneth L. Calvert

TCP/IP Sockets in C: Practical Guide for

Programmers

Kenneth L. Calvert and Michael J. Donahoo

Multicast Communication: Protocols,

Programming, and Applications

Ralph Wittmann and Martina Zitterbart

MPLS: Technology and Applications

Bruce Davie and Yakov Rekhter

High-Performance Communication Networks,

Second Edition

Jean Walrand and Pravin Varaiya

Internetworking Multimedia

Jon Crowcroft, Mark Handley, and Ian Wakeman

Understanding Networked Applications: A First

Course

David G. Messerschmitt

Integrated Management of Networked Systems:

Concepts, Architectures, and Their Operational

Application

Heinz-Gerd Hegering, Sebastian Abeck, and

Bernhard Neumair

Virtual Private Networks: Making the Right

Connection

Dennis Fowler

Networked Applications: A Guide to the New

Computing Infrastructure

David G. Messerschmitt

Wide Area Network Design: Concepts and Tools

for Optimization

Robert S. Cahn

For further information on these books and for a

list of forthcoming titles, please visit our Web site

at http://www.mkp.com.

This page intentionally left blank

The Illustrated Network

How TCP/IP Works in a

Modern Network

Walter Goralski

AMSTERDAM • BOSTON • HEIDELBERG • LONDON

NEW YORK • OXFORD • PARIS • SAN DIEGO

SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO

Morgan Kaufmann is an imprint of Elsevier

Working together to grow

libraries in developing countries

www.elsevier.com | www.bookaid.org | www.sabre.org

Morgan Kaufmann Publishers is an imprint of Elsevier.

30 Corporate Drive, Suite 400

Burlington, MA 01803

This book is printed on acid-free paper. `

Copyright © 2009 by Elsevier Inc. All rights reserved.

Designations used by companies to distinguish their products are often claimed as

trademarks or registered trademarks. In all instances in which Morgan Kaufmann

Publishers is aware of a claim, the product names appear in initial capital or all capital

letters. Readers, however, should contact the appropriate companies for more complete

information regarding trademarks and registration.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted

in any form or by any means, electronic, mechanical, photocopying, scanning, or otherwise,

without prior written permission of the publisher.

Permissions may be sought directly from Elsevier’s Science & Technology Rights

Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333,

e-mail: [email protected]. You may also complete your request on-line via the

Elsevier homepage (http://elsevier.com), by selecting “Support & Contact” then

“Copyright and Permission” and then “Obtaining Permissions.”

Library of Congress Cataloging-in-Publication Data

Goralski, Walter.

The illustrated network: how TCP/IP works in a modern network/Walter Goralski.

p. cm.—(The Morgan Kaufmann series in networking)

Includes bibliographical references and index.

ISBN 978-0-12-374541-5 (alk. paper)

1. TCP/IP (Computer network protocol) 2. Computer networks. I. Title.

TK5105.585.G664 2008

004.6’2--dc22

2008046728

For information on all Morgan Kaufmann publications,

visit our Website at www.mkp.com or www.books.elsevier.com

Printed in the United States

08 09 10 11 12 10 9 8 7 6 5 4 3 2 1

Contents

Foreword ........................................................................................ xxi

Preface ............................................................................................ xxiii

About the Author ............................................................................ xxx

PART I Networking Basics

CHAPTER 1 Protocols and Layers ...................................................... 3

The Illustrated Network ....................................................... 7

Remote Access to Network Devices ................................ 8

File Transfer to a Router ................................................... 10

CLI and GUI ...................................................................... 11

Ethereal and Packet Capture ............................................ 12

First Explorations in Networking ..................................... 14

Protocols .............................................................................. 14

Standards and Organizations ............................................ 16

Request for Comment and the Internet Engineering

Task Force ...................................................................... 18

Internet Administration ....................................................... 21

Layers ................................................................................... 22

Simple Networking .......................................................... 23

Protocol Layers ................................................................. 24

The TCP/IP Protocol Suite ................................................... 25

The TCP/IP Layers ............................................................. 26

Protocols and Interfaces ................................................... 27

Encapsulation ................................................................... 28

The Layers of TCP/IP ............................................................ 30

The Physical Layer ............................................................ 30

The Data Link Layer .......................................................... 32

The Network Layer ........................................................... 35

The Transport Layer .......................................................... 38

The Application Layer ....................................................... 41

Session Support ................................................................ 41

Internal Representation Conversion ................................ 41

Applications in TCP/IP ...................................................... 42

The TCP/IP Protocol Suite ................................................... 43

Questions for Readers ......................................................... 45

CHAPTER 2 TCP/IP Protocols and Devices ...................................... 47

Protocol Stacks on the Illustrated Network ......................... 50

Layers, Protocols, Ports, and Sockets .................................... 51

The TCP/IP Protocol Stack ................................................... 54

The Client–Server Model ..................................................... 55

TCP/IP Layers and Client–Server ......................................... 55

The IP Layer ......................................................................... 57

The Transport Layer ............................................................. 58

Transmission Control Protocol ......................................... 58

User Datagram Protocol ................................................... 59

The Application Layer .......................................................... 59

Bridges, Routers, and Switches ............................................. 60

Segmenting LANs ............................................................. 61

Bridges ............................................................................. 63

Routers ............................................................................. 63

LAN Switches ................................................................... 64

Virtual LANs ...................................................................... 65

VLAN Frame Tagging ......................................................... 66

Questions for Readers .......................................................... 69

CHAPTER 3 Network Link Technologies ........................................... 71

Illustrated Network Connections ......................................... 74

Displaying Ethernet Traffi c ............................................... 74

Displaying SONET Links ................................................... 76

Displaying DSL Links ........................................................ 78

Displaying Wireless Links ................................................. 81

Frames and the Link Layer................................................ 83

The Data Link Layer ............................................................. 84

The Evolution of Ethernet .................................................... 86

Ethernet II and IEEE 802.3 Frames ................................... 88

MAC Addresses ................................................................. 89

The Evolution of DSL ........................................................... 90

PPP and DSL ..................................................................... 91

PPP Framing for Packets ................................................... 92

DSL Encapsulation ............................................................ 93

Forms of DSL .................................................................... 94

The Evolution of SONET ...................................................... 96

A Note about Network Errors .......................................... 96

Packet over SONET/SDH .................................................. 97

Wireless LANS and IEEE 802.11............................................ 98

Wi-Fi .................................................................................. 98

viii Contents

IEEE 802.11 MAC Layer Protocol ..................................... 100

The IEEE 802.11 Frame ..................................................... 102

Questions for Readers .......................................................... 105

Part II Core Protocols

CHAPTER 4 IPv4 and IPv6 Addressing .............................................. 109

IP Addressing ........................................................................ 112

The Network/Host Boundary .............................................. 117

The IPV4 Address .................................................................. 118

Private IPv4 Addresses ...................................................... 122

Understanding IPv4 Addresses ......................................... 122

The IPv6 Address .................................................................. 123

Features of IPv6 Addressing ............................................. 124

IPv6 Address Types and Notation ..................................... 125

IPv6 Address Prefi xes ....................................................... 126

Subnetting and Supernetting ............................................... 127

Subnetting in IPv4 ............................................................ 127

Subnetting Basics ............................................................. 128

CIDR and VLSM ................................................................ 131

IPV6 Addressing Details ........................................................ 135

IP Address Assignment ...................................................... 138

Questions for Readers .......................................................... 141

CHAPTER 5 Address Resolution Protocol......................................... 143

ARP and LANs ...................................................................... 146

ARP Packets ......................................................................... 153

Example ARP Operation ....................................................... 155

ARP Variations ...................................................................... 157

Proxy ARP ......................................................................... 157

Reverse ARP ..................................................................... 158

ARPs on WANs .................................................................. 158

ARP and IPv6 ....................................................................... 159

Neighbor Discovery Protocol .......................................... 160

ND Address Resolution ..................................................... 161

Questions for Readers .......................................................... 163

CHAPTER 6 IPv4 and IPv6 Headers .................................................... 165

Packet Headers and Addresses ............................................. 168

The IPv4 Packet Header ....................................................... 170

Fragmentation and IPv4 ....................................................... 172

Fragmentation and MTU .................................................. 175

Contents ix

Fragmentation and Reassembly ........................................ 176

Path MTU Determination ................................................. 176

A Fragmentation Example .................................................... 177

Limitations of IPv4 ........................................................... 179

The IPv6 Header Structure ............................................... 179

IPv4 and IPv6 Headers Compared ....................................... 182

IPv6 Header Changes ....................................................... 183

IPv6 and Fragmentation ....................................................... 184

Questions for Readers .......................................................... 187

CHAPTER 7 Internet Control Message Protocol ............................... 189

ICMP and Ping ..................................................................... 192

The ICMP Message Format................................................... 196

ICMP Message Fields ........................................................ 197

ICMP Types and Codes ..................................................... 198

Sending ICMP Messages ....................................................... 203

When ICMP Must Be Sent ................................................. 204

When ICMP Must Not Be Sent .......................................... 204

Ping ...................................................................................... 204

Traceroute ............................................................................ 205

Path MTU ............................................................................. 206

ICMPv6................................................................................. 208

Basic ICMPv6 Messages .................................................... 209

Neighbor Discovery and Autoconfi guration ..................... 211

Routers and Neighbor Discovery ..................................... 212

Interface Addresses .......................................................... 212

Neighbor Solicitation and Advertisement ........................ 213

Questions for Readers .......................................................... 215

CHAPTER 8 Routing ................................................................................ 217

Routers and Routing Tables .................................................. 220

Hosts and Routing Tables ..................................................... 222

Direct and Indirect Delivery ................................................ 226

Routing ............................................................................. 229

Direct Delivery without Routing...................................... 230

Indirect Delivery and the Router ..................................... 231

Questions for Readers .......................................................... 235

CHAPTER 9 Forwarding IP Packets ..................................................... 237

Router Architectures ............................................................ 242

Basic Router Architectures ............................................... 243

Another Router Architecture ............................................ 246

x Contents

Router Access ....................................................................... 248

The Console Port .............................................................. 248

The Auxiliary Port ............................................................. 248

The Network .................................................................... 248

Forwarding Table Lookups ................................................... 249

Dual Stacks, Tunneling, and IPV6 .......................................... 251

Dual Protocol Stacks ........................................................ 252

Tunneling .......................................................................... 252

Tunneling Mechanisms ........................................................ 255

Transition Considerations .................................................... 256

Questions for Readers .......................................................... 257

CHAPTER 10 User Datagram Protocol .................................................. 259

UDP Ports and Sockets ......................................................... 262

What UDP Is For .................................................................. 266

The UDP Header .................................................................. 267

IPv4 and IPv6 Notes ............................................................. 268

Port Numbers ....................................................................... 269

Well-Known Ports ............................................................. 269

The Socket ........................................................................ 273

UDP Operation .................................................................... 274

UDP Overfl ows .................................................................... 274

Questions for Readers ......................................................... 277

CHAPTER 11 Transmission Control Protocol ....................................... 279

TCP and Connections .......................................................... 282

The TCP Header ................................................................... 282

TCP Mechanisms .................................................................. 285

Connections and the Three-Way Handshake ........................ 286

Connection Establishment ............................................... 288

Data Transfer ..................................................................... 289

Closing the Connection ................................................... 291

Flow Control ........................................................................ 292

TCP Windows ................................................................... 293

Flow Control and Congestion Control ............................. 294

Performance Algorithms ...................................................... 294

TCP and FTP ........................................................................ 296

Questions for Readers .......................................................... 299

CHAPTER 12 Multiplexing and Sockets ............................................... 301

Layers and Applications .........................................................301

The Socket Interface ..............................................................304

Contents xi

Socket Libraries ..................................................................305

TCP Stream Service Calls ....................................................306

The Socket Interface: Good or Bad? .......................................307

The “Threat” of Raw Sockets ...............................................308

Socket Libraries ..................................................................309

The Windows Socket Interface ..............................................309

TCP/IP and Windows ..........................................................310

Sockets for Windows ..........................................................310

Sockets on Linux ....................................................................311

Questions for Readers ............................................................317

Part III Routing and Routing Protocols

CHAPTER 13 Routing and Peering ......................................................... 321

Network Layer Routing and Switching ................................ 324

Connection-Oriented and Connectionless Networks .......... 325

Quality of Service ............................................................. 326

Host Routing Tables ............................................................. 328

Routing Tables and FreeBSD ............................................. 329

Routing Tables and RedHat Linux .................................... 330

Routing and Windows XP ................................................. 331

The Internet and the Autonomous System ........................... 332

The Internet Today ............................................................... 334

The Role of Routing Policies ................................................ 336

Peering ................................................................................. 338

Picking a Peer....................................................................... 340

Questions for Readers .......................................................... 343

CHAPTER 14 IGPs: RIP, OSPF, and IS–IS .............................................. 345

Interior Routing Protocols ................................................... 353

The Three Major IGPs .......................................................... 354

Routing Information Protocol .............................................. 355

Distance-Vector Routing................................................... 355

Broken Links .................................................................... 356

Distance-Vector Consequences ........................................ 357

RIPv1 ................................................................................ 358

RIPv2 ................................................................................ 359

RIPng for IPv6 .................................................................. 362

A Note on IGRP and EIGRP.................................................. 364

Open Shortest Path First .................................................. 365

Link States and Shortest Paths .......................................... 365

xii Contents

What OSPF Can Do ........................................................... 366

OSPF Router Types and Areas ........................................... 368

OSPF Designated Router and Backup

Designated Router ......................................................... 370

OSPF Packets .................................................................... 371

OSPFv3 for IPv6 ............................................................... 372

Intermediate System–Intermediate System .......................... 372

The IS–IS Attraction .......................................................... 373

IS–IS and OSPF ................................................................. 373

Similarities of OSPF and IS–IS .......................................... 374

Differences between OSPF and IS–IS ............................... 374

IS–IS for IPv6 .................................................................... 376

Questions for Readers .......................................................... 377

CHAPTER 15 Border Gateway Protocol ................................................ 379

BGP as a Routing Protocol ................................................... 379

Confi guring BGP .............................................................. 382

The Power of Routing Policy ............................................ 384

BGP and the Internet ........................................................... 386

EGP and the Early Internet ............................................... 386

The Birth of BGP .............................................................. 387

BGP as a Path-Vector Protocol ............................................. 388

IBPG and EBGP .................................................................... 389

IGP Next Hops and BGP Next Hops ................................ 390

BGP and the IGP .............................................................. 391

Other Types of BGP .............................................................. 392

BGP Attributes ...................................................................... 393

BGP and Routing Policy ....................................................... 395

BGP Scaling ...................................................................... 395

BGP Message Types .............................................................. 396

BGP Message Formats .......................................................... 397

The Open Message ........................................................... 397

The Update Message ......................................................... 397

The Notifi cation Message ................................................. 399

Questions for Readers .......................................................... 401

CHAPTER 16 Multicast ............................................................................. 403

A First Look at IPV4 Multicast .............................................. 406

Multicast Terminology .......................................................... 408

Contents xiii

Dense and Sparse Multicast ................................................. 410

Dense-Mode Multicast ...................................................... 410

Sparse-Mode Multicast...................................................... 410

Multicast Notation................................................................ 411

Multicast Concepts .............................................................. 411

Reverse-Path Forwarding .................................................. 411

The RPF Table ................................................................... 412

Populating the RPF Table .................................................. 412

Shortest-Path Tree ............................................................. 413

Rendezvous Point and Rendezvous-Point Shared Trees .... 414

Protocols for Multicast ......................................................... 415

Multicast Hosts and Routers ............................................. 415

Multicast Group Membership Protocols .......................... 416

Multicast Routing Protocols ............................................. 417

Any-Source Multicast and SSM .......................................... 418

Multicast Source Discovery Protocol ............................... 419

Frames and Multicast ........................................................ 420

IPv4 Multicast Addressing ................................................ 421

IPv6 Multicast Addressing ................................................ 423

PIM-SM ............................................................................. 425

The Resource Reservation Protocol and PGM .................. 425

Multicast Routing Protocols ............................................. 426

IPv6 Multicast ................................................................... 428

Questions for Readers .......................................................... 429

CHAPTER 17 MPLS and IP Switching ................................................... 431

Converging What? ................................................................ 435

Fast Packet Switching ....................................................... 435

Frame Relay ...................................................................... 435

Asynchronous Transfer Mode .......................................... 438

Why Converge on TCP/IP? ................................................ 441

MPLS .................................................................................... 442

MPLS Terminology ............................................................ 446

Signaling and MPLS .......................................................... 447

Label Stacking .................................................................. 448

MPLS and VPNs................................................................. 449

MPLS Tables ...................................................................... 449

Confi guring MPLS Using Static LSPs .................................... 450

The Ingress Router ........................................................... 450

The Transit Routers ........................................................... 450

The Egress Router ............................................................. 451

xiv Contents

Tải ngay đi em, còn do dự, trời tối mất!