TCP/IP Fundamentals for Microsoft Windows

dimerusticΔίκτυα και Επικοινωνίες

23 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

985 εμφανίσεις










TCP/IP Fundamentals for Microsoft Windows

Microsoft Corporation
Published: May 21, 2006
Author: Joseph Davies
Editor: Anne Taussig



Abstract
This online book is a structured, introductory approach to the basic concepts and principles of the
Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite, how the most important
protocols function, and their basic configuration in the Microsoft® Windows Server® 2003 and
Windows® XP operating systems. This book is primarily a discussion of concepts and principles
to lay a conceptual foundation for the TCP/IP protocol suite and provides an integrated discussion
of both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6).


The information contained in this document repres ents the current view of
Microsoft Corporation on the issues discussed as of the date of
publication. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of
Microsoft, and Microsoft cannot guarantee the accuracy of any
information presented after the date of publication.
This content is for informational purposes only. MICROSOFT MAKES NO
WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE
INFORMATION IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the
user. The terms of use of this document can be found at
http://www.microsoft.com/info/cpyright.mspx
.
Microsoft may have patents, patent applications, trademarks, copyrights,
or other intellectual property rights covering subject matter in this
document. Except as expressly provided in any written license
agreement from Microsoft, the furnishing of this document does not give
you any license to these patents, trademarks, copyrights, or other
intellectual property.
Unless otherwise noted, the example companies, organizations, products,
domain names, e-mail addresses, logos, people, places, and events
depicted herein are fictitious, and no association with any real company,
organization, product, domain name, email address, logo, person, place,
or event is intended or should be inferred.
© 2006 Microsoft Corporation. All rights reserved.
Microsoft, Active Directory, Windows, Windows NT 4.0, and Windows
Server are either registered trademarks or trademarks of Microsoft
Corporation in the United States and/or other countries.
All other trademarks are property of their respective owners.



TCP/IP Fundamentals for Microsoft Windows Page: i
Contents
Chapter 1 – Introduction to TCP/IP................................................................................................1
Chapter Objectives.......................................................................................................................2
History of TCP/IP..........................................................................................................................3
The Internet Standards Process....................................................................................................5
Requests for Comments (RFCs)................................................................................................5
TCP/IP Terminology.....................................................................................................................7
TCP/IP Components in Windows...................................................................................................9
Configuring the IPv4-based TCP/IP Component in Windows........................................................9
Automatic Configuration.......................................................................................................10
Manual Configuration...........................................................................................................11
Installing and Configuring the IPv6-based TCP/IP Component in Windows.................................12
Automatic Configuration.......................................................................................................13
Manual Configuration...........................................................................................................13
Name Resolution Files in Windows..........................................................................................13
TCP/IP Tools in Windows........................................................................................................14
The Ipconfig Tool.................................................................................................................15
The Ping Tool......................................................................................................................16
Network Monitor......................................................................................................................17
Starting a Capture................................................................................................................17
Stopping a Capture..............................................................................................................18
Viewing the Data.................................................................................................................18
Chapter Summary......................................................................................................................20
Chapter Glossary.......................................................................................................................21
Chapter 2 – Architectural Overview of the TCP/IP Protocol Suite................................................23
Chapter Objectives.....................................................................................................................24
The TCP/IP Protocol Suite..........................................................................................................25
Network Interface Layer..........................................................................................................25
Internet Layer.........................................................................................................................26
Transport Layer......................................................................................................................26
Application Layer....................................................................................................................27

TCP/IP Fundamentals for Microsoft Windows Page: ii
IPv4 Internet Layer.....................................................................................................................28
ARP.......................................................................................................................................28
ARP Cache.........................................................................................................................28
ARP Process.......................................................................................................................29
Internet Protocol version 4 (IPv4).............................................................................................30
Fragmentation and Reassembly...........................................................................................31
Internet Control Message Protocol (ICMP)................................................................................31
Internet Group Management Protocol (IGMP)...........................................................................32
IPv6 Internet Layer.....................................................................................................................34
IPv6.......................................................................................................................................34
IPv6 Extension Headers.......................................................................................................35
Fragmentation in IPv6..........................................................................................................35
Internet Control Message Protocol for IPv6 (ICMPv6)................................................................36
Neighbor Discovery (ND).........................................................................................................37
Address Resolution..............................................................................................................38
Router Discovery.................................................................................................................39
Address Autoconfiguration....................................................................................................39
Multicast Listener Discovery (MLD)..........................................................................................39
Transmission Control Protocol (TCP)...........................................................................................41
TCP Ports..............................................................................................................................41
TCP Three-Way Handshake....................................................................................................42
User Datagram Protocol (UDP)...................................................................................................43
UDP Ports..............................................................................................................................43
Packet Multiplexing and Demultiplexing.......................................................................................44
Application Programming Interfaces.............................................................................................46
Windows Sockets....................................................................................................................46
NetBIOS.................................................................................................................................47
TCP/IP Naming Schemes in Windows.........................................................................................48
Host Names............................................................................................................................48
NetBIOS Names.....................................................................................................................48
Chapter Summary......................................................................................................................50
Chapter Glossary.......................................................................................................................51

TCP/IP Fundamentals for Microsoft Windows Page: iii
Chapter 3 – IP Addressing...........................................................................................................53
Chapter Objectives.....................................................................................................................54
IPv4 Addressing.........................................................................................................................55
IPv4 Address Syntax...............................................................................................................55
Converting from Binary to Decimal........................................................................................56
Converting from Decimal to Binary........................................................................................57
IPv4 Address Prefixes.............................................................................................................58
Prefix Length Notation..........................................................................................................58
Dotted Decimal Notation......................................................................................................59
Types of IPv4 Addresses.........................................................................................................59
IPv4 Unicast Addresses..........................................................................................................60
Internet Address Classes.....................................................................................................60
Modern Internet Addresses..................................................................................................62
Public Addresses.................................................................................................................62
Illegal Addresses.................................................................................................................63
Pri vate Addresses................................................................................................................63
Automatic Private IP Addressing...........................................................................................64
Special IPv4 Addresses.......................................................................................................64
Unicast IPv4 Addressing Guidelines......................................................................................65
IPv4 Multicast Addresses........................................................................................................66
IPv4 Broadcast Addresses.......................................................................................................66
IPv6 Addressing.........................................................................................................................68
IPv6 Address Syntax...............................................................................................................68
Converting Between Binary and Hexadecimal........................................................................69
Compressing Zeros..............................................................................................................70
IPv6 Address Prefixes.............................................................................................................70
Types of IPv6 Addresses.........................................................................................................70
IPv6 Unicast Addresses..........................................................................................................71
Global Unicast Addresses....................................................................................................71
Link-Local Addresses...........................................................................................................73
Site-Local Addresses...........................................................................................................73
Zone IDs for Local-Use Addresses........................................................................................74

TCP/IP Fundamentals for Microsoft Windows Page: iv
Special IPv6 Addresses.......................................................................................................74
Compatibility Addresses.......................................................................................................75
IPv6 Interface Identifiers..........................................................................................................76
EUI-64 Address-based Interface Identifiers............................................................................76
IEEE 802 Address Conversion Example................................................................................78
Temporary Address Interface Identifiers................................................................................79
IPv6 Multicast Addresses........................................................................................................79
Solicited-Node Multicast Address..........................................................................................81
IPv6 Anycast Addresses..........................................................................................................81
IPv6 Addresses for a Host.......................................................................................................82
IPv6 Addresses for a Router....................................................................................................82
Comparing IPv4 and IPv6 Addressing..........................................................................................84
Chapter Summary......................................................................................................................85
Chapter Glossary.......................................................................................................................86
Chapter 4 – Subnetting................................................................................................................89
Chapter Objectives.....................................................................................................................90
Subnetting for IPv4.....................................................................................................................91
Determining the Subnet Prefix of an IPv4 Address Configuration................................................92
Prefix Length Notation..........................................................................................................93
Subnet Mask Notation..........................................................................................................94
Defining a Prefix Length..........................................................................................................95
Subnetting Within an Octet......................................................................................................97
Defining the Subnetted address prefixes...............................................................................98
Defining the Range of IPv4 Addresses for Each Subnet.........................................................99
Subnetting Across an Octet Boundary....................................................................................102
Defining the Subnetted address prefixes.............................................................................102
Defining the Range of IPv4 Addresses for Each Subnet.......................................................104
Variable Length Subnetting....................................................................................................105
Variable Length Subnetting Example..................................................................................106
Variable Length Subnetting and Routing.............................................................................108
Subnetting for IPv6...................................................................................................................109
Subnetting a Global Address Prefix........................................................................................109

TCP/IP Fundamentals for Microsoft Windows Page: v
Determining the Number of Subnetting Bits.........................................................................109
Enumerating Subnetted Address Prefixes...........................................................................110
Variable Length Subnetting....................................................................................................112
Chapter Summary....................................................................................................................113
Chapter Glossary.....................................................................................................................114
Chapter 5 – IP Routing...............................................................................................................115
Chapter Objectives...................................................................................................................116
IP Routing Overview.................................................................................................................117
Direct and Indirect Delivery....................................................................................................117
IP Routing Table...................................................................................................................118
Routing Table Entries.........................................................................................................118
Static and Dynamic Routing...................................................................................................119
Dynamic Routing...............................................................................................................120
Routing Protocol Technologies...........................................................................................120
IPv4 Routing............................................................................................................................122
IPv4 Routing with Windows...................................................................................................122
Contents of the IPv4 Routing Table.....................................................................................122
Route Determination Process.............................................................................................123
Determining the Next-Hop Address and Interface.................................................................124
Example Routing Table for an IPv4 Host Running Windows.................................................124
Static IPv4 Routing................................................................................................................126
Configuring Static IPv4 Routers..........................................................................................127
Dynamic IPv4 Routing...........................................................................................................128
RIP...................................................................................................................................129
OSPF................................................................................................................................129
BGP-4...............................................................................................................................129
Integrating Static and Dynamic Routing..................................................................................130
IPv4 Route Aggregation and Summarization...........................................................................130
Route Summarization for Internet Address Classes: Supernetting.........................................131
IPv4 Routing Support in Windows..........................................................................................132
Static Routing....................................................................................................................132
Dynamic Routing with RIP and OSPF.................................................................................133

TCP/IP Fundamentals for Microsoft Windows Page: vi
Configuring Hosts for IPv4 Routing.........................................................................................133
Default Gateway Setting.....................................................................................................134
Default Route Metric..........................................................................................................134
ICMP Router Discovery......................................................................................................135
Static Routes.....................................................................................................................135
Persistent Static Routes.....................................................................................................136
RIP Listener......................................................................................................................136
Routing for Disjoint Networks.................................................................................................136
Network Address Translation.................................................................................................138
How Network Address Translation Works...............................................................................138
IPv6 Routing............................................................................................................................142
IPv6 Routing Tables..............................................................................................................142
IPv6 Routing Table Entry Types..........................................................................................142
Route Determination Process.............................................................................................143
Example Windows IPv6 Routing Table................................................................................143
IPv6 Routing Protocols..........................................................................................................145
RIPng for IPv6...................................................................................................................145
OSPF for IPv6...................................................................................................................145
Integrated IS-IS for IPv6.....................................................................................................145
BGP-4...............................................................................................................................146
IDRPv2.............................................................................................................................146
IPv6 Route Aggregation and Summarization...........................................................................146
Windows Support for IPv6 Static Routing................................................................................147
Configuring Hosts for IPv6 Routing.........................................................................................151
Routing Tools...........................................................................................................................152
Chapter Summary....................................................................................................................153
Chapter Glossary.....................................................................................................................154
Chapter 6 – Dynamic Host Configuration Protocol....................................................................157
Chapter Objectives...................................................................................................................158
DHCP Overview.......................................................................................................................159
Benefits of Using DHCP........................................................................................................160
Configuring TCP/IP Manually..............................................................................................160

TCP/IP Fundamentals for Microsoft Windows Page: vii
Configuring TCP/IP Using DHCP........................................................................................160
How DHCP Works....................................................................................................................161
DHCP Messages and Client States........................................................................................161
The Initializing State...........................................................................................................163
The Selecting State............................................................................................................164
The Requesting State........................................................................................................166
The Bound State................................................................................................................167
The Renewing State..........................................................................................................168
The Rebinding State..........................................................................................................169
Restarting a Windows DHCP Client....................................................................................169
The Windows DHCP Server Service..........................................................................................172
Installing the DHCP Server Service........................................................................................172
DHCP and Active Directory Integration...................................................................................172
BOOTP Support....................................................................................................................173
DHCP Server Service Configuration..........................................................................................174
Properties of the DHCP Server..............................................................................................174
DHCP Scopes......................................................................................................................175
Configuring a DHCP Scope................................................................................................175
Deploying Multiple DHCP Servers.......................................................................................175
Superscopes........................................................................................................................176
Options................................................................................................................................177
Client Reservations...............................................................................................................179
Fault Tolerance for Client Reservations...............................................................................180
DHCP Options Classes.........................................................................................................180
Vendor Classes.................................................................................................................181
User Classes.....................................................................................................................181
The DHCP Relay Agent............................................................................................................183
Installing the DHCP Relay Agent............................................................................................183
Address Autoconfiguration for IPv6............................................................................................185
Autoconfigured Address States..............................................................................................185
Types of Autoconfiguration....................................................................................................186
Autoconfiguration Process.....................................................................................................186

TCP/IP Fundamentals for Microsoft Windows Page: viii
Using the Ipconfig Tool.............................................................................................................188
Verifying the IP Configuration................................................................................................188
Renewing a Lease................................................................................................................188
Releasing a Lease................................................................................................................189
Setting and Displaying the Class ID........................................................................................189
Chapter Summary....................................................................................................................190
Chapter Glossary.....................................................................................................................191
Chapter 7 – Host Name Resolution............................................................................................193
Chapter Objectives...................................................................................................................194
TCP/IP Naming Schemes.........................................................................................................195
Host Names Defined.............................................................................................................195
Host Name Resolution Process.................................................................................................196
Resolving Names with a Hosts File........................................................................................197
Resolving Names with a DNS Server.....................................................................................198
Windows Methods of Resolving Host Names..........................................................................198
The Hosts File..........................................................................................................................200
IPv4 Entries..........................................................................................................................200
IPv6 Entries..........................................................................................................................201
The DNS Client Resolver Cache................................................................................................202
Chapter Summary....................................................................................................................204
Chapter Glossary.....................................................................................................................205
Chapter 8 – Domain Name System Overview.............................................................................207
Chapter Objectives...................................................................................................................208
The Domain Name System.......................................................................................................209
DNS Components.................................................................................................................209
DNS Names.........................................................................................................................210
Domains and Subdomains.....................................................................................................210
DNS Servers and the Internet................................................................................................211
Zones...................................................................................................................................212
Name Resolution......................................................................................................................214
DNS Name Resolution Example............................................................................................214
Reverse Queries...................................................................................................................215

TCP/IP Fundamentals for Microsoft Windows Page: ix
Reverse Queries for IPv4 Addresses...................................................................................216
Reverse Queries for IPv6 Addresses...................................................................................217
Caching and TTL..................................................................................................................217
Negative Caching..................................................................................................................217
Round Robin Load Balancing................................................................................................217
Name Server Roles..................................................................................................................219
Forwarders...........................................................................................................................220
Forwarders in Non-exclusive Mode.....................................................................................221
Forwarders in Exclusive Mode............................................................................................221
Caching-Only Name Servers.................................................................................................222
Resource Records and Zones...................................................................................................223
Resource Record Format......................................................................................................223
Resource Record Types........................................................................................................224
Delegation and Glue Records.............................................................................................224
The Root Hints File...............................................................................................................225
Zone Transfers.........................................................................................................................226
Full Zone Transfer.................................................................................................................226
Incremental Zone Transfer.....................................................................................................227
DNS Notify...........................................................................................................................227
DNS Dynamic Update...............................................................................................................229
Chapter Summary....................................................................................................................230
Chapter Glossary.....................................................................................................................231
Chapter 9 – Windows Support for DNS......................................................................................233
Chapter Objectives...................................................................................................................234
The DNS Client Service............................................................................................................235
DNS Client Configuration.......................................................................................................235
DHCP Configuration of the DNS Client Service....................................................................235
Manual Configuration of the DNS Client Service Using Network Connections........................235
Manual Configuration Using Netsh......................................................................................238
Configuration for Remote Access Clients.............................................................................239
Configuration of DNS Settings Using Group Policy...............................................................239
Name Resolution Behavior....................................................................................................239

TCP/IP Fundamentals for Microsoft Windows Page: x
Name Resolution for FQDNs..............................................................................................240
Name Resolution for Single-Label, Unqualified Domain Names............................................240
Name Resolution for Multiple-Label, Unqualified Domain Names..........................................241
IPv6 Addresses Used First.................................................................................................241
The DNS Server Service...........................................................................................................242
Installing the DNS Server Service..........................................................................................243
DNS and Active Directory......................................................................................................244
Active Directory Location Service........................................................................................244
Storage of Zones Integrated with Active Directory................................................................244
DNS Server Service Configuration.............................................................................................247
Properties of the DNS Server.................................................................................................247
Maintaining Zones.................................................................................................................248
Forward Lookup Zones......................................................................................................248
Reverse Lookup Zones......................................................................................................249
Delegation.........................................................................................................................250
Zone Transfers..................................................................................................................251
Resource Records................................................................................................................251
IPv4 Address Records.......................................................................................................252
IPv6 Address Records.......................................................................................................252
Pointer Records.................................................................................................................252
DNS Traffic Over IPv6...........................................................................................................252
Using Locally Configured Unicast Addresses.......................................................................252
Using Well-Known Unicast Addresses.................................................................................253
Dynamic Update and Secure Dynamic Update........................................................................253
How Computers Running Windows Update their DNS Names..............................................254
DNS Dynamic Update Process...........................................................................................255
Configuring DNS Dynamic Update......................................................................................256
Secure Dynamic Update........................................................................................................257
DNS and WINS Integration....................................................................................................257
How WINS Lookup Works..................................................................................................258
WINS Reverse Lookup.......................................................................................................258
Using the Nslookup Tool...........................................................................................................260

TCP/IP Fundamentals for Microsoft Windows Page: xi
Nslookup Modes...................................................................................................................260
Nslookup Syntax...................................................................................................................260
Examples of Nslookup Usage................................................................................................260
Example 1: Nslookup in Interactive Mode............................................................................260
Example 2: Nslookup and Forward Queries.........................................................................261
Example 3: Nslookup Forward Query Using Another DNS Server.........................................261
Example 4: Nslookup Debug Information.............................................................................261
Example 5: Nslookup Reverse Query..................................................................................262
Chapter Summary....................................................................................................................263
Chapter Glossary.....................................................................................................................264
Chapter 10 – TCP/IP End-to-End Delivery..................................................................................267
Chapter Objectives...................................................................................................................268
End-to-End IPv4 Delivery Process.............................................................................................269
IPv4 on the Source Host........................................................................................................269
IPv4 on the Router................................................................................................................270
IPv4 on the Destination Host..................................................................................................273
Step-by-Step IPv4 Traffic Example............................................................................................275
Network Configuration...........................................................................................................275
Web Client........................................................................................................................276
Router 1............................................................................................................................276
Router 2............................................................................................................................276
Router 3............................................................................................................................276
DNS Server.......................................................................................................................276
Web Server.......................................................................................................................277
Web Traffic Example.............................................................................................................277
DNS Name Query Request Message to the DNS Server......................................................277
DNS Name Query Response Message to the Web Client.....................................................280
TCP SYN Segment to the Web Server................................................................................281
TCP SYN-ACK Segment to the Web Client.........................................................................283
TCP ACK Segment to the Web Server................................................................................284
HTTP Get Message to the Web Server...............................................................................285
HTTP Get-Response Message to the Web Client.................................................................286

TCP/IP Fundamentals for Microsoft Windows Page: xii
End-to-End IPv6 Delivery Process.............................................................................................288
IPv6 on the Source Host........................................................................................................288
IPv6 on the Router................................................................................................................289
IPv6 on the Destination Host..................................................................................................292
Step-by-Step IPv6 Traffic Example............................................................................................294
Network Configuration...........................................................................................................294
Web Client........................................................................................................................295
Router 1............................................................................................................................295
Router 2............................................................................................................................295
Router 3............................................................................................................................295
DNS Server.......................................................................................................................295
Web Server.......................................................................................................................296
Web Traffic Example.............................................................................................................296
DNS Name Query Request Message to the DNS Server......................................................296
DNS Name Query Response Message to the Web Client.....................................................299
TCP SYN-ACK Segment to the Web Client.........................................................................302
TCP ACK Segment to the Web Server................................................................................303
HTTP Get Segment to the Web Server................................................................................304
HTTP Get-Response Segment to the Web Client.................................................................305
Chapter Summary....................................................................................................................307
Chapter Glossary.....................................................................................................................308
Chapter 11 – NetBIOS over TCP/IP.............................................................................................309
Chapter Objectives...................................................................................................................310
NetBIOS over TCP/IP Overview................................................................................................311
Enabling NetBIOS over TCP/IP..............................................................................................312
NetBIOS Names...................................................................................................................313
Common NetBIOS Names..................................................................................................314
NetBIOS Name Registration, Resolution, and Release............................................................315
Name Registration.............................................................................................................315
Name Resolution...............................................................................................................315
Name Release...................................................................................................................316
Segmenting NetBIOS Names with the NetBIOS Scope ID.......................................................316

TCP/IP Fundamentals for Microsoft Windows Page: xiii
NetBIOS Name Resolution........................................................................................................318
Resolving Local NetBIOS Names Using a Broadcast...............................................................318
Limitations of Broadcasts...................................................................................................319
Resolving Names with a NetBIOS Name Server.....................................................................319
Windows Methods of Resolving NetBIOS Names....................................................................319
NetBIOS Node Types...............................................................................................................322
Using the Lmhosts File.............................................................................................................323
Predefined Keywords............................................................................................................323
Using a Centralized Lmhosts File...........................................................................................324
Creating Lmhosts Entries for Specific NetBIOS Names...........................................................325
Name Resolution Problems Using Lmhosts............................................................................326
The Nbtstat Tool.......................................................................................................................327
Chapter Summary....................................................................................................................328
Chapter Glossary.....................................................................................................................329
Chapter 12 – Windows Internet Name Service Overview...........................................................331
Chapter Objectives...................................................................................................................332
Introduction to WINS.................................................................................................................333
How WINS Works.....................................................................................................................334
Name Registration................................................................................................................334
When a Duplicate Name Is Found.......................................................................................334
When WINS Servers are Unavailable..................................................................................335
Name Renewal.....................................................................................................................335
Name Refresh Request......................................................................................................335
Name Refresh Response...................................................................................................335
Name Rel ease......................................................................................................................335
Name Resolution..................................................................................................................336
The WINS Client.......................................................................................................................337
DHCP Configuration of a WINS Client....................................................................................337
Manual Configuration of the WINS Client Using Network Connections......................................337
Manual Configuration of the WINS Client Using Netsh.............................................................338
Configuration of the WINS Client for Remote Access Clients...................................................339
The WINS Server Service.........................................................................................................340

TCP/IP Fundamentals for Microsoft Windows Page: xiv
Installing the WINS Server Service.........................................................................................340
Properties of the WINS Server...............................................................................................340
Static Entries for Non-WINS Clients.......................................................................................342
Database Replication Between WINS Servers........................................................................343
Push and Pull Operations...................................................................................................344
Configuring a WINS Server as a Push or Pull Partner..........................................................346
Configuring Database Replication.......................................................................................346
WINS Automatic Replication Partners.................................................................................347
The WINS Proxy.......................................................................................................................349
How WINS Proxies Resolve Names.......................................................................................349
WINS Proxies and Name Registration....................................................................................350
Configuration of a WINS Proxy..............................................................................................351
Chapter Summary....................................................................................................................352
Chapter Glossary.....................................................................................................................353
Chapter 13 – Internet Protocol Security and Packet Filtering....................................................355
Chapter Objectives...................................................................................................................356
IPsec and Packet Filtering Overview..........................................................................................357
IPsec.......................................................................................................................................358
Security Properties of IPsec-protected Communications..........................................................358
IPsec Protocols.....................................................................................................................359
IPsec Modes.........................................................................................................................359
Transport Mode.................................................................................................................359
Tunnel Mode.....................................................................................................................361
Negotiation Phases...............................................................................................................362
Phase I or Main Mode Negotiation......................................................................................363
Phase II or Quick Mode Negotiation....................................................................................364
IPsec Policy Settings.............................................................................................................364
General IPsec Policy Settings.............................................................................................365
Rules................................................................................................................................366
Default Response Rule......................................................................................................367
Filter List...........................................................................................................................368
Filter Settings....................................................................................................................368

TCP/IP Fundamentals for Microsoft Windows Page: xv
Filter Action.......................................................................................................................369
IPsec Security Methods......................................................................................................370
Custom Security Methods..................................................................................................371
Authentication...................................................................................................................372
Tunnel Endpoint................................................................................................................373
Connection Type...............................................................................................................373
IPsec for IPv6 Traffic.............................................................................................................374
Packet Filtering........................................................................................................................375
Windows Firewall..................................................................................................................375
How Windows Firewall Works.............................................................................................376
Internet Connection Firewall (ICF)..........................................................................................377
TCP/IP Filtering....................................................................................................................379
Packet Filtering with Routing and Remote Access...................................................................380
Basic Firewall....................................................................................................................380
IP Packet Filtering..............................................................................................................381
IPv6 Packet Filtering.............................................................................................................382
Basic IPv6 Firewall............................................................................................................383
IPv6 ICF............................................................................................................................383
Windows Firewall...............................................................................................................383
Chapter Summary....................................................................................................................384
Chapter Glossary.....................................................................................................................385
Chapter 14 – Virtual Private Networking....................................................................................387
Chapter Objectives...................................................................................................................388
Virtual Private Networking Overview..........................................................................................389
Components of a VPN...........................................................................................................389
Attributes of a VPN Connection..............................................................................................390
User Authentication............................................................................................................391
Encapsulation....................................................................................................................391
Encryption.........................................................................................................................391
Types of VPN Connections....................................................................................................391
Remote Access.................................................................................................................391
Site-to-Site........................................................................................................................393

TCP/IP Fundamentals for Microsoft Windows Page: xvi
VPN Protocols..........................................................................................................................395
Point-to-Point Protocol (PPP).................................................................................................395
Phase 1: PPP Link Establishment.......................................................................................395
Phase 2: User Authentication.............................................................................................395
Phase 3: PPP Callback Control..........................................................................................397
Phase 4: Invoking Network Layer Protocol(s).......................................................................397
Data-Transfer Phase..........................................................................................................397
Point-to-Point Tunneling Protocol (PPTP)...............................................................................397
Layer Two Tunneling Protocol with IPsec (L2TP/IPsec)...........................................................398
Remote Access VPN Connections.............................................................................................399
VPN Client Support...............................................................................................................399
Network Connections Folder...............................................................................................399
Connection Manager..........................................................................................................399
VPN Server Support..............................................................................................................400
VPN Server Support in Windows XP...................................................................................401
IP Address Assignment and Routing and Remote Access........................................................401
Obtaining IPv4 Addresses via DHCP...................................................................................402
Obtaining IPv4 Addresses from a Static Address Pool..........................................................403
The Process for Setting Up a Remote Access VPN Connection...............................................403
Step 1: Logical Link Setup..................................................................................................403
Step 2: PPP Connection Setup...........................................................................................404
Step 3: Remote Access VPN Client Registration..................................................................405
Site-to-Site VPN Connections....................................................................................................406
Configuring a Site-t o-Site VPN Connection.............................................................................407
Configuring a Demand-dial Interface...................................................................................407
Connection Example for a Site-to-Site VPN............................................................................408
The Connection Process for Site-t o-Site VPNs........................................................................410
Using RADIUS for Network Access Authentication......................................................................411
RADIUS Components...........................................................................................................411
Access Clients...................................................................................................................412
Access Servers.................................................................................................................412
RADIUS Servers................................................................................................................412

TCP/IP Fundamentals for Microsoft Windows Page: xvii
User Account Databases....................................................................................................412
RADIUS Proxies................................................................................................................413
IAS as a RADIUS Server.......................................................................................................413
Remote Access Policies.....................................................................................................415
Remote Access Policy Conditions and Restrictions..............................................................415
IAS as a RADIUS Proxy........................................................................................................416
Connection Request Processing.........................................................................................417
Chapter Summary....................................................................................................................418
Chapter Glossary.....................................................................................................................419
Chapter 15 – IPv6 Transition Technologies...............................................................................421
Chapter Objectives...................................................................................................................422
Introduction..............................................................................................................................423
IPv6 Transition Mechanisms.....................................................................................................424
Dual Stack or Dual IP Layer Architectures..............................................................................424
DNS Infrastructure................................................................................................................425
Address Selection Rules....................................................................................................425
IPv6 Over IPv4 Tunneling......................................................................................................426
Tunneling Configurations....................................................................................................426
Types of Tunnels...............................................................................................................427
ISATAP....................................................................................................................................428
Using an ISATAP Router.......................................................................................................429
Resolving the ISATAP Name..............................................................................................430
Using the netsh interface ipv6 isatap set router Command....................................................430
Setting up an ISATAP Router................................................................................................431
6to4.........................................................................................................................................432
6to4 Support in Windows Server 2003 and Windows XP.........................................................434
Teredo.....................................................................................................................................438
Teredo Components.............................................................................................................438
Teredo Addresses.................................................................................................................440
How Teredo Works...............................................................................................................441
Initial Configuration............................................................................................................441
Initial Communication Between Two Teredo Clients in Different Sites....................................441

TCP/IP Fundamentals for Microsoft Windows Page: xviii
Migrating to IPv6......................................................................................................................444
Chapter Summary....................................................................................................................445
Chapter Glossary.....................................................................................................................446
Chapter 16 – Troubleshooting TCP/IP........................................................................................449
Chapter Objectives...................................................................................................................450
Identifying the Problem Source..................................................................................................451
Windows Troubleshooting Tools................................................................................................452
Troubleshooting IPv4................................................................................................................454
Verifying IPv4 Connectivity....................................................................................................454
Repair the Connection.......................................................................................................454
Verify Configuration...........................................................................................................455
Manage Configuration........................................................................................................455
Verify Reachability.............................................................................................................456
Check Packet Filtering.......................................................................................................457
View and Manage the Local IPv4 Routing Table..................................................................457
Verify Router Reliability......................................................................................................458
Verifying DNS Name Resolution for IPv4 Addresses...............................................................458
Verify DNS Configuration...................................................................................................458
Display and Flush the DNS Client Resolver Cache..............................................................459
Test DNS Name Resolution with Ping.................................................................................459
Use the Nslookup Tool to View DNS Server Responses.......................................................459
Verifying NetBIOS Name Resolution......................................................................................459
Verify NetBIOS over TCP/IP Configuration..........................................................................459
Display and Reload the NetBIOS Name Cache....................................................................460
Test NetBIOS Name Resolution with Nbtstat.......................................................................460
Verifying IPv4-based TCP Sessions.......................................................................................460
Check for Packet Filtering..................................................................................................460
Verify TCP Session Establishment......................................................................................460
Verify NetBIOS Sessions....................................................................................................461
Troubleshooting IPv6................................................................................................................462
Verifying IPv6 Connectivity....................................................................................................462
Verify Configuration...........................................................................................................462

TCP/IP Fundamentals for Microsoft Windows Page: xix
Manage Configuration........................................................................................................463
Verify Reachability.............................................................................................................463
Check Packet Filtering.......................................................................................................464
View and Manage the IPv6 Routing Table...........................................................................464
Verify Router Reliability......................................................................................................465
Verifying DNS Name Resolution for IPv6 Addresses...............................................................465
Verify DNS Configuration...................................................................................................465
Display and Flush the DNS Client Resolver Cache..............................................................465
Test DNS Name Resolution with the Ping Tool....................................................................466
Use the Nslookup Tool to View DNS Server Responses.......................................................466
Verifying IPv6-based TCP Connections..................................................................................466
Check for Packet Filtering..................................................................................................466
Verify TCP Connection Establishment.................................................................................466
Chapter Summary....................................................................................................................468
Chapter Glossary.....................................................................................................................469
Appendix A – IP Multicast..........................................................................................................471
Overview of IP Multicast............................................................................................................472
IP Multicast-Enabled Intranet.................................................................................................472
Host Support for IP Multicast..............................................................................................472
Router Support for IP Multicast...........................................................................................473
Multicast Addresses..................................................................................................................476
IPv4 Multicast Addresses......................................................................................................476
Mapping IPv4 Multicast to MAC-Layer Multicast...................................................................476
IPv6 Multicast Addresses......................................................................................................477
Solicited-Node Address......................................................................................................478
Mapping IPv6 Multicast to MAC-Layer Multicast...................................................................479
Recommended Multicast IPv6 Addresses............................................................................479
Multicast Subnet Membership Management............................................................................480
IGMP for IPv4....................................................................................................................480
MLD for IPv6.....................................................................................................................480
IPv4 Multicast Forwarding Support in Windows Server 2003.......................................................482
IPv4 Multicast Forwarding......................................................................................................482

TCP/IP Fundamentals for Microsoft Windows Page: xx
IGMP Routing Protocol Component........................................................................................482
IGMP Router Mode............................................................................................................483
IGMP Proxy Mode.............................................................................................................483
IPv4 Multicast Address Allocation with MADCAP........................................................................486
Using Multicast Scopes.........................................................................................................486
Reliable Multicast with Pragmatic General Multicast (PGM).........................................................488
PGM Overview.....................................................................................................................488
Adding and Using the Reliable Multicast Protocol....................................................................489
Adding the Reliable Multicast Protocol................................................................................489
Writing PGM-enabled Applications......................................................................................489
How PGM and the Reliable Multicast Protocol Works..............................................................489
Appendix B – Simple Network Management Protocol................................................................491
SNMP Overview.......................................................................................................................492
The Management Information Base........................................................................................493
The Hierarchical Name Tree...............................................................................................493
SNMP Messages..................................................................................................................494
SNMP Communities..............................................................................................................495
How SNMP Works................................................................................................................496
Windows SNMP Service...........................................................................................................498
Installing and Configuring the SNMP Service..........................................................................499
Agent Tab.........................................................................................................................499
Traps Tab.........................................................................................................................500
Security Tab......................................................................................................................500
Evntcmd Tool.......................................................................................................................501
Appendix C – Computer Browser Service..................................................................................503
Computer Browsing Overview...................................................................................................504
Browsing Collection and Distribution......................................................................................505
The Collection Process......................................................................................................505
The Distribution Process....................................................................................................506
Servicing Browse Client Requests..........................................................................................507
Obtaining the List of Servers Within its LAN Group..............................................................507
Obtaining the List of Servers Within Another LAN Group......................................................508

TCP/IP Fundamentals for Microsoft Windows Page: xxi
Obtaining the List of Shares on a Server.............................................................................509
Computer Browser Service Operation on an IPv4 Network..........................................................510
Domain Spanning an IPv4 Router..........................................................................................510
Collection and Distribution Process.....................................................................................511
Servicing Browse Client Requests......................................................................................512
Configuring the Lmhosts File for an Domain that Spans IPv4 Routers...................................512
Multiple Domains Separated By IPv4 Routers.........................................................................513
Collection and Distribution Process.....................................................................................514
Servicing WINS-enabled Client Requests for Remote Domains............................................515
Servicing non-WINS Client Requests for Remote Domains...................................................517
Workgroup Spanning an IPv4 Router.....................................................................................518
Multiple Workgroups Separated By IPv4 Routers....................................................................519



TCP/IP Fundamentals for Microsoft Windows Page: xxii
Chapter 1 – Introduction to TCP/IP
TCP/IP Fundamentals for Microsoft Windows Page: 1









Chapter 1 – Introduction to TCP/IP


Abstract
This chapter introduces Transmission Control Protocol/Internet Protocol (TCP/IP), both as an industry standard protocol
suite and as it is supported in the Microsoft Windows Server 2003 and Windows XP operating systems. For the TCP/IP
protocol suite, network administrators must understand its past, the current standards process, and the common terms
used to describe network devices and portions of a network. For the TCP/IP components in Windows Server 2003 and
Windows XP, network administrators must understand the installation and configuration differences of the Internet
Protocol version 4 (IPv4)-based and Internet Protocol version 6 (IPv6)-based components and the primary tools for
troubleshooting.

Chapter 1 – Introduction to TCP/IP
TCP/IP Fundamentals for Microsoft Windows Page: 2
Chapter Objectives
After completing this chapter, you will be able to:
 Describe the purpose and history of the TCP/IP protocol suite.
 Describe the Internet standards process and the purpose of a Request for Comments (RFC) document.
 Define common terms used in TCP/IP.
 Describe the advantages of TCP/IP components in Windows Server 2003 and Windows XP.
 Describe how to configure the IPv4-based TCP/IP component in Windows.
 Describe how to install and configure the IPv6-based TCP/IP component in Windows.
 List and define the set of name resolution files and diagnostic tools used by the TCP/IP components in
Windows.
 Test the TCP/IP components of Windows with the Ipconfig and Ping tools.
 Install and use Network Monitor.

Chapter 1 – Introduction to TCP/IP
TCP/IP Fundamentals for Microsoft Windows Page: 3
History of TCP/IP
Transmission Control Protocol/Internet Protocol (TCP/IP) is an industry standard suite of protocols that
is designed for large networks consisting of network segments that are connected by routers. TCP/IP is
the protocol that is used on the Internet, which is the collection of thousands of networks worldwide that
connect research facilities, universities, libraries, government agencies, private companies, and
individuals.
The roots of TCP/IP can be traced back to research conducted by the United States Department of
Defense (DoD) Advanced Research Projects Agency (DARPA) in the late 1960s and early 1970s. The
following list highlights some important TCP/IP milestones:
 In 1970, ARPANET hosts started to use Network Control Protocol (NCP), a preliminary form of what
would become the Transmission Control Protocol (TCP).
 In 1972, the Telnet protocol was introduced. Telnet is used for terminal emulation to connect dissimilar
systems. In the early 1970s, these systems were different types of mainframe computers.
 In 1973, the File Transfer Protocol (FTP) was introduced. FTP is used to exchange files between
dissimilar systems.
 In 1974, the Transmission Control Protocol (TCP) was specified in detail. TCP replaced NCP and
provided enhanced reliable communication services.
 In 1981, the Internet Protocol (IP) (also known as IP version 4 [IPv4]) was specified in detail. IP
provides addressing and routing functions for end-to-end delivery.
 In 1982, the Defense Communications Agency (DCA) and ARPA established the Transmission Control
Protocol (TCP) and Internet Protocol (IP) as the TCP/IP protocol suite.
 In 1983, ARPANET switched from NCP to TCP/IP.
 In 1984, the Domain Name System (DNS) was introduced. DNS resolves domain names (such as
www.example.com) to IP addresses (such as 192.168.5.18).
 In 1995, Internet service providers (ISPs) began to offer Internet access to businesses and individuals.
 In 1996, the Hypertext Transfer Protocol (HTTP) was introduced. The World Wide Web uses HTTP.
 In 1996, the first set of IP version 6 (IPv6) standards were published.
For more information about these protocols and the layers of the TCP/IP protocol architecture, see
Chapter 2, "Architectural Overview of the TCP/IP Protocol Suite."
With the refinement of the IPv6 standards and their growing acceptance, the chapters of this online
book make the following definitions: