Illustrated TCP/IP 0471196568, 9780471196563

Nothing happens on the Internet without the underlying collection of network protocols - the TCP/IP stack - playing a ro

243 70 6MB

English Pages 846 Year 1999

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
TCP/IP Illustrated Book......Page 0
Table of Contents......Page 1
Illustrated TCP/IP:Acknowledgments......Page 11
Transmission Control Protocol/Internet Protocol......Page 13
TCP/IP and Other Protocols......Page 17
The Origins of TCP/IP......Page 20
The World Wide Web......Page 26
Internet, Intranets, and Extranets......Page 30
Who Governs the Internet?......Page 32
The Governing Bodies of the Internet......Page 34
An Overall View of the Internet......Page 36
Internet Timeline......Page 37
Circuit and Packet Switching......Page 38
TCP/IP Protocol Documents......Page 40
Why Study the RFCs?......Page 42
Submitting an RFC......Page 44
RFC Updates......Page 46
RFC Format......Page 47
Other RFC Format Requirements......Page 49
Requirements in RFCs......Page 51
TCP/IP: The Protocols (covered in this book) and the OSI......Page 53
The Protocol Suite, According to This Book Model......Page 54
IP Overview......Page 56
IGPs, EGPs, and Routing Protocols......Page 58
Introduction to Routing Protocols (RIP)......Page 60
Introduction to Routing Protocols (OSPF)......Page 62
Other IP-Related Protocols......Page 64
Introduction to Transport Layer Protocols......Page 66
Introduction to the TCP/IP Standard Applications......Page 68
The Internet Protocol (IP)......Page 70
Connectionless, Best-Effort Delivery Service......Page 71
Data Encapsulation by Layer......Page 73
IPv4 Header......Page 75
Header Length, Service Type, and Total Length Fields......Page 77
Fragmentation......Page 79
Time to Live (TTL)......Page 82
Protocol and Checksum Fields......Page 84
IP Options Field......Page 85
Source and Destination Address Fields......Page 87
The IP Address Scheme......Page 89
Classful Addressing--The Original Address Scheme......Page 91
IP Address Format......Page 93
Identifying a Class......Page 95
Class A Address......Page 96
Class B Address......Page 98
Class C Address......Page 100
Class D Address......Page 102
Classes A-D Review......Page 104
Subnetting......Page 106
Reasons for Subnetting......Page 108
Subnetting Examples (Classes A, B, and C)......Page 110
More Subnet Examples......Page 112
Physical and Logical Addresses......Page 114
Subnet Mask Template......Page 115
An Example Conversion......Page 117
Let's Try One......Page 119
Subnet Bits......Page 121
Subnet Restrictions......Page 122
Subnet Mask Decisions......Page 124
Assigning More Than One Address to an Interface......Page 126
Classful IP Address Review......Page 127
Address Restrictions......Page 129
Address Allocation (The Internet Registry)......Page 131
Address Resolution Protocol (ARP)......Page 133
ARP Packet Format......Page 135
ARP Operation......Page 136
Rules for ARP......Page 138
Reverse Address Resolution Protocol (RARP)......Page 140
Proxy ARP......Page 142
What’s Wrong with the Address?......Page 144
Extending the Life of the IPv4 Address Space......Page 146
Address Assignment (The Old Method)......Page 148
Addressing (The Old Method)......Page 150
Address Terms and Definitions......Page 151
Making the Address Efficient......Page 153
Masks and Prefixes......Page 155
Another Try......Page 157
Variable-Length Subnet Masks......Page 159
Longest Match Rule......Page 161
Example One: An ISP Address Assignment......Page 163
Example Two: Relaxing the Assignment......Page 165
Supernetting Exposed......Page 167
Route Aggregation......Page 168
Determining a Common Prefix......Page 170
Another Look at Route Aggregation......Page 172
Classless Inter-Domain Routing (CIDR)......Page 174
Classless Inter-Domain Routing (continued)......Page 176
Prefix Assignments......Page 178
A Look at the Addresses of an ISP......Page 180
A Graphic Look at the Example......Page 182
CIDR and VLSM Comparison......Page 184
Special Subnet Considerations......Page 186
Internet Assigned Numbers Authority......Page 188
Current IANA Address Block Assignments......Page 190
Routing......Page 192
Direct Routing......Page 194
Indirect Routing......Page 196
A Flowchart......Page 198
Routing Protocols-Distance Vector......Page 199
Updating Other Routers (Distance Vectors)......Page 201
A Bigger Update......Page 203
Routing Tables......Page 205
The Routing Information Protocol (Version 1)......Page 207
RIP Operational Types......Page 209
RIP Field Descriptions......Page 211
Default Router and Gateways......Page 213
Disadvantages of the RIPv1 Protocol......Page 215
Scaling with RIP......Page 217
Routers and Subnet Masks......Page 219
RIP Fixes......Page 221
Split Horizon Demonstrated......Page 223
RIP Version 2......Page 225
Authentication......Page 227
Subnet Mask Field......Page 228
Route Tag and Next-Hop Fields......Page 230
Multicast Support......Page 231
RIPv2 Compatibility with RIPv1......Page 233
Open Shortest Path First (OSPF, RFC 2178)......Page 235
An OSPF Network......Page 237
A Routing Protocol Comparison......Page 238
OSPF Overview......Page 241
OSPF Media Support......Page 243
Router Types......Page 244
Router Names and Routing Methods......Page 246
Message Types......Page 247
Metrics (Cost)......Page 249
Generic Packet Format......Page 251
The Hello Protocol......Page 252
Adjacency......Page 254
Maintaining the Database......Page 256
OSPF Areas......Page 258
The Backbone Area......Page 260
The Area Border Router (ABR)......Page 262
Virtual Link......Page 264
Inter-Area Routing......Page 265
Information from Other Autonomous Systems......Page 266
Stub Areas......Page 268
RFCs Related to OSPF......Page 269
Static versus Dynamic Routing......Page 271
Remote Networks......Page 274
Datagram Routing......Page 276
Introduction......Page 278
IPv6 Features......Page 281
From IPv4 to IPv6......Page 283
IP Version Numbers According to RFC 1700......Page 285
IPv6 Header......Page 286
IPv4 Options -- A Review......Page 288
IPv4 and IPv6 Header Differences......Page 290
IPv6 Extension Headers......Page 292
Fragmentation......Page 294
IPv6 Addressing......Page 296
IPv6 Addressing Prefix......Page 300
6Bone Test Addressing......Page 302
Provider-Based IPv6 Addressing......Page 303
Local-Use IPv6 Addressing......Page 304
IPv6 Addresses with Embedded IPv4 Addresses......Page 306
Unicast Addresses......Page 308
Autoconfiguration......Page 310
Neighbor Discovery......Page 312
Neighbor Discovery Types......Page 315
Neighbor Discovery and IPv4......Page 317
Address Resolution......Page 320
Methods of Deploying IPv6......Page 322
IPv6 Tunneling Introduction......Page 324
IPv6 Tunnel Addressing......Page 326
IPv6 and IPv4 Dual-Stack Strategy......Page 328
IPv6 Tunneling......Page 329
IPv6 Tunneling......Page 330
IPv6 Tunneling Flowchart 1......Page 331
IPv6 Tunneling Flowchart 2......Page 332
IPv6 Tunneling Flowchart 3......Page 333
Anycast Addressing......Page 334
Multicasting for IPv6......Page 335
IPv6 Routing......Page 337
RIPng......Page 339
ICMP......Page 340
ICMPv6 Encapsulation......Page 342
ICMPv6 and ICMPv4......Page 343
ICMPv6 Error Messages......Page 345
ICMP Informational Messages......Page 348
ICMP and Neighbor Discovery......Page 350
ICMPv6 and Multicast......Page 352
IPv6 Cache Entries......Page 354
IPv6 Algorithm......Page 356
RFCs Related to IPv6......Page 358
Internet Control Message Protocol (ICMP)......Page 360
ICMP PING......Page 362
More ICMP Functions......Page 364
User Datagram Protocol (UDP)......Page 366
Multiplexing and Demultiplexing......Page 368
Port Numbers......Page 369
Assigned, Registered, and Dynamic Port Numbers......Page 371
Dynamic Port Numbers......Page 373
Transmission Control Protocol (TCP)......Page 375
TCP Details......Page 377
TCP Fields......Page 379
TCP Services......Page 381
TCP Connection Establishment......Page 382
The Three-Way Handshake......Page 384
TCP Segment......Page 386
Sequence Numbers and Acknowledgments......Page 388
Sequence and Acknowledgment Example......Page 390
TCP Flow and Window Management......Page 392
TCP Retransmission......Page 394
Slow Start and Congestion Avoidance......Page 396
Termination......Page 399
Real-Time Protocol and the Real-Time Control Protocol......Page 400
Translators......Page 404
Mixers......Page 405
RTP Message Format......Page 406
Support for Time-Sensitive Apps......Page 408
Payload Type......Page 410
Providing Control for RTP......Page 412
Sender Reports......Page 413
Receiver Reports......Page 415
Source Description Packet......Page 416
Bye Message (Packet)......Page 417
Application-Specific Message......Page 418
Caveats......Page 419
RFCs......Page 420
Selected TCP/IP Applications......Page 421
TELNET......Page 423
TELNET Options......Page 425
File Transfer Protocol (FTP)......Page 427
FTP Commands......Page 429
FTP Data Transfer......Page 431
Trivial File Transfer Program (TFTP)......Page 433
Domain Name Service (DNS)......Page 435
DNS Structure......Page 437
DNS Components......Page 439
Domain Structure......Page 441
Name Servers......Page 443
Query Function Types......Page 445
Example DNS Database......Page 446
SOA Record......Page 448
Name Server Records......Page 450
Address Records......Page 451
Mail Exchange Records (MX)......Page 453
Playing with the Database......Page 455
WHOIS Command......Page 457
More DNS Information......Page 459
Simple Mail Transfer Protocol (SMTP)......Page 461
SMTP Functions......Page 463
SMTP Flow......Page 465
DNS Interaction for Mail......Page 467
Post Office Protocol (POP)......Page 468
POP Operation......Page 470
SMTP, DNS, and POP Topology......Page 472
Introduction......Page 473
Multicast Components......Page 475
Multicast Caveats......Page 477
Unicast (versus Multicast)......Page 479
Multicast (versus Unicast)......Page 481
Multicasting Type......Page 482
Addressing Type Review......Page 484
Introduction to IP Multicast......Page 486
Extensions to the IP Service Interface......Page 488
Receiving Multicast Datagrams......Page 490
Address Format......Page 492
Mapping to an Ethernet or IEEE 802.X MAC Address......Page 494
A Converted IP Multicast Address......Page 496
Protocols......Page 497
IGMP Header......Page 499
Router Functions of IGMP......Page 501
HostJoin......Page 503
Multicast Algorithms......Page 505
Leaves, Branches, and the Root......Page 507
Spanning Tree and Flooding......Page 508
Reverse Path Forwarding (RPF)......Page 510
Pruning and Grafting (Definition)......Page 512
Reverse Path Multicasting (RPM)......Page 514
Core-Based Tree (CBT)......Page 516
Distance Vector Multicast Routing Protocol (DVMRP)......Page 518
DVMRP and IGMP......Page 520
Neighbor Discovery......Page 521
Route Reports......Page 522
Receiving a Route Report......Page 523
DVMRP Tables......Page 525
DVMRP Route Tables......Page 527
DVMRP Tunneling......Page 529
IP-in-IP Packet Format......Page 530
Protocol-Independent Multicast (PIM)......Page 531
PIM--Dense Mode (PIM-DM)......Page 533
PIM--Dense Mode Operation......Page 535
Adding Interfaces......Page 537
PIM--Sparse Mode (PIM-SM)......Page 539
Types of Multicast Trees Using PIM-SM......Page 541
Joining a Group......Page 543
A Host Sending to a Group......Page 544
Converting to a Source-Rooted Tree......Page 545
Rendezvous Points......Page 546
Comparison of Sparse- and Dense-Mode Protocols......Page 548
Multicast Open Shortest Path First (MOSPF)......Page 550
MOSPF Differences......Page 552
MOSPF Caveats......Page 554
Local-Group Database and the Group-Membership LSA......Page 555
Role of the DR and the BDR......Page 557
The Local-Group Database......Page 559
Operation......Page 561
Forwarding Cache......Page 563
Inter-Area MOSPF Routing......Page 565
Inter-Area Multicast Example......Page 567
Inter-Area Shortest-Path Tree......Page 569
Inter-Autonomous System Multicast......Page 570
Multicast Conclusion......Page 572
RFCs to Be Reviewed......Page 574
Boot Protocol (BOOTP)......Page 577
BOOTP Operation......Page 579
BOOTP Field Definitions......Page 580
Client Side (BOOTREQUEST)......Page 582
Server Side......Page 584
Chicken-or-the-Egg? Dilemma......Page 586
BOOTP Relay Agents (or BOOTP Gateway)......Page 588
Dynamic Host Configuration Protocol (DHCP)......Page 590
DHCP......Page 592
IP Address Allocation......Page 594
DHCP Messages......Page 595
DHCP Operation......Page 597
DHCP Responses......Page 599
Releasing an IP Address......Page 601
DHCP Shortcuts......Page 602
Lease Duration......Page 604
Efficiencies......Page 606
Operational Tables......Page 608
RFCs to Be Reviewed......Page 611
Resource Reservation Protocol (RSVP)......Page 612
Alternatives......Page 614
Where It Will Be Used......Page 616
Operation......Page 618
Path Messages......Page 620
RSVP and Routers......Page 622
RSVP Requests......Page 624
Reservation Style......Page 626
RSVP Control......Page 628
Disabling a Reservation......Page 630
Handling Errors......Page 631
Merging Flowspecs......Page 632
A Simple Example......Page 634
Issues......Page 636
RSVP Summary......Page 638
Conclusion......Page 640
Simple Network Management Protocol (SNMP)......Page 642
SNMP Elements......Page 643
SNMP Manager......Page 644
Agent......Page 646
Management Information Base (MIB)......Page 648
Example MIB Entry......Page 650
The Protocol of SNMP......Page 652
SNMP Encapsulation......Page 654
Index......Page 655
Recommend Papers

Illustrated TCP/IP
 0471196568, 9780471196563

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Ackn owl edgmen t s Part One - Introduction to the TCP/IP Protocol Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

1 - Tr a n smission Con t r ol Pr ot ocol /In t er n et Pr ot ocol 2 - TCP/IP a n d Ot h er Pr ot ocol s 3 - Th e Or igin s of TCP/IP 4 - Th e Wor l d Wide Web 5 - In t er n et , In t r a n et s, a n d Ext r a n et s 6 - Wh o Gover n s t h e In t er n et ? 7 - Th e Gover n in g Bodies of t h e In t er n et 8 - An Over a l l View of t h e In t er n et 9 - In t er n et Timel in e 10 - Cir cu it a n d Pa cket Swit ch in g 11 - TCP/IP Pr ot ocol Docu men t s 12 - Wh y St u dy t h e RFCs? 13 - Su bmit t in g a n RFC 14 - RFC Upda t es 15 - RFC For ma t 16 - Ot h er RFC For ma t Requ ir emen t s 17 - Requ ir emen t s in RFCs 18 - TCP/IP: Th e Pr ot ocol s (cover ed in t h is book) a n d t h e OSI Model 19 - Th e Pr ot ocol Su it e, Accor din g t o Th is Book 20 - IP Over view 21 - IGPs, EGPs, a n d Rou t in g Pr ot ocol s 22 - In t r odu ct ion t o Rou t in g Pr ot ocol s (RIP) 23 - In t r odu ct ion t o Rou t in g Pr ot ocol s (OSPF) 24 - Ot h er IP–Rel a t ed Pr ot ocol s 25 - In t r odu ct ion t o Tr a n spor t La yer Pr ot ocol s 26 - In t r odu ct ion t o t h e TCP/IP St a n da r d Appl ica t ion s 27 - Th e In t er n et Pr ot ocol (IP) 28 - Con n ect ion l ess, Best –Ef f or t Del iver y Ser vice 29 - Da t a En ca psu l a t ion by La yer 30 - IPv4 Hea der 31 - Hea der Len gt h , Ser vice Type, a n d Tot a l Len gt h Fiel ds

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

32 - Fr a gmen t a t ion 33 - Time t o Live (TTL) 34 - Pr ot ocol a n d Ch ecksu m Fiel ds 35 - IP Opt ion s Fiel d 36 - Sou r ce a n d Dest in a t ion Addr ess Fiel ds 37 - Th e IP Addr ess Sch eme 38 - Cl a ssf u l Addr essin g - Th e Or igin a l Addr ess Sch eme 39 - IP Addr ess For ma t 40 - Iden t if yin g a Cl a ss 41 - Cl a ss A Addr ess 42 - Cl a ss B Addr ess 43 - Cl a ss C Addr ess 44 - Cl a ss D Addr ess 45 - Cl a sses A–D Review 46 - Su bn et t in g 47 - Rea son s f or Su bn et t in g 48 - Su bn et t in g Exa mpl es (Cl a sses A, B, a n d C) 49 - Mor e Su bn et Exa mpl es 50 - Ph ysica l a n d Logica l Addr esses 51 - Su bn et Ma sk Templ a t e 52 - An Exa mpl e Con ver sion 53 - Let ’s Tr y On e 54 - Su bn et Bit s 55 - Su bn et Rest r ict ion s 56 - Su bn et Ma sk Decision s 57 - Assign in g Mor e Th a n On e Addr ess t o a n In t er f a ce 58 - Cl a ssf u l IP Addr ess Review 59 - IP Addr ess Rest r ict ion s 60 - Addr ess Al l oca t ion (Th e In t er n et Regist r y)

Part Two - The Protocol Suite of TCP/IP Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

61 - Addr ess Resol u t ion Pr ot ocol (ARP) 62 - ARP Pa cket For ma t 63 - ARP Oper a t ion 64 - Ru l es f or ARP 65 - Rever se Addr ess Resol u t ion Pr ot ocol (RARP) 66 - Pr oxy ARP 67 - Wh a t ’s Wr on g wit h t h e Addr ess? 68 - Ext en din g t h e Lif e of t h e IPv4 Addr ess Spa ce 69 - IP Addr ess Assign men t (Th e Ol d Met h od)

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

70 - IP Addr essin g (Th e Ol d Met h od) 71 - Addr ess Ter ms a n d Def in it ion s 72 - Ma kin g t h e Addr ess Ef f icien t 73 - Ma sks a n d Pr ef ixes 74 - An ot h er Tr y 75 - Va r ia bl e-Len gt h Su bn et Ma sks 76 - Lon gest Ma t ch Ru l e 77 - Exa mpl e On e: An ISP Addr ess Assign men t 78 - Exa mpl e Two: Rel a xin g t h e Assign men t 79 - Su per n et t in g Exposed 80 - Rou t e Aggr ega t ion 81 - Det er min in g a Common Pr ef ix 82 - An ot h er Look a t Rou t e Aggr ega t ion 83 - Cl a ssl ess In t er -Doma in Rou t in g (CIDR) 84 - Cl a ssl ess In t er -Doma in Rou t in g (con t in u ed) 85 - Pr ef ix Assign men t s 86 - A Look a t t h e Addr esses of a n ISP 87 - A Gr a ph ic Look a t t h e Exa mpl e 88 - CIDR a n d VLSM Compa r ison 89 - Specia l Su bn et Con sider a t ion s 90 - In t er n et Assign ed Nu mber s Au t h or it y 91 - Cu r r en t IANA Addr ess Bl ock Assign men t s 92 - IP Rou t in g 93 - Dir ect Rou t in g 94 - In dir ect Rou t in g 95 - A Fl owch a r t 96 - Rou t in g Pr ot ocol s - Dist a n ce Vect or 97 - Upda t in g Ot h er Rou t er s (Dist a n ce Vect or s) 98 - A Bigger Upda t e 99 - IP Rou t in g Ta bl es 100 - Th e Rou t in g In f or ma t ion Pr ot ocol (Ver sion 1) 101 - RIP Oper a t ion a l Types 102 - RIP Fiel d Descr ipt ion s 103 - Def a u l t Rou t er a n d Ga t ewa ys 104 - Disa dva n t a ges of t h e RIPv1 Pr ot ocol 105 - Sca l in g wit h RIP 106 - Rou t er s a n d Su bn et Ma sks 107 - RIP Fixes 108 - Spl it Hor iz on Demon st r a t ed 109 - RIP Ver sion 2 110 - Au t h en t ica t ion

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

111 - Su bn et Ma sk Fiel d 112 - Rou t e Ta g a n d Next -Hop Fiel ds 113 - Mu l t ica st Su ppor t 114 - RIPv2 Compa t ibil it y wit h RIPv1 115 - Open Sh or t est Pa t h Fir st (OSPF, RFC 2178) 116 - An OSPF Net wor k 117 - A Rou t in g Pr ot ocol Compa r ison 118 - OSPF Over view 119 - OSPF Media Su ppor t 120 - Rou t er Types 121 - Rou t er Na mes a n d Rou t in g Met h ods 122 - Messa ge Types 123 - Met r ics (Cost ) 124 - Gen er ic Pa cket For ma t 125 - Th e Hel l o Pr ot ocol 126 - Adja cen cy 127 - Ma in t a in in g t h e Da t a ba se 128 - OSPF Ar ea s 129 - Th e Ba ckbon e Ar ea 130 - Th e Ar ea Bor der Rou t er (ABR) 131 - Vir t u a l Lin k 132 - In t er -Ar ea Rou t in g 133 - In f or ma t ion f r om Ot h er Au t on omou s Syst ems 134 - St u b Ar ea s 135 - RFCs Rel a t ed t o OSPF 136 - St a t ic ver su s Dyn a mic Rou t in g 137 - Remot e Net wor ks 138 - Da t a gr a m Rou t in g

Part Three - Internet Protocol Version 6 (IPv6) Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

139 - In t r odu ct ion 140 - IPv6 Fea t u r es 141 - Fr om IPv4 t o IPv6 142 - IP Ver sion Nu mber s Accor din g t o RFC 1700 143 - IPv6 Hea der 144 - IPv4 Opt ion s - A Review 145 - IPv4 a n d IPv6 Hea der Dif f er en ces 146 - IPv6 Ext en sion Hea der s 147 - Fr a gmen t a t ion 148 - Pr ior it y a n d Fl ow La bel

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

149 - IPv6 Addr essin g 150 - IPv6 Addr essin g Pr ef ix 151 - 6Bon e Test Addr essin g 152 - Pr ovider -Ba sed IPv6 Addr essin g 153 - Loca l -Use IPv6 Addr essin g 154 - IPv6 Addr esses wit h Embedded IPv4 Addr esses 155 - Un ica st Addr esses 156 - Au t ocon f igu r a t ion 157 - Neigh bor Discover y 158 - Neigh bor Discover y Types 159 - Neigh bor Discover y a n d IPv4 160 - Addr ess Resol u t ion 161 - Met h ods of Depl oyin g IPv6 162 - IPv6 Tu n n el in g In t r odu ct ion 163 - IPv6 Tu n n el Addr essin g 164 - IPv6 a n d IPv4 Du a l -St a ck St r a t egy 165 - IPv6 Tu n n el in g 166 - IPv6 Tu n n el in g 167 - IPv6 Tu n n el in g Fl owch a r t 1 168 - IPv6 Tu n n el in g Fl owch a r t 2 169 - IPv6 Tu n n el in g Fl owch a r t 3 170 - An yca st Addr essin g 171 - Mu l t ica st in g f or IPv6 172 - IPv6 Rou t in g 173 - RIPn g 174 - ICMP 175 - ICMPv6 En ca psu l a t ion 176 - ICMPv6 a n d ICMPv4 177 - ICMPv6 Er r or Messa ges 178 - ICMP In f or ma t ion a l Messa ges 179 - ICMP a n d Neigh bor Discover y 180 - ICMPv6 a n d Mu l t ica st 181 - IPv6 Ca ch e En t r ies 182 - IPv6 Al gor it h m 183 - RFCs Rel a t ed t o IPv6

Part Four - Beyond the IP Layer Ch a pt er 184 - In t er n et Con t r ol Messa ge Pr ot ocol (ICMP) Ch a pt er 185 - ICMP PING Ch a pt er 186 - Mor e ICMP Fu n ct ion s

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

187 - User Da t a gr a m Pr ot ocol (UDP) 188 - Mu l t ipl exin g a n d Demu l t ipl exin g 189 - Por t Nu mber s 190 - Assign ed, Regist er ed, a n d Dyn a mic Por t Nu mber s 191 - Dyn a mic Por t Nu mber s 192 - Tr a n smission Con t r ol Pr ot ocol (TCP) 193 - TCP Det a il s 194 - TCP Fiel ds 195 - TCP Ser vices 196 - TCP Con n ect ion Est a bl ish men t 197 - Th e Th r ee-Wa y Ha n dsh a ke 198 - TCP Segmen t 199 - Sequ en ce Nu mber s a n d Ackn owl edgmen t s 200 - Sequ en ce a n d Ackn owl edgmen t Exa mpl e 201 - TCP Fl ow a n d Win dow Ma n a gemen t 202 - TCP Ret r a n smission 203 - Sl ow St a r t a n d Con gest ion Avoida n ce 204 - Ter min a t ion 205 - Rea l -Time Pr ot ocol a n d t h e Rea l -Time Con t r ol Pr ot ocol 206 - Tr a n sl a t or s 207 - Mixer s 208 - RTP Messa ge For ma t 209 - Su ppor t f or Time-Sen sit ive Apps 210 - Pa yl oa d Type 211 - Pr ovidin g Con t r ol f or RTP 212 - Sen der Repor t s 213 - Receiver Repor t s 214 - Sou r ce Descr ipt ion Pa cket 215 - Bye Messa ge (Pa cket ) 216 - Appl ica t ion -Specif ic Messa ge 217 - Ca vea t s 218 - RFCs 219 - Sel ect ed TCP/IP Appl ica t ion s 220 - TELNET 221 - TELNET Opt ion s 222 - Fil e Tr a n sf er Pr ot ocol (FTP) 223 - FTP Comma n ds 224 - FTP Da t a Tr a n sf er 225 - Tr ivia l Fil e Tr a n sf er Pr ogr a m (TFTP) 226 - Doma in Na me Ser vice (DNS) 227 - DNS St r u ct u r e

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

228 - DNS Compon en t s 229 - Doma in St r u ct u r e 230 - Na me Ser ver s 231 - Qu er y Fu n ct ion Types 232 - Exa mpl e DNS Da t a ba se 233 - SOA Recor d 234 - Na me Ser ver Recor ds 235 - Addr ess Recor ds 236 - Ma il Exch a n ge Recor ds (MX) 237 - Pl a yin g wit h t h e Da t a ba se 238 - WHOIS Comma n d 239 - Mor e DNS In f or ma t ion 240 - Simpl e Ma il Tr a n sf er Pr ot ocol (SMTP) 241 - SMTP Fu n ct ion s 242 - SMTP Fl ow 243 - DNS In t er a ct ion f or Ma il 244 - Post Of f ice Pr ot ocol (POP) 245 - POP Oper a t ion 246 - SMTP, DNS, a n d POP Topol ogy

Part Five - IP Multicast Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

247 - In t r odu ct ion 248 - Mu l t ica st Compon en t s 249 - Mu l t ica st Ca vea t s 250 - Un ica st (ver su s Mu l t ica st ) 251 - Mu l t ica st (ver su s Un ica st ) 252 - Mu l t ica st in g Type 253 - Addr essin g Type Review 254 - In t r odu ct ion t o IP Mu l t ica st 255 - Ext en sion s t o t h e IP Ser vice In t er f a ce 256 - Receivin g Mu l t ica st Da t a gr a ms 257 - Addr ess For ma t 258 - Ma ppin g t o a n Et h er n et or IEEE 802.X MAC Addr ess 259 - A Con ver t ed IP Mu l t ica st Addr ess 260 - Pr ot ocol s 261 - IGMP Hea der 262 - Rou t er Fu n ct ion s of IGMP 263 - Host Join 264 - Mu l t ica st Al gor it h ms 265 - Lea ves, Br a n ch es, a n d t h e Root

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

266 - Spa n n in g Tr ee a n d Fl oodin g 267 - Rever se Pa t h For wa r din g (RPF) 268 - Pr u n in g a n d Gr a f t in g (Def in it ion ) 269 - Rever se Pa t h Mu l t ica st in g (RPM) 270 - Cor e-Ba sed Tr ee (CBT) 271 - Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol (DVMRP) 272 - DVMRP a n d IGMP 273 - Neigh bor Discover y 274 - Rou t e Repor t s 275 - Receivin g a Rou t e Repor t 276 - DVMRP Ta bl es 277 - DVMRP Rou t e Ta bl es 278 - DVMRP Tu n n el in g 279 - IP-in -IP Pa cket For ma t 280 - Pr ot ocol -In depen den t Mu l t ica st (PIM) 281 - PIM - Den se Mode (PIM-DM) 282 - PIM - Den se Mode Oper a t ion 283 - Addin g In t er f a ces 284 - PIM - Spa r se Mode (PIM-SM) 285 - Types of Mu l t ica st Tr ees Usin g PIM-SM 286 - Join in g a Gr ou p 287 - A Host Sen din g t o a Gr ou p 288 - Con ver t in g t o a Sou r ce-Root ed Tr ee 289 - Ren dez vou s Poin t s 290 - Compa r ison of Spa r se- a n d Den se-Mode Pr ot ocol s 291 - Mu l t ica st Open Sh or t est Pa t h Fir st (MOSPF) 292 - MOSPF Dif f er en ces 293 - MOSPF Ca vea t s 294 - Loca l -Gr ou p Da t a ba se a n d t h e Gr ou p-Member sh ip LSA 295 - Rol e of t h e DR a n d t h e BDR 296 - Th e Loca l -Gr ou p Da t a ba se 297 - Oper a t ion 298 - For wa r din g Ca ch e 299 - In t er -Ar ea MOSPF Rou t in g 300 - In t er -Ar ea Mu l t ica st Exa mpl e 301 - In t er -Ar ea Sh or t est -Pa t h Tr ee 302 - In t er -Au t on omou s Syst em Mu l t ica st 303 - Mu l t ica st Con cl u sion 304 - RFCs t o Be Reviewed

Part Six - BOOTP, DHCP, RSVP, and SNMP

Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er Ch a pt er

305 - Boot Pr ot ocol (BOOTP) 306 - BOOTP Oper a t ion 307 - BOOTP Fiel d Def in it ion s 308 - Cl ien t Side (BOOTREQUEST) 309 - Ser ver Side 310 - Ch icken -or -t h e-Egg? Dil emma 311 - BOOTP Rel a y Agen t s (or BOOTP Ga t ewa y) 312 - Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP) 313 - DHCP 314 - IP Addr ess Al l oca t ion 315 - DHCP Messa ges 316 - DHCP Oper a t ion 317 - DHCP Respon ses 318 - Rel ea sin g a n IP Addr ess 319 - DHCP Sh or t cu t s 320 - Lea se Du r a t ion 321 - Ef f icien cies 322 - Oper a t ion a l Ta bl es 323 - RFCs t o Be Reviewed 324 - Resou r ce Reser va t ion Pr ot ocol (RSVP) 325 - Al t er n a t ives 326 - Wh er e It Wil l Be Used 327 - Oper a t ion 328 - Pa t h Messa ges 329 - RSVP a n d Rou t er s 330 - RSVP Requ est s 331 - Reser va t ion St yl e 332 - RSVP Con t r ol 333 - Disa bl in g a Reser va t ion 334 - Ha n dl in g Er r or s 335 - Mer gin g Fl owspecs 336 - A Simpl e Exa mpl e 337 - Issu es 338 - RSVP Su mma r y 339 - Con cl u sion 340 - Simpl e Net wor k Ma n a gemen t Pr ot ocol (SNMP) 341 - SNMP El emen t s 342 - SNMP Ma n a ger 343 - Agen t 344 - Ma n a gemen t In f or ma t ion Ba se (MIB) 345 - Exa mpl e MIB En t r y

Ch a pt er 346 - Th e Pr ot ocol of SNMP Ch a pt er 347 - SNMP En ca psu l a t ion Index

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Acknowledgments Two peopl e ma de t h is book possibl e, Ma r ga r et

Hen dr ey a n d Ma r jor ie Spen cer . I pr ovided t h e in f or ma t ion , bu t it wa s t h e con t in u ou s wor k of t h ese t wo t h a t pr odu ced t h is book. Th e a mou n t of wor k it t a kes t o pu t somet h in g l ike t h is t oget h er cover s a l on g t ime a n d wit h ou t t h ese in dividu a l s’ a ssist a n ce, t h is book wou l d n ot h a ve been t h e sa me.

How to Use This Book Wit h t h e a mou n t

of in f or ma t ion we a r e f or ced t o con su me ever yda y, it wou l d be n ice t o simpl y skim over a f ew sen t en ces in a pa r a gr a ph t o get t h e key poin t s of t h e t opic. Th a t is wh a t t h e Il l u st r a t ed Net wor k books a r e a bou t . Ea ch pa ge h a s a gr a ph ic a n d con cise t ext t h a t ma kes key poin t s qu ick t o l ea r n a n d r eview. Like a l l books in t h e Il l u st r a t ed Net wor k ser ies, t h is on e is ver y det a il ed, yet it is wr it t en in wa y t h a t ma kes it ea sy t o compr eh en d. Eigh t y per cen t of wh a t is common l y wr it t en a bou t is f il l er in f or ma t ion . Wh a t t h is book does is ext r a ct t h e t wen t y per cen t of t h e r equ ir ed in f or ma t ion a n d pl a ces t h is in f or ma t ion in a n ea sy t o u se f or ma t . A simil a r f or ma t is u sed qu it e of t en wit h t r a in in g ma t er ia l . As we a l l kn ow, t r a in in g mu st be don e is a ver y st r u ct u r ed a n d con cise f a sh ion a n d it mu st be del iver ed wit h in a l imit ed win dow of t ime. I h a ve t a ken t h is qu ick l ea r n in g con cept f u r t h er by u sin g a combin a t ion of a t ext book a n d a t r a in in g ma n u a l —pr odu cin g t h e f or ma t of t h is book. Th is book is bu il t specif ica l l y t o be u sed a s bot h a r ef er en ce ma n u a l a n d a t ext book. Th er e is n o r ea son t o r ea d it f r om cover t o cover . A t opic ca n simpl y be t u r n ed t o a n d qu ickl y l ea r n ed wit h ou t h a vin g t o r ea d t h e wh ol e book. Th e ba ck of t h e book con t a in s a CD. Th e gr a ph ics con t a in in g a l l t h e key poin t s of t h e l esson s a r e pr ovided on t h is CD. You ca n u se t h e gr a ph ics t o cr ea t e a cu st omiz ed t r a in in g sl ide sh ow, or u se t h em in a cl a ssr oom set t in g in con ju n ct ion wit h t h e book. Th e f il es a r e in a Micr osof t Power Poin t pr esen t a t ion . Th e ver sion of Power Poin t u sed is Power Poin t 97. Simpl y st a r t you r Power Poin t a ppl ica t ion a n d open on e of t h e f il es on t h e CD cor r espon din g t o t h e in f or ma t ion in t h e book.

This book is dedicated to a good friend of mine, for whom I continue to have great admiration. His tireless instruction of limitless boundaries will forever be remembered. His thoughts and ideas were given to me years ago, but I continue to use them successfully everyday. This book is dedicated to John J. (JJ) Anderson.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Part One Introduction to the TCP/IP Protocol Chapter 1 Transmission Control Protocol/Internet Protocol Th e TCP/IP pr ot ocol

su it e is bein g u sed f or commu n ica t ion s, wh et h er f or voice, video, or da t a . Th er e is a n ew ser vice bein g br ou gh t ou t f or voice over IP a t a con su mer cost of 5.5 cen t s per min u t e. Ra dio br oa dca st s a r e a l l over t h e Web. Video is comin g, bu t t h e ima ges a r e st il l sh a ky a n d mu st be bu f f er ed h ea vil y bef or e displ a yin g on t h e mon it or . However , give it t ime. Al l gr ea t t h in gs a r e r ef in ed by t ime, a n d a ppl ica t ion s over TCP/IP a r e n o except ion . Toda y, you wil l n ot f in d t oo ma n y da t a commu n ica t ion s in st a l l men t s t h a t h a ve n ot impl emen t ed or h a ve n ot t h ou gh t a bou t t h e TCP/IP pr ot ocol . TCP/IP is becomin g so common t h a t it is n ot so mu ch a ma t t er of sel ect in g t h e TCP/IP pr ot ocol st a ck a s it is sel ect in g a ppl ica t ion s t h a t su ppor t it . Ma n y u ser s do n ot even kn ow t h ey a r e u sin g t h e TCP/IP pr ot ocol . Al l t h ey kn ow is t h a t t h ey h a ve a con n ect ion t o t h e Web, wh ich ma n y peopl e con f u se wit h t h e In t er n et . We’l l get in t o t h e det a il s of t h e dif f er en ces l a t er , bu t f or n ow, you ju st n eed t o u n der st a n d t h a t t h e Web is a n application of t h e In t er n et . Th e Web u ses t h e commu n ica t ion s f a cil it ies of t h e In t er n et t o pr ovide f or da t a f l ow bet ween cl ien t s a n d ser ver s. Th e In t er n et is n ot t h e Web a n d t h e Web is n ot t h e In t er n et . In t h e 1970s, ever yon e h a d some t ype of WANG ma ch in e in t h eir of f ice. In t h e 1980s a n d ea r l y 1990s, Novel l ’s Net Wa r e a ppl ica t ion s con su med ever y of f ice. Toda y, Net Wa r e con t in u es t o domin a t e t h e n et wor k a r en a wit h it s in st a l l ed ba sed of cl ien t /ser ver n et wor k a ppl ica t ion s. However , t h e TCP/IP pr ot ocol a n d In t er n et br owser s, su ch a s Net Sca pe’s Na viga t or a n d Micr osof t ’s In t er n et Expl or er , a n d Web pr ogr a mmin g l a n gu a ges a r e combin in g t o pr odu ce power f u l cor por a t e n et wor ks kn own a s intranets, wh ich mimic t h e f a cil it ies of t h e In t er n et bu t on a cor por a t e sca l e. In t r a n et s f r om dif f er en t compa n ies or simpl y dif f er en t sit es ca n commu n ica t e wit h ea ch ot h er t h r ou gh

t h e In t er n et . Con su mer s ca n a ccess cor por a t e in t r a n et s t h r ou gh a n extranet, wh ich is simpl y pa r t of t h e cor por a t e in t r a n et t h a t is a va il a bl e t o t h e pu bl ic. A gr ea t exa mpl e of t h is is el ect r on ic commer ce, wh ich is wh a t you u se wh en you pu r ch a se somet h in g via t h e In t er n et . Dir ect or y ser vices a r e pr ovided t h r ou gh Doma in Na me Ser vices (DNSs) Micr osyst ems. Fil e a n d pr in t ser vices a r e pr ovided in ma n y dif f er en t wa ys. Fin a l l y, t h e u l t ima t e in f u l l con n ect ivit y is t h e In t er n et , wh ich a l l ows t h e cor por a t e in t r a n et s t o in t er con n ect (wit h in t h e sa me cor por a t ion or dif f er en t cor por a t ion s), pr ovidin g gl oba l con n ect ivit y u n ma t ch ed by a n y n et wor k a ppl ica t ion t oda y. Th er ef or e, wit h in a sh or t t ime (possibl y 1998), ver y power f u l a ppl ica t ion s wil l be bu il t t h a t u t il iz e t h e TCP/IP sof t wa r e su it e t h a t wil l even t u a l l y r iva l Net Wa r e a t t h e cor e. Tr ansmissio n Co nt r o l Pr o t o c o l /Int e r ne t Pr o t o c o l • Th e pr ot ocol su it e of TCP/IP is becomin g t h e wor l d’s most widel y impl emen t ed n et wor k pr ot ocol . • 1970s—WANG • 1980s—SNA / Novel l Net Wa r e • 1990s—Novel l a n d TCP/IP • TCP/IP combin ed wit h t h e Web br owser is cr ea t in g a n ew t ype of cl ien t /ser ver n et wor k oper a t in g syst em.

Int r o duc t io n (c o nt inue d) • TCP/IP is por t a bl e. • Ru n s on dif f er en t compu t er oper a t in g syst ems • Addr essin g is h a n dl ed on a gl oba l a ssign men t • Novel l is su ppor t in g TCP/IP. • Na t ive TCP/IP su ppor t • In t r a Net Wa r e — (n a t ive su ppor t wit h r el ea se 5.0) • Micr osof t is su ppor t in g TCP/IP. • Na t ive • Cl ien t /ser ver su ppor t wit h NT

An ot h er

key f a ct or of TCP/IP is extensibility. How ma n y peopl e ca n you n a me t h a t u se Net Wa r e ou t of t h eir h ou se t o a l l ow f or cor por a t e con n ect ivit y or f or commer cia l con n ect ivit y? Yes, pr ogr a ms su ch a s r emot e n ode a n d r emot e con t r ol a l l ow f or Net Wa r e cl ien t s t o be a ccessed r emot el y, bu t n ot a s sea ml essl y a s wit h TCP/IP. TCP/IP a l l ows you t o move you r wor kst a t ion t o a n y pa r t of t h e n et wor k, in cl u din g dia l in g in f r om a n y pa r t of t h e wor l d, a n d ga in a ccess t o you r n et wor k or a n ot h er n et wor k. Th is

br in gs u p a n ot h er poin t : How ma n y n et wor ks in t er a ct u sin g Net Wa r e? Th eor et ica l l y, wit h TCP/IP you ca n a ccess (excl u din g secu r it y mech a n isms f or n ow) a n y ot h er TCP/IP n et wor k in t h e wor l d f r om a n y poin t in t h e wor l d. Addr essin g in TCP/IP is h a n dl ed on a gl oba l sca l e t o en su r e u n iqu en ess. Novel l a t t empt ed gl oba l a ddr essin g bu t f a il ed. Novel l a ddr esses a r e u n iqu e t o ea ch pr iva t e in st a l l a t ion , su ch a s a sin gl e compa n y, bu t a r e pr oba bl y ma ssivel y du pl ica t ed wh en t a ken a s a wh ol e (a l l in st a l l a t ion s). I kn ow ma n y in st a l l a t ion s wit h t h e Novel l a ddr ess of 1A somewh er e in t h eir n et wor k. Not ever yon e is goin g t o r en u mber t h eir n et wor k f or u n iqu en ess, bu t on e t r ick is t o ma t ch t h e 32–bit a ddr ess of TCP/IP su bn et s t o you r Novel l n et wor k. Con ver t ea ch oct et of t h e 32–bit a ddr ess of TCP/IP in t o h ex a n d u se t h a t a s you r Net Wa r e a ddr ess. Novel l h a s en t er ed t h e TCP/IP f r a y wit h it s In t r a n et Wa r e a n d su ppor t f or n a t ive IP. In t r a Net Wa r e a l l ows Net Wa r e wor kst a t ion s t o a ccess TCP/IP r esou r ces. As of ver sion 5.0, In t r a Net Wa r e is goin g a wa y in n a me on l y a n d a n ot h er ver sion of Net Wa r e is su pposed t o a l l ow f or Net Wa r e t o r u n dir ect l y on t op of TCP/IP (t h is is kn own a s n a t ive TCP/IP su ppor t ). Micr osof t a n d it s emer gin g NT pl a t f or m ca n a l so u se TCP/IP a s a n et wor k pr ot ocol . Two f l a vor s a r e a va il a bl e: • Na t ive TCP/IP a n d it s a ppl ica t ion s (TELNET, FTP, et c.) • RFC compl ia n t (RFC 1001 a n d 1002) TCP, wh ich a l l ows f il e a n d pr in t ser vice Th is en a bl es t h e a bil it y t o t el n et f r om a n NT ser ver or wor kst a t ion a n d t r a n sf er f il es t o t h a t wor kst a t ion or ser ver u sin g n a t ive TCP/IP. For f il e a n d pr in t ser vices in a TCP/IP en vir on men t , NT ca n be con f igu r ed t o u se Net BIOS over TCP/IP. Th is en a bl es NT t o be in vol ved in a r ou t ed n et wor k. NT ca n r u n ma n y ot h er pr ot ocol s a s wel l , bu t t h a t is beyon d t h e scope of t h is book. Int r o duc t io n (c o nt inue d) • Novel l con t in u es t o domin a t e t h e cl ien t /ser ver en vir on men t . • Ma in f r a mes a r e con t in u a l l y u pgr a ded a n d bein g u sed mor e of t en . • Web in t er f a ces t o ma in f r a me da t a • Some ma in f r a me f u n ct ion s h a ve been con ver t ed t o Un ix pl a t f or ms • TCP/IP is a n ext en sibl e pr ot ocol

However , t h is does n ot

mea n t h a t t h e ot h er pr ot ocol s (beyon d TCP/IP) a r e bein g disba n ded. Novel l Net Wa r e con t in u es t o r u n wit h t h e IPX pr ot ocol . As of t h is wr it in g, Net Wa r e is st il l t h e best con st r u ct ed cl ien t ser ver pl a t f or m a va il a bl e. Ten s of t h ou sa n ds of pr ogr a ms h a ve been wr it t en dir ect l y t o t h e Net Wa r e in t er f a ce a n d it is u sed in cor por a t e n et wor ks, sch ool s, a n d st a t e, l oca l , a n d f eder a l gover n men t s. Th ese u ser s a r e n ot goin g t o discon n ect t h eir Net Wa r e n et wor ks a n d move t o TCP/IP over

n igh t . Net Wa r e wil l be a r ou n d f or a gr ea t l en gt h of t ime, a l beit in a dimin ish in g r ol e (st a r t t h e a r gu men t s!). Most For t u n e 1000 compa n ies st il l depen d on l a r ge ma in f r a mes f or t h eir da y–t o–da y pr ocessin g. Th e ea r l y 1990s a n d l a t e 1980s wer e in t er est in g t imes wh en ma n y cor por a t ion s wer e con vin ced t h a t sma l l er Un ix pl a t f or ms u sin g a dist r ibu t ed (cl ien t /ser ver ) a r ch it ect u r e cou l d r epl a ce t h eir “a n t iqu a t ed” SNA n et wor ks. Wr on g! Al t h ou gh some n et wor ks h a ve con ver t ed t o t h is a r ch it ect u r e, ma n y h a ve n ot . Th er e a r e ma n y f a ct or s in vol ved h er e. Time a n d mon ey pl a y a n impor t a n t r ol e, bu t t h e r u l e con t in u es t o be, “if it a in ’t br oke, don ’t f ix it .” Hu ge a ppl ica t ion s su ch a s t h e a ir l in e r eser va t ion syst em a n d t h e ba n kin g syst em a r e bu il t u sin g t h e SNA a r ch it ect u r e, a n d even if a per f ect sol u t ion is f ou n d, it wil l t a ke yea r s t o con ver t t h ese pr ogr a ms over t o a n ew syst em. SNA is st il l bein g u sed, a n d I h a ve even su ppor t ed some sit es t h a t h a ve r ever t ed ba ck t o SNA ma in f r a mes, wh ich wer e best su it ed t o t h eir pa r t icu l a r sit u a t ion . Toda y, t h er e a r e Web ser ver s t h a t f r on t IBM ma in f r a mes a s wel l . IBM f u l l y su ppor t s t h e TCP/IP pr ot ocol s a n d t h er e is a 3270 t er min a l emu l a t ion pr ogr a m kn own a s TN3270 t h a t a l l ows f or 3270 t er min a l emu l a t ion over t h e TCP/IP pr ot ocol . Al l of t h is is beyon d t h e scope of t h is book, bu t r emember , TCP/IP is ver y popu l a r ; h owever , pr ot ocol sch emes a r e st il l in exist en ce, st il l pr ovide ma n y ben ef it s, a n d wil l con t in u e t o be u sed f or yea r s t o come. Fr om t h is, on e wou l d t en d t o t h in k t h a t t h e TCP/IP pr ot ocol wa s devel oped by a l a r ge–sca l e R&D cen t er l ike t h a t of IBM or DEC. It wa sn ’t . It wa s devel oped by a t ea m of r esea r ch –t ype peopl e, compr ised of col l ege pr of essor s, gr a du a t e st u den t s, a n d u n der gr a du a t e st u den t s f r om ma jor u n iver sit ies. Th is sh ou l d n ot be h a r d t o bel ieve. Th ese in dividu a l s a r e t h e t ype wh o n ot on l y en joy R&D wor k, bu t a l so bel ieve t h a t , wh en pr obl ems occu r , t h e f u n st a r t s. Ma n y yea r s f r om n ow we wil l l ook ba ck on t h e TCP/IP pr ot ocol a s t h e pr ot ocol t h a t pr ovided t h e bu il din g bl ocks of f u t u r e da t a commu n ica t ion s. However , t a ke n ot ice: TCP/IP is a n ext en sibl e pr ot ocol . It is f u l l y f u n ct ion a l t oda y, bu t t h e wor k on t h e pr oject con t in u es. Th er e a r e over 75 wor kin g gr ou ps of t h e In t er n et En gin eer in g Ta sk For ce (IETF, expl a in ed in a momen t ), a n d a s n ew n eeds con t in u e t o a r ise f or t h e In t er n et , n ew wor kin g gr ou ps a r e f or med a n d n ew pr ot ocol s wil l emer ge. In f a ct , t h e IP ver sion of t h e exist in g pr ot ocol (kn own a s IPv4, or IP ver sion 4) wil l be r epl a ced. IP ver sion 6 (IPv6) is cu r r en t l y bein g impl emen t ed a r ou n d t h e In t er n et . It wil l be a f ew yea r s bef or e a compl et e swit ch over t a kes pl a ce, bu t it is a gr ea t exa mpl e of t h e ext en sibl e pr ot ocol .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 2 TCP/IP and Other Protocols Wh il e t h e ARPAn et

(a n d l a t er t h e In t er n et ) wa s bein g bu il t , ot h er pr ot ocol s su ch a s Syst em Net wor k Ar ch it ect u r e (SNA) a n d pr ot ocol s ba sed on XNS (t h er e a r e ma n y pr opr iet a r y ver sion s) pr eva il ed. Cl ien t /ser ver a ppl ica t ion s t h a t a l l owed f or f il e a n d pr in t ser vices on per son a l compu t er s wer e bu il t u sin g pr ot ocol s ba sed on XNS su ch a s Novel l Net Wa r e (u sin g IPX) a n d Ba n ya n VINES. SNA wa s a l ive a n d wel l in t h e ma in f r a me, a n d DECn et con t r ol l ed t h e min icompu t er ma r ket pl a ce. DEC a l so su ppor t ed LAT (Loca l Ar ea Tr a n spor t ) f or t er min a l ser ver s, wh ich su ppor t ed pr in t er s a s wel l . DECn et st a r t ed ou t bef or e commer cia l Et h er n et , a n d DEC’s min icompu t er s wer e con n ect ed t oget h er via l oca l in t er f a ces. La t er , a r ou n d 1982, DEC st a r t ed t o su ppor t Et h er n et bu t st il l wit h t h e DECn et pr ot ocol . TCP/IP and Ot he r Pr o t o c o l s • • • • •

ARPAn et bu il t a t t h e sa me t ime a s SNA a n d XNS n et wor ks. XNS su ppor t ed Novel l , Ba n ya n , a n d most ot h er n et wor kin g devices. WAN a ccess l imit ed t o X.25 a n d ven dor pr opr iet a r y sol u t ion s. DEC con t in u ed t o su ppor t DECn et /LAT. LAN media a s Et h er n et , Token Rin g, a n d FDDI.

Al l of t h ese pr ot ocol s cou l d r u n over Et h er n et , Token Rin g, or FDDI. In t h is r espect , t h ey did open l y su ppor t t h e LAN pr ot ocol . However , disr ega r din g t h e LAN pr ot ocol , t h ese pr ot ocol s wer e pr opr iet a r y; in ot h er wor ds, vendor dependent. However , ot h er pr ot ocol s beyon d TCP/IP a r e pr opr iet a r y, a n d t h e in t er n a l s of t h ose syst ems a r e kn own on l y t o t h eir r espect ive compa n y own er s. User s a n d n et wor k a dmin ist r a t or s wer e h el d t o pr opr iet a r y n et wor k en vir on men t s a n d pr opr iet a r y n et wor k a ppl ica t ion s, wh ich det er r ed n et wor k devel opmen t a n d en h a n cemen t in a l l cor por a t e en vir on men t s. Ju st beca u se a ven dor su ppor t ed XNS, did n ot mea n t h a t it wou l d in t er oper a t e wit h ot h er ven dor s r u n n in g XNS. Ru n n in g XNS on on e syst em did n ot gu a r a n t ee compa t ibil it y of

commu n ica t ion t o a n y ot h er syst em except f or t h e sa me ven dor ’s. Th is wa s good f or t h e ven dor , bu t it t en ded t o l ock u ser s in t o on e ven dor . Th e on l y pu bl ic Wide Ar ea Net wor k (WAN) a ccess wa s X.25, a n d n ot ever yon e su ppor t ed a l l f ea t u r es 100 per cen t , wh ich l ea d t o compa t ibil it y pr obl ems. Al l of u s r emember X.25 a s a sl ow (pr ima r il y 9.6 kbps or 19.2 kbps) WAN a ccess pr ot ocol . (Th is is n ot ba sh in g t h e X.25 pr ot ocol . Th er e wer e ma n y va l id r ea son s f or r u n n in g it a t t h e sl ower n et wor k speeds, l ike er r or cor r ect ion a n d con t r ol , a n d f a st er speeds su ch a s T1 wer e n ot a va il a bl e f or da t a con n ect ion t r a n sf er s.) Al t er n a t ivel y, l ea sed l in es ba sed on pr opr iet a r y pr ot ocol s of t h e n et wor k ven dor s wer e a n opt ion , bu t t h a t on l y a l l owed t h e cor por a t e n et wor ks t o be in t er con n ect ed. Et h er n et wa s a l so a va il a bl e, bu t h ost in t er f a ces a n d st a n da r diz ed n et wor k pr ot ocol s wer e n ot r ea dil y a va il a bl e. Th e In t er n et st a r t ed a s a r esea r ch f a cil it y a n d t o l in k t h e gover n men t t o t h e r esea r ch f a cil it ies a s wel l . It r ema in ed t h is wa y u n t il a bou t 1992. On l y a h a n df u l of peopl e kn ew a bou t t h e In t er n et , a n d t h e In t er n et h a d n ot h in g r ea l l y t o of f er t h e commer cia l wor l d. En gin eer s a n d scien t ist s l oved t h e In t er n et . No on e kn ew of t h e a dva n t a ges of t h e TCP/IP pr ot ocol . It wa s n ot u n t il t h e GUI in t er f a ce wa s devel oped t h a t t h e In t er n et t ook of f , a n d t h e TCP/IP pr ot ocol ca me wit h it . Th er ef or e ot h er pr ot ocol s su ch a s SNA a n d Novel l Net Wa r e spr ou t ed in cor por a t e Amer ica . Ba sica l l y, t h er e wa s n o ot h er ch oice.

On e of t h e bet t er

pr ot ocol s wa s Appl eTa l k. Mu ch l ike a Ma cin t osh compu t er , it wa s ver y cost l y t o impl emen t . Ser iou sl y, I h a ppen t o l ike t h e Appl eTa l k pr ot ocol . Appl eTa l k wa s a ct u a l l y t h e sof t wa r e a n d Loca l Ta l k wa s t h e h a r dwa r e. It wa s Appl e’s ver sion of n et wor kin g Ma c compu t er s, a n d, except f or t h e wir in g, it wa s f r ee. Th e pr ot ocol wa s simpl e t o in st a l l a n d u se. It wa s bu il t in t o ever y Ma c. Ca bl es wer e simpl y n eeded t o h ook u p Appl e compu t er s t o a simpl e n et wor k, a n d f il e a n d pr in t ser vices wer e bu il t in a s wel l . It wa s kn own a s t r u e peer –t o–peer , f or ea ch wor kst a t ion cou l d see ever y ot h er wor kst a t ion , a n d ea ch wor kst a t ion cou l d be a ser ver a n d sh a r e a n y of it s r esou r ces. Ea ch n ode r a n t h e n a me ser vice. Ea ch n ode picked it s own ph ysica l a ddr ess. Even dia l in g in t o a n Appl eTa l k n et wor k wa s ea sy u sin g t h e Appl eTa l k Remot e Access (ARA) pr ot ocol , a n d it ma de it l ook l ike you wer e a l oca l n ode on t h e Appl eTa l k n et wor k. It soon beca me a ver y popu l a r met h od of h ookin g t oget h er Ma c compu t er s in t o a n et wor k. However , Appl eTa l k wa s n ot en vision ed a s a pr ot ocol t o h a n dl e l a r ge in t er n et s of Appl e compu t er s, a n d t h e in ef f icien cies of t h e pr ot ocol soon a r ose. It wa s a bou t a s cl ose a s you cou l d come t o a n et wor k oper a t in g syst em t h a t a l l owed f or simpl icit y a n d in gen u it y. Appl eTa l k h a d on e pr obl em: sca l a bil it y. Tr y bu il din g a l a r ge Appl eTa l k n et wor k, n ot a n ea sy t a sk, if n ot impossibl e. TCP/IP el imin a t ed pr opr iet a r y n et wor k oper a t in g syst ems; h owever , n ot in t en t ion a l l y. Aga in , it wa s bu il t f or a dif f er en t pu r pose. TCP’s begin n in gs wer e r ou gh (in t er oper a bil it y issu es) a n d, in f a ct , TCP/IP wa s n ot t h e or igin a l pr ot ocol of t h e

ARPAn et . Bu t t h e pr ot ocol st a bil iz ed a n d t h e in t er oper a bil it y bet ween dif f er en t compu t er s a n d oper a t in g syst ems beca me a r ea l it y. For exa mpl e, a DEC syst em r u n n in g t h e VMS oper a t in g syst em combin ed wit h TCP/IP r u n n in g a s t h e n et wor k oper a t in g syst em ca n commu n ica t e wit h a Su n Micr osyst ems’ Un ix wor kst a t ion r u n n in g TCP/IP. Th e t wo syst ems ca n commu n ica t e by t a kin g a dva n t a ge of t h e pr ot ocol a n d t h e specif ic a ppl ica t ion s wr it t en f or t h e pr ot ocol , pr ima r il y by bein g a bl e t o l og on t o on e a n ot h er a n d t r a n sf er f il es bet ween t h e t wo a cr oss a n et wor k. Ot he r Pr o t o c o l s (c o nt inue d) • Appl eTa l k (sof t wa r e) a n d Loca l Ta l k (h a r dwa r e) wer e bu il t in t o ever y Ma c. • Ver y r obu st pr ot ocol bu t n ot sca l a bl e • Ea ch n ode h a d a n a min g ser vice • Net wor k IDs wer e dyn a mic (seed r ou t er ) • Node IDs wer e dyn a mic • Remot e a ccess wa s f u l l y in t egr a t ed a s a r emot e n ode • TCP/IP el imin a t ed t h e pr ol if er a t ion of pr opr iet a r y n et wor k oper a t in g syst ems. • An y h a r dwa r e a n d sof t wa r e pl a t f or m cou l d commu n ica t e • TCP/IP wa s compl et el y open t o a n y ven dor t o wr it e code t o. • TCP/IP is t h e pr ot ocol of ch oice f or f u t u r e n et wor k syst ems.

Wh en in t er con n ect in g compu t er s a n d t h eir oper a t in g syst ems wit h TCP/IP, it does n ot ma t t er wh a t t h e h a r dwa r e a r ch it ect u r e or t h e oper a t in g syst ems of t h e compu t er s a r e. Th e pr ot ocol wil l a l l ow a n y compu t er impl emen t in g it t o commu n ica t e wit h a n ot h er . Th e met h ods u sed t o a ccompl ish t h is a r e discu ssed in t h e f ol l owin g sect ion s. Su f f ice it t o sa y, t h e TCP/IP pr ot ocol is t h e pr ot ocol of ch oice f or f u t u r e n et wor k in st a l l a t ion s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 3 The Origins of TCP/IP The Or ig ins o f TCP/IP • A TCP/IP n et wor k is h et er ogen eou s. • Popu l a r it y du e t o: • Pr ot ocol su it e pa r t of t h e Ber kel ey Un ix oper a t in g syst em • Col l ege st u den t s wor ked wit h it a n d t h en t ook it t o cor por a t e Amer ica • In 1983, a l l gover n men t pr oposa l s r equ ir ed TCP/IP • Th e Web gr a ph ica l u ser in t er f a ce • TCP/IP h a s t h e in gen iou s a bil it y t o wor k on a n y oper a t in g pl a t f or m. • TCP/IP h a s ea sy r emot e a ccess ca pa bil it ies.

A TCP/IP n et wor k is gen er a l l y a h et er ogen eou s n et wor k, mea n in g t h er e a r e ma n y dif f er en t t ypes of n et wor k compu t in g devices a t t a ch ed. Th e su it e of pr ot ocol s t h a t en compa ss TCP/IP wer e or igin a l l y design ed t o a l l ow dif f er en t t ypes of compu t er syst ems t o commu n ica t e a s if t h ey wer e t h e sa me syst em. It wa s devel oped by a pr oject u n der wr it t en by a n a gen cy of t h e Depa r t men t of Def en se kn own a s t h e Adva n ced Resea r ch Pr oject s Agen cy (DARPA). Th er e a r e ma n y r ea son s wh y t h e ea r l y TCP/IP beca me popu l a r , t h r ee of wh ich a r e pa r a mou n t . Fir st , DARPA pr ovided a gr a n t t o a l l ow t h e pr ot ocol su it e t o become pa r t of Ber kel ey’s Un ix syst em. Wh en TCP/IP wa s in t r odu ced t o t h e commer cia l ma r ket pl a ce, Un ix wa s a l wa ys men t ion ed in ever y st or y a bou t it . Ber kel ey Un ix a n d TCP/IP beca me t h e st a n da r d oper a t in g syst em a n d pr ot ocol of ch oice f or ma n y ma jor u n iver sit ies, wh er e it wa s u sed wit h wor kst a t ion s in en gin eer in g a n d r esea r ch en vir on men t s. Secon d, in 1983, a l l U.S. gover n men t pr oposa l s t h a t in cl u ded n et wor ks ma n da t ed t h e TCP/IP pr ot ocol . (Th is wa s a l so t h e yea r t h a t t h e ARPAn et wa s con ver t ed t o t h e TCP/IP pr ot ocol . Con ver sion s in t h ose da ys h a ppen ed wit h in da ys. Th a t wa s wh en t h e In t er n et

wa s sma l l .) An d t h ir d, a gr a ph ica l u ser in t er f a ce wa s devel oped t o a l l ow ea sy a ccess wit h t h e syst em. TCP/IP or it s a ppl ica t ion s ca n be a dif f icu l t pr ot ocol t o u se if you h a ve n ot h a d exper ien ce wit h it . Fin din g in f or ma t ion on t h e In t er n et wa s a f or mida bl e t a sk. Bef or e t h e br owser , TCP/IP a ppl ica t ion s wer e a ccessed f r om a comma n d l in e in t er f a ce wit h a f ew ba sic a ppl ica t ion s t h a t a l l owed you t o ca l l a r emot e syst em a n d a ct a s a r emot e t er min a l , t r a n sf er f il es, a n d sen d a n d r eceive ma il . Some compa n ies of t h ese a ppl ica t ion s bu il t gr a ph ica l in t er f a ces t o t h e a ppl ica t ion s, bu t t h ey wer e st il l r ou gh a n d wou l d n ot h a ve ga in ed commer cia l su ccess. Th e br owser h id a l l t h e compl exit ies of t h e TCP/IP pr ot ocol a n d it s a ppl ica t ion s a n d a l l owed f or gr a ph ics t o a ppea r a s wel l a s t ext , a n d by cl ickin g on eit h er t h e gr a ph ics or t ext , we cou l d pl a ce ou r sel ves a n ywh er e on t h e In t er n et (wit h in secu r it y r ea son s!). It a l so a l l owed f or ea sier a ccess t o in f or ma t ion on t h e In t er n et . Ba sed on t h ose poin t s, it wa s n ot ver y l on g bef or e ever yon e kn ew of t h e ca pa bil it y of t h e pr ot ocol t o a l l ow dissimil a r syst ems t o commu n ica t e t h r ou gh t h e n et wor k—a l l t h is wit h ou t a f or kl if t u pgr a de t o ma in f r a mes, min is, a n d per son a l compu t er s. It simpl y bol t ed on t o exist in g compu t er devices. TCP/IP beca me a ver y popu l a r n et wor k oper a t in g syst em t h a t con t in u es t oda y.

TCP/IP or igin a t ed wh en DARPA wa s t a sked t o br in g a bou t

a sol u t ion t o a dif f icu l t pr obl em: a l l owin g dif f er en t compu t er s t o commu n ica t e wit h on e a n ot h er a s if t h ey wer e t h e sa me compu t er . Th is wa s dif f icu l t , con sider in g t h a t a l l compu t er a r ch it ect u r es in t h ose da ys (t h e ea r l y 1970s) wer e h igh l y gu a r ded secr et s. Compu t er ma n u f a ct u r er s wou l d n ot discl ose eit h er t h eir h a r dwa r e or sof t wa r e a r ch it ect u r es t o a n yon e. Th is is kn own a s a closed or proprietary syst em. Th e a r ch it ect u r e beh in d TCP/IP t a kes a n a l t er n a t ive a ppr oa ch . TCP/IP devel oped in t o a n a r ch it ect u r e t h a t wou l d a l l ow t h e compu t er s t o commu n ica t e wit h ou t gr ossl y modif yin g t h e oper a t in g syst em or t h e h a r dwa r e a r ch it ect u r e of t h e ma ch in e. TCP/IP r u n s a s a n a ppl ica t ion on t h ose syst ems. However , bef or e TCP/IP, t h e or igin a l r esu l t wa s kn own a s t h e Net wor k Con t r ol Pr ogr a m (NCP). Th e pr ot ocol wa s devel oped t o r u n on mu l t ipl e h ost s in geogr a ph ica l l y disper sed a r ea s t h r ou gh a pa cket swit ch in g in t er n et kn own a s t h e Adva n ced Resea r ch Pr oject Agen cy n et wor k—ARPAn et . Th is pr ot ocol wa s pr ima r il y u sed t o su ppor t a ppl ica t ion –or ien t ed f u n ct ion s a n d pr ocess–t o–pr ocess commu n ica t ion s bet ween t wo h ost s. Specif ic a ppl ica t ion s, su ch a s f il e t r a n sf er , wer e wr it t en t o t h is n et wor k oper a t in g syst em. Th e ARPAn et wa s t a ken down in 1993. Th e In t er n et t h a t we r u n t oda y wa s bu il t du r in g t h e ARPAn et t ime, bu t a s a pa r a l l el n et wor k. In or der t o per pet u a t e t h e t a sk of a l l owin g dissimil a r gover n men t compu t er s t o commu n ica t e, DARPA ga ve r esea r ch gr a n t s t o t h e Un iver sit y of Ca l if or n ia a t Los An gel es (UCLA), t h e Un iver sit y of Ca l if or n ia a t Sa n Ber n a din o (UCSB), t h e St a n f or d

Resea r ch In st it u t e (SRI), a n d t h e Un iver sit y of Ut a h . A compa n y ca l l ed BBN pr ovided t h e Hon eywel l 316 In t er f a ce Messa ge Pr ocessor s (IMPs, wh ich h a ve evol ved in t o t oda y’s r ou t er s), wh ich pr ovided t h e in t er n et commu n ica t ion s l in ks. In 1971, t h e ARPAn et Net wor kin g Gr ou p dissol ved, a n d DARPA t ook over a l l t h e r esea r ch wor k. Th e f ir st f ew yea r s of t h is design pr oved t o be a n ef f ect ive t est , bu t h a d some ser iou s design f l a ws, so a r esea r ch pr oject wa s devel oped t o over come t h ese pr obl ems. Th e ou t come of t h is pr oject wa s a r ecommen da t ion t o r epl a ce t h e or igin a l pr ogr a m kn own a s NCP wit h a n ot h er ca l l ed Tr a n smission Con t r ol Pr ogr a m (TCP). Bet ween t h e yea r s of 1975–1979, DARPA h a d begu n t h e wor k on t h e In t er n et t ech n ol ogy, wh ich r esu l t ed in t h e TCP/IP pr ot ocol s a s we kn ow t h em t oda y. Th e pr ot ocol r espon sibl e f or r ou t in g t h e pa cket s t h r ou gh a n in t er n et wa s t er med t h e Internet Protocol. Toda y, t h e common t er m f or t h is st a n da r d is TCP/IP.

Or igin s (con t in u ed) Wit h TCP/IP r epl a cin g NCP, t h e NCP a ppl ica t ion –specif ic pr ogr a ms wer e con ver t ed t o r u n over t h e n ew pr ot ocol . Th e pr ot ocol beca me ma n da t ed in 1983, wh en ARPA dema n ded t h a t a l l compu t er s a t t a ch ed t o t h e ARPAn et u se t h e TCP/IP pr ot ocol .

In 1983, t h e ARPAn et

wa s spl it in t o t wo n et wor ks: t h e Def en se Da t a Net wor k (DDN), a l so kn own a s t h e MILNET (mil it a r y n et wor k), a n d t h e DARPA In t er n et , a n ew n a me f or t h e ol d ARPAn et n et wor k.

Ou t side of t h e ARPAn et , ma n y n et wor ks wer e bein g f or med, su ch a s CSNET (Compu t er Scien ce Net wor k); BITNET (Beca u se It ’s Time Net wor k) u sed bet ween IBM syst ems; UUCP (User t o User Copy), wh ich beca me t h e pr ot ocol u sed on USENET (a n et wor k u sed f or dist r ibu t in g n ews); a n d ma n y ot h er s. Al l of t h ese n et wor ks wer e ba sed on t h e TCP/IP pr ot ocol , a n d a l l wer e in t er con n ect ed u sin g t h e ARPAn et a s a ba ckbon e. Ma n y ot h er a dva n ces wer e a l so t a kin g pl a ce wit h Loca l Ar ea Net wor ks u sin g Et h er n et , a n d compa n ies bega n ma kin g equ ipmen t t h a t en a bl ed a n y h ost or t er min a l t o a t t a ch t o t h e Et h er n et . Th e or igin a l r ou t e messen ger s, kn own a s IMPs (In t er f a ce Messa ge Pr ocessor s), wer e n ow bein g ma de commer cia l l y a n d wer e ca l l ed routers. Th ese r ou t er s wer e sma l l er , ch ea per , a n d f a st er t h a n t h e ARPAn et ’s IMPs, a n d t h ey wer e mor e ea sil y ma in t a in ed. Wit h t h ese devices, r egion a l n et wor ks wer e bu il t a n d cou l d n ow h ook u p t o t h e In t er n et . However , commer cia l a ccess t o t h e In t er n et wa s st il l ver y l imit ed.

Or ig ins (c o nt inue d) • In 1983, ARPAn et wa s spl it in t o t wo n et wor ks. • Def en se Da t a Net wor k (DDN) or MILNET • Th e DARPA In t er n et —n ew n a me f or t h e ARPAn et • In 1985, NSFn et wa s est a bl ish ed t o a l l ow f ive su per compu t er sit es t o be a ccessed by scien t ist s. • Ou t side t h e ARPAn et , ma n y “r egion a l ” n et wor ks ba sed on TCP/IP wer e bu il t . • CSNET (Compu t er Scien ce Net wor k) • BITNET (Beca u se It ’s Time Net wor k, IBM) • UUCP (User t o User Copy), wh ich beca me USEn et • Al l wer e con n ect ed via t h e ARPAn et ba ckbon e. • Or igin a l r ou t er s wer e ca l l ed In t er f a ce Messa ge Pr ocessor s (IMPs).

On e exper imen t t h a t wa s su ccessf u l , CSNET (compu t er scien ce n et wor k), pr ovided t h e f ou n da t ion f or t h e NSF t o bu il d a n ot h er n et wor k t h a t in t er con n ect ed f ive su per compu t er sit es. Th e f ive sit es wer e in t er con n ect ed via 56–kbps l in es. Th is wa s kn own a s NSFn et . However , t h e NSF a l so st a t ed t h a t if a n a ca demic in st it u t ion bu il t a commu n it y n et wor k, t h e NSF wou l d give it a ccess t o t h e NSFn et . Th is wou l d a l l ow bot h r egion a l a ccess t o t h e NSFn et a n d t h e r egion a l n et wor ks (ba sed on t h e TCP/IP pr ot ocol ) t o commu n ica t e wit h on e a n ot h er . Th e NSFn et wa s f or ma l l y est a bl ish ed in 1986. It bu il t a l a r ge ba ckbon e n et wor k u sin g 56–kbps l in ks, wh ich wer e l a t er u pgr a ded t o T1 l in ks (Ju l y 1988). An yon e wh o cou l d est a bl ish a ph ysica l l in k t o t h e NSFn et ba ckbon e cou l d ga in a ccess t o it . In 1990, t h e NSFn et wa s u pgr a ded t o 45–Mbps l in ks. On ce t h e wor d of NSFn et spr ea d, ma n y r egion a l n et wor ks spr a n g u p, su ch a s NYSERn et (New Yor k St a t e Edu ca t ion a l Resea r ch Net wor k), CERFn et (n a med f or Ca l if or n ia Edu ca t ion a l Resea r ch Net wor k a n d n ot Vin t Cer f ), a n d ot h er s. Th e r egion a l n et wor ks wer e su ppor t ed a t t h eir l evel a n d n ot by t h e NSF.

Th e NSFn et

wa s f ou n d t o be ver y u sef u l beyon d it s con cept ion of l in kin g su per compu t er s t o a ca demic in st it u t ion s. In 1987, NSF a wa r ded a con t r a ct t o MERIT Net wor k (a l on g wit h IBM a n d MCI) t o u pgr a de t h e NSFn et t o T1 a n d t o l in k six r egion a l n et wor ks, t h e exist in g f ive su per compu t er cen t er s, MERIT, a n d t h e Na t ion a l Cen t er f or At mosph er ic Resea r ch in t o on e ba ckbon e. Th is wa s compl et ed in Ju l y 1988. In 1989, a n on pr of it or ga n iz a t ion kn own a s ANS (Adva n ced Net wor k a n d Ser vices, In c.) wa s spu n of f f r om t h e MERIT t ea m. It s goa l wa s t o u pgr a de t h e NSFn et t o a 45–Mbps ba ckbon e a n d l in k t oget h er 16 r egion a l sit es. Th is wa s compl et ed in November 1991. Mor e commer cia l en t it ies wer e spr in gin g u p bu il din g r egion a l n et wor ks via TCP/IP a s wel l . To a l l ow t h ese en t it ies a ccess t o t h e ba ckbon e, a con cept kn own a s t h e Commer cia l In t er n et eXch a n ge (CIX) wa s bu il t . Th is wa s a poin t on t h e ba ckbon e t h a t a l l owed commer cia l r egion a l n et wor ks a ccess t o t h e a ca demic NSFn et ba ckbon e.

Th e or igin a l ARPAn et wa s expen sive t o r u n a n d in t er est in side DARPA bega n t o wa n e. Ma jor pr omot er s of t h e ARPAn et h a d l ef t DARPA t o t a ke posit ion s el sewh er e. It wa s t a ken compl et el y ou t of ser vice in 1989, a n d wh a t emer ged in it s pl a ce is wh a t we kn ow a s t h e In t er n et . Th e t er m Internet wa s coin ed a s a n a bbr evia t ion t o t h e In t er n et Pr ot ocol (IP). Or ig ins (c o nt inue d) • Th e or igin a l ARPAn et wa s t a ken ou t of ser vice in 1989. • In t er n et ba ckbon e su ppor t ed by NSFn et u sin g 56–kbps l in es. • NSFn et u pgr a ded t o 45–Mbps ba ckbon e. • In 1993, NSF gr a n t ed ou t t h e oper a t ion of t h e ba ckbon e t o va r iou s compa n ies t o con t in u e r u n n in g it . • Most oper a t ion s of t h e In t er n et a r e r u n by pr iva t e compa n ies a n d n ot t h e gover n men t .

Th e NSFn et wa s ba sica l l y a mir r or ima ge of t h e ARPAn et , a n d t h ey wer e r u n n in g in pa r a l l el . Region a l n et wor ks ba sed on t h e TCP/IP pr ot ocol wer e in t er con n ect ed via NSFn et , wh ich h a d con n ect ion s t o t h e ARPAn et . Mor e con n ect ion s wer e bein g ma de t h r ou gh NSFn et beca u se it wa s h igh er speed, ea sier t o h ook in t o, a n d l ess expen sive. It wa s det er min ed t h a t t h e or igin a l n et wor k, t h e ARPAn et , sh ou l d be sh u t down . Sit es on t h e ARPAn et f ou n d n ew h omes wit h in t h e r egion a l n et wor ks or a s r egion a l n et wor ks. NSFn et pr ovided t h e ba ckbon e f or in t er con n ect ion of t h ese r egion a l n et wor ks. Or ig ins (c o nt inue d) • Toda y, a n y compa n y ca n bu il d a ba ckbon e ba sed on TCP/IP. • Con n ect ion s t o ot h er ba ckbon es a r e pr ovided t h r ou gh peer in g poin t s kn own a s Net wor k Access Poin t s (NAPs). • In t er n et Ser vice Pr ovider s a l l ow f or a n yon e t o con n ect t o t h e In t er n et t h r ou gh Poin t s of Pr esen ce (POPs). • Essen t ia l l y, a l oca t ion in a n y cit y t h a t ca n a ccept a ph on e ca l l f r om a u ser ’s modem. Th e l in e is t h en con n ect ed t o a n et wor k t h a t pr ovides a ccess t o t h e In t er n et . • Ru n n in g TCP/IP does n ot r equ ir e a ccess t o t h e In t er n et .

Wor d qu ickl y spr ea d a bou t

t h e In t er n et a n d a r ou n d 1993, a n d NSF decided it cou l d n ot con t in u e su ppor t in g t h e r a pid expa n sion dir ect l y a n d pr odu ced con t r a ct s f or ou t sou r cin g t h e con t in u a t ion of t h e In t er n et . Ma n y compa n ies r espon ded t o t h e ca l l ,

a n d t h e f u n ct ion a l r espon sibil it ies of r u n n in g t h e In t er n et wer e given t o ma n y dif f er en t compa n ies. In pl a ce of t h e NSFn et wou l d be a con cept ca l l ed Network Access Points, poin t s l oca t ed t h r ou gh ou t t h e Un it ed St a t es t h r ou gh wh ich compa n ies t h a t bu il t t h eir own ba ckbon es cou l d in t er con n ect a n d exch a n ge r ou t e pa t h s. Al so wit h t h is ca me t h e con cept of peering. NAPs pr ovided a ccess t o ot h er ba ckbon es, a n d by peer in g wit h a n ot h er ba ckbon e pr ovider , a pr ovider a l l owed t h eir ba ckbon e t o be u sed by a n ot h er pr ovider t o move t h eir cu st omer s’ t r a f f ic. Th er e wa s a l ot of con t r over sy wit h t h is con cept : Wh o sh ou l d a ba ckbon e pr ovider peer wit h or n ot peer wit h ? Wh y sh ou l d a pr ovider l et a n ot h er pr ovider u se it s ba ckbon e a s a t r a n sit f or it s cu st omer s f or f r ee? Th e a n swer : beca u se NSF st a t ed t h is a n d t h e issu e wa s t a bl ed. NAPs a r e ba sica l l y t h e h igh est poin t in t h e In t er n et . In t h is wa y, ma n y ba ckbon es wou l d be pr iva t el y bu il t , a n d a l l wou l d be in t er con n ect ed t h r ou gh t h e NAPs. In it ia l l y, t h er e wer e f ou r of f icia l NAPs, bu t t h is n u mber h a s gr own by a n a ddit ion a l 13 (wit h mor e bein g a dded) a s of t h is wr it in g. Even wit h t h e commer cia l iz a t ion of t h e In t er n et , n o on e compa n y own ed a n y pa r t of t h e In t er n et , a n d ever yon e a ssocia t ed wit h t h e In t er n et h a d t o a bide by t h e r u l es in pl a ce. Ext er n a l compa n ies simpl y pr ovided a specif ic ser vice r equ ir ed t o r u n t h e In t er n et . For exa mpl e, Net wor k Sol u t ion s, In c. wa s gr a n t ed t h e r igh t t o con t r ol t h e doma in n a me r egist r a t ion . However , it does n ot own t h is ca pa bil it y. Net wor k Sol u t ion s is st il l u n der t h e a u t h or it y of t h e In t er n et Assign ed Nu mber s Au t h or it y r u n by Jon Post el (a s of t h is wr it in g) a t t h e Un iver sit y of Sou t h er n Ca l if or n ia . AT&T wa s gr a n t ed t h e r igh t t o h ost ma n y docu men t da t a ba ses r equ ir ed by t h e In t er n et u ser commu n it y. Even t u a l l y, a l l t h e f u n ct ion s of r u n n in g t h e In t er n et wer e con t r a ct ed ou t by NSF. An y compa n y (wit h l ot s of mon ey) ca n bu il d a ba ckbon e. To pr ovide a ccess t o ot h er s, it s ba ckbon e mu st be con n ect ed t o ot h er s a t t h e NAP. In dividu a l ba ckbon e pr ovider s t h en in t er con n ect mu l t ipl e con n ect ion s kn own a s Poin t s of Pr esen ce, or POPs, wh ich a r e wh er e t h e in dividu a l u ser or bu sin ess con n ect s t o t h e In t er n et . In Apr il of 1995, t h e NSFn et ba ckbon e wa s sh u t down , a n d t h e In t er n et wa s u p a n d r u n n in g a s we kn ow it t oda y. On e l a st dist in ct ion of TCP/IP: Ru n n in g t h e pr ot ocol on a n y n et wor k does n ot r equ ir e a con n ect ion t o t h e In t er n et . TCP/IP ma y be in st a l l ed on a s f ew a s t wo n et wor k st a t ion s or on a s ma n y a s ca n be a ddr essed (possibl y mil l ion s). Wh en a n et wor k r equ ir es a ccess t o t h e In t er n et , t h e n et wor k a dmin ist r a t or mu st ca l l h is or h er l oca l r egist r y (or In t er n et Ser vice Pr ovider [ISP]) t o pl a ce a r equ est f or a ccess a n d be a ssign ed a n of f icia l IP a ddr ess.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 4 The World Wide Web Gr ea t

a ppl ica t ion pr ogr a ms a n d in t er commu n ica t ion h a ve been a va il a bl e on t h e In t er n et f or doz en s of yea r s, so wh y a l l t h e h ype sin ce 1994? Th e Web ca me t o u s in 1994 (commer cia l l y) a n d a l l owed f or ever yon e t o wor k on t h e In t er n et , even t h ou gh ma n y h a d n o idea wh a t t h ey wer e wor kin g on . Th e br owser beca me t h e in t er f a ce, a simpl e–t o–u se in t er f a ce, a n d t h is wa s t h e st a r t of t h e commer cia l iz a t ion of t h e Web. Th is is wh en “cor por a t e” mon ey beca me in vol ved. However , t h e idea st a r t ed ou t wa y ba ck in 1981 wit h a pr ogr a m ca l l ed En qu ir e, devel oped by Tim Ber n er s–Lee. A pr ogr a m kn own a s Mosa ic wa s r el ea sed in November 1993 a s f r eewa r e wr it t en by t h e cof ou n der of Net Sca pe, Ma r c An dr eeson , a t t h e U.S. Na t ion a l Cen t er f or Su per compu t er Appl ica t ion s (NCSA). Mosa ic a l l owed t ext a n d gr a ph ics on t h e sa me Web pa ge a n d wa s t h e ba sis f or Net Sca pe’s Na viga t or br owser a n d Micr osof t ’s In t er n et Expl or er . Fir st a n d f or emost , t h e Web a l l ows a n yon e, especia l l y n on t ech n ica l peopl e, in st a n t a ccess t o a n in f in it e a mou n t of in f or ma t ion . You ca n get st ock r epor t s, in f or ma t ion f r om a l ibr a r y, or der a book, r eser ve a ir l in e t icket s, pa ge someon e, f in d t h a t l on g–l ost f r ien d t h r ou gh t h e yel l ow pa ges, or der a da t a l in e f or you r h ou se, ch eck you r cr edit ca r d st a t emen t , ch eck on t h e a va il a bil it y of t h a t on e–a n d–on l y ca r , pr ovide compu t er –ba sed t r a in in g, or a t t en d a pr iva t e (video a n d a u dio) meet in g. An d yes, you ca n sen d a n ema il . Al l t h is a n d st il l mor e! Un l ike ot h er on l in e ser vices su ch a s Compu Ser ve, Pr odigy, a n d Amer ica On l in e (a t t h e t ime), a n yon e ca n cr ea t e a Web pa ge a s wel l —n ot t oo h a r d t o do, t h e l a n gu a ge t o cr ea t e a Web pa ge is pr et t y mu ch En gl ish . Mil l ion s of idea s a r e a va il a bl e, a n d t h er e is a pu l l down men u in t h e br owser t h a t a l l ows you t o see t h e sou r ce code (t h e ba sic in st r u ct ion s t h a t t el l t h e Web ser ver h ow t o f or ma t a pa ge) of a n y Web pa ge. By 1995, compa n ies kn own a s In t er n et Ser vice Pr ovider s (ISPs) wer e a dver t isin g t h eir a bil it y t o pu t you on t h e Web f or a l ow pr ice of $19.95. In f a ct , t oda y, most pr of ession a l ISPs give you spa ce on t h eir ser ver s (a sma l l a mou n t , bu t en ou gh t o get st a r t ed) f or you t o cr ea t e you r Web pa ge, a t n o ch a r ge!

Poin t a n d cl ick t o a ccess a n y in f or ma t ion t h a t you wou l d l ike; you do n ot h a ve t o kn ow a n oper a t in g syst em t o move a r ou n d t h e Web. No ot h er “cyber spa ce” pr ovider h a s t h e r ich simpl icit y of t h e br owser . On e cl ick a n d you ca n be on a ser ver in Ja pa n , video con f er en ce t o Ca l if or n ia , sen d a n ema il t o you r f r ien d in En gl a n d, or pl a n a va ca t ion t o Br ecken r idge, Col or a do. Ot h er on l in e pr ovider s h a d in f or ma t ion , bu t it wa s t h e simpl icit y a n d combin a t ion of t ext a n d st il l pict u r es on t h e sa me pa ge t h a t ca t a pu l t ed t h e Web in t o ever y h ome. Vir t u a l l y a n yt h in g t h a t you wa n t t o ch eck on , you ca n do on t h e Web a n d you do n ot h a ve t o r emember IP a ddr esses, dir ect or y comma n ds f or DOS a n d Un ix, f il e compr ession , execu t in g t h e TAR comma n d, pr in t in g t o a post scr ipt pr in t er , a n d so on . Simpl y st a t ed, t h e Web a l l ows ever yon e a ccess t o n et wor k da t a wit h a simpl e cl ick of t h e mou se.

Th e Wor l d Wide Web

On t h e a ppl ica t ion f r on t , mor e a n d mor e a ppl ica t ion s a r e bein g wr it t en t owa r ds (or h a ve embedded) t h e most common In t er n et in t er f a ce: a br owser . A br owser a l l ows t h e In t er n et t o be a ccessed gr a ph ica l l y u sin g icon s a n d pict u r es a n d a specia l t ext l a n gu a ge kn own a s Hyper t ext Ma r ku p La n gu a ge, or HTML. For pl a t f or m in depen den ce in wr it in g a ppl ica t ion s f or t h e Web, t h e Ja va l a n gu a ge wa s cr ea t ed. Wh a t is t h e down f a l l of t h e In t er n et ? No, con n ect ivit y is gen er a l l y n ot t h e pr obl em. ISPs ca n be a pr obl em, bu t even t h ey a r e ma n a gea bl e. Th e biggest pr obl em wit h t h e In t er n et is it s biggest a sset : in f or ma t ion . You ma y f in d you r sel f scr a t ch in g you r h ea d wh il e t r a vel in g t h e In t er n et . An yon e ca n cr ea t e con t en t a n d post it , so t h er e is a l ot of ol d in f or ma t ion on t h e In t er n et . Web pa ges a r e n ot kept u p. Web pa ges a r e n ot wr it t en cor r ect l y a n d con t a in t oo ma n y sl ow–l oa din g gr a ph ics. Ma n y l in ks t h a t a r e embedded in ot h er Web pa ges n o l on ger exist . In f or ma t ion is post ed wit h ou t h a vin g va l idit y ch ecks. Remember , n o on e en t it y own s t h e In t er n et or t h e Web a ppl ica t ion . Some compa n ies wit h Web pa ges a r e n o l on ger a r ou n d. Al l Web pa ges a r e n ot cr ea t ed equ a l ; some t a ke a n et er n it y t o wr it e t o you r br owser , wh il e ot h er s t a ke a min ima l a mou n t of t ime. Al so, a l l ISPs a r e n ot cr ea t ed equ a l . An ISP is you r con n ect ion t o t h e In t er n et . Test ou t you r ISP f or ser vice a n d con n ect ivit y. I r ecen t l y swit ch ed f r om a ma jor ISP t o a l oca l ISP a n d f ou n d 4x impr ovemen t in speed. However , t h e l oca l ISP does n ot pr ovide n a t ion a l ser vice (l oca l ph on e n u mber s a r ou n d t h e Un it ed St a t es). So wh en I st a r t ed t r a vel in g, I swit ch ed t o a n ot h er ISP t h a t h a s bot h n a t ion a l cover a ge a n d speed.

The We b (c o nt inue d) • Th e biggest a sset of t h e Web is it s biggest down f a l l : • In f or ma t ion • Th er e is a t r emen dou s a mou n t of in f or ma t ion on t h e Web. • In f or ma t ion on t h e Web ca n be post ed by a n yon e. • However : • Ma n y Web pa ges a r e n ot kept u p • Ma n y a r e n ot wr it t en cor r ect l y (min u t es t o bu il d a scr een ) • In f or ma t ion is ol d a n d ou t of da t e • In f or ma t ion is n ot docu men t ed • In cr edibl y h a r d t o sea r ch f or simpl e it ems du e t o mor e t h a n 50 mil l ion Web sit es a va il a bl e • Sea r ch en gin es br in g ba ck ma n y u n desir ed Web pa ges wh ich r equ ir e a dva n ced sea r ch in g t ech n iqu es

Be ca r ef u l wh en scr u t in iz in g t h e In t er n et . Ma ke su r e t h e da t a is r epu t a bl e (i.e., ca n be ver if ied). Th er e a r e ma n y ch a r l a t a n s on t h e In t er n et post in g f ict ion . Th e In t er n et r ea l l y in t r odu ced u s t o t h e con cept of t r yin g somet h in g f or f r ee. For u s ol d t imer s, we expect ed t h is. Post in gs t o t h e In t er n et wer e a l wa ys f r ee a n d commer cia l ism wa s a n o–n o. Yea r s a go, wh en I wa s devel opin g sof t wa r e, t h e In t er n et ca me t o my r escu e ma n y t imes wit h post in gs of sou r ce code t h a t a ssist ed in my devel opmen t pr oject s. Th is sou r ce code wa s a va il a bl e f or f r ee a n d of t en t h e per son wh o post ed it did n ot min d a n occa sion a l ema il wit h a qu est ion or t wo. An ot h er con cept t h a t t h e In t er n et wa s n ot u sed f or wa s kn own a s shareware, wh er e t h e f r ee sa mpl es of a ppl ica t ion s r a n ge f r om sever el y cr ippl ed (l a ckin g ma n y of t h e f u l l –ver sion f ea t u r es su ch a s pr in t in g a bil it ies) t o t h e f u l l –bl own ver sion of t h e sof t wa r e. Th e Web combin ed t h e t wo con cept s, a n d t h e ma r ket in g con cept r ea l l y t ook h ol d wh en t h e In t er n et ca me in t o t h e bu sin ess wor l d. Ever y bu sin ess spon sor in g a Web pa ge wil l give you somet h in g if you pu r ch a se somet h in g—a ver y ol d con cept br ou gh t t o l if e a ga in via t h e In t er n et . The We b (c o nt inue d) • Ol d–st yl e ma r ket in g. • “Give a wa y t h e r a z or a n d sel l t h e r a z or bl a des”—Gil l et t e • Sh a r ewa r e pr ogr a ms. • Th e ol d con cept of “t r y bef or e you bu y” • Fr ee pr ogr a ms. • Ma n y diver sif ied pr ogr a ms a n d in t er a ct ive Web pa ges • Th e 1–800 ser vice f or da t a . • Most compa n ies h a ve a Web pa ge

Most

of u s t r y a f r ee sa mpl e bef or e pu r ch a sin g. Th is is st il l kn own a s sh a r ewa r e, a n d pa ymen t is expect ed, wh ich l ea ds t o a n ot h er big pr obl em f or t h e In t er n et : How a n d wh en do you ch a r ge f or somet h in g? Most u ser s expect t o su r f t h e In t er n et , pick u p wh a t t h ey wa n t f or f r ee, a n d t h en sign of f . Sor r y f ol ks, we don ’t l ive in a f r ee wor l d, a n d even t u a l l y you mu st pa y. Un f or t u n a t el y, t h er e a r e t h ose ou t t h er e wh o con t in u e t o down l oa d sof t wa r e a n d n ot pa y f or it . Ba d, ba d, ba d. If t h is con t in u es, sh a r ewa r e wil l n ot be a va il a bl e, a n d you wil l en d u p wit h a pa y–f ir st , t r y–l a t er a t t it u de. An ot h er pr obl em of t h e In t er n et is t h e spr ea d of vir u ses. Pr ot ect you r wor kst a t ion wit h some t ype of a n t ivir a l sof t wa r e bef or e down l oa din g a n yt h in g f r om t h e In t er n et . Most pr ot ect ion sch emes a r e dyn a mic in t h a t t h ey a r e con st a n t l y ch eckin g f or vir u ses even du r in g a n ema il down l oa d or a f il e t r a n sf er . Her e is wh er e t h e ot h er on l in e pr ovider s do h a ve a n a dva n t a ge. Pr iva t e on l in e pr ovider s su ch a s Amer ica On l in e a n d Compu Ser ve ma ke ever y ef f or t t o t est u pl oa ded sof t wa r e a n d gen er a l l y do n ot a l l ow f or con t en t t o be wr it t en t o t h eir ser ver s. You wil l f in d t h ose ser vices mor e pr ot ect ed a n d wa t ch ed over t h a n t h e In t er n et . Th e In t er n et h a s t r u l y t est ed t h e f ir st Amen dmen t of t h e Con st it u t ion : t h e r igh t t o f r ee speech .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 5 Internet, Intranets, and Extranets We a l l

kn ow wh a t t h e In t er n et is—a t l ea st I h ope so. An intranet is a TCP/IP ba sed in t er n et u sed f or a bu sin ess’ internal n et wor k. In t r a n et s ca n commu n ica t e wit h ea ch ot h er via con n ect ion s t o t h e In t er n et , wh ich pr ovides t h e ba ckbon e commu n ica t ion ; h owever , a n in t r a n et does n ot n eed a n ou t side con n ect ion t o t h e In t er n et in or der t o oper a t e. It simpl y u ses a l l t h e TCP/IP pr ot ocol s a n d a ppl ica t ion s t o give you a “pr iva t e” in t er n et . Wh en a bu sin ess exposes pa r t of it s in t er n a l n et wor k t o t h e ou t side commu n it y, it is kn own a s a n extranet. You ma y h a ve u sed t h is ext r a n et wh en br owsin g t h r ou gh a web pa ge a t Gen er a l El ect r ic or or der in g some disket t es via a r esel l er ’s Web pa ge. You wil l n ot h a ve compl et e a ccess t o a cor por a t e n et wor k, bu t mer el y a pa r t of it t h a t t h e bu sin ess wa n t s you t o h a ve a ccess t o. Th e compa n y ca n bl ock a ccess on it s r ou t er s a n d pu t firewalls (a piece of sof t wa r e or h a r dwa r e t h a t a l l ows you a ccess t o r esou r ces ba sed on a va r iet y of pa r a met er s su ch a s IP a ddr esses, por t n u mber s, doma in n a mes, et c.) in t o pl a ce t h a t f or ce you t o h a ve a ccess on l y t o a su bset of it s in t r a n et . Int e r ne t , Int r ane t s, and Ext r ane t s • Th e In t er n et is a compl ex or ga n iz a t ion of n et wor ks ma n a ged by compa n ies t h a t pr ovide a ccess t o in t er n a t ion a l r esou r ces t h r ou gh t h e u se of t h e TCP/IP pr ot ocol su it e. • An in t r a n et u ses t h e TCP/IP pr ot ocol s a n d a ppl ica t ion s ba sed on t h e In t er n et bu t in a cor por a t e en vir on men t . • An ext r a n et is t h e sh a r in g of a cor por a t e in t r a n et (ma ybe ju st a piece of it ) wit h t h e ou t side wor l d. • E–commer ce is a n exa mpl e of a n ext r a n et

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 6 Who Governs the Internet? Wh o gover n s t h e pr ot ocol , t h e In t er n et , a n d t h e Web? Fir st

of f , l et ’s ma ke it cl ea r t h a t n o on e compa n y or per son own s t h e In t er n et . In f a ct , some sa y t h a t it is a mir a cl e t h a t t h e In t er n et con t in u es t o f u n ct ion a s wel l a s it does. Wh y is t h is h a r d t o bel ieve? Wel l , in or der t o f u n ct ion , t h e In t er n et r equ ir es t h e compl et e cooper a t ion of t h ou sa n ds of compa n ies kn own a s In t er n et Ser vice Pr ovider s (ISPs), t el ecommu n ica t ion s compa n ies, st a n da r ds bodies su ch a s IANA, a ppl ica t ion devel oper s, a n d a h ost of ot h er r esou r ces. Th e on e ma in goa l is t o pr ovide u biqu it ou s in f or ma t ion a ccess, a n d a n yon e wh o t r ies t o diver t t h e In t er n et t o h is or h er own a dva n t a ge is u su a l l y ch a st ised. However , t h is is becomin g mor e dil u t ed n ow t h a t ISPs a r e du kin g it ou t f or t r a f f ic pa t t er n s. Fu r t h er mor e, a l l t h ose wh o pa r t icipa t e in t h e In t er n et , in cl u din g a l l compa n ies t h a t h a ve IP con n ect ion s t o t h e In t er n et , mu st a bide by t h e r u l es. Ima gin e t h a t : Mil l ion s of peopl e a l l l ist en in g t o on e set of r u l es. Ref er t o sl ide 15. Th e TCP/IP pr ot ocol su it e is gover n ed by a n or ga n iz a t ion kn own a s t h e In t er n et Act ivit ies Boa r d (IAB). In t h e l a t e 1970s, t h e gr owt h of t h e In t er n et wa s a ccompa n ied by a gr owt h in t h e siz e of t h e in t er est ed r esea r ch commu n it y, r epr esen t in g a n in cr ea sed n eed f or coor din a t ion mech a n isms. Vin t Cer f , t h en ma n a ger of t h e In t er n et Pr ogr a m a t DARPA, f or med sever a l coor din a t ion bodies: a n In t er n a t ion a l Cooper a t ion Boa r d (ICB) t o coor din a t e a ct ivit ies wit h some cooper a t in g Eu r opea n cou n t r ies cen t er ed on Pa cket Sa t el l it e r esea r ch ; a n In t er n et Resea r ch Gr ou p, wh ich wa s a n in cl u sive gr ou p pr ovidin g a n en vir on men t f or gen er a l exch a n ge of in f or ma t ion ; a n d a n In t er n et Con f igu r a t ion Con t r ol Boa r d (ICCB). Th e ICCB wa s a n in vit a t ion a l body t o a ssist Cer f in ma n a gin g t h e bu r geon in g In t er n et a ct ivit y.

Wh o Gover n s t h e In t er n et ? In 1983, con t in u in g gr owt h of t h e In t er n et commu n it y dema n ded a r est r u ct u r in g of t h e coor din a t ion mech a n isms. Th e ICCB wa s disba n ded a n d, in it s pl a ce, a st r u ct u r e of Ta sk

For ces wa s f or med, ea ch f ocu sed on a pa r t icu l a r a r ea of t h e t ech n ol ogy (e.g., r ou t er s, en d–t o–en d pr ot ocol s, et c.). Th e In t er n et Act ivit ies Boa r d (IAB) wa s f or med f r om t h e ch a ir s of t h e Ta sk For ces. By 1985, t h er e wa s a t r emen dou s gr owt h in t h e mor e pr a ct ica l /en gin eer in g side of t h e In t er n et . Th is r esu l t ed in a n expl osion in t h e a t t en da n ce a t t h e IETF meet in gs. Th is gr owt h wa s compl emen t ed by a ma jor expa n sion in t h e commu n it y. No l on ger wa s DARPA t h e on l y ma jor pl a yer in t h e f u n din g of t h e In t er n et . In a ddit ion t o NSFn et a n d t h e va r iou s U.S. a n d in t er n a t ion a l gover n men t –f u n ded a ct ivit ies, in t er est in t h e commer cia l sect or wa s begin n in g t o gr ow. Al so in 1985, t h er e wa s a sign if ica n t decr ea se in In t er n et a ct ivit y a t DARPA. As a r esu l t , t h e IAB wa s l ef t wit h ou t a pr ima r y spon sor a n d in cr ea sin gl y a ssu med t h e ma n t l e of l ea der sh ip.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 7 The Governing Bodies of the Internet Th e gr owt h con t in u ed, r esu l t in g in even f u r t h er

su bst r u ct u r e wit h in bot h t h e IAB a n d IETF. Th e IETF combin ed Wor kin g Gr ou ps in t o Ar ea s, a n d design a t ed Ar ea Dir ect or s. An In t er n et En gin eer in g St eer in g Gr ou p (IESG) wa s f or med of t h e Ar ea Dir ect or s. Th e IAB r ecogn iz ed t h e in cr ea sin g impor t a n ce of t h e IETF, a n d r est r u ct u r ed t h e st a n da r ds pr ocess t o expl icit l y r ecogn iz e t h e IESG a s t h e ma jor r eview body f or st a n da r ds. Th e IAB a l so r est r u ct u r ed so t h a t t h e r est of t h e Ta sk For ces (ot h er t h a n t h e IETF) wer e combin ed in t o a n In t er n et Resea r ch Ta sk For ce (IRTF), wit h t h e ol d t a sk f or ces r en a med a s r esea r ch gr ou ps. Th e gr owt h in t h e commer cia l sect or br ou gh t wit h it in cr ea sed con cer n r ega r din g t h e st a n da r ds pr ocess it sel f . St a r t in g in t h e ea r l y 1980s (a n d con t in u in g t o t h is da y), t h e In t er n et gr ew beyon d it s pr ima r il y r esea r ch r oot s t o in cl u de bot h a br oa d u ser commu n it y a n d in cr ea sed commer cia l a ct ivit y. In cr ea sed a t t en t ion wa s pa id t o ma kin g t h e pr ocess open a n d f a ir . Th is cou pl ed wit h a r ecogn iz ed n eed f or commu n it y su ppor t of t h e In t er n et even t u a l l y l ed t o t h e f or ma t ion of t h e In t er n et Societ y in 1991, u n der t h e a u spices of t h e Cor por a t ion f or Na t ion a l Resea r ch In it ia t ives (CNRI). In 1992, t h e In t er n et Act ivit ies Boa r d wa s r eor ga n iz ed a n d r en a med t h e In t er n et Ar ch it ect u r e Boa r d, oper a t in g u n der t h e a u spices of t h e In t er n et Societ y. A mor e “peer ” r el a t ion sh ip wa s def in ed bet ween t h e n ew IAB a n d IESG, wit h t h e IETF a n d IESG t a kin g a l a r ger r espon sibil it y f or t h e a ppr ova l of st a n da r ds. Ul t ima t el y, a cooper a t ive a n d mu t u a l l y su ppor t ive r el a t ion sh ip wa s f or med a mon g t h e IAB, IETF, a n d In t er n et Societ y, wit h t h e In t er n et Societ y t a kin g on a s a goa l t h e pr ovision of ser vice a n d ot h er mea su r es t h a t wou l d f a cil it a t e t h e wor k of t h e IETF.

Th e Gover n in g Bodies of t h e In t er n et . Th is commu n it y spir it h a s a l on g h ist or y begin n in g wit h t h e ea r l y ARPAn et . Th e ea r l y ARPAn et r esea r ch er s wor ked a s a cl ose–kn it commu n it y t o a ccompl ish t h e in it ia l

demon st r a t ion s of pa cket swit ch in g t ech n ol ogy descr ibed ea r l ier . Likewise, t h e Pa cket Sa t el l it e, Pa cket Ra dio, a n d sever a l ot h er DARPA compu t er scien ce r esea r ch pr ogr a ms wer e mu l t icon t r a ct or col l a bor a t ive a ct ivit ies t h a t h ea vil y u sed wh a t ever a va il a bl e mech a n isms t h er e wer e t o coor din a t e t h eir ef f or t s, st a r t in g wit h el ect r on ic ma il a n d a ddin g f il e sh a r in g, r emot e a ccess, a n d even t u a l l y, Wor l d Wide Web ca pa bil it ies.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 8 An Overall View of the Internet Th is sl ide depict s t h e In t er n et

ba ckbon e a n d sh ows t h e over a l l t opol ogy of a n a t ion a l ISP. Al l of t h e con n ect ion poin t s (sh own a s cit ies) a r e pl a ces wh er e t h e pr ovider h a s a ser ia l con n ect ion t o a n ot h er on e of it s sit es. Loca t ed bel ow t h ese con n ect ion poin t s a r e poin t s–of –pr esen ce (POP), con n ect ion poin t s f or dia l –in a n d l ea sed–l in e u ser s. Loca l u ser s a r e con n ect ed a t POPs by t h e con n ect ion poin t s sh own on t h is ma p a n d t h r ou gh ou t t h e r est of t h e In t er n et . Th e In t er n et is a con n ect ion of n et wor ks. Mu l t ipl e n a t ion a l ISPs a r e in t er con n ect ed t h r ou gh a con cept of peering. Th er e a r e poin t s on t h e In t er n et wh er e n a t ion a l ISPs con n ect a n d a l l ow f or r ou t in g t a bl es t o be sh a r ed a n d a l l ow u biqu it ou s a ccess t o t h e In t er n et f or a l l u ser s.

An Over a l l View of t h e In t er n et

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 9 Internet Timeline Ref er

t o sl ide 18.

In t er n et Timel in e

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 10 Circuit and Packet Switching Cir c uit and Pac ke t Swit c hing • Cir cu it swit ch in g pr ovides f or a pr ebu il t pa t h t h a t is r eser ved f or t h e l en gt h of t h e ca l l . • Pa cket swit ch in g det er min es a r ou t e ba sed on in f or ma t ion in t h e h ea der of t h e pa cket . Th e pa cket is swit ch ed dyn a mica l l y a n d mu l t ipl e da t a pa cket s ma y t a ke t h e sa me r ou t e. • Pa cket swit ch in g is via bl e f or a l l t ypes of da t a , wh et h er voice, video, or st or e–a n d–f or wa r d da t a .

TCP/IP a l l owed f or

open commu n ica t ion s t o exist a n d f or t h e pr ol if er a t ion of LAN–t o–LAN a n d LAN–t o–WAN con n ect ivit y bet ween mu l t ipl e oper a t in g en vir on men t s. It s t opol ogy a n d a r ch it ect u r e, h owever , wer e n ot ba sed on t h e met h ods empl oyed by t h e ph on e compa n y: cir cu it swit ch in g. Th e ph on e compa n y (AT&T, bef or e t h e br ea ku p) ba sica l l y l a u gh ed a t t h e idea of a pa cket swit ch ed n et wor k a n d pu bl icl y st a t ed t h a t it cou l d n ever wor k. A n et wor k wh ose t r a n smit t ed in f or ma t ion ca n f in d it s own wa y a r ou n d t h e n et wor k? Impossibl e! A n et wor k in wh ich ever y t r a n smit t ed pa cket of in f or ma t ion h a s t h e sa me ch a n ce f or f or wa r din g? Th e ph on e compa n y ma in t a in ed it s st a n ce t h a t cir cu it swit ch in g wa s t h e on l y met h od t h a t sh ou l d be u sed f or voice, video, or da t a . Cir cu it swit ch in g by def in it ion pr ovided gu a r a n t eed ba n dwidt h a n d, t h er ef or e, Qu a l it y of Ser vice. At t h a t t ime, t h e ph on e compa n y wa s cor r ect , bu t on l y f or voice. Voice a n d video ca n n ot wit h st a n d del a y beyon d a sma l l t ime f r a me (a bou t 150 mil l isecon ds, or 0.150 secon ds), bu t da t a cou l d! In pa cket swit ch in g, t h e pa t h is f ou n d in r ea l t ime, a n d ea ch t ime t h e pa t h sh ou l d be t h e sa me, bu t it ma y n ot be. St il l , t h e in f or ma t ion wil l get f r om poin t A t o poin t B.

Th er e a r e ma n y dif f er en ces bet ween cir cu it swit ch in g a n d pa cket swit ch in g. On e is t h a t in cir cu it swit ch in g, a pa t h is pr ebu il t bef or e in f or ma t ion is sen t , wh er ea s pa cket swit ch in g does n ot pr edef in e or pr ebu il d a pa t h bef or e sen din g in f or ma t ion . For exa mpl e, wh en you ma ke a ph on e ca l l , t h e ph on e compa n y ph ysica l l y bu il ds a cir cu it f or t h a t ca l l . You ca n n ot spea k (t r a n smit in f or ma t ion ) u n t il t h a t cir cu it is bu il t . Th is cir cu it is bu il t via h a r dwa r e. Th is pa t h is a ph ysica l cir cu it t h r ou gh t h e t el eph on e n et wor k syst em; h owever , t h e ph on e compa n y is cu r r en t l y empl oyin g ot h er t ech n ol ogies t o a l l ow f or “vir t u a l cir cu it swit ch in g” t h r ou gh t ech n ol ogies su ch a s Asyn ch r on ou s Tr a n sf er Mode, or ATM (beyon d t h e scope of t h is book). For ou r compa r ison , a voice pa t h is pr ebu il t on h a r dwa r e bef or e in f or ma t ion is pa ssed. No in f or ma t ion is con t a in ed in t h e digit iz ed voice sign a l t o in dica t e t o t h e swit ch es wh er e t h e dest in a t ion is l oca t ed. Ea ch t r a n smit t in g n ode h a s t h e sa me ch a n ce in get t in g it s in f or ma t ion t o t h e r eceiver . In pa cket swit ch in g, t h e in f or ma t ion n eeded t o get t o t h e dest in a t ion st a t ion is con t a in ed in t h e h ea der of t h e in f or ma t ion bein g sen t . St a t ion s, kn own a s routers, in t h e n et wor k r ea d t h is in f or ma t ion a n d f or wa r d t h e in f or ma t ion a l on g it s pa t h . Th ou sa n ds of dif f er en t pa cket s of in f or ma t ion ma y t a ke t h e exa ct sa me pa t h t o dif f er en t dest in a t ion s. Toda y we a r e pr ovin g t h a t n ot on l y is pa cket swit ch in g via bl e, it ca n be u sed f or voice, video, a n d da t a . Newer , f a st er st a t ion s on t h e n et wor k a l on g wit h f a st er t r a n smission t r a n spor t s h a ve been in ven t ed. Al on g wit h t h is a r e n ew Qu a l it y of Ser vice pr ot ocol s t h a t a l l ow pr ior it ies t o exist on t h e n et wor k. Th is a l l ows cer t a in pa cket s of in f or ma t ion t o “l ea pf r og” over ot h er pa cket s of in f or ma t ion t o become f ir st in t h e t r a n smission .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 11 TCP/IP Protocol Documents Compl et e det a il s of a Requ est

f or Commen t s (RFC) docu men t a r e con t a in ed in RFC 1543. If TCP/IP is su ch a n open pr ot ocol , wh er e does on e f in d ou t in f or ma t ion on t h e pr ot ocol a n d ot h er it ems of in t er est on t h e In t er n et ? RFCs def in e t h e pr ocessin g f u n ct ion s of t h is pr ot ocol , a n d t h ese docu men t s a r e a va il a bl e on l in e or ma y be pu r ch a sed. On l in e, t h ey ma y be f ou n d on a n y of t h e t h r ee r egist r ies: In t er NIC (US), RIPE (Eu r ope), a n d APNIC (Asia Pa cif ic). For exa mpl e, poin t you r Web br owser t o h t t p://ds.in t er n ic.n et /r f c/r f c–in dex.t xt a n d r eview t h e l a t est in dex (u pda t ed a l most da il y) of RFCs. My su ggest ion is t h a t you sa ve t h is a s a f il e in you r l oca l compu t er . You wil l r et u r n ma n y t imes t o t h is docu men t t o f in d mor e in f or ma t ion a bou t a pa r t icu l a r a spect of a pr ot ocol . Use t h e Fin d t ool u n der t h e Edit pu l l down men u t o pr ovide a sea r ch . Be ca r ef u l : Ju st beca u se you t ype in a wor d, t h e sea r ch en gin e ma y n ot f in d specif ica l l y wh a t you a r e l ookin g f or , so you ma y h a ve t o kn ow a f ew t h in gs bef or e ven t u r in g f or t h , bu t f or t h e most pa r t , t h is is t h e best met h od of weedin g t h r ou gh t h e RFCs. TCP/IP Pr o t o c o l Do c ume nt s • Review RFC 1583. • TCP/IP t ech n ica l docu men t s a r e kn own a s Requ est f or Commen t s, or RFCs. • Ca n be f ou n d a t a n y of t h e t h r ee r egist r ies • APNIC (Asia ), RIPE (Eu r ope), INTERNIC (U.S.) • Poin t you r br owser t o: ds.in t er n ic.n et /RFC/r f cxxxx.t xt • Repl a ce t h e x wit h t h e RFC n u mber • Syst ems en gin eer s sh ou l d r ea d a t a min imu m: RFCs 1812, 1122, a n d 1123.

Af t er f in din g a n RFC, ch a n ge rfc–index on t h e URL t o rfcxxxx.txt, wh er e x is t h e RFC n u mber , a n d you n ow h a ve t h e RFC on l in e. I su ggest t h a t you sa ve t h e RFCs t h a t you

wil l r et u r n t o t h e most on you r l oca l dir ect or y—t h ey ca n t a ke some t ime t o down l oa d. A ma jor it y of in dividu a l s a r e t r u st in g t h e st a t emen t s of a compa n y’s impl emen t a t ion of t h e TCP/IP pr ot ocol s mor e t h a n wh a t is wr it t en in a n RFC. Th e RFC is t h e def in it ive docu men t f or t h e TCP/IP pr ot ocol su it e. I a sked some syst ems en gin eer s wh o I kn ow t wo t h in gs: • Wh en wa s t h e l a st t ime you r eviewed a qu est ion by r ea din g a n RFC? • Ha ve you r ea d RFC 1812, 1122, a n d 1123? Th e a n swer t o t h e f ir st qu est ion is gen er a l l y, “I don ’t kn ow” (occa sion a l l y, I got t h e r espon se, “Hey Ma t t , get a l if e!”), a n d t h e a n swer t o t h e secon d qu est ion is, “Wh a t ’s in t h ose RFCs?” How a n y syst ems en gin eer s ca n cl a im t h a t t h ey kn ow t h e TCP/IP pr ot ocol (a s a l wa ys in dica t ed on t h eir r ésu més, a l on g wit h kn owl edge of 100 ot h er pr ot ocol s a n d a ppl ica t ion s) wit h ou t h a vin g r ea d t h ese t h r ee RFCs? Th e Web ma kes it so ea sy t o r eview a n RFC: Simpl y poin t you r br owser t o ds.in t er n ic.n et /r f c/r f cxxxx.t xt , or f or a n in dex t o ds.in t er n ic.n et /r f c/r f c–in dex.t xt . Get t h e RFC el ect r on ica l l y, sa ve it , a n d t h en u se t h e sea r ch comma n ds t o f in d wh a t you a r e l ookin g f or .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 12 Why Study the RFCs? It

ma y seem t r ivia l , bu t I h a ve expa n ded t h is sect ion of t h e book beca u se ever yon e seems t o be get t in g a wa y f r om t h e RFCs. Al so, ma n y peopl e a r e st il l get t in g in t o t h e TCP/IP pr ot ocol wh o ma y h a ve n ever seen a n RFC bef or e. Th e Requ est f or Commen t s a r e pa per s (docu men t s) t h a t def in e t h e TCP/IP pr ot ocol su it e. Th ey a r e t h e In t er n et ’s t ech n ica l (most l y) docu men t s; I sa y “most l y” f or some a r e in t el l ect u a l l y h u mor ou s (e.g., “A View f r om t h e 21st Cen t u r y” by Vin t Cer f , RFC 1607). An RFC ca n be wr it t en a n d su bmit t ed by a n yon e; However , a n y docu men t does n ot a u t oma t ica l l y become a n RFC. A t ext docu men t becomes a dr a f t RFC f ir st . At t h is poin t it is con sider ed a pu bl ic docu men t . A peer r eview pr ocess is t h en con du ct ed over a per iod of t ime a n d commen t s a r e con t in u a l l y ma de on t h e dr a f t . It wil l t h en be decided wh et h er or n ot it becomes a n RFC. St eve Cr ocker wr ot e t h e f ir st RFC in 1969. Th ese memos wer e in t en ded t o be a n in f or ma l , f a st wa y t o sh a r e idea s wit h ot h er n et wor k r esea r ch er s. RFCs wer e or igin a l l y pr in t ed on pa per a n d dist r ibu t ed via sn a il ma il (post a l ). As t h e Fil e Tr a n sf er Pr ot ocol (FTP) ca me in t o u se, t h e RFCs wer e pr epa r ed a s on l in e f il es a n d a ccessed via FTP. Exist in g RFCs (a s of t h is wr it in g) n u mber over 2200 a n d con t a in in f or ma t ion on a n y a spect of a n y In t er n et pr ot ocol . Devel opmen t en gin eer s r ea d t h ese docu men t s a n d pr odu ce a ppl ica t ion s ba sed on t h em.

Why St udy t he RFCs? • Requ est f or Commen t s t ech n ica l l y def in e a pr ot ocol f or t h e In t er n et a n d a r e in f or ma t ion a l , or even h u mor ou s. • Th e f ir st RFC wa s wr it t en by St eve Cr ocker . • Sen t via “sn a il ma il ” u n t il FTP ca me a l on g • An RFC ca n be su bmit t ed by a n yon e. • Does n ot a u t oma t ica l l y become a n RFC • Fir st en t er s a s a n RFC dr a f t wit h n o n u mber a ssocia t ed • Mu st f ol l ow t h e in st r u ct ion s f or a u t h or s det a il ed in RFC 1543

For syst ems en gin eer s, most of t h e RFCs do n ot n eed t o be st u died. However , f or a ba sic u n der st a n din g of t h e TCP/IP pr ot ocol su it e, t h r ee RFCs mu st be r ea d. Th er ef or e, in t h e spir it of t h e RFC a ct ion wor ds, “you MUST r ea d RFCs 1122, 1123, a n d 1812 bef or e bein g a bl e t o st a t e t h a t you u n der st a n d t h e TCP/IP pr ot ocol su it e.” Th er e a r e ma n y RFCs, bu t t h e ma jor it y ca n be su mmed u p in t h ose t h r ee RFCs. Th e r ea din g is n ot dif f icu l t , a n d ma n y t h in gs a r e expl a in ed.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 13 Submitting an RFC Submit t ing an RFC • An yon e ca n su bmit a n RFC a ccor din g t o RFC 1543. • A ma jor sou r ce f or RFCs is t h e In t er n et En gin eer in g Ta sk For ce (IETF), wh ich n ow h a s over 75 wor kin g gr ou ps • Th e pr ima r y RFC, in cl u din g a l l dia gr a ms, mu st be wr it t en in 7–bit ASCII t ext . • Th e secon da r y pu bl ica t ion ma y be in post scr ipt . • Pr ima r il y u sed f or cl a r it y • On ce issu ed, RFCs do n ot ch a n ge. • Upda t ed by n ew RFCs • RFCs ca n be obsol et ed bu t t h eir n u mber s a r e n ever u sed a ga in • As TCP/IP evol ves, so does t h e RFC.

Memos pr oposed t o be RFCs ma y be su bmit t ed by a n yon e. On e l a r ge sou r ce of memos t h a t become RFCs comes f r om t h e In t er n et En gin eer in g Ta sk For ce (IETF). Th e IETF wor kin g gr ou ps (WGs) evol ve t h eir wor kin g memos (kn own a s In t er n et Dr a f t s, or I–Ds) u n t il t h ey f eel t h ey a r e r ea dy f or pu bl ica t ion . Th en t h e memos a r e r eviewed by t h e In t er n et En gin eer in g St eer in g Gr ou p (IESG) a n d, if a ppr oved, a r e sen t by t h e IESG t o t h e RFC Edit or . Th e pr ima r y RFC mu st be wr it t en in ASCII t ext . Th is in cl u des a l l pict u r es, wh ich l ea ds t o some in t er est in g ima ges! Th e RFC ma y be r epl ica t ed a s a secon da r y docu men t in Post Scr ipt (t h is mu st be a ppr oved by t h e a u t h or a n d t h e RFC edit or ). Th is a l l ows f or a n ea sy–t o–r ea d RFC, in cl u din g pict u r es. Th e pr ima r y RFC, h owever , is a l wa ys wr it t en in ASCII t ext . Remember : Simpl icit y a n d a va il a bil it y f or a l l is t h e over a l l t on e of t h e In t er n et . Th er ef or e, in or der t o in t er a ct in a digit a l wor l d, it is ma n da t or y t h a t ever yon e h a ve a t l ea st ASCII t er min a l f u n ct ion s eit h er t h r ou gh a compu t er t er min a l or on a PC. Th e f or ma t of a n RFC is in dica t ed by RFC 1543, “In st r u ct ion s t o Au t h or s,” a n d a l so

sh own in sl ide 22. Ea ch RFC is a ssign ed a n u mber in a scen din g sequ en ce (n ewer RFCs h a ve h igh er n u mber s, a n d t h ey a r e n ever r ea ssign ed). On ce issu ed, RFCs do n ot ch a n ge. Revision s ma y be ma de t o t h e RFCs, bu t r evision s a r e issu ed a s a n ew RFC. Bu t do n ot t h r ow ou t t h a t ol d RFC. Some of t h e n ewer RFCs on l y r epl a ce pa r t of t h e ol der RFC su ch a s r epl a cin g a n a ppen dix or u pda t in g a f u n ct ion . Th ey ma y a l so simpl y a dd somet h in g t o t h e ol der RFC. Th is is in dica t ed by a n “u pda t ed–by:” st a t emen t on t h e f ir st pa ge. If a n ew RFC compl et el y r epl a ces a n RFC, t h e n ew RFC h a s “Obsol et e: RFC XXXX” in t h e u pper –l ef t cor n er of t h e RFC. Th e in dex of RFCs, in dica t ed by t h e URL given ea r l ier , con t a in s t h e in f or ma t ion a bou t u pda t es. Th e RFCs a r e con t in u in g t o evol ve a s t h e t ech n ol ogy dema n ds. Th is a l l ows f or t h e In t er n et t o become t h e n ever –en din g st or y. For exa mpl e, t h e wide a r ea n et wor k con n ect ion f a cil it y kn own a s t h e Fr a me Rel a y specif ica t ion is becomin g ver y popu l a r , a n d t h er e a r e RFCs t o def in e h ow t o in t er f a ce TCP t o t h e f r a me r el a y pr ot ocol . RFCs a l so a l l ow r ef in emen t s t o en h a n ce bet t er in t er oper a bil it y. As l on g a s t h e t ech n ol ogy is ch a n gin g, t h e RFCs mu st be u pda t ed t o a l l ow con n ect ion t o t h e pr ot ocol su it e. IPv6 is wel l docu men t ed wit h ma n y RFCs. As of t h is wr it in g, t h e IETF n ow h a s in excess of 75 wor kin g gr ou ps, ea ch wor kin g on a dif f er en t a spect of In t er n et en gin eer in g. Ea ch of t h ese wor kin g gr ou ps h a s a ma il in g l ist t o discu ss on e or mor e dr a f t docu men t s u n der devel opmen t . Wh en con sen su s is r ea ch ed on a dr a f t , a docu men t ma y be dist r ibu t ed a s a n RFC.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 14 RFC Updates Th e RFC a n n ou n cemen t s a r e dist r ibu t ed via t wo ma il in g l ist s:t h e “IETF–An n ou n ce” l ist , a n d t h e “RFC–DIST” l ist . You don ’t wa n t t o be on bot h l ist s. To join (or qu it ) t h e “IETF–An n ou n ce” l ist , sen d a messa ge t o: IETF–Requ est @cn r i.r est on .va .u s To join (or qu it ) t h e “RFC–DIST” l ist , sen d a messa ge t o: RFC–Requ est @NIC.DDN.MIL RFC Updat e s • To join or qu it t h e IETF–An n ou n ce l ist , sen d a n ema il t o: • IETF–Requ est @cn r i.r est on .va .u s • To join or qu it t h e RFC–DIST l ist , sen d a n ema il t o: • RFC–Requ est @NIC.DDN.MIL

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 15 RFC Format Fir st pag e . Ref er t o sl ide 24. Ne t wo r k Wo r king Gr o up. Th e t r a dit ion a l h ea din g f or t h e gr ou p t h a t f ou n ded t h e RFC ser ies. Th is a ppea r s on t h e f ir st l in e on t h e l ef t –h a n d side of t h e h ea din g. Re que st f o r Co mme nt : nnnn. Iden t if ies t h is a s a r equ est f or commen t s a n d specif ies t h e n u mber . In dica t ed on t h e secon d l in e on t h e l ef t side. Th e a ct u a l n u mber is f il l ed in a t t h e l a st momen t bef or e pu bl ica t ion by t h e RFC Edit or . Aut ho r Name . Th e a u t h or ’s n a me (f ir st in it ia l a n d l a st n a me on l y), in dica t ed on t h e f ir st l in e on t h e r igh t side of t h e h ea din g. Aut ho r Or g anizat io n. Th e a u t h or ’s or ga n iz a t ion (compa n y n a me, col l ege division , et c.), in dica t ed on t h e secon d l in e on t h e r igh t side. Submissio n Dat e . Th is is t h e mon t h a n d yea r of t h e RFC pu bl ica t ion . In dica t ed on t h e t h ir d l in e on t h e r igh t side. Obso l e t e s/Updat e s. If t h is RFC u pda t es or obsol et es a n ot h er RFC, it is in dica t ed in t h e t h ir d l in e on t h e l ef t side of t h e h ea din g. Cat e g o r y. Th e ca t egor y of t h is RFC, on e of : St a n da r ds Tr a ck, In f or ma t ion a l , or Exper imen t a l . Th is is in dica t ed on t h e t h ir d (if t h er e is n o Obsol et es/Upda t es in dica t ion ) or f ou r t h l in e on t h e l ef t side.

RFC For ma t Tit l e . Th e t it l e a ppea r s, cen t er ed, bel ow t h e r est of t h e h ea din g. If t h er e a r e mu l t ipl e

a u t h or s, a n d if t h e mu l t ipl e a u t h or s a r e f r om mu l t ipl e or ga n iz a t ion s, t h e r igh t –side h ea din g ma y h a ve a ddit ion a l l in es t o a ccommoda t e t h em. Running he ade r s. Th e r u n n in g h ea der in on e l in e (on pa ge 2 a n d a l l su bsequ en t pa ges) h a s t h e RFC n u mber on t h e l ef t (RFC NNNN), t h e t it l e cen t er ed (possibl y a n a bbr evia t ed t it l e), a n d t h e da t e (mon t h , yea r ) on t h e r igh t . Running f o o t e r s. Th e r u n n in g f oot er in on e l in e (on a l l pa ges) h a s t h e a u t h or ’s l a st n a me on t h e l ef t a n d t h e pa ge n u mber on t h e r igh t ([Pa ge N]). St at us se c t io n. Ea ch RFC mu st in cl u de on it s f ir st pa ge t h e “St a t u s of t h is Memo” sect ion , wh ich con t a in s a pa r a gr a ph descr ibin g t h e t ype of RFC. Th e con t en t of t h is sect ion wil l be on e of t h e t h r ee f ol l owin g st a t emen t s: St andar ds t r ac k. “Th is docu men t specif ies a n In t er n et st a n da r ds t r a ck pr ot ocol f or t h e In t er n et commu n it y, a n d r equ est s discu ssion a n d su ggest ion s f or impr ovemen t s. Pl ea se r ef er t o t h e cu r r en t edit ion of t h e ‘In t er n et Of f icia l Pr ot ocol St a n da r ds’ (STD 1) f or t h e st a n da r diz a t ion st a t e a n d st a t u s of t h is pr ot ocol . Dist r ibu t ion of t h is memo is u n l imit ed.” Expe r ime nt al . “Th is memo def in es a n exper imen t a l pr ot ocol f or t h e In t er n et commu n it y. Th is memo does n ot specif y a n In t er n et st a n da r d of a n y kin d. Discu ssion a n d su ggest ion s f or impr ovemen t a r e r equ est ed. Dist r ibu t ion of t h is memo is u n l imit ed.” Inf o r mat io nal . “Th is memo pr ovides in f or ma t ion f or t h e In t er n et commu n it y. Th is memo does n ot specif y a n In t er n et st a n da r d of a n y kin d. Dist r ibu t ion of t h is memo is u n l imit ed.”

RFC For ma t (con t in u ed)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 16 Other RFC Format Requirements Int r o duc t io n se c t io n. Ea ch RFC sh ou l d h a ve a n In t r odu ct ion sect ion t h a t (a mon g ot h er t h in gs) expl a in s t h e mot iva t ion f or t h e RFC a n d (if a ppr opr ia t e) t h e a ppl ica bil it y of t h e pr ot ocol . Disc ussio n. Th e pu r pose of t h is RFC is t o f ocu s discu ssion on pa r t icu l a r pr obl ems in t h e In t er n et a n d possibl e sol u t ion s. No pr oposed sol u t ion s in t h is docu men t a r e in t en ded a s st a n da r ds f or t h e In t er n et . Ra t h er , it is h oped t h a t a gen er a l con sen su s wil l emer ge a s t o t h e a ppr opr ia t e sol u t ion t o su ch pr obl ems, l ea din g even t u a l l y t o t h e a dopt ion of st a n da r ds. Int e r e st . Th is RFC is bein g dist r ibu t ed t o member s of t h e In t er n et commu n it y in or der t o sol icit t h eir r ea ct ion s t o t h e pr oposa l s con t a in ed in it . Wh il e t h e issu es discu ssed ma y n ot be dir ect l y r el eva n t t o t h e r esea r ch pr obl ems of t h e In t er n et , t h ey ma y be of in t er est t o a n u mber of r esea r ch er s a n d impl emen t er s. St at us r e po r t . In r espon se t o t h e n eed f or ma in t en a n ce of cu r r en t in f or ma t ion a bou t t h e st a t u s a n d pr ogr ess of va r iou s pr oject s in t h e In t er n et commu n it y, t h is RFC is issu ed f or t h e ben ef it of commu n it y member s. Th e in f or ma t ion con t a in ed in t h is docu men t is a ccu r a t e a s of t h e da t e of pu bl ica t ion , bu t is su bject t o ch a n ge. Su bsequ en t RFCs wil l r ef l ect su ch ch a n ges. Th ese pa r a gr a ph s n eed n ot be f ol l owed wor d f or wor d, bu t t h e gen er a l in t en t of t h e RFC mu st be ma de cl ea r . Re f e r e nc e s se c t io n. Nea r l y a l l RFCs con t a in cit a t ion s t o ot h er docu men t s, a n d t h ese a r e l ist ed in a Ref er en ces sect ion n ea r t h e en d of t h e RFC. Th er e a r e ma n y st yl es f or r ef er en ces, a n d t h e RFCs h a ve on e of t h eir own .

Ot he r RFC Fo r mat Re quir e me nt s • In t r odu ct ion . • Ea ch RFC sh ou l d h a ve a n In t r odu ct ion sect ion t h a t (a mon g ot h er t h in gs) expl a in s t h e mot iva t ion f or t h e RFC a n d (if a ppr opr ia t e) descr ibes t h e a ppl ica bil it y of t h e pr ot ocol descr ibed • RFC t ext . • Th e body of t h e RFC • Discu ssion . • Th e pu r pose of t h is RFC is t o f ocu s discu ssion on pa r t icu l a r pr obl ems in t h e In t er n et a n d possibl e sol u t ion s • Ackn owl edgmen t s. • Th is is wh er e t h e a u t h or ma y pl a ce in dividu a l a ckn owl edgmen t of ot h er s • Ref er en ces. • Nea r l y a l l RFCs con t a in cit a t ion s t o ot h er docu men t s, a n d t h ese a r e l ist ed in a Ref er en ces sect ion n ea r t h e en d of t h e RFC. Th er e a r e ma n y st yl es f or r ef er en ces, a n d t h e RFCs h a ve on e of t h eir own .

Se c ur it y c o nside r at io ns se c t io n. Al l RFCs mu st con t a in a sect ion n ea r t h e en d of t h e docu men t t h a t discu sses t h e secu r it y con sider a t ion s of t h e pr ot ocol or pr ocedu r es t h a t a r e t h e ma in t opic of t h e RFC. Aut ho r ’s addr e ss se c t io n. Ea ch RFC mu st h a ve a t t h e ver y en d a sect ion givin g t h e a u t h or ’s a ddr ess, in cl u din g t h e n a me a n d post a l a ddr ess, t h e t el eph on e n u mber , a FAX n u mber (opt ion a l ), a n d t h e In t er n et ema il a ddr ess. Ot he r RFC Fo r mat Re quir e me nt s (c o nt inue d) • Secu r it y con sider a t ion s. • Al l RFCs mu st con t a in a sect ion n ea r t h e en d of t h e docu men t t h a t discu sses t h e secu r it y con sider a t ion s of t h e pr ot ocol or pr ocedu r es t h a t a r e t h e ma in t opic of t h e RFC. • Au t h or ’s a ddr ess. • Ea ch RFC mu st h a ve a t t h e ver y en d a sect ion givin g t h e a u t h or ’s a ddr ess, in cl u din g t h e n a me a n d post a l a ddr ess, t h e t el eph on e n u mber , a FAX n u mber (opt ion a l ), a n d t h e In t er n et ema il a ddr ess.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 17 Requirements in RFCs Th e f ir st

RFCs l ed t o a mbigu it y in t h e pr ot ocol ; n ot ever yon e r ea ds a n d in t er pr et s a l ike. Th er ef or e, most RFCs h a ve t h e f ol l owin g t o in dica t e pr ecisel y wh a t sh ou l d be impl emen t ed a n d wh a t is opt ion a l : MUST. Th is wor d or t h e a dject ive “REQUIRED” mea n s t h a t t h e it em is a n a bsol u t e r equ ir emen t of t h is specif ica t ion . MUST NOT. Th is ph r a se mea n s t h e it em is a n a bsol u t e pr oh ibit ion of t h is specif ica t ion . SHOULD. Th is wor d or t h e a dject ive “RECOMMENDED” mea n s t h a t t h er e ma y exist va l id r ea son s in pa r t icu l a r cir cu mst a n ces t o ign or e t h is it em, bu t t h e f u l l impl ica t ion s sh ou l d be u n der st ood a n d t h e ca se ca r ef u l l y weigh ed bef or e ch oosin g a dif f er en t cou r se. SHOULD NOT. Th is ph r a se mea n s t h a t t h er e ma y exist va l id r ea son s in pa r t icu l a r cir cu mst a n ces wh en t h e l ist ed beh a vior is a ccept a bl e or even u sef u l , bu t t h e f u l l impl ica t ion s sh ou l d be u n der st ood a n d t h e ca se ca r ef u l l y weigh t ed bef or e impl emen t in g a n y beh a vior descr ibed wit h t h is l a bel . MAY. Th is wor d or t h e a dject ive “OPTIONAL” mea n s t h a t t h is it em is t r u l y opt ion a l . On e ven dor ma y ch oose t o in cl u de t h e it em beca u se a pa r t icu l a r ma r ket pl a ce r equ ir es it or beca u se it en h a n ces t h e pr odu ct . An ot h er ven dor ma y omit t h e sa me it em.

Re quir e me nt s in RFCs • MUST—Th e wor d or a dject ive “REQUIRED” mea n s t h a t t h e it em is a n a bsol u t e r equ ir emen t of t h is specif ica t ion . • MUST NOT—Th is ph r a se mea n s t h e it em is a n a bsol u t e pr oh ibit ion of t h is specif ica t ion . • SHOULD—Th e wor d or t h e a dject ive “RECOMMENDED” mea n s t h a t t h er e ma y exist va l id r ea son in pa r t icu l a r cir cu mst a n ces t o ign or e t h is it em, bu t t h e f u l l impl ica t ion s sh ou l d be u n der st ood a n d t h e ca se ca r ef u l l y weigh ed bef or e ch oosin g a dif f er en t cou r se. • SHOULD NOT—Th is ph r a se mea n s t h a t t h er e ma y exist va l id r ea son s in pa r t icu l a r cir cu mst a n ces wh en t h e l ist ed beh a vior is a ccept a bl e or even u sef u l , bu t t h e f u l l impl ica t ion s sh ou l d be u n der st ood a n d t h e ca se ca r ef u l l y weigh ed bef or e impl emen t in g a n y beh a vior descr ibed wit h t h is l a bel . • MAY—Th is wor d or t h e a dject ive “OPTIONAL” mea n s t h a t t h is it em is t r u l y opt ion a l . On e ven dor ma y ch oose t o in cl u de t h e it em beca u se a pa r t icu l a r ma r ket pl a ce r equ ir es it or beca u se it en h a n ces t h e pr odu ct , wh il e a n ot h er ven dor ma y omit t h e sa me it em.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 18 TCP/IP: The Protocols (covered in this book) and the OSI Model Th e best

wa y t o in t r odu ce TCP/IP is by l ookin g a t it t h r ou gh t h e ISO OSI model . I a m n ot goin g t o discu ss t h e OSI model a n d it s l a yer f u n ct ion s h er e. I a m pl a cin g t h e pr ot ocol of TCP/IP in t o t h is model t o sh ow you wh er e t h e pr ot ocol su it e sit s in t h is model . Let ’s st a r t wit h u n der st a n din g t h e f u n ct ion s a n d pr ot ocol s by st u dyin g t h eir pl a cemen t in t h e OSI model . Th is sl ide sh ows t h a t t h e pr ot ocol su it e of TCP/IP h a s it s pl a ce in t h e OSI model . Th e h ea r t of t h e TCP/IP n et wor k pr ot ocol is a t l a yer s 3 a n d 4. Th e a ppl ica t ion s f or t h is pr ot ocol (f il e t r a n sf er , ma il , a n d t er min a l emu l a t ion ) r u n a t t h e session t h r ou gh t h e a ppl ica t ion l a yer . As you ca n see, t h is pr ot ocol r u n s in depen den t l y of t h e da t a –l in k a n d ph ysica l l a yer . At t h ese l a yer s, t h e TCP/IP pr ot ocol ca n r u n on Et h er n et , Token Rin g, FDDI, ser ia l l in es, X.25, a n d so f or t h . It h a s been a da pt ed t o r u n over a n y LAN or WAN pr ot ocol . TCP/IP wa s f ir st u sed t o in t er con n ect compu t er syst ems t h r ou gh syn ch r on ou s l in es a n d n ot h igh –speed l oca l a r ea n et wor ks. Toda y, it is u sed on a n y t ype of media . Th is in cl u des ser ia l l in es (a syn ch r on ou s a n d syn ch r on ou s) a n d h igh –speed n et wor ks su ch a s FDDI, Et h er n et , Token Rin g, a n d Asyn ch r on ou s Tr a n sf er Mode (ATM).

TCP/IP: Th e Pr ot ocol s (cover ed in t h is book) a n d t h e OSI Model

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 19 The Protocol Suite, According to This Book 1. Th e In t er n et Pr ot ocol (IPv4 a n d IPv6): RIP, RIP2, OSPF, ICMP, IGMP, RSVP, a n d ARP 2. Th e Tr a n spor t Con t r ol Pr ot ocol a n d t h e User Da t a gr a m Pr ot ocol (TCP a n d UDP) 3. Th e su it e of specif ic a ppl ica t ion s specif ica l l y devel oped f or TCP/IP: TELNET Fil e Tr a n sf er Pr ot ocol (FTP) Tr ivia l Fil e Tr a n sf er Pr ot ocol (TFTP) Doma in Na me Ser vice (DNS) Simpl e Ma il Tr a n sf er Pr ogr a m (SMTP) Rea l Time Pr ot ocol (RTP) Rea l Time Con t r ol Pr ot ocol (RTCP) Boot Pr ot ocol (BOOTP) Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP) Simpl e Net wor k Ma n a gemen t Pr ot ocol (SNMP) Th er e a r e ma n y ot h er a ppl ica t ion s t h a t r u n on a n et wor k u sin g t h e TCP/IP pr ot ocol su it e t h a t a r e n ot sh own h er e. In cl u ded in t h is l ist in g a r e t h e a ppl ica t ion s t h a t a r e def in ed in t h e RFCs a n d a r e u su a l l y in cl u ded in ever y TCP/IP pr ot ocol su it e t h a t is of f er ed. However , n ewer a ppl ica t ion s or pr ot ocol s f or TCP/IP a r e somet imes n ot in cl u ded.

The Pr o t o c o l Suit e , Ac c o r ding t o This Bo o k • TCP/IP is a f a mil y of pr ot ocol s. • In t er n et Pr ot ocol (IPv4 a n d IPv6) • RIPv1, RIPv2, OSPF, ICMP, IGMP, RSVP, ARP • Tr a n spor t Con t r ol Pr ot ocol a n d t h e User Da t a gr a m Pr ot ocol • TCP a n d UDP • Su it e of a ppl ica t ion s • TELNET • Fil e Tr a n sf er Pr ot ocol (FTP) • Tr ivia l Fil e Tr a n sf er Pr ot ocol (TFTP) • Doma in Na me Ser ver (DNS) • Simpl e Ma il Tr a n sf er Pr ot ocol (SMTP) • Rea l Time Pr ot ocol (RTP) • Rea l Time Con t r ol Pr ot ocol (RTCP) • Boot st r a p Pr ot ocol (BOOTP) • Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 20 IP Overview Th e In t er n et

Pr ot ocol (IP) is sit u a t ed a t t h e n et wor k l a yer of t h e OSI model a n d is design ed t o in t er con n ect pa cket swit ch ed commu n ica t ion n et wor ks t o f or m a n in t er n et . It t r a n smit s bl ocks of da t a ca l l ed datagrams r eceived f r om t h e IP’s u pper –l a yer sof t wa r e t o a n d f r om sou r ce a n d dest in a t ion h ost s. It pr ovides a best ef f or t or con n ect ion l ess del iver y ser vice bet ween t h e sou r ce a n d dest in a t ion —con n ect ion l ess in t h a t it does n ot est a bl ish a session bet ween t h e sou r ce a n d dest in a t ion bef or e it t r a n smit s it s da t a . Th is is t h e l a yer t h a t is a l so r espon sibl e f or t h e IP pr ot ocol a ddr essin g. In or der t o a l l ow f or mu l t ipl e IP n et wor ks t o in t er oper a t e, t h er e mu st be a mech a n ism t o pr ovide f l ow bet ween t h e dif f er en t l y a ddr essed syst ems. Th e device t h a t r ou t es da t a bet ween dif f er en t IP a ddr essed n et wor ks is ca l l ed a router, wh ich is of t en er r on eou sl y t h ou gh t of a s bein g t h e on l y f u n ct ion of t h e IP l a yer . It is n ot , a n d t h is is expl a in ed in mor e det a il l a t er . Th e r ou t er is ba sica l l y a t r a f f ic cop. You t el l t h e t r a f f ic cop wh er e you wa n t t o go a n d h e poin t s you in t h e r igh t dir ect ion . Rou t er s con t a in por t s t h a t a r e ph ysica l con n ect ion s t o n et wor ks. Ea ch of t h ese por t s mu st be a ssign ed a l oca l a ddr ess. Wit h mor e t h a n on e r ou t er , ea ch r ou t er mu st kn ow t h e ot h er s’ con f igu r ed in f or ma t ion . We cou l d con f igu r e a l l t h e IP a ddr esses a n d t h eir a ssocia t ed por t s on a r ou t er st a t ica l l y, bu t t h is is a ver y t ime–con su min g a n d n on ef f icien t met h od. Th er ef or e, we h a ve pr ot ocol s t h a t dist r ibu t e t h e IP a ddr ess in f or ma t ion t o ea ch r ou t er . Th ese a r e ca l l ed routing protocols. Th e t wo ma in t ypes f or IP n et wor ks a r e RIP (Rou t in g In f or ma t ion Pr ot ocol , ver sion 1 or 2) a n d OSPF (Open Sh or t est Pa t h Fir st ). Bot h a r e kn own a s In t er ior Ga t ewa y Pr ot ocol s (IGPs), pr ot ocol s t h a t r u n wit h in a sin gl e a u t on omou s syst ems. An a u t on omou s syst em is a col l ect ion of n et wor ks a n d r ou t er s t h a t is u n der on e a dmin ist r a t ive doma in . For exa mpl e, if you wor k f or t h e Timbu kt u Compa n y a n d you h a ve seven r egion a l of f ices in t h e Un it ed St a t es, a l l commu n ica t ion bet ween t h ose of f ices is a ccompl ish ed via r ou t er s a l l r u n n in g RIP. You h a ve on e doma in kn own a s Timbu kt u .com; t h er ef or e, a l l t h e n et wor ks a n d r ou t er s a n d compu t er equ ipmen t is u n der on e a dmin ist r a t ive doma in . Con n ect ion t o t h e ou t side wor l d via t h e In t er n et (wh ich is a n ot h er doma in ) a l l ows commu n ica t ion wit h a n ot h er compa n y t h a t is u n der a n ot h er a dmin ist r a t ive doma in .

IP Ove r vie w • IP is design ed t o in t er con n ect pa cket swit ch ed commu n ica t ion n et wor ks t o f or m a n in t er n et . • It t r a n smit s bl ocks of da t a kn own a s da t a gr a ms r eceived f r om IP’s u pper –l a yer sof t wa r e t o a n d f r om h ost s. • IP pr ovides best –ef f or t or con n ect ion l ess del iver y ser vice. • IP is r espon sibl e f or a ddr essin g. • Two ver sion s of IP: ver sion 4 a n d ver sion 6. • Net wor k in f or ma t ion is dist r ibu t ed via r ou t in g pr ot ocol s.

You sh ou l d be a wa r e t h er e a r e t wo ver sion of IP: IPv4 (ver sion 4, t h e cu r r en t IP) a n d IPv6 (ver sion 6, t h e exper imen t a l IP). IPv4 con t in u es t o oper a t e a dmir a bl y, bu t h a s become st r a in ed wit h “pa t ch es” t o ma ke it con t in u e t o wor k. Th e l a t est is t h e a ddr ess sch eme a n d IPv6 wa s pa r t ia l l y mot iva t ed by t h e in a bil it y t o sca l e a n d t h e exh a u st ion of IP Cl a ss B a ddr esses. IPv6 is a n a t u r a l evol u t ion of IP a n d ext en ds t h e a ddr ess spa ce t o 128 bit s a n d cl ea n s u p a l ot of u n u sed f u n ct ion s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 21 IGPs, EGPs, and Routing Protocols IGPs, EGPs, and Ro ut ing Pr o t o c o l s • Th er e is a dif f er en ce bet ween a r ou t in g pr ot ocol a n d a r ou t a bl e pr ot ocol . • A r ou t in g pr ot ocol is on e t h a t is u sed t o pr opa ga t e r ou t e pa t h in f or ma t ion on a n et wor k • A r ou t a bl e pr ot ocol is on e t h a t h a s t h e a bil it y t o be r ou t ed a s opposed t o a n on r ou t a bl e pr ot ocol su ch a s Net BIOS • IGPs a r e u sed a s r ou t in g pr ot ocol s wit h in a n AS. • EGPs a r e u sed a s r ou t in g pr ot ocol s bet ween ASs.

Th er e a r e t wo cl a ssif ica t ion s of pr opa ga t in g in f or ma t ion : In t er ior

Ga t ewa y Pr ot ocol s (IGP) a n d Ext er ior Ga t ewa y Pr ot ocol s (EGP). An IGP is a r ou t in g pr ot ocol t h a t pr opa ga t es in f or ma t ion in side on e a u t on omou s syst em. An EGP is a r ou t in g pr ot ocol t h a t pr opa ga t es in f or ma t ion bet ween a u t on omou s syst ems. In or der f or da t a t o be moved a cr oss a n in t er n et , in f or ma t ion on t h e l oca t ion of t h e n et wor ks mu st be pr opa ga t ed t h r ou gh ou t t h e n et wor k. Th is is t h e in t r odu ct ion t o t h e dif f er en ce bet ween a r ou t in g pr ot ocol a n d a r ou t a bl e pr ot ocol . IP is a routable pr ot ocol . Pr opa ga t in g in f or ma t ion t h r ou gh ou t t h e n et wor k a s t o t h e l oca t ion of t h e n et wor ks is kn own a s a routing pr ot ocol . Don ’t con f u se t h e t wo. I kn ow t h a t I keep u sin g t h e t er m autonomous system (AS). Yes, it is def in ed a s a n et wor k t h a t is u n der a sin gl e a dmin ist r a t ive con t r ol , bu t l et ’s def in e t h a t a l it t l e—a n d yes, it does get a l it t l e bl u r r y. Bef or e t h e pl et h or a of ISPs, a n yon e con n ect ed t o t h e In t er n et wa s a ssign ed a n a ddr ess a n d u sed a specia l pr ot ocol (t h en kn own a s EGP) t o con n ect t o t h e In t er n et . Th er ef or e, t h a t con n ect ion beca me kn own a s a n autonomous system, a n d r ou t es f or t h a t n et wor k wer e kn own on t h e In t er n et u sin g EGP (yes, t h e a cr on ym f or t h e pr ot ocol is t h e sa me on e u sed f or t h e def in it ion of t h e pr ot ocol ). Au t on omou s

syst ems wer e simpl y en t it ies con n ect ed t o t h e In t er n et . Th ey wer e given a specia l AS n u mber , a n d EGP kn ew h ow t o r ou t e t h is da t a . An AS cou l d mea n a f ou r –u ser of f ice wit h a sin gl e In t er n et con n ect ion , a n et wor k a s l a r ge a s t h e on e u sed by Gen er a l Mot or s, or a n In t er n et Ser vice Pr ovider (ISP). So don ’t get con f u sed by t h e t er m autonomous system. Toda y, ISPs r u l e t h e con n ect ion t o t h e In t er n et a n d a n AS is mor e bl u r r y. Th e n ew pr ot ocol t h a t con t r ol s r ou t es on t h e In t er n et is kn own a s Bor der Ga t ewa y Pr ot ocol (BGP), a n d it is a n EGP (a s opposed t o a n IGP). However , on l y cer t a in ISPs n eed t h is pr ot ocol ; a l l ot h er s a r e simpl y con n ect ion s (h ier a r ch ica l ) of f of t h eir u pst r ea m ISP. So AS t a kes on a n ew mea n in g. For ou r pu r poses, yes, it st il l mea n s a sin gl e cu st omer n et wor k, bu t f or t h e In t er n et , it is gen er a l l y t h e u pper –en d ISP. Ma n y IP n et wor ks a r e simpl y r u n n in g a s pa r t of t h eir ISP AS.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 22 Introduction to Routing Protocols (RIP) Int r o duc t io n t o Ro ut ing Pr o t o c o l s (RIP) • Root ed in t h e ea r l y da ys of t h e ARPAn et . • Hist or ica l l y t ied t o t h e Xer ox XNS n et wor k oper a t in g syst em • IP is a r ou t a bl e pr ot ocol , it n eeds a r ou t in g pr ot ocol t o r ou t e bet ween su bn et s. • It is kn own a s a dist a n ce vect or pr ot ocol . • It bu il ds a t a bl e of kn own n et wor ks, wh ich is dist r ibu t ed t o ot h er r ou t er s. • A h op is on e r ou t er t r a ver sed.

Th er e a r e a f ew pr ot ocol s t h a t

h a n dl e f or a sin gl e a u t on omou s syst em. RIP is t h e ea sier of t h e t wo (RIP or OSPF) a n d ca me f r om t h e Xer ox Net wor k Syst em (XNS) pr ot ocol . Th e or igin s of RIP a r e ba sed in t h e or igin s of t h e In t er n et , bu t h ist or ica l l y it ca me f r om Xer ox a n d it s XNS pr ot ocol . RIP wa s f r eel y dist r ibu t ed in t h e Un ix oper a t in g syst em a n d, beca u se of it s simpl icit y, ga in ed widespr ea d a ccept a n ce. Un f or t u n a t el y, t h er e a r e ma n y def icien cies a ssocia t ed wit h t h is pr ot ocol , a n d t h er e h a ve been ma n y “pa t ch es” a ppl ied t o it t o ma ke it wor k mor e r el ia bl y in l a r ge n et wor ks. For sma l l er n et wor ks, t h e pr ot ocol wor ks ju st f in e. Sin ce, IP is a routable protocol, it n eeds a routing protocol t o en a bl e it t o r ou t e bet ween n et wor ks. RIP is kn own a s a distance vector pr ot ocol . It s da t a ba se (t h e r ou t in g t a bl e) con t a in s t wo f iel ds n eeded f or r ou t in g: a vect or (a kn own IP a ddr ess) a n d t h e dist a n ce (h ow ma n y r ou t er s a wa y) t o t h e dest in a t ion . Act u a l l y, t h e t a bl e con t a in s mor e f iel ds t h a n t h a t , bu t we wil l discu ss t h a t l a t er . RIP simpl y bu il ds a t a bl e in memor y t h a t con t a in s a l l t h e r ou t es t h a t it kn ows a bou t a n d t h e dist a n ce t o t h a t n et wor k. Wh en t h e pr ot ocol in it ia l iz es, it simpl y pl a ces t h e IP a ddr esses of it s l oca l in t er f a ces in t o t h e t a bl e. It a ssocia t es a cost wit h t h ose

in t er f a ces a n d t h a t cost is u su a l l y set t o 1 (expl a in ed in a momen t ). Th e r ou t er wil l t h en sol icit (or it ma y wa it f or in f or ma t ion t o be su ppl ied t o it ) in f or ma t ion f r om ot h er r ou t er s on it s l oca l l y a t t a ch ed su bn et s. Even t u a l l y, a s ot h er r ou t er s r epor t (sen d t h eir t a bl es) t o ot h er r ou t er s, ea ch r ou t er wil l h a ve t h e in f or ma t ion n eeded a bou t a l l r ou t es on it s su bn et s or in t er n et wor k. An y IP da t a gr a ms t h a t mu st t r a ver se a r ou t er in t h e pa t h t o it s dest in a t ion is sa id t o h a ve t r a ver sed on e h op f or ea ch r ou t er t r a ver sed. Th er ef or e, wh en a r ou t er r eceives a pa cket a n d exa min es t h e dest in a t ion a ddr ess in t h e da t a gr a m, it wil l t h en per f or m a t a bl e l ooku p ba sed on t h a t dest in a t ion a ddr ess. Th e r ou t er wil l a l so f in d t h e por t a ssocia t ed wit h t h is dest in a t ion a ddr ess in t h e da t a ba se a n d wil l f or wa r d t h e da t a gr a m ou t of t h a t por t a n d on wa r d t o t h e f in a l dest in a t ion . In RIP, a l l r ou t er s compu t e t h eir t a bl es a n d t h en give ea ch ot h er t h eir t a bl es (ju st t h e IP n et wor k a ddr ess a n d t h e cost ). Rou t er s t h a t r eceive t h is t a bl e wil l a dd t h e cost a ssign ed t o t h e in comin g in t er f a ce (r eceived por t ) t o ea ch of t h e en t r ies in t h e t a bl e. Th e r ou t er t h en decides wh et h er t o keep a n y of t h e in f or ma t ion in t h e r eceived t a bl e. Th is in f or ma t ion is t h en pa ssed t o ot h er r ou t er s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 23 Introduction to Routing Protocols (OSPF) OSPF is a l so r ou t in g pr ot ocol , bu t

it does n ot compa r e t o RIP wit h t h e except ion t h a t it , t oo, is a n IGP. Of cou r se, l et ’s be f a ir . In t h e begin n in g, wh en t h e In t er n et wa s cr ea t ed, t h e pr ocessor s t h a t we h a d wer e n owh er e n ea r t h e power of wh a t we h a ve t oda y. In f a ct , a Hon eywel l 516 min icompu t er wa s u sed a s t h e f ir st r ou t er (t h en ca l l ed a n In t er n et Messa ge Pr ocessor , or IMP). Th e on l y micr o–CPU in t h ose da ys wa s t h e Z80 f r om Zil og. RIP wor ked gr ea t on t h e r ou t er s t h a t we h a d a t t h a t t ime. It h a d ver y l ow over h ea d (compu t a t ion a l l y spea kin g). OSPF is a gr ea t pr ot ocol , bu t a t t h e t ime of RIP, t h er e wa s n o ma ch in e t h a t cou l d r u n it econ omica l l y. Toda y, wit h t h e f a st er pr ocessor s a n d pl en t if u l memor y, OSPF is t h e r ou t in g pr ot ocol of ch oice (f or open r ou t in g pr ot ocol s, t h a t is). It is ver y ef f icien t wh en it comes t o t h e n et wor k, a l t h ou gh it is a compl ica t ed pr ot ocol a n d is ver y CPU in t en sive wh en it bu il ds it s r ou t in g t a bl e. OSPF is a n IGP pr ot ocol . It exch a n ges r ou t in g in f or ma t ion wit h in a sin gl e a u t on omou s syst em (descr ibed a s t h ose n et wor ks a n d r ou t er s gr ou ped in t o a sin gl e doma in u n der on e a u t h or it y). It ca n be u sed in sma l l , mediu m, or l a r ge in t er n et wor ks, bu t t h e most dr a ma t ic ef f ect s wil l be r ea dil y n ot iced on l a r ge IP n et wor ks. As opposed t o RIP (a dist a n ce vect or pr ot ocol ), OSPF is a l in k–st a t e pr ot ocol . It ma in t a in s t h e st a t e of ever y l in k in t h e doma in , a n d in f or ma t ion is flooded t o a l l r ou t er s in t h e doma in . Fl oodin g is t h e pr ocess of r eceivin g t h e in f or ma t ion on on e por t a n d t r a n smit t in g it t o a l l ot h er a ct ive por t s on t h e r ou t er . In t h is wa y, a l l r ou t er s r eceive t h e sa me in f or ma t ion . Th is in f or ma t ion is st or ed in a da t a ba se ca l l ed t h e link–state da t a ba se, wh ich is iden t ica l on ver y r ou t er in t h e AS (or ever y a r ea if t h e doma in is spl it in t o mu l t ipl e a r ea s). Ba sed on in f or ma t ion in t h e l in k–st a t e da t a ba se, a n a l gor it h m kn own a s t h e Dykst r a a l gor it h m r u n s a n d pr odu ces a sh or t est –pa t h t r ee ba sed on t h e met r ics, u sin g it sel f a s t h e r oot of t h e t r ee. Th e in f or ma t ion t h is pr odu ces is u sed t o bu il d t h e r ou t in g t a bl e.

Int r o duc t io n t o Ro ut ing Pr o t o c o l s (OSPF) • OSPF is a n IGP r ou t in g pr ot ocol . • Oper a t es dif f er en t l y t h a n RIP. • Used on sma l l , mediu m, a n d l a r ge n et wor ks. • Most ben ef icia l on l a r ge, compl ex n et wor ks • It is a l in k–st a t e pr ot ocol . • It ma in t a in s t h e kn owl edge of a l l l in ks (in t er f a ces) in t h e AS • Th e l in k in f or ma t ion is f l ooded t o a l l ot h er r ou t er s in t h e AS (or a r ea ). • Al l r ou t er s r eceive t h e sa me l in k in f or ma t ion • Al l r ou t er s compu t e t h eir own t a bl es ba sed on t h e l in k in f or ma t ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 24 Other IP–Related Protocols Th e In t er n et

Con t r ol Messa ge Pr ot ocol (ICMP) is a n ext en sion of t h e IP l a yer . Th is is t h e r ea son t h a t it u ses a n IP h ea der a n d n ot a UDP (User Da t a gr a m Pr ot ocol ) h ea der . Th e pu r pose of ICMP is t o r epor t or t est cer t a in con dit ion s on t h e n et wor k. IP del iver s da t a a n d h a s n o ot h er f or m of commu n ica t ion . ICMP pr ovides some er r or r epor t in g mech a n ism f or IP. Ba sica l l y, it a l l ows in t er n et devices (h ost s or r ou t er s) t o t r a n smit er r or or t est messa ges. Th ese er r or messa ges ma y be t h a t a n et wor k dest in a t ion ca n n ot be r ea ch ed or t h ey ma y gen er a t e/r epl y t o a n ech o r equ est pa cket (PING, expl a in ed l a t er ). Th e In t er n et Gr ou p Ma n a gemen t Pr ot ocol (IGMP) is a n ext en sion of t h e IP pr ot ocol t h a t a l l ows f or mu l t ica st in g t o exist f or IP. Th e mu l t ica st a ddr ess a l r ea dy exist ed f or IP bu t t h er e wa s n ot a con t r ol pr ot ocol t o a l l ow it t o exist on a n et wor k. IGMP is a pr ot ocol t h a t oper a t es in wor kst a t ion s a n d r ou t er s a n d a l l ows t h e r ou t er s t o det er min e wh ich mu l t ica st a ddr esses exist on t h eir segmen t s. Wit h t h is kn owl edge, r ou t er s ca n bu il d mu l t ica st t r ees a l l owin g mu l t ica st da t a t o be r eceived a n d pr opa ga t ed t o t h eir mu l t ica st wor kst a t ion s. IGMP h ea der s a r e u sed a s t h e ba sis f or a l l mu l t ica st r ou t in g pr ot ocol s f or IPv4. RSVP is ca l l ed t h e resource reservation protocol a n d a l l ows some sembl a n ce of Qu a l it y of Ser vice (QoS) t o exist u sin g IP. It u sed t o be we cou l d in cr ea se t h e speed of a n et wor k t o a l l ow mor e ba n dwidt h on wh ich t o f it h u n gr y a ppl ica t ion s. Wit h t h a t ca pa bil it y, QoS wa s essen t ia l l y ign or ed. However , ba n dwidt h ca n n ot con t in u a l l y expa n d. Th e In t er n et wa s n ot pr ovision ed f or Qu a l it y of Ser vice, a n d RSVP is t h e f ir st a t t empt t o a l l ow f or it . It s ben ef it s a r e a ppa r en t in mu l t ica st in g a ppl ica t ion s, bu t it ca n be u sed wit h u n ica st a ppl ica t ion s a s wel l . It a l l ows st a t ion s on t h e n et wor k t o r eser ve r esou r ces via t h e r ou t er s on t h e n et wor k.

Ot he r IP–Re l at e d Pr o t o c o l s • ICMP is a n ext en sion of t h e IP pr ot ocol . • IP is con n ect ion l ess • Possibl e t o h a ve er r or s bu t t h ey a r e n ot r epor t ed by IP • ICMP a l l ows f or in t er n et devices t o t r a n smit er r or or t est messa ges • IGMP is a l so a n ext en sion of t h e IP pr ot ocol . • Al l ows f or mu l t ica st t o oper a t e on a n in t er n et wor k • Al l ows h ost s t o iden t if y t h e gr ou ps t h ey wa n t t o t h e r ou t er • RSVP is a n en t r a n ce t o pr ovidin g QoS on a n IP in t er n et . • Al l ows devices t o r eser ve r esou r ces on t h e n et wor k • ARP pr ovides t h e a bil it y t o t r a n sl a t e bet ween 48–bit ph ysica l –l a yer a ddr esses a n d 32–bit IP a ddr esses.

ARP is n ot r ea l l y pa r t of t h e n et wor k l a yer ; it r esides bet ween t h e IP a n d da t a –l in k l a yer s. It is t h e pr ot ocol t h a t t r a n sl a t es bet ween t h e 32–bit IP a ddr ess a n d a 48–bit Loca l Ar ea Net wor k a ddr ess. ARP is on l y u sed wit h IPv4; IPv6 h a s n o con cept of ARP. Sin ce IP wa s n ot in t en ded t o r u n over a LAN, a n a ddr ess sch eme wa s impl emen t ed t o a l l ow ea ch h ost a n d n et wor k on t h e in t er n et t o iden t if y it sel f . Wh en TCP/IP wa s a da pt ed t o r u n over t h e LAN, t h e IP a ddr ess h a d t o be ma pped t o t h e 48–bit da t a l in k or ph ysica l a ddr ess t h a t LANs u se, a n d ARP is t h e pr ot ocol t h a t a ccompl ish es it .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 25 Introduction to Transport Layer Protocols Int r o duc t io n t o Tr anspo r t Laye r Pr o t o c o l s • TCP pr ovides f or r el ia bl e da t a t r a n sf er u sin g sequ en ce n u mber s a n d a ckn owl edgmen t s. • UDP pr ovides a simpl e con n ect ion l ess t r a n spor t l a yer t o a l l ow a ppl ica t ion s a ccess t o t h e IP. • RTP a n d RTCP a r e f r a mewor k pr ot ocol s t h a t a r e u su a l l y in cor por a t ed in t o a n a ppl ica t ion . • It is pl a ced a t t h e t r a n spor t l a yer sof t wa r e t o wor k a l on gside TCP

Sin ce IP pr ovides f or

a con n ect ion l ess del iver y ser vice of TCP (Tr a n smission Con t r ol Pr ot ocol ) da t a , TCP pr ovides a ppl ica t ion pr ogr a ms a ccess t o t h e n et wor k, u sin g a r el ia bl e con n ect ion –or ien t ed t r a n spor t –l a yer ser vice. Th is pr ot ocol is r espon sibl e f or est a bl ish in g session s bet ween u ser pr ocesses on t h e in t er n et , a n d a l so en su r es r el ia bl e commu n ica t ion s bet ween t wo or mor e pr ocesses. Th e f u n ct ion s t h a t it pr ovides a r e t o: 1. 2. 3. 4.

List en f or in comin g session est a bl ish men t r equ est s Requ est a session t o a n ot h er n et wor k st a t ion Sen d a n d r eceive da t a r el ia bl y u sin g sequ en ce n u mber s a n d a ckn owl edgmen t s Gr a cef u l l y cl ose a session

Th e User Da t a gr a m Pr ot ocol (UDP) pr ovides a ppl ica t ion pr ogr a ms a ccess t o t h e n et wor k u sin g a n u n r el ia bl e con n ect ion l ess t r a n spor t –l a yer ser vice. It a l l ows t h e t r a n sf er of da t a bet ween sou r ce a n d dest in a t ion st a t ion s wit h ou t h a vin g t o est a bl ish a session bef or e da t a is t r a n sf er r ed. Th is pr ot ocol a l so does n ot u se t h e en d–t o–en d er r or ch eckin g a n d cor r ect ion t h a t TCP u ses. Wit h UDP, t r a n spor t –l a yer f u n ct ion a l it y is t h er e, bu t t h e over h ea d is l ow. It is pr ima r il y u sed f or t h ose a ppl ica t ion s t h a t do n ot r equ ir e t h e r obu st n ess of t h e TCP pr ot ocol ; f or exa mpl e, ma il , br oa dca st messa ges,

n a min g ser vice, a n d n et wor k ma n a gemen t . Th e Rea l Time Pr ot ocol (RTP) a n d t h e Rea l Time Con t r ol Pr ot ocol (RTCP) a l l ow f or r ea l –t ime a ppl ica t ion s t o t r u l y exist on a n IP n et wor k. RTP r esides a t t h e t r a n spor t l a yer a n d wor ks a l on gside t h e TCP pr ot ocol , a n d is a r epl a cemen t f or t h e TCP pr ot ocol f or r ea l –t ime a ppl ica t ion s. RTCP is t h e pr ot ocol t h a t pr ovides f eedba ck t o t h e RTP a ppl ica t ion a n d l et s t h e a ppl ica t ion kn ow h ow t h in gs a r e goin g on t h e n et wor k. Th e pr ot ocol s a r e a ct u a l l y f r a mewor ks mor e t h a n pr ot ocol s a n d a r e u su a l l y in cl u ded in t h e a ppl ica t ion it sel f r a t h er t h a n r esidin g a s a sepa r a t e pr ot ocol t h a t h a s a n in t er f a ce. Da t a is n ot t h e on l y in f or ma t ion t h a t is bein g pa ssed a r ou n d on t h e In t er n et . Mu l t imedia a ppl ica t ion s su ch a s voice a n d video a r e movin g f r om exper imen t a l st a t u s t o emer gin g. However , voice a n d video ca n n ot simpl y be pl a ced on a con n ect ion l ess, pa cket swit ch ed n et wor k. Th ey n eed some h el p, a n d RTP, a l on g wit h RTCP, pr ovides t h is h el p. Th is in con ju n ct ion wit h RSVP is pa vin g t h e wa y f or r ea l –t ime a ppl ica t ion s on t h e In t er n et .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 26 Introduction to the TCP/IP Standard Applications Int r o duc t io n t o t he TCP/IP St andar d Appl ic at io ns • • • • • •

TELNET—Pr ovides r emot e t er min a l emu l a t ion . FTP—Pr ovides a f il e t r a n sf er pr ot ocol . TFTP—Pr ovides f or a simpl e f il e t r a n sf er pr ot ocol . SMTP—Pr ovides a ma il ser vice. DNS—Pr ovides f or a n a me ser vice. BOOTP/DHCP—Pr ovides f or ma n a gemen t of IP pa r a met er s.

Remot e t er min a l

emu l a t ion is pr ovided t h r ou gh t h e TELNET pr ot ocol . For n ew u ser s of t h e TCP/IP pr ot ocol , t h is is n ot Tel en et , a pa cket swit ch in g t ech n ol ogy u sin g t h e CCITT st a n da r d X.25. It is pr on ou n ced TELNET. Th is is a n a ppl ica t ion –l evel pr ot ocol t h a t a l l ows t er min a l emu l a t ion t o pa ss t h r ou gh a n et wor k t o a r emot e n et wor k st a t ion . TELNET r u n s on t op of t h e TCP pr ot ocol a n d a l l ows a n et wor k wor kst a t ion t o a ppea r a s a l oca l device t o a r emot e device (i.e., a h ost ). Th e Fil e Tr a n sf er Pr ot ocol (FTP) is simil a r t o TELNET in t er ms of con t r ol , bu t t h is pr ot ocol a l l ows f or da t a f il es t o be r el ia bl y t r a n sf er r ed on t h e In t er n et . FTP r esides on t op of TCP a n d u ses it a s it s t r a n spor t mech a n ism. TFTP is a simpl ex f il e t r a n sf er pr ot ocol (ba sed on a n u n r el ia bl e t r a n spor t l a yer ca l l ed UDP), a n d is pr ima r il y u sed f or boot l oa din g of con f igu r a t ion f il es a cr oss a n in t er n et . Th e Simpl e Ma il Tr a n spor t Pr ot ocol (SMTP) is a n el ect r on ic ma il syst em t h a t is r obu st en ou gh t o r u n on t h e en t ir e In t er n et syst em. Th is pr ot ocol a l l ows f or t h e exch a n ge of el ect r on ic ma il bet ween t wo or mor e syst ems on a n in t er n et . Al on g wit h a syst em kn own a s Post Of f ice Pr ot ocol , in dividu a l u ser s ca n r et r ieve t h eir ma il f r om cen t r a l iz ed ma il r eposit or ies.

Th e Doma in Na me Ser vice (DNS) is a cen t r a l iz ed n a me ser vice t h a t a l l ows u ser s t o est a bl ish con n ect ion s t o n et wor k st a t ion s u sin g h u ma n –r ea da bl e n a mes in st ea d of cr ypt ic n et wor k a ddr esses. It pr ovides a n a me–t o–n et wor k a ddr ess t r a n sl a t ion ser vice. Th er e a r e ma n y ot h er f u n ct ion s of DNS, in cl u din g ma il ser ver n a me t o IP a ddr ess t r a n sl a t ion . Ma il ser vice wou l d n ot exist if n ot f or t h e DNS. Th e Boot Pr ot ocol (BOOTP) a n d Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP) a l l ow f or ma n a gemen t of IP pa r a met er s on a n et wor k. Th ese pr ot ocol s do n ot pr ovide f or r ou t er con f igu r a t ion s bu t en dst a t ion con f igu r a t ion s. BOOTP wa s t h e or igin a l pr ot ocol t h a t pr ovided n ot on l y a wor kst a t ion ’s IP a ddr ess bu t possibl y it s oper a t in g ima ge a s wel l . DHCP is best kn own f or it s ma n a gemen t a l l oca t ion sch eme of IP a ddr esses a n d is a su per set of BOOTP t h a t pr ovides ext en ded f u n ct ion s of IP a s wel l a s IP a ddr ess ma n a gemen t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 27 The Internet Protocol (IP) Now t h a t

t h e in t r odu ct ion s a r e over , l et ’s get in t o t h e t ech n ica l det a il s of t h e TCP/IP pr ot ocol su it e. Th e ma in goa l of IP is t o pr ovide in t er con n ect ion of su bn et wor ks (t h e in t er con n ect ion of n et wor ks, expl a in ed l a t er ) t o f or m a n in t er n et in or der t o pa ss da t a . Th e IP pr ot ocol pr ovides f ou r ma in f u n ct ion s: 1. 2. 3. 4.

ba sic u n it f or da t a t r a n sf er , a ddr essin g, r ou t in g, a n d f r a gmen t a t ion of da t a gr a ms.

The Int e r ne t Pr o t o c o l (IP) • IP’s ma in f u n ct ion is t o pr ovide f or t h e in t er con n ect ion of su bn et wor ks t o f or m a n in t er n et in or der t o pa ss da t a . • Th e f u n ct ion s pr ovided by IP a r e: • Ba sic u n it f or da t a t r a n sf er • Addr essin g • Rou t in g • Fr a gmen t a t ion of da t a gr a ms

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 28 Connectionless, Best–Effort Delivery Service Th e IP l a yer

pr ovides t h e en t r y in t o t h e del iver y syst em u sed t o t r a n spor t da t a a cr oss t h e In t er n et . Usu a l l y, wh en a n yon e h ea r s t h e n a me IP, h e or sh e a u t oma t ica l l y t h in ks of t h e n et wor ks con n ect ed t oget h er t h r ou gh devices common l y kn own a s routers, wh ich con n ect mu l t ipl e su bn et wor ks t oget h er . It is t r u e t h e IP per f or ms t h ese t a sks, bu t t h e IP pr ot ocol per f or ms ma n y ot h er t a sks, a s men t ion ed pr eviou sl y. Th e IP pr ot ocol r u n s in a l l t h e pa r t icipa t in g n et wor k st a t ion s t h a t a r e a t t a ch ed t o su bn et wor ks so t h a t t h ey ma y su bmit t h eir pa cket s t o r ou t er s or dir ect l y t o ot h er devices on t h e sa me n et wor k. It r esides bet ween t h e da t a l in k l a yer a n d t h e t r a n spor t l a yer . IP a l so pr ovides f or con n ect ion l ess da t a del iver y bet ween n odes on a n IP n et wor k. Co nne c t io nl e ss, Be st –Ef f o r t De l ive r y Se r vic e • Impl emen t s t wo f u n ct ion s: a ddr essin g a n d f r a gmen t a t ion . • IP en ca psu l a t es da t a h a n ded t o it f r om it s u pper –l a yer sof t wa r e wit h it s h ea der s. • IP del iver s da t a ba sed on a best ef f or t . • Tr a n smit s a n en ca psu l a t ed pa cket a n d does n ot expect a r espon se • IP r eceives da t a h a n ded t o it by t h e da t a l in k. • Deca psu l a t es a pa cket (st r ips it s h ea der s of f ) a n d h a n ds t h e da t a t o it s u pper –l a yer sof t wa r e

Th e pr ima r y goa l of IP is t o pr ovide t h e ba sic a l gor it h m f or t r a n sf er of da t a t o a n d f r om a n et wor k. In or der t o a ch ieve t h is, it impl emen t s t wo f u n ct ion s: addressing a n d fragmentation. It pr ovides a con n ect ion l ess del iver y ser vice f or t h e u pper –l a yer pr ot ocol s. Th is mea n s t h a t IP does n ot set u p a session (a vir t u a l l in k) bet ween t h e t r a n smit t in g st a t ion a n d t h e r eceivin g st a t ion pr ior t o su bmit t in g t h e da t a t o t h e r eceivin g st a t ion . It en ca psu l a t es t h e da t a h a n ded t o it a n d del iver s it on a best–effort ba sis. IP does n ot in f or m t h e sen der or r eceiver of t h e st a t u s of t h e pa cket ; it mer el y

a t t empt s t o del iver t h e pa cket a n d wil l n ot ma ke u p f or t h e f a u l t s en cou n t er ed in t h is a t t empt . Th is mea n s t h a t if t h e da t a l in k f a il s or in cu r s a r ecover a bl e er r or , t h e IP l a yer wil l n ot in f or m a n yon e. It t r ied t o del iver (a ddr essed) a messa ge a n d f a il ed. It is u p t o t h e u pper –l a yer pr ot ocol s (TCP, or even t h e a ppl ica t ion it sel f ) t o per f or m er r or r ecover y. For exa mpl e, if you r a ppl ica t ion is u sin g TCP a s it s t r a n spor t l a yer pr ot ocol , TCP wil l t ime–ou t f or t h a t t r a n smission a n d wil l r esen d t h e da t a . If t h e a ppl ica t ion is u sin g UDP a s it s t r a n spor t , t h en it is u p t o t h e a ppl ica t ion t o per f or m er r or r ecover y pr ocedu r es. IP su bmit s a pr oper l y f or ma t t ed da t a pa cket t o t h e dest in a t ion st a t ion a n d does n ot expect a st a t u s r espon se. Beca u se IP is a con n ect ion l ess pr ot ocol , IP ma y r eceive a n d del iver t h e da t a (da t a sen t t o t h e t r a n spor t l a yer in t h e r eceivin g st a t ion ) in t h e wr on g or der f r om wh ich it wa s sen t , or it ma y du pl ica t e t h e da t a . Aga in , it is u p t o t h e h igh er –l a yer pr ot ocol s (l a yer 4 a n d a bove) t o pr ovide er r or r ecover y pr ocedu r es. IP is pa r t of t h e n et wor k del iver y syst em. It a ccept s da t a a n d f or ma t s it f or t r a n smission t o t h e da t a l in k l a yer . (Remember , t h e da t a l in k l a yer pr ovides t h e a ccess met h ods t o t r a n smit a n d r eceive da t a f r om t h e a t t a ch ed ca bl e pl a n t .) IP a l so r et r ieves da t a f r om t h e da t a l in k a n d pr esen t s it t o t h e r equ est in g u pper l a yer .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 29 Data Encapsulation by Layer IP wil l

a dd it s con t r ol in f or ma t ion (in t h e f or m of h ea der s), specif ic t o t h e IP l a yer on l y, t o t h e da t a r eceived by t h e u pper l a yer (t r a n spor t l a yer ). On ce t h is is a ccompl ish ed, it wil l in f or m t h e da t a l in k (l a yer 2) t h a t it h a s a messa ge t o sen d t o t h e n et wor k. At t h e n et wor k l a yer , en ca psu l a t ed da t a is kn own a s a datagram (r u mor h a s it t h a t t h is t er m wa s coin ed r ef er r in g t o a simil a r messa ge del iver y syst em kn own a s t h e t el egr a m). Th is da t a gr a m ma y be t r a n sf er r ed over h igh –speed n et wor ks (Et h er n et , Token Rin g, FDDI). Wh en t h e da t a l in k l a yer a dds it s h ea der s a n d t r a il er s it is ca l l ed a packet (a t er m r ef er r in g t o a sma l l pa cka ge). Wh en t r a n smit t ed on t o t h e ca bl e, t h e ph ysica l l a yer frames (ba sica l l y wit h sign a l in g in f or ma t ion su ch a s t h e pr ea mbl e f or Et h er n et or t h e f l a g f iel d f or Fr a me Rel a y a n d X.25) t h e in f or ma t ion it h a s r eceived f r om t h e da t a l in k l a yer ; t h er ef or e, it is ca l l ed a frame. For most of u s, t h e t er ms frame a n d packet a r e in t er ch a n gea bl e. If you wa n t t o get in t o a n a r gu men t a bou t t h ose t er ms you n eed t o go f in d t h e peopl e wh o a r e st il l a r gu in g a bou t ba u d a n d bit s per secon d (bps). For simpl icit y, con sider in g t h a t t h e pr ima r y f ocu s of t h e book is n et wor k pr ot ocol s over h igh –speed n et wor ks, pa cket s a n d f r a mes wil l be syn on ymou s. Fr a mes wil l n ot be men t ion ed u n l ess t h e or igin a l specif ica t ion ma n da t ed t h a t t er m. It is impor t a n t t o r emember t h a t IP pr esen t s da t a gr a ms t o it s l ower l a yer (t h e da t a l in k l a yer ). Wh en I t a l k a bou t a da t a gr a m, I a m specif ica l l y t a l kin g a bou t t h e IP l a yer . Wh en I t a l k a bou t a pa cket , I a m specif ica l l y t a l kin g a bou t t h e a ccess l a yer (da t a l in k a n d ph ysica l ). Th e IP pr ot ocol does n ot ca r e wh a t kin d of da t a is in t h e da t a gr a m. Al l it kn ows is t h a t it mu st a ppl y some con t r ol in f or ma t ion , ca l l ed a n IP h ea der , t o t h e da t a r eceived f r om t h e u pper –l a yer pr ot ocol (pr esu ma bl y TCP or UDP) a n d t r y t o del iver it t o some st a t ion on t h e n et wor k or in t er n et .

Da t a En ca psu l a t ion by La yer

Th e IP pr ot ocol is n ot compl et el y wit h ou t mer it . It does pr ovide mech a n isms on h ow h ost s a n d r ou t er s sh ou l d pr ocess t r a n smit t ed or r eceived da t a gr a ms, or wh en a n er r or sh ou l d be gen er a t ed, a n d wh en a n IP da t a gr a m ma y be disca r ded. To u n der st a n d t h e IP f u n ct ion a l it y, a br ief l ook a t t h e con t r ol in f or ma t ion it a dds (t h e IP h ea der ) t o t h e pa cket wil l be sh own .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 30 IPv4 Header Th er e a r e ma n y h ea der

f iel ds in t h e IP h ea der , ea ch wit h a def in ed f u n ct ion t o be det er min ed by t h e r eceivin g st a t ion . Th e IP h ea der is sh own h er e, en ca psu l a t ed in a n Et h er n et pa cket . Th e f ir st f iel d is t h e VERS, or ver sion , f iel d. Th is def in es t h e cu r r en t ver sion of IP impl emen t ed by t h e n et wor k st a t ion . Ver sion 4 is t h e l a t est ver sion . Th e ot h er ver sion s ou t t h er e a r e in exper imen t a l st a ges, or t h e exper imen t s a r e f in ish ed a n d t h e pr ot ocol did n ot ma ke it or wa s u sed t o t est ver sion 6. Th er e a r e t h r ee ver sion s of IP t h a t a r e r u n n in g t oda y: 4, 5, a n d 6. Most do n ot bel ieve t h a t ver sion 5 is ou t t h er e bu t it is; it is kn own a s t h e St r ea ms 2 pr ot ocol . Th e f ol l owin g in f or ma t ion wa s t a ken f r om RFC 1700. Assig ne d Int e r ne t Ve r sio n Numbe r s De c imal Ke ywo r d Ve r sio n Re f e r e nc e s 0 Reser ved 1–3 Un a ssign ed 4 IP In t er n et Pr ot ocol RFC791 5 ST ST Da t a gr a m Mode 6 IPv6 RFC 1883 7 TP/IX TP/IX: Th e Next In t er n et 8 PIP Th e P In t er n et Pr ot ocol 9 TUBA TUBA 10–14 Un a ssign ed 15 Reser ved

IPv4 Hea der

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 31 Header Length, Service Type, and Total Length Fields Th e l en gt h of t h e IP h ea der

(a l l f iel ds except f or t h e IP da t a f iel d) ca n va r y. Not a l l t h e f iel ds in t h e IP h ea der n eed t o be u sed. Fiel ds a r e mea su r ed in t h e a mou n t of 32–bit wor ds. Th e sh or t est IP h ea der wil l be 20 byt es; t h er ef or e, t h is f iel d wou l d con t a in a 5 (20 byt es = 160 bit s; 160 bit s/32 bit s = 5). Th is f iel d is n ecessa r y, f or t h e h ea der ca n be va r ia bl e in l en gt h depen din g on t h e f iel d ca l l ed options. IPv6 h a s a st a t ic–l en gt h h ea der f iel d. Th e ser vice f iel d wa s a gr ea t idea , bu t it is r a r el y u sed a n d is u su a l l y set t o 0. Th is wa s a en t r y t h a t wou l d a l l ow a ppl ica t ion s t o in dica t e t h e t ype of r ou t in g pa t h t h ey wou l d l ike (t h e key poin t h er e is t h a t t h e a ppl ica t ion ch ooses t h is f iel d). For exa mpl e, a r ea l –t ime pr ot ocol wou l d ch oose l ow del a y, h igh t h r ou gh pu t , a n d h igh r el ia bil it y—a f il e t r a n sf er does n ot n eed t h is. A TELNET session cou l d ch oose l ow del a y wit h n or ma l t h r ou gh pu t a n d r el ia bil it y. Th er e is a n ot h er side t o t h is st or y, h owever . Th e r ou t er mu st su ppor t t h is f ea t u r e a s wel l a n d t h is u su a l l y mea n s bu il din g a n d ma in t a in in g mu l t ipl e r ou t in g t a bl es. Th e Ser vice t ype is ma de u p of t h e f ol l owin g f iel ds: pr eceden ce, del a y, t h r ou gh pu t , a n d r el ia bil it y. However , su ppor t in g t h is f iel d ca u sed t h e r ou t er t o su ppor t mu l t ipl e r ou t in g t a bl es per r ou t er , a n d t h is compl ica t ion n ever pr ogr essed wit h t h e r ou t er ven dor s. Th is pr eceden ce bit s of t h e ser vice f iel d ma y h a ve a n en t r y of z er o (n or ma l pr eceden ce) a n d u p t o 7 (n et wor k con t r ol ), wh ich a l l ows t h e t r a n smit t in g st a t ion ’s a ppl ica t ion t o in dica t e t o t h e IP l a yer t h e pr ior it y of sen din g t h e da t a gr a m. Th is is combin ed wit h t h e D (del a y), T (t h r ou gh pu t ), a n d R (r el ia bil it y) bit s. Th is f iel d is kn own a s a Type of Ser vice (TOS) iden t if ier , a n d t h ese bit s in dica t e t o a r ou t er wh ich r ou t e t o t a ke:

Hea der Len gt h , Ser vice Type, a n d Tot a l Len gt h Fiel ds D bit . Requ est l ow del a y wh en set t o 1

T bit . Requ est h igh t h r ou gh pu t wh en set t o 1 R bit . Requ est h igh r el ia bil it y wh en set t o 1 For exa mpl e, if t h er e is mor e t h a n on e r ou t e t o a dest in a t ion , t h e r ou t er cou l d r ea d t h is f iel d t o pick a r ou t e. Th is becomes impor t a n t in t h e OSPF r ou t in g pr ot ocol , wh ich is t h e f ir st IP r ou t in g pr ot ocol t o t a ke a dva n t a ge of t h is. If t h e t r a n sa ct ion is a f il e t r a n sf er , you ma y wa n t t o set t h e bit s t o 0 0 1 t o in dica t e t h a t you do n ot n eed l ow del a y or h igh t h r ou gh pu t , bu t you wou l d l ike h igh r el ia bil it y. TOS f iel ds a r e set by a ppl ica t ion s (i.e., TELNET or FTP) a n d n ot r ou t er s. Rou t er s on l y r ea d t h is f iel d, t h ey do n ot set t h is f iel d. Ba sed on t h e in f or ma t ion r ea d, r ou t er s wil l sel ect t h e opt ima l pa t h f or t h e da t a gr a m. It is u p t o t h e TCP/IP a ppl ica t ion r u n n in g on a h ost t o set t h ese bit s bef or e t r a n smit t in g t h e pa cket on t h e n et wor k. It does r equ ir e a r ou t er t o ma in t a in mu l t ipl e r ou t in g t a bl es—on e f or ea ch t ype of ser vice. Th e t ot a l l en gt h is t h e l en gt h of t h e da t a gr a m (n ot pa cket ) mea su r ed in byt es (t h is f iel d a l l ot s f or 16 bit s, mea n in g t h e da t a a r ea of t h e IP da t a gr a m ma y be 65535 byt es in l en gt h ). IPv6 a l l ows f or a con cept kn own a s jumbo datagrams. Remember , TCP ma y n ot a l wa ys r u n over Et h er n et , Token Rin g, a n d so on . It ma y r u n a s a ch a n n el a t t a ch ed t o a Cr a y su per –compu t er t h a t su ppor t s mu ch l a r ger da t a siz es.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 32 Fragmentation Fr ag me nt at io n • Dif f er en t media a l l ows f or dif f er en t –siz ed da t a gr a ms t o be t r a n smit t ed a n d r eceived. • Fr a gmen t a t ion a l l ows a da t a gr a m t h a t is t oo l a r ge t o be f or wa r ded t o t h e n ext LAN segmen t t o be br oken u p in t o sma l l er segmen t s t o be r ea ssembl ed a t t h e dest in a t ion . • Th e f r a gmen t a t ion occu r s a t t h e r ou t er t h a t ca n n ot f or wa r d it t o t h e n ext in t er f a ce. • Appl ica t ion s sh ou l d u se pa t h MTU discover y t o f in d t h e sma l l est da t a gr a m siz e. • Do n ot depen d on t h e r ou t er

A gr ea t

idea , bu t ba sica l l y discou r a ged, is t h e ca pa bil it y of f r a gmen t a t ion . Th er e ma y be t imes wh en a pa cket t r a n smit t ed f r om on e n et wor k ma y be t oo l a r ge t o t r a n smit on a n ot h er n et wor k. Th e def a u l t da t a gr a m siz e (t h e da t a a n d IP h ea der s bu t n ot t h e Et h er n et pa cket h ea der s of t h e ph ysica l f r a me h ea der s or t r a il er s), kn own a s t h e pa t h MTU, or Ma ximu m Tr a n smission Un it , is def in ed a s t h e siz e of t h e l a r gest pa cket t h a t ca n be t r a n smit t ed or r eceived t h r ou gh a l ogica l in t er f a ce. Th is siz e in cl u des t h e IP h ea der bu t does n ot in cl u de t h e siz e of a n y Lin k La yer h ea der s or f r a min g (Ref er en ce RFC 1812). It def a u l t s t o 576 byt es wh en t h e da t a gr a m is t o be sen t r emot el y (of f t h e l oca l su bn et ). Ma n y IP da t a gr a ms a r e t r a n smit t ed a t 576 byt es, a r ecommen ded st a n da r d siz e, in st ea d of qu eu in g t h e ma x MTU siz e. Bu t wh y cr ippl e n et wor ks t h a t su ppor t l a r ge pa cket s? If a TCP con n ect ion pa t h is f r om FDDI t o Token Rin g, wh y sh ou l d t h e def a u l t da t a gr a m siz e be on l y 576 byt es wh en t h ese media t ypes su ppor t mu ch l a r ger pa cket siz es? Th e a n swer is, it sh ou l dn ’t , bu t we ca n n ot gu a r a n t ee t h a t a n y in t er media t e media t ypes bet ween t h e Token Rin g a n d t h e

FDDI su ppor t t h ose l a r ge siz es. For exa mpl e, su ppose t h e sou r ce is a Token Rin g st a t ion a n d t h e dest in a t ion is a n FDDI st a t ion . In bet ween t h e t wo st a t ion s a r e t wo Et h er n et n et wor ks t h a t su ppor t on l y 1518–byt e pa cket s. Th er e a r e n o t a bl es in t h e r ou t er s or wor kst a t ion s t h a t in dica t e media MTU (ma ximu m t r a n smission u n it ). Th er e is a pr ot ocol (pa t h MTU discover y, RFC 1981 f or IPv6 a n d 1191 f or IPv4) t h a t a l l ows f or t h is, bu t u n der IPv4 it is opt ion a l wh et h er t h e r ou t er a n d wor kst a t ion s impl emen t it . Th er ef or e, t o be sa f e, in st ea d of impl emen t in g RFC 1191, a t r a n smit t in g st a t ion wil l sen d a 576–byt e da t a gr a m or sma l l er wh en it kn ows t h e dest in a t ion is n ot l oca l . An ot h er exa mpl e is wh en a h ost is in it ia l iz ed on a n Et h er n et , it ca n sen d a r equ est f or a h ost ser ver t o boot it . Let ’s sa y t h e boot st r a p h ost is on a n FDDI n et wor k. Th e h ost sen ds ba ck a 4472–byt e messa ge, a n d t h is is r eceived by t h e br idge. Nor ma l l y, t h e br idge wil l disca r d t h e pa cket beca u se br idges do n ot h a ve t h e ca pa bil it y of f r a gmen t in g a n IP da t a gr a m. Th er ef or e, some br idge ven dor s h a ve pl a ced t h e IP f r a gmen t a t ion a l gor it h m in t h eir br idges t o a l l ow f or somet h in g l ike t h is t o occu r . Th is is a gr ea t exa mpl e of h ow pr opr iet a r y (a l beit ba sed on a n st a n da r d) impl emen t a t ion of cer t a in pr ot ocol s ca n ben ef it t h e con su mer . Al t h ou gh a r ou t er wil l f r a gmen t a da t a gr a m, it wil l n ot r ea ssembl e it . It is u p t o t h e r eceivin g h ost t o r ea ssembl e t h e da t a gr a m. Wh y? Wel l , con sider in g t h e impl ica t ion of CPU a n d memor y r equ ir ed t o r ea ssembl e ever y da t a gr a m t h a t wa s f r a gmen t ed, t h is wou l d be a n over wh el min g f ea t u r e of t h e r ou t er . If t h er e wer e 2000 st a t ion s commu n ica t in g a l l u sin g f r a gmen t a t ion , it cou l d ea sil y over wh el m a r ou t er , especia l l y in t h e ea r l y da ys.

A f r a gmen t ed IP da t a gr a m con t a in s t h e f ol l owin g f iel ds: Ide nt if ic at io n. In dica t es wh ich da t a gr a m f r a gmen t s bel on g t oget h er so da t a gr a ms do n ot get misma t ch ed. Th e r eceivin g IP l a yer u ses t h is f iel d a n d t h e sou r ce IP a ddr ess t o iden t if y wh ich f r a gmen t s bel on g t oget h er . Fl ag s. In dica t e wh et h er mor e f r a gmen t s a r e t o a r r ive or n o mor e da t a is t o be sen t f or t h a t da t a gr a m (n o mor e f r a gmen t s). Wh et h er or n ot t o f r a gmen t a da t a gr a m (a don ’t –f r a gmen t bit ). If a r ou t er r eceives a pa cket t h a t it mu st f r a gmen t t o be f or wa r ded a n d t h e don ’t –f r a gmen t bit is set , t h en it wil l disca r d t h e pa cket a n d sen d a n er r or messa ge (t h r ou gh a pr ot ocol kn own a s ICMP, discu ssed l a t er ) t o t h e sou r ce st a t ion . Of f se t . Ea ch IP h ea der f r om ea ch of t h e f r a gmen t ed da t a gr a ms is a l most iden t ica l . Th is f iel d in dica t es t h e of f set (in byt es) f r om t h e pr eviou s da t a gr a m t h a t con t in u es t h e compl et e da t a gr a m. In ot h er wor ds, if t h e f ir st f r a gmen t h a s 512 byt es, t h is of f set wou l d in dica t e t h a t t h is da t a gr a m st a r t s t h e 513t h byt e of t h e f r a gmen t ed da t a gr a m. It is u sed by t h e r eceiver t o pu t t h e f r a gmen t ed da t a gr a m ba ck t oget h er .

Fr a gmen t a t ion (con t in u ed) Usin g, t h e t ot a l l en gt h a n d t h e f r a gmen t of f set f iel ds, IP ca n r econ st r u ct a f r a gmen t ed da t a gr a m a n d del iver it t o t h e u pper –l a yer sof t wa r e. Th e t ot a l l en gt h f iel d in dica t es t h e t ot a l l en gt h of t h e or igin a l pa cket , a n d t h e of f set f iel d in dica t es t o t h e n ode t h a t is r ea ssembl in g t h e pa cket t h e of f set f r om t h e begin n in g of t h e pa cket . It is a t t h is poin t t h a t t h e da t a wil l be pl a ced in t h e da t a segmen t t o r econ st r u ct t h e pa cket .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 33 Time to Live (TTL) Th is f iel d seems t o con f u se ma n y peopl e, so l et ’s st a t e wh a t

it does u p f r on t . Time t o Live (TTL) in dica t es t h e a mou n t of t ime t h a t a da t a gr a m is a l l owed t o st a y on t h e n et wor k. It is n ot u sed by t h e r ou t er s t o cou n t u p t o 16 t o kn ow wh en t o disca r d a pa cket . Th er e a r e t wo f u n ct ion s f or t h e TTL f iel d: t o l imit t h e l if et ime of a TCP segmen t (t r a n smit t ed da t a ) a n d t o en d r ou t in g l oops. Th e in it ia l TTL en t r y is set by t h e or igin a t or of t h e pa cket , a n d it va r ies. To be ef f icien t , a r ou t in g u pda t e wil l set t h is f iel d t o a 1 (RIP wil l ). Wh y set it t o a n yt h in g el se, wh en t h a t u pda t e is sen t on l y t o it s l oca l segmen t s? Mu l t ica st pr ot ocol s set it t o ma n y dif f er en t siz es t o l imit t h e scope of t h e mu l t ica st . For n or ma l u sa ge, ma n y a ppl ica t ion s set it t o 32 or 64 (2 a n d 4 t imes t h e siz e of a RIP n et wor k). Time t o l ive is a f iel d t h a t is u sed by r ou t er s t o en su r e t h a t a pa cket does n ot en dl essl y l oop a r ou n d t h e n et wor k. Th is f iel d (cu r r en t l y def in ed a s t h e n u mber of secon ds) is set a t t h e t r a n smit t in g st a t ion a n d t h en , a s t h e da t a gr a m pa sses t h r ou gh ea ch r ou t er , it wil l be decr emen t ed. Wit h t h e speed of t oda y’s r ou t er s, t h e u su a l decr emen t is 1. On e a l gor it h m is t h a t t h e r eceivin g r ou t er wil l n ot ice t h e t ime a pa cket a r r ives, a n d t h en , wh en it is f or wa r ded, t h e r ou t er wil l decr emen t t h e f iel d by t h e n u mber of secon ds t h e da t a gr a m sa t in a qu eu e wa it in g f or f or wa r din g. Not a l l a l gor it h ms wor k t h is wa y. A min imu m decr emen t wil l a l wa ys be 1. Th e r ou t er t h a t decr emen t s t h is f iel d t o 0 wil l disca r d t h e pa cket a n d in f or m t h e or igin a t or of t h e da t a gr a m (t h r ou gh t h e ICMP pr ot ocol ) t h a t t h e TTL f iel d expir ed a n d t h e da t a gr a m did n ot ma ke it t o it s dest in a t ion .

Time t o Live (TTL) Th e t ime–t o–l ive f iel d ma y a l so be set t o a cer t a in t ime (i.e., in it ia l iz ed t o a l ow n u mber l ike 64) t o en su r e t h a t a pa cket st a ys on t h e n et wor k f or on l y a set t ime. Some r ou t er s a l l ow t h e n et wor k a dmin ist r a t or t o set a ma n u a l en t r y t o decr emen t . Th is f iel d ma y

con t a in a n y n u mber f r om 0 t o 255 (a n 8–bit f iel d).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 34 Protocol and Checksum Fields Wh a t

IP a sks h er e is, wh o a bove me wa n t s t h is da t a ? Th e pr ot ocol f iel d is u sed t o in dica t e wh ich h igh er –l evel pr ot ocol sh ou l d r eceive t h e da t a of t h e da t a gr a m (i.e., TCP, UDP, OSPF, or possibl y ot h er pr ot ocol ). Th is f iel d a l l ows f or mu l t ipl exin g. Th er e a r e ma n y pr ot ocol s t h a t ma y r eside on t op of IP. Cu r r en t l y, t h e most common t r a n spor t impl emen t a t ion s a r e TCP a n d UDP. If t h e pr ot ocol f iel d is set t o a n u mber t h a t iden t if ies TCP, t h e da t a wil l be h a n ded t o t h e TCP pr ocess f or f u r t h er pr ocessin g. Th e sa me is t r u e if t h e f r a me is set t o UDP or a n y ot h er u pper –l a yer pr ot ocol . Th is f iel d becomes ver y a ppa r en t t o a n yon e wh o t r ou bl esh oot s n et wor ks. Simpl y st a t ed, it a l l ows f or IP t o del iver t h e da t a (a f t er it st r ips of f a n d pr ocesses it s f iel ds) t o t h e n ext in t en ded pr ot ocol . Th e secon d f iel d is a Cycl ic Redu n da n cy Ch eck (CRC) of 16 bit s. How t h is n u mber is a r r ived a t is beyon d t h e scope of t h is book, bu t t h e idea beh in d it is t o en su r e t h e in t egr it y of t h e h ea der . A CRC n u mber is gen er a t ed f r om t h e da t a in t h e IP da t a f iel d a n d pl a ced in t o t h is f iel d by t h e t r a n smit t in g st a t ion . Wh en t h e r eceivin g st a t ion r ea ds t h e da t a , it wil l compu t e a CRC n u mber . If t h e t wo CRC n u mber s do n ot ma t ch , t h er e is a n er r or in t h e h ea der a n d t h e pa cket wil l be disca r ded. St r et ch in g it , you ma y t h in k of t h is a s a f a n cy pa r it y ch eck. As t h e da t a gr a m is r eceived by ea ch r ou t er , ea ch r ou t er wil l r ecompu t e t h e ch ecksu m. Wh y ch a n ge it ? Beca u se t h e TTL f iel d is ch a n ged by ea ch r ou t er t h e da t a gr a m t r a ver ses.

Pr ot ocol a n d Ch ecksu m Fiel ds

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 35 IP Options Field Th is f iel d is f ou n d on IPv4 pa cket

h ea der s. It con t a in s in f or ma t ion on sou r ce r ou t in g (n ot h in g t o do wit h Token Rin g), t r a cin g a r ou t e, t imest a mpin g t h e pa cket a s it t r a ver ses r ou t er s, a n d secu r it y en t r ies. Th ese f iel ds ma y or ma y n ot be in t h e h ea der (wh ich a l l ows f or t h e va r ia bl e l en gt h h ea der ). It wa s f ou n d t h a t most of t h ese f ea t u r es wer e n ot u sed or wer e bet t er impl emen t ed in ot h er pr ot ocol s, so IPv6 does n ot impl emen t t h em a s a f u n ct ion of t h e IP h ea der . Sou r ce r ou t in g is t h e a bil it y of t h e or igin a t in g st a t ion t o pl a ce r ou t e in f or ma t ion in t o t h e da t a gr a m t o be in t er pr et ed by r ou t er s. Rou t er wil l f or wa r d t h e da t a gr a m ba sed on in f or ma t ion in t h e sou r ce r ou t e f iel ds, a n d in some ca ses, it wil l be bl in d. Th e or igin a t or in dica t es t h e pa t h it wish es t o t a ke, a n d t h e r ou t er s mu st obey, even if t h er e is a bet t er r ou t e. Th er e a r e t wo t ypes: l oose sou r ce r ou t e (LSR) a n d st r ict sou r ce r ou t e (SSR). Th e dif f er en ce bet ween t h e t wo is r el a t ivel y simpl e. Rou t es (IP a ddr esses) a r e pl a ced in a f iel d of t h e IP h ea der . Th e IP a ddr esses in dica t e t h e r ou t e t h e da t a gr a m wou l d l ike t o t a ke t o t h e dest in a t ion . Loose sou r ce r ou t e a l l ows a r ou t er t o f or wa r d t h e da t a gr a m t o a n y r ou t er it f eel s is cor r ect t o ser vice t h e n ext r ou t e in dica t ed in t h e sou r ce r ou t e f iel d. A compl et e l ist of IP a ddr esses f r om t h e sou r ce t o t h e dest in a t ion is pr oba bl y n ot in t h e IP h ea der , bu t some poin t s in t h e In t er n et sh ou l d be u sed t o f or wa r d t h e da t a gr a m. For exa mpl e, IP mu l t ica st u ses LSR f or t u n n el in g it s IP mu l t ica st da t a gr a ms over t h e n on mu l t ica st –en a bl ed IPv4 In t er n et . St r ict sou r ce r ou t in g f or ces a r ou t er t o f or wa r d a da t a gr a m t o it s dest in a t ion compl et el y ba sed on t h e r ou t es in dica t ed by t h e sou r ce r ou t e f iel d.

IP Opt ion s Fiel d Th e Tr a cer ou t e is a ver y u sef u l u t il it y. It a l l ows t h e ech oin g of t h e f or wa r din g pa t h of

a da t a gr a m. Wit h t h is opt ion set , t h e poin t s t o wh ich t h e da t a gr a m is r ou t ed a r e ech oed ba ck t o t h e sen der . Th is a l l ows you t o f ol l ow a da t a gr a m a l on g a pa t h . It is ver y of t en u sed in t r ou bl esh oot in g IP n et wor ks. If you h a ve Win dows 95, you h a ve t h is u t il it y. Type in (DOS pr ompt ) “t r a cer t ” a n d wa t ch t h e ech o poin t s on you r scr een . IPv6 el imin a t ed t h is f iel d a n d t h ose f u n ct ion s t h a t wer e n ot u sed or wer e bet t er impl emen t ed by ot h er pr ot ocol s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 36 Source and Destination Address Fields Th e n ext

f iel ds a r e t h e sou r ce a n d dest in a t ion a ddr ess f iel ds. Th ese f iel ds a r e ver y impor t a n t f or t h ey iden t if y t h e in dividu a l IP n et wor k a n d st a t ion on a n y IP n et wor k. Th ese a r e pa r t icu l a r l y impor t a n t , f or u ser s wil l be most a wa r e of t h is wh en st a r t in g t h eir wor kst a t ion or t r yin g t o a ccess ot h er st a t ion s wit h ou t t h e u se of a doma in n a me ser ver or a n u p–t o–da t e h ost f il e. Th ese f iel ds in dica t e t h e originator of t h e da t a gr a m, t h e final dest in a t ion IP a ddr ess t h a t t h e pa cket sh ou l d be del iver ed t o, a n d t h e IP a ddr ess of t h e st a t ion t h a t or igin a l l y t r a n smit t ed t h e pa cket . Al l h ost s on a n IP in t er n et wil l be iden t if ied by t h ese a ddr esses. IP a ddr essin g is ext r emel y impor t a n t a n d a f u l l discu ssion f ol l ows. Cu r r en t l y, t h ese a ddr esses a r e set t o 32 bit s, wh ich a l l ows f or over 4 bil l ion a ddr esses. Th is ma y sou n d l ike a l ot of a ddr esses bu t u n f or t u n a t el y, ma n y mist a kes wer e ma de in a ssign in g IP a ddr esses t o cor por a t ion s a n d in dividu a l s. Th e mist a kes wer e ma de u n kn owin gl y, f or t h is pr ot ocol su it e t ook of f by su r pr ise. Th is is f u l l y discu ssed a t t h e en d of t h is sect ion . Th er e a r e t wo t ypes of a ddr esses: cl a ssl ess a n d cl a ssf u l . Bot h t ypes wil l be pr esen t ed.

Sou r ce a n d Dest in a t ion Addr ess Fiel ds IPv6, t h e n ext ver sion of IP (cu r r en t l y bein g impl emen t ed a s a u t on omou s isl a n ds in t h e sea of IPv4), a l l ows f or 128 bit s of a ddr ess, wh ich ba sica l l y a l l ows f or t h ou sa n ds of bil l ion s of h ost s t o be n u mber ed. Al so, wit h IPv6, a n ef f icien t a l l oca t ion sch eme wa s devel oped t o h a n d ou t IPv6 a ddr esses a s wel l .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 37 The IP Address Scheme Ever y syst ems en gin eer

wh o u n der st a n ds IP, u n der st a n ds t h e IP a ddr ess sch eme. It ca n be t h e most con f u sin g a spect of IP, h owever , it mu st be l ea r n ed. Do n ot con f u se t h is a ddr essin g st r u ct u r e wit h t h a t of media (Et h er n et ) a ddr ess. Th e idea s a n d con cept s t h a t evol ved t h e pr ot ocol of TCP/IP wer e devised sepa r a t e f r om a n y da t a l in k pr ot ocol s of Et h er n et a n d Token Rin g. Host s wer e n ot a t t a ch ed t o a l oca l h igh –speed n et wor k (l ike Et h er n et or Token Rin g). Host s commu n ica t ed wit h ea ch ot h er t h r ou gh l ow–speed, poin t –t o–poin t ser ia l l in es (t el eph on e l in es). Th er ef or e, a n a ddr essin g sch eme t o iden t if y TCP/IP h ost s a n d wh er e t h ey wer e l oca t ed wa s impl emen t ed. Th e a ddr essin g sch eme u sed t o iden t if y t h ese h ost s is ca l l ed t h e 32–bit IP a ddr ess. Th is is a l so kn own a s a pr ot ocol a ddr ess. Th er e a r e t wo t ypes of n et wor k a ddr essin g sch emes u sed wit h IP: Cl assl e ss. Th e f u l l a ddr ess r a n ge ca n be u sed wit h ou t r ega r d t o bit r eser va t ion f or cl a sses. Th is t ype of a ddr essin g sch eme is pr ima r il y n ot u sed in dir ect h ost a ssign men t . Th e sch eme is dir ect l y a ppl ied t o t h e r ou t in g t a bl es of t h e In t er n et a n d ISPs. Cl assf ul . Th e or igin a l (RFC 791) segmen t a t ion of t h e 32–bit a ddr ess in t o specif ic cl a sses den ot in g n et wor ks a n d h ost s. Th e f u n pa r t is t h a t t h e r a n ge of a ddr esses (32 bit s f or IPv4) a va il a bl e a r e u sed f or bot h cl a ssl ess a n d cl a ssf u l a ddr essin g. Most of u s wil l n ever h a ve t o wor r y a bou t t h e cl a ssl ess r a n ge of IP a ddr essin g, f or it is u sed on t h e In t er n et it sel f a n d n ot on cu st omer n et wor ks. It pr ovides a n ea sy met h od wit h wh ich t o r edu ce t h e r ou t in g t a bl es a n d a l l ow l a r ge a ddr ess r a n ges t o be pr ovided t o t h e ISPs. Th e f ir st pa r t of t h is sect ion wil l dea l wit h cl a ssf u l , sin ce it st a r t ed f ir st a n d is con t in u in g t o be u sed on ma n y n et wor ks. It is con f u sin g, bu t keep r ea din g.

The IP Addr e ss Sc he me • Two t ypes of a ddr essin g sch emes f or IPv4: • Cl a ssf u l (ba sed on RFC 791)—Th e or igin a l st yl e of a ddr essin g ba sed on t h e f ir st f ew bit s of t h e a ddr ess • Gen er a l l y u sed in cu st omer sit es • Cl a ssl ess—Th e n ew st yl e of a ddr essin g t h a t disr ega r ds t h e Cl a ss bit s of a n a ddr ess a n d a ppl ies a va r ia bl e 32 pr ef ix (ma sk) t o det er min e t h e n et wor k n u mber • Gen er a l l y u sed by t h e gl oba l r ou t in g t a bl es a n d ISPs • En a bl es ver y ef f icien t r ou t in g, sma l l er r ou t in g t a bl es • En a bl es ef f icien t IP a ddr ess a l l oca t ion (t o t h e ISPs) a n d a ssign men t (t o t h e ISP cu st omer )

Th e secon d pa r t of t h is sect ion wil l dea l wit h cl a ssl ess a ddr essin g a n d t h e con cept s of CIDR (Cl a ssl ess In t er Doma in Rou t in g), Va r ia bl e Len gt h Su bn et Ma sks (VLSM), a n d su per n et t in g.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 38 Classful Addressing—The Original Address Scheme Cl assf ul Addr e ssing —The Or ig inal Addr e ss Sc he me • • • • • •

Ba sed on RFC 791. An a ddr essin g sch eme ba sed on a simpl e h ier a r ch y. Cl a ss of a ddr ess det er min ed by t h e f ir st f ew bit s of t h e a ddr ess. Uses t h e dot t ed decima l n ot a t ion syst em. Al l oca t ed by t h e In t er n et Regist r y. Al l a ddr esses u l t ima t el y own ed by t h e IANA.

Ma n y, ma n y yea r s a go, RFC 760 in t r odu ced IP. Th e begin n in gs of t h e IP a ddr essin g sch eme wer e ver y simpl e a n d f l a t . Th is RFC didn ’t h a ve a con cept of cl a sses (n ot t o be con f u sed wit h cl a ssl ess IP of t oda y); a ddr essin g wa s a n 8–bit pr ef ix t h a t a l l owed a s ma n y a s 200+ n et wor ks a n d a l ot of h ost s per n et wor k. RFC 791 obsol et es RFC 760 a n d t h is RFC in cl u ded t h e con cept of IP a ddr ess cl a sses. Ba ck t h en , it wa s ea sy t o ch a n ge a ddr essin g sch emes f or t h er e wer e bu t a f ew h ost s on t h e en t ir e n et wor k. RFC 950 in t r odu ced u s t o su bn et t in g a n d RFC1518 in t r odu ced t h e CIDR (cl a ssl ess) pr ot ocol . Th er e h a ve been ma n y en h a n cemen t s t o t h e or igin a l IP a ddr essin g sch eme, bu t t h ey con t in u e t o oper a t e on t h e ba ses of Cl a ss a n d Cl a ssl ess. Addr essin g’s pu r pose wa s t o a l l ow IP t o commu n ica t e bet ween h ost s on a n et wor k or on a n in t er n et . Cl a ssf u l IP a ddr esses iden t if y bot h a pa r t icu l a r n ode a n d a n et wor k n u mber wh er e t h e pa r t icu l a r n ode r esides on a n in t er n et . IP a ddr esses a r e 32–bit s l on g, sepa r a t ed in t o f ou r f iel ds of 1 byt e ea ch . Th is a ddr ess ca n be expr essed in decima l , oct a l , h exa decima l , a n d bin a r y. Th e most common IP a ddr ess f or m is wr it t en in decima l a n d is kn own a s t h e dotted decimal notation syst em. Th er e a r e t wo wa ys t h a t a n IP a ddr ess is a ssign ed; it a l l depen ds on you r con n ect ion . If you h a ve a con n ect ion t o t h e In t er n et , t h e n et wor k por t ion of t h e a ddr ess is a ssign ed

t h r ou gh a n In t er n et Ser vice Pr ovider . Yes, t h er e a r e t h r ee a ddr esses a ssign ed f or pr iva t e a ddr essin g. Bu t f or a con n ect ion t o t h e In t er n et , a t l ea st on e a ddr ess mu st be def in ed a s a pu bl ic a ddr ess a ssign ed t o you by t h e ISP. To iden t if y a l l h ost s on you r n et wor k wit h pu bl ic a ddr ess, t h e ISP wil l on l y pr ovide t h e n et wor k r a n ge (a con t in u ou s IP n et wor k a ddr ess segmen t ) t h a t you ma y wor k wit h . It wil l n ot a ssign h ost n u mber s n or a ssign t h e n et wor k n u mber s t o a n y pa r t of you r n et wor k. If you r n et wor k wil l n ever h a ve a con n ect ion t o t h e In t er n et , you ca n a ssign you r own a ddr esses, bu t it is h igh l y r ecommen ded t h a t you f ol l ow RFC 1918 f or t h e pr iva t e a ssign men t . Th ese a r e Cl a ss A, Cl a ss B, a n d Cl a ss C a ddr ess a ssign men t s f or pr iva t e u se.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 39 IP Address Format Ea ch h ost

on a TCP/IP n et wor k is u n iqu el y iden t if ied a t t h e IP l a yer wit h a n a ddr ess t h a t t a kes t h e f or m of . Th e a ddr ess is n ot r ea l l y sepa r a t ed a n d is r ea d a s a wh ol e. Th e wh ol e a ddr ess is a l wa ys u sed t o f u l l y iden t if y a h ost . Th er e is n o sepa r a t ion bet ween t h e f iel ds. In f a ct , wh en a n IP a ddr ess is wr it t en , it is h a r d t o t el l t h e dist in ct ion bet ween t h e t wo f iel ds wit h ou t kn owin g h ow t o sepa r a t e t h em. Th e f ol l owin g sh ows t h e gen er a l iz ed f or ma t of a n IP a ddr ess: in t h e f or m of xxx.xxx.xxx.xxx In decima l , t h e a ddr ess r a n ge is 0.0.0.0 t h r ou gh 255.255.255.255. 128.4.70.9 is a n exa mpl e of a n IP a ddr ess. Wh en l ookin g a t t h is a ddr ess, it is h a r d t o t el l wh ich is t h e n et wor k n u mber a n d wh ich is t h e h ost n u mber , l et a l on e a su bn et n u mber . Except f or t h e f ir st byt e, a n y of t h e byt es ca n in dica t e a n et wor k n u mber or h ost n u mber . Th e f ir st byt e a l wa ys in dica t es a n et wor k n u mber . In or der t o u n der st a n d h ow t h is is a ccompl ish ed, l et ’s l ook f ir st a t h ow IP a ddr esses a r e divided. Ea ch byt e (or in In t er n et t er ms, a n oct et ) is 8 bit s l on g, n a t u r a l l y! Ea ch of t h e byt es, h owever , ca n iden t if y a n et wor k, a su bn et wor k, or a h ost . As sh own in t h e sl ide, t h er e a r e 32 bit s sepa r a t ed in t o 4 byt es t h a t a r e u sed t o r epr esen t a n IP a ddr ess. Th e n et wor k n u mber ca n sh if t f r om t h e f ir st byt e t o t h e secon d byt e t o t h e t h ir d byt e. Th e sa me ca n h a ppen t o t h e h ost por t ion of t h e a ddr ess. xxx r epr esen t s a decima l n u mber f r om 0 t o 255 (t h e r ea son f or t h r ee xs).

IP Addr e ss Fo r mat • Un iqu el y iden t if ies bot h t h e n et wor k a n d t h e h ost in on e a ddr ess. • Uses t h e f or m: • • Th e a ddr ess is 32 bit s in l en gt h wh ich is f u r t h er sepa r a t ed in t o 4 byt es of 8 bit s ea ch . xxxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx • Th er e a r e f ive cl a sses of a ddr esses: A–E.

IP a ddr esses a r e divided in t o f ive cl a sses: A, B, C, D, a n d E. RFC 791, wh ich cl a ssif ied t h ese t ypes, did so wit h ou t t h e f or egoin g kn owl edge of su bn et s. Th e cl a sses a l l owed f or va r iou s a mou n t s of n et wor ks a n d h ost s t o be a ssign ed. Cl a sses A, B, a n d C a r e u sed t o r epr esen t h ost a n d n et wor k a ddr esses. Cl a ss D is a specia l t ype of a ddr ess u sed f or mu l t ica st in g (f or exa mpl e, OSPF r ou t in g u pda t es u se t h is t ype of a ddr ess a s wel l a s IP mu l t ica st ). Cl a ss E is r eser ved f or exper imen t a l u se. For t h ose t r yin g t o f igu r e ou t t h is a ddr essin g sch eme, it is best if you a l so kn ow t h e bin a r y n u mber in g syst em a n d a r e a bl e t o con ver t bet ween decima l a n d bin a r y. Fin a l l y, IP a ddr esses a r e somet imes expr essed in h exa decima l a n d it is h el pf u l t o kn ow. IPv6 u ses on l y h exa decima l . Th e most common f or m f or IPv4 is decima l . Th is book sh ows most a ddr esses in bin a r y a n d decima l .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 40 Identifying a Class For

n et wor k a n d h ost a ssign men t , Cl a sses A t h r ou gh C a r e u sed. Cl a ss D is n ot u sed f or t h is, a n d Cl a ss E is n ever a ssign ed. Ref er r in g t o t h e sl ide, we ca n see h ow t h e cl a sses a r e a ct u a l l y def in ed. How does a h ost or in t er n et device det er min e wh ich a ddr ess is of wh ich cl a ss? Sin ce t h e l en gt h of t h e n et wor k ID is va r ia bl e (depen den t on t h e cl a ss), a simpl e met h od wa s devised t o a l l ow t h e sof t wa r e t o det er min e t h e cl a ss of a ddr ess a n d, t h er ef or e, t h e l en gt h of t h e n et wor k n u mber . Th e IP sof t wa r e wil l det er min e t h e cl a ss of t h e n et wor k ID by u sin g a simpl e met h od of r ea din g t h e f ir st bit (s) in t h e f ir st f iel d (t h e f ir st byt e) of ever y pa cket . IP a ddr esses con t a in 4 byt es. Th e sl ide sh ows a n a ddr ess in bin a r y. If you a r e n ot f a mil ia r wit h bin a r y, I su ggest you st u dy u p on it , f or u n der st a n din g a ddr essin g, especia l l y cl a ssl ess a ddr essin g, ca n on l y be f igu r ed ou t by con ver t in g t h e a ddr ess t o bin a r y. Th e sl ide br ea ks t h e IP a ddr ess down in t o it s bin a r y equ iva l en t . If t h e f ir st bit of t h e f ir st byt e is a 0, it is a Cl a ss A a ddr ess. If t h e f ir st bit is a 1, t h en t h e pr ot ocol ma n da t es r ea din g t h e n ext bit . If t h e n ext bit is a 0, t h en it is a Cl a ss B a ddr ess. If t h e f ir st a n d secon d bit s a r e 1 a n d t h e t h ir d bit is a 0, it is a Cl a ss C a ddr ess. If t h e f ir st , secon d, a n d t h ir d bit s a r e 1, t h e a ddr ess is a Cl a ss D a ddr ess a n d is r eser ved f or mu l t ica st a ddr esses. Cl a ss E a ddr esses a r e r eser ved f or exper imen t a l u se.

Iden t if yin g a Cl a ss

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 41 Class A Address Cl a ss A a ddr esses t a ke t h e 4–byt e f or m , byt es 0, 1, 2, a n d 3. Su bn et t in g h a s n ot been in t r odu ced h er e yet ! Cl a ss A a ddr esses u se on l y t h e f ir st of t h e 4 byt es f or t h e n et wor k n u mber . Cl a ss A is iden t if ied by t h e f ir st bit in t h e f ir st byt e of t h e a ddr ess. If t h is f ir st bit is a 0, t h en it iden t if ies a Cl a ss A a ddr ess. Th e l a st 3 byt es a r e u sed f or t h e h ost por t ion of t h e a ddr ess. Cl a ss A a ddr essin g a l l ows f or 126 n et wor ks (u sin g on l y t h e f ir st byt e) wit h u p t o 16,777,214 mil l ion h ost s per n et wor k n u mber . Th e r a n ge f or Cl a ss A is 1–126. Wit h 24 bit s in t h e h ost f iel ds (l a st 3 byt es), t h er e ca n be 16,277,214 h ost s per n et wor k (a ga in , disr ega r din g su bn et s). Th is is a ct u a l l y (2n 24) – 2. We su bt r a ct 2 beca u se n o h ost ca n be a ssign ed a l l 0s (r eser ved t o in dica t e a def a u l t r ou t e, wh ich wil l be expl a in ed l a t er ) a n d n o h ost ca n be a ssign ed a l l 1s. For exa mpl e, 10.255.255.255 is n ot a l l owed t o be a ssign ed t o a h ost , a l t h ou gh it is a va l id a ddr ess. Yes, t h is is a br oa dca st a ddr ess. If a l l 7 bit s a r e set t o 1 (st a r t in g f r om t h e r igh t ), t h is r epr esen t s 127 in decima l , a n d 127.x.x.x is r eser ved a s a n in t er n a l l oopba ck a ddr ess a n d ca n n ot be a ssign ed t o a n y h ost a s a u n iqu e a ddr ess. Th is is u sed t o in dica t e wh et h er you r l oca l TCP/IP st a ck (sof t wa r e) is u p a n d r u n n in g. Th e a ddr ess is n ever seen on t h e n et wor k. You ma y wa n t t o l ook a t you r ma ch in e IP a ddr esses (u su a l l y by t ypin g n et st a t –r a t t h e comma n d l in e) a n d you wil l n ot ice t h a t ever y ma ch in e h a s 127.0.0.1 a ssign ed t o it . Th e sof t wa r e u ses t h is a s a n in t er n a l l oopba ck a ddr ess. You sh ou l d n ot see t h is a ddr ess cr oss over t h e LAN (via a pr ot ocol a n a l yz er su ch a s a Sn if f er .) In f a ct , 127.a n yt h in g is pr oposed a s t h e l oopba ck. 127.1.1.1 del iver s t h e sa me r esu l t s a s 127.0.0.1. Th in k a bou t it . A wh ol e a ddr ess r a n ge a ssign ed t o on e f u n ct ion : l oopba ck. Th e pr obl em is, if we t r ied t o ch a n ge it , it wou l d pr oba bl y ca u se ma yh em on t h e mil l ion s of h ost s t h a t cu r r en t l y u se IP.

Cl a ss A Addr ess

Toda y, Cl a ss A a ddr esses a r e bein g h a n ded ou t t h r ou gh a dif f er en t met h od in vol vin g In t er n et Ser vice Pr ovider s t h a t u ses t h e Cl a ssl ess In t er Doma in Rou t in g Pr ot ocol (CIDR), wh ich is expl a in ed a t t h e en d of t h is sect ion . Wh en you get a Cl a ss A a ddr ess, you wil l be t ol d t o su bn et it a ppr opr ia t el y (you wil l be t ol d wh a t t h e su bn et a ddr ess is). You wil l n ot get t h e wh ol e Cl a ss A a ddr ess. A good qu est ion h er e: How mu ch of t h e a ddr ess spa ce does a Cl a ss A a ddr ess def in e? (Hin t : Do n ot t h in k of it a s a Cl a ss a ddr ess bu t do u se t h e f ir st bit t o a n swer t h e qu est ion ). Give u p?

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 42 Class B Address Oka y, t h e a n swer

is, 50 per cen t of t h e a va il a bl e a ddr ess spa ce is def in ed by Cl a ss A. How? Ch a n ge t h e a ddr ess Cl a ss bit s t o bin a r y. Sin ce t h e a ddr ess is def in ed by t h e f ir st bit a l on e a n d t h e n ext 31 bit s a r e disr ega r ded, it r epr esen t s 50 per cen t of t h e a va il a bl e bit s f or a ddr ess a ssign men t (f or t h ose scr a t ch in g t h eir h ea ds, it is 2n 31 bit s, wh ich is 50 per cen t of t h e a ddr ess spa ce). Don ’t t h in k in a cl a ss–or ien t ed en vir on men t . I simpl y a sked h ow mu ch of t h e a ddr ess spa ce ca n be def in ed by u sin g 1 bit . Th is wil l become mor e a ppa r en t in t h e cl a ssl ess r ou t in g sect ion . Cl a ss B a ddr esses t a ke t h e f or m , f or byt es 0, 1, 2, a n d 3. Th is is t h e most r equ est ed cl a ss of a ddr ess a n d is t h e ea siest t o a ssign su bn et s t o. Cl a ss B a ddr esses u se t h e f ir st 2 byt es of t h e 4 byt es f or t h e n et wor k n u mber a n d t h e l a st t wo f iel ds f or t h e h ost n u mber . It is iden t if ied by t h e f ir st 2 bit s of t h e f ir st byt e. If t h e f ir st bit is a 1, t h en t h e a l gor it h m ch ecks t h e secon d bit . If t h e secon d bit is a 0, t h is wil l iden t if y a Cl a ss B a ddr ess. Th is a l l ows f or 16,384 n et wor k n u mber s (10111111.11111111.h ost .h ost or (2n 14), wit h ea ch n et wor k n u mber ca pa bl e of su ppor t in g 65,534 (2n 16 –2) h ost s (n et .n et .11111111.111 11110). Wa it , t h er e a r e 16 bit s in t h e f ir st t wo f iel ds, t h is sh ou l d a l l ow f or 65,535 n et wor ks. Sin ce Cl a ss B r eser ves t h e f ir st 2 bit s t o iden t if y t h e cl a ss t ype (in bin a r y, a 10xxxxxx in t h e f ir st f iel d), t h er e a r e l imit ed a ddr ess n u mber s t h a t ma y be u sed in t h e f ir st f iel d (va l id r a n ge becomes 2n 14). Th is t r a n sl a t es t o 128–191 (in decima l ) a s t h e a l l owa bl e n et wor k n u mber s in t h e f ir st f iel d. Sin ce t h e f ir st f iel d iden t if ies t h e cl a ss, t h e secon d f iel d is f r ee t o u se a l l 8 bit s, a n d ca n r a n ge f r om 0 t o 255. Th e t ot a l r a n ge f or n et wor k n u mber s f or Cl a ss B a ddr esses is 128 t o 191 (in t h e f ir st f iel d), 0 t o 255 (in t h e secon d f iel d), a n d xxx.xxx (x r epr esen t s t h e h ost ID) in t h e t h ir d a n d f ou r t h f iel ds. Th is is t h e most popu l a r cl a ss of a ddr esses. It pr ovides t h e l a r gest r a n ge of a ddr essin g possibil it ies. However , u n l ess compa n ies h a ve h a n ded in t h eir Cl a ss B a ddr esses, t h is cl a ss is exh a u st ed a n d t h ey a r e n o l on ger given ou t .

Oka y, l et ’s t r y a ga in . How mu ch of t h e a va il a bl e a ddr ess spa ce is def in ed by Cl a ss B’s r eser ved f ir st 2 bit s? Th e a n swer is on t h e n ext pa ge.

Cl a ss B Addr ess

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 43 Class C Address For

t h ose wh o a n swer ed “25 per cen t ,” t h is is cor r ect . Wit h t h e f ir st t wo bit s r eser ved, t h is l ea ves 30 bit s f or a ddr ess a ssign men t . 230 is 25 per cen t of t h e a va il a bl e a ddr ess spa ce. Cl a ss C t a kes t h e f or m of , byt es 0, 1, 2, a n d 3. Cl a ss C a ddr esses u se t h e f ir st 3 ou t of 4 byt es of t h e a ddr ess f or t h e n et wor k n u mber a n d t h e l a st f iel d f or t h e h ost n u mber . Th is a l l ows l ot s of n et wor ks wit h a f ewer h ost s per n et wor k. A Cl a ss C a ddr ess is iden t if ied by t h e f ir st 3 bit s of t h e f ir st f iel d. If t h e f ir st a n d secon d bit s a r e 1s a n d t h e t h ir d bit is a 0, t h is wil l iden t if y a Cl a ss C a ddr ess (110xxxxx). Sin ce t h e f ir st 3 bit s in t h e f ir st f iel d wil l a l wa ys be a 110xxxxx, t h e a l l owa bl e n et wor k r a n ge is 192–223 in t h e f ir st f iel d. Th is a l l ows f or 2,097,152 (2n 21) possibl e n et wor k a ddr esses. Al l of t h e bit s in t h e secon d a n d t h ir d f iel ds a r e a l l owed t o be u sed (in cl u din g a l l 0s a n d 1s). Th er ef or e, t h e wh ol e a l l owa bl e r a n ge f or Cl a ss C n et wor k a ddr esses is 192 t o 223 (in t h e f ir st f iel d), 0 t o 255 (in t h e secon d f iel d), a n d 0 t o 255 (in t h e t h ir d f iel d). Th e l a st f iel d wil l r a n ge f r om 1 t o 254 f or h ost a ssign men t . Th is a l l ows 2,097,152 n et wor k n u mber s, ea ch ca pa bl e of su ppor t in g 254 h ost s (a l l 0s a n d a l l 1s a r e st il l r eser ved n o ma t t er wh a t t ype of r ou t in g a n d a ddr essin g you a r e u sin g). No h ost ca n be a ssign ed a 0 or a l l 1s a s it s a ddr ess. Cl a ss C a ddr esses a l l ow on l y 254 h ost s per n et wor k n u mber . Not ice t h a t t h e l a r gest n u mber in t h e f ir st f iel d ma y go u p t o 223. An y n u mber over 223 in t h e f ir st f iel d wil l in dica t e a Cl a ss D a ddr ess. Cl a ss D a ddr esses a r e r eser ved a s mu l t ica st a ddr esses. Cl a ss C a ddr esses a r e t h e most common l y a ssign ed by t h e NIC. Cl a ss B a ddr esses h a ve been exh a u st ed. Th er ef or e, ISPs a n d r egion a l In t er n et Regist r ies a r e a ssign in g Cl a ss C a n d Cl a ss A (wit h su bn et s).

Cl a ss C Addr ess Oka y, yep, on e mor e qu est ion : “How mu ch of t h e a ddr ess spa ce is def in ed by Cl a ss C’s bit

r eser va t ion of 110?”

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 44 Class D Address For

t h ose wh o a n swer ed 12.5 per cen t , you a r e cor r ect . Th is is t h e odd t h in g. Th er e a r e mil l ion s of Cl a ss C a ddr esses (n et wor ks), bu t t h ey on l y r epr esen t 12.5 per cen t of t h e a va il a bl e a ddr ess spa ce. Aga in , get t h ose ca l cu l a t or s ou t . Cl a ss D a ddr esses a r e specia l a ddr esses a n d a r e kn own a s mu l t ica st a ddr esses. Th is a ddr ess t ype is a ssign ed t o a gr ou p of n et wor k wor k–st a t ion s a n d is n ot a ssign ed t o r epr esen t a u n iqu e a ddr ess. Th ey a r e u sed t o sen d IP da t a gr a ms t o a gr ou p, bu t n ot a l l of t h e h ost s on a n et wor k. Mu l t ica st in g h a s ma n y u ses, in cl u din g bein g u sed f or a ddr essin g r ou t er u pda t e messa ges a s wel l a s del iver in g da t a , video, a n d voice over IP. Usin g a mu l t ica st a ddr ess is a mor e ef f icien t wa y of “br oa dca st in g” r a t h er t h a n u sin g a br oa dca st a ddr ess, f or t h e u pper –l a yer sof t wa r e wil l n ot a l wa ys be in t er r u pt ed ever y t ime a br oa dca st pa cket a r r ives. Mu l t ica st in g is dif f er en t t h a n br oa dca st in g. Wit h br oa dca st in g, ever y st a t ion t h a t r eceives t h e br oa dca st pa cket wil l a u t oma t ica l l y pa ss it t o t h e u pper –l a yer sof t wa r e wit h ou t r ega r d t o t h e a ddr ess. Ever y st a t ion t h a t r eceives a br oa dca st pa cket mu st pr ocess it . Wit h a mu l t ica st a ddr ess, ea ch in dividu a l IP st a t ion mu st be wil l in g t o a ccept t h e mu l t ica st IP a ddr ess bef or e t h e t r a n spor t –l a yer sof t wa r e wil l be in t er r u pt ed. Ea ch NIC wil l r egist er a MAC l a yer mu l t ica st a ddr ess on it s a da pt er ca r d, ju st l ike a u n ica st a ddr ess (t h e IP a ddr ess t o Et h er n et ma ppin g of a mu l t ica st a ddr ess is sh own in a momen t ). In t h is wa y, t h e NIC ca n disca r d a pa cket wit h ou t in t er r u pt in g t h e u pper –l a yer sof t wa r e (in most ca ses, a n ywa y, some du pl ica t ion of mu l t ica st a ddr esses exist , a n d t h is t oo is sh own in a momen t ). Th e NIC is a l r ea dy set u p t o r eceive a br oa dca st pa cket . Th is is on e a ddr ess kn own a s FF–FF–FF–FF–FF–FF. As of t h is wr it in g, RFC 1700 (a ssign ed n u mber s) f u l l y expl a in s t h e ma ppin g of Cl a ss D a ddr esses t o MAC a ddr esses a n d it a l so in dica t es a ssign ed mu l t ica st a ddr esses a n d r egist er ed mu l t ica st a ddr esses. Mu l t ica st in g is compl et el y cover ed in a n ot h er sect ion of t h is book.

Cl a ss D Addr ess

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 45 Classes A–D Review For

most of u s, Cl a sses A t h r ou gh D is wh a t we wil l be wor kin g wit h . We wil l n ever h a ve t o da bbl e in t h e cl a ssl ess societ y of a ddr esses. Cl a sses A t h r ou gh D wil l be a r ou n d f or a l on g t ime a n d IPv6, a l t h ou gh a dopt ed, is st il l qu it e a f ew yea r s a wa y. IPv6 does n ot u n der st a n d t h e con cept of cl a ss n et wor kin g a n d su ppl ies en ou gh a ddr esses f or mil l ion s of yea r s t o come—en ou gh t o su ppl y a n IP a ddr ess f or a l l t h ose r ef r iger a t or s a n d wa sh er s a n d dr yer s. (Don ’t l a u gh , t h is wil l h a ppen . Wh y? Th in k of ma in t en a n ce, or bein g a bl e t o con t r ol t h in gs in you r h ou se via you r br owser . For get t o t u r n of f some l igh t s or set t h e secu r it y u p? Th e possibil it ies a r e en dl ess.) For t h ose n ewbies, t h e ea siest wa y t o r emember IP cl a ss a ddr esses is t h is: Th e first byte wil l a l wa ys iden t if y t h e class address. Wh et h er you h a ve con ver t ed t o bin a r y or a r e l ookin g a t t h e a ddr ess in it s dot t ed decima l f or m, t h e f ir st byt e gives it a wa y. A is t h e first letter in t h e a l ph a bet , a n d t h er ef or e a Cl a ss A n et wor k a ddr ess is on l y t h e first byte, l ea vin g t h e l a st t h r ee f iel ds f or h ost a ddr essin g. B is t h e second letter in t h e a l ph a bet , a n d t h er ef or e t h e n et wor k por t ion of t h e a ddr ess is t h e f ir st 2 bytes of t h e a ddr ess, l ea vin g t h e l a st t wo f iel ds f or h ost a ddr ess. C is t h e third letter in t h e a l ph a bet , a n d t h e n et wor k por t ion t a kes u p t h e f ir st 3 bytes of t h e a ddr ess a n d l ea ves on e f iel d f or h ost a ddr esses. As f or r emember in g wh ich n u mber is a ssocia t ed t o wh ich cl a ss, t h e on l y f iel d t h a t is impor t a n t is t h e f ir st f iel d. Memor iz e t h e st a r t in g n et wor k n u mber f or ea ch cl a ss.

Cl asse s A–D Re vie w • Net wor k h ost s ca n be a ssign ed a Cl a ss a ddr ess of Cl a ss A–D • Th ese a r e simpl t a gr ou pin g of a ddr esses t h a t in dica t e h ost a n d a ddr ess a ssign men t • Cl a ss A h a s t h e n et wor k n u mber in t h e f ir st byt e of t h e a ddr ess a n d t h e l a st t h r ee byt es a r e a ssign ed t o t h e h ost . • Cl a ss B h a s t h e n et wor k n u mber in t h e f ir st t wo byt es of t h e a ddr ess a n d t h e l a st t wo byt es a r e a ssign ed t o t h e h ost . • Cl a ss C h a s t h e n et wor k n u mber in t h e f ir st t h r ee byt es of t h e a ddr ess a n d t h e h ost is a ssign ed t o t h e l a st byt e. • Cl a ss D is a mu l t ica st a ddr ess. • A is t h e f ir st l et t er of t h e a l ph a bet a n d t h er ef or e t h e n et wor k n u mdber is a ssign ed t h e f ir st byt e. • B is t h e secon d l et t er a n d t h er ef or e h a s t h e n et wor k n u mber a ssign ed t o t h e f ir st t wo byr t es. • Cl a ss C is t h e t h ir d l et t er a n d t h er ef or e h a s t h ew n et wor k n u mber a ssign ed t o t h e f ir st t h r ee byt es.

The c l asse s ar e Cl a ss A: 0–127 Cl a ss B: 128–191 Cl a ss C: 192–223 Cl a ss D: 223–239 Reser ved: 240–254

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 46 Subnetting Now t h a t

IP a ddr ess a ssign men t h a s been sh own , l et ’s f u r t h er con f u se t h e issu e by l ookin g a t su bn et ma sks. An ot h er n a me f or su bn et ma sks is ext en ded n et wor k pr ef ix. Th is book wil l con t in u e t o u se t h e wel l –kn own n a me of su bn et t in g. Su bn et t in g is expl a in ed in RFC 950. Impl emen t in g cl a sses in n et wor k n u mber s ga ve u s some h ier a r ch ica l st r u ct u r e t o t h e In t er n et . Usin g cl a ss a ssign men t , you cou l d sel ect a n et wor k n u mber ba sed on t h e n u mber of h ost s t h a t a r e on or wil l be on you r n et wor k. Bu t t h e r a n ge wa s ver y l imit ed. Cl a ss A ga ve you a l ot of h ost s bu t ju st a f ew n et wor ks. Cl a ss B wa s t h e on e picked t o a l l ow f or a ba l a n ce of h ost s a n d n et wor ks, a n d Cl a ss C a l l owed ma n y n et wor ks a n d a f ew h ost s. Not mu ch ch oice, eit h er you h a d a l ot of n et wor ks or a l ot of h ost s. Th e most r equ est ed n et wor k n u mber wa s Cl a ss B; h owever , ma n y Cl a ss B a ssign men t s wer e n ot f u l l y u sed—r ea l l y h a r d t o h a ve 65,535 h ost s on a sin gl e n et wor k. Too ma n y Cl a ss C a ddr esses f il l ed u p r ou t in g t a bl es a n d most did n ot f u l l y u se a l l 254 h ost a ddr esses. Fu r t h er mor e, some sit es wer e r equ est in g mu l t ipl e a ddr esses t o f u l f il l t h eir n eeds. Not ma n y Cl a ss A a ddr esses wer e h a n ded ou t . In f a ct , a f t er a bou t 63 a ssign men t s, Cl a ss A a ssign men t s wer e n ot h a n ded ou t a t a l l . Cl a ss B a ddr esses wer e popu l a r a n d wer e t h e most f r equ en t l y a sked f or a ddr ess cl a ss. Wh a t ’s t h e dea l wit h Cl a ss C a ddr esses? Wit h on l y 254 h ost s a va il a bl e f or a ssign men t , ma n y Cl a ss C a ddr esses h a ve t o be a ssign ed. Aga in , u sin g Cl a ss a ssign men t , t h e r ou t in g t a bl es st a r t ed t o f il l u p a n d most of t h e bit s wer e wa st ed wh en impl emen t ed. It wa s l ike bein g given a f ive–pa ssen ger ca r , bu t you n ever h a d a n yon e in t h e ot h er sea t s. In sh or t , su bn et t in g a l l ows f or t r emen dou s ef f icien cy n ot on l y in In t er n et r ou t in g t a bl es bu t a l so on cu st omer n et wor ks a s wel l . It a l l ows u s t o a ssign some of t h e bit s n or ma l l y u sed by t h e h ost por t ion of t h e a ddr ess a n d r ea ssign t h ese bit s t o t h e n et wor k por t ion of t h e a ddr ess. Th is is a ccompl ish ed f or t h e r ea son s t h a t f ol l ow.

Su bn et t in g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 47 Reasons for Subnetting As n et wor k n u mber s wer e a ssign ed, ma n y sit es wer e impl emen t in g r ou t in g on t h eir l oca l sit es. Th is h a d ma n y ben ef it s. You cou l d h a ve ma n y n et wor ks a t you r sit e (u sin g RFC 791), bu t t h e pr obl em wa s t h a t you h a d t o be given mu l t ipl e n et wor k a ddr esses (Cl a ss A, Cl a ss B, or Cl a ss C) t o a ccompl ish t h is. Th is st a r t ed t o f il l u p t h e ARPAn et r ou t in g t a bl es a n d cr ea t ed ot h er pr obl ems a s wel l . Ma n y n et wor ks t h a t a ccessed t h e In t er n et wer e cr ea t in g t h eir own h ome–gr own su bn et t ed en vir on men t s, a n d ma n y wer e begin n in g t o be impl emen t ed. Bef or e a l l n et wor ks cea sed commu n ica t in g beca u se of in compa t ibil it ies, RFC 950 wa s r el ea sed, def in in g a st a n da r d met h od f or su bn et t in g a n IP a ddr ess. A n et wor k ma sk t h a t cover s simpl y t h e n et wor k por t ion of t h e a ddr ess is kn own a s t h e natural ma sk (n o por t ion of t h e a ddr ess is su bn et t ed). Th e sl ide sh ows a su bn et t ed n et wor k t opol ogy con n ect ed t o t h e In t er n et . It is a ssign ed a Cl a ss B a ddr ess a n d u ses a n 8–bit su bn et ma sk. Th e In t er n et kn ows of t h e IP a ddr ess 130.1.0.0. It does n ot kn ow t h e su bn et s in vol ved. Th is a l l ows t h e In t er n et a ddr ess (r ou t in g) t a bl es t o r ema in sma l l er . Su bn et ma sks a r e u sed in r ou t er s a n d n et wor k st a t ion s.

Re aso ns f o r Subne t t ing • Most IP a ddr ess a ssign men t s wer e n ot u sed ver y ef f icien t l y. • Ha vin g mil l ion s of h ost s f or Cl a ss A a n d 254 h ost s f or Cl a ss wa s n ot wor kin g ver y wel l • Ma n y sit es wer e r equ est in g mu l t ipl e n et wor k n u mber s du e t o va r ia bl e a mou n t s of n et wor ks a t t h eir sit es. • Ma n y n et wor ks wer e impl emen t in g pr opr iet a r y su bn et s. • RFC 950 def in ed t h e a dopt ed su bn et met h od.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 48 Subnetting Examples (Classes A, B, and C) An y of t h e cl a sses ca n be su bn et t ed, a l t h ou gh some a r e ea sier

t h a n ot h er s. Th e sl ide sh ows t h e t h r ee cl a sses of n et wor ks, ea ch wit h a n a ddr ess. Th is t ime, ea ch of t h e a ddr esses h a s been a ssign ed a su bn et ma sk. A ma sk is a ser ies of bit s t h a t a r e a ppl ied (kn own a s ANDin g) t o a por t ion of t h e a ddr ess. Th is por t ion is wh a t we a r e su bt r a ct in g f r om t h e or igin a l a ddr ess. It in dica t es h ow ma n y bit s we a r e ma skin g ou t of t h e or igin a l h ost por t ion of a n a ddr ess t o u se a s a su bn et a ddr ess. A su bn et a ddr ess is a r ea l n et wor k n u mber , bu t simpl y a n et wor k u n der t h e cl a ss a ddr ess. Su bn et ma sks a r e va r ia bl e in l en gt h a n d move f r om t h e f ir st h ost bit t o t h e l a st . In ot h er wor ds, t h ey move t o t h e r igh t of t h e a ddr ess. Movin g a ma sk t o t h e l ef t of t h e n et wor k a ddr ess, beyon d it s n a t u r a l ma sk, is kn own a s su per n et t in g (t h is con cept wil l be discu ssed in a momen t ). In t h is exa mpl e of t h e Cl a sses A a n d B a ddr esses, I h a ve sh own a l l a va il a bl e bit s f ol l owin g t h e n et wor k ID por t ion of t h e a ddr ess u sed t o in dica t e a su bn et . Th e Cl a ss C a ddr ess u ses t h e f ir st 3 bit s of t h e h ost por t ion of t h e a ddr ess f or t h e su bn et . Wit h a n y of t h e a ddr esses, a n y of t h e h ost bit s (except f or 2 bit s a t t h e en d of t h e a ddr ess; t h er e mu st be a t l ea st on e h ost on a n et wor k) ma y be u sed f or su bn et t in g. For exa mpl e, a Cl a ss B a ddr ess ma y u se a l l of t h e t h ir d oct et a n d 2 bit s of t h e f ou r t h oct et f or su bn et t in g. Th is wou l d give 1024 possibl e su bn et wor k n u mber s—yes, 1024. Th ose wh o a r e pa yin g a t t en t ion h er e sh ou l d h a ve ca u gh t t h e f a ct t h a t in or der t o h a ve 1024 su bn et a ddr esses we mu st u se a l l 0s a n d a l l 1s in t h e su bn et f iel d a s va l id su bn et a ddr esses. Th is ma y seem con t r a r y t o h ost a n d n et wor k ID a ssign men t , bu t it is n ot . Al l 0s a n d a l l 1s a r e a l l owed t o be u sed in t h e su bn et por t ion of a n y a ddr ess (t h ey st il l ca n n ot be u sed in t h e h ost or n et wor k por t ion s of t h e a ddr ess a s u n iqu e a ddr esses). Ref er t o RFC 1812. Th is ca u ses pr obl ems wit h su bn et br oa dca st s, wh ich I’l l expl a in l a t er . Usin g t h e pr ecedin g exa mpl e (10–bit su bn et on a Cl a ss B), ea ch su bn et ca n su ppor t u p t o 62 h ost s (63 wou l d in dica t e a br oa dca st ).

Su bn et t in g Exa mpl es (Cl a sses A, B, a n d C) Su bn et con sider a t ion s: 1. Host s a n d r ou t er s mu st impl emen t su bn et t in g (t h er e is a wa y a r ou n d t h is discu ssed u n der Pr oxy ARP) a n d l oca l l y mu st h a ve t h e sa me ma sk. 2. Th e r ou t er mu st be a bl e t o dist in gu ish bet ween a l l 1s a s a su bn et a ddr ess a n d a su bn et br oa dca st . 3. In some sit u a t ion s, t h e r ou t in g u pda t e pr ot ocol mu st su ppor t it .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 49 More Subnet Examples Su bn et t in g con f isca t es u n u sed bit s, a l l owin g f or

mor e ef f icien t u se of a n a ddr ess. Su bn et t in g a l l ows f or mor e ef f icien t u se of a ddr essin g spa ce a n d l ower s t h e n u mber of r ou t es in t h e In t er n et r ou t in g t a bl es. Th e bit s a r e t a ken a wa y f r om h ost a ssign men t a n d given ba ck t o iden t if y a su bn et of a n et wor k a ddr ess. Th e sl ide depict s t h is. Th e su bn et is a r ea l n et wor k. It is a su bn et u n der t h e n et wor k n u mber . Wit h su bn et t in g a Cl a ss B a ddr ess, we ca n t a ke a n y a mou n t of t h e bit s in t h e t h ir d byt e, or 6 bit s of t h e f ou r t h byt e (1 t h r ou gh 8 bit s; t h ey sh ou l d be con t igu ou s, st a r t in g f r om t h e l ef t ) of t h e IP a ddr ess a n d ma ke t h em pa r t of t h e n et wor k n u mber (a su bn et u n der t h e n et wor k n u mber ). Th e f or ma t of t h e IP a ddr ess wou l d n ow be: . For exa mpl e, if t h e a ddr ess a ssign ed t o a pa r t icu l a r h ost is 130.1.5.1, t h e n et wor k por t ion wou l d be 128.1 a n d t h e h ost por t ion wou l d be 5.1. Wit h su bn et t in g (a ssu min g a l l 8 bit s of t h e t h ir d f iel d wer e con su med f or a su bn et a ddr ess), t h e a ddr ess wou l d be def in ed a s n et wor k n u mber 130.1 a n d su bn et 5, wit h a h ost ID of 1. Su bn et t in g a Cl a ss B a ddr ess is ea sy wh en you su bn et t h e en t ir e t h ir d oct et . However , it becomes dif f icu l t wh en you su bn et on l y a por t ion of t h e t h ir d oct et . Su ppose t h e f ir st 5 bit s (st a r t in g f r om t h e l ef t ; t h ey sh ou l d st a r t f r om t h e l ef t a n d r ema in con t igu ou s goin g t o t h e r igh t ) a r e r eser ved in t h e t h ir d f iel d f or a ssign in g su bn et n u mber s. Wh a t su bn et s do we h a ve n ow? Con ver t t h ose f ir st 5 bit s of t h a t oct et t o bin a r y. Al l f ive of t h ose bit s a r e n ow a ssign ed t o t h e su bn et n u mber a n d ma y n ot be u sed f or h ost IDs. Five bit s yiel ds 32 su bn et n u mber s (2n 5). Now, t h e big ch a l l en ge: Iden t if y t h ose n u mber s! If we st a r t f r om t h e l ef t a n d go 5 bit s t o t h e r igh t , we get X.X.11111000.X a s a n et wor k n u mber (we don ’t ca r e wh a t is in t h e X). Th e bin a r y n u mber s a r e t a ken l it er a l l y a n d wil l yiel d su bn et s in mu l t ipl es of 8 (8 is t h e f ir st bin a r y bit set t o a 1). Th is gives u s 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248. You r ea l l y mu st compl et el y u n der st a n d bin a r y bef or e h ea din g in t o t h is a r ea .

Mor e Su bn et Exa mpl es

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 50 Physical and Logical Addresses A su bn et

ca n be compl ica t ed t o f igu r e ou t . Th e a ddr ess f iel ds do n ot a l l ow f or mor e t h a n 255 t o be pl a ced in ea ch f iel d. However , it is possibl e t o h a ve h ost 257 on you r n et wor k. Host 257 is n ot wr it t en in t o t h e a ddr ess, bu t u sin g t h e su bn et ma sk, we ca n ph ysica l l y h a ve a h ost 257 on a sin gl e n et wor k. Do n ot con f u se t h e a ddr esses. A su bn et t ed a ddr ess is st il l r ea d a s if su bn et t in g h a s n ot been t u r n ed on . It is n ot wr it t en dif f er en t l y. For exa mpl e, if t h e a ddr ess is 130.1.9.1 a n d t h e su bn et ma sk is 255.255.248.0, t h en it is n et wor k 130.1, su bn et 8, a n d h ost 257. Th e poin t h er e is t h a t you mu st ma ke su r e t h a t you kn ow t h e su bn et ma sk bef or e t r yin g t o det er min e t h e h ost , su bn et , a n d n et wor k.

Ph ysica l a n d Logica l Addr esses

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 51 Subnet Mask Template Not

su r e a bou t t h e pr eviou s exa mpl e? Let ’s br ea k it ou t . To iden t if y t h e su bn et s is a l it t l e t r icky. Th e pr eviou s sl ide is sh own a ga in . As you ca n see, t h e ver t ica l l in e sepa r a t in g t h e h ost a n d su bn et por t ion s of t h e a ddr ess is t h e dividin g l in e. Th e f ir st bit in t h e su bn et por t ion of t h e a ddr ess is set t o 1. Th e su bn et wou l d n ot be 1. In ca l cu l a t in g t h e va l u e of t h e su bn et , t h e wh ol e t h ir d f iel d is t a ken in t o con sider a t ion . Th er ef or e, sin ce t h a t bit is set , it is a ct u a l l y a bin a r y 8 (t h e f ou r t h bit ). Th er ef or e, t h e f ir st su bn et n u mber wil l be a 0. Ea ch su bsequ en t su bn et wil l be a mu l t ipl e of 8. In t h e pr eviou s exa mpl e wit h ea ch of t h ose su bn et wor k n u mber s, we cou l d possibl y h a ve 2046 h ost s per su bn et wor k n u mber . Th is is a l it t l e mor e r ea l ist ic t h a n n ot su bn et t in g. Not su bn et t in g gives u s 65,534 h ost s. We wer e a ssign ed on e IP a ddr ess a n d, wit h su bn et t in g, we wer e a bl e t o ma ke bet t er u se of t h e a ddr ess wit h ou t h a vin g t o r eser ve mor e a ddr esses (n et wor k n u mber s). Al so, wit h su bn et t in g, on l y on e IP a ddr ess is in t h e In t er n et r ou t in g t a bl es, even t h ou gh we h a ve 32 su bn et s on ou r n et wor k. Th e In t er n et r ou t in g t a bl es do n ot ca r e a bou t su bn et s. We u sed on e Cl a ss B n et wor k n u mber a n d h a ve 32 su bn et s a va il a bl e t o u s f r om t h e on e Cl a ss B n et wor k. Wit h ou t su bn et t in g, we wou l d h a ve on e n et wor k n u mber a n d u p t o 65,534 h ost s a ssign ed t o it . How did we get 32 possibil it ies? Usin g 5 bit s f or t h e su bn et ma sk gives u s 32 possibl e combin a t ion s (0 t o 31), or 2n 5. Remember , we ca n move t h e ma sk a n ywh er e in t h e 14 a va il a bl e bit s. Th e su bn et ma sk cou l d h a ve u sed a l l 8 bit s in t h e t h ir d oct et , wh ich wou l d give u s 256 su bn et n u mber s (a l l 0s a n d a l l 1s bein g a l l owed).

Su bn et Ma sk Templ a t e How do we wr it e a su bn et ma sk? It is a l wa ys wr it t en in decima l a n d sh ows t h e n u mber t h a t wil l be u sed t o ma sk t h e bit s. For exa mpl e, l et ’s u se t h e IP a ddr ess 130.40.132.3.

Usin g t h e f ir st 5 bit s of t h e f ir st h ost f iel d (t h e t h ir d oct et ) yiel ds 248 (con ver t t h e f ir st 5 bit s t o bin a r y 11111000). Th e byt e is r ea d a s a wh ol e 8 bit s even t h ou gh pa r t of it is u sed f or t h e su bn et a n d pa r t f or h ost a ssign men t . Th is mea n s t h e su bn et ma sk f or t h a t IP a ddr ess wil l be 255.255.248.0 in decima l . Th is is t h e ma sk t h a t we h a ve a ssign ed t o t h e n et wor k a ddr ess of 130.40.132.3. We wil l a l wa ys u se 255 in t h e n et wor k pot ion of t h e su bn et ma sk. Th e 248 is u sed t o t el l t h e n et wor k st a t ion t o u se t h e f ir st 5 bit s (5 bit s bin a r y is 248 decima l ) of t h e n et wor k a ddr ess, n ot f or a h ost ID, bu t f or a su bn et . It t el l s a n et wor k st a t ion wh ich bit s t o u se f or a su bn et ma sk. Th e r ema in in g 11 bit s (t h e r ema in in g 3 bit s of t h e t h ir d oct et a n d 8 bit s of t h e f ou r t h oct et ) sh ou l d be u sed f or t h e h ost ID. Th is a l l ows f or 32 su bn et s wit h 2046 h ost s on ea ch su bn et . Th er ef or e, t h e IP a ddr ess of 130.40.132.3, wit h a su bn et ma sk of 255.255.248.0, yiel ds t h e n et wor k n u mber 130.40, su bn et n u mber 128, a n d h ost ID 1027.64

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 52 An Example Conversion (Hin t : Con ver t

t h e a ddr ess t o bin a r y, a ppl y t h e ma sk in bin a r y, a n d t h en con ver t it ba ck t o decima l a s sh own in t h e sl ide.) An oper a t ion is per f or med on a n IP a ddr ess. It is ca l l ed a bit –wise AND oper a t ion . Th e IP a ddr ess is ANDed wit h t h e su bn et ma sk t o a l l ow t h e n et wor k st a t ion t o det er min e t h e su bn et ma sk. Yes, some ma t h is in vol ved h er e. Ba sica l l y, wh en you a r e ANDin g t wo bin a r y n u mber s t oget h er , t h e f ol l owin g r u l e a ppl ies: 1. 1 AND 1 = 1 2. 1 AND 0 = 0 3. 0 AND 0 = 0 Af t er t h is oper a t ion , t h e bit s t h a t “f a l l ou t ” in dica t e t h e n et wor k a n d su bn et bit s. Th e sl ide sh ows t h e ma sk oper a t ion . At t h e bot t om is t h e IP a ddr ess in bin a r y. Th is a ddr ess is l ogica l l y ANDed wit h t h e ma sk. Th e bit s t h a t dr op ou t of t h is oper a t ion wil l in dica t e t o a n y TCP/IP st a t ion t h e n et wor k a ddr ess. It ma sks ou t t h e h ost a ddr ess a n d l ea ves t h e n et wor k a ddr ess. Remember on e ot h er it em: Even t h ou gh we h a ve bou n da r ies, u sin g a sh or t su bn et ma sk moves t h e bin a r y n u mber t h a t we a r e t r yin g t o get . In t h e pr eviou s exa mpl e, we kept u sin g t h e bit s in t h e t h ir d oct et a s if t h ey wer e pa r t of t h e f ou r t h oct et . Th a t is h ow we ca me u p wit h 257. Sin ce t h e ma sk wa s sh or t er t h a n a l l 8 bit s in t h e t h ir d oct et , wh en f igu r in g ou t t h e a ddr essin g, we con t in u ed t o u se t h e bit s of t h e t h ir d oct et a s if t h ey wer e pa r t of t h e f ou r t h oct et . Th is ma kes t h e l a st bit of t h e t h ir d oct et t h e 256 bit (bin a r y) f or t h e f ou r t h oct et . Be ca r ef u l , u sin g t h is sa me exa mpl e, we mu st cl ea r ou r h ea ds a n d st a r t over wh en f igu r in g ou t wh a t n u mber s a r e n ow a ssign ed t o t h e su bn et . Af t er we h a ve f igu r ed ou t t h e h ost n u mber , we t h en a ppl y t h e ma sk, ju st l ike n ew, ba ck on t h e t h ir d oct et a n d l ook f or t h e su bn et s. If it is a 7–bit su bn et , t h en a f t er we con ver t t o bin a r y, we n u mber t h e l a st bit in t h e t h ir d oct et a s t h e f ir st bit of t h e

su bn et n u mber in g sch eme, h owever , n ot a ct u a l l y pa r t of t h e su bn et n u mber it sel f . Sou n ds con f u sin g bu t t r y a f ew mor e. Cl a ss A a ddr esses ca n u se t h e secon d, t h ir d, or f ou r t h (n ot t h e wh ol e f ou r t h f iel d) f iel d f or su bn et s. Cl a ss B a ddr esses ca n u se t h e t h ir d or f ou r t h (n ot t h e wh ol e f ou r t h f iel d) f iel d f or su bn et s. Cl a ss C is t r icky. Th e on l y f iel d l ef t is t h e sin gl e h ost f iel d (on e byt e). Su bn et t in g t h is is a l l owed, bu t you ca n on l y u se u p t o 6 of t h e bit s in t h e f ou r t h f iel d. You n eed t o h a ve a cou pl e of h ost s somewh er e!

An Exa mpl e Con ver sion

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 53 Let’s Try One You h a ve been a ssign ed a n a ddr ess of 150.5.0.0. You n eed 75 su bn et s wit h a t

l ea st 75

h ost s per su bn et . Wh a t is t h e a ccept a bl e su bn et ma sk? Th e f ir st st ep is t o f in d ou t h ow ma n y bit s a r e n eeded f or 75 su bn et s. In bin a r y, 6 bit s r epr esen t 64 possibl e su bn et s (2 n 6). Not en ou gh . Seven bit s is 128 (0 in cl u sive) a n d t h is is t h e n u mber of bit s t h a t we wil l u se. Pl u s it gives u s r oom f or expa n sion . Th is l ea ves 9 bit s f or h ost s, wh ich a l l ows f or 510 h ost s per su bn et . We st a r t t o a ssign su bn et s f r om t h e l ef t a n d wor k t o t h e r igh t . We a ssign t h e h ost s f r om t h e r igh t a n d wor k t o t h e l ef t . You mu st a l so def in e t h e br oa dca st a ddr ess f or a su bn et . If you wa n t ed t o sen d somet h in g t o a l l h ost s on a su bn et t h en t h e h ost s f iel d mu st be set t o a l l 1s. Wit h t h is su bn et ma sk, t h er e a r e 9 bit s of 1s f or a n a l l –h ost s br oa dca st a ddr ess. An ot h er exa mpl e (n ot sh own in t h e sl ide) wou l d be t o def in e t h e ma sk f or a n et wor k t o su ppor t 40 h ost s per su bn et u sin g t h e cl a ss a ddr ess 195.1.10.0. Fir st , we det er min e t h a t t h is a ddr ess is a Cl a ss C a ddr ess a n d t h a t on l y t h e l a st oct et ca n be u sed f or su bn et t in g. For t y h ost s is r epr esen t ed by 2n 6, wh ich a l l ows f or 60 h ost s. Th is ma y seem l ike a l ot , bu t t h e n ea r est ma sk wou l d be 2n 5, wh ich wou l d give u s 30 possibl e h ost IDs, a n d t h is is n ot en ou gh . For t y con ver t ed t o bin a r y is 101000. However , in t h e con ver sion we mu st r ema in con t igu ou s a n d we ca n n ot in t er l ea f h ost a n d su bn et bit s. Th er ef or e, we move t h e l ef t 6 bit s a n d t h en we ca n con su me a l l 5 bit s t o t h e r igh t . However , t h is on l y l ea ves 2 bit s f or a su bn et . We ca n h a ve 4, 2 bit s l ef t , su bn et s wit h 62 (2n 6) –2 h ost s per su bn et . If t h e sit e n eeded mor e su bn et s, we wou l d h a ve t o a ssign mor e Cl a ss C a ddr esses t o t h e sit e.

Let ’s Tr y On e

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 54 Subnet Bits Th is sl ide pr ovides a r eview of t h e a va il a bil it y of bit s u sed f or

Su bn et Bit s

Pr eviou s Ta bl e of Con t en t s Next

su bn et s.

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 55 Subnet Restrictions Su bn et s a r e good a l l owin g f or

a mor e ef f icien t u se of t h e a ddr ess bit s, bu t wh en u sin g a r ou t in g u pda t e pr ot ocol su ch a s RIP ver sion 1, you mu st be ca r ef u l a bou t a ssign in g a su bn et ma sk. Th is pr ot ocol on l y a l l ows you t o a ssign on e ma sk per n et wor k n u mber . Su bn et ma sks a l l ows f or ef f icien cy of a ddr ess spa ce, bu t t h er e a r e possibl e pr obl ems. Un der a r est r ict ion of on e su bn et ma sk per n et wor k, ID ca n st il l ca u se in ef f icien cies. For exa mpl e, a ser ia l l in e (a t el eph on e con n ect ion ) bet ween t wo sit es n eeds on l y t wo h ost IDs. Bu t wit h t h e r est r ict ion of on l y on e su bn et ma sk, we wil l st il l n ot ma ke gr ea t u se of a l l t h e bit s. Un der t h is cir cu mst a n ce, we wou l d h a ve su bn et down t o t wo bit s t o ma ke t h e most ef f icien t u se of t h e a ddr ess (we on l y n eed t wo h ost s). Bu t t h is wil l n ot a l l ow u s t o u se t h e a ddr ess f or h ost a ssign men t on t h e LAN (u n l ess we on l y h a ve t wo h ost s on t h e LAN). As you wil l see l a t er , t h e best opt ion is t o a l l ow va r ia bl e–l en gt h su bn et ma sks. In ot h er wor ds, move t h e ma sk a r ou n d on dif f er en t su bn et s t h a t h a ve dif f er en t r equ ir emen t s. Th is is good, bu t you mu st ma ke su r e t h a t t h e r ou t in g pr ot ocol (RIP, RIPv2, OSPF, et c.) u n der st a n ds t h is a s wel l . Poin t bl a n k, RIP does n ot , bu t RIPv2 does. OSPF does. Wh y? Rou t in g u pda t es h a ve t h e su bn et ma sk in cl u ded in t h e u pda t e (it is in t h e l in k–st a t e a dver t isemen t f or OSPF). RIP does n ot in cl u de a n y su bn et ma sks f or r ou t in g en t r ies in it s t a bl e. Wh en u sin g t h e RIPv1 r ou t in g pr ot ocol (expl a in ed l a t er ), t h e su bn et ma sk mu st r ema in t h e sa me t h r ou gh ou t a sin gl e Cl a ss B a ssign men t . For exa mpl e, if t h e n et wor k a ssign men t is 130.1.0.0 a n d t h e su bn et ma sk a ssign ed is 255.255.255.0, t h e su bn et ma sk mu st r ema in t h e sa me t h r ou gh ou t t h e 130.1.0.0 n et wor k. If t h e n et wor k a ddr ess ch a n ges (f or exa mpl e, t o 131.1.0.0), t h e su bn et ma sk ma y a l so ch a n ge f or t h is n ew n et wor k n u mber .

Su bn et Rest r ict ion s RIP ver sion 2 a n d OSPF do n ot h a ve t h is r est r ict ion beca u se t h ey br oa dca st t h eir su bn et

ma sks in t h e t a bl e wit h t h e n et wor k IDs (mor e on t h is in a momen t ).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 56 Subnet Mask Decisions Subne t Mask De c isio ns • Su bn et t in g is ba sed on t h e f ol l owin g: • Host s • Su bn et s • Ser ia l l in es • Expa n sion • Mer ger s • Rou t in g pr ot ocol (RIP v1 or v2, OSPF)

Let ’s sa y you a r e a ssign ed on e n et wor k n u mber

a n d you a r e u sin g RIP ver sion 1. Al t h ou gh we a r e in t r odu cin g t h is con cept h er e, it is cover ed in mor e det a il l a t er . It is pr ovided h er e t o give you a n u n der st a n din g t h a t u n der cer t a in con dit ion s, cer t a in decision s h a ve t o be ma de. Th e su bn et ma sk mu st be t h e sa me t h r ou gh ou t you r n et wor k, u n l ess you ch a n ge n et wor k IDs. You mu st ma ke a decision on h ow l a r ge t h e su bn et ma sk sh ou l d be. How ma n y h ost s per su bn et wil l t h er e be? Wh a t a bou t expa n sion ? Th ese a r e issu es you mu st con sider wh en a ssign in g a su bn et ma sk. Wit h RIPv1, it is a t r a de–of f . OSPF a n d RIPv2 do n ot h a ve t h is t r a de–of f , bu t ca r e mu st st il l be t a ken wh en a ssign in g n et wor k ma sks t o a n et wor k n u mber . Th is is sh own compl et el y in t h e n ext sect ion on a dva n ced IP a ddr essin g con cept s. Th is r est r ict ion becomes r ea dil y n ot icea bl e wh en a ssign in g a n IP a ddr ess t o a ser ia l l in e (t wo r ou t er s u sin g a l ea sed ph on e l in e t o con n ect ). Th er e h a ve been cir cu mst a n ces t h a t some r ou t er ven dor s h a ve come u p wit h t h a t a l l ow f or t h e n o IP a ddr ess a ssign men t f or a ser ia l l in e. However , if t h e ser ia l l in k n eeds a n a ddr ess a ssign men t a n d you a r e n ot u sin g RIP ver sion 2 or OSPF, a wh ol e su bn et n u mber is wa st ed on t h is poin t –t o–poin t l in k. A ser ia l l in k wil l con su me a n et wor k n u mber a n d a ssocia t ed h ost IDs. Th er ef or e, a u n iqu e n et wor k n u mber wil l be a ssign ed a n d, in st ea d of bein g a bl e t o u se a l l a va il a bl e

h ost IDs, it wil l be possibl e t o u se on l y t wo h ost IDs (t h er e wil l be on l y t wo a ddr essa bl e poin t s on t h a t n et wor k). Th e r est of t h e h ost IDs wil l be l ost f or t h a t n et wor k n u mber a n d wil l be a ssign ed a n d u sed f or t h a t ser ia l l in k; t h er ef or e t h ey wil l n ot be a bl e t o be a ssign ed t o a n y ot h er l in ks. If you h a ve a l a r ge sit e t h a t wil l en compa ss ma n y ser ia l l in ks a n d you do n ot h a ve t h e a bil it y t o a ssign a l a r ge n u mber of n et wor k n u mber s, u se su bn et a ddr essin g a n d t h e r ou t in g pr ot ocol of OSPF. OSPF su ppor t s va r ia bl e–l en gt h su bn et ma sks, wh ich wil l col l a pse t h a t ser ia l l in k in t o t wo h ost s wit h in a n et wor k n u mber ; t h er ef or e, n o h ost n u mber s a r e wa st ed on ser ia l l in ks. Va r ia bl e–l en gt h su bn et ma sks a l l ow a sin gl e n et wor k n u mber t o u se mu l t ipl e ma sks (u n l ike RIP ver sion 1, RIP ver sion 2 a l l ows VLSM). Th is a l l ows mor e bit s t o be a ssign ed ba ck t o t h e n et wor k, a l l owin g a mor e ef f icien t u se of t h e a ddr ess. A f ew mor e t h in gs you n eed t o con sider : If t h e n et wor k st a t ion moves t o a n ew n et wor k, does t h e IP a ddr ess f or t h a t st a t ion ch a n ge? Like t h e cu r r en t t el eph on e syst em, IP a ddr esses mu st ch a n ge wh en t h e n et wor k st a t ion is moved t o a n ew n et wor k t h a t empl oys a dif f er en t n et wor k n u mber . If t h e n et wor k st a t ion is moved on t h e sa me l ogica l n et wor k, t h e IP a ddr ess ma y r ema in t h e sa me. For exa mpl e, if a n et wor k st a t ion is moved t o a dif f er en t pa r t of t h e sa me su bn et , t h e wh ol e IP a ddr ess ma y st a y t h e sa me. If t h e n et wor k st a t ion is moved t o a dif f er en t su bn et (dif f er en t su bn et n u mber ), t h e IP a ddr ess of t h e n et wor k st a t ion mu st ch a n ge. Th is su bject wil l be picked u p a ga in in t h e sect ion “Adva n ced IP Addr essin g.”

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 57 Assigning More Than One Address to an Interface Ha ve a n et wor k wit h 275 h ost s bu t

you wer e a ssign ed a l l Cl a ss C a ddr esses? Wh a t ca n you do h er e? TCP/IP f u l l y su ppor t s t h e a bil it y t o a ssign mor e t h a n on e su bn et or n et wor k n u mber t o t h e sa me segmen t . Act u a l l y t h e r ou t er ven dor s impl emen t ed t h is a s a n a bil it y of TCP/IP. Th is mea n s t h a t on e n et wor k ma y empl oy mor e t h a n on e n et wor k n u mber on t h e sa me ph ysica l ca bl e pl a n t . In or der t o a ccompl ish t h is, a r ou t er mu st be u sed. Net wor k st a t ion s con t in u e t o bel ieve t h ey a r e commu n ica t in g wit h a r emot e n et wor k st a t ion , bu t t h e r ou t er is simpl y pr ovidin g t h e a ddr ess t r a n sl a t ion . Th e pa cket goes in on e por t a n d t h en r igh t ba ck ou t t h e sa me por t . Th e t wo n odes a ct u a l l y r eside on t h e sa me n et wor k segmen t . A r ou t er wil l t a ke t h e st eps n ecessa r y t o a l l ow n et wor k st a t ion s t o con ver se on t h e n et wor k. Impl emen t a t ion s a r e dif f er en t , so t h e a mou n t of n et wor k n u mber s t h a t ma y be a ssign ed t o t h e sa me ca bl e pl a n t va r ies. For exa mpl e, a s sh own in t h e sl ide, mu l t ipl e Cl a ss C n et wor k n u mber s ma y be a ssign ed t o t h e sa me ca bl e pl a n t . Cl a ss C a ddr esses a l l ow on l y f or 254 h ost IDs per n et wor k n u mber . Th is is a r a t h er l ow n u mber , a n d some sit es wil l h a ve mor e t h a n 254 n et wor k st a t ion s a t t a ch ed t o a ca bl e pl a n t . Th is mea n s t h a t mu l t ipl e st a t ion s on t h e sa me ca bl e pl a n t ma y h a ve dif f er en t n et wor k a ddr esses. A r ou t er mu st be u sed t o t r a n sl a t e bet ween t wo st a t ion s t h a t a r e l oca t ed on t h e sa me ca bl e pl a n t wit h dif f er en t n et wor k a ddr esses. Th is is ca l l ed multinetting a n in t er f a ce.

Assign in g Mor e Th a n On e Addr ess t o a n In t er f a ce

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 58 Classful IP Address Review Let ’s r eview. Al l

IPv4 a ddr esses a r e 32 bit s in l en gt h a n d a r e t h e gr ou pin g of 4 byt es t h a t r epr esen t s bot h a n et wor k n u mber a n d h ost n u mber . Th is n u mber is u su a l l y r epr esen t ed in decima l . Wit h t h e f ir st bit r eser ved (set t o 0xxxxxxx) in a Cl a ss A a ddr ess, t h e n et wor k n u mber s ca n r a n ge f r om 1 t o 126. Nu mber 127 is r eser ved a s a l oca l l oopba ck IP a ddr ess a n d mu st n ot be a ssign ed t o a n et wor k n u mber a n d t r a n smit t ed on t o t h e n et wor k. Wit h t h e f ir st 2 bit s r eser ved in a Cl a ss B (10xxxxxx) or 3 bit s in a Cl a ss C (110xxxxx) a ddr ess, t h e n et wor k n u mber s f or Cl a ss B r a n ge f r om 128.1.0.0 t o 191.255.0.0, a n d f or Cl a ss C t h ey r a n ge f r om 192.1.1.0 t o 223.255.255.0. Exa mpl es: 192.1.1.1

200.6.5.4

150.150.5.6

9.6.7.8

128.1.0.1

Node a ssign ed wit h a h ost ID of 1, l oca t ed on a Cl a ss C n et wor k of n et wor k 192.1.1.0 Node a ssign ed wit h a h ost ID of 4, l oca t ed on a Cl a ss C n et wor k of 200.6.5.0 Node a ssign ed wit h a h ost ID of 5.6, l oca t ed on a Cl a ss B n et wor k of 150.150.0.0 Node a ssign ed wit h a h ost ID of 6.7.8, l oca t ed on a Cl a ss A n et wor k of 9.0.0.0 Node a ssign ed wit h a h ost ID of 0.1, l oca t ed on a Cl a ss B n et wor k of 128.1.0.0

Not ice t h a t t o r epr esen t a n et wor k n u mber on l y, on l y t h e n et wor k n u mber is wr it t en . Th e h ost f iel d wil l be set t o 0. Th is t ype of n et wor k n u mber displ a y wil l become

a ppa r en t wh en l ookin g a t r ou t in g t a bl es. Cl assf ul IP Addr e ss Re vie w • In t h e f ir st f iel d: • Cl a ss A h a s t h e r a n ge of 1–126 • Cl a ss B h a s t h e r a n ge of 128–191 • Cl a ss C h a s t h e r a n ge of 192–223 • Cl a ss D h a s t h e r a n ge of 224–239 • Su bn et t in g is t h e a bil it y t o pl a ce a ma sk over t h e h ost por t ion of t h e a ddr ess t o yiel d su bn et s. • Al l ows f or a n ot h er l evel of h ier a r ch y; ef f icien t f or r ou t in g • RIP ver sion 1 h a s pr obl ems wit h va r ia bl e su bn et ma sks.

For t h ose n ot f a mil ia r wit h bin a r y, you n eed t o memor iz e t h e st a r t in g a n d st oppin g poin t s of t h e f ir st byt e of a n IP a ddr ess: Cl a ss A Cl a ss B Cl a ss C

1–126 in t h e f ir st f iel d 128–191 in t h e f ir st f iel d 192–223 in t h e f ir st f iel d

Su bn et t in g is t h e a bil it y t o move a ma sk over t h e bit s n or ma l l y a ssocia t ed wit h a h ost a ddr ess a n d r ecl a im t h ese bit s a s a su bn et n u mber . Th e ma sk ca n u se 22 bit s f or a Cl a ss A a ddr ess, 14 bit s f or a Cl a ss B a ddr ess, a n d 6 bit s f or a Cl a ss C a ddr ess.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 59 IP Address Restrictions IP Addr e ss Re st r ic t io ns • Addr ess ca n n ot h a ve t h e f ir st f ou r bit s set t o 1. • Cl a ss A a ddr ess of 127.x.x.x is r eser ved f or l oopba ck. • Th e h ost por t ion of t h e a ddr ess ca n n ot be set t o a l l 0s or a l l 1s. • Al l 0s a n d a l l 1s a r e a l l owed in t h e su bn et . • An y a ddr ess wit h a l l 0s in t h e n et wor k por t ion of t h e a ddr ess spa ce is mea n t t o be t h is n et wor k. • Ol d f or m of br oa dca st in g (a l l 0s in t h e a ddr ess) is n o l on ger u sed. • IP a ddr esses ma y be con f igu r ed wit h ou t r egist r a t ion . • Addr esses ca n n ot be ou t of t h e 255 r a n ge f or ea ch byt e.

1. Addr esses ca n n ot h a ve t h e f ir st f ou r h igh est bit s (in t h e f ir st f iel d) set t o 1111. Th is is r eser ved f or Cl a ss E n et wor ks on l y (a r eser ved n et wor k cl a ssif ica t ion ). 2. Th e Cl a ss A a ddr ess of 127.x is f or a specia l f u n ct ion kn own a s t h e loop–back function. It sh ou l d n ever be visibl e on t h e n et wor k. 3. Th e bit s t h a t def in e t h e h ost por t ion of t h e a ddr ess ca n n ot be set t o a l l 1s or a l l 0s t o in dica t e a n in dividu a l a ddr ess. Th ese a r e r eser ved a ddr esses. Al l 1s in dica t e a l oca l su bn et a l l h ost s br oa dca st a n d a l l 0s in dica t e a n et wor k n u mber . 4. Al l 0s a n d a l l 1s a r e a l l owed in t h e su bn et por t ion of a n a ddr ess a s va l id su bn et a ddr esses. Pl a cin g a 0 in t h e su bn et is ca l l ed subnet 0 (h ow cl ever ) a n d most r ou t er s mu st be t ol d t h a t su bn et 0 is su ppor t ed. However , you mu st be ca r ef u l wh en a ssign in g a l l 1s t o t h e su bn et por t ion of t h e a ddr ess. Th is is a l l owed (a ccor din g t o RFC 1812), bu t it ca n wr ea k h a voc on t h ose n et wor ks t h a t u se a l l su bn et s br oa dca st . If t h e su bn et por t ion of t h e a ddr ess is set t o a l l 1s, t h is ca n be u sed a s a directed broadcast. Rou t er s wil l f or wa r d t h is t ype of da t a gr a m, if t ol d t o do so (t h ey h a ve t o be con f igu r ed). 5. An y a ddr ess wit h a l l 0s in t h e n et wor k por t ion of t h e a ddr ess is mea n t t o r epr esen t “t h is” n et wor k. For exa mpl e, 0.0.0.120 is mea n t a s h ost n u mber 120 on

“t h is” n et wor k (t h e n et wor k f r om wh ich it or igin a t ed). 6. Th er e is a n ol d f or m of br oa dca st in g kn own a s t h e all–0s broadcast. Th is wil l t a ke t h e f or m of 0.0.0.0. Th is f or m sh ou l d n ot be u sed. 0.0.0.0 is u sed t o in dica t e a def a u l t r ou t er (expl a in ed l a t er ). 7. You ca n a ssign you r own IP n et wor k n u mber s if you wil l never h a ve a ccess t o t h e In t er n et or if you pl a n on u sin g somet h in g l ike a Net wor k Addr ess Tr a n sl a t or (NAT, RFC 1631). RFC 1918 a l l ows t h r ee IP a ddr esses t o be u sed f or pr iva t e n et wor ks. 8. Addr esses ca n n ot be ou t of t h e 255 (decima l ) r a n ge f or a n y of t h e 4 byt es. Th er ef or e, a n a ddr ess of 128.6.200.655 is n ot a va l id a ddr ess. Likewise, a n a ddr ess of 420.6.7.900 is n ot a va l id a ddr ess a ssign men t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 60 Address Allocation (The Internet Registry) RFC 2050 descr ibes t h e r egist r y syst em f or

t h e dist r ibu t ion of gl oba l l y u n iqu e In t er n et a ddr ess spa ce a n d r egist r y opt ion s. Th is RFC is dif f er en t f r om most ot h er s. Look in t h e u pper –l ef t cor n er a n d n ot ice t h a t t h e ca t egor y is “Best Cu r r en t Pr a ct ice.” It r epr esen t s a n a ccu r a t e r epr esen t a t ion of t h e cu r r en t pr a ct ice of t h e IP a ddr ess r egist r ies. Th e In t er n et Regist r y h ier a r ch y wa s est a bl ish ed in or der t o a ch ieve a ddr ess u n iqu en ess, dist r ibu t ion of h ier a r ch ica l dist r ibu t ion of gl oba l In t er n et a ddr esses, a n d, most of a l l , pr odu ce a con ser va t ion of IPv4 In t er n et a ddr essees. It con sist s of IANA, Region a l IRs, a n d Loca l IRs. Th e IANA is t h e In t er n et Assign ed Nu mber s Au t h or it y, a n d it h a s over a l l a u t h or it y f or t h e n u mber spa ce u sed in t h e In t er n et . Th is n u mber spa ce in cl u des por t n u mber , a ddr ess, IP ver sion n u mber s, a n d ma n y ot h er sign if ica n t n u mber a ssign men t s. Rea d RFC 1700 f or a f u l l descr ipt ion of t h e IANA. Th e Region a l IRs oper a t e u n der t h e a u t h or it y of IANA. Th ey oper a t e in l a r ge geogr a ph ica l a r ea s su ch a s con t in en t s. Cu r r en t l y, t h er e a r e t h r ee def in ed: In t er NIC, wh ich ser ves Nor t h Amer ica ; RIPE, wh ich ser ves Eu r ope; a n d APNIC, wh ich ser ves t h e Asia n Pa cif ic r egion . Th ese IRs do n ot cover a l l a r ea s. It is expect ed t h a t ea ch IR cover s a n y a r ea n ot specif ica l l y specif ied, bu t wit h in it s immedia t e a r ea . Loca l IRs a r e est a bl ish ed u n der t h e a u t h or it y of t h e r egion a l IR a n d IANA. Th ey cover n a t ion a l dimen sion s. Addr esses a r e a l l oca t ed t o ISPs by r egion a l r egist r ies, wh ich in t u r n a ssign t h em t o t h eir cu st omer ba se. ISPs t h a t exch a n ge r ou t in g in f or ma t ion dir ect l y wit h ot h er ISPs get t h eir a ddr ess a l l oca t ion f r om t h eir geogr a ph ic IR. Ot h er ISPs a r e r ef er r ed t o t h ese ISPs f or a ddr ess a ssign men t . In ot h er wor ds, if you r a ddr ess bl ock h a s a r ea son a bl e ch a n ce of bein g pr opa ga t ed t h r ou gh t h e gl oba l In t er n et r ou t in g t a bl es, t h en you r

a ddr ess a l l oca t ion wil l come f r om t h e IR. Ot h er wise, you wil l get you r a ddr ess a ssign men t f r om you r u pst r ea m ISP. Cu st omer s (commer cia l cor por a t ion s) n eed n ot wor r y a bou t t h is. Th ey wil l get t h eir a ddr ess a ssign men t s f r om t h e ISP t h ey sign u p wit h . Th is is ju st a ba sic in t r odu ct ion t o t h e IP a ddr essin g sch eme.

Addr ess Al l oca t ion (Th e In t er n et Regist r y)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Part Two The Protocol Suite of TCP/IP Chapter 61 Address Resolution Protocol (ARP) Th e In t er n et , bu t

n ot t h e TCP/IP pr ot ocol , gr ew u p wit h h igh -speed l oca l n et wor ks su ch a s Et h er n et , Token Rin g, a n d FDDI. Bef or e t h e In t er n et , t h er e wa s t h e ARPAn et a n d t h is t oo r a n t h e TCP/IP pr ot ocol . Th e ARPAn et st a r t ed on ser ia l l in es t o commu n ica t e bet ween t h e sit es a n d Et h er n et , or a n y LAN f or t h a t ma t t er , wa s n ot a con sider a t ion . IP a ddr essin g wor ked ju st f in e in t h is en vir on men t . Rou t in g wa s a ccompl ish ed bet ween messa ge pr ocessor s kn own a s IMPs (In t er f a ce Messa ge Pr ocessor s). Th e h ost s con n ect ed t o t h e IMP a n d t h e IMP con n ect ed t o t h e ph on e l in es, wh ich in t er con n ect ed a l l ARPAn et sit es. Th e IP a ddr ess iden t if ied t h e h ost (a n d l a t er t h e n et wor k a n d su bn et wor k). Th er e wa s n ot a n eed f or ph ysica l l y iden t if yin g a h ost f or t h er e wa s on l y on e h ost per ph ysica l con n ect ion t o t h e IMP. Mu l t ipl e h ost s cou l d con n ect t o a n IMP, bu t ea ch h a d a n IP a ddr ess t o wh ich t h e IMP f or wa r ded t h e in f or ma t ion . Et h er n et wa s commer cia l l y a va il a bl e in 1980 a n d st a r t ed t o ga in mor e r ecogn it ion wh en ver sion 2.0 wa s r el ea sed in 1982. Sin ce mu l t ipl e st a t ion s wer e t o con n ect t o a n et wor k (sin gl e ca bl e segmen t ) l ike Et h er n et , ea ch st a t ion h a d t o be ph ysica l l y iden t if ied on t h e Et h er n et . Th e design er s of Loca l Ar ea Net wor ks (LANs) a l l ot t ed 48 bit s t o iden t if y a n et wor k a t t a ch men t . Th is is kn own a s a physical address or MAC address. Ph ysica l a ddr esses iden t if y st a t ion s a t t h eir da t a l in k l evel . IP is a n a ddr essin g sch eme u sed a t t h e n et wor k l evel . On a LAN (Et h er n et , Token Rin g, et c.), t wo commu n ica t in g st a t ion s ca n set u p a session

Addr e ss Re so l ut io n Pr o t o c o l (ARP) • RFC 826. • TCP/IP a ddr esses a r e 32 bit s a n d r epr esen t a n et wor k, su bn et , a n d h ost ID. • Addr esses on LANs a r e r epr esen t ed by ph ysica l (MAC) l a yer a ddr esses a n d t h ey a r e 48 bit s in l en gt h . • ARP pr ovides t h e ma ppin g bet ween a h ost ’s 32-bit IP a ddr ess a n d it s 48-bit MAC a ddr ess. • ARP wor ks on l y on t h e l oca l su bn et (it ca n n ot t r a ver se r ou t er s). • ARP bu il ds a t a bl e of IP/MAC a ddr esses t o pr oper l y f or ma t a sou r ce a n d dest in a t ion a ddr ess f iel d in a pa cket .

on l y if t h ey kn ow ea ch ot h er ’s ph ysica l a ddr ess. Th in k of a MAC a ddr ess a s t h e n u mber on you r h ou se. Lot s of h ou ses on you r st r eet a n d ea ch u n iqu el y iden t if ied by t h e n u mber . Th is is a MAC a ddr ess. Sin ce t h e MAC a ddr ess is 48 bit s a n d IP is 32 bit s, a pr obl em exist ed a n d a n RFC r esol ved t h is pr obl em. Th e r esol u t ion wa s simpl e a n d it did n ot a f f ect t h e a l r ea dy est a bl ish ed IP a ddr essin g sch eme. It is kn own a s Address Resolution Protocol, or ARP. Th is is a n IP-a ddr esst o-ph ysica l -st a t ion -a ddr ess r esol u t ion (a ct u a l n a me is binding). If you a r e t r yin g t o commu n ica t e t o a h ost on t h e sa me n et wor k n u mber a s t h e on e on wh ich you a r e cu r r en t l y r esidin g, t h e TCP/IP pr ot ocol wil l u se ARP t o f in d t h e ph ysica l a ddr ess of t h e dest in a t ion st a t ion . If t h e n et wor k n u mber of t h e dest in a t ion st a t ion is r emot e, a r ou t er mu st be u sed t o f or wa r d t h e da t a gr a m t o t h e dest in a t ion . Th e ARP pr ocess is u sed h er e a s wel l , bu t on l y t o f in d t h e ph ysica l a ddr ess of t h e r ou t er . Th er e h a ve been en h a n cemen t s t o t h is pr ot ocol a l t h ou gh n ot t h r ou gh a n RFC. Some st a t ion s l ist en t o a l l ARP pa cket s sin ce t h e or igin a t or sen ds t h em in br oa dca st mode. Al l st a t ion s r eceive t h ese pa cket s a n d wil l gl ea n t h e in f or ma t ion t h a t t h ey n eed. Th e in f or ma t ion in t h e pa cket s in cl u des t h e sen der s’ h a r dwa r e a n d IP a ddr ess ma ppin g. In some in st a n ces, t h is in f or ma t ion is u sed by ot h er st a t ion s t o bu il d t h eir ARP ca ch e. Ma n y ARP t a bl es (ca ch e) empt y t h eir t a bl es per iodica l l y t o r edu ce t h e cycl es n eeded t o r ef r esh t h e ca ch e, t o con ser ve memor y, a n d t o keep t h e t a bl e u p t o da t e. If a st a t ion moves f r om on e su bn et t o a n ot h er a n d st a t ion s on t h e su bn et do n ot empt y t h eir t a bl es, t h ey wil l con t in u e t o h a ve a n en t r y f or t h a t h a r dwa r e a ddr ess. ARP is def in ed in RFC 826.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 62 ARP Packet Format Th e ARP pa cket

f or ma t is sh own . It con t a in s ju st a f ew f iel ds, bu t n ot ice on e t h in g: It does n ot r eside on t op of IP. It h a s it s own Et h er n et Type f iel d (0806), wh ich iden t if ies t h e pr ot ocol own er sh ip of t h e pa cket a n d a l l ows it t o u n iqu el y iden t if y it sel f . It n ever l ea ves it s l oca l segmen t , so wh y u se IP? Th er e a r e f ive ma in f iel ds: t h e oper a t ion (ARP r equ est or ARP r epl y), t h e sou r ce a n d dest in a t ion IP a ddr esses, a n d t h e sou r ce a n d dest in a t ion h a r dwa r e a ddr esses (mor e common l y kn own a s MAC a ddr esses). Th e t ype of h a r dwa r e iden t if ies t h e LAN (10-Mbps Et h er n et , f or exa mpl e), t h e t ype of pr ot ocol iden t if ies t h e pr ot ocol bein g u sed. Th is ma kes ARP ver sa t il e. It ca n be u sed wit h ot h er t ypes of pr ot ocol s a s wel l . Th e most f a mou s on e is Appl eTa l k t h r ou gh t h e Appl eTa l k ARP pr ot ocol . Th e ARP pr ocess is sh own n ext .

ARP Pa cket For ma t

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 63 ARP Operation As sh own in t h e sl ide, in or der

t o a t t a ch t o a n ot h er st a t ion on a TCP/IP n et wor k, t h e sou r ce st a t ion mu st kn ow t h e design a t ion st a t ion ’s IP a ddr ess. Th is ca n be a ccompl ish ed in ma n y wa ys; f or exa mpl e, t ypin g t h e a ddr ess in dir ect l y u sin g a TCP/IP ba sed pr ogr a m, or u sin g a n a me ser ver . In t h is exa mpl e, St a t ion 129.1.1.1 wa n t s a con n ect ion wit h 129.1.1.4 (n o su bn et a ddr essin g is u sed h er e). Th er ef or e, t h e n et wor k a ddr ess of t h is Cl a ss B a ddr ess is 129.1.0.0 a n d t h e per son a l compu t er ’s h ost a ddr ess is 1.1; h en ce, t h e a ddr ess is 129.1.1.1. Wit h ARP, it is a ssu med t h a t t h e IP a ddr ess of t h e dest in a t ion st a t ion is a l r ea dy kn own eit h er t h r ou gh a n a me ser vice (a cen t r a l ser vice or f il e on a n et wor k st a t ion t h a t ma ps IP a ddr esses t o h ost n a mes, expl a in ed in mor e det a il l a t er ), or by u sin g t h e IP a ddr ess it sel f . To r edu ce over h ea d on t h e n et wor k, most TCP n et wor k st a t ion s wil l ma in t a in a LAN ph ysica l -a ddr ess-t o-IP-a ddr ess t a bl e on t h eir h ost ma ch in es. Th e ARP t a bl e is n ot h in g mor e t h a n a sect ion of RAM memor y t h a t wil l con t a in da t a l in k ph ysica l (or MAC a ddr esses) t o IP a ddr ess ma ppin gs t h a t it h a s l ea r n ed f r om t h e n et wor k.

ARP Oper a t ion On ce t h e IP a ddr ess is kn own f or t h e dest in a t ion st a t ion , IP on t h e sou r ce st a t ion wil l f ir st l ook in t o it s ARP t a bl e t o f in d t h e ph ysica l a ddr ess f or t h a t dest in a t ion IP a ddr ess. If a ma ppin g is f ou n d, n o ARP r equ est pa cket wil l be t r a n smit t ed on t o t h e n et wor k. IP ca n bin d (pl a ce t h e ph ysica l a ddr esses on t h e da t a l in k h ea der s of t h e pa cket ) t h e IP a ddr ess wit h t h e ph ysica l a ddr ess a n d sen d t h e IP da t a gr a m t o t h e da t a l in k f or t r a n smission t o t h e n et wor k. If t h e a ddr ess is n ot in t h e ARP t a bl e, t h e ARP pr ot ocol wil l bu il d a n ARP r equ est pa cket a n d sen d it ph ysica l l y a ddr essed in br oa dca st mode (dest in a t ion a ddr ess FF-FF-FFFF-FF-FF). Al l st a t ion s on t h e ph ysica l n et wor k wil l r eceive t h e pa cket , bu t on l y t h e

h ost wit h t h a t IP a ddr ess wil l r epl y. Host 129.1.1.4 wil l r epl y t o t h e r equ est pa cket wit h a n ARP r espon se pa cket ph ysica l l y a ddr essed t o st a t ion 129.1.1.1. Wh en t h e h ost wh ose IP a ddr ess is in t h e r equ est pa cket r espon ds, it wil l r espon d wit h a n ARP r epl y pa cket wit h t h e sou r ce a ddr ess set t o it s a ddr ess (ph ysica l l y a n d in side t h e ARP r epl y pa cket ), a n d t h e dest in a t ion a ddr ess a s t h e or igin a t or . On ce t h e or igin a t or of t h e r equ est r eceives t h e r espon se, it wil l ext r a ct t h e ph ysica l a ddr ess f r om t h e sou r ce a ddr ess in t h e pa cket a n d u pda t e it s ARP t a bl e. Now t h a t it h a s t h e ma ppin g, it wil l t r y t o su bmit it s IP da t a gr a m t o t h e dest in a t ion st a t ion u sin g t h e pr oper a ddr esses (IP a n d ph ysica l a ddr ess). Th is pr ocess is a u t oma t ic. Th e u ser wil l t ypica l l y be u sin g on e of TCP’s a ppl ica t ion s (TELNET f or t er min a l ser vice, SMTP f or ma il ser vice, or FTP f or f il e t r a n sf er ser vice) wh en a t t empt in g a con n ect ion . Most TCP ven dor s su ppl y a u t il it y pr ogr a m t h a t a l l ows a u ser t o see t h e en t r ies in t h e ARP t a bl e. To impr ove t h e ef f icien cy of t h e pr ot ocol , a n y st a t ion on t h e ph ysica l n et wor k t h a t r eceives t h e ARP pa cket (r equ est pa cket ) ca n u pda t e t h e ARP ca ch e. Th e sen der ’s ph ysica l a n d IP a ddr esses wil l be in t h e pa cket a n d, t h er ef or e, a l l st a t ion s ca n u pda t e t h eir ARP t a bl es a t t h e sa me t ime. Th e sl ide sh ows t h e ARP pa cket f or ma t . It is en ca psu l a t ed in a n Et h er n et pa cket a s sh own . Th is ARP pr ocess wor ks f or st a t ion s commu n ica t in g wit h ea ch ot h er on t h e sa me LAN (t h e sa me n et wor k n u mber ). If t h ey a r e n ot on t h e sa me LAN, t h e ARP pr ocess st il l wor ks, bu t a n a ddr ess of a r ou t er wil l be f ou n d. Th is is f u l l y expl a in ed l a t er .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 64 Rules for ARP 1. ARP is n ot a pa r t of t h e IP pr ot ocol a n d t h er ef or e does n ot con t a in IP h ea der s. ARP wor ks dir ect l y on t op of t h e da t a l in k l a yer . 2. ARP r equ est s a n d r espon ses a r e t r a n smit t ed wit h a dest in a t ion ph ysica l br oa dca st a ddr ess (a l l Fs) a n d t h er ef or e n ever l ea ve t h eir l ogica l su bn et . Pl u s, wit h Ru l e 1, t h ese pa cket s ca n n ot be r ou t ed 3. Sin ce ARP is n ot pa r t of t h e IP pr ot ocol , a n ew Et h er Type (t h e f iel d in t h e Et h er n et pa cket t h a t iden t if ies t h e pr ot ocol u sed by t h e pa cket ) is a ssign ed t o iden t if y t h is t ype of pa cket . 0806 is a n ARP r equ est a n d 0806 is a n ARP r epl y. Some ARP impl emen t a t ion s ca n be a ssign ed t h e 0800 Et h er Type, f or IP wil l be a bl e iden t if y t h e pa cket a s a n ARP r equ est or ARP r epl y pa cket . Not a l l impl emen t er s of IP u se t h ese t ypes. Some st il l u se t h e Et h er Types of 0800 f or ARP. Rul e s f o r ARP • ARP does n ot r u n on t op of IP a n d t h er ef or e h a s n o IP h ea der s. • ARP r equ est s a r e t r a n smit t ed in br oa dca st so t h a t a l l st a t ion s r eceive t h e pa cket . • New Et h er Type def in ed 0x0806 f or bot h t h e ARP r equ est a n d r epl y. • ARP r epl ies a r e sen t dir ect l y t o t h e r equ est in g st a t ion (u n ica st , n ot br oa dca st ). • ARP t a bl es sh ou l d a ge ou t t h eir en t r ies. • An a t t a ch men t sh ou l d a n swer a n ARP sen t t o it sel f .

4. Some impl emen t a t ion s h a ve a n ARP a gin g ca pa bil it y. Th is a l l ows ARP t o del et e en t r ies t h a t h a ve n ot been u sed f or a per iod of t ime, r edu cin g t h e ARP l ooku p t ime a n d sa vin g memor y. 5. If a ma ch in e su bmit s a n ARP r equ est f or it sel f , it mu st r epl y t o t h e r equ est .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 65 Reverse Address Resolution Protocol (RARP) Th is pr ot ocol

is u sed wh en a n et wor k st a t ion kn ows it s MAC a ddr ess bu t does n ot kn ow it s IP a ddr ess. Wh en wou l d t h is h a ppen ? Diskl ess wor kst a t ion s a r e a good exa mpl e. Not ice t h a t RARP u ses t h e ARP pa cket f or ma t a n d does n ot in vol ve IP; t h er ef or e, t h is pa cket ca n n ot be r ou t ed. Th is pr ot ocol h a s been in u se f or some t ime, bu t t h er e a r e ot h er pr ot ocol s t h a t do a bet t er job. Th is is on e of t h e r ea son s t h a t we u se BOOTP a n d DHCP f or a ddr ess a ssign men t beca u se t h ey ca n be f or wa r ded over a r ou t er (wit h a l it t l e a ssist a n ce f r om t h e r ou t er ). On e pr obl em wit h RARP is t h a t l ike it s cou sin ARP, it does n ot u se IP. Th er ef or e, RARP is gen er a l l y u sed on l y on a LAN. Th e r equ est in g cl ien t ma ch in e wil l sen d ou t a RARP r equ est t o a ser ver l oca t ed on t h e l oca l segmen t t h a t h a s t h e RARP ser ver ser vice r u n n in g on it . Th is RARP ser ver wil l r espon d t o t h e r equ est wit h t h a t pa r t icu l a r st a t ion ’s IP a ddr ess. Al t h ou gh t h e RARP ser ver does n ot n eed t o be l oca t ed on t h e sa me ca bl e segmen t or ext en ded LAN, it is pr ef er r ed. Some r ou t er ven dor s h a ve en a bl ed t h eir r ou t er s t o f or wa r d t h ese r equ est s a n d r espon ses t o ot h er n et wor ks.

Rever se Addr ess Resol u t ion Pr ot ocol (RARP) Th e pa cket f or ma t f or a RARP pa cket is t h e sa me a s f or ARP. Th e on l y dif f er en ce is t h a t t h e f iel d t h a t wil l be f il l ed in wil l be t h e sen der ’s ph ysica l a ddr ess. Th e IP a ddr ess f iel ds wil l be empt y. A RARP ser ver wil l r eceive t h is pa cket , f il l in t h e IP a ddr ess f iel ds, a n d r epl y t o t h e sen der —t h e opposit e of t h e ARP pr ocess. Ot h er pr ot ocol simil a r t o t h is a r e BOOTP a n d Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP). DHCP is mor e power f u l t h a n RARP, bu t it does su ppl y on e of t h e sa me f u n ct ion s a s RARP: r esol vin g a n IP a ddr ess. Besides bein g l ess f u n ct ion a l t h a n DHCP, RARP on l y wor ks on sin gl e su bn et s. RARP wor ks a t t h e da t a l in k l a yer a n d t h er ef or e ca n n ot spa n

su bn et s gr a cef u l l y. DHCP ca n spa n su bn et s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 66 Proxy ARP Pr oxy ARP pr ot ocol

is n ot u sed mu ch a n ymor e, bu t it is st il l wor t h men t ion in g. IP wa s pr et t y wel l est a bl ish ed wh en ARP ca me a l on g, a n d some TCP/IP impl emen t a t ion s did n ot su ppor t ARP. However , TCP/IP over LANs wit h su bn et s wa s bein g impl emen t ed a n d a n in t er im sol u t ion wa s n eeded. Th is wa s t h e pu r pose of Pr oxy ARP (a l so kn own a s ARP Ha ck). Pr oxy ARP is t h e a bil it y of a r ou t er t o be a bl e t o r espon d t o a n en dst a t ion (h ost ) ARP r equ est f or a h ost t h a t t h in ks t h e dest in a t ion IP a ddr ess is on t h e l oca l LAN. Th er ef or e, if a h ost does n ot su ppor t su bn et a ddr essin g, it cou l d in cor r ect l y mist a ke a n IP su bn et n u mber f or a h ost n u mber . Th e r ou t er t r icks t h e t r a n smit t in g st a t ion in t o bel ievin g t h a t t h e sou r ce st a t ion is on t h e l oca l LAN. En dst a t ion A t h in ks h ost B is on t h e l oca l LAN. Host B su ppor t s su bn et a ddr essin g a n d en dst a t ion A does n ot . Deciph er in g t h e IP a ddr ess, t h e f ir st t wo f iel ds (con t a in in g t h e n et wor k ID) a r e t h e sa me. Th er ef or e, en dst a t ion A wil l sen d ou t a l oca l ARP r equ est pa cket wh en it sh ou l d be su bmit t in g t h e pa cket t o t h e r ou t er so t h a t it ca n del iver t h e pa cket t o t h e en dst a t ion . If t h e r ou t er h a s pr oxy ARP en a bl ed, t h e r ou t er wil l a n swer f or h ost B. Th e r ou t er , wh ich su ppor t s su bn et t in g, wil l l ook u p t h e ARP r equ est a n d t h en n ot ice t h a t t h e su bn et wor k a ddr ess is in it s r ou t in g t a bl e. Th e r ou t er r espon ds f or en dst a t ion B. En dst a t ion A wil l r eceive t h is r espon se a n d t h in k it is f r om h ost B—t h er e is n ot h in g in t h e ph ysica l a ddr ess of a pa cket t o in dica t e wh er e it ca me f r om. Th e h ost wil l t h en su bmit a l l pa cket s t o t h e r ou t er a n d t h e r ou t er wil l del iver t h em t o en dst a t ion A. Th is commu n ica t ion wil l con t in u e u n t il on e en d t er min a t es t h e session .

Pr oxy ARP Pr oxy ARP is a ver y u sef u l pr ot ocol f or t h ose n et wor ks t h a t h a ve been u sin g br idges t o impl emen t t h eir IP n et wor k a n d a r e movin g t o a r ou t er en vir on men t . Th er e a r e ot h er sit u a t ion f or wh ich pr oxy ARP is a ppr opr ia t e, bu t it s u se is wa n in g. Toda y, most h ost s on

a TCP/IP in t er n et su ppor t su bn et ma skin g a n d most IP n et wor ks a r e u sin g r ou t er s. A pot en t ia l pr obl em in u sin g pr oxy ARP is f or t h ose n et wor ks t h a t impl emen t t h e mech a n ism t o en su r e sin gl e IP a ddr esses a r e on ea ch n et wor k. Most TCP/IP impl emen t a t ion s a l l ow u ser s ea sy a ccess t o t h eir n et wor k n u mber (t h a t is, t h ey ca n ch a n ge it wit h a t ext edit or ). Th is a l l ows a n y h a cker t o ch a n ge h is or h er n u mber t o a n ot h er in or der t o r eceive da t a gr a ms dest in ed f or a n ot h er h ost . Some impl emen t a t ion s of TCP/IP wil l det ect f or t h is. Rou t er s t h a t impl emen t pr oxy ARP wil l get ca u gh t , f or t h ey wil l a n swer f or a n y st a t ion on a dif f er en t n et wor k, t h er eby givin g t h e impr ession t h a t t h er e is on e ph ysica l a ddr ess t o mu l t ipl e IP a ddr esses. Th er e is a t r u st on a n y IP n et wor k t h a t IP a ddr esses wil l n ot be a r bit r a r il y a ssign ed. Th er e sh ou l d be on e IP a ddr ess f or ea ch ph ysica l a ddr ess on a n in t er n et .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 67 What’s Wrong with the Address? Wit h t h e va st

expl osion of con n ect ivit y t o t h e In t er n et st a r t in g in 1994, t h e In t er n et wa s soon r u n n in g ou t of IPv4 a ddr esses. Cl a ss As in t h e r a n ge of 64–126 wer e n ot a ssign ed; Cl a ss Bs wer e a t t h e poin t of exh a u st ion ; a n d Cl a ss Cs, a l t h ou gh pl en t if u l , on l y a l l owed f or 254 h ost a ddr esses per n et wor k n u mber a ssign men t . Cl a ss C su bn et t in g is n ot exa ct l y pa in l ess. Most sit es wer e given mu l t ipl e Cl a ss C a ddr esses a n d t h is wa s qu ickl y f il l in g u p t h e In t er n et r ou t in g t a bl es, Some est ima t es wer e a s h igh a s 85,000 r ou t es on t h e gl oba l r ou t in g t a bl es (t h ose t a bl es h el d by n a t ion a l In t er n et Ser vice Pr ovider s su ch a s Spr in t a n d MCI). Yet , t h e compu t in g power of t h e r ou t er a n d a va il a bil it y of RAM t o h ol d t h ose t a bl es in t h e r ou t er wer e n ot r ea dy yet . Th e siz e of t h e In t er n et wa s dou bl in g ever y 9 mon t h s, yet t h e compu t in g power of t h e r ou t er s wa s dou bl in g ever y 18 mon t h s. In st ea d of pr odu cin g f a st er a n d mor e power f u l r ou t er s (l ike we did wit h ma in f r a mes in t h e 1970s a n d 1980s), we beca me sma r t a n d in ven t ed a h ol dover sol u t ion u sin g t h e exist in g equ ipmen t a n d cu r r en t IPv4 a ddr essin g sch eme. What ’s Wr o ng wit h t he Addr e ss? • IP a ddr ess is 32 bit s in l en gt h . • Al l ows f or 4,294,967,296 u n iqu e a ddr esses • A pr obl em occu r s beca u se t h e a ddr esses a r e gr ou ped in a cl a ss a ddr ess. • A r a n ge of bit s is a ppl ied t o a n a ddr ess, most of wh ich a r e wa st ed • Addr esses wer e a r bit r a r il y h a n ded ou t wit h ou t r ega r d t o geogr a ph ic l oca t ion . • Cl a ss C a ddr esses wer e over t a xin g t h e In t er n et r ou t in g t a bl es. • Cl a ss A st opped bein g h a n ded ou t a n d Cl a ss B wa s exh a u st ed. • RFC 1338 in t r odu ced su per n et t in g a s a t h r ee-yea r f ix. • It t u r n ed in t o Cl a ssl ess In t er -Doma in Rou t in g (CIDR).

Now we h ea r a bou t t h e exh a u st ion of IP a ddr ess spa ce. Ca n t h is be t r u e, wit h over 4

bil l ion a ddr esses? Bu t wa it . We h a ve 32 bit s of a ddr ess spa ce. Ign or in g t h e r u l es of cl a ss a ddr essin g t h is, 2n 32 a l l ows f or 4,294,967,296 u n ica st a ddr esses t o be a ssign ed (in some f or ma t ion of n et wor ks a n d h ost s). Seems l ike a l ot of a ddr esses, bu t r emember , IP l ived in a cl a ss en vir on men t , wa st in g mu ch of t h e a va il a bl e a ddr ess spa ce. Su bn et t in g a l on g wit h pr ot ocol s su ch a s RIPv2 a n d OSPF a l l owed f or va r ia bl e-l en gt h su bn et ma sks wh ich a l l owed f or mor e ef f icien cy of t h e a ddr ess bit s, bu t t h er e is st il l a sh or t a ge of IPa ddr esses. Th e or igin a l pr obl ems wer e t h r ee t ypes of cl a ssf u l a ddr esses a n d a ddr ess a l l oca t ion wit h ou t a pl a n . It u sed t o be t h a t a n yon e wh o wa n t ed a n a ddr ess wa s given on e a r bit r a r il y, a n d a ddr esses wer e a l l oca t ed wit h ou t kn owl edge of t h eir l oca t ion or f u l l y u n der st a n din g t h eir n et wor k r equ ir emen t s l ea din g t o t h e pr oper a ssign men t of a n a ddr ess. In 1992, a st u dy wa s per f or med a n d t h e con cl u sion wa s t h a t n ot on l y wa s t h e a ddr ess spa ce n ea r depl et ion (Cl a sses A a n d B), a ssign in g t h e r ema in in g 2 mil l ion Cl a ss C a ddr esses wou l d ca u se t h e In t er n et ’s r ou t er a r r a y t o mel t down . Th e In t er n et ba ckbon e r ou t er s wer e a l r ea dy con gest ed a n d sl ow wit h t h e cu r r en t r ou t in g t a bl es of l ess t h a n 30,000 r ou t es. Some or ga n iz a t ion s a n d n et wor k pr ovider s h a d mu l t ipl e con t igu ou s n et wor ks a ssign ed. Yet , a s we l ea r n ed in t h e pr eviou s sect ion on a ddr essin g, ea ch a ddr ess is a n et wor k a n d h ol ds on e r ecor d sl ot in t h e r ou t in g da t a ba se. Th e idea of su per n et t in g wa s in t r odu ced in RFC 1338 a s a mea n s of su mma r iz in g mu l t ipl e n et wor k n u mber s (on e en t r y det a il s mu l t ipl e n et wor k IDs), f u r t h er r edu cin g t h e n u mber of r ou t es r epor t ed. Th is wa s a 1992 RFC in t en ded a s a t h r ee-yea r f ix, wh ich ma t u r ed in t o CIDR.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 68 Extending the Life of the IPv4 Address Space Th e f ol l owin g wa s t a ken f r om RFC 760: Addresses are fixed length of four octets (32 bits). An address begins with a one-octet network number, followed by a three-octet local address. This three-octet field is called the rest field. Ta ken f r om RFC 791, pa ge 6: Addresses are fixed length of four octets (32 bits). An address begins with a network number, followed by a local address (called the rest field). There are three formats or classes of internet addresses: In Class A, the high-order bit is 0, the next 7 bits are the network, and the last 24 bits are the local address; in Class B, the high-order 2 bits are 1–0, the next 14 bits are the network, and the last 16 bits are the local address; In Class C, the high-order 3 bits are 1–1–0, the next 21 bits are the network, and the last 8 bits are the local address. RFC 950 in t r odu ced u s t o su bn et t in g: While this view has proved simple and powerful (two-level model, assigning a network number per network), a number of organizations have found it inadequate, and have added a third level to the interpretation of Internet addresses. In this view, a given Internet network is divided into a collection of subnets. RFCs 1517–1520 in t r odu ced u s t o Cl a ssl ess In t er -Doma in Rou t in g (CIDR): It has become clear that the first two of these problems (routing information overload and Class B exhaustion) are likely to become critical in the near term. Classless InterDomain Routing (CIDR) attempts to deal with these problems by defining a mechanism with which to slow the growth of routing tables and reduce the need to allocate new IP network numbers.

Ext e nding t he Lif e o f t he IPv4 Addr e ss Spac e • Or igin a l RFC f or IP wa s RFC 760. • No con cept of cl a sses; a ddr ess wa s 8-bit n et wor k ID • RFC 791 in t r odu ced a segmen t a t ion of t h e a ddr ess in t o Cl a sses. • RFC 950 in t r odu ced su bn et t in g. • Al l owed f or ef f icien cy t o exist wit h Cl a ss a ddr esses • RFCs 1517–1520 in t r odu ced CIDR. • Used on t h e In t er n et r ou t in g t a bl es

Th is sect ion dea l s pr ima r il y wit h t h e IPv4 a ddr ess ext en sion s. In cl u ded in t h is a r e su bn et t in g (a n IP a ddr ess r eview, va r ia bl e-l en gt h su bn et ma sks, r ou t e a ggr ega t ion , a n d CIDR). IPv6 sh ou l d be in cl u ded in t h is a s wel l wit h t h e 128-bit a ddr ess. However , t h is discu ssion is h el d of f u n t il a f t er t h e IPv4 discu ssion . Th e CIDR discu ssion f u l l y r evea l s t h e a ddr ess pr obl em a n d wh a t wa s don e a bou t it .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 69 IP Address Assignment (The Old Method) IP Addr e ss Assig nme nt (The Ol d Me t ho d) • Th r ee met h ods of a ssign in g a ddr esses in t h e ol d da ys: • Acqu ir e a dist in ct n et wor k n u mber f or ea ch ca bl e segmen t sepa r a t ed by a r ou t er • Use a sin gl e n et wor k n u mber f or t h e en t ir e oper a t ion , bu t a ssign h ost n u mber in coor din a t ion wit h t h eir commu n ica t ion r equ ir emen t s • Use a sin gl e n et wor k n u mber a n d pa r t it ion t h e h ost a ddr ess spa ce by a ssign in g su bn et n u mber t o t h e LANs (“expl icit su bn et s”)

Or igin a l l y, u sin g RFC 791 wit h ou t

su bn et t in g, a n or ga n iz a t ion wit h a compl ex (mor e t h a n on e) n et wor k t opol ogy h a d t h r ee ch oices f or a ssign in g In t er n et a ddr esses: 1. Acqu ir e a dist in ct In t er n et n et wor k n u mber f or ea ch ca bl e; su bn et s a r e n ot u sed a t a l l . 2. Use a sin gl e n et wor k n u mber f or t h e en t ir e or ga n iz a t ion , bu t a ssign h ost n u mber s in coor din a t ion wit h t h eir commu n ica t ion r equ ir emen t s (f l a t n et wor ks segmen t ed u sin g br idges). 3. Use a sin gl e n et wor k n u mber a n d pa r t it ion t h e h ost a ddr ess spa ce by a ssign in g su bn et n u mber s t o t h e LANs (expl icit su bn et s). Cr ea t e you r own bu t don ’t a dver t ise t h em t o t h e ARPAn et . Th is is t h e most popu l a r met h od. Empl oyin g t h e f ir st ch oice ca u sed r ou t in g t a bl es t o gr ow. RFC 950 a l l owed f or su bn et a ddr essin g t o t a ke pl a ce wit h in a n a u t on omou s syst em, wh ich a l l owed f or a sit e t o con t in u e t o su bn et it s AS, bu t t h e su bn et s wer e n ever pr opa ga t ed t o t h e In t er n et r ou t in g t a bl es. Su bn et t in g a n d VLSM (va r ia bl e-l en gt h su bn et ma sks, expl a in ed l a t er ) a l l owed f or t h e gl oba l r ou t in g t a bl es t o st op gr owin g expon en t ia l l y a n d a l l owed sit es t o con t r ol t h eir own n et wor ks a s wel l . However , n et wor k n u mber s wer e pl en t if u l a n d

su bn et s sl owed t h e expa n sion of t h e In t er n et r ou t in g t a bl es. Th is wa s bef or e t h e commer cia l iz a t ion of t h e In t er n et in 1994. Th e a dver se ef f ect s of br idges in compl ex n et wor ks a r e wel l kn own . Sin ce t h e br idge r evol u t ion , r ou t er s h a ve become t h e ma in st a y of t h e cor por a t e ba ckbon e. Th is wor ked wel l f or sh a r ed en vir on men t s, bu t t ech n ol ogy wa s ch a n gin g: Net wor k a t t a ch men t s wer e becomin g f a st er a n d mor e power f u l . Th e br idgin g r evol u t ion ca me ba ck a s swit ch es in t h a t ea ch deskt op cou l d n ow h a ve it s own 10-Mbps pipe. Th e swit ch es bu il d a sma l l f l a t n et wor k a n d sh ou l d be u sed t o f r on t en d r ou t er s, t h u s a l l owin g f or microsegmenting bu t n ot microsubnetting. Su bn et t in g on e n et wor k n u mber ca u sed t h e In t er n et r ou t in g t a bl es t o sl ow t h eir gr owt h . Th is wor ked wel l wit h Cl a ss B a ddr esses. Cl a ss C n et wor ks f or ced t h e In t er n et r ou t in g t a bl es t o gr ow, a n d Cl a ss A a ddr esses wer e n ot h a n ded ou t . Al so, sin ce mor e t h a n 50 per cen t of t h e bu sin esses wer e sma l l - a n d mediu m-siz ed bu sin esses. Cl a ss C a ddr esses wer e n eeded. Aga in , we wer e in a pr edica men t . We n eeded a sol u t ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 70 IP Addressing (The Old Method) Ref er

t o sl ide 82.

IP Addr essin g (Th e Ol d Met h od)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 71 Address Terms and Definitions Th er e a r e f ou r

t er ms u sed in t h is sect ion :

Var iabl e Le ng t h Subne t Masks (VLSM). Th e a bil it y t o pl a ce a va r ia bl e-l en gt h su bn et ma sk on a sin gl e IP n et wor k a ddr ess. Ref er t o RFC 1817. VLSMs a r e expl a in ed in det a il in t h e OSPF sect ion . Supe r ne t t ing . A ma sk t h a t is sh or t er t h a n t h e IP n et wor k a ddr ess n a t u r a l ma sk. Cl assl e ss Int e r -Do main Ro ut ing (CIDR). An a dver t isemen t mech a n ism t h a t a l l ows f or a dver t isin g r ou t es wit h ou t r ega r d t o cl a ss a ssign men t . Th e r ou t e cou l d be iden t if ied by a su per n et or by a n ext en ded su bn et ma sk. Addr e ss ag g r e g at io n. Th e a bil it y t o su mma r iz e con t igu ou s bl ocks of IP a ddr esses a s on e a dver t isemen t . Th e a bil it y t o ma n ipu l a t e IP a ddr esses is a f f ect ed n ot on l y on cu st omer sit es bu t wit h in t h e gl oba l In t er n et a s wel l . Cl a ss-or ien t ed IP a ddr esses a r e st il l u sed in t h e cu st omer en vir on men t , wh er ea s Cl a ssl ess IP a ddr essin g is u sed in t h e In t er n et it sel f . Cu st omer s a r e f r ee t o u se wh ich ever mech a n ism ef f icien t l y u ses t h e a ddr ess t h a t is a ssign ed t o t h em. No l on ger a r e t h ey r est r ict ed t o u se on l y on e su bn et ma sk f or t h eir a ssign ed n et wor k n u mber . OSPF a n d RIP2 ga ve u s mor e f l exibil it y wh en u sin g t h e su bn et ma sk. Th ese r ou t in g u pda t e pr ot ocol s dist r ibu t e t h e su bn et ma sk f or ea ch en t r y in it s t a bl e. Th e a l l owed u s gr ea t f l exibil it y in ma sk a ssign men t a n d a l l owed f or mor e ef f icien cy of t h e n et wor k a ddr ess. For a sin gl e n et wor k ID, we cou l d move t h e ma sk a r ou n d t o va r iou s ma sks f or t h e sin gl e n et wor k ID. A sit e cou l d ma ke ver y ef f icien t u se of it s a ssign ed n et wor k ID u sin g VLSM. We cou l d move t h e ma sk down t o 255.255.255.252 f or ser ia l l in es a l l owin g 2 bit s f or t h e h ost , a n d t h en move t h e ma sk a r ou n d a ga in f or a va r iou s n u mber of h ost s. OSPF a l so a l l owed f or su mma r ies in t h e r ou t in g u pda t es, wh ich a l l owed r ou t er s t o sen d ou t on e n et wor k n u mber wit h a ma sk a s a n u pda t e in dica t in g a l l bit s in t h e ma sk h a n dl ed by t h a t r ou t er . Th is is ver y ef f icien t .

Addr e ss Te r ms and De f init io ns • Va r ibl e Len gt h Su bn et Ma sks (VLSM)—Th e a bil it y t o pl a ce a va r ia bl e-l en gt h su bn et ma sk on a sin gl e IP n et wor k n u mber . • Su per n et t in g—Th e a bil it y t o a ppl y a ma sk t o a n IP a ddr ess t h a t is sh or t er t h a n it s n a t u r a l ma sk. • Cl a ssl ess In t er -Doma in Rou t in g (CIDR)—An a dver t isemen t mech a n ism t h a t a l l ows f or a dver t isin g r ou t es wit h ou t r ega r d t o Cl a ss a ssign men t . Th e r ou t e cou l d be iden t if ied by a su per n et or by a n ext en ded su bn et ma sk. • Addr ess a ggr ega t ion —Th e a bil it y t o su mma r iz e con t igu ou s bl ocks of IP a ddr esses a s on e a dver t isemen t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 72 Making the Address Efficient Making t he Addr e ss Ef f ic ie nt • Al l met h ods pr ovide f or ext en din g t h e l if e of IPv4. • CIDR is ver y simil a r t o VLSM. • Addr esses a l l oca t ed in bl ocks. • Exa mpl e: 205.24.0.0/16 mea n s t h a t t h e a ddr ess r a n ge of 205.24.0.0 t h r ou gh 205.24.255.0 (256 Cl a ss Cs) is a ssign ed t o on e ISP or con su mer , et c. • Bl ock a ssign men t a l l ows f or on e r ou t e t o be pl a ced in t h e In t er n et r ou t in g t a bl es. • It a l l ows t h e ISP t o br ea k u p t h e a ddr esses a n d ef f icien t l y h a n d t h em ou t t o it s cu st omer s. • Con su mer s mu st det a il t h eir a ddr essin g r equ ir emen t s t o t h e ISP. • Addr ess a ssign men t s a r e st il l con ser va t ive.

Th e r a pid expa n sion f or

con n ect ivit y a n d t h e expl odin g cor por a t e in f r a st r u ct u r e in it ia l l y ca u sed pr obl ems on t h e In t er n et . IP a ddr esses wer e a ssign ed sequ en t ia l l y t o r equ est in g or ga n iz a t ion s wit h ou t r ega r d t o t h e r equ est er ’s l oca t ion or met h od of In t er n et con n ect ion . Wh a t t h is mea n s is t h a t a r equ est in g compa n y simpl y ca l l ed in f or a n IP a ddr ess a ssign men t a n d wa s a ssign ed a n IP a ddr ess f r om a l ist of sequ en t ia l l y l ist ed n u mber s. For exa mpl e, a compa n y in Ca l if or n ia cou l d be a ssign ed 150.1.0.0 a n d a compa n y in Vir gin ia wou l d be a ssign ed 151.1.0.0 a n d ma ybe 40 Cl a ss C a ddr esses. Th en a compa n y in Texa s cou l d a ppl y f or 160.1.0.0 a n d 50 Cl a ss C a ddr esses. Th ey cou l d t h en sign u p f or a n y ISP t h ey desir ed wit h t h eir n ewl y a ssign ed IP a ddr esses. Ver y in ef f icien t , bu t a t t h e t ime, wh o kn ew? Th e r ou t in g syst em f il l ed u p wit h sma l l er IP a ddr esses a cr oss mu l t ipl e, l on g h ops of r ou t er s, in st ea d of l a r ge con t igu ou s a ddr esses. Su per n et t in g, CIDR, a n d a ddr ess a ggr ega t ion pr ovided a ddr ess f l exibil it y a n d ef f icien cy t o t h e ISP a n d t h e In t er n et . CIDR is ver y simil a r t o VLSM. Toda y, bl ocks of a ddr esses (a s in dica t ed t owa r d t h e en d of t h is sect ion ) a r e h a n ded ou t t o In t er n et Ser vice Pr ovider s (ISPs) in bl ocks (or a r a n ge) t h r ou gh t h e In t er n et Regist r y (RFC 2050 f u l l y expl a in s

t h is). For exa mpl e, a n ISP ma y be a ssign ed t h e a ddr ess bl ock of 205.24.0.0/16, wh ich a l l ows t h e ISP t o h a n d ou t a ddr esses in t h e r a n ge of 205.24.0.0 t h r ou gh 205.24.255.255. In t h is wa y, t h e gl oba l r ou t in g t a bl es on l y kn ow t h a t a ddr esses 205.24.0.0 t h r ou gh 205.24.255.255 go in on e dir ect ion t o a n ISP. Al l of t h ese a ddr esses a r e su mma r iz ed in t o on e r ou t in g t a bl e en t r y, wh ich , u sin g t h e ol d met h od, wou l d h a ve been 255 en t r ies. Th e en t r y in t h e gl oba l r ou t in g t a bl es wou l d h a ve been 205.24.0.0/16 in st ea d of l ist in g a l l 255 a ddr esses—t h e gl oba l r ou t in g t a bl es do n ot ca r e a bou t t h e in dividu a l n et wor k a ssign men t s. Th e ISP su bdivides t h is bl ock t o h a n d ou t in dividu a l a ddr esses t o it s cu st omer s a s Cl a ssf u l a ddr esses, bu t h ow a n ISP cu t s u p t h e a ddr esses a n d a ssign s t h ese bl ocks is a f f ect ed u sin g t h e pr ot ocol s pr eviou sl y men t ion ed. On e wh ol e bl ock wou l d n ot be a ssign ed t o on e compa n y, bu t mu l t ipl e compa n ies. A compa n y r equ ir in g In t er n et con n ect ion ca l l s it s ISP, det a il in g it s t opol ogy a n d r equ est in g a ddr ess spa ce. Th e ISP (kn owin g it h a s t o a ssign n et wor k n u mber s spa r in gl y) wil l t h en a ssign t h e cor r ect n u mber a n d n et wor k r a n ge t o it s down st r ea m cu st omer s. Th e r a n ge is t h en en t er ed in t o t h e ISP’s r ou t in g t a bl e, per h a ps a s on e a ddr ess even t h ou gh mu l t ipl e Cl a sses wer e given t o t h e cu st omer .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 73 Masks and Prefixes Pr ef ix r ou t in g h a s been a r ou n d a l on g t ime. In f a ct , it

is def in ed in RFC 1338. Pr ef ix r ou t in g is t h e met h od u sed on t h e ba ckbon e of t h e In t er n et —a n IP a ddr ess is l ooked a t simpl y a s a 32-bit n u mber a n d a pr ef ix. Th e pr ef ix is a ma sk t h a t sl ides over t h e IP a ddr ess t o det er min e it s n et wor k n u mber . A r ou t in g en t r y in t h e In t er n et r ou t in g t a bl e ma y simpl y be 150.0.0.0/8 a n d a n ext h op a ddr ess t o t h e n ext in -l in e r ou t er t o t h a t dest in a t ion . Th e r ou t er does n ot ca r e a bou t a n yt h in g el se in t h e a ddr ess except t h a t a l l 150.x.x.x n et wor ks a r e in t h e in dica t ed dir ect ion . Masks and Pr e f ixe s • Th e a ddr esses 210.10.40.0/24 a n d 210.10.40.0/255.255.255.0 mea n t h e exa ct sa me t h in g. IP Ne t wo r k Addr e ss

Pr e f ix

Subne t Mask

128.1.0.0 190.1.8.0 207.16.16.128

/16 /21 /25

255.255.0.0 255.255.248.0 255.255.255.128

A su bn et ma sk a n d a pr ef ix ca n be in t er mixed. In f a ct , on Cisco r ou t er s, you wil l see t h e /pr ef ix common l y u sed t h r ou gh ou t t h eir con f igu r a t ion in t er f a ce. Th r ou gh ou t t h is t ext , I wil l u se bot h t h e decima l su bn et ma sk a n d t h e pr ef ix; a ma sk a n d a pr ef ix a r e essen t ia l l y t h e sa me t h in g. For exa mpl e, a su bn et of 255.255.255.0 a n d a pr ef ix of /24 a r e t h e sa me. To il l u st r a t e, you cou l d see a n a ddr ess wr it t en a s 150.1.0.0/24, wh ich mea n s a ddr ess 150.1.0.0 su bn et 255.255.0.0. Let ’s l ook a t a f ew su bn et exa mpl es, st a r t in g wit h a ddr ess a ssign men t a t a compa n y sit e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 74 Another Try A cu st omer

h a s t h e ba se n et wor k a ddr ess of 150.1.0.0 wit h a su bn et ma sk of 255.255.0.0, or /16 pr ef ix. Th is t ime we a r e n ot in t er est ed in a r equ ir emen t of su bn et s. Al l we kn ow is t h a t we mu st be a bl e t o h a ve 100 h ost s on ea ch su bn et . Ea ch su bn et wil l n ot h a ve t h a t ma n y, bu t t h e l a r gest on e wil l , a n d wit h ou t mu l t in et t in g, we mu st u se a ma sk sma l l en ou gh t o a ccommoda t e t h a t n u mber . In or der t o su ppor t 100 h ost s, 7 bit s a r e n eeded, wh ich a l l ows f or 126 a ddr esses (2n7 – 2). Th is wil l a l l ow f or f u t u r e gr owt h . Th e n ext -l owest ma sk yiel ds 62 a ddr esses (2n6 – 2), so we mu st a l l ow f or 7 bit s. Al wa ys a ssign a ma sk t h a t a l l ows f or f u t u r e gr owt h . Next we mu st det er min e t h e su bn et ma sk f or t h e n et wor k n u mber . Sin ce we wil l be r eser vin g 7 bit s f or h ost a ssign men t , t h is wil l l ea ve 25 bit s l ef t f or t h e n et wor k ma sk (32 bit s – 7 bit s = 25 bit s). Th is gives a su bn et ma sk of 255.255.255.128, or /25 pr ef ix. Th e n a t u r a l ma sk f or Cl a ss B is 255.255.0.0. Th is ma sk is 255.255.255.128, wh ich a l l ows f or 9 bit s t o be a ssign ed t o t h e su bn et ma sk, t h er eby a l l owin g f or 512 su bn et s t o be def in ed. Th e su bn et n u mber s r a n ge f r om 0 t o 521. Th is gives t h e r a n ge of su bn et s of 150.1.0.0 (pr ovidin g f or t h e z er o su bn et ) t h r ou gh 150.1.255.128 (u sin g a l l 9 bit s in cl u din g t h e a l l 1s su bn et ). Now t h a t we h a ve sepa r a t ed t h e su bn et s f r om t h e h ost s, we sh ou l d l ist t h em: Subne t s 150.1.0.0 t h r ou gh 150.1.255.128 150.1.1.0 (x – h ost r eser ved bit s) 10010110 . 00000001 . 00000001 . 0xxxxxxx 150.1.1.0 10010110 . 00000001 . 00000001 . 0xxxxxxx

Ho st Rang e 1 t h r ou gh 125 (2n 7 – 2) Host 1 (x = n et wor k/su bn et r eser ved bit s) xxxxxxxx.xxxxxxxx.xxxxxxxx.x0000001 Host 127 xxxxxxxx.xxxxxxxx.xxxxxxxx.x1111111

Ano t he r Tr y • Let ’s f ir st r eview br ea kin g a n et wor k n u mber down wit h a su bn et r equ ir emen t : • Requ ir emen t : A sit e h a s been a ssign ed t h e n et wor k n u mber 150.1.0.0. It r equ ir es 100 h ost s per su bn et . Fu t u r e gr owt h in dica t es 120 h ost s per su bn et . It wa sdet er min ed t h a t expa n sion wa s mor e l ikel y in t h e ca se of r emot e sit es t h a n h ost s. • St ep 1: Det er min e t h e bit s r equ ir ed t o su ppor t a t l ea st 100 h ost s a n d f u t u r e expa n sion t o 120 h ost s per su bn et . 7 bit s a r e r equ ir ed f or 100–126 h ost s. St a r t f r om t h e r igh t a n d move l ef t . • St ep 2: Det er min e h ow su bn et s a r e def in ed by 9 bit s. 9 bit s su ppor t 512 su bn et s. St a r t f r om t h e l ef t a n d move r igh t . • St ep 3: Det er min e t h e ma sk. 150.1.0.0/25, or 255.255.255.128

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 75 Variable-Length Subnet Masks We kn ow a bou t

t h e r est r ict ion of RIPv1. RIPv2 a n d OSPF do n ot h a ve t h is r est r ict ion a n d ca n mor e ef f icien t l y u se t h e a ddr ess. Th e pr ecedin g exa mpl es sh ow h ow t o spl it u p a n et wor k f or su bn et s a ssu min g on e ma sk per n et wor k ID (discu ssed ext en sivel y pr eviou sl y in t h e book). A con cept kn own a s Va r ia bl e-Len gt h Su bn et Ma sk (VLSM, det a il ed u n der t h e RIP a n d OSPF sect ion s of t h is book), a l l ows u s t o a ssign va r ia bl e ma sks per n et wor k ID. We ca n move t h e ma sk a r ou n d t h e sin gl e n et wor k ID. Th ese pr ot ocol s t r a n smit t h e su bn et ma sk a l on g wit h t h e n et wor k ID in t h e r ou t in g u pda t e messa ge. VLSM ca n be ver y, ver y con f u sin g. On e r u l e you sh ou l d f ol l ow: Do n ot ma ke it over l y compl ica t ed. As a gen er a l r u l e, do n ot VLSM mor e t h a n t h r ee t imes. Yes, ef f icien cy is impor t a n t , bu t you mu st sit down wit h you r t ea m or cu st omer a n d det er min e t h e n et wor k t opol ogy. For exa mpl e, if you u se t h e a ddr ess 150.1.0.0 wit h a /16 pr ef ix (255.255.0.0), a ver y ef f ect ive met h od of u sin g VLSM is /24 (f or su bn et s wit h l ot s of n et wor ks), /27 (f or su bn et s wit h f ewer h ost s or ma ybe h igh er -power ed n et wor k-h oggin g a pps), a n d /30 (ma sk f or t h e ser ia l l in es). Th is is sh own n ext . You ca n go wil d a n d t r y t o devel op a ma sk f or ever y su bn et , bu t h a vin g a f ew l ef t over bit s is f in e. Al so, u sin g t h is met h od is n ot ef f icien t a s you wil l be spr ea din g dif f er en t su bn et s t h r ou gh t h e n et wor k in a n on con t igu ou s f a sh ion , wh ich ca n become bu r den some on t h e r ou t e t a bl es. However , it does expl a in t h e va r ia bl e-l en gt h su bn et f ea t u r e. Fir st , you r ba se a ddr ess is 150.1.0.0/16. Th is goes a t t h e t op of t h e ch a r t . Fr om h er e we wil l cr ea t e 256 su bn et s u sin g t h e /24 su bn et ma sk. No h ost s h a ve been a ssign ed yet . We cu r r en t l y h a ve 50 ser ia l (poin t -t o-poin t ) l in es t o wor k wit h a n d pr edict a gr owt h of 100 mor e r emot e sit es over t h e n ext t wo yea r s. Th er ef or e, we n eed 150 su bn et s f or t h e ser ia l l in es a n d t h er e a r e on l y t wo h ost a ddr esses n eeded per ser ia l l in e. We h a ve r eser ved t h e 150.1.56.0, 150.1.57.0, a n d t h e 150.1.58.0 su bn et s f or ser ia l l in es. Th e 150.1.56.0 n et wor k is f u r t h er su bdivided (su b-su bn et t ed) u sin g t h e f ir st 6 bit s of t h e f ou r t h oct et (255.255.255.252 or /30), yiel din g 64 su bn et s f or ser ia l l in es. Wit h ea ch su bn et (56, 57, a n d 58) su ppor t in g 64 su bn et s we n ow h a ve 192 su bn et s a l l ot t ed f or ser ia l l in es. We l ea ve 2 bit s, wh ich a l l ows f or t wo h ost a ddr esses t o be a ssign ed (a l l 0s a n d a l l 1s a r e n ot

a l l owed a s h ost a ddr esses). Seven t y-f ive of t h e su bn et s wil l be a ssign ed a a n ot h er ma sk (/27) t o a l l ow f or su b-su bn et s (su bn et s of su bn et s) wit h a sma l l er n u mber of h ost s per su bn et .

Va r ia bl e-Len gt h Su bn et Ma sks

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 76 Longest Match Rule As you ca n see, pl a yin g wit h t h e a ddr ess l ea ds t o a l ot

of a mbigu it y. Usin g t h ese t ech n iqu es is n ot f or t h e f a in t of h ea r t . It ca n become ver y, ver y compl ica t ed. Usu a l l y, compa n y n et wor k ma n a ges do n ot h a ve t o over l y con cer n t h emsel ves wit h t h is sch ema . On e r u l e t h a t mu st be u n der st ood bef or e a n y of t h is ca n wor k is t h e longest match rule. Th is is a l so discu ssed in t h e OSPF sect ion of t h e book. Wh en a n et wor k ID is en cou n t er ed t h a t ma t ch es t o dif f er en t -l en gt h pr ef ixes, t h e r ou t er wil l a l wa ys t a ke t h e pa t h in dica t ed by t h e l on gest ma sk. For exa mpl e, if a r ou t er r eceives a n IP da t a gr a m wit h t h e dest in a t ion a ddr ess of 200.40.1.1 a n d a r ou t e t a bl e l ooku p f ou n d 200.40.1.0/24 a n d 200.40.0.0/16, t h e r ou t er wil l f or wa r d t h e da t a gr a m ou t t h e pa t h in dica t ed by t h e l on gest ma sk: 200.40.1.0. Th er ef or e, you mu st ma ke su r e t h er e a r e n o h ost s a ssign ed t o 200.40.0.0/16. Lo ng e st Mat c h Rul e • Al l ows a r ou t er t o det er min e t h e best r ou t e ba sed on gr a n u l a r it y of t h e ma sked a ddr ess. • Used wh en a n et wor k ID is f ou n d t o ma t ch mor e t h a n on e su bn et ma sk. • Exa mpl e: • Received da t a gr a m of 200.40.1.1 • Rou t e t a bl e l ooku p f ou n d t wo en t r ies: • 200.40.1.0/24 • 200.40.0.0/16 • Rou t e wou l d u se t h e 200.40.1.0/24 • Mu st be ca r ef u l wh en a ssign in g a ddr esses.

Th e l on gest ma t ch r u l e is impl emen t ed beca u se t h e l on ger t h e ma sk f ou n d, t h e bet t er gr a n u l a r it y t h e r ou t er h a s in exa ct l y def in in g t h e cor r ect r ou t e.

Th er ef or e, you mu st be wa r y of t h e f a ct t h a t t h e r ou t er wil l r ou t e t o t h e r ou t e det er min ed by t h e l on gest ma sk ma t ch . If t h er e a r e t wo en t r ies f or t h e sa me r ou t e, t h e l on gest ma sk win s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 77 Example One: An ISP Address Assignment Let ’s l ook a t

a n ot h er exa mpl e, t h is t ime u sin g a bet t er exa mpl e of a ddr ess a ssign men t : t h e In t er n et Ser vice Pr ovider . Th e ISP bl ock is 200.24.0.0/16. Hmmmmm. Looks a l it t l e st r a n ge. Th is is a Cl a ss C a ddr ess, bu t t h er e is a 0 in t h e t h ir d oct et a n d t h e pr ef ix (su bn et ma sk) is on l y 16-bit s wide. Th e n a t u r a l ma sk is 24 bit s (255.255.255.0). Th is is kn own a s supernetting, a n d wil l be sh own in t h e n ext pa ges, so bea r wit h me h er e. A cu st omer of t h e ISP n eeds t h r ee su bn et s, ea ch su ppor t in g 60 h ost s. Remember , we a ssign t h e ma sk con t igu ou s st a r t in g f r om t h e l ef t . Sin ce su bn et s a r e divided even l y (du e t o t h e bin a r y n a t u r e of t h e a ddr ess), we ca n n ot h a ve t h r ee su bn et s wit h ou t dividin g t h e a ddr ess t o pr ovide f or f ou r su bn et s. Th e a ddr ess a ssign ed t o t h e cu st omer is 200.24.255.0/24. Th er ef or e: 1. How ma n y bit s a r e n eeded in t h e su bn et ma sk t o su ppor t t h r ee su bn et s? 2. 2n2 = 4, t h er ef or e 2 bit s a r e r equ ir ed in t h e su bn et ma sk. Th is l ea ves on e l ef t over bu t ma sks mu st be con t igu ou s.

Exa mpl e On e: An ISP Addr ess Assign men t 3. Th is l ea ves 6 bit s l ef t f or h ost a ssign men t . 2n6 l ea ves 62 (2n6 =64 a n d we su bt r a ct 2 beca u se we ca n n ot h a ve a l l 0s or a l l 1s in t h e h ost por t ion of t h e a ddr ess) a ddr ess a ssign men t s f or h ost s, a n d t h er ef or e we ca n u se t h is sin gl e n et wor k a ddr ess a ssign men t f or ou r compa n y. Th is sh ou l d ma ke you a l it t l e n er vou s. Th er e a r e on l y t wo h ost s per su bn et l ef t f or expa n sion a n d t h er e is on l y on e su bn et l ef t . Th e ISP sh ou l d ma ke ver y su r e t h a t t h is compa n y wil l n ot gr ow a n yt ime soon .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 78 Example Two: Relaxing the Assignment Th e pr eviou s a ssign men t

wor ks, bu t is it r ea l l y good? Al t h ou gh we wer e a bl e t o be ver y st r in gen t wit h t h e a ddr ess a ssign men t , t h is is n ot a good wa y of a ssign in g or ma skin g t h e a ddr ess. It does n ot l ea ve mu ch r oom f or gr owt h on t h e h ost side or on t h e n et wor k side. For exa mpl e, wh a t if t h e compa n y expa n ds t o 100 h ost s per su bn et a n d r equ ir es t wo mor e su bn et s? It cou l d ca l l it s ISP ba ck a n d r equ est a n ot h er a ddr ess a ssign men t . Bu t by n ow, t h e ISP h a s h a n ded ou t a f ew mor e a ddr esses a n d t h e n ext a va il a bl e a ddr ess f or t h e cu st omer is 200.24.64.0/24. Th is is n ot con t igu ou s wit h t h e or igin a l a ssign men t a n d t h e ISP h a s t o a dd a n ot h er en t r y in t h e ISP’s t a bl e wh en t h is cou l d h a ve been a voided. To a n t icipa t e f or t h is expa n sion , t h e cu st omer cou l d h a ve been a ssign ed f ou r Cl a ss Cs. Th e ISP bl ock a ssign ed t o t h e cu st omer cou l d be 200.1.252.0/22 (on e en t r y in t h e ISP r ou t in g t a bl e), wh ich yiel ds t h e Cl a ss C a ddr esses of 200.1.252.0, 200.1.253.0, 200.1.254.0, a n d 200.1.255.0. Th e cu st omer is f r ee t o a ssign a n y su bn et ma sk h e or sh e wish es t o t h e a ddr esses wit h ou t n ot if yin g t h e ISP. Fr om h er e t h e cu st omer cou l d a ssign 1 bit of su bn et ma sk on t h e a ddr ess of 200.1.252.0, wh ich a l l ows f or 7 bit s of a ddr ess spa ce yiel din g 125 (2n7 –2) h ost s per su bn et . Th e ot h er a ddr ess cou l d r ema in in t a ct or be spl it wit h 1 bit su bn et ma sk. Th e cu st omer cou l d a l so h a ve simpl y u sed a l l t h e bit s in t h e f ou r t h oct et , u sin g n o su bn et ma sk. Yes, 1 bit su bn et ma sk is a l l owed on a Cl a ss C: a 0 su bn et a n d a 1 su bn et . Review RFC 1812. Th e on l y t ime t h is wil l l ea d t o pr obl ems is if t h e sit e is u sin g a l l su bn et s br oa dca st . However , ch eck wit h you r r ou t er ven dor . Cisco does n ot su ppor t 1-bit su bn et ma sks. In t h is ca se, you wil l h a ve t o u se t h e Cl a ss C a ssign men t wit h su bn et s. Wit h VLSM, t h e con su mer wou l d h a ve t o devise a pl a n t o det er min e wh ich su bn et s wil l on l y h a ve 60 h ost s a n d wh ich r equ ir e mor e.

Exa mpl e Two: Rel a xin g t h e Assign men t

Th is is a simpl e exa mpl e of h ow you mu st t h in k a bou t you r n et wor k design bef or e ca l l in g a n ISP. You n eed t o kn ow h ow ma n y h ost s a n d wh a t t h e t r a f f ic pa t t er n s a r e on t h e n et wor k. IP a ddr esses a r e in sh or t su ppl y a n d ISPs do n ot h a n d t h em ou t h a ph a z a r dl y. Th ey mu st t a ke in t o con sider a t ion t h eir r ou t in g t a bl es a s wel l .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 79 Supernetting Exposed In t h e pr eviou s exa mpl e, we sh owed a su bn et

ma sk f or a Cl a ss C a ddr ess t h a t wa s sh or t er t h a n t h e n a t u r a l ma sk. Appl yin g t h is t o t h e exa mpl e, t h e ISP h a s a bl ock of a ddr esses. As f a r a s t h e ISP is con cer n ed, t h er e is n o Cl a ss a ssocia t ed wit h t h e a ddr ess; it is simpl y a bl ock of a ddr esses def in ed by t h e pr ef ix. Th is bl ock is a ssign ed t o t h e ISP by t h e In t er n et Regist r y u n der t h e a u t h or it y of t h e In t er n et Assign ed Nu mber s Au t h or it y (IANA, yes, t h e sa me gr ou p, a ct u a l l y on l y on e per son wh o h a n dl es t h e t op-l evel doma in s). Th is is sma l l (f ou r Cl a ss C a ddr esses), bu t it sh ows u p a s on e en t r y in t h e r ou t in g t a bl e 200.1.252.0/22. Not ice t h e ma sk a t t h e ISP is pu sh ed ba ck t o t h e l ef t beyon d t h e n a t u r a l su bn et ma sk of a Cl a ss a ddr ess. Th is is kn own a s supernetting.

Th e cu r r en t a ppr oa ch (in l ieu of IPv6) is t o pr ovide l a r ge con t igu ou s bl ocks of Cl a ss C (a n d possibl y ot h er cl a sses) a ddr esses. Th ey a r e pr ovided by mor e l oca l l evel s in a n h ier a r ch ica l f a sh ion . For exa mpl e, a n a t ion a l ba ckbon e pr ovider (ca l l it ISP-1) wit h con n ect ion s t o ot h er n a t ion a l ba ckbon e pr ovider s t h r ou gh Net wor k Access Poin t s (NAPs) wil l be a ssign ed a l a r ge bl ock (on e t h a t wil l l a st t wo yea r s) of Cl a ss C a ddr esses. In t u r n , ot h er r egion a l ser vice pr ovider s (ca l l t h em ISP-2) wh o u t il iz e ISP-1 wil l be a ssign ed a bl ock of a ddr esses f r om ISP-1’s a ddr ess bl ock a ssign men t . In t u r n , ISP2 wil l pr ovide a ddr ess a ssign men t t o it s cu st omer s f r om t h e bl ock it wa s a ssign ed. Th is a l l ows f or ver y ef f icien t a n d ma n a gea bl e gl oba l r ou t in g t a bl es (t h ose r ou t in g t a bl es on t h e t op-l evel pr ovider s).

Su per n et t in g Exposed

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 80 Route Aggregation Rou t e a ggr ega t ion is n ot

a pr ot ocol . It is a ct u a l l y a def in it ion of wh a t we a r e a ccompl ish in g on t h e In t er n et r ou t in g t a bl es. Usin g t h e exa mpl e men t ion ed pr eviou sl y, you h a ve been in t r odu ced t o a con cept kn own a s route aggregation. It a l l ows a r ou t er t o su mma r iz e a gr ou p of r ou t es a s on e a dver t isemen t . Ima gin e h a vin g on e en t r y in t h e r ou t in g t a bl e t o r epr esen t a l a r ge gr ou p of a ddr esses. Th e r ou t er simpl y n eeds t o kn ow t h e pr ef ix. Th is is compl et el y possibl e wit h r ou t e a ggr ega t ion , h owever , it is on l y u sef u l wh en t h e r ou t es a r e con t igu ou s. Pu n ch in g h ol es in t h e con t in u it y of t h e r ou t es r edu ces t h e ef f icien cy of t h is con cept . To sh ow t h is ben ef it cl ea r l y, I h a ve ch osen a Cl a ss A exa mpl e. Th e n et wor k a ddr ess is 20.0.0.0. Th e n a t u r a l ma sk f or t h is is /8. or 255.0.0.0. We f ir st su bn et t h e a ddr ess u sin g a /16 pr ef ix, or 255.255.0.0. Th is a l l ows f or a ddr esses in t h e r a n ge of 20.0.0.0 t h r ou gh 20.255.0.0. We t a ke t h e 20.127.0.0 su bn et a n d f u r t h er su bn et it wit h a pr ef ix of /24 (255.255.255.0). Fin a l l y, we t a ke t h e 20.127.1.0 su bn et a n d a ppl y a /27 pr ef ix. Rou t e a ggr ega t ion is ba sed on t h e con cept of a common pr ef ix. Wh a t is t h e common pr ef ix a ssign ed t o a gr ou p of IP a ddr esses? For exa mpl e, t h e 20.127.1.0 wa s su bn et t ed t o /27. However , a l l t h e su bn et s t h a t a r e cr ea t ed by t h is ca n be a dver t ised a s on e r ou t e: 20.127.1.0/24. Th is is det a il ed l a t er in t h is sect ion . Al l of t h e a ddr esses in t h is r a n ge h a ve t h e sa me pr ef ix. Th is wou l d in dica t e t o a l l ot h er r ou t er s t h a t a n y n et wor k in t h e r a n ge of 20.127.1.0 sh ou l d be f or wa r ded t o t h a t r ou t er . Th e ot h er r ou t er s do n ot ca r e a bou t a n y of t h e pa r t icu l a r su bn et s beyon d t h a t a ddr ess. Th e r ou t er t h a t r eceives t h e da t a gr a m t o be f or wa r ded t o a n y su bn et bel ow 20.127.1.0 wil l be iden t if ied by t h e r ou t er a n d it wil l f or wa r d it t o t h e cor r ect n et wor k.

Rou t e Aggr ega t ion

Th e r u l es a r e simpl e: 1. 2. 3. 4. 5.

Wr it e down t h e a ddr esses in t h e r a n ge. Con ver t ea ch a ddr ess t o bin a r y, on e bel ow t h e ot h er . Ch eck f or a con t igu ou s, common pr ef ix. Move t h e pr ef ix t o t h e l a st bit of t h e con t igu ou s bin a r y digit . Wr it e t h e a ddr ess st a r t in g t h e f ir st a ddr ess a n d a ppl y t h e st ep 4 pr ef ix.

Remember , do n ot ma ke t h is compl ica t ed. It is con f u sin g en ou gh . Th r ee va r ia bl e su bn et ma sks a r e en ou gh t o wor k wit h f or most n et wor ks (bu sin ess n et wor ks a n d ISPs excl u ded).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 81 Determining a Common Prefix Th e /27 pr ef ix a l l ows f or

a n a ddr ess r a n ge of :

20.127.1.32 20.127.1.64 20.127.1.96 20.127.1.128 20.127.1.160 20.127.1.192 20.127.1.224 Con ver t t h is t o bin a r y: 000010100.01111111.00000001.00100000 = 20.127.1.32 000010100.01111111.00000001.01000000 = 20.127.1.64 000010100.01111111.00000001.01100000 = 20.127.1.96 000010100.01111111.00000001.10000000 = 20.127.1.128 000010100.01111111.00000001.10100000 = 20.127.1.160 000010100.01111111.00000001.11000000 = 20.127.1.192 000010100.01111111.00000001.11100000 = 20.127.1.224 000010100.01111111.00000001.00000000 = Common pr ef ix t o a l l of t h e pr ecedin g a ddr esses

Det er min in g a Common Pr ef ix Th er ef or e, a ppl yin g r u l es 4 a n d 5, we h a ve 20.127.1.0/24, wh ich r epr esen t s a l l of t h e a ddr esses.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 82 Another Look at Route Aggregation In t h is exa mpl e, a ggr ega t ion is somewh a t

l ess ef f icien t , bu t you wou l d n ot kn ow it f r om t h e a ddr ess. Th e f ol l owin g a ddr esses a ppea r t o be con t igu ou s: 155.1.140.0 155.1.141.0 155.1.142.0 155.1.143.0 155.1.144.0 Bu t wh en we t r a n sl a t e it t o bin a r y t o f in d t h e common pr ef ix t o a l l of t h e a ddr esses, we f in d a n on con t igu ou s bit pa t t er n : 10011011.00000001.10001100.00000000 = 155.1.140.0/24 10011011.00000001.10001101.00000000 = 155.1.141.0/24 10011011.00000001.10001110.00000000 = 155.1.142.0/24 10011011.00000001.10001111.00000000 = 155.1.143.0/24 10011011.00000001.10010000.00000000 = 155.1.144.0/24 10011011.00000001.100011xx.00000000 = Common pr ef ix Th e common pr ef ix is 100011xx in t h e t h ir d oct et . Wh y? Beca u se we do n ot kn ow wh er e 145 or h igh er is? We h a ve t o see wh ich on es h a ve t h e sa me pr ef ix a n d t h en u se t h a t . An y ot h er n u mber s mu st be sepa r a t e en t r ies in t h e t a bl e. Th is wou l d give u s a r ou t e a ggr ega t ion of 155.1.140.0/22, bu t t h is l ea ves ou t t h e 155.1.144.0 su bn et . Depen din g on t h e r a n ge t h a t t h is a ddr ess is in , it cou l d be l ist ed in a n ot h er r ou t e a ggr ega t ion pr ef ix. Sin ce t h is is a l l t h e in f or ma t ion we wer e given , h owever , 155.1.144.0 mu st be l ist ed a s a sepa r a t e r ou t e: 155.1.144.0/24 (su bn et ma sk of 255.255.255.0). Th is is du e t o t h is a ddr ess n ot bein g wit h in t h e r a n ge of t h e common pr ef ix of t h e ot h er a ddr esses even t h ou gh t h e decima l a ddr ess is con t igu ou s. Net wor ks do n ot ca l cu l a t e r ou t es in decima l !!! Hu ma n s do, a n d t h is is wh y we ma ke mist a kes.

Ano t he r Lo o k at Ro ut e Ag g r e g at io n 155.1.140.0 155.1.141.0 155.1.142.0 155.1.143.0 155.1.144.0 Wh en we t r a n sl a t e it t o bin a r y t o f in d t h e common pr ef ix t o a l l of t h e a ddr esses, we f in d a n on -con t igu ou s bit pa t t er n : 10011011.00000001.10001100.00000000 = 155.1.140.0/24 10011011.00000001.10001101.00000000 = 155.1.141.0/24 10011011.00000001.10001110.00000000 = 155.1.142.0/24 10011011.00000001.10001111.00000000 = 155.1.143.0/24 10011011.00000001.10010000.00000000 = 155.1.144.0/24 10011011.00000001.100011xx.00000000 = Common pr ef ix

You sh ou l d a l so n ot ice t h a t t h is a l l ows u s t o h a ve on e r ou t e en t r y in st ea d of f ou r . Th is ma y n ot seem l ike mu ch , bu t wh en t h is con cept is a ppl ied t o a l a r ger r a n ge of a ddr esses (su ch a s t h ose on t h e In t er n et r ou t in g t a bl es), on e r ou t e en t r y is u sed t o a ggr ega t e t h ou sa n ds of in dividu a l a ddr esses. Th e common pr ef ix is 100011, wh ich a l l ows u s t o a ggr ega t e t h ose r ou t es t o 155.1.140.0/14.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 83 Classless Inter-Domain Routing (CIDR) Th er e is a l ot

mor e t o CIDR t h a n wh a t is pr esen t ed h er e, bu t f or ou r pu r poses, t h is wil l do. Wit h CIDR, n et wor k n u mber s a n d cl a sses of n et wor ks a r e n o l on ger va l id f or r ou t in g pu r poses. Th is is wh er e t h e n et wor k IP a ddr ess f or ma t ch a n ges t o . Min d you , t h is is f or t h e In t er n et r ou t in g t a bl es (ISPs); Cl a ss a ddr essin g is con t in u in g t o be u sed in cu st omer en vir on men t s. Cl a ssl ess cou l d oper a t e in a cu st omer en vir on men t , bu t most h ost s wou l d n ot u n der st a n d t h is t ype of impl emen t a t ion . Th e mil l ion s a n d mil l ion s of h ost s t h a t a r e a t t a ch ed t o t h e In t er n et a r e st il l oper a t in g in a Cl a ss en vir on men t ; t h er ef or e, we simpl y h a ve cr ea t ed a h ier a r ch ica l r ou t in g en vir on men t t h a t does n ot a f f ect t h e cu st omer en vir on men t wh a t soever . Let ’s st a r t ou t t h is discu ssion by a ssign in g a pr ef ix t o t h e wel l -kn own Cl a ss a ddr esses. CIDR cou l d oper a t e in a cu st omer en vir on men t , bu t t h a t wou l d r equ ir e u pgr a din g a l l r ou t er s a n d h ost s t o u n der st a n d CIDR. Th is is n ot goin g t o h a ppen . CIDR is pr ima r il y u sed on t h e In t er n et r ou t er s. Cl a ss A n et wor ks h a ve a /8 pr ef ix Cl a ss B n et wor ks h a ve a /16 pr ef ix Cl a ss C n et wor ks h a ve a /24 pr ef ix /8? /16? /24? Hopef u l l y, somet h in g cl icked h er e! Wh a t we h a ve ch a n ged t o is t h e n et wor k pr ef ix. A n et wor k n u mber is ba sica l l y a n et wor k pr ef ix. Nodes on a cl a ssl ess n et wor k simpl y det er min e t h e a ddr ess by f in din g t h e pr ef ix va l u e. Th is va l u e in dica t es t h e n u mber of bit s, st a r t in g f r om t h e l ef t , wh ich wil l be u sed f or t h e n et wor k. Th e r ema in in g bit s a r e l ef t f or h ost a ssign men t . Th e pr ef ix ca n r a n ge a n ywh er e f r om /0 t o /32, wh ich a l l ows u s t o move t h e n et wor k por t ion of t h e a ddr ess a n ywh er e on t h e 32-bit n u mber . Ima gin e t h en , a n a ddr ess of 198.1.192.0/20. Th is l ooks l ike a Cl a ss C a ddr ess, bu t t h e n a t u r a l ma sk f or a Cl a ss C is 24 bit s or /24 pr ef ix. Th is on e a l l ows f or on l y 20 bit s a s t h e n et wor k a ssign men t . Bu t t h is pr ef ix cou l d be a ssign ed t o a n y a ddr ess r ega r dl ess of cl a ss. It cou l d be a ssign ed t o 15.1.192.0 or 128.1.128.0. Th e pr ef ix does n ot ca r e a bou t

Cl a ss. Th is is t h e ca pa bil it y of CIDR. Th e f ol l owin g sect ion a ssu mes t h a t you ca n con ver t bin a r y t o decima l a n d vice ver sa . If n ot , pl ea se r ef er t o t h e a ppen dix a t t h e en d of t h is book f or a n expl a n a t ion on bin a r y. Cl assl e ss Int e r -Do main Ro ut ing (CIDR) • Net wor k n u mber s a ccor din g t o cl a sses of a ddr esses a r e n o l on ger va l id. • IP a ddr ess f or ma t ch a n ges t o . • Pr ima r il y u sed in ISP r ou t in g t a bl es. • Th e gl oba l In t er n et r ou t in g t a bl es • Most h ost s on a n et wor k wou l d n ot u n der st a n d t h is • Ea sy exa mpl es a r e ch a n gin g t h e cl a ss a ddr ess. • Cl a ss A h a s a /8 pr ef ix • Cl a ss B h a s a /16 pr ef ix • Cl a ss C h a s a /24 pr ef ix • Wh a t a bou t 198.1.192.0/20? • Su per n et t ed Cl a ss C a ddr ess t h a t pr ovides f or r ou t e a ggr ega t ion u sin g a con cept simil a r t o VLSM

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 84 Classless Inter-Domain Routing (continued) You kn ow t h a t I mu st be l ea din g u p t o somet h in g. It is t h e n ext st ep in u n der st a n din g IP a ddr esses a n d In t er n et r ou t in g. It is ca l l ed CIDR (pr on ou n ced cider ). CIDR is expl a in ed in RFCs 1517–1520, so I a m n ot det a il in g t h e CIDR spec h er e. Ju st t h e con cept . Th e con cept is simpl e: Impl emen t a gen er a l iz a t ion of Va r ia bl e Len gt h Su bn et Ma sks a n d move f r om t h e t r a dit ion a l Cl a ss A, B, C a ddr ess t owa r d t h e idea of a 32-bit IP a ddr ess a n d a pr ef ix (wit h ou t t h e con cept of a Cl a ss). In CIDR, t h er e a r e 32 bit s a n d a pr ef ix. To u n der st a n d CIDR, you mu st pl a ce t h e con cept n ot on you r l oca l n et wor k bu t on t h e In t er n et r ou t er s. You ca n empl oy CIDR on you r n et wor k, bu t t h er e is r ea l l y n o r ea son t o (sin ce you r h ost s wou l d h a ve t o be con f igu r ed t o u n der st a n d su per n et s). Th e In t er n et r ou t in g t a bl es wer e expa n din g a t a expon en t ia l r a t e (wit h ou t CIDR, t h ey wou l d h a ve pa ssed over 80,000 r ou t es t oda y). Th e In t er n et r ou t er s a r e simpl y t h ose devices t h a t move da t a t owa r ds a dest in a t ion in dica t ed by it s IP a ddr ess, a n d t h er ef or e do n ot h a ve l a r ge su bn et s of f of t h em wit h wh ich t o su ppor t h ost s. CIDR wor ks on t h e n ot ion t h a t we a r e r ou t in g a r bit r a r il y siz ed (a r a n ge) n et wor k a ddr ess spa ce in st ea d of r ou t in g on Cl a ss A, B, a n d C. CIDR r ou t es ba sed on r ou t in g in f or ma t ion t h a t h a s t h e pr ef ix a t t a ch ed t o it . For exa mpl e, t h e a ddr ess of 200.15.0.0/16 cou l d be a n en t r y in t h e In t er n et r ou t in g t a bl e—on e en t r y in dica t in g a r a n ge of a ddr esses. An y IP da t a gr a ms r eceived by t h a t r ou t er wit h t h e f ir st 16 bit s in dica t in g 200.15 wou l d be f or wa r ded ou t t h e por t in dica t ed in t h e r ou t in g t a bl e. Th is pr ef ix cou l d be a ssign ed t o a n y r a n ge of a ddr esses beca u se CIDR does n ot a ssocia t e a pr ef ix wit h a Cl a ss.

Cl assl e ss Int e r -Do main Ro ut ing (c o nt inue d) • • • • •

Pr on ou n ced “cider .” Expl a in ed in RFCs 1517–1520. Uses a gen er a l iz a t ion of t h e VLSM. Move f r om t r a dit ion a l Cl a ss t o a pr ef ix. Al l ows f or r ou t e a ggr ega t ion in t h e In t er n et r ou t in g t a bl es. • Redu ces t h e siz e a n d t h er ef or e in cr ea ses t h e speed • Wor ks on t h e n ot ion t h a t we a r e r ou t in g a r bit r a r il y siz ed n et wor k a ddr ess spa ce. • On e en t r y in a r ou t in g t a bl e cou l d possibl y ma t ch mil l ion s of a ddr esses.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 85 Prefix Assignments Pr e f ix /13 /14 /15 /16 /17 /18 /19 /20 /21 /22 /23 /24 /25 /26 /27

We mu st

Do t t e d-De c imal 255.248.0.0 255.252.0.0 255.254.0.0. 255.255.0.0 255.255.128.0 255.255.192.0 255.255.224.0 255.255.240.0 255.255.248.0 255.255.252.0 255.255.254.0 255.255.255.0 255.255.255.128 255.255.255.192 255.255.255.224

Numbe r o f Addr e sse s 512k 256k 128k 64k 32k 16k 8k 4k 2k 1k 512 256 128 64 32

Numbe r o f Cl ass Addr e sse s 8 Cl a ss B or 2048 Cl a ss C 4 Cl a ss B or 1024 Cl a ss C 2 Cl a ss B or 512 Cl a ss C 1 Cl a ss B or 256 Cl a ss C 128 Cl a ss C 64 Cl a ss C 32 Cl a ss C 16 Cl a ss C 8 Cl a ss C 4 Cl a ss C 2 Cl a ss C 1 Cl a ss C _ Cl a ss C _ Cl a ss C 1/8 Cl a ss C

l ook a t t h is con cept t h r ou gh t h e ISP n et wor ks. ISPs give u s t h e a bil it y t o commu n ica t e over t h e In t er n et . You ca n n ot simpl y a t t a ch t o t h e In t er n et u n l ess you con n ect wit h a n ISP. ISPs come is a va r iet y of f l a vor s: some a r e l a r ge a n d pr ovide a ccess t o ot h er ISPs a n d in dividu a l s, a n d some a r e sma l l a n d on l y pr ovide In t er n et con n ect ivit y t o in dividu a l s a n d bu sin esses. ISPs a r e a l l oca t ed bl ocks of a ddr esses t h a t a r e con t igu ou s in r a n ge. Th e con cept f ir st u sed Cl a ss C a ddr esses sin ce Cl a ss B a ddr esses wer e exh a u st ed a n d Cl a ss A a ddr esses wer e n ot h a n ded ou t (t h ey a r e bein g h a n ded ou t t oda y). Th e ba sic idea of t h e pl a n is t o a l l oca t e bl ocks of Cl a ss C (f ir st , ot h er Cl a ss A a n d B a ddr esses t o f ol l ow) n et wor k n u mber s t o ea ch n et wor k ser vice pr ovider . (It is ver y h el pf u l h er e t o r ea d RFC 2050 bef or e con t in u in g t h is sect ion ). Th e cu st omer s of

t h ese pr ovider s a r e t h en a l l oca t ed bit ma sk-or ien t ed su bn et s of t h e ser vice pr ovider ’s a ddr ess. Th e a ssign men t bl ocks t o t h e IR ca n be f ou n d a t t h e en d of t h is sect ion . Pr e f ix Assig nme nt s Pr e f ix

Do t t e d-De c imal

Numbe r o f Addr e sse s Numbe r o f Cl ass Addr e sse s

/13

255.248.0.0

512k

/14

255.252.0.0

256k

/15

255.254.0.0.

128k

/16

255.255.0.0

64k

/17 /18 /19 /20 /21 /22 /23 /24 /25 /26 /27

255.255.128.0 255.255.192.0 255.255.224.0 255.255.240.0 255.255.248.0 255.255.252.0 255.255.254.0 255.255.255.0 255.255.255.128 255.255.255.192 255.255.255.224

32k 16k 8k 4k 2k 1k 512 256 128 64 32

8 Cl a ss B or C 4 Cl a ss B or C 2 Cl a ss B or C 1 Cl a ss B or C 128 Cl a ss C 64 Cl a ss C 32 Cl a ss C 16 Cl a ss C 8 Cl a ss C 4 Cl a ss C 2 Cl a ss C 1 Cl a ss C _ Cl a ss C _ Cl a ss C 1/8 Cl a ss C

Pr eviou s Ta bl e of Con t en t s Next

2048 Cl a ss 1024 Cl a ss 512 Cl a ss 256 Cl a ss

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 86 A Look at the Addresses of an ISP An ISP h a s been a ssign ed t h is bl ock f r om t h e In t er NIC: 209.16.0.0/16. At f ir st gl a n ce, t h is a ddr ess l ooks l ike a Cl a ss C, bu t t h e pr ef ix does n ot ma t ch a Cl a ss C. It is a Cl a ss B pr ef ix. Aga in , t h is is kn own a s supernetting a n d sh ows t h a t CIDR does n ot ca r e a bou t Cl a sses. Wit h a pr ef ix of /16, t h is wou l d r epr esen t 256 Cl a ss C a ddr esses. However , in CIDR, t h e ISP is f r ee t o ch oose a n y met h od of segmen t in g t h is a ddr ess a n d h a n din g it ou t t o it s cu st omer s. Th e ISP a l so kn ows t h a t IANA a n d t h e In t er NIC do n ot ju st h a n d ou t l ot s of a ddr esses; t h er ef or e, t h e ISP is ver y ca r ef u l a bou t ca r vin g u p t h e a ddr esses. Th e ISP pu l l s of f a por t ion of t h e a ddr ess spa ce u sin g a /20 pr ef ix: 209.16.16.0/20. Th is r epr esen t s a sma l l por t ion of t h e a ddr esses, or 16 Cl a ss C a ddr esses. Th e ISP l ea ves t h e u pper 4 bit s of t h e a ddr ess r eser ved f or f u t u r e u se. 209.16.16.0/20 is t h e a ddr ess spa ce t h a t we wil l wor k wit h . Ba sed on some su r veys wit h it s cu st omer s, t h e ISP cu t s t h e a ddr ess in t o t wo pieces yiel din g 209.16.16.0/21 a n d 209.16.24.0/21. (For t h ose n ot f a mil ia r wit h bin a r y, sh if t in g r igh t 1 bit divides t h e n u mber by 2. Sh if t in g l ef t 1 bit mu l t ipl ies t h e n u mber by 2). 209.16.16.0/21 (eigh t Cl a ss Cs) is a ssign ed t o a sin gl e cu st omer . Th e ot h er h a l f of t h e a ddr ess, 209.16.24.0, is cu t u p a ga in in t o t h r ee pieces:

A Lo o k at t he Addr e sse s o f an ISP • ISP is a l l oca t ed a bl ock of a ddr esses: 209.16.0.0/16. • It mu st n ow f in d a n ef f icien t br ea ku p of t h e a ddr ess ISP segmen t s of f 16 209.16.0.0/16 11010001.00010000.00000000.00000000 a ddr esses of t h e becomes 11010001.00010000.0001 | 0000.00000000 or igin a l a ddr ess 209.16.16.0/20 ISP spl it s t h is n ew 209.16.16.0/21 11010001.00010000.00010 | 000.00000000 a ddr ess in h a l f , 209.16.24.0/21 11010001.00010000.00011 | 000.00000000 yiel din g t wo a ddr ess r a n ges Ba sed on a cu st omer Yiel ds 8 Cl a ss C su r vey, 209.16.16.0/21 a ddr esses is given t o a sin gl e cu st omer 209.16.24.0/21 is 209.16.24.0/22 11010001.00010000.000110 | 00.00000000 spl it u p a ga in 209.16.28.0/23 11010001.00010000.0001110 | 0.00000000 209.16.30.0/23 11010001.00010000.0001111 | 0.00000000 209.16.24.0/22 r epr esen t in g _ of t h e a ddr ess (f ou r Cl a ss Cs) 209.16.28/23 r epr esen t in g 1/8 of t h e a ddr ess (t wo Cl a ss Cs) 209.16.30.0/23 r epr esen t in g 1/8 of t h e a ddr ess (t wo Cl a ss Cs)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 87 A Graphic Look at the Example How is t h is don e Ac t io n ISP segmen t s of f 16 a ddr esses of t h e or igin a l a ddr ess ISP spl it s t h is n ew a ddr ess in h a l f , yiel din g t wo a ddr ess r a n ges Ba sed on a cu st omer su r vey, 209.16.16.0/21 is given t o a sin gl e cu st omer 209.16.24.0/21 is spl it u p a ga in

Addr e ss Spac e 209.16.0.0/16 becomes 209.16.16.0/20 209.16.16.0/21 209.16.24.0/21

Binar y Equival e nt 11010001.00010000.00000000.00000000 11010001.00010000.0001 | 0000.00000000 11010001.00010000.00010 | 000.00000000 11010001.00010000.00011 | 000.00000000

Yiel ds 8 Cl a ss C a ddr esses

209.16.24.0/22 209.16.28.0/23 209.16.30.0/23

11010001.00010000.000110 | 00.00000000 11010001.00010000.0001110 | 0.00000000 11010001.00010000.0001111 | 0.00000000

Th er ef or e, cu st omer A get s t h e Cl a ss C a ddr ess r a n ge of 209.16.16.0 t h r ou gh 209.16.23.0. Cu st omer B get s t h e Cl a ss C a ddr ess r a n ge of 209.16.24.0 t h r ou gh 209.16.27.0. Cu st omer C get s t h e Cl a ss C a ddr ess r a n ge of 209.16.28.0 t h r ou gh 209.16.29.0. Cu st omer D get s t h e Cl a ss C a ddr ess r a n ge of 209.16.30.0 t h r ou gh 209.16.31.0.

A Gr a ph ic Look a t t h e Exa mpl e

Use t h e pr ecedin g a ddr esses a n d cou n t u p in bin a r y u sin g t h e t a bl e a n d you wil l get a bet t er pict u r e of h ow t h is oper a t es. So CIDR is a t t h e ISP a n d Cl a ss a ddr essin g is a t t h e cu st omer sit e. Wh a t does t h is bu y u s? Not n ecessa r il y a n yt h in g (except a f a st er n et wor k wit h t h e ISP), bu t it does gr ea t t h in gs f or t h e ISP’s r ou t in g t a bl es a n d, t h er ef or e, t h e In t er n et r ou t in g t a bl es. Wh er ea s t h e ISP wou l d h a ve h a d 16 en t r ies in t h e r ou t in g t a bl e, it n ow h a s 4. Wh er ea s t h e In t er n et r ou t in g t a bl es wou l d h a ve h a d 256 en t r ies in t h e gl oba l r ou t in g t a bl e, t h ey n ow h a ve 1. Now mu l t ipl y t h is by t h e n u mber of ISPs wor l dwide a n d I t h in k you begin t o see t h e ef f icien cies of t h is pr ot ocol , a n d wit h ou t it t h e expl osion of t h e In t er n et r ou t in g t a bl es.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 88 CIDR and VLSM Comparison CIDR a n d VLSM seem simil a r ; in essen ce, t h ey a r e. Wh y n ot

u se VLSM in st ea d of CIDR? Th e dif f er en ce is t h a t CIDR a l l ows f or t h e ef f icien t r ou t in g mech a n ism t o t a ke pl a ce by t h e r ecu r sive a l l oca t ion of a n a ddr ess bl ock. Rou t in g is t h en ba sed on t h is a ddr ess bl ock a l l oca t ion a n d n ot on a n in dividu a l Cl a ss a ddr ess. Th is bl ock is h a n ded down by t h e IANA t o t h e IR, t o t h e u pper -l evel ISP down t h r ou gh t h e r a n ks of down st r ea m ISPs, a n d, f in a l l y, t o t h e cu st omer . CIDR and VLSM Co mpar iso n • CIDR a n d VLSM a r e simil a r . • CIDR a l l ows f or t h e ef f icien t r ou t in g mech a n ism t o t a ke pl a ce by t h e a bil it y of t h e r ecu r sive a l l oca t ion of a n a ddr ess bl ock. • Rou t in g is ba sed on t h e a ddr ess bl ock a l l oca t ion a n d n ot t h e in dividu a l Cl a ss a ddr ess. • VLSM per mit s r ecu r sion a t wil l bu t mor e so on a n in dividu a l a ddr ess spa ce in u se by t h e cu st omer . • VLSM a l l ows f or va r ia bl e l en gt h s ba sed on a Cl a ss a ddr ess a ssign ed by a n ISP.

VLSM per mit s r ecu r sion a s wel l , bu t mor e so on a n in dividu a l a ddr ess spa ce in u se by t h e cu st omer . A cu st omer division of a n a ddr ess spa ce is n ot visibl e by t h e In t er n et . VLSM st il l oper a t es wit h Cl a ss a ddr esses. Va r ia bl e-l en gt h ma sks a l l ow f or va r ia bl e-l en gt h su bn et s per n et wor k ID ba sed on a n a ddr ess a ssign men t by a n ISP. Th is a l l ows on e n et wor k n u mber t o con t a in dif f er en t ma sks a n d is a bet t er u se of a n IP a ddr ess. Wit h VLSM, a l ot of t h e bit s in a n a ddr ess spa ce a r e wa st ed. Th e exa mpl e is a ssign in g a n IP a ddr ess t o a poin t -t o-poin t WAN l in k, wh ich wa st es 252 a ddr ess bit s.

Th is a l l ows f or gr ea t er f l exibil it y wh en dividin g u p a n et wor k ID in t o su bn et s a n d h ost s. Wit h ou t VLSM, you h a ve t o ch oose bet ween h a vin g en ou gh n et wor ks, wit h cl ose t o t h e r igh t a mou n t of h ost s, or h a vin g t h e r igh t a mou n t of h ost s wit h cl ose t o t h e r igh t a mou n t of n et wor ks.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 89 Special Subnet Considerations RFC 950 (pa ge 5) st a t es t h a t

we sh ou l d pr eser ve t h e a l l 0s a n d a l l 1s in t h e su bn et f iel d, f or t h ey h a ve specia l mea n in g in t h e cer t a in f iel ds in dica t ed by IANA-a ssign ed RFC n u mber s. For exa mpl e, t h e a ddr ess 130.1.255.255 cou l d be in t er pr et ed a s mea n in g a l l h ost s on t h e n et wor k 130.1, or t h e a ddr ess 0.0.0.1 cou l d be in t er pr et ed a s mea n in g h ost 1 on t h is n et wor k. It is useful to preserve and extend the interpretation of these special addresses in subnetted networks. This means the values of all 0s and all 1s in the subnet field should not be assigned to actual (physical) subnets. Du e t o in cr ea sin g dema n d t o ma ke f u l l u se of a l l of t h e bit s in t h e 32-bit wide a ddr ess, su bn et 0s a n d 1s a r e a l l owed. However , you mu st exer cise ca u t ion wh en doin g so. RFC 1812 (Requ ir emen t s f or IPv4 Rou t er s) st a t es: All-subnets broadcasts (called multisubnet broadcasts) have been deprecated. . . . In a CIDR routing domain, wherein classical IP network numbers are meaningless, the concept of an all-subnets-directed-broadcast is also meaningless. Ba sica l l y, t h er e a r e n ot su bn et s in CIDR. Now, wh il e t h e pr ecedin g ext r a ct wa s t a l kin g a bou t t h e CIDR r ou t er doma in , it cou l d be misr ea d by a n y r ou t ed doma in . Ma n y r ou t er ven dor s in t er pr et RFCs dif f er en t wa ys. For exa mpl e, 3Com h a s t h e a bil it y t o t u r n ASB (Al l Su bn et s Br oa dca st ) r ou t in g on or of f , t h er eby a l l owin g a l l 1s su bn et wor k n u mber f r ee t o be a ssign ed. You ma y t h in k, wh y wou l d you wa n t t o pl a ce a n ASB? Th is ca n come in h a n dy wh en mu l t ica st in g. As of t h is wr it in g, t h e mu l t ica st pr ot ocol s a r e n ot bein g u sed on cu st omer n et wor ks, ma in l y du e t o in exper ien ce a n d n er vou sn ess of t h e r ou t er su ppor t st a f f a n d it s ma n a gemen t . Rou t ed n et wor ks a r e t r icky en ou gh wit h ou t t h or ou gh l y u n der st a n din g mu l t ica st in g. Th er ef or e, mu l t ica st a ppl ica t ion sof t wa r e ven dor s su ppor t

ASB t o r ou t e t h eir in f or ma t ion in a n on mu l t ica st n et wor k. Un r u l y, yes, bu t it wor ks. Th is t h in kin g ma y be pr opa ga t ed down t o t h e l owest l evel s of r ou t in g in t h e In t er n et : t h e cu st omer AS. If t h e cu st omer AS h a s “depr eca t ed” ASB, t h en you wil l be impl emen t in g a l l 0s a n d a l l 1s su bn et s. However , if a cu st omer n et wor k h a s impl emen t ed it (a l l 1s su bn et s), t h en a pa cket a ddr essed t o a n ASB wil l be r ou t ed t o t h e su bn et r epr esen t ed by t h e a l l 1s. Spe c ial Subne t Co nside r at io ns • RFC 950 or igin a l l y in dica t ed t h a t 0s a n d 1s sh ou l d n ot be u sed in eit h er h ost or su bn et a ssign men t s. • Specia l mea n in g in t h a t 0.0.0.1 mea n s h ost 1 on t h is su bn et . • In cr ea sin g pr essu r e f or ced t h e u se of a l l a va il a bl e bit s f or su bn et t in g. • CIDR h a s n o con cept of su bn et s, t h er ef or e it h a s n o con cept of 0s or 1s bein g r eser ved. • You sh ou l d be ca r ef u l in u sin g a l l 0s or 1s in a su bn et . An a l l 1s su bn et cou l d be misin t er pr et ed a s a n a l l -su bn et s br oa dca st . • Al l 1s in t h e su bn et f iel d cou l d dir ect a r ou t er t o f or wa r d t h e pa cket t o a l l su bn et s u n der t h e in dica t ed n et wor k ID.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 90 Internet Assigned Numbers Authority Int e r ne t Assig ne d Numbe r s Aut ho r it y • Th e own er of a l l n u mber a ssign men t s f or t h e TCP/IP pr ot ocol , in cl u din g ma n y ot h er n u mber a ssign men t s f r om ot h er pr ot ocol s t h a t a r e a socia t ed wit h TCP/IP. • Th is in cl u des por t n u mber s, mu l t ica st a ddr ess, IP a ddr esses, et c. • IANA ch a r t er ed by t h e In t er n et Societ y (ISOC) a n d t h e Feder a l Net wor k Cou n cil (FNC). • Cu r r en t RFC n u mber is RFC 1700. • Upda t es a r e a va il a bl e t h r ou gh : f t p://f t p.isi.edu /in -n ot es/ia n a /a ssign men t s

Th e In t er n et

pr ot ocol su it e, a s def in ed by t h e In t er n et En gin eer in g Ta sk For ce (IETF) a n d it s st eer in g gr ou p (t h e IESG), con t a in s n u mer ou s pa r a met er s, su ch a s in t er n et a ddr esses, doma in n a mes, a u t on omou s syst em n u mber s (u sed in some r ou t in g pr ot ocol s), pr ot ocol n u mber s, por t n u mber s, ma n a gemen t in f or ma t ion -ba sed object iden t if ier s (in cl u din g pr iva t e en t er pr ise n u mber s), a n d ma n y ot h er s. Th e In t er n et Assign ed Nu mber s Au t h or it y (IANA) is t h e cen t r a l coor din a t or f or t h e a ssign men t of u n iqu e pa r a met er va l u es f or In t er n et pr ot ocol s. Th e IANA is ch a r t er ed by t h e In t er n et Societ y (ISOC) a n d t h e Feder a l Net wor k Cou n cil (FNC) t o a ct a s t h e cl ea r in gh ou se t o a ssign a n d coor din a t e t h e u se of n u mer ou s In t er n et pr ot ocol pa r a met er s. Cer t a in f iel ds wit h in IP a n d TCP a r e r equ ir ed t o be u n iqu e. Ima gin e a por t n u mber t h a t is a r bit r a r il y a ssign ed f or FTP, or a n IP a ddr ess t h a t is a l l owed t o be a ssign ed by a n y sit e a n d t h en wa n t s t o con n ect t o t h e In t er n et . It is t h e t a sk of t h e IANA t o ma ke t h ose u n iqu e a ssign men t s a s r equ est ed a n d t o ma in t a in a r egist r y of t h e cu r r en t l y a ssign ed va l u es.

As of t h is wr it in g, RFC 1700 con t a in s t h e compil a t ion of a ssign ed n u mber s. However , a n u p-t o-da t e FTP sit e is a va il a bl e a t : f t p://f t p.isi.edu /in -n ot es/ia n a /a ssign men t s Requ est s f or pa r a met er a ssign men t s (pr ot ocol s, por t s, et c.) sh ou l d be sen t t o:

Requ est s f or SNMP n et wor k ma n a gemen t pr iva t e en t er pr ise n u mber a ssign men t s sh ou l d be sen t t o:

Th e IANA is l oca t ed a t a n d oper a t ed by t h e In f or ma t ion Scien ces In st it u t e (ISI) of t h e Un iver sit y of Sou t h er n Ca l if or n ia (USC). If you a r e devel opin g a pr ot ocol or a ppl ica t ion t h a t wil l r equ ir e t h e u se of a l in k, socket , por t , pr ot ocol , a n d so f or t h , pl ea se con t a ct t h e IANA t o r eceive a n u mber a ssign men t (r ef er t o RFC 1700).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 91 Current IANA Address Block Assignments Addr e ss Bl o c k 000–063/8 064–095/8 096–126/8 127/8 128–191/8 192–193/8 194–195/8 196–197/8 198–199/8 200–201/8 202–203/8 204–205/8 206/8 207/8 208/8 209/8 210/8 211/8 212–223/8 224–239/8 240–255/8

Re g ist r y - Pur po se IANA IANA—Reser ved IANA—Reser ved IANA Va r iou s Regist r ies Va r iou s Regist r ies—Mu l t iRegion a l RIPE NCC—Eu r ope In t er n ic—Ot h er s In t er n ic—Nor t h Amer ica In t er n ic—Cen t r a l a n d Sou t h Amer ica APNIC—Pa cif ic Rim In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica APNIC—Pa cif ic Rim APNIC—Pa cif ic Rim IANA—Reser ved IANA—Mu l t ica st (Cl a ss D) IANA—Reser ved (Cl a ss E)

Dat e Sep 81 Sep 81 Sep 81 Sep 81 Ma y 93 Ma y 93 Ma y 93 Ma y 93 Ma y 93 Ma y 93 Ma y 93 Ma r 94 Apr 95 Nov 95 Apr 96 Ju n 96 Ju n 96 Ju n 96 Sep 81 Sep 81 Sep 81

Cur r e nt IANA Addr e ss Bl o c k Assig nme nt s Addr e ss Bl o c k

Re g ist r y - Pur po se

Dat e

000–063/8 064–095/8 096–126/8 127/8 128–191/8 192–193/8 194–195/8 196–197/8 198–199/8 200–201/8

IANA IANA—Reser ved IANA—Reser ved IANA Va r iou s Regist r ies Va r iou s Regist r ies—Mu l t iRegion a l RIPE NCC—Eu r ope In t er n ic—Ot h er s In t er n ic—Nor t h Amer ica In t er n ic—Cen t r a l a n d Sou t h Amer ica APNIC—Pa cif ic Rim In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica In t er n ic—Nor t h Amer ica APNIC—Pa cif ic Rim APNIC—Pa cif ic Rim IANA—Reser ved IANA—Mu l t ica st (Cl a ss D) IANA—Reser ved (Cl a ss E)

Sep 81 Sep 81 Sep 81 Sep 81 Ma y 93 Ma y 93 Ma y 93 Ma y 93 Ma y 93 Ma y 93

202–203/8 204–205/8 206/8 207/8 208/8 209/8 210/8 211/8 212–223/8 224–239/8 240–255/8

Pr eviou s Ta bl e of Con t en t s Next

Ma y 93 Ma r 94 Apr 95 Nov 95 Apr 96 Ju n 96 Ju n 96 Ju n 96 Sep 81 Sep 81 Sep 81

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 92 IP Routing We h a d t o go t h r ou gh t h e IP a ddr essin g sect ion in or der

t o u n der st a n d r ou t in g. Hopef u l l y, t h is sect ion wil l be a l ot mor e compr eh en sibl e. Pa cket s a r e r ou t ed ba sed on t h e a ddr ess t h a t is in t h e pa cket . Rou t er s r ea d t h is in f or ma t ion a n d det er min e t h e best pa t h kn own a s t h e n ext h op. A pa cket swit ch ed n et wor k (compa r ed t o a cir cu it swit ch ed n et wor k) is ba sed on a u n it of in f or ma t ion (kn own a s a datagram) a n d it s a bil it y t o ma ke it s wa y t h r ou gh t h e n et wor k t o t h e dest in a t ion . Th e da t a gr a m ma y be r ou t ed l oca l l y (t h e dest in a t ion is on t h e sa me su bn et a s t h e or igin a t or ) wh ich is kn own a s direct routing, or it ma y in voke t h e u se of a f or wa r din g device su ch a s a r ou t er if t h e dest in a t ion is r emot e (on a dif f er en t su bn et t h a n t h e or igin a t or ). Th e l a t t er is kn own a s indirect routing, wh ich in f er s h ier a r ch ica l r ou t in g. A da t a gr a m t h a t is sen t ma y in voke bot h dir ect a n d in dir ect r ou t in g. Wh y n ot ju st h a ve on e l a r ge f l a t n et wor k? Pl a ce ever yon e on t h e sa me n et wor k. ATM t r ied t o do t h is a s wel l a s swit ch es a n d br idges. El imin a t e in dir ect r ou t in g compl et el y. Fl a t n et wor ks do h a ve t h eir pl a ce: in sma l l n et wor ks or WAN pr ot ocol s or t o ext en d a su bn et t h r ou gh swit ch es or br idges. Wit h t h e cu r r en t su it e of n et wor k pr ot ocol s, a l a r ge f l a t n et wor k is in ef f icien t (it does n ot sca l e wel l ), especia l l y wh en you est ima t e t h e mil l ion s of a ddr essa bl e st a t ion s t h a t a r e a t t a ch ed t o it . An d t h e pr ot ocol s t h a t cu r r en t l y r u n on n et wor ks a r e br oa dca st or ien t ed. Th is mea n s t h e n et wor k a l l ows f or mu l t ipl e st a t ion s t o be a t t a ch ed a n d gr ou ped t o a sin gl e n et wor k, a n d t h ese st a t ion s see a l l da t a on t h eir n et wor k n o ma t t er wh o sen t it a n d wh o it is f or . Th e pr ot ocol s wer e bu il t f or sh a r ed en vir on men t s. Th ese n et wor ks wer e in ven t ed bef or e t h e a dven t of swit ch es a n d r ou t er s. Al so, wh en st a t ion s n eed t o commu n ica t e, t h e in it ia l commu n ica t ion cou l d be sen t in br oa dca st mode. Commu n ica t ion bet ween cer t a in devices (r ou t er s) is a l wa ys don e in br oa dca st or mu l t ica st . Th is is a specia l t ype of pa cket t h a t en a bl es a l l st a t ion s t o r eceive t h e pa cket a n d h a n d it t o t h eir u pper -l a yer sof t wa r e t o f il t er or pr ocess. As you sca l e f or gr owt h , a n et wor k ca n n ot r ema in f l a t . Th er e mu st be some sor t of h ier a r ch y t o a l l ow f or ef f icien cy.

IP Ro ut ing • Two t ypes: dir ect a n d in dir ect . • Rou t in g pr ovides f or ef f icien t n et wor k t opol ogies. • Fl a t n et wor ks ca n n ot sca l e. • Pr ot ocol s u sed t oda y a r e t h e sa me on es t h a t wer e u sed ba ck in t h e sh a r ed n et wor k en vir on men t . • Two t ypes of r ou t in g pr ot ocol s: IGP a n d EGP. • IGP pr ovides f or r ou t in g wit h in a sin gl e AS • EGP pr ovides f or r ou t in g bet ween ASs

Not a l l st a t ion s n eed t o see ea ch ot h er . As a n et wor k sca l es, it mu st ma in t a in it s ma n a gea bil it y. To ma ke a n y n et wor k mor e ma n a gea bl e, it wil l be spl it in t o ma n y n et wor ks ca l l ed subnets (vir t u a l l y a n y n et wor k t oda y, wh et h er spl it or n ot , is ca l l ed a subnet). To ma ke t h ese su bn et n et wor ks ma n a gea bl e t h ey wil l in t u r n be spl it f u r t h er in t o su b-su bn et s. Th e in t er con n ect ion of t h ese su bn et s is a ccompl ish ed by f or wa r din g devices kn own a s routers. Rou t er s en a bl e da t a t o be f or wa r ded t o ot h er n et wor ks in a ver y ef f icien t ma n n er . It wil l a l wa ys be ea sier t o ma n a ge ma n y sma l l er n et wor ks t h a n it wil l be t o ma n a ge on e l a r ge n et wor k. Al so, br oa dca st da t a st a ys on it s n et wor k or su bn et . It is n ot f or wa r ded by r ou t er s (except ion s occu r a n d t h ey wil l be n ot ed in t h ose sect ion s, su ch a s DHCP or a l l su bn et s br oa dca st ). In or der f or r ou t er s t o f or wa r d da t a t o ot h er n et wor ks, t h ey u se specia l pr ot ocol s (kn own a s routing pr ot ocol s) t o en a bl e t h em t o in t er n a l l y dr a w a ma p of t h e en t ir e in t er n et f or t h e pu r poses of r ou t in g. To a ccompl ish t h is, t h er e a r e t wo t ypes of pr ot ocol s u sed: In t er ior Ga t e-wa y Pr ot ocol s (IGPs) a n d Ext er ior Ga t ewa y Pr ot ocol s (EGPs). Th e Ext er ior Ga t ewa y Pr ot o-col u sed wit h IP is kn own a s Bor der Ga t ewa y Pr ot ocol (BGP). Th e IGPs t h a t I wil l expl a in a r e kn own a s t h e Rou t in g In f or ma t ion Pr ot ocol (RIP a n d RIP2) a n d Open Sh or t est Pa t h Fir st (OSPF).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 93 Direct Routing As st a t ed bef or e t h er e a r e t wo t ype of r ou t in g: dir ect

a n d in dir ect . Th is sect ion gives you a br ief in t r odu ct ion t o dir ect r ou t in g. Th r ou gh ou t t h is sect ion , dif f er en t n et wor k n u mber s wil l be u sed. Th e exa mpl es wil l n ot empl oy t h e u se of su bn et s. Su bn et s ef f ect ivel y a ct l ike n et wor k n u mber s. Su bn et s a r e a l so sepa r a t ed by a r ou t er . For exa mpl e, in t h e sl ide, t h e n et wor k n u mber s cou l d be 140.1.1.1 on t h e n et wor k wit h en dst a t ion B, a n d 140.1.2.1 on t h e n et wor k con t a in in g h ost A. Usin g a su bn et ma sk of 255.255.255.0 wou l d yiel d t wo dif f er en t n et wor ks: 140.1.1.0 a n d 140.1.2.0. For simpl icit y in expl a in in g r ou t er s, I h a ve ch osen t o u se compl et el y dif f er en t n et wor k n u mber s. How does a n et wor k st a t ion kn ow wh et h er t h e pa cket h a s t o be dir ect l y (l oca l ) or in dir ect l y (r emot e) r ou t ed? For t h e n et wor k st a t ion , it is a r el a t ivel y simpl e pr ocess. Th e wh ol e ba sis f or r ou t in g is in t h e IP n et wor k n u mber a ssign ed t o t h e n et wor k st a t ion . Remember f r om t h e pr eviou s sect ion on Addr essin g t h a t a n IP a ddr ess con t a in s t h e n et wor k n u mber a s wel l a s t h e h ost n u mber . Wit h t h e f ir st 1, 2, 3, or 4 bit s of t h e 32-bit IP n et wor k a ddr ess iden t if yin g t h e cl a ss of t h e a ddr ess, t h is a l l ows f or a n y n et wor k st a t ion (wor kst a t ion or r ou t er ) t o qu ickl y ext r a ct t h e n et wor k por t ion ou t of t h e cl a ss of IP a ddr ess. In ot h er wor ds, by r ea din g u p t o t h e f ir st 4 bit s of t h e IP a ddr ess, a n et wor k st a t ion ca n qu ickl y det er min e h ow mu ch of t h e IP a ddr ess t o r ea d t o det er min e t h e n et wor k n u mber of t h e a ddr ess. Th e sen din g st a t ion wil l compa r e t h e pa cket ’s dest in a t ion n et wor k n u mber t o t h a t of it s own n et wor k n u mber . If t h e n et wor k n u mber por t ion of t h e dest in a t ion IP a ddr ess ma t ch es it own , t h e pa cket ca n be r ou t ed dir ect l y on t h e l oca l LAN, wit h ou t t h e u se of a r ou t er . Th e pa cket is simpl y t r a n smit t ed t o t h e st a t ion (u sin g ARP if n ecessa r y). On ce t h is det er min a t ion is ma de, a n d t h e pa cket is dest in ed f or a l oca l r ou t e, t h e n et wor k st a t ion wou l d ch eck it s ARP t a bl e t o f in d t h e IP-t o-ph ysica l -a ddr ess ma ppin g. If on e is f ou n d, t h e pa cket is ph ysica l l y a ddr essed a n d t r a n smit t ed on t o t h e n et wor k. Th e ph ysica l dest in a t ion a ddr ess (l oca t ed in t h e da t a l in k h ea der ) wil l be t h a t of t h e

r eceivin g st a t ion . If t h e st a t ion ’s a ddr ess is n ot in t h e ARP ca ch e, t h e ARP r equ est pr ocess is in voked. Ref er r in g t o t h e sl ide, en dst a t ion B a n d h ost A a r e l oca t ed on t h e sa me n et wor k. Aga in , a poin t n eeds t o be br ou gh t u p h er e: Th er e is a dif f er en ce bet ween a r ou t in g pr ot ocol a n d a r ou t a bl e pr ot ocol . A r ou t a bl e pr ot ocol is on e t h a t a l l ows f or r ou t in g su ch a s Net Wa r e (IPX) a n d TCP/IP. Net BIOS a n d LAT (a DEC t er min a l /pr in t er pr ot ocol ) a r e n ot r ou t a bl e pr ot ocol s. RIP a n d OSPF, a r e r ou t in g pr ot ocol s wh ich en a bl e t h e r ou t in g f u n ct ion s t o wor k pr oper l y.

Dir ect Rou t in g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 94 Indirect Routing Indir e c t Ro ut ing • Occu r s wh en t h e sou r ce a n d dest in a t ion n et wor k or su bn et do n ot ma t ch . • Sou r ce wil l ARP f or a r ou t er a n d sen d t h e da t a gr a m t o t h e r ou t er . • Th e r ou t er wil l eit h er f or wa r d t h e pa cket dir ect l y t o t h e dest in a t ion or it wil l f or wa r d it t o a n ot h er r ou t er in t h e pa t h t o t h e dest in a t ion . • Rou t er s decr emen t t h e TTL f iel d. • Rou t er s f or wa r d t h e pa cket ba sed on t h e IP a ddr ess a n d n ot t h e MAC a ddr ess.

If t h e sou r ce a n d dest in a t ion st a t ion s a r e on dif f er en t

n et wor ks, t h ey mu st u se t h e in dir ect r ou t in g ser vices of a r ou t er . Th e t r a n smit t in g st a t ion wil l a ddr ess t h e ph ysica l dest in a t ion a ddr ess of t h e pa cket t o t h a t of t h e r ou t er (u sin g ARP, if n ecessa r y, t o f in d t h e ph ysica l a ddr ess of t h e r ou t er ) a n d su bmit t h e pa cket t o t h e r ou t er . Ea ch wor kst a t ion ma y be a bl e t o det er min e t h e a ddr ess of it s cl osest r ou t er , or it ca n be pr econ f igu r ed wit h t h e a ddr ess of it s def a u l t r ou t er . Th e r ou t er h a s t wo ch oices: 1. If t h e dest in a t ion n et wor k in dica t ed by t h e a ddr ess in t h e IP h ea der is dir ect l y a t t a ch ed t o t h e r ou t er , it wil l f or wa r d t h e pa cket dir ect l y t o t h e dest in a t ion st a t ion . 2. If t h e dest in a t ion n et wor k in dica t ed by t h e a ddr ess in t h e IP h ea der is n ot dir ect l y a t t a ch ed t o t h e r ou t er , it mu st u se t h e ser vices of a n ot h er r ou t er t o f or wa r d t h e pa cket a n d l et t h a t r ou t er det er min e t h e n ext h op pa t h .

Not ice h er e, t h e dest in a t ion ph ysica l a ddr ess is t h a t of t h e r ou t er a n d n ot t h e f in a l dest in a t ion st a t ion . Th is t ype of r ou t in g is in dir ect r ou t in g. Th e f in a l dest in a t ion IP a ddr ess is embedded in t h e IP h ea der . Sen din g a pa cket t o it s f in a l dest in a t ion migh t be a ccompl ish ed by u sin g bot h dir ect a n d

in dir ect r ou t in g. For exa mpl e, wh en a pa cket is t o be del iver ed a cr oss a n in t er n et , t h e or igin a t in g st a t ion wil l a ddr ess it t o t h e r ou t er f or del iver y t o it s f in a l n et wor k. Th is is in dir ect r ou t in g. Th e or igin a t or a n d dest in a t ion ma y be sepa r a t ed by mor e t h a n on e r ou t er . No ma t t er wh et h er t h e f in a l dest in a t ion n et wor k ID is dir ect l y con n ect ed t o t h a t r ou t er or wh et h er t h e pa cket mu st t r a ver se a f ew r ou t er s t o r ea ch it s f in a l dest in a t ion , t h e l a st r ou t er in t h e pa t h mu st u se direct routing t o del iver t h e pa cket t o it s dest in a t ion h ost . Depen din g on t h e Opt ion s f iel d set t in gs, it sh ou l d be n ot ed t h a t t h e or igin a l IP da t a gr a m, wil l n ot be a l t er ed wit h t wo pr ima r y except ion s: t h e TTL (Time t o Live) f iel d a n d t h e Cycl ic Redu n da n cy Ch eck f iel d. If a n IP da t a gr a m is r eceived by a r ou t er a n d it h a s n ot a r r ived a t it s f in a l dest in a t ion , t h e r ou t er wil l decr emen t t h e TTL f iel d. If TTL > 0, it wil l f or wa r d t h e pa cket ba sed on r ou t in g t a bl e in f or ma t ion . Th e IP da t a gr a m’s h ea der con t en t s wil l r ema in t h e sa me (wit h t h e except ion of a n er r or -det ect ion f iel d kn own a s t h e Cycl ic Redu n da n cy Ch eck, or CRC). Sin ce t h e TTL f iel d ch a n ged, t h e CRC mu st be r eca l cu l a t ed t h r ou gh ou t a l l t h e n et wor ks a n d r ou t er s t h a t t h e da t a gr a m t r a ver ses. Ot h er wise, t h e on l y a l t er a t ion s t h a t a r e ma de a r e t o t h e da t a l in k h ea der s a n d t r a il er s. Th e IP a ddr esses in t h e IP h ea der wil l r ema in t h e sa me, a s t h e da t a gr a m t r a ver ses a n y r ou t er s in t h e pa t h t o it s dest in a t ion . IP r ou t er s f or wa r d da t a gr a ms on a con n ect ion l ess ba sis a n d t h er ef or e do n ot gu a r a n t ee del iver y of a n y pa cket . Th ey oper a t e a t t h e n et wor k l a yer , wh ich pr ovides best -ef f or t or con n ect ion l ess da t a t r a n sf er . Rou t er s do n ot est a bl ish session s wit h ot h er r ou t er s on t h e in t er n et . In f a ct , IP r ou t er s do n ot kn ow of a n y wor kst a t ion s (n on r ou t er s) on t h eir su bn et s. Th ese r ou t er s f or wa r d pa cket s ba sed on t h e n et wor k a ddr ess of t h e pa cket (in t h e IP h ea der ) a n d not on t h e ph ysica l a ddr ess (t h e 48-bit a ddr ess f or br oa dca st n et wor ks) of t h e f in a l dest in a t ion (t h e r eceiver ). Wh en t h e r ou t er r eceives t h e pa cket , it wil l l ook a t t h e f in a l n et wor k a ddr ess (embedded in t h e IP h ea der of t h e pa cket ) a n d det er min e h ow t o r ou t e t h e pa cket . Rou t er s on l y r ou t e pa cket s t h a t a r e dir ect l y a ddr essed t o t h em. Th ey do n ot oper a t e in pr omiscu ou s mode (wa t ch in g a l l LAN t r a f f ic) f or f or wa r din g da t a gr a ms.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 95 A Flowchart Th e sl ide sh ows t h e f l owch a r t

of t h e r ou t in g pr ocess.

Bef or e compl et e con f u sion t a kes over h er e, t h er e a r e some en t it ies t h a t n eed t o be expl a in ed a bou t t h e IP l a yer t h a t a l l ow t h e in t er n et t o oper a t e. In ot h er wor ds, wh en a r ou t er r eceives a pa cket , h ow does it kn ow wh er e a n d h ow t o sen d t h ese pa cket s? In or der f or a pa cket t o be del iver ed t h r ou gh a r ou t er , t h e r ou t er mu st kn ow wh ich pa t h t o del iver t h e pa cket t o in or der f or t h e pa cket t o r ea ch it s f in a l dest in a t ion . Th is is a ccompl ish ed t h r ou gh IP r ou t in g a l gor it h ms, wh ich in vol ves t wo st eps: ma in t a in in g a t a bl e of kn own r ou t es (n et wor k n u mber s), a n d l ea r n in g n ew r ou t es (n et wor k n u mber s) wh en t h ey become a va il a bl e.

A Fl owch a r t

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 96 Routing Protocols—Distance Vector In f or ma t ion is kept

in t h e r ou t er t h a t a l l ows t o it t o kn ow a l l t h e n et wor ks or su bn et s in it s doma in a n d t h e pa t h t o get t o t h ose n et wor ks. Th e in f or ma t ion is a bou t n et wor ks a n d t h eir pa t h s. Th is in f or ma t ion is gr ou ped t oget h er in t o a t a bl e—a t a bl e is t h e sa me t h in g a s a t a bl e in Micr osof t Wor d. It con t a in s a gr ou pin g of l ike in f or ma t ion t o be u se a s a wh ol e. Th er e a r e t wo st a n da r d met h ods f or bu il din g t h ese t a bl es: dist a n ce vect or a n d l in k st a t e. Lin k st a t e wil l be cover ed l a t er . Dist a n ce vect or mea n s t h a t t h e in f or ma t ion sen t f r om r ou t er t o r ou t er is ba sed on a n en t r y in a t a bl e con sist in g of . Vector mea n s t h e n et wor k n u mber a n d distance mea n s wh a t it cost s t o get t h er e. Th e r ou t er s exch a n ge t h is n et wor k r ea ch a bil it y in f or ma t ion wit h ea ch ot h er by br oa dca st in g t h eir r ou t in g t a bl e in f or ma t ion con sist in g of t h ese dist a n ce-vect or en t r ies. Th is br oa dca st is l oca l a n d ea ch r ou t er is depen den t on ot h er r ou t er s f or cor r ect ca l cu l a t ion of t h e dist a n ce.

Ea ch en t r y in t h e t a bl e is a n et wor k n u mber (t h e vect or ) a n d t h e a mou n t of r ou t er s (dist a n ce) t h a t a r e bet ween it (t h e r ou t er ) a n d t h e f in a l n et wor k (in dica t ed by t h e n et wor k n u mber ). Th is dist a n ce is somet imes r ef er r ed t o a s a metric. For exa mpl e, if t h e sou r ce st a t ion wa n t s t o t r a n smit a pa cket t o a dest in a t ion st a t ion t h a t is f ou r h ops a wa y, t h er e a r e pr oba bl y f ou r r ou t er s sepa r a t in g t h e t wo n et wor ks. An y t ime a da t a gr a m mu st t r a ver se a r ou t er (t h er eby pa ssin g t h r ou gh a n ew n et wor k n u mber ) it is con sider ed a h op (met r ic). For RIP, t h e ma ximu m dia met er of t h e in t er n et is 15 r ou t er s (h ops). A dist a n ce of 16 is a n in dica t ion t h a t t h e n et wor k is n ot r ea ch a bl e. In ot h er wor ds, if t h e n et wor k is mor e t h a n 15 r ou t er s a wa y, it is con sider ed u n r ea ch a bl e. Remember : Th is is RIP a n d RIP is a n IGP, wh ich is u n der on e doma in . Th e In t er n et it sel f en compa sses ma n y doma in s a n d t h e dia met er of t h e In t er n et is mu ch l a r ger t h a n 15 h ops. As sh own in t h e sl ide, ea ch r ou t er wil l con t a in a t a bl e wit h st a r t in g en t r ies of t h ose n et wor ks t h a t a r e dir ect l y a t t a ch ed t o it . For a r ou t er t h a t h a s on l y t wo n et wor k con n ect ion s (t h er e a r e n o ot h er r ou t er s on t h e in t er n et ), t h e in it ia l en t r ies in t h e t a bl e wou l d l ook l ike t h e f ol l owin g:

Ne t wo r k 134.4.0.0 134.3.0.0

Me t r ic 1 1

Po r t 1 2

Ag e XXX XXX

Th er e a r e a ct u a l l y mor e h ea der en t r ies in a r ou t in g t a bl e, bu t t h e sign if ica n t por t ion s a r e sh own in t h e sl ide. Fr om t h is t a bl e, we kn ow t h a t n et wor ks 134.4.0.0 a n d 134.3.0.0 a r e dir ect l y con n ect ed t o t h is r ou t er . Net wor k 134.4.0.0 is a ssign ed t o por t 1 of t h e r ou t er a n d 134.3.0.0 is dir ect l y a t t a ch ed t o por t 2. It is r u n n in g t h e RIP pr ot ocol , a n d xxx in dica t es h ow l on g t h e r ou t e h a s bef or e it is del et ed f r om t h e t a bl e.

Rou t in g Pr ot ocol s—Dist a n ce Vect or

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 97 Updating Other Routers (Distance Vectors) Updat ing Ot he r Ro ut e r s (Dist anc e Ve c t o r s) • Upon in it ia l iz a t ion , ea ch r ou t er r ea ds it s pr econ f igu r ed IP a ddr ess a n d met r ic (cost in h ops) of a l l it s a ct ive por t s. • Ea ch r ou t er t r a n smit s a por t ion of it s r ou t in g t a bl e (n et wor k ID, met r ic) t o ea ch “n eigh bor ” r ou t er . • Ea ch r ou t er u ses t h e most r ecen t u pda t es f r om ea ch n eigh bor . • Ea ch r ou t er u ses t h e u pda t e in f or ma t ion t o ca l cu l a t e it s own “sh or t est pa t h ” (dist a n ce in h ops) t o a n et wor k. • Ta bl es a r e u pda t ed on l y: • If t h e r eceived in f or ma t ion in dica t es a sh or t er pa t h t o t h e dest in a t ion n et wor k. • If t h e r eceived u pda t e in f or ma t ion in dica t es a n et wor k is n o l on ger r ea ch a bl e. • If a n ew n et wor k is f ou n d.

Some bu t

n ot a l l t h e en t r ies of t h e r ou t er ’s r ou t e t a bl e a r e sen t ou t t h e por t s t o u pda t e ot h er r ou t er s a s t o t h e n et wor ks t h a t t h is r ou t er kn ows a bou t . Th er e a r e a f ew except ion s, wh ich wil l be expl a in ed in a momen t . Th ese u pda t es a r e n ot f or wa r ded by a n y r ou t er , mea n in g t h e u pda t es st a y on t h e n et wor k on wh ich t h ey or igin a t ed. An y r ou t er t h a t is l oca t ed on t h e sa me n et wor k wil l r eceive t h e pa cket , r ea d t h e r ou t in g t a bl e da t a , a n d u pda t e it s t a bl e if n eeded. Al l pa r t icipa t in g r ou t er s wil l a ccompl ish t h is. In ot h er wor ds, a l l r ou t er s f or wa r d t h eir t a bl es ou t ea ch a ct ive por t . As ea ch t a bl e is r eceived, t h e r ou t er s a r e bu il din g a pict u r e of t h e n et wor k. As ea ch br oa dca st is t r a n smit t ed, mor e a n d mor e in f or ma t ion is bein g pr opa ga t ed t h r ou gh ou t t h e n et wor k. Even t u a l l y, a l l r ou t er s wil l kn ow of a l l n et wor ks on t h eir in t er n et . Th er e a r e t h r ee possibil it ies t h a t ca n ca u se a r ou t er t o u pda t e it s exist in g t a bl e ba sed

on ju st -r eceived in f or ma t ion : 1. If t h e r eceived t a bl e con t a in s a n en t r y t o a n et wor k wit h a l ower h op cou n t , it wil l replace its entry wit h t h e n ew en t r y con t a in in g t h e l ower h op cou n t . 2. If a n et wor k exist s in t h e ju st -r eceived t a bl e t h a t does n ot exist in it s own t a bl e, it wil l add the new entry. 3. If t h e r ou t er f or wa r ds pa cket s t o a pa r t icu l a r n et wor k t h r ou gh a specif ied r ou t er (in dica t ed by t h e n ext -h op r ou t er a ddr ess) a n d t h a t r ou t er ’s h op cou n t t o a n et wor k dest in a t ion ch a n ges, it wil l ch a n ge it s en t r y. In ot h er wor ds, if r ou t er A n or ma l l y r ou t es da t a f or a n et wor k X t h r ou gh r ou t er B, a n d r ou t er B’s h opcou n t en t r y t o t h a t n et wor k ch a n ges, r ou t er A ch a n ges it s en t r y.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 98 A Bigger Update Th is sl ide sh ows wh a t

h a ppen s wh en r ou t er A su bmit s it s r ou t in g t a bl e ou t of it s por t con n ect ed t o n et wor k 2. Th is sl ide a ssu mes a l l r ou t er s a r e n ewl y in it ia l iz ed. (For simpl icit y, t h e sl ide sh ows t h e u pda t in g t h r ou gh on e por t on l y. In r ea l it y, r ou t in g t a bl es a r e su bmit t ed ou t a l l por t s of a r ou t er , wit h a f ew r est r ict ion s on wh ich en t r ies of t h e t a bl e get t r a n smit t ed.) Rou t er A t r a n smit s it s t a bl e con t a in in g t wo n et wor ks: Z a n d Y. Ea ch of t h ese n et wor ks is on e h op a wa y (t h ey a r e dir ect l y con n ect ed). Rou t er B wil l r eceive t h is pa cket a n d wil l a dd 1 t o ea ch h op-cou n t en t r y in t h e r eceived t a bl e. (Th is is a ccompl ish ed a ssu min g t h e RIP cost a ssign ed t o t h a t por t of r ou t er B is 1. Th e con f igu r ed h op cou n t cou l d be set t o somet h in g el se.) Rou t er B exa min es it s t a bl e a n d n ot ices t h a t it does n ot h a ve a n en t r y f or n et wor k Z. It wil l a dd t h is en t r y t o it s t a bl e a s: n et wor k 1, a va il a bl e t h r ou gh por t 1, t wo h ops a wa y. It wil l t h en ch eck t h e n ext en t r y. Net wor k Y wil l n ot be a dded, f or r ou t er B a l r ea dy h a s n et wor k 2 in it s t a bl e wit h a cost of 1. Sin ce t h e in comin g t a bl e r epor t s n et wor k Y h a s a cost of 2, r ou t er B wil l ign or e t h is en t r y. (Th er e a r e r u l es t h a t wil l pr even t r ou t er A f r om sen din g ou t in f or ma t ion a bou t n et wor k 2, wh ich wil l be discu ssed l a t er .) On ce it s t a bl e is u pda t ed, r ou t er B wil l t r a n smit it s t a bl e ou t it s por t s ever y 30 secon ds (a ga in , f or simpl icit y on l y on e r ou t er u pda t e is bein g sh own ). Rou t er C wil l r eceive t h is t a bl e f r om r ou t er B a n d wil l per f or m t h e sa me st eps a s r ou t er B. Even t u a l l y, a l l in f or ma t ion a bou t a l l n et wor ks on t h e in t er n et wil l be pr opa ga t ed t o a l l r ou t er s.

A Bigger Upda t e

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 99 IP Routing Tables Th e sl ide sh ows a n exa mpl e of wh a t

is in a r ou t in g t a bl e. Th is is a dist a n ce-vect or r ou t in g t a bl e, n ot a l in k-st a t e r ou t in g t a bl e. OSPF wou l d h a ve a dif f er en t kin d of t a bl e. In t h is t a bl e, it is impor t a n t t o n ot e t h e n et wor k n u mber , h ops t o t h a t n et wor k n u mber , a n d t h e n ext r ou t er in t h e pa t h t o t h a t n et wor k. Rou t in g t a bl e f iel ds va r y, depen din g on t h e u pda t e mech a n ism u sed. Th e f ol l owin g t a bl e is a sa mpl e of a r ou t in g t a bl e u sed by t h e r ou t in g in f or ma t ion pr ot ocol (RIP) f or t h e IP pr ot ocol . Th e r ou t e t a bl e en t r ies on t h e sl ide a r e def in ed a s f ol l ows: Ne t wo r k numbe r . A kn own n et wor k ID. Ne xt r o ut e r t o de l ive r t o . Th e n ext r ou t er t h a t t h e pa cket sh ou l d be del iver ed t o if t h e dest in a t ion n et wor k is n ot dir ect l y con n ect ed. A dir ect l y con n ect ed n et wor k is on e t h a t is ph ysica l l y con n ect ed t o t h e r ou t er , sin ce most r ou t er s t oda y h a ve mor e t h a n t wo con n ect ed n et wor ks. Ho ps. Th is is t h e met r ic cou n t of h ow ma n y r ou t er s t h e pa cket mu st t r a ver se bef or e r ea ch in g t h e f in a l dest in a t ion . A 1 in dica t es a l oca l r ou t e. Le ar ne d f r o m. Sin ce ma n y r ou t in g a l gor it h ms ma y exist in a r ou t er (i.e., RIP, OSPF, a n d EGP ma y exist in t h e sa me r ou t er ), t h er e is u su a l l y a n en t r y in t h e t a bl e t o expl a in h ow t h e r ou t e wa s a cqu ir ed. Time l e f t t o de l e t e . Th e a mou n t of t ime l ef t bef or e t h e r ou t e wil l be del et ed f r om t h e t a bl e. Po r t . Th e ph ysica l por t on t h e r ou t er f r om wh ich t h e r ou t er r eceived in f or ma t ion a bou t t h is n et wor k.

IP Rou t in g Ta bl es

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 100 The Routing Information Protocol (Version 1) Rou t in g t a bl es a l l ow r ou t er s t o det er min e t h e n ext

h op pa t h f or a r eceived da t a gr a m. Bu t wh a t bu il ds t h ose t a bl es? Dyn a mic u pda t in g is t h e pr ocess by wh ich r ou t er s u pda t e ea ch ot h er wit h r ea ch a bil it y in f or ma t ion . Bef or e t h e a dven t of dyn a mic u pda t es of r ou t in g t a bl es, most commer cia l ven dor s su ppor t ed ma n u a l u pda t es f or t h eir r ou t er t a bl es. Th is mea n t ma n u a l l y en t er in g n et wor k n u mber s, t h eir a ssocia t ed dist a n ces, a n d t h e por t n u mber s in t o t h e r ou t er t a bl e. Th e In t er n et wa s t h en kn own a s t h e ARPAn et a n d it empl oyed a r ou t in g u pda t e sch eme kn own a s t h e Ga t ewa y In f or ma t ion Pr ot ocol a n d l a t er t h e Ga t ewa y t o Ga t ewa y Pr ot ocol (GGP). Th is is beyon d t h e scope of t h is book a n d is n ot u sed a n ymor e. In depen den t r ou t er ven dor s did n ot h a ve t h a t ma n y r ou t er s a n d su bn et s t o u pda t e, so pl a cin g a ma n u a l en t r y in t h e r ou t er s wa s n ot a l l t h a t ba d. As n et wor ks gr ew l a r ger , t h is beca me a cu mber some wa y of bu il din g t a bl es. Commer cia l l y, RIP wa s t h e pr ot ocol t h a t en a bl ed a u t oma t ic u pda t es of r ou t er t a bl es. Th e RIP a l gor it h m is ba sed on t h e dist a n ce-vect or a l gor it h ms ju st descr ibed. RIP pl a ced t h e f u n da men t a l s of dist a n ce-vect or in a simpl e r ou t in g a l gor it h m. Impl emen t a t ion s of t h ese pr ot ocol s wer e f ir st f ou n d on t h e ARPAn et in 1969 u sin g t h e Ga t ewa y In f or ma t ion Pr ot ocol . However , it wa s f ir st devised by Xer ox Cor por a t ion a s t h e r ou t in g a l gor it h m u sed by In t er n et Da t a gr a m Pr ot ocol of XNS.

RFC 1058 f ir st def in ed RIP f or TCP/IP, a n d it wa s f or ma l l y a dopt ed by t h e IAB in 1988. Al t h ou gh it wa s n ot pr ima r il y in t en ded a s the r ou t in g a l gor it h m f or TCP, it ga in ed widespr ea d a ccept a n ce wh en it beca me embedded in t o t h e Ber kel ey 4BSD Un ix oper a t in g syst em t h r ou gh a ser vice kn own a s r ou t ed (pr on ou n ced “r ou t e d”—d is f or t h e da emon pr ocess t h a t r u n s t h e pr ot ocol in Un ix). Pl a cin g t h e f u n ct ion s of RIP in t o a n RFC a l l owed f or in t er oper a bil it y a n d det a il ed cer t a in f u n ct ion s.

Th e Rou t in g In f or ma t ion Pr ot ocol (Ver sion 1)

Wit h RIP in f or ma t ion , a n y r ou t er kn ows t h e l en gt h of t h e sh or t est pa t h (n ot n ecessa r il y t h e best ) f r om ea ch of it s n eigh bor r ou t er s (r ou t er s l oca t ed on t h e sa me n et wor k) t o a n y ot h er dest in a t ion . Th er e a r e ma n y def icien cies in t h is pr ot ocol a n d t h ey a r e discu ssed a t t h e en d of t h is sect ion . Th e RIP pa cket is qu it e simpl e. Th e sl ide sh ows t h e RIP h ea der a n d da t a en ca psu l a t ed in a n Et h er n et pa cket . Th e RIP da t a is t h e t a bl e in f or ma t ion on e r ou t er sh a r es wit h a n ot h er .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 101 RIP Operational Types RIP Ope r at io nal Type s • RIP ca n oper a t e in eit h er ACTIVE or PASSIVE mode. • Act ive mea n s t h a t it bu il ds r ou t in g t a bl es a n d r espon ds t o RIP r equ est s. • Pa ssive mea n s t h a t it ca n bu il d a r ou t in g t a bl e f or it s own u se, bu t it does n ot r espon d t o a n y RIP r equ est s. • Most wor kst a t ion s (PCs) u se a def a u l t ga t ewa y (i.e., r ou t er ) a n d n ot a r ou t in g u pda t e pr ot ocol l ike RIP.

Th er e a r e t wo t ypes of RIP pa cket s t h a t

t r a ver se a n et wor k (in dica t ed by t h e comma n d f iel d, sh own n ext ): on e t o r equ est in f or ma t ion a n d t h e ot h er t o give in f or ma t ion (a r espon se pa cket ). A r espon se pa cket is gen er a t ed f or a r equ est pa cket a n d is u sed f or per iodic RIP u pda t es. Most RIP pa cket s t h a t t r a ver se a l oca l n et wor k wil l be t h e per iodic RIP t a bl e u pda t es. Does RIP oper a t e in a wor kst a t ion ? Th e a n swer is, “yes a n d n o.” Some wor kst a t ion s impl emen t RIP. Win dows NT a n d Un ix bot h u se RIP; h owever , most simpl e wor kst a t ion s su ch a s Win dows 95 do n ot (t h ey h a ve a def a u l t ga t ewa y). If a wor kst a t ion does impl emen t RIP, it is u su a l l y in wh a t is kn own a s passive mode, wh ich mea n s it ca n r eceive a n d pr ocess u pda t es, bu t ca n n ot r espon d t o RIP r equ est s or br oa dca st it s t a bl e. In pa ssive mode, RIP l ist en s on l y f or RIP u pda t es. (It ma y bu il d it s own t a bl es or it ma y n ot . If it does, it wil l n ot br oa dca st t h ese t a bl es.) It wil l bu il d a t a bl e so t h a t it wil l n ot h a ve t o r equ est in f or ma t ion f r om ot h er r ou t er s on t h e n et wor k. Pa ssive en d is u sed f or n on r ou t in g n et wor k st a t ion s. Th ese devices h a ve n o r ea son t o br oa dca st u pda t es, bu t h a ve ever y r ea son t o l ist en f or t h em. Toda y, most DOS PC compu t er s wil l u se a con cept of a def a u l t ga t ewa y, expl a in ed l a t er . Even Win dows 95 u ses a def a u l t ga t ewa y if pr ompt ed. It ca n bu il d a r ou t in g t a bl e, bu t Win dows 95 is n ot RIP-en a bl ed.

Th e RIP pa ssive pr ot ocol a l l ows t h e h ost t o ma in t a in a t a bl e of t h e sh or t est r ou t es t o a n et wor k a n d design a t es wh ich r ou t er t o sen d t h e pa cket s t o. Th is con su mes a con sider a bl e a mou n t of RAM f or bot h t h e t a bl e a n d t h e a l gor it h m. Wit h ou t it , TCP/IP r equ ir es a def a u l t ga t ewa y en t r y, wh ich specif ies t h a t wh en a pa cket is dest in ed f or a r emot e n et wor k, t h e h ost mu st su bmit t h e pa cket t o a specif ied ga t ewa y f or pr ocessin g, even if t h is ga t ewa y is n ot t h e sh or t est pa t h t o t h a t n et wor k. Pa ssive impl emen t a t ion s a dd n o over h ea d t o t h e n et wor k, f or t h ey l ist en on l y t o r ou t in g t a bl e u pda t es t h a t a r e on t h e n et wor k. Wit h ou t pa ssive RIP, t h ese devices h a ve t o ma in t a in t h eir own t a bl es or impl emen t a def a u l t r ou t e. Most wor kst a t ion s do n ot in voke a ct ive ver sion s of t h e RIP pr ot ocol Th ey do n ot bu il d t a bl es a n d keep t r a ck of n et wor ks. To commu n ica t e wit h a r ou t er , wor kst a t ion s gen er a l l y u se t h eir def a u l t ga t ewa y pa r a met er . Th is is f or simpl icit y. High er -power ed wor kst a t ion s, su ch a s Su n SPARC wor kst a t ion s, ca n bu il d a n d ma in t a in r ou t in g t a bl es. However t h e ea r l y impl emen t a t ion s of ICP/IP wer e n ot power f u l a n d r equ ir ed a simpl e met h od.Remember , RIP pa cket s do n ot l ea ve t h eir l oca l n et wor k. Al l pa r t icipa n t s in t h e RIP pr ot ocol (f or exa mpl e, r ou t er s) wil l r eceive t h e pa cket , u pda t e t h eir t a bl es if n ecessa r y, a n d t h en disca r d t h e pa cket . Th ey wil l compu t e t h e r ea ch a bil it y of n et wor ks ba sed on a ddin g a cost (u su a l l y 1) t o t h e ju st -r eceived t a bl es or cou n t en t r y, a n d t h en br oa dca st t h eir t a bl es ou t t h eir por t s (u su a l l y bein g min df u l of a pr ot ocol n a med split horizon, wh ich is expl a in ed a l it t l e l a t er ).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 102 RIP Field Descriptions Th e f iel ds in t h e RIP pa cket s a r e: Co mmand 1 2 3–4 5

De sc r ipt io n Requ est f or pa r t ia l or f u l l r ou t in g t a bl e in f or ma t ion Respon se pa cket con t a in in g a r ou t in g t a bl e Tu r n on (3) or of f (4) t r a ce mode (obsol et e) Su n Micr osyst ems’ in t er n a l u se

Ve r sio n. Used t o in dica t e t h e ver sion of RIP. Cu r r en t l y set t o 1 f or RIP ver sion 1. Famil y o f ne t x. Used t o sh ow t h e diver sit y of t h e RIP pr ot ocol a n d t o in dica t e t h e pr ot ocol t h a t own s t h e pa cket . It wil l be set t o 2 f or IP. Sin ce XNS cou l d possibl y be r u n n in g on t h e sa me n et wor k a s IP, t h e RIP f r a mes wou l d be simil a r . Th is sh ows t h a t t h e sa me RIP f r a me ca n be u sed f or mu l t ipl e pr ot ocol su it es. Appl eTa l k, Novel l Net Wa r e’s IPX, XNS, a n d TCP/IP a l l u se t h e RIP pa cket . Ea ch pa cket is ch a n ged a l it t l e f or ea ch pr ot ocol . IP addr e ss. In dica t es t h e IP a ddr ess of a specif ic dest in a t ion n et wor k. Th is wou l d be f il l ed in by t h e r equ est in g st a t ion . An a ddr ess of 0.0.0.0 in dica t es t h e def a u l t r ou t e (expl a in ed l a t er ). Th e a ddr ess f iel d n eeds on l y 4 byt es of t h e a va il a bl e 14 byt es, so a l l ot h er byt es mu st be set t o 0. Th is wil l be expl a in ed in RIP Ver sion 2. If t h is is a r equ est pa cket a n d t h er e is on l y on e en t r y, wit h t h e a ddr ess f a mil y ID of 0 a n d a met r ic of 1, t h en t h is is a r equ est f or t h e en t ir e r ou t in g t a bl e.

As f or t h e dist a n ce-t o-n et wor k f iel d, on l y t h e in t eger s of 1 t o 16 a r e a l l owed. An en t r y of 16 in t h is f iel d in dica t es t h a t t h e n et wor k is u n r ea ch a bl e. Th e n ext en t r y in t h e f iel d wou l d st a r t wit h t h e IP a ddr ess f iel d t h r ou gh t h e met r ic f iel d. Th is wou l d be r epea t ed f or ea ch t a bl e en t r y of t h e r ou t er t o be br oa dca st . Th e ma ximu m siz e of t h is pa cket is 512 byt es. Th e RIP pr ot ocol r el ies on t h e t r a n spor t -l a yer pr ot ocol of t h e User Da t a gr a m Pr ot ocol (UDP, discu ssed in t h e n ext sect ion on t r a n spor t -l a yer pr ot ocol s). In t h is wil l be t h e specif ica t ion f or t h e l en gt h of t h e RIP pa cket . Al so, f or t h ose in t er est ed, RIP oper a t es on UDP por t n u mber 520 (por t n u mber s a r e discu ssed in t h e UDP sect ion ).

RIP Fiel d Descr ipt ion s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 103 Default Router and Gateways On a TCP/IP n et wor k, t h er e is a con cept

kn own a s t h e default route. Except f or pr opr iet a r y impl emen t a t ion s, t h is is n ot pa r t of a n y ot h er n et wor k pr ot ocol (XNS, Appl eTa l k, IPX, et c.). Th e def a u l t r ou t e ca n be ma in t a in ed in t wo pl a ces: t h e r ou t er a n d t h e en dst a t ion . For a n en dst a t ion t h a t does n ot su ppor t t h e a ct ive or pa ssive f u n ct ion s of t h e RIP pr ot ocol , t h er eby a l l owin g it t o f in d a r ou t e dyn a mica l l y, t h e def a u l t r ou t er (common l y ca l l ed a default gateway) is a ssign ed t o it . Th is is t h e 32-bit a ddr ess of t h e r ou t er t h e wor kst a t ion sh ou l d r ou t e t o if r emot e r ou t in g is n ecessa r y. Th e IP l a yer in t h e en dst a t ion wou l d det er min e t h a t t h e dest in a t ion n et wor k is n ot l oca l a n d t h a t t h e ser vices of a r ou t er mu st be u sed. In st ea d of impl emen t in g t h e RIP pr ot ocol , t h e en dst a t ion ma y su bmit t h e pa cket t o t h e def a u l t r ou t er a s a ssign ed by t h e def a u l t r ou t e n u mber . Th e r ou t er wil l t a ke ca r e of en su r in g t h e pa cket wil l r ea ch it s f in a l dest in a t ion . If t h a t r ou t er does n ot h a ve t h e best r ou t e, it wil l sen d a messa ge (u sin g t h e ICMP pr ot ocol ) t o t h e en dst a t ion t o in f or m it of a bet t er r ou t e. Th is wil l be expl a in ed l a t er . A r ou t er ma y a l so be a ssign ed a def a u l t r ou t e. It is in dica t ed a s 0.0.0.0 in it s r ou t in g t a bl e. Th er e is n o su bn et ma sk a ssocia t ed wit h it . Th is is impl emen t ed f or wh en a r ou t er r eceives a pa cket a n d does n ot h a ve t h e n et wor k n u mber in it s t a bl e. Th e r ou t er wil l f or wa r d t h e pa cket t o a n ot h er r ou t er f or wh ich it h a s a n a ssign ed def a u l t r ou t e. Th is mea n s t h a t wh en a r ou t er h a s r eceived a pa cket t o r ou t e, a n d it s t a bl e does n ot con t a in t h e n et wor k n u mber in dica t ed in t h e r eceived pa cket , it wil l f or wa r d t h e pa cket t o it s def a u l t r ou t er , h opin g t h a t t h e def a u l t r ou t er wil l h a ve t h e n et wor k n u mber in it s t a bl e a n d wil l be a bl e t o pr oper l y f or wa r d t h e pa cket . Th e def a u l t r ou t er wil l r eceive t h e pa cket a n d, if t h e n et wor k n u mber is in it s t a bl e, it wil l f or wa r d t h e pa cket . If t h e n et wor k n u mber is n ot in it s t a bl e wit h t h e best r ou t e, it , t oo, ma y h a ve a def a u l t r ou t er , a n d it wil l f or wa r d t h e pa cket t o t h a t r ou t er . If t h er e is n o r ou t e a n d t h er e is n ot a n ot h er def a u l t r ou t e, t h e l a st r ou t er wil l sen d a con t r ol messa ge (t h r ou gh ICMP) ba ck t o t h e or igin a t in g st a t ion in dica t in g it cou l d n ot f or wa r d t h e pa cket .

Th e pr obl em wit h def a u l t r ou t es in wor kst a t ion s is t h a t a wor kst a t ion ’s def a u l t r ou t er ma y go down a n d t h e wor kst a t ion wil l n ot kn ow if t h er e is a n ot h er r ou t er on t h e n et wor k. Th e n et wor k n u mber ma y ch a n ge or t h er e ma y be a bet t er pa t h f or t h e wor kst a t ion t o t a ke. Th e def a u l t ga t ewa y a l l ows f or t h e el imin a t ion of r ou t in g t a bl es in t h e n et wor k st a t ion a n d r ou t er s by a l l owin g gr ou ps of n et wor ks t o become a va il a bl e t h r ou gh t h e def a u l t r ou t e.

Def a u l t Rou t er a n d Ga t ewa ys

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 104 Disadvantages of the RIPv1 Protocol As n ot ed ea r l ier , t h e a ccept a n ce of RIP in t h e In t er n et

commu n it y wa s ba sed on it s impl emen t a t ion in t o t h e popu l a r Ber kel ey 4BSD Un ix oper a t in g syst em t h r ou gh a pr ocess kn own a s routed (Pr on ou n ced Rou t e - d, t wo wor ds). Un f or t u n a t el y, it wa s impl emen t ed bef or e t h e r a pid gr owt h of TCP/IP. RIP h a d ma n y disa dva n t a ges t h a t wer e n ot con sider ed l imit in g a t t h e t ime it beca me a ccept ed. Bef or e RIP wa s impl emen t ed, some r ou t er t a bl es h a d t o be con st r u ct ed ma n u a l l y. RIP a l l owed t h ese t a bl es t o be u pda t ed dyn a mica l l y, wh ich wa s a r ea l a dva n t a ge. Th e disa dva n t a ges f ol l ow. RIP, ba sed on a simpl e h op cou n t , u n der st a n ds on l y t h e sh or t est r ou t e t o a dest in a t ion , wh ich ma y n ot be t h e f a st est r ou t e. RIP u n der st a n ds on l y h op cou n t s. For exa mpl e, t h er e ma y be t wo pa t h s t o a dest in a t ion : on e t h a t t r a ver ses t wo T1 l in es (t h r ee h ops) a n d a n ot h er t h a t h a s t wo h ops, bu t is a 9600 ba u d ser ia l l in e. RIP wou l d pick t h e 9600 ba u d l in e, beca u se it s sh or t er (t wo h ops). Th er e a r e va r ia t ion s of RIP t h a t a l l ow t h e n et wor k a dmin ist r a t or t o a ssign a n a r bit r a r y RIP h op cou n t or cost t o a r ou t e t o disa l l ow f or t h is. Th is sol ves on e pr obl em, bu t cr ea t es a n ot h er . Th is in cr emen t ed RIP n u mber a dds t o t h e u pper l imit of a 15-h op dia met er in RIP, wh ich cr ea t es a n ot h er pr obl em. Th e n u mber of h ops t h a t a n et wor k ma y be dist a n ced f r om a n y n et wor k st a t ion is l imit ed t o 15—a h op cou n t of 16 is con sider ed u n r ea ch a bl e. If you a dd a ddit ion a l h ops t o a pa t h , you decr ea se t h e t ot a l n u mber of r ou t er s a l l owed in a pa t h .

Disadvant ag e s o f t he RIPv1 Pr o t o c o l • RIPv1 on l y u n der st a n ds t h e sh or t est r ou t e t o a dest in a t ion , ba sed on a simpl e cou n t of r ou t er h ops. • It depen ds on ot h er r ou t er s f or compu t ed r ou t in g u pda t es. • Rou t in g t a bl es ca n get l a r ge a n d t h ese a r e br oa dca st ed ever y 30 secon ds. • Dist a n ces a r e ba sed on h ops, n ot on r ea l cost s (su ch a s t h e speed of a l in k). • Pa t ch ed wit h spl it h or iz on , poison r ever se, h ol d-down t imer s, t r igger ed u pda t es. • It con t in u es t o be a r ou t er -t o-r ou t er con f igu r a t ion . On e r ou t er is f u l l y depen den t on t h e n ext r ou t er t o impl emen t t h e sa me opt ion s. • Fix on e pr obl em a n d ot h er s a ppea r .

Wit h RIP, r ou t in g t a bl e u pda t es a r e on l y a s a ccu r a t e a s t h e r ou t er t h a t su bmit t ed t h em. If a n y r ou t er ma de a compu t a t ion a l er r or in u pda t in g it s r ou t in g t a bl e, t h is er r or wil l be r eceived a n d pr ocessed by a l l ot h er r ou t er s. Wh a t ma y a l so be a ppa r en t is t h e f a ct t h a t t h e r ou t in g t a bl es cou l d get ver y l a r ge. If t h e n et wor k con sist ed of 300 dif f er en t n et wor ks (n ot u n common in l a r ger cor por a t ion s), ea ch r ou t in g t a bl e of ever y r ou t er wou l d h a ve 300 en t r ies. Sin ce RIP wor ks wit h UDP (con n ect ion l ess t r a n spor t -l a yer ser vice), t h e ma ximu m da t a gr a m siz e of a RIP pa cket is 512 byt es (576 byt es, in cl u din g a l l media h ea der s). Th is a l l ows f or a ma ximu m of 25 combin a t ion s in ea ch pa cket . Th er ef or e, it wou l d t a ke 13 pa cket s f r om ea ch r ou t er t o br oa dca st it s r ou t in g t a bl e t o a l l ot h er r ou t er s on a l l t h e l oca l n et wor ks in t h e in t er n et . Th is wou l d be br oa dca st ever y 30 secon ds by ea ch of t h e 300 r ou t er s. Al l t h is, a n d t h e possibil it y t h a t n ot h in g h a d ch a n ged f r om t h e pr eviou s u pda t e! Th is is a n u n n ecessa r y con su mpt ion of ba n dwidt h , especia l l y over sl ow-speed ser ia l l in es. Th is l ea ds t o t h e secon d disa dva n t a ge. RIPv1 n or ma l l y br oa dca st s (da t a l in k ph ysica l a ddr ess of a l l FFs) t o t h e n et wor k ever y 30 secon ds, even a cr oss sl ower -speed ser ia l l in ks. Th is ma kes t h e da t a l in k pa ss t h e pa cket u p t o t h e u pper -l a yer pr ot ocol s on a l l st a t ion s on t h e n et wor k, even if t h e st a t ion s do n ot su ppor t RIP. Ever y t ime we sol ved on e pr obl em, a n ot h er popped u p.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 105 Scaling with RIP Her e is wh er e RIP r ea l l y sh ows of f t h e l imit a t ion s. Tr y a n d bu il d a l a r ge n et wor k ba sed on RIP. RIP wa s design ed f or sma l l st a bl e n et wor ks. It st a t es t h is in t h e Xer ox docu men t a t ion . RIP does n ot h a n dl e gr owt h ver y wel l . Th is pr obl em is t wof ol d. Th e f ir st l imit a t ion is t h a t a dest in a t ion n et wor k ma y be n o mor e t h a n 15 h ops a wa y in dia met er (a dist a n ce of 16 in a n y r ou t in g t a bl e in dica t es t h e n et wor k is u n r ea ch a bl e). Ca r ef u l pl a n n in g is n eeded t o impl emen t l a r ge-sca l e n et wor ks ba sed on t h e RIP pr ot ocol . Th e ot h er sca l in g pr obl em is t h e pr opa ga t ion of r ou t in g in f or ma t ion . Fou r t er ms n eed t o be u n der st ood h er e, f or t h ey a r e u sed qu it e f r equ en t l y: split horizon, hold-down timer, poisoned reverse, a n d triggered updates. Ref er t o t h e sl ide. Wit h r ou t er A dir ect l y a t t a ch ed t o n et wor k z , it a dver t ises t h a t r ou t e t h r ou gh all it s por t s a s a dist a n ce of 1 (wh a t ever t h e RIP-a ssign ed cost of t h e por t t h a t a t t a ch es t o t h a t n et wor k is). Rou t er B r eceives t h is a n d u pda t es it s t a bl e a s n et wor k z 1 wit h a dist a n ce of 2. Rou t er B t h en br oa dca st s it s t a bl e (a t t h e 30-secon d u pda t e t imer ) a n d r ou t er C r eceives t h is a n d u pda t es it s t a bl e a s n et wor k n wit h a dist a n ce of 3. Not ice t h a t a l l r ou t er s br oa dca st a l l t h e in f or ma t ion in t h eir t a bl es t h r ou gh a l l por t s (even t h e por t s f r om wh ich t h ey r eceived t h e u pda t e). Wh y wou l d r ou t er B br oa dca st a r ea ch a bil it y of n et wor k z wh en r ou t er A a l r ea dy h a s a dir ect a t t a ch men t t o it ? Wou l dn ’t t h is con f u se r ou t er A if n et wor k z is l oca t ed? Nor ma l l y it wou l d, bu t r emember t h a t t h e on l y ch a n ges t h a t a r ou t er wil l ma ke t o it s t a bl es is wh en t h e h op-cou n t dist a n ce is l ower , is a n ew en t r y, or if t h e n ext h op r ou t er pa t h t a ken t o a n et wor k ch a n ges it s h op cou n t . Sin ce t h a t h op cou n t is h igh er , r ou t er A wil l simpl y ign or e t h a t pa r t icu l a r en t r y in t h e u pda t e t a bl e. Usin g t h e or igin a l a l gor it h m, a ser iou s pr obl em occu r s wh en r ou t er A l oses it r ea ch a bil it y t o n et wor k z . It wil l u pda t e it s t a bl e en t r y f or t h a t n et wor k wit h a dist a n ce of 16 (16 in dica t es n ot r ea ch a bl e), bu t wil l wa it t o br oa dca st t h is in f or ma t ion

u n t il t h e n ext sch edu l ed RIP u pda t e. So f a r , so good, bu t if r ou t er B br oa dca st s it s r ou t in g t a bl e bef or e r ou t er A (n ot ice t h a t n ot a l l r ou t er s br oa dca st t h eir t a bl es a t t h e sa me t ime), r ou t er A wil l t h en see t h a t r ou t er B h a s a sh or t er pa t h t o n et wor k z t h a n it does (a dist a n ce of 2 f or r ou t er B ver su s a dist a n ce of 16 f or r ou t er A). Rou t er A wil l ch a n ge it s en t r y f or n et wor k z . Now, r ou t er A, on it s n ext RIP u pda t e br oa dca st , wil l a n n ou n ce t h a t it h a s a pa t h t o n et wor k z wit h a dist a n ce of 3 (2 f r om t h e t a bl e en t r y r eceived f r om r ou t er B pl u s 1 t o r ea ch r ou t er B). Th er e is n ow a l oop bet ween r ou t er s A a n d B. A pa cket dest in ed f or n et wor k z wil l be pa ssed bet ween r ou t er s A a n d B u n t il t h e TTL cou n t er is 0. Wh en r ou t er B r eceives a pa cket dest in ed f or n et wor k z , it wil l f or wa r d t h e pa cket t o r ou t er A; r ou t er A wil l f or wa r d it ba ck t o r ou t er B; a n d t h is wil l con t in u e u n t il t h e TTL f iel d r ea ch es 0. Th is is kn own a s looping. Th e RIP pr ot ocol wor ks ext r emel y wel l in a st a bl e en vir on men t (a n en vir on men t wh er e r ou t er s a n d t h eir n et wor ks r a r el y ch a n ge). Th e pr ocess of cl ea r in g ou t dea d r ou t es a n d pr ovidin g a l t er n a t e pa t h s is kn own a s convergence.

Sca l in g wit h RIP Even f u t u r e RIP u pda t es wil l n ot qu ickl y f ix t h e con ver gen ce in t h is ca se. Ea ch u pda t e (ever y 30-secon d def a u l t ) wil l a dd 1 t o t h e t a bl e en t r y, a n d it wil l t a ke a f ew u pda t es t o ou t da t e t h e en t r y in t h ese r ou t er s. Th is is kn own a s slow convergence, a n d it ca u ses er r or s in r ou t in g t a bl es a n d r ou t in g l oops t o occu r . Wh a t if you h a d a n et wor k dia met er of 15 r ou t er s a n d ea ch wa s exa ct l y opposit e on t h e t imer t o br oa dca st it s u pda t e? In ot h er wor ds, wh en on e r ou t er br oa dca st s it s t a bl e, t h e r eceivin g r ou t er ju st f in ish ed it s br oa dca st . Th e l ost r ou t e cou l d t a ke ma n y min u t es t o u pda t e t h ose r ou t er s a t t h e en d of t h e n et wor k.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 106 Routers and Subnet Masks Fr om t h e pr eviou s discu ssion on ch oosin g a su bn et

ma sk, a r ou t in g pr ot ocol kn own a s RIP ver sion 1, or RIP1, r equ ir es t h a t a su bn et ma sk be u n if or m a cr oss a n en t ir e n et wor k ID. An a ddr ess a ssign men t of 150.1.0.0 mu st con t a in on e n et wor k ma sk. Th e f a u l t h er e is t h e in a bil it y of RIP1 t o su ppl y a su bn et ma sk en t r y in it s r ou t in g u pda t es t o be con su med by ot h er r ou t er s. Th er ef or e, RIP1 is f or ced t o ma ke a ssu mpt ion s. It a ssu mes t h a t t h e ma sk is t h e sa me f or t h e l ea r n ed su bn et of t h e sa me n et wor k ID a s it s con f igu r ed por t s. Th is mea n s t h a t if a su bn et r ou t e is l ea r n ed on a por t t h a t h a s t h e sa me n et wor k ID a s t h e por t , RIP wil l a ppl y t h e a ssign ed ma sk t o t h a t l ea r n ed r ou t e a s t h e por t . If t h e l ea r n ed su bn et r ou t e h a s a dif f er en t n et wor k ID t h a n t h e por t it l ea r n ed t h e su bn et r ou t e f r om, it a ssu mes t h e l ea r n ed su bn et r ou t e is n ot su bn et t ed a n d f a l l s ba ck t o a ppl yin g t h e n a t u r a l ma sk f or t h a t cl a ss. Her e’s a n exa mpl e: A r ou t er h a s t wo por t s. Por t 1 is a ssign ed a n a ddr ess of 150.1.1.1 wit h a su bn et ma sk of 255.255.255.0. Por t 2 h a s a n a ddr ess of 160.1.1.1 wit h a su bn et ma sk of 255.255.255.0. If t h e r ou t er l ea r n s of a r ou t e 150.1.3.0, t h en it wil l a ppl y t h e 24-bit su bn et ma sk beca u se it h a s t h e sa me n et wor k ID a s it s por t . However , if t h e r ou t er l ea r n s a su bn et r ou t e of 175.1.6.0, t h is n et wor k ID is n ot on eit h er on e of it s por t s a n d it wil l a ppl y a n a t u r a l su bn et ma sk of 255.255.0.0 t o t h a t a ddr ess bef or e u pda t in g it s t a bl e. Th a t is f or l ea r n ed r ou t es. How a bou t r ou t in g u pda t es? Wh en does a r ou t er a ppl y t h e su bn et ma sk t o a r ou t e a n d t h en in cl u de it in t h e r ou t in g u pda t e? Th e sa me r u l e a ppl ies. Usin g t h e n et wor k n u mber s f r om t h e pr ecedin g exa mpl e, wh en t h e r ou t er wou l d l ike t o br oa dca st it s t a bl e, it wil l a ppl y t h e su bn et ma sk of 255.255.255.0 t o t h e l ea r n ed r ou t e of 150.1.3.0 wh en it sen ds it s u pda t e ou t Por t 1. However , it wil l sen d t h e a ddr ess of 150.1.0.0 wh en sen din g t h e u pda t e ou t Por t 2. Por t 2 h a s a dif f er en t n et wor k ID a ssocia t ed wit h t h a t por t a n d, t h er ef or e, t h e n a t u r a l ma sk is a ppl ied bef or e sen din g ou t t h e t a bl e. Th is is wh y RIP1 su ppor t s on l y on e su bn et ma sk f or n et wor k ID.

Th e n ext sect ion gives mor e exa mpl es of a ddr ess a ssign men t a n d Va r ia bl e-Len gt h Su bn et Ma sks (VLSM).

Rou t er s a n d Su bn et Ma sks

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 107 RIP Fixes RIP Fixe s • Spl it Hor iz on —Ru l e st a t es t h a t a r ou t er wil l n ot r ebr oa dca st a l ea r n ed r ou t e ba ck over t h e in t er f a ce f r om wh ich t h e r ou t e wa s l ea r n ed. • Hol d-Down Timer —Ru l e st a t es t h a t wh en a r ou t er r eceives in f or ma t ion a bou t a n et wor k t h a t is u n r ea ch a bl e, t h e r ou t er mu st ign or e a l l su bsequ en t in f or ma t ion a bou t t h a t n et wor k f or a con f igu r a bl e a mou n t of t ime. • Poison ed Rever se a n d t r igger ed u pda t es—Ru l e st a t es t h a t a r ou t er is a l l owed t o r ebr oa dca st a l ea r n ed r ou t e over t h e in t er f a ce f r om wh ich it l ea r n ed it , bu t t h e met r ic is set t o 16. A t r igger ed u pda t e a l l ows a r ou t er t o br oa dca st it s t a bl e wh en a n et wor k is f ou n d t o be down .

To over come t h e l imit a t ion s, a f ew r u l es wer e a dded t o t h e IP RIP a l gor it h m: Spl it ho r izo n. Impl emen t ed by ever y pr ot ocol t h a t u ses a va r ia t ion of RIP (Appl eTa l k, IPX, XNS, a n d IP), t h is st a t es t h a t a r ou t er wil l n ot br oa dca st a l ea r n ed r ou t e ba ck t h r ou gh a por t f r om wh ich it wa s r eceived. Th er ef or e, r ou t er B wil l n ot br oa dca st t h e en t r y of n et wor k z ba ck t o r ou t er A. Th is keeps r ou t er B f r om br oa dca st in g t h e r ea ch a bil it y of n et wor k z ba ck t o r ou t er A, t h er eby el imin a t in g t h e possibil it y of a l ower h op cou n t bein g in t r odu ced wh en n et wor k z becomes disa bl ed. Th e en t r y in r ou t er B’s u pda t e t o r ou t er A wou l d n ot in cl u de a n en t r y f or n et wor k z . Ho l d-do wn t ime r . Th is r u l e st a t es t h a t on ce a r ou t er r eceives in f or ma t ion a bou t a n et wor k t h a t cl a ims a kn own n et wor k is u n r ea ch a bl e, it mu st ign or e a l l f u t u r e u pda t es t h a t in cl u de a n en t r y (a pa t h ) t o t h a t n et wor k (t ypica l l y, f or 60 secon ds). Not a l l ven dor s su ppor t t h is in t h eir r ou t er s. If on e ven dor does su ppor t it a n d a n ot h er does n ot , r ou t in g l oops ma y occu r .

Po iso n r e ve r se and t r ig g e r e d updat e s. Th ese a r e t h e l a st t wo r u l es t h a t h el p t o el imin a t e t h e sl ow con ver gen ce pr obl em. Th ey st a t e t h a t on ce t h e r ou t er det ect s a disa bl ed n et wor k con n ect ion , t h e r ou t er sh ou l d keep t h e pr esen t en t r y in it s r ou t in g t a bl e a n d t h en br oa dca st “n et wor k u n r ea ch a bl e” (met r ic of 16) in it s u pda t es. Th ese r u l es become ef f icien t wh en a l l r ou t er s in t h e in t er n et pa r t icipa t e u sin g triggered updates, wh ich a l l ow a r ou t er t o br oa dca st it s r ou t in g t a bl e immedia t el y f ol l owin g r eceipt of t h is “n et wor k down ” in f or ma t ion . Th e t wo most common a r e split horizon a n d poison reverse.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 108 Split Horizon Demonstrated In t h e sl ide, t h er e a r e t h r ee r ou t er s, l a bel ed A, B, C, a n d f ou r

su bn et s, l a bel ed W, X, Y, Z. Upon st a r t u p, t h e r ou t er s l ea r n of t h eir immedia t e su bn et s. Rou t er A l ea r n s a bou t su bn et s Y a n d Z. Rou t er B l ea r n s a bou t su bn et s X a n d Y. Rou t er C l ea r n s a bou t su bn et s W a n d X. Th e r ou t er s ma y or ma y n ot a u t oma t ica l l y br oa dca st t h eir t a bl es ou t a f t er in it ia l iz a t ion (t h is is ven der in depen den t ). Rou t er C t r a n smit s it s t a bl e con t a in in g su bn et s W a n d X. It wil l t r a n smit t h is in f or ma t ion ou t t h e por t s con n ect in g t o su bn et s W a n d X. Rou t er B wil l t r a n smit it s t a bl e con t a in in g su bn et X a n d Y ou t bot h of it s por t s, a n d r ou t er A wil l t r a n smit it s t a bl e con t a in in g su bn et s Y a n d Z ou t bot h of it s por t s. Al l of t h e cost s in t h ese t a bl es a r e set t o 1. So f a r , so good. Rou t er C picks u p t h e in f or ma t ion t h a t r ou t er B t r a n smit t ed ou t a n d ma kes some decision s. It wil l a dd t o ea ch en t r y t h e cost a ssocia t ed wit h t h e por t on wh ich it r eceived t h e in f or ma t ion . In t h is ca se, t h a t por t wa s a ssign ed a cost of 1. Th er ef or e, it n ow h a s t wo en t r ies in t h e r eceived t a bl e, ea ch wit h a cost of 2. It t h en compa r es it t o it s t a bl e. It a l r ea dy h a s a en t r y f or su bn et X a n d it h a s a cost of 1, so it disca r ds t h a t in f or ma t ion . Th e n ext en t r y is f or su bn et Y wit h a cost of 2. It does n ot h a ve t h a t en t r y, so it wil l a dd t h is en t r y t o it s t a bl e wit h a cost of 2. Rou t er C f igu r es it is n ow compl et e. Even t u a l l y, r ou t er C wil l u pda t e it s t a bl e wit h t h e en t r y f or su bn et Z (pr opa ga t ed by r ou t er B a f t er r ou t er B r eceived t h is in f or ma t ion ). Rou t er C n ow h a s t h e en t r ies in it s t a bl e of su bn et Z, cost 3; su bn et Y, cost 2; su bn et X, cost 1; a n d su bn et W, cost 1).

Spl it Hor iz on Demon st r a t ed Th e per iodic t imer h a s expir ed (ever y 30 secon ds) a n d r ou t er C is r ea dy t o br oa dca st it s t a bl e. Ou t t h e por t a ssocia t ed wit h su bn et W, it wil l l ist t h e en t r ies f or su bn et s W, X, Y, a n d Z. However , on t h e por t a ssocia t ed wit h su bn et X, it wil l on l y in cl u de t h ose

en t r ies f or su bn et X (some r ou t er s do n ot in cl u de t h is en t r y if t h ey kn ow of a n ot h er r ou t er on t h is segmen t ) a n d su bn et W. It wil l n ot in cl u de t h e en t r ies f or su bn et s Y a n d Z. Th is is kn own a s spilt horizon. Th e r u l e f or spl it h or iz on is n ot t o r ebr oa dca st a kn own r ou t e ba ck over t h e por t t h a t t h e r ou t er l ea r n ed it on . Poisoned reverse a l l ows f or t h e n et wor k n u mber t o be r ebr oa dca st ou t , bu t it wil l in cl u de a 16 in t h e h op cou n t so n o ot h er r ou t er ca n u pda t e it s t a bl es. Th is is u sed t o a void r ou t in g l oops in oddl y l ooped n et wor ks.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 109 RIP Version 2 In November , 1994, RIP wa s modif ied wit h some a ddit ion s (ext en sion s) t o over come some of it s sh or t comin gs. RIP ver sion 1 con t in u es t o exist on ma n y r ou t er s a n d a s of t h is wr it in g, con t in u es t o ou t n u mber OSPF n et wor ks. However , t h er e is n o r ea son n ot t o impl emen t ver sion 2 of t h e pr ot ocol . Ver sion 2 is ba ckwa r d compa t ibl e wit h ver sion 1 a n d con t a in s a l l of t h e ca pa bil it ies of t h e ver sion 1 pr ot ocol . RIP ver sion 2 impl emen t ed t h e f ol l owin g f ea t u r es: • Au t h en t ica t ion —simpl e t ext pa sswor d • Su bn et ma skin g • Next h ost • Mu l t ica st —t o a l l ow f or va r ia bl e-l en gt h su bn et ma sks t o be impl emen t ed • Rou t e t a g—t o pr ovide a met h od of sepa r a t in g RIP r ou t es f r om ext er n a l l y l ea r n ed r ou t es • Compa t ibil it y swit ch —t o a l l ow f or in t er oper a bil it y wit h ver sion 1 r ou t er s Not ice t h a t t h e sa me f or ma t is u sed f or RIPv1 a n d RIPv2. Appa r en t l y, t h er e wa s some t h ou gh t wh en bu il din g RIPv1 t h a t f u t u r e pr ot ocol s of RIP ma y be dif f er en t a n d t h a t mor e in f or ma t ion is t o be ca r r ied in t h e pa cket . Th e or igin a l pa cket in dica t ed t h a t t h e f iel d mu st be set t o 0, a n d n ot r eser ved. Now you ca n see wh y. If n ot , we wil l r evisit t h is in t h e su bn et ma sk t opic of t h is sect ion .

RIP Ver sion 2

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 110 Authentication Th er e r ea l l y is n ot

r oom in t h e RIP u pda t e da t a gr a m f or a u t h en t ica t ion . Bu t sin ce t h is h a s become common pl a ce (OSPF), r oom wa s ma de f or it . Th e a ddr ess f a mil y iden t if ier (AFI) is u sed f or a u t h en t ica t ion . If t h e AFI con t a in s a 0xFFFF, t h en t h e f ir st en t r y in t h e r ou t e en t r y l ist is t h e pa sswor d t o be u sed f or a u t h en t ica t ion . Th e h ea der of t h e RIP da t a gr a m ch a n ges a s sh own in t h e sl ide. Th e a u t h en t ica t ion t ype is t ype 2 (simpl e pa sswor d) a n d t h e n ext 16 byt es con t a in t h is pa sswor d (a n y a mou n t of ch a r a ct er s u p t o 16 byt es). RIPv1 wil l ign or e t h is en t r y (t h e f ir st en t r y), f or t h e AFI is n ot set t o a n a ddr ess f a mil y of IP. If a RIPv2 r ou t er is con f igu r ed wit h n o a u t h en t ica t ion , it wil l a ccept a n d pr ocess bot h RIPv1 a n d v2 u n a u t h en t ica t ed messa ges a n d disca r d a u t h en t ica t ed messa ges.. If t h e RIPv2 r ou t er is con f igu r ed f or a u t h en t ica t ion , it wil l a ccept RIPv1 a n d v2 messa ges t h a t pa ss a u t h en t ica t ion . Remember , n ot a l l v1 impl emen t a t ion s f ol l ow t h e RFC. Th ey ma y pl a y wit h t h e f iel ds a n d st il l be a bl e t o be pr ocessed by RIPv1 r ou t er s! Th is is n ot r ecommen ded. Un a u t h en t ica t ed RIPv2 messa ges wil l be disca r ded.

Au t h en t ica t ion

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 111 Subnet Mask Field Th is is wh a t

is ma kin g RIP st ick a r ou n d a l it t l e l on ger . Yes, it st il l h a s pr obl ems wit h sca l in g a n d st il l n eeds spl it h or iz on a n d poison ed r ever se t o oper a t e pr oper l y. Bu t t o u se t h e a ddr ess sch eme mor e ef f icien t l y, RIP ver sion 2 n ow h a s t h e a bil it y t o su ppor t mu l t ipl e su bn et ma sks per n et wor k a ddr ess. As we l ea r n ed in ot h er sect ion s of t h is book, on e of t h e biggest pr obl ems wit h RIP wa s it s in a bil it y t o su ppor t a su bn et ma sk in t h e r ou t in g u pda t e. Th is l ed t o t h e sh or t comin g of on e su bn et ma sk per n et wor k ID. Su bn et ma skin g r ea l l y ext en ds t h e l if e of RIP. RIP v1 does n ot in dica t e a su bn et ma sk on a r ou t e en t r y. Th is ca n cr ea t e ma n y pr obl ems, t wo of wh ich a r e l ea r n in g a n d u pda t in g. How does RIPv1 kn ow h ow t o a ppl y a su bn et ma sk f or a l ea r n ed IP a ddr ess? How does RIP pr ovide a ma sk f or it s u pda t es? Good qu est ion s! Th e a n swer is n ot r ea l good t h ou gh . RIP a ssu med t h a t t h e IP a ddr ess u ses t h e sa me su bn et ma sk a s it does pr ovidin g t h e IP n et wor k ID por t ion of t h e a ddr ess is t h e sa me a s it s own a n d t h er e is a su bn et ma sk a ppl ied t o it s in t er f a ce. For exa mpl e, a r ou t er h a s t wo in t er f a ces: In t er f a ce 1 h a s a n IP a ddr ess of 130.1.1.1 a n d a su bn et ma sk of 255.255.255.0. In t er f a ce 2 h a s a n IP a ddr ess of 205.1.1.1 a n d a su bn et ma sk of 255.255.255.0. Wh en in t er f a ce 1 r eceives a r ou t in g u pda t e, a n y en t r y t h a t h a s t h e sa me n et wor k ID a s it s own , 130.1.x.x, wil l a ppl y t h e su bn et ma sk t h a t is con f igu r ed t o it s por t t o t h ose en t r ies. You wil l see a n en t r y in t h e r ou t in g t a bl e f or t h a t l ea r n ed a ddr ess. So, if a RIPv1 u pda t e wa s r eceived on in t er f a ce 1 a n d t h e u pda t e con t a in ed t h e en t r y 130.1.4.0, t h en t h e in t er f a ce wil l r ecor d 130.1.4.0 in it s r ou t in g t a bl e. However , if in t er f a ce 1 r eceived 155.1.1.0 on t h a t in t er f a ce, it wou l d on l y pl a ce 155.1.0.0 in t o it s t a bl e beca u se it does n ot kn ow t h e su bn et ma sk f or t h e a ddr ess of 155.1.0.0. You mu st be sa f e wh en you a ssu me.

Su bn et Ma sk Fiel d Wh en t h e r ou t er mu st t r a n smit it s t a bl e, h ow does it kn ow t o a ppl y a ma sk t o a n y of t h e en t r ies in t h e t a bl e? It wil l depen d on t h e in t er f a ce f r om wh ich it is t r a n smit t ed. On in t er f a ce 1, t h e r ou t er wil l t r a n smit t wo en t r ies: 150.1.1.0 a n d 200.1.1.0. So, RIPv1 a n d su bn et ma sks did n ot u n der st a n d ea ch ot h er . RIPv2 f ixes t h a t . Not ice in t h e sl ide t h a t t h e f or ma t of t h e RIP da t a gr a m is pr eser ved. Th e t wo f iel ds in RIPv1 t h a t st a t ed “mu st be 0” a r e n ot u sed f or t h e su bn et ma sk a n d n ext -h op en t r ies. Ea ch r ou t e en t r y in t h e da t a gr a m wil l h a ve a n a ssocia t ed su bn et ma sk wit h it . If t h e f iel d con t a in s a 0, t h er e is n ot a su bn et ma sk a ssocia t ed f or t h e r ou t e en t r y. Al so, in coor din a t ion wit h RIPv1 r ou t er s, a ma sk t h a t is sh or t er t h a n t h e Cl a ss’s n a t u r a l ma sk sh ou l d n ever be a dver t ised.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 112 Route Tag and Next-Hop Fields Th e r ou t e t a g en t r y is u sed t o a dver t ise r ou t es t h a t wer e l ea r n ed ext er n a l l y (n ot in t h is IGP). OSPF h a s t h is ca pa bil it y a n d a l l ows t h e OSPF IGP t o l ea r n a bou t r ou t es ext er n a l t o t h e IGP. For exa mpl e, if t h e r ou t es wer e l ea r n ed via BGP-4 ( a r ou t in g pr ot ocol u sed bet ween a u t on omou s syst ems), t h e r ou t e t a g en t r y cou l d be u sed f or set t in g t h e a u t on omou s syst em f r om wh ich t h e r ou t es wer e l ea r n ed. Th e n ext -h op f iel d a l l ows t h e r ou t er t o l ea r n wh er e t h e n ext h op is f or t h e specif ic r ou t e en t r y. If t h e en t r y is 0.0.0.0, t h en t h e sou r ce a ddr ess of t h e u pda t e sh ou l d be u sed f or t h e r ou t e. Over a poin t -t o-poin t l in k (t o r ou t er s con n ect ed by a ser ia l l in e) t h er e is n ot mu ch u se f or t h is en t r y (t h e n ext h op cou l d be ext r a ct ed f r om t h e sou r ce IP a ddr ess in t h e IP h ea der of t h e pa cket ). Th is f iel d does h a ve con sider a bl e u se in in st a n ces wh er e t h er e a r e mu l t ipl e r ou t er s on a sin gl e LAN segmen t u sin g dif f er en t IGPs t o commu n ica t e t o mu l t ipl e LANs.

Rou t e Ta g a n d Next -Hop Fiel ds

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 113 Multicast Support A key impr ovemen t

f or t h e RIP pr ot ocol is t h e a bil it y t o u se a mu l t ica st a ddr ess f or it s pa cket s a n d f or it s da t a gr a m IP h ea der . Th e mu l t ica st a ddr ess f or RIPv2 is 224.0.0.9 wit h a MAC a ddr ess of 01-00-5E-00-00-09. Of cou r se, t h is mu st be ma pped t o a n Et h er n et mu l t ica st a ddr ess (f or mor e in f or ma t ion on t h is, pl ea se r ef er t o Pa r t Six, BOOTP, DHCP, RSVP, a n d SNMP in t h is book, or RFC 1700). Mul t ic ast Suppo r t • RIPv2 u ses t h e mu l t ica st a ddr ess of 224.0.0.9 t o mu l t ica st , does n ot br oa dca st it s t a bl e. • MAC a ddr ess of 01-00-5E-00-00-09. • Det a il s of t h is con ver sion a r e cover ed in RFC 1700 a n d t h e mu l t ica st sect ion of t h is book. • RIPv1 u ses a br oa dca st a ddr ess in bot h t h e IP h ea der a n d t h e MAC h ea der . • IGMP is n ot u sed f or t h is mu l t ica st su ppor t .

If you r ea d t h e sect ion on mu l t ica st in g, you kn ow t h a t t h e ben ef it s of mu l t ica st a r e gr ea t . RIPv1 u ses a br oa dca st a ddr ess t h a t n ot on l y in t er r u pt s t h e NIC bu t t h e IP ser vice l a yer a s wel l , even if t h e pa cket is n ot dest in ed f or t h a t h ost . Wh y in t er r u pt t h e h ost wh en t h e pa cket /da t a gr a m is dest in ed f or some ot h er h ost ? Al l br oa dca st pa cket s mu st be r eceived a n d pr ocessed. Not a pr obl em wh en RIPv1 wa s in t r odu ced t o t h e IP commu n it y (t h er e wer e n ot ma n y h ost s t o con t en d wit h ). Mu l t ica st a l l ows on l y t h ose h ost s t h a t h a ve specif ied t h eir NICs t o r eceive a n d pr ocess mu l t ica st pa cket s. Al l ot h er mu l t ica st pa cket s wil l be ign or ed. Even t h ou gh mu l t ica st is u sed, it is n ot IGMP (In t er n et Gr ou p Ma n a gemen t Pr ot ocol ) a n d is n ot t o be u sed f or t h e a ddr ess in a l oca l mu l t ica st a ddr ess. Th is mea n s t h e pa cket

wil l n ever l ea ve t h e n et wor k it wa s t r a n smit t ed on (i.e., it wil l n ot be f or wa r ded by r ou t er s).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 114 RIPv2 Compatibility with RIPv1 RIPv2 Co mpat ibil it y wit h RIPv1 • Con f igu r a t ion pa r a met er s on t h e r ou t er f or : • RIPv1 on l y—Ver sion 1 messa ges wil l be sen t • RIPv1 compa t ibil it y—RIP 2 messa ges a s br oa dca st • RIPv2—Messa ges a r e mu l t ica st • Non e—No RIP messa ges a r e sen t

So, if a l l

of t h ese n ew “f ea t u r es” a r e u sed, h ow do we commu n ica t e wit h ver sion 1 RIP r ou t er s? Th er e a r e t wo sides t o t h is st or y. Some simpl e r u l es a ppl y: • If a RIPv2 r ou t er r eceives a RIPv1 u pda t e, it wil l pr ocess it a s a v1 u pda t e a n d does n ot t r y t o con ver t a n y of t h e in f or ma t ion r eceived in t o RIP f ea t u r es. • If a RIPv1 r equ est is r eceived by a RIPv2, t h e RIPv2 r ou t er sh ou l d r espon d wit h a ver sion 1 r espon se. Now, t h er e a r e ma n y ch a n ges (mu l t ica st , br oa dca st , et c.) t o wh ich a v2 r ou t er cou l d r espon d. Th er ef or e, du r in g t h e con f igu r a t ion of a v2 r ou t er , t h er e wil l be con f igu r a t ion pa r a met er s t h a t a l l ow f or t h e v2 r ou t er t o a ct in ma n y dif f er en t wa ys: • RIP-1—on l y ver sion 1 messa ges wil l be sen t • RIP-1 compa t ibil it y—RIP 2 messa ges a r e sen t wit h br oa dca st a ddr esses (IP h ea der a n d MAC) • RIP-2—messa ges a r e mu l t ica st • Non e—n o RIP messa ges a r e sen t Al t h ou gh n ot r equ ir ed, some r ou t er s h a ve impl emen t ed a r eceive pa r a met er l ist in g wh ich a l l ows f or RIP-1 on l y, RIP-2 on l y, or bot h .

Al so, f or compa t ibil it y, RFC 1058 st a t ed t h a t t h e ver sion f iel d sh ou l d be u sed in t h e f ol l owin g f or ma t : • An y ver sion f iel d of 0—disca r d t h e en t ir e pa cket . • An y ver sion f iel d of 1 a n d MBZ f iel ds t h a t a r e n ot 0 a r e disca r ded. • An y ver sion gr ea t er t h a n 1 sh ou l d n ot be disca r ded simpl y beca u se t h e MBZ f iel ds con t a in s a va l u e ot h er t h a n 0. Th er ef or e, r ou t er s t h a t st r ict l y a dh er e t o RFC 1058 ma y be a bl e t o pr ocess RIPv2 u pda t es a n d bu il d r ou t in g t a bl es ba sed on t h a t in f or ma t ion . RIPv1 r ou t er s wil l ign or e t h e su bn et ma sk a n d n ext -h op f iel d. Th ey wil l a l so ign or e t h e r ou t e t a g f iel d (it is a r eser ved f iel d in RIPv1). RIPv1 wil l ign or e a n y AFI t h a t is set t o FFFF (f or RIPv2 a u t h en t ica t ion ) a n d t h e r ou t e t h a t a ppl ies t o t h e AFI. (For RIPv2, it wil l be t h e f ir st en t r y of a RIPv2 da t a gr a m. Al l ot h er en t r ies wil l be va l id RIP r ou t e en t r ies).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 115 Open Shortest Path First (OSPF, RFC 2178) Ope n Sho r t e st Pat h Fir st (OSPF, RFC 2178) • Sh or t est -pa t h r ou t es ba sed on t r u e met r ics, n ot ju st a h op cou n t . • Compu t es t h e r ou t es on l y wh en t r igger ed t o or ever y 30 min u t es (wh ich ever is l ess). • Pa ir s a n et wor k a ddr ess en t r y wit h a su bn et ma sk. • Al l ows f or r ou t in g a cr oss equ a l pa t h s. • Su ppor t s ToS. • Per mit s t h e in ject ion of ext er n a l r ou t es (ot h er ASs). • Au t h en t ica t es r ou t e exch a n ges. • Qu ick con ver gen ce. • Dir ect su ppor t f or mu l t ica st in bot h t h e IP h ea der a n d t h e MAC h ea der .

Th e ma jor

sh or t comin gs of t h e RIP pr ot ocol a r e:

• Th e ma ximu m dist a n ce bet ween t wo st a t ion s (t h e met r ic, mea su r ed in r ou t er h ops) is 15 h ops. A dest in a t ion (n et wor k ID) wh ose h op cou n t is 16 is con sider ed u n r ea ch a bl e. • Th e cost t o a dest in a t ion n et wor k is mea su r ed in h ops. RIP det er min es a r ou t e ba sed on a h op cou n t t h a t does n ot t a ke in t o con sider a t ion a n y ot h er mea su r emen t s except f or t h e n u mber of r ou t er s bet ween t h e sou r ce a n d dest in a t ion n et wor ks. A t wo-h op h igh -speed n et wor k wil l be bypa ssed f or a on eh op l ow-speed l in k. A r ou t er ca n be t r icked in t o t a kin g a bet t er pa t h by a dju st in g t h e h op-cou n t met r ic on t h e r ou t er por t , bu t t h is r edu ces t h e a va il a bl e dia met er . • RIP u pda t es it en t ir e t a bl e on a per iodic ba sis con su min g ba n dwidt h u sin g t h e br oa dca st a ddr ess. (RIPv1; RIPv2 u ses mu l t ica st or br oa dca st ). • RIP sen ds it s u pda t e in a 576-byt e da t a gr a m. If t h er e a r e mor e en t r ies t h a n 512 byt es, mu l t ipl e da t a gr a ms mu st be sen t . For exa mpl e, 300 en t r ies r equ ir e 12 ba ck-

t o-ba ck 512-byt e da t a gr a ms. • RIP su f f er s f r om sl ow con ver gen ce. In t h e wor se ca se, a RIP u pda t e ca n t a ke over 15 min u t es en d t o en d. Th is ca n ca u se bl a ckh ol es, l oops, et c. • RIPv1 does n ot su ppor t VLSM. Th e f ir st sh or t est -pa t h -f ir st r ou t in g pr ot ocol wa s devel oped a n d u sed in t h e ARPAn et pa cket swit ch in g n et wor k a l l t h e wa y ba ck in 1978. Th is r esea r ch wor k wa s devel oped a n d u sed in ma n y ot h er r ou t in g pr ot ocol t ypes a n d pr ot ot ypes. On e of t h ose is OSPF. OSPF Fe at ur e s • Sh or t est -pa t h r ou t es a r e ba sed on t r u e met r ics, n ot ju st a h op cou n t . • Th e r ou t in g t a bl es a r e u pda t ed on l y wh en n eeded, or ever y 30 min u t es u sin g a mu l t ica st a ddr ess. • A n et wor k a ddr ess en t r y is pa ir ed wit h a su bn et ma sk. • Rou t in g a cr oss equ a l pa t h s is a l l owed, per f or min g l oa d ba l a n cin g. • Type of Ser vice (ToS) r ou t in g is su ppor t ed. • Th e in ject ion of ext er n a l r ou t es is per mit t ed (r ou t es f r om ot h er a u t on omou s syst ems). • Rou t e exch a n ges a r e a u t h en t ica t ed. • Qu ick con ver gen ce is r ea l iz ed. • Mu l t ica st is dir ect l y su ppor t ed.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 116 An OSPF Network Th e f ol l owin g dia gr a m is a pict u r e on OSPF t opol ogy. OSPF in t r odu ces ma n y n ew con cept s. OSPF h a s a r ea s, a n d r u n s met r ics ba sed on t r u e cost s. OSPF does n ot br oa dca st it s t a bl e ou t ; on l y l in k in f or ma t ion is sen t t o a specif ic r ou t er . Th e met r ics a ssign ed a r e ba sed on a n u mber set by t h e n et wor k a dmin ist r a t or . It sh ou l d be ba sed on t h e speed of t h e l in e—a l ower cost f or h igh er -speed l in es. For exa mpl e, if wor kst a t ion A wa n t s t o con ver se wit h wor kst a t ion Z, OSPF wil l pr odu ce a r ou t in g t a bl e t h a t r ou t es t h e da t a gr a m over t h e t wo T1 l in es in st ea d of t h e 56k l in e. Th e n a me f or t h is r ou t in g pr ot ocol is el u sive. Sh or t est pa t h f ir st ? Sh ou l dn ’t a n y r ou t in g pr ot ocol t r y t h e sh or t est pa t h f ir st ? Th is pr ot ocol evol ved a f t er ma n y yea r s of r esea r ch on t h e In t er n et a n d wa s t h e a ggr ega t e of ma n y r ou t in g pr ot ocol s. It wa s a Xer ox Net wor k Syst ems pr ot ocol a n d wa s widel y dist r ibu t ed t h r ou gh t h e Ber kel ey Un ix syst em. RIP wa s n ot in ven t ed on t h e In t er n et ; h owever , OSPF wa s.

An OSPF Net wor k

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 117 A Routing Protocol Comparison Wh en r ea din g t h r ou gh t h e f ol l owin g sect ion s on t h e OSPF pr ot ocol , keep on e ma in goa l in min d: n et wor k design . OSPF a l l ows u s t o bu il d ver y ef f icien t n et wor ks t h r ou gh segmen t in g of a n a u t on omou s syst em in t o sma l l gr ou ps ca l l ed areas, va r ia bl e-l en gt h su bn et ma sks, Type of Ser vice r ou t in g, a n d a h ost of ot h er bet t er men t s compa r ed t o t h e RIP pr ot ocol . It wa s men t ion ed a t t h e begin n in g of t h is sect ion t h a t t h er e a r e t wo t ypes of r ou t in g met h ods: IGP a n d EGP. Th e t a bl e compa r es RIP wit h OSPF. Func t io n/Fe at ur e St a n da r d n u mber Lin k-st a t e pr ot ocol La r ge r a n ge of met r ics Upda t e pol icy

Upda t e a ddr ess Dea d in t er va l

RIPv1 RFC 1058 No Hop cou n t (16=In f in it y) Rou t e t a bl e ever y 30 secon ds Br oa dca st 300 secon ds t ot a l

Su ppor t s a u t h en t ica t ion No Con ver gen ce t ime Va r ia bl e (ba sed on n u mber of r ou t er s × dea d in t er va l ) Va r ia bl e-l en gt h su bn et s No Su ppor t s su per n et t in g No Type of Ser vice (TOS) No

RIPv2 RFC 1723 No Hop cou n t (16=In f in it y) Rou t e t a bl e ever y 30 secon ds

OSPF RFC 2178 Yes Yes, ba sed on 1–65535 Lin k-st a t e ch a n ges, or ever y 30 secon ds Br oa dca st , mu l t ica st Mu l t ica st 300 secon ds t ot a l 300 secon ds t ot a l , bu t u su a l l y mu ch l ess Yes Yes Va r ia bl e (ba sed on Media del a y + n u mber dea d in t er va l of r ou t er s × dea d in t er va l ) Yes Yes Yes Yes No Yes

Mu l t ipa t h r ou t in g Net wor k dia met er Ea sy t o u se

No 15 h ops Yes

No 15 h ops Yes

Yes 65535 possibl e No

A Ro ut ing Pr o t o c o l Co mpar iso n Func t io n/Fe at ur e

RIPv2

OSPF

St a n da r d n u mber RFC 1058 Lin k-st a t e Pr ot ocol No La r ge r a n ge of met r ics Hop cou n t (16=In f in it y) Upda t e pol icy Rou t e t a bl e ever y 30 secon ds

RFC 1723 No Hop cou n t (16=In f in it y) Rou t e t a bl e ever y 30 secon ds

Upda t e a ddr ess

Br oa dca st

Dea d in t er va l

300 secon ds t ot a l

Br oa dca st , mu l t ica st 300 secon ds t ot a l

RFC 2178 Yes Yes, ba sed on 1–65535 Lin k-st a t e ch a n ges or ever y 30 min u t es Mu l t ica st

Su ppor t s a u t h en t ica t ion Con ver gen ce t ime

No

Yes

Va r ia bl e ba sed on (n u mber of r ou t er s × dea d in t er va l ) No

Va r ia bl e ba sed on (n u mber of r ou t er s × dea d in t er va l ) Yes

Media del a y + dea d in t er va l

No No No 15 h ops

Yes No No 15 h ops

Yes

Yes

Yes Yes Yes N/A bu t u p t o 65535 No

Va r ia bl e-l en gt h su bn et s Su ppor t s su per n et t in g Type of Ser vice (TOS) Mu l t ipa t h r ou t in g Net wor k dia met er Ea sy t o u se

RIPv1

Up t o 300 secon ds t ot a l ; u su a l l y sh or t er Yes

Yes

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 118 OSPF Overview Th er e a r e t wo t ypes of st a n da r diz ed IGPs: RIP (ver sion s 1 or

2) a n d OSPF. Like RIP, OSPF is a n IGP, wh ich mea n s t h a t it is design ed t o r u n in t er n a l l y t o a sin gl e a u t on omou s syst em (AS). (An AS is descr ibed a s t h ose n et wor ks a n d r ou t er s gr ou ped in t o a sin gl e doma in u n der on e a u t h or it y.) It exch a n ges r ou t in g in f or ma t ion wit h in a sin gl e a u t on omou s syst em. It ca n be u sed in sma l l , mediu m, or l a r ge in t er n et wor ks, bu t t h e most dr a ma t ic ef f ect s wil l be r ea dil y n ot iced on l a r ge IP n et wor ks. As opposed t o RIP (a dist a n ce vect or pr ot ocol ), OSPF is a l in k-st a t e pr ot ocol . It ma in t a in s t h e st a t e of ever y l in k in t h e doma in . Th e f ol l owin g is a simpl e a l gor it h m f or OSPF: • Upon in it ia l iz a t ion , ea ch r ou t er r ecor ds in f or ma t ion a bou t a l l it s in t er f a ces. • Ea ch r ou t er bu il ds a pa cket kn own a s t h e Lin k St a t e Adver t isemen t (LSA). • Th e pa cket con t a in s a l ist in g of a l l r ecen t l y seen r ou t er s a n d t h eir cost s. • LSAs a r e r est r ict ed t o bein g f or wa r ded on l y in t h e or igin a t ed a r ea . • Received LSAs a r e f l ooded t o a l l ot h er r ou t er s. • Ea ch r ou t er ma kes a copy of t h e most r ecen t l y “seen ” LSA. • Ea ch r ou t er h a s compl et e kn owl edge of t h e t opol ogy of t h e a r ea t o wh ich it bel on gs. • Adja cen cies a r e f or med bet ween a design a t ed r ou t er (a n d ba cku p DR) a n d ot h er r ou t er s on a n et wor k. • Sh or t est -pa t h t r ees a r e con st r u ct ed a f t er r ou t er s exch a n ge t h eir da t a ba ses. • Rou t er a l gor it h m u pda t es on l y wh en ch a n ges occu r (or ever y 30 min u t es, wh ich ever is sh or t er ).

OSPF Ove r vie w • Upon in it ia l iz a t ion , ea ch r ou t er r ecor ds in f or ma t ion a bou t a l l it s in t er f a ces. • Ea ch r ou t er bu il ds a pa cket kn own a s t h e Lin k St a t e Adver t isemen t (LSA). • Con t a in s a l ist in g of a l l r ecen t l y seen r ou t er s a n d t h eir cost • LSAs a r e r est r ict ed t o bein g f or wa r ded on l y in t h e or gin a t ed a r ea • Received LSAs a r e f l ooded t o a l l ot h er r ou t er s. • Ea ch r ou t er ma kes a copy of t h e most r ecen t l y “seen ” LSA • Ea ch r ou t er h a s compl et e kn owl edge of t h e t opol ogy of t h e a r ea t o wh ich it bel on gs. • Adja cen cies a r e f or med bet ween a Design a t ed Rou t er (a n d Ba cku p DR) a n d ot h er r ou t er s on a n et wor k. • Sh or t est Pa t h Tr ees a r e con st r u ct ed a f t er r ou t er s exch a n ge t h eir da t a ba ses. • Rou t er a l gor it h m on l y wh en ch a n ges occu r (or ever y 30 min u t es, wh ich ever is sh or t er ).

Th is in f or ma t ion is “f l ooded” t o a l l r ou t er s in t h e doma in . Flooding is t h e pr ocess of r eceivin g t h e in f or ma t ion on on e por t a n d t r a n smit t in g it t o a l l ot h er a ct ive por t s on t h e r ou t er . In t h is wa y, a l l r ou t er s r eceive t h e sa me in f or ma t ion a n d ca n compu t e t h eir own r ou t es. Th is in f or ma t ion is st or ed in a da t a ba se ca l l ed t h e link-state database, wh ich is iden t ica l on ver y r ou t er in t h e AS (or ever y a r ea if t h e doma in in spl it in t o mu l t ipl e a r ea s). Ba sed on in f or ma t ion in t h e l in k-st a t e da t a ba se, a n a l gor it h m kn own a s t h e Dykst r a a l gor it h m r u n s a n d pr odu ces a sh or t est -pa t h t r ee ba sed on t h e met r ics, u sin g it sel f a s t h e r oot of t h e t r ee. Th e in f or ma t ion t h is pr odu ces is u sed t o bu il d t h e r ou t in g t a bl e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 119 OSPF Media Support OSPF su ppor t s br oa dca st

a n d n on br oa dca st mu l t ia ccess (NBMA), a n d poin t -t o-poin t n et wor ks. Br oa dca st n et wor ks, l ike Et h er n et , Token Rin g, a n d FDDI, ca n su ppor t on e, or mor e n et wor k a t t a ch men t s t oget h er wit h t h e a bil it y t o a ddr ess a sin gl e messa ge t o a l l t h ose a t t a ch men t s; a br oa dca st n et wor k. Al t er -n a t ivel y, n on -br oa dca st n et wor ks, l ike X.25, ATM or Fr a me Rel a y, su ppor t on e, or ma n y h ost s bu t do n ot possess a met h od f or br oa dca st in g. Poin t -t o-poin t is exa ct l y t h a t , a l in k t h a t h a s t wo con n ect ion poin t s. Two r ou t er s con n ect ed t oget h er t h r ou gh a ser ia l l in e (56k t h r ou gh T1) is a n exa mpl e of a poin t -t o-poin t l in k. Th er e ca n be n o ot h er con n ect ion s in bet ween t h ese t wo poin t s. OSPF Me dia Suppo r t • Br oa dca st —Net wor ks su ch a s Et h er n et , Token Rin g, a n d FDDI. • Non -br oa dca st Mu l t ia ccess (NBMA)—a ccess t h a t does n ot su ppor t br oa dca st bu t a l l ows f or mu l t ipl e st a t ion a ccess su ch a s ATM, Fr a me Rel a y, a n d X.25. • Poin t -t o-Poin t —Lin ks t h a t on l y h a ve t wo n et wor k a t t a ch men t s, su ch a s t wo r ou t er s con n ect ed by a ser ia l l in e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 120 Router Types Wh en t h er e is on l y on e a r ea , t h er e is ba sica l l y on l y on e specia l iz ed t ype of r ou t er : t h e on es t h a t dea l wit h ext er n a l r ou t es. Wh en a n OSPF en vir on men t is spl it in t o mu l t ipl e a r ea s, mu l t ipl e r ou t er s a r e r equ ir ed. Th er e a r e six t ypes of r ou t er s in a n OSPF en vir on men t : Bac kbo ne Ro ut e r (BR): A r ou t er t h a t h a s a n in t er f a ce t o t h e ba ckbon e. Ar e a Bo r de r Ro ut e r (ABR): A r ou t er t h a t h a s in t er f a ces t o mu l t ipl e a r ea s. Aut o no mo us Syst e m Bo undar y Ro ut e r (ASBR): A r ou t er t h a t exch a n ges r ou t in g in f or ma t ion wit h r ou t er s t h a t a r e a t t a ch ed t o dif f er en t a u t on omou s syst ems. Int e r nal Ro ut e r (IR): A r ou t er wh ose a t t a ch men t s a l l bel on g t o t h e sa me a r ea . De sig nat e d Ro ut e r (DR): On e r ou t er on a su bn et t h a t is sel ect ed a s t h e design a t ed r ou t er . Al l ot h er r ou t er s on t h e su bn et f or m a n a dja cen cy (a l ogica l poin t -t o-poin t con n ect ion on a su bn et ) t o t h is r ou t er . In f or ma t ion a bou t n et wor ks t o a n d f r om t h e su bn et is t r a n sf er r ed over t h e DR. Th e DR gen er a t es n et wor k LSA on beh a l f of it s su bn et a n d f l oods t h is in f or ma t ion t h r ou gh ou t it s a r ea . Th is a dver t isemen t in t h e DR iden t if ies a l l r ou t er s a dja cen t t o t h is DR a n d r ecor ds t h e l in k-st a t es of a l l t h e r ou t er s cu r r en t l y a t t a ch ed t o t h e n et wor k.

Rou t er Types Bac kup De sig nat o r Ro ut e r (BDR): Ba cks u p t h e DR in ca se t h e DR f a il s.

Some of t h ese r ou t er t ypes h a ve over l a ppin g r ol es. For exa mpl e, a n ABR ca n a l so be a ba ckbon e r ou t er .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 121 Router Names and Routing Methods Ro ut e r Name s and Ro ut ing Me t ho ds • Th r ee t ypes of r ou t in g in a n OSPF n et wor k: • In t r a -Ar ea r ou t in g—Rou t in g wit h in a sin gl e a r ea • In t er -Ar ea r ou t in g—Rou t in g wit h in t wo a r ea s of t h e sa me AS • In t er -AS r ou t in g—Rou t in g bet ween AS syst ems

Th er e a r e t h r ee t ypes of r ou t in g in a n OSPF n et wor k: Int r a-ar e a r o ut ing . Rou t in g wit h in a sin gl e a r ea . Int e r -ar e a r o ut ing . Rou t in g bet ween t wo a r ea s. Int e r -AS r o ut ing . Rou t in g bet ween a u t on omou s syst ems.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 122 Message Types OSPF r ou t er s pa ss messa ges t o ea ch ot h er

in t h e f or m of Lin k-St a t e Adver t isemen t s (LSAs). Ea ch l in k-st a t e a dver t isemen t descr ibes a piece of t h e OSPF r ou t in g doma in . Al l l in k-st a t e a dver t isemen t s a r e t h en f l ooded t h r ou gh ou t t h e OSPF r ou t in g doma in , bu t wit h in a sin gl e a r ea . A sin gl e a r ea ca n be a n en t ir e OSPF doma in . Th e f l oodin g a l gor it h m is r el ia bl e, en su r in g t h a t a l l r ou t er s h a ve t h e sa me col l ect ion of l in k-st a t e a dver t isemen t s. Type 1—Ro ut e r Links Adve r t ise me nt : Th is messa ge is f l ooded wit h in a n a r ea a n d con t a in s in f or ma t ion a bou t n eigh bor s’ r ou t er l in ks (ba sica l l y t h e IP a ddr ess of a n in t er f a ce a n d t h e cost a ssocia t ed wit h t h a t in t er f a ce). Ever y r ou t er or igin a t es a r ou t er l in ks a dver t isemen t . Type 2—Ne t wo r k Links Adve r t ise me nt : Th is messa ge is f l ooded wit h in a n a r ea . It is gen er a t ed by t h e design a t ed r ou t er (DR) a n d in cl u des in f or ma t ion on a l l r ou t er s on t h is mu l t ia ccess n et wor k. Wh en ever t h e r ou t er is el ect ed t h e DR, it or igin a t es a n et wor k l in ks a dver t isemen t . Type 3—Summar y Links Adve r t ise me nt : Fl ooded in t o a n a r ea by a n Ar ea Bor der Rou t er (ABR). Th is messa ge descr ibes r ea ch a bl e n et wor ks f r om ou t side t h e a r ea (in ot h er a r ea s of t h e OSPF doma in ). Type 4—AS Bo undar y Ro ut e r Summar y Link Adve r t ise me nt : Th is messa ge is f l ooded in t o a n a r ea by a n ABR. Th e messa ge descr ibes t h e cost f r om t h is r ou t er t o a n AS Bou n da r y Rou t er .

Me ssag e Type s • OSPF r ou t er s commu n ica t e by sen din g Lin k St a t e Adver t isemen t s (LSAs) t o ea ch ot h er . • Type 1—Rou t er Lin ks Adver t isemen t • Type 2—Net wor k Lin ks Adver t isemen t • Type 3—Su mma r y Lin ks Adver t isemen t • Type 4—AS Bou n da r y Rou t er Su mma r y Lin k Adver t isemen t • Type 5—AS Ext er n a l Lin k Adver t isemen t • Type 6—Mu l t ica st Gr ou p Member sh ip LSA • LSAs con t a in sequ en ce n u mber s t o det ect ol d a n d du pl ica t e LSAs.

Type 5—AS Ext e r nal Link Adve r t ise me nt : Th is messa ge is f l ooded t o a l l a r ea s except st u b a r ea s (expl a in ed l a t er ). It descr ibes a n ext er n a l n et wor k r ea ch a bl e via t h e AS Bou n da r y Rou t er t h a t gen er a t ed it . Type 6—Mul t ic ast Gr o up Me mbe r ship LSAs: Al l ows mu l t ica st -en a bl ed OSPF r ou t er t o dist r ibu t e IGMP (mu l t ica st gr ou p in f or ma t ion ). On e l a st t h in g a bou t LSAs: Th ey con t a in 32-bit sequ en ce n u mber s. Th is n u mber is u sed t o det ect ol d a n d du pl ica t e LSA pa cket s. Ea ch n ew LSA u ses a n in cr emen t ed sequ en ce n u mber ; t h er ef or e, OSPF r ou t er s keep t h eir LSA da t a ba ses cu r r en t by u pda t in g t h em wit h a n LSA of a h igh er sequ en ce n u mber . Th is a l so a l l ows t h e OSPF r ou t er t o f l u sh ou t ol d en t r ies. An ot h er met h od empl oyed by OSPF on it s LSA da t a ba se is t h e a ge f iel d. Ea ch LSA en t r y h a s a n expir a t ion t imer t h a t ca n expir e, a l l owin g t h e da t a ba se t o pu r ge ol d en t r ies.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 123 Metrics (Cost) Me t r ic s (Co st ) • • • •

Ref er en ce RFC 1253 Met r ic = 10 n 8 / in t er f a ce speed Exa mpl es: • => 100 Mbps 1 • 10 Mbps 10 • E1 48 • T1 65 • 64 kbps 1562 • 19.2 kbps 5208 • 9.6 kbps 10416

A cost

is a ssocia t ed wit h t h e ou t pu t side of ea ch r ou t er in t er f a ce. Th is cost is a con f igu r a bl e pa r a met er on t h e r ou t er . Wh en LSAs a r e t r a n sf er r ed bet ween r ou t er s, t h e cost of t h e in dividu a l l in ks is a dded a s wel l . Th e cost of a l in k is t h e cost a ssocia t ed on t h e ou t bou n d l in k a n d t h is in f or ma t ion is a dded u p in a r ou t er (r eceivin g LSAs) bef or e Dykst r a r u n s. Mu l t ipl e pa t h s ca n be f ou n d t o a dest in a t ion a n d t h e pa t h wit h t h e l owest cost wil l be pl a ced in t h e r ou t in g t a bl e. Simpl y st a t ed, t h e l ower t h e cost of a r ou t er por t , t h e mor e l ikel y t h e in t er f a ce is t o be u sed t o f or wa r d da t a t r a f f ic. Accor din g t o RFC 1253 (OSPF Ver sion 2 MIB), t h e f ol l owin g is a r ecommen da t ion f or a ssign in g cost s t o l in ks in a n OSPF en vir on men t : For costing a link, there is a default value that can be used. It is only a recommendation and any number can be used. For example, if you are using a higher-speed link (such as

those available with the ATM protocol) room should be left to compensate for this. This yields a number having the following typical values: Metric = 10n8 /interface speed Network type/bit rate—Metric Spe e d >= 100 Mbps Et h er n et /802.3 E1 (2.048 Mbps) T1 (ESF or 1.544 Mbps) 64 kbps 56 kbps 19.2 kbps 9.6 kbps

Co st 1 10 48 65 1562 1785 5208 10416

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 124 Generic Packet Format As of t h is wr it in g, t h er e a r e seven t ypes of a dver t isemen t s. Al l

OSPF pa cket s h a ve t h e sa me h ea der , bu t t h e body of t h e pa cket is dif f er en t a n d t h is is n ot ed by t h e LSA specif ic f iel d.

Gen er ic Pa cket For ma t

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 125 The Hello Protocol Rou t er s per iodica l l y t r a n smit

Hel l o pa cket s t o n ot on l y f in d ot h er OSPF r ou t er s on t h eir su bn et bu t a l so t o t r a n smit a n d ma ke su r e t h a t cer t a in pa r a met er s a r e set t o t h e sa me va l u es wit h in a l l t h e r ou t er s on t h a t su bn et . Th e Hel l o pa cket f or ma t is sh own h er e. Th e Hel l o pa cket st a ys on t h e l oca l su bn et ; it is n ot f or wa r ded by t h e r ou t er . Th e Hel l o pa cket con t a in s: • Th e r ou t er ’s sel ect ion of t h e DR (design a t ed r ou t er ) a n d BDR (ba cku p design a t ed r ou t er ) • Th e r ou t er ’s pr ior it y u sed t o det er min e t h e DR a n d BDR • Con f igu r a bl e t imer s t h a t in cl u de t h e Hel l o In t er va l (t ime a r ou t er expect s t o h ea r h el l os) a n d t h e Rou t er Dea dIn t er va l (t h e t ime per iod bef or e a r ou t er is decl a r ed down ) • A l ist of n eigh bor in g r ou t er s t h a t t h is r ou t er h a s r eceived h el l os f r om Th e most ba sic exch a n ge bet ween r ou t er s is ca l l ed t h e Hel l o pr ot ocol . Th is pr ot ocol a l l ows OSPF r ou t er s t o discover on e a n ot h er (in a sin gl e a r ea ) a n d a l l ows f or t h e bu il din g of r el a t ion sh ips bet ween r ou t er s. Th is is t h e pr ot ocol t h a t a l l ows f or t h e DR a n d BDR t o be sel ect ed. On ce t h e DR is sel ect ed, a dja cen cies a r e f or med (discu ssed n ext ).

Th e Hel l o Pr ot ocol For mu l t ia ccess n et wor ks, wh en a r ou t er t r a n smit s a Hel l o pa cket it is sen t u sin g t h e ALL-SPF-Rou t er s (wh ich mea n s a l l OSPF r ou t er s) mu l t ica st a ddr ess of 224.0.0.5 OSPF r ou t er s bu il d a n d ma in t a in t h eir r el a t ion sh ips by per iodic exch a n ges of Hel l o pa cket s. In cl u ded in t h e t r a n smit t ed Hel l o pa cket s is a l ist of a l l t h e r ou t er s a r ou t er h a s h ea r d f r om (i.e., r eceived Hel l o pa cket s f r om). Wh en a r ou t er sees it s a ddr ess in a

r eceived Hel l o pa cket , it kn ows t h a t t h e r ou t er t h a t t r a n smit t ed t h a t pa cket h a s seen it . On ce t h is is a ccompl ish ed, t h e DR a n d t h e BDR a r e sel ect ed. An y DR wit h a pr ior it y of 0 cou n t s it sel f ou t of t h e sel ect ion . Th er e is on e DR a n d DBR per su bn et or LAN segmen t . Th ese pa cket s a r e con t in u a l l y sen t ever y Hel l o per iod specif ied in t h e pa cket . Th is is h ow a r ou t er ca n det ect t h a t a n ot h er r ou t er is down (Dea dIn t er va l ), wh ich it u ses t o wa it a n d bu il d a n ew da t a ba se wit h t h e Dykst r a a l gor it h m.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 126 Adjacency Af t er

t h e Hel l o discover y pr ocess h a s a l l owed f or t h e DR a n d BDR t o be sel ect ed, r ou t er s on a sin gl e LAN segmen t det er min e wh et h er t o f or m a n a dja cen cy wit h on e a n ot h er . An a dja cen cy is impor t a n t beca u se it en a bl es t wo r ou t er s t o a l l ow t h e exch a n ge of r ou t in g in f or ma t ion t h r ou gh l in k-st a t e a dver t isemen t s. Th e f ol l owin g a r e t h e r equ ir emen t s f or est a bl ish in g a n a dja cen cy: • Th e l in k is a poin t -t o-poin t l in k or a vir t u a l l in k (discu ssed l a t er ). • Th e r ou t er is t h e DR or BDR. • Th e n eigh bor is t h e DR or BDR. So, you ca n see t h a t if t h e r ou t er is t h e DR or BDR, a n a dja cen cy is f or med bet ween t h e DR/BDR a n d a n a t t a ch ed r ou t er . If t h ese con dit ion s a r e n ot met , t h en a n a dja cen cy is n ot f or med. Th a t is, n ot a l l r ou t er s f or m a dja cen cies wit h ea ch ot h er , on l y wit h t h e DR a n d BDR or a poin t -t o-poin t l in k. As t h e a dja cen cy is f or med, t h e “a dja cen t ” r ou t er s’ da t a ba ses mu st become “syn ch r on iz ed.” Th a t is, ea ch mu st con t a in t h e exa ct sa me in f or ma t ion . Th er e is a ser ies of st eps bef or e f u l l a dja cen cy. Th e r ea son f or t h is is t o syn ch r on iz e t h e l in k-st a t e da t a ba se. Th e a dja cen t r ou t er s t r a n smit t o a dja cen t n eigh bor s a su mma r y l ist of LSAs u sin g t h e database description packet. Th e r ou t er t a kes t h is in f or ma t ion , compa r es it t o it s own LSA da t a ba se, a n d t h en bu il ds a r equ est l ist of LSAs t h a t a r e in t h e r eceived su mma r y l ist bu t n ot in it s LSA da t a ba se, a n d LSAs t h a t a r e in t h e da t a ba se bu t n ot in t h e r eceived in f or ma t ion f r om it s a dja cen t n eigh bor .

Adja cen cy

Th is n ewl y bu il d r equ est l ist is t h en t r a n smit t ed t o it s n eigh bor u sin g t h e Lin k St a t e r equ est pa cket . Ea ch r ou t er t h a t r eceives t h is r equ est l ist r espon ds t o ea ch r equ est ed r ecor d in t h e l ist . Th e r ou t er t h a t r eceived t h e r equ est pa cket r espon ds wit h a Lin k St a t e Upda t e pa cket . Neigh bor s a r e con sider ed t o be fully adjacent wh en t h ey h a ve r eceived a l l r espon ses t o t h e r equ est s a n d become f u l l y a dja cen t on a on e-on -on e ba sis wit h ea ch r ou t er t h a t h a s f or med a n a dja cen cy. Af t er t h e r ou t er s become f u l l y a dja cen t , ea ch wil l r u n t h e SPF a l gor it h m u sin g t h e in f or ma t ion su ppl ied in t h e da t a ba se. Th e ou t come of t h e a l gor it h m is OSPF r ou t es, wh ich a r e a dded t o t h e r ou t in g t a bl e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 127 Maintaining the Database Af t er

t h e a l gor it h m is r u n , t h e da t a ba ses a r e con t in u a l l y ch ecked f or syn ch r on iz a t ion bet ween a dja cen cies u sin g LSAs a n d t h e f l oodin g pr ocedu r e. Th e f l oodin g pr ocedu r e is simpl e: Receive a n LSA, ch eck f or t h e in f or ma t ion in t h e da t a ba se, a n d det er min e wh et h er or n ot t o f or wa r d it t o a n ot h er a dja cen cy u sin g a LSA. To en su r e r el ia bil it y, t h e f l oodin g pr ocedu r e u ses a n a ckn owl edgmen t pr ocedu r e. Rel ia bil it y is a l so bu il t in t o t h e pr ot ocol . Wh en a n LSA is t r a n smit t ed, it is a ckn owl edged. An u n a ckn owl edged pa cket is r et r a n smit t ed by t h e issu in g r ou t er u n t il it is a ckn owl edged. Ever y LSA con t a in s a n a ge f iel d. Th is f iel d is u sed t o a ge ol d en t r ies in t h e da t a ba se. If a n en t r y is a ged ou t , t h is in f or ma t ion is f l ooded t h r ou gh ou t t h e doma in (a sin gl e a r ea ) a n d t h e Dykst r a a l gor it h m is r u n a ga in t o bu il d a n ew r ou t er t a bl e. Sequ en ce n u mber s a r e gen er a t ed f or a l l LSAs. Wh en a r ou t er t r a n smit s a n LSA, it a ppl ies a sequ en ce n u mber t o it . In t h is wa y, t h e r eceivin g r ou t er wil l kn ow if it is r eceivin g t h e most r ecen t in f or ma t ion f r om a n ot h er r ou t er . Th e sequ en ce n u mber is 32 bit s l on g a n d is a ssign ed t o a n LSA in a scen din g or der .

Maint aining t he Dat abase • Af t er Dykst r a r u n s, t h e da t a ba se is ch ecked f or con sist en cy. • Uses t h e f l oodin g pr ocedu r e: • Receive a n LSA • Ch eck f or t h e in f or ma t ion in t h e da t a ba se • Det er min e wh et h er or n ot t o f or wa r d t h is LSA t o a n a dja cen cy • Rel ia bil it y ch ecked u sin g a n a ckn owl edgmen t pr ocedu r e. • Ea ch LSA con t a in s a n a ge en t r y. • Sequ en ce n u mber s a r e gen er a t ed f or ever y LSA.

Ch a n ges in t h e LSA da t a ba se r equ ir e a r er u n n in g of t h e SPF a l gor it h m a n d a n u pda t e of t h e r ou t in g t a bl e depen din g on t h e ou t come of t h e a l gor it h m.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 128 OSPF Areas OSPF u ses a con cept

kn own a s a n area. Ref er t o Sl ide 140.0. An a r ea is a gr ou pin g of con t igu ou s n et wor ks a n d it s a ssocia t ed r ou t er s t h a t h a ve in t er f a ces bel on gin g t o t h ose n et wor ks a n d h ost s. An OSPF a u t on omou s syst em ca n simpl y be on e a r ea (in t h is ca se, it mu st be t h e ba ckbon e a r ea ) or it ca n con sist of ma n y a r ea s. Ea ch a r ea r u n s it s own copy of t h e l in k-st a t e r ou t in g a l gor it h m, a l l owin g f or ea ch a r ea t o bu il d it s own t opol ogica l da t a ba se. It is impor t a n t t o n ot e t h a t a n a r ea l imit s t h e f l oodin g of a n LSA. LSAs do n ot l ea ve t h e a r ea f r om wh ich t h ey or igin a t ed. Fu r t h er mor e, spl it t in g a doma in in t o a r ea s a l l ows f or r ou t in g t r a f f ic ba n dwidt h sa vin gs a s wel l . Ea ch a r ea is iden t if ied wit h a 32-bit n u mber kn own a s t h e area ID. Th is n u mber is f or ma t t ed in t h e sa me ma n n er a s a n IP a ddr ess; h owever , it h a s n ot h in g t o do wit h t h e IP a ddr essin g sch eme of you r n et wor k. It simpl y iden t if ies a n a r ea . Common a r ea IDs a r e 0.0.0.0 (a sin gl e a r ea mu st be con f igu r ed wit h t h e a r ea ID of 0.0.0.0, or a mu l t ipl e a r ea mu st h a ve on e of it s a r ea s l a bel ed 0.0.0.0, kn own a s Ar ea 0). Ot h er a r ea IDs a r e 1.1.1.1 t o iden t if y a r ea 1, or 0.0.0.1 t o iden t if y a r ea 1. Th er e is n o st r ict met h od t o a ccompl ish a r ea ID n u mber in g except f or a r ea 0.0.0.0. Fu r t h er mor e, ea ch r ou t er in a n a r ea is a ssign ed a n r ou t er ID r ega r dl ess of it s a r ea ID a ssign men t . Th is n u mber is a 32-bit n u mber t h a t u n iqu el y iden t if ies t h a t r ou t er in t h e a u t on omou s syst em. Typica l l y, t h e r ou t er ID is ch osen f r om t h e IP a ddr ess a ssign men t s of on e of t h e r ou t er in t er f a ces. Th e t opol ogy of a n a r ea in n ot kn own t o a n y ot h er a r ea . Th is mea n s t h a t t h e in t er n a l r ou t er s of a n a r ea do n ot con t a in a n y in f or ma t ion a bou t t h e OSPF t opol ogy ou t side t h eir a r ea , givin g t h e ben ef it of r edu ced r ou t in g over h ea d. A sin gl e a r ea t h a t is spr ea d over spa r se en vir on men t s (WAN l in ks) mu st con t a in t h e sa me t opol ogy da t a ba se f or t h e en t ir e a r ea n o ma t t er h ow l a r ge it h a s become. So h ow does a n a r ea det er min e r ou t es t h a t a r e n ot wit h in it s a r ea ? Th is is a ccompl ish ed via t h e ba ckbon e a r ea a n d t h e su mma r y l in ks a dver t isemen t .

ABRs pl a y a n impor t a n t r ol e in a n OSPF n et wor k. Sin ce a r ea s do n ot kn ow t h e t opol ogy in a r ea s ot h er t h a n t h eir own , some mech a n ism mu st be pr ovided t o a l l ow n et wor k r ea ch a bil it y in f or ma t ion t o t r a ver se dif f er en t a r ea s. Af t er a l l , it wou l dn ’t do mu ch good t o be a bl e t o dyn a mica l l y r ou t e in you r own a r ea a n d t h en h a ve t o st a t ica l l y poin t t o n et wor ks in ot h er a r ea s. ABRs compa ct t h e t opol ogica l in f or ma t ion f or a n a r ea a n d t r a n smit it t o t h e ba ckbon e a r ea . Rou t er s in t h e ba ckbon e a r ea ma ke su r e t h a t it is f or wa r ded t o t h e a r ea s t h a t a r e a t t a ch ed t o it . In or der t o a ccompl ish t h is, ABRs r u n mu l t ipl e copies of t h e OSPF a l gor it h m, on e f or ea ch a r ea (in cl u din g t h e ba ckbon e a r ea ). Ar ea s a l so a l l ow f or t h e a dva n t a ges of h ier a r ch ica l t opol ogies t o be bu il t .

OSPF Ar ea s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 129 The Backbone Area The Bac kbo ne Ar e a • Th er e mu st be a t l ea st on e a r ea in a n OSPF n et wor k. • It is ca l l ed t h e ba ckbon e a r ea • Design a t ed by a r ea ID of 0.0.0.0. • Pr ima r y r espon sibil it y t o pr opa ga t e in f or ma t ion bet ween a r ea s. • Ha s t h e sa me a t t r ibu t es a s a n y ot h er a r ea . • An y n et wor k t opol ogy ca n ma ke u p t h e ba ckbon e. • It ca n be u sed a s a r ea l n et wor k wit h a t t a ch men t s.

On e of t h e a r ea s is a specia l iz ed a r ea . It

is kn own a s t h e backbone a r ea a n d is l a bel ed a s 0.0.0.0 or Ar ea 0. Wh en a doma in is spl it in t o a r ea s, t h e a r ea s commu n ica t e wit h on e a n ot h er t h r ou gh t h e ba ckbon e a r ea . Th is a r ea con t a in s t h ose r ou t er s a n d n et wor ks n ot con t a in ed in a n y ot h er a r ea a n d r ou t er s t h a t con n ect t o mu l t ipl e a r ea s (An ABR, expl a in ed n ext ). It s pr ima r y r espon sibil it y is t o dist r ibu t e r ou t in g in f or ma t ion bet ween a r ea s. Th e ba ckbon e a r ea con t a in s a l l t h e pr oper t ies of it s a r ea , it s t opol ogy is n ot kn own by a n y ot h er a r ea , a n d it does n ot kn ow t h e t opol ogy of a n y ot h er a r ea . Oka y, n ow t h a t we h a ve t h e dist r ibu t ion a r ea (if you wil l ), wh a t ca u ses t h e in f or ma t ion t o be in t h e ba ckbon e a r ea ? Th e ABR a ccompl ish es t h is. Th e ba ckbon e a r ea h a s a l l t h e a t t r ibu t es of a n y t ypica l a r ea . Th is in cl u des t h e f a ct t h a t it s t opol ogy is n ot kn own t o a n y ot h er a r ea a t t a ch ed t o it . Th e t opol ogies of t h e a r ea s t h a t a t t a ch t o t h e ba ckbon e a r e n ot kn own t o a n y ba ckbon e r ou t er a s wel l . It l ooks l ike a n y ot h er a r ea except f or it s a r ea n u mber a ssign men t 0.0.0.0.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 130 The Area Border Router (ABR) Th er e is a specia l

r ou t er t ype kn own a s t h e Ar ea Bor der Rou t er . It s job is t o con n ect a n a r ea t o t h e ba ckbon e a n d t o su mma r iz e it s a r ea t opol ogy in f or ma t ion (f or a l l a r ea s t h a t it con n ect s t o) t o t h e ba ckbon e a r ea , wh er e it is r eceived by ot h er ABRs t o be in cl u ded in t h eir t a bl es. ABRs a l so r eceive ot h er a r ea su mma r ies f r om t h e ba ckbon e a n d pr opa ga t e t h is t o t h eir a r ea s. ABRs a r e pa r t of t h e ba ckbon e a r ea ; t h er ef or e, ABRs bel on g t o a min imu m of t wo a r ea s: t h eir own a n d t h e ba ckbon e a r ea . If t h er e is on l y on e a r ea in t h e AS (t h e ba ckbon e a r ea ), t h er e a r e n o ABRs. Sin ce a n ABR bel on gs t o t wo or mor e a r ea s, it h a s a sepa r a t e da t a ba se f or ea ch a r ea t o wh ich it bel on gs. It a l so execu t es a sin gl e copy of t h e r ou t in g a l gor it h m f or ea ch a r ea t o wh ich it bel on gs. For a t ypica l ABR, it ma in t a in s con n ect ion s t o it s a r ea a n d t o t h e ba ckbon e a r ea . For it s a r ea , it r eceives f l ooded LSAs t h a t a r e wit h in it s a r ea a n d ma in t a in s a syn ch r on iz ed da t a ba se f or t h e a r ea . Th e ot h er copy of t h e a l gor it h m r u n s f or t h e a t t a ch men t t o t h e ba ckbon e. ABRs do n ot f l ood l ea r n ed in f or ma t ion a bou t it s a r ea t o t h e ba ckbon e. It su mma r iz es t h is in f or ma t ion u sin g su mma r y l in k a dver t isemen t s. Th ese a dver t isemen t s a r e pu sh ed t o ot h er ABRs on t h e ba ckbon e, a l l owin g t h ose a r ea s t o l ea r n a bou t ea ch ot h er wit h ou t dir ect l y pa r t icipa t in g in t h e ba ckbon e’s r ou t in g a dver t isemen t s (r emember , t h e ba ckbon e is a r ea l a r ea , t oo!). Sin ce, a r ea r ea ch a bil it y in f or ma t ion is pr opa ga t ed on l y over t h e ba ckbon e a r ea , ever y a r ea mu st t ou ch t h e ba ckbon e t h r ou gh t h e u se of a n ABR. An a r ea is n ot a l l owed t o be segmen t ed f r om t h e ba ckbon e. A specia l con dit ion does exist t o a l l ow a n a r ea t o be ext en ded of f a n a r ea t h a t is n ot t h e ba ckbon e t h r ou gh a con cept kn own a s a virtual link.

The Ar e a Bo r de r Ro ut e r (ABR) • • • •

Con n ect s a n a r ea (or a r ea s) t o t h e ba ckbon e. Su mma r iz es it s a r ea t opol ogy t o t h e ba ckbon e. Pr opa ga t es su mma r iz ed in f or ma t ion f r om t h e ba ckbon e in t o it s a r ea . Fin a l r ou t er t h a t r eceives a n a r ea ’s LSA. • ABRs do n ot f l ood LSA in f or ma t ion in t o t h e ba ckbon e • On l y pr odu ces su mma r ies t o t h e ba ckbon e f or t h e ba ckbon e t o pr opa ga t e t o ot h er a r ea s • Uses t h e n et wor k su mma r y LSA. • Su mma r iz ed in f or ma t ion is pr opa ga t ed in a n a r ea by t h e DR a n d it s a dja cen cies.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 131 Virtual Link A vir t u a l

l in k is sh own in t h e sl ide. Th e ba ckbon e mu st be con t igu ou s. Th is mea n s t h a t a n ABR mu st con n ect dir ect l y t o t h e ba ckbon e a n d n ot t o a n ot h er a r ea . Ar ea -t o-a r ea commu n ica t ion is n ot a l l owed dir ect l y, on l y t h r ou gh t h e ba ckbon e. However , t h er e wil l be design s t h a t f or ce t h e cr ea t ion of a n a r ea t h a t wil l n ot h a ve dir ect con n ect ivit y t o t h e ba ckbon e. Th is ma kes t h e ba ckbon e is n o l on ger con t igu ou s. Ba ckbon e con n ect ivit y is r est or ed t h r ou gh a vir t u a l l in k. Vir t u a l l in ks ca n be con f igu r ed bet ween a n y t wo ABR r ou t er s t h a t h a ve a n common in t er f a ce t o a n on ba ckbon e a r ea . Th e vir t u a l l in k is con f igu r ed on ea ch ABR a n d a ct s l ike a poin t -t o-poin t l in k. Vir t u a l l in ks bel on g t o t h e ba ckbon e. Th e r ou t in g pr ot ocol t r a f f ic t h a t f l ows a l on g t h e vir t u a l l in k u ses in t r a -a r ea r ou t in g on l y. As sh own in t h e sl ide, t h e t wo en dpoin t s of t h e l in k a r e ABRs a n d t h e l in k is con f igu r ed in bot h r ou t er s. Th e t wo ABRs u sed in t h e vir t u a l l in k a l so mu st bel on g t o a common a r ea , n ot t h e ba ckbon e a r ea . Simpl y st a t ed, a vir t u a l l in k is l ike a poin t -t o-poin t l in k bet ween t wo f u l l y a dja cen t ABRs t h a t a l l ows a n a r ea t o r eceive a n d t r a n smit su mma r y in f or ma t ion (l ea r n r ou t es wit h in t h e AS) wh en it is n ot dir ect l y con n ect ed t o t h e ba ckbon e a r ea . Th a t ’s simpl y st a t ed?

Vir t u a l Lin k

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 132 Inter-Area Routing Rou t in g a pa cket

bet ween a r ea s in vol ves t r a n smit t in g a pa cket f r om it s sou r ce, t h r ou gh it s in t er n a l a r ea t o t h e ABR. Th e ABR t r a n smit s t h e pa cket over t h e ba ckbon e a r ea t o a n ot h er ABR, wh er e it is t r a n smit t ed in t er n a l l y on t h e a r ea t o t h e dest in a t ion h ost . Ar ea s ca n n ot r ou t e dir ect l y t o ot h er a r ea s! Aga in , t h e ba ckbon e a r ea is a specia l a r ea . It s ma in f u n ct ion is t o dist r ibu t e in f or ma t ion f r om a r ea s t o ot h er a r ea s. It con sist s of n et wor ks t h a t a r e n ot con t a in ed in a n y ot h er def in ed a r ea , a n d r ou t er s t h a t a r e a t t a ch ed t o a n a r ea or a r ea s. Wh y do a r ea s? Br ea kin g t h e AS in t o r ou t a bl e a r ea s gr ea t l y r edu ces t h e a mou n t of over h ea d in t h e f or m of r ou t in g in f or ma t ion u pda t es t h a t n eed t o be dist r ibu t ed t h r ou gh ou t t h e AS. Wh il e t h is ma y n ot seem l ike mu ch , r emember , t h a t ea ch a r ea ca n be u n iqu e. On e a r ea ca n h a ve a ma jor it y of WAN l in ks, wh il e ot h er s a r e most l y n et wor ks, a n d ot h er s a r e a combin a t ion of mu l t ipl e n et wor k t ypes. Wh y ma ke t h e u pda t e pr ocess ver y compl ex, a n d wh y bot h er ot h er a r ea s wit h you r in f or ma t ion ? Remember , wh en t h e r ou t in g a l gor it h m r u n s, ever y r ou t er in a n a r ea mu st r u n it . If on e r ou t er in a n a r ea r u n s t h e a l gor it h m, t h e r ou t er s in ot h er a r ea s ma y n ot h a ve t o r u n it . Dykst r a r u n s in on e a r ea on l y. ABR wil l h a ve a min imu m of t wo copies of t h e Dykst r a , on e f or ea ch a r ea it con n ect s t o.

In t er -Ar ea Rou t in g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 133 Information from Other Autonomous Systems In f or ma t ion f r om ot h er Au t on omou s Syst ems • Uses t h e ASBR. • Ot h er ASs a ccor din g t o OSPF ma y simpl y be a RIP n et wor k wit h in t h e sa me OSPF doma in . • Ext er n a l LSA u sed. • Type 1—Th e pr ef er r ed r ou t e a n d u sed wh en con sider in g t h e in t er n a l cost of t h e AS. • Type 2—Adver t isin g t h e sa me met r ic a s wa s a dver t ised by t h e ASBR. • Th ese a r e u sed t o ca l cu l a t e t h e sh or t est pa t h t o t h e ASBR.

Now, wh a t

a bou t t a l kin g t o ot h er a u t on omou s syst ems (ou t side of t h e OSPF doma in )? Th r ou gh t h e u se of a specia l r ou t er t ype—t h e Au t on omou s Syst em Bou n da r y Rou t er (ASBR)—OSPF n et wor ks ca n commu n ica t e wit h ot h er ASs. Th is a dds a n ot h er l evel of h ier a r ch y t o t h e OSPF r ou t in g. Th e f ir st is t h e in t r a -a r ea r ou t in g. Th e secon d l evel is a r ea -t o-a r ea r ou t in g t h r ou gh t h e ba ckbon e. Th e t h ir d l evel is ext er n a l a u t on omou s syst ems. ASBRs r u n t h e OSPF pr ot ocol a n d some t ype of Ext er ior Ga t ewa y Pr ot ocol (su ch a s Bor der Ga t ewa y Pr ot ocol def in ed in RFC 1403, BGP, or even RIP). RIP is seen a s a n ext er n a l n et wor k a n d it s r ou t es a r e impor t ed in t o a Lin k St a t e Da t a ba se a s su ch . An ext er n a l AS n eed n ot be a n ot h er AS in t h e sen se of a BGP. OSPF t r ea t s a n y r ou t in g pr ot ocol u n l ike it sel f a s a n ext er n a l AS. Th is t ype of pr ot ocol a l l ows f or in f or ma t ion t o be exch a n ged bet ween ASs. Th e EGP t ype of pr ot ocol on l y r u n s on t h e in t er f a ces t h a t a r e bet ween t h e ASs. OSPF r u n s on t h e in t er f a ces in t er n a l t o t h e AS. An ASBR does n ot h a ve t o dir ect l y a t t a ch t o t h e ba ckbon e. To a l l ow f or t h is, a n ot h er t ype of a dver t isemen t is u sed, kn own a s t h e Ext er n a l Lin ks

Adver t isemen t . Ea ch ASBR in t h e AS gen er a t es on e of t h e a dver t isemen t s. Th is is t h e on l y a dver t isemen t t h a t is f l ooded in t o ever y a r ea in t h e AS. Th ese a dver t isemen t s descr ibe r ou t es t h a t a r e ext er n a l t o t h e AS. Th er e is on e en t r y f or ever y ext er n a l r ou t e. As you ca n see, t h is cou l d qu ickl y f il l u p a r ou t in g t a bl e wit h ext er n a l r ou t es. Th e ext er n a l r ou t e u ses on e of t wo a va il a bl e t ypes of met r ics: Type 1 or Type 2. Type 1 met r ics a r e t h e pr ef er r ed r ou t e a n d a r e u sed wh en con sider in g t h e in t er n a l cost of t h e AS. Th is mea n s t h a t Type 1 met r ics in cl u de t h e Lin k St a t e Met r ic a s wel l a s t h e met r ic t h a t wa s a ssign ed t o it . Th er ef or e, a n y r ou t er t h a t r eceives t h is t ype of u pda t e f or a n ext er n a l r ou t e mu st u se t h e in t er n a l (AS) met r ics t o r ea ch t h e ASBR a dver t isin g t h a t ext er n a l r ou t e. So, t h e compu t a t ion f or cost t o r ea ch t h a t r ou t e u ses met r ics t h a t a r e in t er n a l t o t h e AS a n d t h e AS t h a t wa s su ppl ied in t h e a dver t isemen t . Type 2 met r ics a r e t h e sa me met r ics t h a t wer e a dver t ised by t h e ASBR. In t er n a l AS met r ics a r e n ot a dded t o t h e ASBR met r ic f or t h e r ou t e wh en compu t in g a pa t h (ba sed on cost ) f or t h a t ext er n a l r ou t e. (t h a t is, t o r ea ch t h e ASBR a dver t isin g t h a t ext er n a l r ou t e).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 134 Stub Areas Ext er n a l

l in k a dver t isemen t s cou l d qu ickl y f il l u p a r ou t in g t a bl e. In some in st a n ces, a ma jor it y of t h e en t r ies in t h e r ou t in g t a bl e wil l simpl y be r ou t es ext er n a l t o t h e OSPF doma in . Th er e is on e en t r y f or ever y ext er n a l r ou t e. As you ca n see, t h is cou l d qu ickl y f il l u p a r ou t in g t a bl e wit h ext er n a l r ou t es. St u b a r ea s wer e cr ea t ed t o r edu ce t h ese en t r ies. If a n a r ea h a s a sin gl e en t r y or exit poin t t o or f r om t h a t a r ea t h a t is u sed f or a l l ext er n a l t r a f f ic, it ca n be con f igu r ed a s a st u b a r ea . A st u b a r ea bl ocks t h e impor t a t ion of t h e AS Ext er n a l Lin k Adver t isemen t s in t o t h e a r ea , t h er eby r edu cin g t h e n u mber of en t r ies in t h e st u b a r ea ’s da t a ba se.

St u b Ar ea s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 135 RFCs Related to OSPF 2178 DS: J. Moy, “OSPF Ver sion 2,” 07/22/97 (211 pa ges) (.t xt f or ma t ) (obsol et es RFC 1583). 2154 ES: M. Mu r ph y, B. Ba dger , A. Wel l in gt on , “OSPF wit h Digit a l Sign a t u r es,” 06/16/97 (29 pa ges) (.t xt f or ma t ). 1850 DS: F. Ba ker , R. Col t u n , “OSPF Ver sion 2 Ma n a gemen t In f or ma t ion Ba se,” 11/03/95. (80 pa ges) (.t xt f or ma t ) (Obsol et es RFC 1253). 1793 PS: J. Moy, “Ext en din g OSPF t o Su ppor t Dema n d Cir cu it s,” 04/19/95 (31 pa ges) (.t xt f or ma t ). 1765 E: J. Moy, “OSPF Da t a ba se Over f l ow,” 03/02/95 (9 pa ges) (.t xt f or ma t ). 1745 PS: K. Va r a dh a n , S. Ha r es, Y. Rekh t er , “BGP4/IDRP f or IP—OSPF In t er a ct ion ,” 12/27/94 (19 pa ges) (.t xt f or ma t ). 1587 PS: R. Col t u n , V. Fu l l er , “Th e OSPF NSSA Opt ion ,” 03/24/94 (17 pa ges) (.t xt f or ma t ). 1586 I: O. deSou z a , M. Rodr igu es, “Gu idel in es f or Ru n n in g OSPF Over Fr a me Rel a y Net wor ks,” 03/24/94 (6 pa ges) (.t xt f or ma t ). 1585 I: J. Moy, “MOSPF: An a l ysis a n d Exper ien ce,” 03/24/94 (13 pa ges) (.t xt f or ma t ). 1584 PS: J. Moy, “Mu l t ica st Ext en sion s t o OSPF,” 03/24/94 (102 pa ges) (.t xt , .ps f or ma t s). 1403 PS: K. Va r a dh a n , “BGP OSPF In t er a ct ion ,” 01/14/93 (17 pa ges) (.t xt f or ma t ) (obsol et es RFC 1364). 1370 PS: In t er n et Ar ch it ect u r e Boa r d, “Appl ica bil it y St a t emen t f or OSPF,” 10/23/92 (2 pa ges) (.t xt f or ma t ).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 136 Static versus Dynamic Routing Th e l a st

t opic of discu ssion is t h e a bil it y of r ou t in g pr ot ocol s t o a ccept in f or ma t ion f or t h eir t a bl es f r om t wo sou r ces: t h e n et wor k or a u ser . Al t h ou gh t h e RIP pr ot ocol a l l ows f or a u t oma t ic u pda t es f or r ou t in g t a bl es, ma n u a l en t r ies a r e st il l a l l owed a n d a r e kn own a s static entries. Th ese en t r ies mu st be en t er ed ma n u a l l y. A def a u l t r ou t e is a st a t ic en t r y. An en dst a t ion t h a t is con f igu r ed wit h a def a u l t r ou t er is sa id t o h a ve a st a t ic r ou t e en t r y. St a t ic r ou t es ca n be con f igu r ed t o be in cl u ded or n ot in cl u ded in a dyn a mic u pda t e. St a t ic r ou t es r ef er t o t h e pr ocess of ma n u a l l y pl a cin g a n en t r y in t h e t a bl e. For a n y given r ou t er , t h e n et wor k a dmin ist r a t or ma y u pda t e t h a t t a bl e wit h a st a t ic r ou t e. St a t ic r ou t es over r ide dyn a mic r ou t es. St a t ic t a bl es h a ve ma n y disa dva n t a ges. Fir st , a s discu ssed ea r l ier , st a t ic t a bl es a r e n ot mea n t f or l a r ge n et wor ks t h a t in cu r ma n y ch a n ges su ch a s gr owt h . As t h e t opol ogy ch a n ges, a l l t h e t a bl es mu st be ma n u a l l y r econ f igu r ed. Secon d, in t h e ca se of r ou t er f a il u r e, t h e t a bl es h a ve n o wa y of u pda t in g t h emsel ves. Th e r ou t e wil l be disa bl ed, bu t n o a l t er n a t ive r ou t e is pu t in pl a ce. Cisco empl oys a con cept ca l l ed a floating static route t h a t a l l ows f or t h is. Dyn a mic t a bl es over come t h e disa dva n t a ges of st a t ic en t r ies. Th e pr ima r y a dva n t a ge t h a t a st a t ic en t r y ma y h a ve is f or secu r it y, f or st a t ic t a bl es ca n be con f igu r ed not t o br oa dca st t h eir r ou t es t o ot h er r ou t er s. In t h is wa y, u ser s ca n cu st omiz e t h eir r ou t er s t o become pa r t icipa n t s on t h e n et wor k wit h ou t t h eir n et wor k iden t it y bein g br oa dca st t o ot h er r ou t er s on t h e n et wor k. St a t ic r ou t es

St at ic ve r sus Dynamic Ro ut ing • En t r ies in a r ou t in g t a bl e ca n be st a t ic (ma n u a l l y en t er ed by t h e n et wor k a dmin ist r a t or ) or dyn a mic (l ea r n ed t h r ou gh a r ou t in g pr ot ocol su ch a s RIP). • St a t ic en t r ies: • In t h e wor kst a t ion f or eit h er : • Def a u l t Ga t ewa y (r ou t er )—u sed by in dir ect r ou t in g • Pl a ce a st a t ic r ou t e in f or on e t h a t is n ot l ea r n ed t h r ou gh RIP, et c. • In t h e r ou t er : • En t er ed a s 0.0.0.0 a n d t h e n ext h op (n o su bn et ) t o in dica t e a def a u l t r ou t e • Rou t er s ca n br oa dca st t h is in f or ma t ion t o t h eir n et wor ks t o l et a l l kn ow wh ich is t h e def a u l t r ou t er a l so a l l ow a u ser t o u pda t e a r ou t in g t a bl e wit h a n et wor k en t r y t h a t wil l be u sed in en dst a t ion s wit h t h e dyn a mic f u n ct ion t u r n ed of f . Th is a l l ows t h e u ser t o ma in t a in t h e r ou t in g t a bl e. • A def a u l t r ou t er is on e t h a t a l l ot h er s l ook t o f or n et wor ks t h a t a r e n ot in t h eir t a bl es • St a t ic r ou t es ca n be u sed t o in cr ea se secu r it y on t h e n et wor k • An y IP n et wor k a ddr ess ca n be ma n u a l l y en t er ed in t o t h e r ou t in g t a bl e • Th e r ou t er a dmin ist r a t or su ppl ies: • IP Net wor k a ddr ess • Su bn et ma sk • Next h op in t er f a ce (t h e IP a ddr ess of t h e n ext r ou t er s in t er f a ce t o get t o t h a t n et wor k)

St a t ic en t r ies a r e a l so u sed in va r iou s IP t opol ogies. For exa mpl e, in a h u b-a n d-spoke t opol ogy wh er e a bu sin ess h a s a cen t r a l iz ed cor por a t e of f ice a n d ma n y r emot e of f ices (su ch a s a ba n k), t h er e r ea l l y is n o r ea son t o f u l l y en a bl e RIP a t t h e br a n ch of f ices. Wh y n ot t u r n RIP su ppl y (t h e a bil it y t o br oa dca st r ou t es bu t n ot l ist en f or a n y) a t t h e r emot e br a n ch a n d a dd a def a u l t r ou t e, in t h e r emot e br a n ch r ou t er , poin t in g t o t h e u pst r ea m r ou t er l oca t ed a t t h e cor por a t e of f ice. In t h is wa y, t h e u pst r ea m r ou t er dyn a mica l l y l ea r n s a bou t a l l t h e r emot e of f ices (a n d l ea r n s wh en t h ey go a wa y) a n d t h e br a n ch of f ice h a s on e simpl e en t r y in it s t a bl e (besides it s a t t a ch ed su bn et s): a def a u l t r ou t e t o t h e u pst r ea m r ou t er . Sin ce t h er e is n o ot h er pa t h besides t h a t on e l in k t o t h e u pst r ea m r ou t er , t h e r ou t er simpl y pa sses on a n y pa cket s t h a t it r eceives f r om it s a t t a ch ed wor kst a t ion on t h e n et wor k. Th is r edu ces t h e a mou n t of memor y a n d pr ocessor power n eeded a t t h e r emot e br a n ch , en a bl in g a ch ea per r ou t er t o be pl a ced ou t t h er e. Th is is a l so a n exa mpl e of wh y OSPF n eed n ot be t u r n ed on f or a compl et e n et wor k. Th er e is n o r ea son wh a t soever t o r u n OSPF ou t a t t h e br a n ch of f ices; t h er e a r e pl en t y of r ea son s t o r u n it a t t h e cor por a t e of f ices. OSPF wil l simpl y pu l l in t h e RIP n et wor ks

a s ext er n a l n et wor ks (bu t t h is cou l d possibl y bu il d l a r ge r ou t in g t a bl es).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 137 Remote Networks Th er e a r e t imes wh en n et wor ks mu st

be con n ect ed wh en t h ey a r e geogr a ph ica l l y sepa r a t ed. Th is mea n s t h a t n et wor ks ca n n ot be con n ect ed by t h e con ven t ion a l mea n s of a LAN in t er con n ect . Ima gin e t r yin g t o ca bl e a n et wor k t oget h er wit h on e su bn et in Ca l if or n ia a n d a n ot h er in Vir gin ia . Et h er n et ca n n ot st r et ch t h a t f a r . Th e on l y f ea sibl e wa y of doin g t h is is by u sin g some t ype of WAN ser vice f r om t h e t el eph on e compa n y. AT&T, MCI, a n d Spr in t a l l pr ovide WAN ser vices f or da t a n et wor ks. Th ey come in ma n y f or ms, bu t a ga in , f or simpl icit y, t h is book wil l expl a in poin t -t o-poin t ser ia l l in es. Th e ch oices a va il a bl e a r e Fr a me Rel a y, Swit ch ed Mu l t imega bit Da t a Ser vice (SMDS, pr ima r il y u sed in met r opol it a n a r ea s a n d n ot cr oss cou n t r y), In t egr a t ed Ser vice Digit a l Net wor k (ISDN), or l ea sed l in es. For simpl icit y r ea son s, l ea sed l in es wil l be expl a in ed h er e. Th e sl ide sh ows n et wor ks con n ect ed via ser ia l l in es. Ju st a s t h e r ou t er h a s ph ysica l con n ect or s t o con n ect t o a LAN, t h e r ou t er h a s a con n ect ion t h a t en a bl es t h is t ype of con n ect ion . In st ea d of t h e LAN in t er f a ce on t h e r ou t er , t h e r ou t er wil l h a ve a ser ia l l in e in t er f a ce. Th e con n ect or f or t h is is u su a l l y a V.35, EIA-232 (f or mer l y RS-232-D), or a n RS-449 con n ect or . Th e con n ect ion wil l t h en be con n ect ed t o a device kn own a s a Da t a Ser vice Un it /Cu st omer Ser vice Un it (DSU/CSU). Th is is a box t h a t r eceives t h e ser ia l sign a l f r om t h e r ou t er a n d r epea t s it t o t h e t el eph on e swit ch in g of f ice. Th e l ea sed l in e is a specia l l y con dit ion ed l in e t h a t is pr ovided by t h e ph on e compa n y. Th is l in e h a s been con dit ion ed t o h a n dl e h igh -speed digit a l t r a f f ic. It is n ot t h e n or ma l l in e t h a t is u sed wit h voice swit ch in g. Th is l in e is per ma n en t l y swit ch ed t o pr ovide a con n ect ion bet ween t wo poin t s. Th er ef or e, it is somet imes ca l l ed a point-to-point l in k. It is a n a l ogou s t o dia l in g a n u mber , r eceivin g a con n ect ion , a n d n ever h a n gin g u p.

Remot e Net wor ks Th e r ou t er a t t h e r emot e en d wil l a l so be a t t a ch ed t o a DSU/CSU. It wil l be a bl e t o r eceive t h e sign a l s gen er a t ed a t t h e r emot e en d. Th e t ypica l speeds a t wh ich t h ese l in es r u n va r y. Th e most common a r e 56 Kbps a n d T1 (1 .544 Mbps) l in es, ca l l ed leased lines beca u se t h e cu st omer does n ot own t h e l in e. It is l ea sed f r om t h e ph on e compa n y a n d t h e r a t es va r y depen din g on t h e l en gt h of t h e l in e. Ra t es a r e u su a l l y ch ea per f or sh or t r u n s (t h e ot h er poin t of t h e n et wor k is a f ew mil es a wa y) a n d mor e expen sive f or l on ger r u n s. Ra t es a l so va r y depen din g on t h e speed of t h e l in e. Th e ser ia l l in e pr ovides a simpl e in t er con n ect bet ween t wo r ou t er s t h a t ca n n ot be con n ect ed dir ect l y by a LAN. Th e r ea l pr obl em in u sin g t h em in a n IP in t er n et is t h a t t h ey con su me a f u l l n et wor k n u mber or a su bn et n u mber . Th er e h a ve been met h ods t o over come t h is u sin g va r ia bl e-l en gt h su bn et ma skin g, wh ich is a va il a bl e wit h t h e r ou t in g a l gor it h ms of OSPF a n d RIPv2. Ot h er wise, t h ey gen er a l l y a ct a s a f u l l n et wor k even wh en t h er e a r e on l y t wo poin t s con n ect ed.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 138 Datagram Routing Now t h a t

r ou t in g f u n da men t a l s, t h e RIP a n d OSPF pr ot ocol s, a n d r ou t in g t a bl es h a ve been discu ssed, t h e sl ide sh ows a r ou t ed pa cket u sin g dir ect a n d in dir ect r ou t in g. Th is is r ega r dl ess of t h e r ou t in g pr ot ocol . In t h is sl ide, we ca n see t h a t a PC (en dst a t ion A) is t r yin g t o pa ss a da t a gr a m t o a h ost ma ch in e, ca l l ed h ost D. Th e h ost ma ch in e is on e h op (on e r ou t er ) a wa y. Th e IP l a yer of t h e PC (en dst a t ion A) kn ows t h a t it mu st u se a r ou t er (t h e sou r ce a n d dest in a t ion n et wor k a ddr esses a r e dif f er en t ), a n d wil l u se RIP or t h e def a u l t ga t ewa y t o det er min e t h e IP a ddr ess of t h e r ou t er t o u se. Upon det er min in g t h e r ou t er ’s ph ysica l a ddr ess, it wil l ph ysica l l y (MAC l a yer ) a ddr ess t h e pa cket t o t h e r ou t er a t por t B. Th e sou r ce a n d dest in a t ion IP a ddr esses in t h e IP h ea der of t h is da t a gr a m wil l be t h e PC a s t h e sou r ce, a n d t h e dest in a t ion IP a ddr ess a s t h e h ost . Th e sou r ce (PC) a n d f in a l dest in a t ion (t h e h ost ) IP a ddr esses wil l be embedded in t o t h e IP h ea der a n d wil l n ot ch a n ge t h r ou gh ou t t h e r ou t in g of t h is da t a gr a m.

Da t a gr a m Rou t in g Th e r ou t er wil l r eceive t h is pa cket a n d ext r a ct t h e n et wor k n u mber f r om t h e f in a l dest in a t ion IP a ddr ess in t h e r eceived IP h ea der . Th e ph ysica l a ddr ess h ea der s wil l be st r ipped. Th e ext r a ct ed n et wor k n u mber wil l be compa r ed t o t h e r ou t er ’s in t er n a l r ou t in g t a bl e. Th e r ou t er wil l det er min e t h a t t h e dest in a t ion n et wor k ca n be r ea ch ed dir ect l y t h r ou gh on e of it s por t s (t h e dest in a t ion n et wor k is dir ect l y a t t a ch ed). Th e r ou t er wil l det er min e t h e dest in a t ion st a t ion ’s ph ysica l a ddr ess t h r ou gh it s ARP t a bl e (or it ma y r equ est it t h r ou gh t h e ARP pr ocess). Th e r ou t er wil l t h en bu il d a pa cket wit h t h e or igin a l da t a gr a m sen t by en dst a t ion A t o su bmit t o h ost D. Th e ph ysica l sou r ce a ddr ess wil l be t h e r ou t er ’s, t h e ph ysica l dest in a t ion a ddr ess wil l be h ost D’s. Th e pa cket is t h en t r a n smit t ed t o h ost D.

Not ice t h r ou gh ou t t h is t h a t on l y t h e MAC a ddr esses ch a n ged; t h e IP a ddr esses in t h e IP h ea der st a yed t h e sa me. Th e r ou t er wil l ch a n ge t h e TTL a n d t h e CRC in t h e IP h ea der , bu t t h a t is t h e on l y t h in g t h a t ch a n ges in t h e IP h ea der .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Part Three Internet Protocol Version 6 (IPv6) Chapter 139 Introduction “Th e n ext IP.” “Ver sion 6.” “Compl et el y r edon e IPv4.” If you h ea r st a t emen t s l ike t h is, ign or e or cor r ect t h em. IPv6 is not a n ew n et wor k l a yer pr ot ocol . Remember t h is, if a n yt h in g, a bou t IPv6: It is a n evol u t ion a r y st ep f or IP. Ca l mer h ea ds pr eva il ed du r in g t h e t wo yea r s of IPn g wor kin g gr ou p a n d IPv6 h a s become a n ef f icien t IPv4 t h a t is ext en sibl e. IPv4 h a s pr oven t o be a r obu st n et wor k l a yer pr ot ocol a n d t h er e h a ve been ver y f ew ch a n ges t o it over t h e l a st 20 yea r s. Th e biggest pr obl em wit h IPv4 wa s t h e a ddr essin g, a n d t h ese a r e t h e ch a n ges t h a t wer e ma de. Th e a ddr essin g h a s n ot ch a n ged, bu t t h e met h ods of empl oyin g t h e 32-bit a ddr essin g h a ve. IPv6 is a dir ect r esu l t of t h e sh or t a ges of t h e a ddr ess spa ce of IPv4. IPv6 is n ot r evol u t ion a r y. It is t h e n ext st ep in t h e da t a gr a m del iver y pr ot ocol kn own a s IP. It is n ot a r epl a cemen t f or IPv4 per se, bu t t h er e a r e ma n y n ew a n d some r evised f u n ct ion s of t h e pr ot ocol t h a t impr ove u pon it . Cu r r en t l y, t h er e a r e en ou gh f ixes a n d ext en sion s t o t h e IPv4 pr ot ocol (n ot t h a t t h er e a r e ma n y pr obl ems wit h t h e pr ot ocol ) t o ma ke it l a st wel l in t o t h e yea r 2000. I h a ve h ea r d over t h e yea r s, wh y impl emen t a n ew ver sion of IP wh en t h is on e is wor kin g ju st f in e? IPv4 simpl y pu t a Ba n d-Aid a pr obl em wit h in a t ime per iod of n eed t o f u r t h er en h a n ce t h e In t er n et t o r ea ch mor e peopl e a n d bu sin ess r equ ir emen t s. As you r ea d t h r ou gh t h is sect ion , you sh ou l d st a r t t o u n der st a n d t h a t t h e t imin g of t h is u pgr a de t o IP is a bou t r igh t . Th e ca pa bil it ies of IPv6 r equ ir e a mu ch mor e soph ist ica t ed compu t er t h a n wa s r equ ir ed wit h IPv4. Gen er a l l y, IPv4 cou l d r u n on l owpower ed r ou t er s a n d en dst a t ion s. Th e ver sa t il it y of IPv6 wil l ma ke u se of t h e h igh er power ed r ou t er s a n d wor kst a t ion s.

Int r o duc t io n • • • • • • • •

An evol u t ion of IPv4. Bu il ds on IPv4. Most n ot a bl e ch a n ge is a ddr ess ch a n ges t o 128 bit s. Dyn a mic en vir on men t . Requ ir es a mu ch mor e soph ist ica t ed oper a t in g en vir on men t . Over 58 ot h er pr ot ocol s h a ve ch a n ged wit h it . Wil l r u n a s isl a n ds u sin g IPv4 a s t h e ba ckbon e. Ca n n ot simpl y “f l ip a swit ch ” t o con ver t .

Wh en we ch a n ged IP, we did n ot ch a n ge t h e f u n ct ion of a n y ot h er pr ot ocol —a ga in , t h e a dva n t a ge of modu l a r pr ot ocol s. TCP a n d UDP st a yed t h e sa me. Yes, t h e sof t wa r e ca l l s t o t h e IP in t er f a ce a r e dif f er en t : t h e socket in t er f a ce kn own a s Ber kel ey socket s (Un ix), or f or PCs t h e Win sock in t er f a ce. Bu t t h e ba sic f u n ct ion s of TCP/UDP a n d t h e a ppl ica t ion s t h a t u se t h em a r e t h e sa me. Th e ot h er pr ot ocol s t h a t h a ve t o ch a n ge a r e t h ose t h a t dir ect l y in t er f a ce wit h IP. Th ese a r e Doma in Na me Ser ver , DHCP, OSPF, RIP, ICMP, a n d ot h er s. You wil l h ea r a l ot a bou t IPv6 over t h e n ext f ew yea r s, a n d IPv6 impl emen t a t ion s wil l con t in u e t o r ema in a s isl a n ds in t h e IPv4 In t er n et . Th is is t h e cor r ect a ppr oa ch f or IPv6. You ca n n ot “f l ip t h e swit ch ” a s we did in Ja n u a r y 1983 wit h IPv4. Th e In t er n et of t oda y is ext r emel y l a r ge a n d ver y commer cia l . Th er e a r e st il l qu it e a f ew st u dies in pr ogr ess t o det er min e IPv6 a ddr essin g a l l oca t ion , ef f ect s of IPv6 on IPv4 n et wor ks, t u n n el in g, a n d so on . Sl ow-bu t -su r e impl emen t a t ion . Test bef or e impl emen t in g. Appl y a ppl ica t ion s t h a t h a ve a n eed in t h e ma r ket pl a ce t o IPv6. Wor k ou t t h e kin ks bef or e commer cia l iz a t ion .

Wh a t ever

h a ppen ed t o IPv5? Wel l , it exist s a n d is kn own a s t h e In t er n et St r ea m Pr ot ocol (ST2) a n d is def in ed in RFC 1819. ST2 is a n exper imen t a l r esou r ce r eser va t ion pr ot ocol in t en ded t o pr ovide en d-t o-en d r ea l -t ime gu a r a n t ees over a n in t er n et . It a l l ows a ppl ica t ion s t o bu il d mu l t idest in a t ion simpl ex da t a st r ea ms wit h a desir ed qu a l it y of ser vice. Th e r evised ver sion of ST2 specif ied in RFC 1819 is ca l l ed ST2+. ST2 oper a t es a t t h e sa me l a yer a s con n ect ion l ess IP. It h a s been devel oped t o su ppor t t h e ef f icien t del iver y of da t a st r ea ms t o sin gl e or mu l t ipl e dest in a t ion s in a ppl ica t ion s t h a t r equ ir e gu a r a n t eed qu a l it y of ser vice. ST2 is pa r t of t h e IP pr ot ocol f a mil y a n d ser ves a s a n a dju n ct t o, n ot a r epl a cemen t f or , IP. Th e r evised ver sion of ST2 specif ied in RFC 1819 is ca l l ed ST2+. Th e ma in a ppl ica t ion a r ea s of t h e pr ot ocol a r e t h e r ea l -t ime t r a n spor t of mu l t imedia da t a (e.g., digit a l a u dio a n d video pa cket st r ea ms, dist r ibu t ed simu l a t ion /ga min g) a cr oss in t er n et s. ST2 ca n be u sed t o r eser ve ba n dwidt h f or r ea l -t ime st r ea ms a cr oss n et wor k r ou t es.

IPv6 (c o nt inue d) • IPv5 exist s a n d is kn own a s t h e St r ea ms 2 (ST2) Pr ot ocol : • RFC 1819 • Oper a t es a t t h e sa me l a yer a s IP • Devel oped a s a n IP l a yer f or r ea l -t ime a ppl ica t ion s • In cl u des QoS ca pa bil it ies • IPv6 t r u l y wor ks on t h e f in er a spect s of IPv4. • Requ ir es a dyn a mic en vir on men t : • Ma n y discover y opt ion s, in cl u din g: • Au t ocon f igu r a t ion • Fin din g t h e ma ximu m pa t h MTU • Fin din g ot h er wor kst a t ion s wit h ou t ARP • Fin din g r ou t er s

Th e f ou n da t ion of IPv6 is IPv4. Like most gr ea t t h in gs in l if e, you bu il d u pon a f ou n da t ion , somet h in g t h a t you kn ow wor ks. Ca r s, over t h e yea r s, a r e st il l bu il t in t h e sa me f a sh ion a n d st il l h a ve t ir es, t r a n smission s, en gin es, a n d bodies. Bu t a f t er ma n y yea r s, t h e ext en sion s of t h ose ba sics h a ve l ed t o mor e t h a n ju st ba sic t r a n spor t a t ion . Ma n y ef f icien cies a n d a dd-on s h a ve been a ppl ied t o t h e ba sic ca r t o ma ke it sa f er , bet t er f or t h e en vir on men t , a n d so f or t h . Th e biggest ch a n ge t h a t you wil l n ot ice t h r ou gh ou t t h is t ext is t h e wor d dynamic. Rou t er s a n d h ost s discover y ea ch ot h er dyn a mica l l y, h ost s ca n con f igu r e t h emsel ves dyn a mica l l y. Th er e is even a r epl a cemen t f or t h e DHCP pr ot ocol t h a t en f or ces (a n d ef f icien t l y u ses) IP a ddr essin g. An d, of cou r se, t h e biggest ch a n ge of a l l f or IP: t h e a ddr ess! Pl a cin g IPv6-ca pa bl e n odes on a n et wor k wit h ot h er IPv6 n odes a n d IPv6 r ou t er s wil l en a bl e a n IPv6 n et wor k t o be est a bl ish ed immedia t el y via dyn a mics. Neigh bor discover y pr ot ocol s in it ia t e a n d f in d t h e n odes on t h e n et wor k, n odes ca n a u t ocon f igu r e t h eir a ddr esses, a n d r ou t er s simpl y h a ve t o h a ve t h eir in t er f a ces con f igu r ed a n d en a bl ed, a n d of f we go. IPv4 n et wor ks pr eva il , h owever ; pr oba bl y a bou t 99.99 per cen t of a l l n et wor ks a r e IPv4. Th er ef or e, we mu st ma ke IPv6 wor k wit h in t h e bou n ds of t h e exist in g IPv4 n et wor k.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 140 IPv6 Features IPv6 Fe at ur e s • • • • • •

Ext en ded a ddr essin g ca pa bil it ies. Hea der f or ma t simpl ica t ion . Impr oved su ppor t f or ext en sion s a n d opt ion s. Fl ow l a bel ca pa bil it y. Au t h en t ica t ion a n d pr iva cy ca pa bil it ies. IPv6 r ou t in g simil a r t o IPv4 r ou t in g u sin g CIDR. • OSPF, RIP, IDRP, a n d IS-IS ca n be u sed wit h min or modif ica t ion s

Widespr ea d impl emen t a t ion of IPv6 wil l

be ph a sed in f or t h e n ext cou pl e of yea r s. IPv6 is u p a n d r u n n in g t oda y, h owever , t h r ou gh a ser ies of isl a n ds t h a t r u n a u t on omou sl y a n d a l so u se pa r t of t h e cu r r en t IPv4 In t er n et . It is kn own a s t h e 6Bon e a n d compl et e in f or ma t ion ca n be f ou n d a t : www.6bon e.n et . IPv6 ca n be gr ou ped in t o t h e f ol l owin g ca t egor ies: Expande d addr e ssing c apabil it ie s. IPv6 in cr ea ses t h e IP a ddr ess siz e f r om 32 bit s t o 128 bit s t o su ppor t mor e l evel s of a ddr essin g h ier a r ch y, a mu ch gr ea t er n u mber of a ddr essa bl e n odes, a n d simpl er a u t ocon f igu r a t ion of a ddr esses. Th er e a r e t h r ee t ypes of a ddr esses: u n ica st , a n yca st , a n d mu l t ica st . Th e sca l a bil it y of mu l t ica st r ou t in g is impr oved by a ddin g a “scope” f iel d t o mu l t ica st a ddr esses. Th er e is n o br oa dca st a ddr ess def in ed. He ade r f o r mat simpl if ic at io n. To ma ke IPv6 mor e ef f icien t , some of t h e h ea der f iel ds h a ve been dr opped a n d t h e h ea der is a st a t ic 40 byt es. Impr o ve d suppo r t f o r e xt e nsio ns and o pt io ns. Sin ce t h e IP h ea der is a st a t ic 40

byt es a n d ch a n ges in t h e h ea der ca n n ot be ma de, t h e con cept of h ea der ext en sion s is in . Th is pr ovides gr ea t er f l exibil it y f or in t r odu cin g n ew opt ion s in t h e f u t u r e. Fl o w l abe l ing c apabil it y. A n ew ca pa bil it y is a dded t o en a bl e t h e l a bel in g of pa cket s bel on gin g t o pa r t icu l a r t r a f f ic “f l ows” f or wh ich t h e sen der r equ est s specia l h a n dl in g, su ch a s n on def a u l t qu a l it y of ser vice or “r ea l -t ime” ser vice. Aut he nt ic at io n and pr ivac y c apabil it ie s. Added su ppor t f or a u t h en t ica t ion , da t a in t egr it y, a n d opt ion a l da t a con f iden t ia l it y t h r ou gh t h e ext en sion s. IPv6 r ou t in g u ses t h e con cept of pr ef ix r ou t in g. Ever y a ddr ess h a s a n a ssocia t ed pr ef ix wh ich is simpl y a ma sk iden t if ier t o in dica t e h ow ma n y of t h e bit s, st a r t in g f r om t h e l ef t a r e u sed f or r ou t in g a n d h ow ma n y bit s a r e u sed t o iden t if y a h ost . Th e r ou t er s wil l u se t h e pr ef ix in or der t o bu il d r ou t in g t a bl es. En d st a t ion s ma ke t h e pr ef ix simil a r t o t oda y’s su bn et ma sk. Th e exist in g r ou t in g pr ot ocol s ca n empl oy IPv6 a ddr esses a s wel l . Th er e is n o n eed t o specif ica l l y u pgr a de you r n et wor k t o empl oy In t er doma in Rou t in g Pr ot ocol t o u se IPv6. Th e exist in g r ou t in g pr ot ocol s most l y h a ve t o ch a n ge t o u n der st a n d 128-bit a ddr essin g.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 141 From IPv4 to IPv6 IPv6 wa s n ot

t h e r esu l t of on e meet in g. Ma n y pr oposa l s wer e devel oped a n d a l gor it h ms wer e exper imen t ed wit h bef or e bein g pr esen t ed. On e pr oposa l t h a t h a d a l ot of su ppor t wa n t ed t o r epl a ce IP wit h t h e ISO (In t er -n a t ion a l Or ga n iz a t ion f or St a n da r diz a t ion ) OSI CLNP Pr ot ocol . ISO CLNP (Con n ect ion l ess Pr ot ocol ), wh ich wa s demon st r a t ed a s TUBA (TCP a n d UDP over Bigger Addr esses. RFCs 1247, 1526, a n d 1561). Wit h ma n y ch a n ges t o t h e TCP a n d IP l a yer s, IP ver sion 7 (a l so kn own a s TP/IX. RFC 1475) even t u a l l y evol ved in t o t h e CATNIP (RFC 1707). IP in IP evol ved in t o IPAE (IP Addr ess En ca psu l a t ion ). It pr oposed r u n n in g t wo l a yer s of t h e IP pr ot ocol , on e f or t h e wor l dwide ba ckbon e a n d on e f or t h e r egion a l IP n et wor ks. Th is even t u a l l y evol ved in t o Simpl e IP, or SIP. Th is moved t h e a ddr ess t o 64 bit s a n d did a wa y wit h some of t h e u n u sed f ea t u r es of ICMP. Du r in g 1992 a n d 1993, t h e Pip in t er n et pr ot ocol , devel oped a t Bl ea ch er , wa s on e of t h e ca n dida t e r epl a cemen t s f or IP. It h a d ma n y impr ovemen t s in r ou t in g st r a t egies a n d in mid-1993, Pip wa s mer ged wit h t h e Simpl e In t er n et Pr ot ocol (SIP), cr ea t in g SIPP (SIP Pl u s). SIPP (RFC 1710) is a n ew ver sion of IP design ed t o be a n evol u t ion a r y st ep f r om IPv4. It ca n be in st a l l ed a s a n or ma l sof t wa r e u pgr a de in in t er n et devices a n d is in t er oper a bl e wit h t h e cu r r en t IPv4.

Fr o m IPv4 t o IPv6 • Bu il t u p t o t h e IPv6 specif ica t ion t h a t we h a ve t oda y u sin g va r iou s pr oposa l su bmission s su ch a s: • ISO CLNP—demon st r a t ed a s TUBA (TCP a n d UDP over Bigger Addr esses) • IP ver sion 7 (a ka TP/IX, RFC 1475) • IP in IP—evol ved t o IP a ddr ess en ca psu l a t ion • PIP—mer ged in t o SIP cr ea t in g SIPP (RFC 1710)

Wh il e it is t r u e t h a t IPv6 sol ves t h e a ddr essin g pr obl em, a s you ca n see f r om t h e pr ecedin g l ist , it h a s a f ew ot h er pr oper t ies t h a t impr oved u pon t h e IPv4 pr ot ocol .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 142 IP Version Numbers According to RFC 1700 Th e f ol l owin g t a bl e iden t if ies t h e IP ver sion n u mber s. Th er e a r e mor e t h a n you pr oba bl y t h ou gh t ! IP Ve r sio n Numbe r s Ac c o r ding t o RFC 1700 De c imal

Ke ywo r d

0 1–3 4 5 6 7

Reser ved Un a ssign ed IP ST IPv6 TP/IX

8

PIP

9

TUBA

10–14 15

Un a ssign ed Reser ved156

Ve r sio n

Re f e r e nc e s

In t er n et Pr ot ocol ST Da t a gr a m Mode RFC 1883 TP/IX: Th e Next In t er n et Th e P In t er n et Pr ot ocol TCP a n d UDP over Bigger Addr esses

RFC 791 RFC 1190, JWF

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 143 IPv6 Header Not ice t h e dif f er en ces bet ween IPv4 a n d IPv6 h ea der s. IPv6 seems t o be missin g a f ew opt ion s, bu t t h ey a r e t h er e; t h ey ju st ca n n ot be seen (yet !). In f a ct , t h e on l y f iel d t h a t seems t o n ot h a ve ch a n ged or moved posit ion s is t h e VERS f iel d. Th is f iel d wa s t o pl a y a gr ea t r ol e. It wa s goin g t o be u sed a s t h e del in ea t in g f a ct or t o det er min e if a r eceived IP pa cket wa s ba sed on IPv4 or IPv6. In ot h er wor ds, t h e Et h er Type f iel d of a n Et h er n et pa cket wou l d r ema in a s 0800(h ) a n d t h e ver sion f iel d of t h e h ea der wou l d det er min e t h e pr ocessin g of a r eceived IP da t a gr a m. Th is ch a n ged a n d IPv6 h a s it s own Type (f or Et h er n et pa cket s) f iel d: 86DD(h ) (a n d SAP in IEEE 802 n et wor ks). Th e in t er n et pr ot ocol (ver sion 4) u ses f ou r key mech a n isms t o pr ovide it s ser vice: Type of Ser vice (TOS), Time t o Live (TTL), Opt ion s, Fr a gmen t a t ion , Pr ot ocol a n d Hea der Ch ecksu m. However , in l ookin g a t t h e sl ide, t h ese f iel ds a r e missin g. Th ese mech a n isms wer e pr eviou sl y discu ssed, bu t t h e opt ion s f iel d is f u r t h er descr ibed h er e. Th e Opt ion s pr ovide f or con t r ol f u n ct ion s n eeded or u sef u l in some sit u a t ion s bu t u n n ecessa r y f or t h e most common commu n ica t ion s. Th e opt ion s in cl u de pr ovision s f or t imest a mps, secu r it y, a n d specia l r ou t in g (st r ict a n d l oose sou r ce r ou t e—n ot h in g t o do wit h Token Rin g). However , over t h e yea r s, it wa s n ot iced t h a t t h ese opt ion s f iel ds wer e n ot bein g u sed by t h e ma jor it y of In t er n et h ost s f or va r iou s r ea son s. Fir st , IP da t a gr a ms t h a t con t a in opt ion s ca n n ot be simpl y f or wa r ded; t h ey r equ ir e specia l a t t en t ion . Th ey a r e pl a ced in a n ot h er qu eu e a n d t h e r ou t er oper a t es on t h is qu eu e sepa r a t el y f r om t h e r eceived da t a gr a m qu eu e. Secon d, if t h e opt ion s f iel ds wer e n ot u sed ver y of t en , ma n y impl emen t er s of r ou t er s did n ot opt imiz e t h eir sof t wa r e t o oper a t e on da t a gr a ms t h a t in cl u ded specia l opt ion s. Th is gen er a l l y r esu l t ed in a per f or ma n ce pen a l t y on t h e r ou t er .

IPv6 Hea der

So, wh y h a ve t h em? Wel l , t h eir f u n ct ion s are u sed in some ca ses. IP mu l t ica st in g, f or exa mpl e, u ses t h e l oose sou r ce r ou t e opt ion wh en in cor por a t in g t h e t u n n el in g mech a n ism f or DVMRP (r ef er t o Pa r t V, “Mu l t ica st in g,” t o u n der st a n d mor e IPv6 decided t o a l l ow f or it t o be ext en sibl e, so IPv6 impl emen t s t h e con cept of a n extension header.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 144 IPv4 Options — A Review IPv4 Opt io ns — A Re vie w • • • • • •

Secu r it y Loose sou r ce r ou t in g St r ict sou r ce r ou t in g Recor d r ou t e St r ea m ID In t er n et t imest a mp

Wit h t h e IP h ea der

becomin g f ixed, a l l of t h e opt ion s f iel ds in t h e h ea der wer e n ot el imin a t ed compl et el y, t h ey mer el y ch a n ged f or ms. Ba sica l l y, IPv4 opt ion s a r e n ow IP h ea der ext en sion s. Th e f ol l owin g a r e t h e IPv4 opt ion s: Se c ur it y. Used t o ca r r y secu r it y, compa r t men t a t ion , u ser gr ou p (TCC), a n d h a n dl in g r est r ict ion codes compa t ibl e wit h DOD r equ ir emen t s. Lo o se so ur c e r o ut ing . Va r ia bl e in l en gt h a n d u sed t o r ou t e t h e in t er n et da t a gr a m ba sed on in f or ma t ion su ppl ied by t h e sou r ce. Not a l l t h e r ou t in g h ops wil l be in t h is f iel d. Th is opt ion a l l ows some f l exibil it y in pr ovidin g a pa t h . St r ic t so ur c e r o ut ing . Va r ia bl e in l en gt h a n d u sed t o r ou t e t h e in t er n et da t a gr a m ba sed on in f or ma t ion su ppl ied by t h e sou r ce. Th e r ou t in g in f or ma t ion pr ovided in t h is f iel d mu st be expl icit l y f ol l owed. Re c o r d r o ut e . Va r ia bl e in l en gt h a n d u sed t o t r a ce t h e r ou t e a n in t er n et da t a gr a m t a kes. St r e am ID. Used t o ca r r y t h e st r ea m iden t if ier . Int e r ne t t ime st amp. Th e t imest a mp is a r igh t -ju st if ied, 32-bit f iel d t h a t in dica t es a t ime in mil l isecon ds sin ce midn igh t UT (Un iver sa l Time). Th er e a r e pl a ceh ol der s f or mu l t ipl e t imest a mps a n d a f l a gs f iel d t o in dica t e t imest a mps on l y. A t imest a mp is pr eceded wit h t h e in t er n et a ddr ess of t h e r egist er in g en t it y, t h e in t er n et

a ddr ess f iel ds a r e pr especif ied, or a n IP modu l e on l y r egist er s it s t imest a mp if it ma t ch es it s own a ddr ess wit h t h e n ext specif ied in t er n et a ddr ess. Th is ca n be u sed f or mea su r emen t s of t h e t r a n spor t l a yer pr ot ocol s a n d ot h er u t il it ies.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 145 IPv4 and IPv6 Header Differences Th e f ir st

t h in g t o n ot ice a bou t t h e IPv6 h ea der is t h a t it is a st a t ic 40 byt es in l en gt h . Th e l en gt h of t h e pa cket h ea der is n ot va r ia bl e in l en gt h . Th e ch ecksu m wa s r emoved. IP f ir st r a n over copper ser ia l l in es t h a t t en ded t o be n oisy (st a t ic in voice spea k). Ch ecksu ms a r e a l l over t h e TCP/IP pr ot ocol su it e a n d a l l over t h e a ccess met h ods of FDDI, Et h er n et , a n d Token Rin g. Th e r emova l of t h e ch ecksu m a l so a l l owed f or a l l syst ems t h a t f or wa r ded IP da t a gr a ms t o speed u p beca u se t h ey do n ot h a ve t o compu t e t h e ch ecksu m a t ever y h op. Ipv4 and Ipv6 He ade r Dif f e r e nc e s • • • • • •

IPv6 h ea der is a st a t ic 40 byt es in l en gt h . Tot a l l en gt h f iel d is r epl a ced wit h pa yl oa d l en gt h . IPv6 a l l ows f or ju mbogr a ms (l a r ger t h a n 64k). Ext en sion h ea der s. TTL f iel d is r epl a ced wit h t h e h op l imit . Ma n y IPv4 opt ion s wer e moved t o in depen den t pr ot ocol s.

IPv4’s t ot a l -l en gt h f iel d is r epl a ced wit h a pa yl oa d l en gt h . No sign if ica n t ch a n ges h er e except t h a t IPv6 is a st a t ic 40 byt es, so t h e pa yl oa d l en gt h is t r u l y a mea su r emen t of t h e pa yl oa d a n d t h e IPv6 h ea der is n ot in cl u ded a s pa r t of t h e su m. Th is f iel d is 16 bit s in l en gt h , wh ich a l l ows f or a ma ximu m of 65,355 byt e pa yl oa d. However , IPv6 a l l ows f or a n ew con cept kn own a s jumbo datagrams (ju mbogr a ms), wh ich a l l ows f or va r iou s n et wor k a t t a ch men t s su ch a s I/O con n ect ion s bet ween h igh -speed compu t er s t h a t ca n pr ocess da t a segmen t s h igh er t h a n 64k (see RFC 2146). On e of t h e mor e in t er est in g ch a n ges t o IP wit h ver sion 6 is t h e con cept of concatenated headers. Th is is a ccompl ish ed u sin g t h e n ext h ea der f iel d on t h e IPv6 h ea der . In IPv6, t h e pr ot ocol t ype f iel d is set a n d t h a t h ea der wou l d immedia t el y f ol l ow. For exa mpl e, if

t h e pa yl oa d wa s UDP t h en t h e pr ot ocol t ype is set t o 17(decima l ) a n d t h e UDP h ea der wou l d immedia t el y f ol l ow. Th e Time t o Live (TTL) f iel d is on e of t h e mor e ver sa t il e f iel ds in IP. It is u sed t o pr even t da t a gr a ms f r om con st a n t l y l oopin g, keep pa cket s on a l oca l n et wor k, u sed in mu l t ica st da t a gr a ms t o in dica t e scope (h ea r in g r a n ge), a n d pr oba bl y h a s ma n y ot h er pr iva t e u ses a s wel l . In IPv6, t h is f iel d is r en a med t o Hop Limit , beca u se it is r ea l l y u sed a s a cou n t down -by-1 cou n t er . Th e or igin a l in t en t ion of t h e f iel d wa s t o in dica t e a t ime (in secon ds). It cou l d be u sed, f or exa mpl e, by a r ou t er . If t h e r ou t er ca n n ot f or wa r d t h e pa cket wit h in t h e a mou n t of t ime in dica t ed in t h e TTL f iel d, it sh ou l d disca r d t h e da t a gr a m a n d gen er a t e a n ICMP messa ge. However , over t ime, most r ou t er del a ys wer e mea su r ed in mil l isecon ds, n ot secon ds. Th e a ccept ed decr emen t of t h e f iel d wa s set t o 1, a n d t h er ef or e beca me a h op cou n t a n d n ot a n in dica t ion of t ime.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 146 IPv6 Extension Headers Sin ce t h e f iel ds on t h e pr eceedin g sl ide wer e del et ed f r om u se in t h e IPv6 h ea der

h ow do we con t in u e t h eir u se? For exa mpl e, h ow do we in dica t e t h e pr ot ocol of t h e n ext h ea der ? Th e IPv6 h ea der is st r a igh t f or wa r d. Some of t h e opt ion s f or IPv4 wer e bet t er ser ved by ot h er TCP/IP pr ot ocol s a n d some wer e kept a s a pa r t of IPv6 a n d a r e n ow kn own a s IPv6 ext en sion h ea der s. Th ese ext en sion h ea der s a l l ow f or IPv6 t o become ext en sibl e beyon d a specif ied (a n d l imit ed) opt ion s f iel d. It ca n be modif ied a t l a t er da t es t o in cl u de ot h er opt ion s. Th e cu r r en t IPv6 specif ica t ion ca l l s f or t h e f ol l owin g h ea der s (in t h e or der t h ey sh ou l d a ppea r in t h e da t a gr a m): IPv6 he ade r (n ot dir ect l y pa r t of t h e ext en sion s bu t sh own h er e t o sh ow h ea der or der ). Ho p-by-Ho p Opt io ns (RFC 1883). Th e Hop-by-Hop Opt ion s h ea der is u sed t o ca r r y opt ion a l in f or ma t ion t h a t mu st be exa min ed by ever y n ode a l on g a pa cket ’s del iver y pa t h . On e of t h e opt ion s is t h e ju mbo da t a gr a m opt ion . De st inat io n Opt io ns (RFC 1883). Th e Dest in a t ion Opt ion s h ea der is u sed t o ca r r y opt ion a l in f or ma t ion t h a t n eeds be exa min ed on l y by a pa cket ’s dest in a t ion n ode(s). Ro ut ing (Type 0) (RFC 1883). Th e Rou t in g h ea der is u sed by a n IPv6 sou r ce t o l ist on e or mor e in t er media t e n odes t o be “visit ed” on t h e wa y t o a pa cket ’s dest in a t ion . Th is f u n ct ion is ver y simil a r t o IPv4’s Sou r ce Rou t e opt ion s. Fr ag me nt (RFC 1883). Th e Fr a gmen t h ea der is u sed by a n IPv6 sou r ce t o sen d pa cket s l a r ger t h a n wou l d f it in t h e pa t h MTU t o t h eir dest in a t ion s. Aut he nt ic at io n (RFC 1826). Enc apsul at ing Se c ur it y Payl o ad (RFC 1827). Uppe r -l aye r he ade r . (n ot pa r t of t h e ext en sion h ea der , bu t sh own h er e t o sh ow or der ).

IPv6 Ext en sion Hea der s Fr om en d-t o-en d commu n ica t ion , t h ese f iel ds sh ou l d be ign or ed by a l l st a t ion s t h a t ma y r eceive it . Th ese f iel ds a r e gen er a l l y bu il t a n d con su med by t h e sou r ce a n d dest in a t ion st a t ion s on l y. Th e except ion is t h e h op-by-h op opt ion s f iel d, wh ich ma y be r eviewed by r ou t er s in t h e pa t h t o t h e dest in a t ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 147 Fragmentation An ot h er

missin g f iel d dea l s wit h f r a gmen t a t ion wa s discou r a ged in IPv4. It con t in u es t o be discou r a ged in IPv6, bu t t h e on u s of pr ot ocol wa s pa ssed t o t h e sou r ce n ode in st ea d of t h e r ou t er , l ike in IPv4. In or der t o sen d a pa cket t h a t is t oo l a r ge t o f it in t h e MTU of t h e pa t h t o it s dest in a t ion , a sou r ce n ode ma y divide t h e pa cket in t o f r a gmen t s a n d sen d ea ch f r a gmen t a s a sepa r a t e pa cket , t o be r ea ssembl ed a t t h e dest in a t ion . Fr a gmen t a t ion ca u ses pr obl ems ma in l y du e t o ef f icien cy of t h e r ou t er s a n d en dst a t ion s. An y missin g f r a gmen t ca u ses t h e wh ol e TCP segmen t t o be r et r a n smit t ed (RFC 1122, pa ge 58). Th is cr ea t es ba n dwidt h pr obl ems, memor y pr obl ems, a n d CPU cycl es. In IPv4 it con su mes con sider a bl e r esou r ces on t h e r ou t er (f r a gmen t a t ion ) a n d h ost (r ea ssembl y). IPv6 en cou r a ges impl emen t in g RFC 1191. Th is is t h e specif ica t ion f or dyn a mic path MTU discovery, or h a vin g t h e h ost dyn a mica l l y f in d ou t ma ximu m pa cket siz es f or t h e pa t h t o t h e dest in a t ion (t h a t is, det er min e t h e n et wor ks t h a t t h e da t a gr a m wil l t r a n sit ). MTU is t h e a cr on ym f or maximum transmit unit, or “h ow l a r ge a da t a gr a m ca n I t r a n smit t o t h e dest in a t ion st a t ion .” By en a bl in g t h is, we el imin a t e t h e pa cket iden t if ica t ion , t h e con t r ol f l a gs, a n d t h e f r a gmen t of f set . An y l ost f r a gmen t mea n s a l l t h e f r a gmen t s in t h e segmen t mu st be r et r a n smit t ed (RFC 1122, pa ge 58).

Fr a gmen t a t ion Most h ost s simpl y a void t h e pr obl em of discover in g t h e ma ximu m siz e of a pa cket on t h e dest in a t ion pa t h (if n ot l oca l ) a n d set t h e pa cket siz e t o 576 byt es (t h e a ccept ed min imu m pa cket siz e f or most IP n et wor ks), even t h ou gh RFC 1191 pr esen t s a simpl e wa y t o det er min e t h is. Some impl emen t a t ion s t r a n smit a l a r ge pa cket a n d wa it t o see if a n ICMP “da t a gr a m t oo big” messa ge is r et u r n ed. Th e or igin a t in g h ost wil l r et u r n t o u sin g 576-byt e pa cket s. Pickin g t h e r igh t siz e is a ver y compl ex ma t t er a n d most h ost s st ick t o 576 byt es f or n on l oca l dest in a t ion h ost s.

Th is el imin a t es f r a gmen t a t ion a n d a ssocia t ed pr obl ems. However , t h is a l so cr ea t es a n in ef f icien cy in t h a t some n et wor ks a l l ow f or l a r ge pa cket siz es. Ima gin e t r a n sf er r in g in f or ma t ion bet ween Token Rin g n et wor ks sepa r a t ed by a n FDDI ba ckbon e. Not a l l n et wor ks a r e Et h er n et . Wh y move t h e siz e down t o 512 byt es ju st beca u se t h e da t a t r a ver ses r ou t er s? Th er e ca n be con sider a bl e con sequ en ces if t h e f il e is 100 Mbyt es in l en gt h . Th er ef or e, MTU discover y is mor e ef f icien t t h a n f r a gmen t a t ion by spr ea din g t h e r espon sibil it y a r ou n d t o mu l t ipl e en t it ies. Pa t h MTU discover y is discu ssed in RFC 1191. It ch a n ged pa r t of t h e ICMP RFC 793 in t h a t it r ecommen ds u sin g on e of t h e pr eviou sl y u n u sed h ea der f iel ds a s t h e n ext -h op MTU-siz e in dica t or . Th is is a n in t er est in g a spect of ICMP f or IPv6 in t h a t it r ea l l y does impr ove u pon pr eviou s exper ien ce a n d kn owl edge a n d does n ot in t en d t o r epl a ce.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 149 IPv6 Addressing Th e a ddr essin g of IPv6 is pr oba bl y t h e best -kn own f ea t u r e of IPv6. Ask a n yon e a bou t t h e dif f er en ces bet ween IPv4 a n d IPv6, a n d t h e f ir st r espon se wil l be t h e ch a n ge f r om 32bit t o 128-bit a ddr essin g. Wh il e it is t r u e t h a t t h e a ddr essin g wa s ch a n ged t o 128 bit s, t h er e a r e ma n y mor e f ea t u r es a bou t t h e a ddr ess spa ce a n d it s a l l oca t ion t h a t wer e ca r ef u l l y cr a f t ed. Th e f ir st expa n sion of t h e a ddr ess spa ce wa s t o 64 bit s. It wa s l a t er in cr ea sed t o 128 bit s. It wa s pr oven t h a t 64 bit s wa s ea sil y a dequ a t e bu t 128 bit s wa s t h e f in a l ou t come. IPv6 a ddr esses pr ovide t h e sa me f u n ct ion a s IPv4: iden t if ier s f or in t er f a ces a n d set s of in t er f a ces. Even t h ou gh 128 bit s a r e wr it t en f or u se, cu r r en t l y on l y 15 per cen t of t h e a va il a bl e a ddr ess spa ce is a l l oca t ed f or u se. Th er e a r e t h r ee t ypes of a ddr esses: Unic ast . An iden t if ier f or a sin gl e in t er f a ce. A u n iqu e a ddr ess del iver ed t o a sin gl e dest in a t ion . Anyc ast . New f or IP (ver sion 6), a n a n yca st a ddr ess is a n iden t if ier f or a set of in t er f a ces (t ypica l l y bel on gin g t o dif f er en t n odes). Th is is simil a r t o a mu l t ica st , bu t a pa cket sen t t o a n a n yca st a ddr ess is del iver ed t o on e of t h e in t er f a ces iden t if ied by t h a t a ddr ess (t h e “n ea r est ” on e, a ccor din g t o t h e r ou t in g pr ot ocol s’ mea su r e of dist a n ce). Mul t ic ast . An iden t if ier f or a set of in t er f a ces (t ypica l l y bel on gin g t o dif f er en t n odes). A pa cket sen t t o a mu l t ica st a ddr ess is del iver ed t o a l l in t er f a ces iden t if ied by t h a t a ddr ess.

IPv6 Addr e ssing • Unic ast —iden t if ies a sin gl e in t er f a ce. • Anyc ast —n ew f or IPv6, it iden t if ies a set of in t er f a ces u su a l l y bel on gin g t o dif f er en t n odes. Used t o del iver da t a gr a ms t o t h e “n ea r est ” of t h e in t er f a ces. • Mul t ic ast —a n iden t if ier bel on gin g t o a gr ou p of in t er f a ces. IPv6 ext en sivel y u ses t h e mu l t ica st in t er f a ce. • Th er e is n o br oa dca st a ddr ess in IPv6.

In IPv6, a br oa dca st a ddr ess is n ot def in ed. It wa s su per seded by mu l t ica st a ddr esses.

In IPv4, we iden t if ied a ddr esses by t h eir

32-bit va l u e, n or ma l l y, wr it t en in a f or m kn own a s dotted-decimal notation; f or exa mpl e, 132.1.8.10. An IPv6 a ddr ess is wr it t en in h exa decima l a n d con sist s of gr ou pin gs of 8 con t a in in g 4 h exa decima l digit s or 8 gr ou ps of 16 bit s ea ch . Th is t a kes t h e f or m: xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 is a n exa mpl e of a n IPv6 a ddr ess. An ot h er exa mpl e is t h e f ol l owin g u n ica st a ddr ess: 1080:0000:0000:0000:0008:0800:200C:417A Sin ce wr it in g a n IPv6 a ddr ess h a s become u n wiel dy (DNS becomes ver y impor t a n t h er e), t h er e a r e pr ovision s a l l owed t o con den se t h e a ddr ess in t o it s sma l l est a va il a bl e f or m. Th er ef or e, t h e pr ecedin g u n ica st a ddr ess ca n be compr essed in t o: 1080:0:0:0:8:800:200C:417A or even 1080::8:800:200C:417A

Th e dou bl e col on h a s specia l sign if ica n ce. It is a dema r ca t ion poin t f or compr essin g l ea din g 0s. Not ice h er e t h a t on l y l ea din g 0s ca n be compr essed a n d t h e :: symbol ca n be u sed on l y on ce du r in g t h e compr ession . Th er ef or e if you h a d t h e a ddr ess of : 1080:0:0:5698:0:0:9887:1234 you ca n n ot wr it e it a s:

1080::5698::9887:1234 Th e a l gor it h m t h a t r u n s t h e expa n sion f or t h e a ddr ess wou l d get con f u sed. How ma n y 0s go in ea ch of t h e col on -compr essed sl ot s? Th e cor r ect wa y t o compr ess t h is a ddr ess wou l d be t o compr ess on e or t h e ot h er sides.

IPv6 Addr essin g (con t in u ed) 1080::5698:0:0:9887:1234 or 1080:0:0:5698:: 9887:1234164

As wit h IPv4, t h e f ir st

f ew bit s of t h e IPv6 a ddr ess t el l s somet h in g a bou t t h e a ddr ess (t h is h a s n ot h in g t o do wit h Cl a ss a ddr essin g). Th e t a bl e in Sect ion 165 sh ows t h is. Th is t ime we a r e n ot dea l in g wit h cl a sses or a ddr esses, mor e so wh er e t h e a ddr ess h a s been a ssign ed a n a ddr ess t ype a n d is kn own a s t h e f or ma t pr ef ix. To get t h e a mou n t of spa ce u sed is simpl e. Th e f or mu l a is 1 / 2 n X, wh er e x is t h e n u mber of bit s u sed. For exa mpl e, if t h e f ir st 8 bit s a r e 0000 0000, t h en t h is is 1 / 2 n 8, or 1/256. IPv6 Addr e ssing (c o nt inue d) • Th e f ir st f ew bit s a r e in dica t or s (a s sh own in a momen t ). • Th ey do n ot r egist er a s a Cl a ss of a ddr ess a s in IPv4. • Simil a r t o CIDR, pr ef ixes a r e u sed t o in dica t e t h e r ou t in g. • Specia l a ddr esses a r e r eser ved: • Un specif ied a ddr ess • Loopba ck a ddr ess • Embedded IPv4 a ddr ess • Mu l t ica st a ddr ess

Pr ef ixes a r e a l so u sed in t h is en vir on men t ju st l ike in t h e CIDR en vir on men t . A /30 in dica t es t h e f ir st 30 bit s a r e u sed f or r ou t in g. Al so n ot ice t h a t f iel ds in cer t a in t ypes of a ddr esses a r e given n a mes t o f u r t h er iden t if y t h e su ba ddr ess por t ion s. Ref er t o sl ide 165 f or a n exa mpl e. Th er e a r e t h r ee a ddr ess t ypes t h a t a r e a ssign ed ou t of t h e 0000 0000 f or ma t pr ef ix spa ce. Th ese a r e t h e “u n specif ied a ddr ess,” t h e l oopba ck a ddr ess, a n d t h e IPv6 a ddr esses wit h embedded IPv4 a ddr esses. Th is a l l oca t ion su ppor t s t h e dir ect a l l oca t ion of pr ovider a ddr esses, l oca l u se a ddr esses, a n d mu l t ica st a ddr esses. Spa ce is r eser ved f or NSAP a ddr esses, IPX a ddr esses, a n d geogr a ph ic a ddr esses. Th e r ema in der of t h e a ddr ess spa ce is

u n a ssign ed f or f u t u r e u se. Th is ca n be u sed f or expa n sion of exist in g u se (e.g., a ddit ion a l pr ovider a ddr esses, et c.) or n ew u ses (e.g., sepa r a t e l oca t or s a n d iden t if ier s). A va l u e of FF (11111111) iden t if ies a n a ddr ess a s a mu l t ica st a ddr ess; a n y ot h er va l u e iden t if ies a n a ddr ess a s a u n ica st a ddr ess. Mu l t ica st a ddr esses a r e u sed ext en sivel y t h r ou gh ou t a u t ocon f igu r a t ion of a ddr esses a n d n eigh bor discover y. An yca st a ddr esses a r e t a ken f r om t h e u n ica st a ddr ess spa ce, a n d a r e n ot syn t a ct ica l l y dist in gu ish a bl e f r om u n ica st a ddr esses.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 150 IPv6 Addressing Prefix Ref er

t o sl ide 165.

IPv6 Addr e ssing Pr e f ix Al l o c at io n

Pr e f ix (binar y)

Fr ac t io n o f Addr e ss Spac e

Reser ved Un a ssign ed Reser ved f or NSAP Al l oca t ion Reser ved f or IPX Al l oca t ion Un a ssign ed Un a ssign ed Un a ssign ed Un a ssign ed Pr o vide r -base d Un ica st a ddr ess Un a ssign ed Reser ved f or geogr a ph ic-ba sed u n ica st a ddr esses Un a ssign ed Un a ssign ed Un a ssign ed Un a ssign ed Un a ssign ed

0000 0000 0000 0001

1/256 1/256

0000 001

1/128

0000 010 0000 011 0000 1 0001 001

1/128 1/128 1/32 1/16 1/8

010 011

1/8 1/8

100 101 110 1110 1111 0 1111 10

1/8 1/8 1/8 1/16 1/32 1/64

Un a ssign ed Un a ssign ed Link l o c al use Addr esses Sit e Loca l Use Addr esses 1111 1110 11 Mu l t ica st Addr esses

1111 110 1111 1110 0

1/128 1/512

1111 1110 10

1/1024

1/1024 1111 1111

1/256166

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 151 6Bone Test Addressing Th er e is a n a ddr ess t h a t

is r eser ved f or t est in g IPv6 on t h e IPv6 Ba ckbon e (6Bon e). Th e f ol l owin g sl ide sh ows t h e IPv6 (6Bon e) t est a ddr essin g a s a ssign ed by IANA.

6Bon e Test Addr essin g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 152 Provider-Based IPv6 Addressing Like t oda y’s in t er n et , IP a ddr esses wil l

be h a n ded ou t by a n in t er n et ser vice pr ovider (a n ISP su ch a s Min dSpr in gt m, MCIt m, AT&Tt m, Con cen t r ic Net wor kst m, a n d a n y of t h e ot h er t h ou sa n ds of in t er n et con n ect ivit y pr ovider s ou t t h er e). Con n ect ion of a commer cia l en t it y dir ect l y t o t h e In t er n et wil l n ot be a l l owed, u n l ess t h a t en t it y is a n ISP. Th e a ddr ess sh own on t h is sl ide wa s ext r a ct ed f r om t h e pr eviou s sl ide f or it is t h e most common a ddr ess f or ma t t h a t wil l be u sed (except f or t h e mu l t ica st a ddr esses). Th e f ir st 3 bit s iden t if y t h e a ddr ess a s a pr ovider -or ien t ed u n ica st a ddr ess. Th e registry ID iden t if ies t h e in t er n et a ddr ess r egist r y (cu r r en t l y In t er NIC [f or t h e Amer ica s], APNIC [f or Asia -Pa cif ic], a n d RIPE [f or Eu r ope] wh ich a ssign s pr ovider iden t if ier s, in dica t ed by t h e provider ID f iel d, t o in t er n et ser vice pr ovider s, wh ich t h en a ssign s por t ion s of t h e a ddr ess spa ce t o su bscr iber s. Th is is a pr ocess simil a r t o t h e a ddr ess a ssign men t pol icy u sed wit h CIDR a n d descr ibed in RFC 2050. Th e subscriber ID dist in gu ish es a mon g mu l t ipl e su bscr iber s a t t a ch ed t o t h e in t er n et ser vice pr ovider iden t if ied by t h e pr ovider ID. Th is is l ike a cu st omer n u mber . Th e subnet ID iden t if ies a specif ic ph ysica l l in k. Th er e ca n be mu l t ipl e su bn et s on t h e sa me ph ysica l l in k; h owever , a specif ic su bn et ca n n ot spa n mu l t ipl e ph ysica l l in ks. Th e interface ID iden t if ies a sin gl e in t er f a ce a mon g t h e gr ou p of in t er f a ces iden t if ied by t h e su bn et pr ef ix.

Pr ovide-Ba sed IPv6 Addr essin g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 153 Local-Use IPv6 Addressing Th is a ddr essin g is u sed exa ct l y a s t h e n a me impl ies: l oca l l y. Th is ca n be su bn et

l oca l or su bscr iber l oca l , wh ich gives t h e t wo n a mes link local a n d site local. Th e sl ide sh ows t h e f or ma t of t h ese t wo a ddr essin g t ypes. Not ice t h a t bot h a ddr essin g t ypes u se t h e r eser ved pr ef ix f or ma t of FE. Th is is a n in dica t or , if you wil l , su ch t h a t t h e in t er n et wil l n ot a t t empt t o r ou t e pa cket s t h a t a r e design a t ed a s l oca l . You ca n t h in k of t h ese a ddr esses a s t h e pr iva t e a ddr esses u sed in IPv4. St a t ion s t h a t a r e n ot con f igu r ed u sin g a pr ovider ba sed a ddr ess or a sit e l oca l a ddr ess u se t h e l in k l oca l a ddr ess. Th is is a n a ddr ess t h a t ca n be u sed bet ween t wo st a t ion s on a sin gl e l in k or n et wor k. Th is t ype of a ddr ess wil l n ot be pr ocessed by a r ou t er , so it ca n n ot spa n su bn et s. It ca n be u sed by a st a t ion t h a t is st a r t in g u p a n d does n ot kn ow it s l oca t ion on t h e n et wor k. Ba sica l l y, it is t h e con ca t en a t ion of it s 48-bit MAC a ddr ess a n d t h e wel l -kn own l in k l oca l pr ef ix of FE80::48-bit MAC a ddr ess. Wh en t h e ma ke a ddr ess ca n n ot be u sed, a ser ia l n u mber or some ot h er u n iqu e iden t if ica t ion of t h e ca r d ca n be u sed. A sit e l oca l a ddr ess is u sed t o a l l ow a sit e t o con f igu r e it s n et wor k wit h ou t bein g con n ect ed t o t h e In t er n et . Un l ike IPv4, a sit e ca n devise a n d impl emen t a compl et e a ddr essed In t er n et n et wor k. Th is wil l a l l ow t h a t sit e t o commu n ica t e wit h a l l in t er f a ces a t t h e sit e (it ma y spa n gl oba l l y); h owever , n on e of t h ese st a t ion s ma y commu n ica t e over t h e In t er n et . Th er e ma y be ma n y r ea son s f or t h is; f or exa mpl e, some compa n ies ma y n ot wa n t con n ect ion t o t h e In t er n et u n t il a specif ied t ime in t h e f u t u r e. I wit n essed t h is a t a ba n k t h a t set u p it s compl et e in t er n et ba sed on pr iva t e a ddr essin g IPv4, t h a t is). Pr obl em is it did n ot u se t h e RFC 1918 pr iva t e a ddr ess spa ce a l l oca t ion t o a ccompl ish t h is. Th e sit e wa s u p a n d oper a t ion a l f or t wo yea r s wit h ou t a h it ch (wel l , n ot t oo ma n y!). Wh en con n ect ion t o t h e In t er n et wa s desir ed, t h e ba n k h a d a ch oice of pr ovidin g f or Net wor k Addr ess Tr a n sl a t ion (NAT, RFC 1631) or r ea ddr essin g it s n et wor k. A l ot of t h ou gh t wen t in t o it a n d ba sed on ma n y f a ct or s—sca l a bil it y, peer -t o-

peer commu n ica t ion , a n d ot h er s—t h e ba n k r ea ddr essed it s sit e.

Loca l -Use IPv6 Addr essin g Th is wou l d n ot h a ve occu r r ed wit h IPv6 sit e l oca l a ddr essin g. Th e a ddr essin g a l l ows f or a n y en t it y t o pick a n y n u mber ou t of t h e bl u e a n d con f igu r e it s sit e (in t h is ca se, a l l of it s compa n y l oca t ion s). If , a t some l a t er t ime, t h e ba n k is a ssign ed a gl oba l pr ovider a ddr ess pr ef ix, it s n et wor k wil l n ot h a ve t o be compl et el y r en u mber ed. Sit e l oca l a ddr esses ma y n ot be r ou t ed over t h e In t er n et , wit h ou t h a vin g a dif f er en t pr ef ix a ssign ed, su ch a s a gl oba l -pr ovider -ba sed pr ef ix. Th e su bn et ID is wh a t you a r e su spect in g. It is a n ID a ssign ed t o a su bn et .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 154 IPv6 Addresses with Embedded IPv4 Addresses A t r a n sit ion in g st r a t egy t h a t

a l l ows movemen t f r om IPv4 t o IPv6 wil l be key t o t h e su ccessf u l impl emen t a t ion of IPv6—IPv6 wil l n ever be a ccept ed if a on e-t ime compl et e cu t over n eeds t o be a ppl ied. IPv4 is wor kin g, st u mbl in g wit h a ddr essin g a n d r ou t in g t a bl e expl osion , bu t wor kin g. It is embedded. Th er ef or e, in st a l l a t ion s mu st be a l l owed t o “t r y bef or e t h ey bu y” in t o it . Th is is wh y ot h er pr ot ocol s t h a t h a ve t r ied t o over t a ke TCP/IP h a ve f a il ed (OSI). You mu st h a ve a compa t ibl e pr ocedu r e in pl a ce. A gr ea t exa mpl e, is Micr osof t wh en it in t r odu ced Win dows 95. It a l l owed f or most Win dows 3.x pr ogr a ms t o r u n . An ot h er gr ea t exa mpl e is OS/2. It did n ot r u n t h e ver y popu l a r Win dows 3.1 pr ogr a ms ver y wel l a n d ba sica l l y r equ ir ed a ma jor cu t over t o ma ke it wor k. We n ow see wh er e Win dows 95 is a n d OS/2 is n ot , so I t h in k you kn ow h ow impor t a n t it is f or IPv6 t o be ba ckwa r ds compa t ibl e wit h IPv4. A t r a n sit ion sch eme is pr ovided cou r t esy of RFC 1933 a n d is n ot t h a t dif f icu l t t o r ea d. IPv6 h ost s ca n u se t h e IPv4 n et wor k a s a vir t u a l in t er f a ce t h a t en a bl es t h ese h ost s t o r ea ch ot h er h ost s t h r ou gh t u n n el s. Th e a ddr ess t h a t is u sed t o a l l ow f or t h is is a specia l t ype of l in k l oca l a ddr ess ca l l ed t h e IPv4-compa t ibl e a ddr ess, sh own in Sl ide 169. Al so n eeded f or t h e t r a n sit ion is f or h ost s t o become du a l st a ck (su ppor t in g bot h IPv4 a n d IPv6 IP st a cks) a n d t u n n el in g. To a l l ow f or t h is, a mech a n ism is pr ovided in t h e IPv6 a ddr essin g st r u ct u r e.

IPv6 Addr essin g wit h Embedded IPv6 Addr esses IPv4-compa t ibl e IPv6 a ddr ess-0::0:IPv4 a ddr ess. Th er e wa s a n ot h er a ddr ess met h od kn own a s t h e IPv4 ma pped a ddr ess t h a t wou l d a l l ow f or t r a n sl a t ion , bu t t h is is ou t of f a vor a n d t h e met h od t oda y is t h e pr ecedin g st a t ed a ddr ess sch eme.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 155 Unicast Addresses Th e u n ica st

a ddr ess spa ce is a con t igu ou s bit -wise, ma ska bl e a ddr ess t h a t is simil a r t o t h e a ddr essin g sch eme u sed in IPv4 CIDR. Th e a ddr ess t ypes f or u n ica st a ddr essin g a r e sh own in t h e sl ide. An expect ed t o be ver y common t ype of a ddr ess is wh er e t h e IEEE 802.x (or Et h er n et ) LAN MAC a ddr esses wil l be u sed a s sh own in t h e sl ide. Th e IEEE 802.x MAC a ddr ess is 48 bit s in l en gt h a n d beca u se of it s r egist r y, ever y ca r d h a s a u n iqu e n u mber a ssign ed t o it . However , wh er e t h ese a ddr esses a r e n ot a va il a bl e, E.164 (t el eph on e) a ddr esses cou l d be u sed. An in t er est ed poin t is t h a t by u sin g t h e IEEE 802.x MAC a ddr ess, a n IPv6 n ode cou l d simpl y l ist en t o t h e ca bl e pl a n t f or r ou t er a dver t isemen t s, wh ich wou l d yiel d t h e su bn et ID f or it sel f . Pu t t in g t h e t wo t oget h er wou l d give it a u n iqu e a ddr ess t o u se. Th is is a u t ocon f igu r a t ion . Ref er t o t h e sl ide. Gl oba l commu n ica t ion u sin g IPv6 is pr ovided by t h e u n ica st a ddr essin g sch eme of a gl oba l -ba sed pr ovider . Th e f ir st 3 bit s iden t if y t h e a ddr ess a s a pr ovider -or ien t ed u n ica st a ddr ess. Th e registry ID iden t if ies t h e in t er n et a ddr ess r egist r y (cu r r en t l y IANA, RIPE, APNIC, a n d INTERNIC), wh ich a ssign s pr ovider iden t if ier s, in dica t ed by t h e provider ID f iel d, t o in t er n et ser vice pr ovider s, wh ich t h en a ssign por t ion s of t h e a ddr ess spa ce t o su bscr iber s. Th is is a pr ocess simil a r t o t h e a ddr ess a ssign men t pol icy u sed wit h CIDR a n d descr ibed in RFC 2050. Th e subscriber ID dist in gu ish es a mon g mu l t ipl e su bscr iber s a t t a ch ed t o t h e in t er n et ser vice pr ovider iden t if ied by t h e pr ovider ID. Th is is l ike a cu st omer n u mber .

Un ica st Addr esses

Th e subnet ID iden t if ies a specif ic ph ysica l l in k. Th er e ca n be mu l t ipl e su bn et s on t h e sa me ph ysica l l in k; h owever , a specif ic su bn et ca n n ot spa n mu l t ipl e ph ysica l l in ks. Th e interface ID iden t if ies a sin gl e in t er f a ce a mon g t h e gr ou p of in t er f a ces iden t if ied by t h e su bn et pr ef ix.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 156 Autoconfiguration Au t ocon f igu r a t ion is t h e a bil it y of a n IPv6 n ode t o st a r t

u p a n d dyn a mica l l y a t t a in it s n ode a n d n et wor k a ddr esses. Th er e a r e t wo t ypes of a u t ocon f igu r a t ion : St at e f ul . Some ext er n a l device a ssist s t h e n ode a t st a r t u p t o det er min e it s n et wor k a ddr ess (pr ef ix), n ode a ddr ess, a n d per h a ps some r ou t er a ddr esses. A con sider a t ion of t h is is f or DHCP t o en a bl e t h e con f igu r in g of a n in it ia l iz in g n ode. St at e l e ss. Th is mea n s t h a t t h e n ode wil l con f igu r e it sel f a n d f in d it s r esou r ces on t h e n et wor k t h r ou gh t h e u se of mu l t ica st a ddr esses. Th is a l l ows t h e n ode t o st a r t u p a n d sen d ou t r equ est messa ges t o wh ich ot h er n odes wil l r espon d. Th e n ode ca n t h en det er min e it s n et wor k a ddr ess a n d pr ef ix a n d n ode a ddr ess ba sed on t h ese r espon ses. IPv6 n odes st a r t t h is beh a vior by join in g t h e a l l -n odes mu l t ica st gr ou p u pon st a r t u p. Th is is a ccompl ish ed by in it ia l iz in g t h e in t er f a ce t o t h e a l l n odes mu l t ica st a ddr ess of FF02::1. Th ese n odes ca n sol icit in f or ma t ion f r om r ou t er s u sin g t h e a l l -r ou t er s mu l t ica st a ddr ess of FF02::2 a s t h e dest in a t ion a n d t h eir own l in k l oca l a ddr esses a s t h e sou r ce. Aut o c o nf ig ur at io n • St a t el ess a u t ocon f igu r a t ion . • In it ia l iz in g h ost s join t h e a l l -n odes mu l t ica st a ddr ess of FE02::1 • St a t el ess a u t ocon f igu r a t ion a l l ows f or a n ode t o st a r t u p u sin g t h e l in kl oca l pr ef ix a n d some sor t of t oken . • Th is wil l pr oba bl y be t h e 48-bit Et h er n et a ddr ess • Addr ess wou l d be FE80::48-bit a ddr ess (mu l t ica st ) • Host s sen d a sol icit a t ion messa ge t o a l l -r ou t er s u sin g t h e a l l -r ou t er s mu l t ica st a ddr ess of FF02::2. • Used t o det er min e t h e n ode’s r ou t in g pr ef ix a n d ot h er r ou t in g pa r a met er s • St a t ef u l a u t ocon f igu r a t ion u ses.

St a t el ess a u t ocon f igu r a t ion h a s it s a dva n t a ges in t h a t it is r ea l l y a u t oma t ic a n d ver y simpl e t o u se. However , t h is t ype of con f igu r a t ion is vu l n er a bl e t o h a cker s wh o cou l d simpl y pl a ce t h eir n et wor k st a t ion on t h e su bn et a n d immedia t el y ga in a ccess t o t h e r esou r ces on t h a t su bn et . St a t ef u l a u t ocon f igu r a t ion wa s devel oped t o comba t su ch a t h r ea t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 157 Neighbor Discovery Ne ig hbo r Disc o ve r y • RFC 1970. • Ver y ext en sive a n d best t o r ea d RFC. • Nodes u sed Neigh bor Discover y t o det er min e l in k-l a yer a ddr esses f or n eigh bor s. • Fin ds l in k-l oca l h ost s a n d r ou t er s. • Det ect s wh ich n eigh bor s a r e r ea ch a bl e a n d det ect s l in k-l a yer a ddr ess ch a n ges. • ARP is n ot u sed wit h IPv6. • Th is is t h e r obu st r epl a cemen t f or ARP (IPv4)

Neigh bor

Discover y is pr esen t ed in RFC 1970. Al t h ou gh it u ses ICMP, do n ot expect t o f in d it s l ist in g in ICMPv6 RFC (RFC 1885). Th e Addr ess Resol u t ion Pr ot ocol is n ot u sed wit h IPv6. It is pa r t of t h e Neigh bor Discover y pr ot ocol . Nodes (h ost s a n d r ou t er s) u se Neigh bor Discover y t o det er min e t h e l in k-l a yer a ddr esses f or n eigh bor s kn own t o r eside on a t t a ch ed l in ks a n d t o qu ickl y pu r ge ca ch ed va l u es t h a t become in va l id. Host s a l so u se Neigh bor Discover y t o f in d n eigh bor in g r ou t er s t h a t a r e wil l in g t o f or wa r d pa cket s on t h eir beh a l f . Nodes u se t h e pr ot ocol t o a ct ivel y keep t r a ck of wh ich n eigh bor s a r e r ea ch a bl e a n d wh ich a r e n ot , a n d t o det ect ch a n ged l in k-l a yer a ddr esses. Wh en a r ou t er or t h e pa t h t o a r ou t er f a il s, a h ost a ct ivel y sea r ch es f or f u n ct ion in g a l t er n a t es. Th is sou n ds l ike a h a ppy mediu m bet ween ARP f or IPv4 a n d t h e met h ods empl oyed by ESIS pr ocedu r es of t h e CLNP (Con n ect ion l ess Net wor k Pr ot ocol ) f r om t h e OSI su it e. In ESIS (pa r t of t h e r ou t in g u pda t e pr ot ocol f or t h e OSI pr ot ocol su it e), t h e a ct ive

en dst a t ion s sen d Hel l o pa cket s t o wh ich t h e a ct ive r ou t er s on a n et wor k l ist en a n d bu il d a da t a ba se of . In t h is da t a ba se is a l ist in g of a l l t h e en dst a t ion s t h a t t h e OSI r ou t er h a s h ea r d f r om. Th e OSI r ou t er a l so t r a n smit s a pa cket t o a l l ow it sel f t o be kn own on t h e n et wor k a s wel l . Th e wor kst a t ion s r ecor d t h e r ou t er ’s a ddr ess so t h a t it ca n sen d pa cket s t o it , eit h er t h e f ir st pa cket t r a n smit t ed l oca l l y or a l l of f -n et wor k f or wa r din g. Th e OSI r ou t er wil l in f or m t h e n ode a bou t t h e l oca t ion of t h e dest in a t ion st a t ion . It wa s on ce r ecommen ded t h a t CLNP r epl a ce IPv4. However , CLNP wa s a ct u a l l y a cl on e of IP, ba sica l l y ou t da t ed by t h e t ime t h e IPn g gr ou p f or med in 1992, a n d pu sh ed a side. An ywa y, t h e IPv6 Neigh bor Discover y pr ot ocol cor r espon ds t o a combin a t ion of t h e IPv4 pr ot ocol s ARP (RFC 826), ICMP Rou t er Discover y (RFC 1256), a n d ICMP Redir ect (RFC 791).

A qu est ion t h a t

ma y be a sked h er e is: Wit h a l l t h e depen den cy on dyn a mica l l y discover in g l in k-l a yer a ddr esses bet ween h ost s a n d r ou t er s, h ow ca n a n ICMP messa ge be sen t , if t h e media (l in k-l a yer ) a ddr ess is n ot yet kn own (i.e., t h e Neigh bor Discover y pr ocedu r es h a ve n ot yet det er min ed t h e l in k-l a yer a ddr esses f or a l l depen den cies on a n ode l oca l l in k)? Th is is ea sil y sol ved by u sin g a wel l -kn own IPv6 mu l t ica st a ddr ess. ICMP ca n n ot wor k wit h ou t t h e media a ddr ess bein g kn own . However , a specia l mu l t ica st a ddr ess a t t h e MAC l a yer h a s been in ven t ed. Al l st a t ion s sh ou l d be l ist en in g t o t h eir specia l MAC mu l t ica st a ddr ess. Th is is f or med by pl a cin g 3333 a n d t h e l a st 32 bit s of t h eir IPv6 a ddr ess a s on e of t h e a ddr esses t o l ist en f or on t h e NIC ca r d. Th er ef or e, if a n a ddr ess of 3333 is r eceived by t h e NIC, it wil l pr ocess t h e l a st 32 bit s a s wel l . If t h is ma t ch es it s a ddr ess, it wil l pa ss it on t o t h e IPv6 IP l a yer of it s u pper -l a yer sof t wa r e. Wit h t h e except ion of Non -Br oa dca st Mu l t ia ccess (NBMA) n et wor ks (ATM Fr a me Rel a y, + X.25) or if a l in k-l a yer in t er a ct ion is specif ied in a n ot h er docu men t , RFC 1970 a ppl ies t o a l l l in k-l a yer t ypes. However , beca u se ND u ses l in k-l a yer mu l t ica st f or some of it s ser vices, it is possibl e t h a t on some l in k t ypes (e.g., NBMA l in ks), a l t er n a t ive pr ot ocol s or mech a n isms t o impl emen t t h ose ser vices wil l be specif ied (in t h e a ppr opr ia t e docu men t cover in g t h e oper a t ion of IP over a pa r t icu l a r l in k t ype). Th e ser vices descr ibed in t h is docu men t t h a t a r e n ot dir ect l y depen den t on mu l t ica st (e.g., Redir ect s, Next -Hop det er min a t ion , Neigh bor Un r ea ch a bil it y Det ect ion , et c.) a r e expect ed t o be pr ovided a s specif ied in t h is docu men t . Th e det a il s of h ow on e u ses ND on NBMA l in ks is a n a r ea f or f u r t h er st u dy.

Ne ig hbo r Disc o ve r y (c o nt inue d) • In IPv6, Discover y messa ges u se t h e va r iou s mu l t ica st a ddr ess a ssign men t s f or r ou t er discover y, n eigh bor discover y, et c. • Th e media (MAC) a ddr ess is a mu l t ica st a ddr ess a s wel l : • 33-33-l a st 32 bit s of t h e IPv6 a ddr ess • RFC 1970 a ppl ies t o a l l l in k-l a yer t ypes except NBMA a n d va r iou s pr opr iet a r y in t er f a ces.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 158 Neighbor Discovery Types Ne ig hbo r Disc o ve r y Type s • • • • • • • • •

Rou t er Discover y Pr ef ix Discover y Pa r a met er Discover y Addr ess Au t ocon f igu r a t ion Addr ess Resol u t ion Next -Hop det er min a t ion Neigh bor Un r ea ch a bil it y Det ect ion Du pl ica t e Addr ess Det ect ion Redir ect

Th is pr ot ocol

sol ves a set of pr obl ems r el a t ed t o t h e in t er a ct ion bet ween n odes a t t a ch ed t o t h e sa me l in k. It def in es mech a n isms f or sol vin g ea ch of t h e f ol l owin g pr obl ems: Ro ut e r Disc o ve r y. Th is pr ot ocol a l l ows h ost s t o l oca t e a n d iden t if y r ou t er s on t h eir l oca l l in k. Pr e f ix Disc o ve r y. How h ost s discover t h e set of a ddr ess pr ef ixes t h a t def in e wh ich dest in a t ion s a r e on -l in k f or a n a t t a ch ed l in k. (Nodes u se pr ef ixes t o dist in gu ish dest in a t ion s t h a t r eside on -l in k f r om t h ose on l y r ea ch a bl e t h r ou gh a r ou t er .) Par ame t e r Disc o ve r y. How a n ode l ea r n s su ch l in k pa r a met er s a s t h e l in k MTU or su ch In t er n et pa r a met er s a s t h e h op-l imit va l u e t o pl a ce in ou t goin g pa cket s. Addr e ss Aut o c o nf ig ur at io n. How n odes a u t oma t ica l l y con f igu r e a n a ddr ess f or a n in t er f a ce. Addr e ss Re so l ut io n. How n odes det er min e t h e l in k-l a yer a ddr ess of a n on -l in k dest in a t ion (e.g., a n eigh bor ) given on l y t h e dest in a t ion ’s IP a ddr ess.

Ne xt -Ho p De t e r minat io n. Th e a l gor it h m f or ma ppin g a n IP dest in a t ion a ddr ess in t o t h e IP a ddr ess of t h e n eigh bor t o wh ich t r a f f ic f or t h e dest in a t ion sh ou l d be sen t . Th e n ext -h op ca n be a r ou t er or t h e dest in a t ion it sel f . Ne ig hbo r Unr e ac habil it y De t e c t io n. How n odes det er min e t h a t a n eigh bor is n o l on ger r ea ch a bl e. For n eigh bor s u sed a s r ou t er s, a l t er n a t e def a u l t r ou t er s ca n be t r ied. For bot h r ou t er s a n d h ost s, a ddr ess r esol u t ion ca n be per f or med a ga in . Dupl ic at e Addr e ss De t e c t io n. How a n ode det er min es t h a t a n a ddr ess it wish es t o u se is n ot a l r ea dy in u se by a n ot h er n ode. Re dir e c t . How a r ou t er in f or ms a h ost of a bet t er f ir st -h op n ode t o r ea ch a pa r t icu l a r dest in a t ion . Al so con t a in ed in RFC 792 is t h e or igin a l ICMP r edir ect messa ge in wh ich a r ou t er sen ds t o a h ost st a t in g, “I wil l f or wa r d t h e pa cket t h a t you sen t t o me t o my n ext h op por t . However , t h er e is a bet t er pa t h t o t h e dest in a t ion t h a t you in dica t ed a n d it is t h r ou gh Rou t er X.”

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 159 Neighbor Discovery and IPv4 Th e IPv6 Neigh bor

Discover y pr ot ocol cor r espon ds t o a combin a t ion of t h e IPv4 pr ot ocol s ARP, ICMP Rou t er Discover y, a n d ICMP Redir ect . In IPv4 t h er e is n o gen er a l l y a gr eed u pon pr ot ocol or mech a n ism f or Neigh bor Un r ea ch a bil it y Det ect ion , a l t h ou gh Host s Requ ir emen t s RFC 1122 a n d 1123 does specif y some possibl e a l gor it h ms f or Dea d Ga t ewa y Det ect ion (a su bset of t h e pr obl ems t h a t Neigh bor Un r ea ch a bil it y Det ect ion t a ckl es). Rou t er Discover y is pa r t of t h e ba se pr ot ocol set ; t h er e is n o n eed f or h ost s t o “sn oop” t h e r ou t in g pr ot ocol s. Rou t er a dver t isemen t s ca r r y l in k-l a yer a ddr esses; n o a ddit ion a l pa cket exch a n ge is n eeded t o r esol ve t h e r ou t er ’s l in k-l a yer a ddr ess. Rou t er a dver t isemen t s ca r r y pr ef ixes f or a l in k; t h er e is n o n eed t o h a ve a sepa r a t e mech a n ism t o con f igu r e t h e “n et ma sk.” Rou t er a dver t isemen t s en a bl e Addr ess Au t ocon f igu r a t ion . Rou t er s ca n a dver t ise a n MTU f or h ost s t o u se on t h e l in k, en su r in g t h a t a l l n odes u se t h e sa me MTU va l u e on l in ks l a ckin g a wel l -def in ed MTU. Addr ess r esol u t ion mu l t ica st s a r e “spr ea d” over 4 bil l ion (2n32) mu l t ica st a ddr esses, gr ea t l y r edu cin g a ddr ess r esol u t ion -r el a t ed in t er r u pt s on n odes ot h er t h a n t h e t a r get . Mor eover , n on -IPv6 ma ch in es sh ou l d n ot be in t er r u pt ed a t a l l . Redir ect s con t a in t h e l in k-l a yer a ddr ess of t h e n ew f ir st h op; sepa r a t e a ddr ess r esol u t ion is n ot n eeded u pon r eceivin g a r edir ect . Mu l t ipl e pr ef ixes ca n be a ssocia t ed wit h t h e sa me l in k. By def a u l t , h ost s l ea r n a l l on l in k pr ef ixes f r om Rou t er Adver t isemen t s. However , r ou t er s ma y be con f igu r ed t o omit some or a l l pr ef ixes f r om Rou t er Adver t ise-men t s. In su ch ca ses, h ost s a ssu me t h a t dest in a t ion s a r e of f -l in k a n d sen d t r a f f ic t o r ou t er s. A r ou t er ca n t h en issu e r edir ect s a s a ppr opr ia t e.

Ne ig hbo r Disc o ve r y and IPv4 • IPv6 Neigh bor Discover y combin es IPv4 pr ot ocol s of ARP, ICMP Rou t er Discover y, a n d ICMP Redir ect . • IPv4 h a s n o a gr eed-u pon met h od f or Dea d Ga t ewa y Det ect ion a n d Neigh bor Un r ea ch a bil it y det ect ion . • IPv6 a ssu mes a r edir ect n ext h op is on -l in k—on t h e sa me l in k t h a t it r esides. • IPv6 det ect s h a l f l in k f a il u r es (n eigh bor s t h a t a r e su spect or t h a t h a ve gon e a wa y). • IPv6 Rou t er a dver t isemen t s do n ot con t a in a Pr ef er en ce f iel d. • Usin g l in k-l oca l a ddr esses t o iden t if y r ou t er s mea n s t h a t t h is r el a t ion sh ip is ma in t a in ed even if t h e pr ovider a ddr ess ch a n ges. • Addr ess r esol u t ion is a ccompl ish ed a t t h e ICMP l a yer .

Un l ike IPv4, t h e r ecipien t

of a n IPv6 r edir ect a ssu mes t h a t t h e n ew n ext h op is on -l in k (t h e sa me su bn et a s it sel f ). In IPv4, a h ost ign or es r edir ect s specif yin g a n ext -h op t h a t is n ot on -l in k a ccor din g t o t h e l in k’s n et wor k ma sk. Th e IPv6 r edir ect mech a n ism is a n a l ogou s t o t h e r edir ect f a cil it y. It is expect ed t o be u sef u l on n on br oa dca st a n d sh a r ed media l in ks in wh ich it is u n desir a bl e or impossibl e f or n odes t o kn ow a l l pr ef ixes f or on -l in k dest in a t ion s. Neigh bor Un r ea ch a bil it y Det ect ion is pa r t of t h e ba se sign if ica n t l y impr ovin g t h e r obu st n ess of pa cket del iver y in t h e pr esen ce of f a il in g r ou t er s, pa r t ia l l y f a il in g or pa r t it ion ed l in ks a n d n odes t h a t ch a n ge t h eir l in k-l a yer a ddr esses. For in st a n ce, mobil e n odes ca n move of f -l in k wit h ou t l osin g a n y con n ect ivit y du e t o st a l e ARP ca ch es. Un l ike ARP, Neigh bor Discover y det ect s h a l f -l in k f a il u r es (u sin g Neigh bor Un r ea ch a bil it y Det ect ion ) a n d a voids sen din g t r a f f ic t o n eigh bor s wit h wh ich t wo-wa y con n ect ivit y is a bsen t . Un l ike in IPv4 Rou t er Discover y t h e Rou t er Adver t isemen t messa ges do n ot con t a in a pr ef er en ce f iel d. Th e pr ef er en ce f iel d is n ot n eeded t o h a n dl e r ou t er s of dif f er en t “st a bil it y”; t h e Neigh bor Un r ea ch a bil it y Det ec-t ion wil l det ect dea d r ou t er s a n d swit ch t o a wor kin g on e. Th e u se of l in k-l oca l a ddr esses t o u n iqu el y iden t if y r ou t er s (f or Rou t er Adver t isemen t a n d Redir ect messa ges) ma kes it possibl e f or h ost s t o ma in t a in t h e r ou t er a ssocia t ion s in t h e even t of t h e sit e r en u mber in g t o u se n ew gl oba l pr ef ixes. Usin g t h e Hop-Limit -equ a l -t o-255 t r ick, Neigh bor Discover y is immu n e t o of f -l in k sen der s t h a t a cciden t a l l y or in t en t ion a l l y sen d ND messa ges. In IPv4, of f -l in k sen der s ca n sen d bot h ICMP Redir ect s a n d Rou t er Adver t isemen t messa ges. Pl a cin g a ddr ess r esol u t ion a t t h e ICMP l a yer ma kes t h e pr ot ocol mor e media in depen den t t h a n ARP a n d ma kes it possibl e t o u se st a n da r d IP a u t h en t ica t ion a n d secu r it y mech a n isms a s a ppr opr ia t e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 160 Address Resolution Th e pu r pose of a ddr ess r esol u t ion is t o det er min e t h e l in k-l evel

a ddr ess of a dest in a t ion given on l y it s IP a ddr ess. Th is is per f or med on l y f or t h ose IP a ddr esses t h a t a r e l oca l (h op cou n t set t o 1 f or t h ese messa ges). Wh en a mu l t ica st a bl e in t er f a ce st a r t s, it mu st join bot h t h e a l l -n odes mu l t ica st gr ou p a n d t h e sol icit ed-n ode mu l t ica st gr ou p. Th is en a bl es t h e n ode t o r eceive a n d pr ocess pa cket s wit h ou t h a vin g a l l of it s a ddr essin g est a bl ish ed. In f a ct , a n ode mu st keep t h e mu l t ica st a ddr esses u n t il a l l a ddr essin g h a s been r esol ved. Addr ess r esol u t ion con sist s of sen din g a Neigh bor Sol icit a t ion messa ge a n d wa it in g f or a Neigh bor Adver t isemen t u sin g mu l t ica st a ddr essin g. Th e sol icit a t ion is sen t t o t h e sol icit ed-n ode mu l t ica st a ddr ess cor r espon din g t o t h e t a r get a ddr ess. Th e sol icit ed-n ode mu l t ica st a ddr ess is a l in kl oca l scope mu l t ica st a ddr ess t h a t is compu t ed a s a f u n ct ion of t h e sol icit ed t a r get ’s a ddr ess. Th e sol icit ed-n ode mu l t ica st a ddr ess is f or med by t a kin g t h e l ow-or der 32 bit s of t h e t a r get IP a ddr ess a n d a ppen din g t h ose bit s t o t h e 96-bit pr ef ix FF02:0:0:0:0:1 t o pr odu ce a mu l t ica st a ddr ess wit h in t h e r a n ge of FF02::1:0:0 t o FF02:: 1:FFFF:FFFF. For exa mpl e, t h e sol icit ed n ode mu l t ica st a ddr ess cor r espon din g t o t h e IP a ddr ess 4037::01:800:200E:8C6C is FF02::1: 200E:8C6C. IP a ddr esses t h a t dif f er on l y in t h e h igh or der bit s (e.g., du e t o mu l t ipl e h igh -or der pr ef ixes a ssocia t ed wit h dif f er en t pr ovider s) wil l ma p t o t h e sa me sol icit ed-n ode a ddr ess, t h er eby r edu cin g t h e n u mber of mu l t ica st a ddr esses a n ode mu st join . In r espon se t o t h is r equ est (t h e sen der ma y sen d it mu l t ipl e t imes if n o r espon se is f ou n d wit h in a cer t a in per iod of t ime), a Neigh bor Adver t isemen t sh ou l d be gen er a t ed by t h e r emot e n ode. Th e or igin a t in g n ode sh ou l d r eceive t h is pa cket a n d u pda t e it s Neigh bor ca ch e wit h t h e in f or ma t ion in t h e r eceived Neigh bor Adver t isemen t (t h e l in k-l a yer in f or ma t ion ). Th e MAC a ddr ess is set a s pr eviou sl y in dica t ed by t a kin g t h e l ow-or der 32 bit s of t h e t a r get IPv6 a ddr ess a n d pr epen din g 3333 t o t h a t a ddr ess, wh ich is t h e IPv6 a l l -n odes MAC mu l t ica st a ddr ess.

Addr e ss Re so l ut io n • Pu r pose is t o det er min e t h e l in k l evel -a ddr ess of a dest in a t ion given on l y it s IP a ddr ess. • Con sist s of sen din g a Neigh bor Sol icit a t ion messa ge a n d wa it in g f or a r epl y. • Al l n odes st a r t u p by join in g t h e a l l -n odes mu l t ica st a ddr ess a n d t h e sol icit ed n ode mu l t ica st a ddr ess • Sol icit ed n ode a ddr ess is t a kin g t h e 96 bit pr ef ix FF02:0:0:0:0:1 a n d pl a cin g t h e l ow or der 32 bit s of t h e dest in a t ion IP a ddr ess t o t h is • Th is a l l ows f or a r a n ge of FF02::1:0:0 t h r ou gh FF02::1:FFFF:FFFF • Th e f u l l t a r get a ddr ess is embedded in t h e ICMP pa cket

On e mor e ch eck is a ccompl ish ed ea ch t ime a Neigh bor ca ch e (l in k-l a yer in f or ma t ion ) en t r y is a ccessed wh il e t r a n smit t in g a u n ica st pa cket : Th e sen der ch ecks Neigh bor Un r ea ch -a bil it y Det ect ion -r el a t ed in f or ma t ion a ccor din g t o t h e Neigh bor Un r ea ch a bil it y Det ect ion a l gor it h m. Th is is n ot so mu ch a pr ot ocol a s keepin g a n eye on t h e pr ogr ession of t h e u pper -l a yer pr ot ocol s wit h t h is a ddr ess. Th is u n r ea ch a bil it y ch eck migh t r esu l t in t h e sen der t r a n smit t in g a u n ica st Neigh bor Sol icit a t ion t o ver if y t h a t t h e n eigh bor is st il l r ea ch a bl e. If a t some poin t commu n ica t ion cea ses t o pr oceed, a s det er min ed by t h e Neigh bor Un r ea ch a bil it y Det ect ion a l gor it h m, n ext -h op det er min a t ion ma y n eed t o be per f or med a ga in . For exa mpl e, t r a f f ic t h r ou gh a f a il ed r ou t er sh ou l d be swit ch ed t o a wor kin g r ou t er . Likewise, it ma y be possibl e t o r er ou t e t r a f f ic dest in ed f or a mobil e n ode t o a “mobil it y a gen t .” Not e t h a t wh en a n ode r edoes n ext -h op det er min a t ion , t h er e is n o n eed t o disca r d t h e compl et e Dest in a t ion ca ch e en t r y. In f a ct , it is gen er a l l y ben ef icia l t o r et a in su ch ca ch ed in f or ma t ion a s t h e PMTU a n d r ou n d-t r ip t imer va l u es t h a t ma y a l so be kept in t h e Dest in a t ion ca ch e en t r y. Next -h op det er min a t ion is don e t h e f ir st t ime t r a f f ic is sen t t o a dest in a t ion . As l on g a s su bsequ en t commu n ica t ion t o t h a t dest in a t ion pr oceeds su ccessf u l l y, t h e Dest in a t ion ca ch e en t r y con t in u es t o be u sed. Al l of t h is is det a il ed f u r t h er l a t er in t h e book.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 161 Methods of Deploying IPv6 Me t ho ds o f De pl o ying IPv6 • Du a l IP l a yer —a n ode t h a t is r u n n in g bot h t h e IPv4 a n d IPv6 TCP/IP pr ot ocol st a cks. • IPv6 over IPv4 t u n n el —t h e pr ocess of t a kin g a n IPv6 da t a gr a m a n d wr a ppin g a n IPv4 h ea der on it f or t r a n sit a cr oss IPv4 r ou t er s. • Con f igu r ed t u n n el —IPv4 t u n n el en dpoin t a ddr ess is det er min ed by t h e en ca psu l a t in g n ode • Au t oma t ic t u n n el —IPv4 t u n n el en dpoin t is det er min ed f r om t h e IPv4 a ddr ess of t h e IPv6 pa cket • Tr a n sit ion con sist s of : • IPv4-on l y n ode

IPv6 wil l

n ot be cu t over in a n h ou r ’s t ime. A per iod of t r a n sit ion wil l t a ke pl a ce. In or der t o ef f ect t h e t r a n sit ion some su ggest ed met h ods a r e pr ovided: Dual IP l aye r . IPv4 a n d IPv6 r u n n in g a t t h e n et wor k l a yer in bot h h ost s a n d/or r ou t er s. Th ese n odes h a ve t h e a bil it y t o sen d a n d r eceive bot h IPv4 a n d IPv6 da t a gr a ms. Th is r equ ir es t h a t a n ode be con f igu r ed wit h bot h a n IPv4 a n d IPv6 a ddr ess t h a t ma y or ma y n ot be r el a t ed. In t h is wa y, IPv4-on l y h ost s ca n a ccess ser vices t h a t exist on a n IPv6 h ost . IPv6 o ve r IPv4 t unne l ing . Th is is t h e pr ocess of t a kin g a n IPv6 da t a gr a m a n d wr a ppin g a n IPv4 h ea der on it f or t r a n sit a cr oss IPv4 h ost s or r ou t er s. Two met h ods a r e a va il a bl e: configured a n d automatic. Th ese n odes a r e con f igu r ed wit h a n IPv4-compa t ibl e IPv6 a ddr ess. Th is is t h a t specia l u n ica st a ddr ess t h a t h a s a 96bit pr ef ix of a l l 0s. Th e n ext 32 bit s is a n IPv4 a ddr ess. Con f igu r ed t u n n el in g is wh en t h e IPv4 t u n n el en dpoin t a ddr ess is det er min ed by t h e en ca psu l a t in g n ode.

Au t oma t ic t u n n el in g is wh en t h e IPv4 t u n n el en dpoin t is det er min ed f r om t h e IPv4 a ddr ess of t h e IPv6 pa cket . A n ode ma y be ca pa bl e of a u t oma t ic a n d/or con f igu r ed t u n n el in g. Au t oma t ic t u n n el in g u ses t h e IPv4-compa t ibl e a ddr ess sch eme a s sh own in t h e sl ide. A n ode does n ot h a ve t o su ppor t du a l st a ck IP t o su ppor t t u n n el in g. Th e t r a n sit ion wil l a l so h a ve specia l n odes: IPv4-o nl y no de . A n ode t h a t on l y u n der st a n ds IPv4. IPv4/IPv6 no de . A n ode t h a t is r u n n in g du a l IP st a cks a n d u n der st a n ds bot h IPv4 a n d IPv6. IPv6-o nl y no de . A n ode t h a t u n der st a n ds IPv6 on l y.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 162 IPv6 Tunneling Introduction IPv6 Tunne l ing Int r o duc t io n • • • •

Host t o Rou t er Rou t er t o Rou t er Rou t er t o Host Host t o Host

Tu n n el in g is ver y simpl y t h e met h od of t r a n spor t in g IPv6 pa cket s over

IPv4 r ou t in g t opol ogies. It is bein g u sed t oda y wit h t h e 6Bon e (www/6Bon e.com). Two scen a r ios occu r h er e. Th e f ir st on e is t h e f ol l owin g t wo t u n n el in g met h ods: Ho st t o Ro ut e r : Du a l -st a ck IP h ost s ca n t u n n el IPv6 pa cket s t o a n in t er media r y du a l -st a ck IP r ou t er t h a t is r ea ch a bl e via a n IPv4 in f r a st r u ct u r e. Ro ut e r t o Ro ut e r : A r ou t er t h a t is r u n n in g t h e du a l -st a ck IP in t er con n ect ed by a n IPv4 in f r a st r u ct u r e ca n t u n n el IPv6 da t a gr a ms bet ween r ou t er s. Wit h t h ese t ypes of t u n n el s, t h e t u n n el en dpoin t is a n in t er media r y r ou t er t h a t mu st deca psu l a t e t h e IPv6 pa cket a n d f or wa r d it t o it s f in a l dest in a t ion . Th e en dpoin t of t h e t u n n el is dif f er en t f r om t h e dest in a t ion of t h e pa cket bein g t u n n el ed. Th er ef or e, t h e a ddr ess in t h e IPv6 pa cket bein g t u n n el ed does n ot pr ovide t h e IPv4 a ddr ess of t h e t u n n el en dpoin t . Th e t u n n el en dpoin t a ddr ess mu st be det er min ed f r om in f or ma t ion t h a t is con f igu r ed on t h e n ode per f or min g t h e t u n n el in g. Th is is t h e con f igu r ed t u n n el a ppr oa ch . Th e en dpoin t is expl icit l y con f igu r ed. Tu n n el s a r e ch a r a ct er iz ed by t wo en dpoin t IPv4 a ddr esses. Th e IPv4 pr ot ocol iden t if ier is 41, t h e a ssign ed pa yl oa d t ype n u mber f or IPv6. Ro ut e r t o Ho st : Du a l -st a ck IP r ou t er s ca n t u n n el IPv6 pa cket s t o t h eir f in a l

dest in a t ion du a l -st a ck IP h ost . Ho st t o Ho st : Du a l -st a ck IP h ost s ca n t u n n el IPv6 pa cket s bet ween t h emsel ves over a n IPv6 in f r a st r u ct u r e (wit h ou t t h e u se of a r ou t er ). Th ese t wo t ypes pr ovide f or t u n n el in g a l l t h e wa y t o a f in a l dest in a t ion . In t h ese ca ses, t h e t u n n el en dpoin t is t h e n ode t o wh ich t h e IPv6 pa cket is a ddr essed. Th is is a u t oma t ic t u n n el in g a n d it simpl y a l l ows f or IPv6 pa cket s t h a t a r e t o be sen t t o IPv6 dest in a t ion s u sin g t h e IPv4-compa t ibl e a ddr ess a n d l oca t ed r emot el y (of f -l in k) t o be en ca psu l a t ed in IPv4 h ea der s a n d sen t t h r ou gh t h e IPv4 in f r a st r u ct u r e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 163 IPv6 Tunnel Addressing Now, wh ich t ype of t u n n el in g is u sed wh er e, a n d h ow does t h is t h in g wor k? Wel l , it depen ds on t h e a ddr ess of t h e dest in a t ion . If t h e a ddr ess is a n IPv6 a ddr ess a n d t h e dest in a t ion is l oca l (on -l in k), t h en it simpl y sen ds t h e pa cket . If t h e a ddr ess of t h e en d n ode is a n IPv4 a ddr ess a n d it r esides on a dif f er en t su bn et , t h en a n IPv4 r ou t er mu st be u sed. Th e key t o a l l of t h is is t h e specia l a ddr ess 0:0:0:0:0:0:. IPv4compa t ibl e r ou t er . Du a l IP st a ck h ost s wil l r ecogn iz e t h e specia l a ddr ess a n d immedia t el y en ca psu l a t e t h e pa cket wit h a n IPv4 h ea der . Th is is ca l l ed a n end-to-end t u n n el . Th e r eceivin g st a t ion wil l deca psu l a t e t h e da t a gr a m (st r ip of f t h e IPv4 h ea der ) a n d r ea d it a s a n IPv6 da t a gr a m. IPv6-on l y h ost s ca n a l so u se t h e IPv4 In t er n et t h r ou gh t h e u se of du a l -st a ck IP r ou t er s. Th e IPv6-on l y h ost wil l t r a n smit t h e IP da t a gr a m a s a n IPv6 da t a gr a m. Th e du a l -st a ck IP r ou t er wil l r ecogn iz e t h e specia l a ddr ess a n d wr a p it in a n IPv4 h ea der (u sin g t h e l a st 32 bit s of t h e specia l a ddr ess in t h e IPv4 dest in a t ion IP a ddr ess). Fin a l l y, if t h e a ddr ess is a n IPv6 a ddr ess bu t n ot of t h e specia l a ddr ess, a con f igu r ed t u n n el ca n be u sed in st ea d of a n a u t oma t ic t u n n el (wh ich r ecogn iz es t h e specia l a ddr ess). Th is r equ ir es con f igu r a t ion in t h e IPv6 h ost t o a l l ow f or t h is. Th is is a mor e or l ess ma n u a l con f igu r a t ion a n d t el l s t h e IPv6 h ost wh er e t o sen d t h e pa cket .

IPv6 Tu n n el Addr essin g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 164 IPv6 and IPv4 Dual-Stack Strategy Th e f ol l owin g sl ide sh ows t h e IPv6 a n d IPv4 du a l -st a ck ca pa bil it y of a h ost . Ba sed on t h e Et h er Type f iel d of t h e r eceived pa cket , t h e NIC sof t wa r e ca n h a n d of f t h e deca psu l a t ed pa cket t o eit h er of t h e TCP/IP sof t wa r e st a cks. Sin ce t h e Et h er n et t ype f iel d h a s a n ew n u mber f or IPv6, t h is met h od is ver y ea sy t o impl emen t . Wh en a pa cket is r eceived, t h e t ype f iel d is ch ecked. If t h e t ype f iel d con t a in s 0800 (in h ex) t h e pa cket is h a n ded of f t o t h e IPv4 pr ot ocol st a ck, ot h er wise t h e t ype f iel d con t a in s 86DD, t h en t h e pa cket is h a n ded of f t o t h e IPv6 st a ck.

IPv6 a n d IPv4 Du a l -St a ck St r a t egy

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 165 IPv6 Tunneling Th e sl ide sh ows a n IPv6 t u n n el in g st r a t egy. IPv6 a n d IPv4 n odes ca n pea cef u l l y coexist on a n et wor k u sin g t u n n el in g. Th is sl ide sh ows a n IPv4/IPv6 r ou t er t h a t ca n a t t a ch t o a n IPv4 r ou t er . Not ice h er e t h a t IPv4 a n d IPv6 h ost s ca n exist wit h t h e IPv6/IPv4 r ou t er s. However , a n IPv6-on l y h ost ca n n ot ma ke u se of t h e IPv4 r ou t er . Th is is sh own on t h e r igh t side in t h e middl e of t h e sl ide. An IPv6 h ost is sit u a t ed beh in d a n IPv4 r ou t er . Th ese t wo devices h a ve n o met h od of commu n ica t in g. Th e f l owch a r t s in t h e f ol l owin g sect ion give f u l l descr ipt ion s f or exa mpl es t h a t ca n be u sed wit h t h is sl ide.

IPv6 Tunne l ing

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 166 IPv6 Tunneling Th is sl ide sh ows f ou r

possibl e met h ods of IPv6 t u n n el in g da t a f l ow.

IPv6 Tu n n el in g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 167 IPv6 Tunneling Flowchart 1 Th is sl ide sh ows IPv6 t u n n el in g wh en t h e en d n ode a ddr ess is a n IPv4-compa t ibl e IPv6 a ddr ess.

IPv6 Tu n n el in g Fl owch a r t 1

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 168 IPv6 Tunneling Flowchart 2 Th is sl ide sh ows IPv6 t u n n el in g wh en t h e en d n ode is a n IPv6-on l y a ddr ess.

IPv6 Tu n n el in g Fl owch a r t 2

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 169 IPv6 Tunneling Flowchart 3 Th is sl ide sh ows t u n n el in g IPv6 wh en t h e en d n ode a ddr ess is a n IPv4 a ddr ess.

IPv6 Tu n n el in g Fl owch a r t 3

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 170 Anycast Addressing Anyc ast Addr e ssing • Simil a r t o a mu l t ica st a ddr ess. • Addr ess is sen t t o a gr ou p a ddr ess (a n yca st ) bu t t h e r ou t er del iver s t h e da t a gr a m t o t h e n ea r est member of t h e gr ou p. • Pr ovides f or a ppl ica t ion s su ch a s f il e a n d pr in t ser ver s, t ime ser ver s, n a me ser ver s, DHCP, et c. • Simil a r t o t h e Net Wa r e pr ot ocol of “Get Nea r est Ser ver ” r equ est .

An a n yca st

a ddr ess is simil a r t o a mu l t ica st a ddr ess. Th e except ion h er e is t h a t a pa cket sen t t o a n a n yca st a ddr ess is r ou t ed t o t h e “n ea r est ” in t er f a ce h a vin g t h a t a ddr ess, u sin g dist a n ce a s a f a ct or . A sou r ce n ode sen ds a da t a gr a m a ddr essed a s a n a n yca st a ddr ess. Th is a ddr ess wil l be r ecogn iz ed by a l l dest in a t ion s of a given t ype. Th e r ou t in g syst em is key h er e; it is t h e r ou t in g syst em t h a t del iver s t h e da t a gr a m t o t h e n ea r est ser ver . Th is h a s a ppl ica t ion s t o f in d ser ver s of t ype f il e/pr in t , t imer , n a me, DHCP, a n d so f or t h . Th is con cept ma y sou n d f a mil ia r t o t h ose wh o kn ow t h e Novel l Net Wa r e pr ot ocol . Fu n ct ion a l l y, it is impl emen t ed dif f er en t l y, bu t t h e con cept is t h e sa me.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 171 Multicasting for IPv6 Mu l t ica st in g f or

IP st a r t ed in 1988 wit h IGMP. IANA a l so a ssign ed a n ew cl a ss of a ddr essin g kn own a s Cl a ss D a ddr essin g. Mu l t ica st in g is ca r r ied over t o IPv6 a n d it s a ddr essin g a l l ows f or mor e gr a n u l a r it y. Mu l t ica st in g is u sed ext en sivel y wit h IPv6. Th e f or ma t of t h e a ddr ess is sh own in t h e sl ide. Th e f ir st 8 bit s mu st be set t o FF. Th e n ext 4 bit s a r e ca l l ed t h e flag bits, of wh ich on l y on e is def in ed. Th e T bit is t h e t r a n sien t bit . Set t in g t h is t o 1 in dica t es t h e mu l t ica st a ddr ess is n ot per ma n en t l y a ssign ed by t h e IANA. A 0 in dica t es it is per ma n en t l y a ssign ed. Th e scope is 4 bit s in l en gt h a n d con t r ol s t h e “h ea r in g r a n ge” of t h e mu l t ica st a ddr ess. It per f or ms t h e sa me f u n ct ion a s t h e TTL f iel d in a n IPv4 mu l t ica st pa cket . Th e f ol l owin g t a bl e in dica t es wh a t scopes a r e cu r r en t l y a ssign ed. Sc o pe 0 1 2 3 4 5 6 7 8 9 A B C D

Rang e Reser ved Node l oca l scope Lin k l oca l scope Un a ssign ed Un a ssign ed Sit e l oca l scope Un a ssign ed Un a ssign ed Or ga n iz a t ion l oca l scope Un a ssign ed Un a ssign ed Un a ssign ed Un a ssign ed Un a ssign ed

E F

Gl oba l scope Reser ved

Mu l t ica st in g f or IPv6 Not ice t h a t in IPv6 mu l t ica st a ddr esses, wea vin g t h e scope in a s pa r t of t h e a ddr ess ma kes it possibl e t o h a ve mu l t ipl e mu l t ica st a ddr esses f or t h e sa me f u n ct ion . Th e f ir st pa r t of t h e a ddr ess is t h e mu l t ica st a ddr ess iden t if ier , bu t t h e scope is in cl u ded in t h e over a l l a ddr ess. Th is a l l ows f or mu l t ipl e mu l t ica st a ddr esses t o be a ssign ed t o t h e sa me f u n ct ion . For exa mpl e, t h er e is on e mu l t ica st a ddr ess l ookin g f or a l l DHCP ser ver s in a r a diu s of 3 h ops. An ot h er wou l d a l l ow f or a r a diu s of 10 h ops, bu t it is st il l t h e sa me mu l t ica st f u n ct ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 172 IPv6 Routing IPv6 Ro ut ing • Exist in g r ou t in g pr ot ocol s (OSPF, RIP, IDRD, et c.) a r e st r a igh t f or wa r d ext en sion s of IPv4 r ou t in g. • IPv6 in cl u des n ew r ou t in g ext en sion s su ch a s: • Pr ovider sel ect ion • Host mobil it y • Au t o-r ea ddr essin g • OSPF: • Cr ea t es a sepa r a t e l in k-st a t e da t a ba se • Ma kes r oom f or t h e 128-bit a ddr ess • Ca n n ot in t er oper a t e wit h IPv4

Rou t in g in IPv6 is a l most

iden t ica l t o IPv4 r ou t in g u n der CIDR except t h a t t h e a ddr esses a r e 128-bit IPv6 a ddr esses in st ea d of 32-bit IPv4 a ddr esses. Wit h ver y st r a igh t f or wa r d ext en sion s, a l l of IPv4’s r ou t in g a l gor it h ms (OSPF, RIP, IDRP, ISIS, et c.) ca n u sed t o r ou t e IPv6. IPv6 a l so in cl u des simpl e r ou t in g ext en sion s t h a t su ppor t power f u l n ew r ou t in g f u n ct ion a l it y. Th ese ca pa bil it ies in cl u de: • Pr ovider sel ect ion (ba sed on pol icy, per f or ma n ce, cost , et c.) • Host mobil it y (r ou t e t o cu r r en t l oca t ion ) • Au t o-r ea ddr essin g (r ou t e t o n ew a ddr ess) Th e n ew r ou t in g f u n ct ion a l it y is obt a in ed by cr ea t in g sequ en ces of IPv6 a ddr esses u sin g t h e IPv6 Rou t in g opt ion . Th e Rou t in g opt ion is u sed by a n IPv6 sou r ce t o l ist on e or mor e in t er media t e n odes (or t opol ogica l gr ou p) t o be “visit ed” on t h e wa y t o a pa cket ’s

dest in a t ion . Th is f u n ct ion is ver y simil a r in f u n ct ion t o IPv4’s Loose Sou r ce a n d Recor d Rou t e opt ion . OSPFv6 f or IPv6, l ike IPv4, wil l r u n dir ect l y on t op of IPv6. OSPFv6 wil l r u n a s a sepa r a t e pr ot ocol ju st l ike a n y ot h er “sh ips in t h e n igh t ” t ype of pr ot ocol in a mu l t ipr ot ocol r ou t er . It wil l h a ve a sepa r a t e l in k-st a t e da t a ba se t h a n OSPFv4. In sh or t , n ot h in g wil l be sh a r ed bet ween OSPFv4 a n d OSPFv6 (in t h e r ou t er , t h a t is). Ea ch wil l n ot kn ow t h e ot h er exist s. However , in or der t o ma ke IPv6 oper a t e wit h OSPFv6, some ch a n ges a r e n ecessa r y. Most n ot a bl y wil l be t h e 128-bit a ddr ess. Rou t er IDs, l in ks, a n d a r ea s wil l be a ssocia t ed wit h a n 128-bit n u mber . RIP ma de it t h r ou gh a s wel l . How cou l d we f or get good ol d RIP? Hey, it ’s st il l a good, decen t pr ot ocol f or sma l l n et wor ks a n d is ver y ea sy t o impl emen t . An d, wit h t h e a dven t of RIP2, RIP is a l ive a n d wel l . As wit h t h e a dva n t a ge of VLSM wit h RIP2, t h e domin a n ce of RIP con t in u es a n d ext en sion s f or 128 bit a ddr essin g h a ve been pr ovided.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 173 RIPng Th e pa cket

f or ma t is sh own in t h e sl ide a n d it is r epr esen t ed by RFC 2080. Not ice t h a t t h e sa me a mou n t of spa ce is t a ken u p f or t h e r ou t e t a bl e en t r ies a s IPv4 (160 bit s per en t r y). On e f ea t u r e t h a t wa s a dded ext en ded t h e pa cket siz e t o beyon d t h e l imit of 576 byt es a s in RIPv1 a n d v2. It wa s n ot ed t h a t t h ese u pda t e pa cket s wil l n ever t r a ver se a r ou t er , a n d t h er ef or e t h e l imit on t h e Rou t e Ta bl e En t r ies (RTE) is simpl y l imit ed by t h e MTU of t h e mediu m over wh ich t h e pr ot ocol is bein g u sed. Th e f or mu l a is: # of RTE = (MTU - siz eof (IPv6_h dr s) - UDP_h dr l en - RIPn g_h dr l en )) / RTE_Siz e Th e 8-bit su bn et ma sk is u sed t o iden t if y t h e n u mber of bit s in t h e pr ef ix. Sin ce t h er e a r e 8 bit s, t h is gives u s t h e ca pa bil it y of a 256-bit pr ef ix, wh ich is mor e t h a n en ou gh f or t h e 128 bit s of IPv6. Legen d • h dr s – h ea der s • h dr l en – h ea der l en gt h

RIPn g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 174 ICMP Like IPv4, IPv6 does n ot

pr ovide er r or det ect ion . Th is is a f u n ct ion of ICMP. ICMP f or IPv6 h a s been a ddr essed a s wel l . In t er n et Con t r ol Messa ge Pr ot ocol (ICMP) f or IPv6 is f ou n d in RFCs 1885 a n d 1970. ICMP f or IPv6 is expl a in ed in RFC 1885, bu t t h e in dividu a l f u n ct ion s of ICMP f or IPv6 (f or exa mpl e, pa t h MTU discover y) a r e det a il ed in exist in g RFCs su ch a s RFC 1191. Hopef u l l y, you a r e n ot t oo con f u sed? If you a r e, wel come t o t h e wor l d of RFCs. IPv6 a n d it s ext en sion pr ot ocol s u sed pr eviou s RFCs if t h ey wer e f ou n d r el eva n t t o t h e pr ot ocol . ICMPv6 is a n IPv4 ext en sion . It is or igin a l l y docu men t ed in RFC 792 a n d is a n in t egr a l pa r t of t h e IP. Al on g t h e yea r s, ot h er f u n ct ion s t h a t u t il iz e ICMP wer e a dded, su ch a s r ou t er discover y (RFC 1256). ICMPv6 is a ver sion of ICMP f or IPv6 (seein g a “v6” a f t er a pr ot ocol n a me is a ver y common wa y of specif yin g wh ich ver sion of IP you a r e r epr esen t in g wh en expl a in in g t h e pr ot ocol ). Th er e a r e cu r r en t l y t wo RFCs t h a t def in e a l l t h e ICMP f u n ct ion s f or IPv6: RFC 1885 a n d RFC 1970. RFC 1885 pr ovides f or in f or ma t ion on n ew f u n ct ion s a n d n a mes t h e ol der f u n ct ion s t h a t ma de it t h r ou gh t h e r eview pr ocess. RFC 1970 in cl u des t h e discover y pr ot ocol s of RFC 1256 a n d a f ew ot h er discover y pr ot ocol s. It a l so in cl u des t h e r edir ect messa ge. ICMPv6, a s def in ed in RFCs 1885 a n d 1970, is cu r r en t l y u sin g con t r ol a n d in f or ma t ion messa ges pr eviou sl y def in ed in RFCs 791, 1112, a n d 1191. Th er ef or e, t h e pr ocedu r es f or cer t a in ICMP f u n ct ion s con t in u e t o be def in ed in t h eir r espect ive RFCs. You mu st r ea d t h e or igin a l RFCs t o f u l l y expl a in t h e pr ocedu r es u sed. As in dica t ed in t h e pr eviou s t ext on IP, t h e In t er n et Pr ot ocol is a n “u n r el ia bl e” pr ot ocol . ICMP is a n a dd-on pr ot ocol t h a t does n ot ma ke IP r el ia bl e, bu t is a con t r ol messa ge pr ot ocol , t h e pu r pose of wh ich is t o pr ovide f eedba ck a bou t pr obl ems in t h e commu n ica t ion en vir on men t . Th er e a r e st il l n o gu a r a n t ees t h a t a da t a gr a m wil l be del iver ed or a con t r ol messa ge wil l be r et u r n ed. Some da t a gr a ms ma y st il l be u n del iver ed wit h ou t a n y r epor t of t h eir l oss. Th e h igh er -l evel pr ot ocol s t h a t u se IPv6

mu st st il l impl emen t t h eir own r el ia bil it y pr ocedu r es if r el ia bl e commu n ica t ion is r equ ir ed. Th e ICMP messa ges t ypica l l y r epor t er r or s in t h e pr ocessin g of da t a gr a ms. To a void t h e pr obl em of ICMP messa ges a bou t ICMP messa ges, n on e a r e sen t . ICMP • Fou n d in RFC 1885 a n d or igin a l l y f ou n d in RFC 792. • Th e f u n ct ion s of ICMP a r e expl a in ed in 1885, bu t ma n y ot h er RFCs a r e r ef er en ced: • 1970 f or Neigh bor Discover y • 1191 f or Pa t h MTU Discover y • IPv4 ext en sion . • Con t in u es t o pr ovide some ma in t en a n ce f or a n u n r el ia bl e IPv6. • No ICMPv6 messa ges a r e sen t f or ICMPv6 er r or s.

ICMPv6 is u sed by IPv6 n odes t o r epor t er r or s en cou n t er ed in pr ocessin g pa cket s, a n d t o per f or m ot h er in t er n et -l a yer f u n ct ion s, su ch a s dia gn ost ics (ICMPv6 “pin g”) a n d mu l t ica st member sh ip r epor t in g. ICMPv6 is a n in t egr a l pa r t of IPv6 a n d must be f u l l y impl emen t ed by ever y IPv6 n ode.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 175 ICMPv6 Encapsulation Th e f ol l owin g sl ide sh ows t h e en ca psu l a t ion of ICMP in IPv6.

ICMPv6 En ca psu l a t ion

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 176 ICMPv6 and ICMPv4 ICMPv6 cl ea n ed u p ICMPv4, ma in l y a n y con t r ol

messa ges t h a t wer e n ot u sed (gon e f r om bein g specif ica l l y iden t if ied a s ICMP messa ges a r e t imest a mp, t imest a mp r epl y, sou r ce qu en ch , in f or ma t ion r equ est a n d r epl y). Most of t h ese pr ocedu r es a r e in cor por a t ed in t o ot h er pr ot ocol s. For exa mpl e, sou r ce qu en ch is n ot u sed a n ymor e, f or ot h er mech a n isms, su ch a s TCP “sl ow st a r t a n d con gest ion con t r ol ,” wer e f ou n d t o be mor e u sef u l . Wh y pu t t h e on u s on t h e r ou t er s wh en a mech a n ism is bet t er def in ed a n d mor e u sef u l el sewh er e? Al so, cer t a in codes f or a specif ic t ype h a ve been moved or el imin a t ed (f or exa mpl e, sou r ce r ou t e f a il ed code f or t h e Dest in a t ion Un r ea ch a bl e Type). Th e a ddr ess f iel ds, obviou sl y, h a d t o be ext en ded t o h a n dl e ICMPv6 128-bit a ddr essin g. Th e mu l t ica st con t r ol f u n ct ion s of IGMP wer e a l so in cl u ded in ICMPv6 t o a l l ow f or t h e gr ou p member sh ip Qu er y, Repor t , a n d Ter min a t ion . Wit h a l l of t h e ch a n ges ju st discu ssed, ICMPv6 is n ot ba ckwa r ds compa t ibl e wit h ICMPv4. It u ses t h e n ext -h ea der f u n ct ion of IP a n d t h e n ext -h ea der t ype of 56. On e l a st ch a n ge is t h a t ICMPv4 messa ges copied t h e or igin a l IP h ea der a n d 64 bit s of da t a in t h e r et u r n ed messa ge. Th e except ion t o t h is is Ech o Requ est or Ech o Repl y. ICMPv6 a l l ows f or a ma ximu m of 576 byt es of da t a t o be copied f r om t h e of f en din g da t a gr a m. Th e f or ma t of t h e ICMPv6 h ea der is sh own in t h e sl ide. It is t h e sa me f or ma t a s ICMPv4. Th e t ype f iel d in dica t es t h e t ype of t h e messa ge. It s va l u e det er min es t h e f or ma t of t h e r ema in in g da t a . Er r or messa ges a r e iden t if ied a s su ch by 0 a 0 in t h e h igh -or der bit of t h eir messa ge Type f iel d va l u es. Th u s, er r or messa ges h a ve messa ge Types f r om 0 t o 127; in f or ma t ion a l messa ges h a ve messa ge Types f r om 128 t o 255. Th e code f iel d depen ds on t h e messa ge t ype a n d f u r t h er iden t if ies t h e ICMP messa ge. Th e ch ecksu m f iel d is u sed t o det ect da t a cor r u pt ion in t h e ICMPv6 messa ge a n d pa r t s of t h e IPv6 h ea der . For t h e most pa r t , t h e dest in a t ion a ddr ess is set t o t h e sou r ce a ddr ess of t h e pr eviou sl y r eceived of f en din g pa cket .

ICMPv6 and ICMPv4 • Cl ea n ed u p ICMPv4. • Timest a mp, sou r ce qu en ch , a n d in f or ma t ion r equ est a n d r epl y wer e del et ed (picked u p by ot h er pr ot ocol s) • El imin a t ed u n u sed codes a n d t ypes. • IGMP is moved in t o ICMPv6. • ICMPv6 is n ot compa t ibl e wit h ICMPv4; h owever , it is t h e sa me f or ma t • ICMPv6 does copy mor e of t h e of f en din g da t a gr a m wh en sen din g a n er r or messa ge. • Er r or messa ges h a ve t ypes f r om 0–127 a n d in f or ma t ion a l messa ges h a ve t ypes f r om 128–255.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 177 ICMPv6 Error Messages ICMPv6 Er r o r Me ssag e s • Dest in a t ion Un r ea ch a bl e: • No r ou t e t o dest in a t ion • Commu n ica t ion wit h dest in a t ion a dmin ist r a t ivel y pr oh ibit ed • Not a n eigh bor • Addr ess Un r ea ch a bl e • Por t Un r ea ch a bl e • Pa cket Too Big: • Ret u r n s t h e l a r gest pa cket siz e a va il a bl e f or t h e f or wa r ded por t

• De st inat io n Unr e ac habl e Type: 1 Code: 0 No Rou t e t o Dest in a t ion . Th er e wa s n o cor r espon din g r ou t e in t h e r ou t er ’s f or wa r din g t a bl e (on l y f or r ou t er s t h a t do n ot possess a def a u l t r ou t e en t r y). 1 Commu n ica t ion wit h Dest in a t ion Admin ist r a t ivel y Pr oh ibit ed. For exa mpl e, a f ir ewa l l or ot h er r est r ict ive a dmin ist r a t ive comma n d. 2 Not a Neigh bor . Th er e wa s a n a t t empt t o del iver t h e da t a gr a m t o a n eigh bor t h a t wa s in dica t ed in t h e st r ict sou r ce r ou t in g en t r ies, bu t t h e n ext h op in dica t ed is n ot a n eigh bor of t h is r ou t er . 3 Addr ess Un r ea ch a bl e. Th e r ou t er cou l d n ot r esol ve t h e l in k-l a yer a ddr ess f or t h e in dica t ed n et wor k a ddr ess. 4 Por t Un r ea ch a bl e. Th e dest in a t ion does n ot h a ve a ser vice por t a va il a bl e (n ot a h a r dwa r e por t !). For exa mpl e, t h e da t a gr a m is in t en ded f or TCP, bu t a l l a va il a bl e r esou r ces a r e t a ken f or TCP (t h er e a r e n o l ist en er por t s a va il a bl e). Or , t h e da t a gr a m wa s sen t t o a ser vice por t t h a t t h e dest in a t ion does n ot su ppor t ; f or exa mpl e, wh ois, or f in ger , or t h e r ou t e da emon .

Th e f ir st 32 bit s a f t er t h e ICMP h ea der a r e u n u sed a n d mu st be in it ia l iz ed t o 0 by t h e sen der a n d ign or ed by t h e r eceiver . Dest in a t ion Un r ea ch a bl e messa ges gen er a l l y or igin a t e f r om a r ou t er , bu t ca n a l so be gen er a t ed by t h e or igin a t ed n ode. Th ey a r e gen er a t ed f or a n y r ea son except con gest ion . Th er e a r e n o ICMP messa ges t o in dica t e con gest ion (ot h er pr ot ocol s mon it or a n d r epor t t h is con dit ion ). • Pac ke t To o Big Type: 2 Code: 0 Th e f ir st 32 bit s a f t er t h e ICMP h ea der in dica t e t h e ma ximu m t r a n smission u n it (MTU) f or t h e sel ect ed f or wa r ded (n ext h op) por t . Th is er r or messa ge is impor t a n t , f or da t a gr a ms do n ot n ecessa r il y h a ve t o be 576 byt es in siz e. FDDI-t o-Token -Rin g t opol ogies, f or exa mpl e, do ver y wel l wit h st r ea min g l a r ge pa cket s. Th is is a n in dica t or of t h e siz e of a pa cket t o be f or wa r ded a l on g t h e pa t h f r om sou r ce t o dest in a t ion . Th is is t h e pa t h MTU discover y pr ocedu r e, wh ich is ou t l in ed in RFC 1191. Th is er r or messa ge a l so pr ovides a n except ion t o t h e r u l es: It ca n be sen t in r espon se t o a pa cket r eceived wit h a n IPv6 mu l t ica st dest in a t ion a ddr ess, or a l in k-l a yer mu l t ica st or l in k-l a yer br oa dca st a ddr ess. • Time Exc e e de d Type: 3 Code: 0 Hop l imit exceeded in t r a n sit 1 Fr a gmen t r ea ssembl y t ime exceeded Th e f ir st 32 bit s of t h e ICMP messa ge a r e specif ied a s u n u sed f or a l l code va l u es a n d mu st be in it ia l iz ed t o 0 by t h e sen der a n d ign or ed by t h e r eceiver . Th is ca n be sen t if a r ou t er r eceives a pa cket wit h a h op l imit of 0, or a r ou t er decr emen t s a pa cket ’s h op l imit t o 0. Th e pa cket t h en mu st be disca r ded, a n d a n ICMPv6 Time Exceeded messa ge wit h Code 0 mu st be sen t t o t h e sou r ce of t h e pa cket . Th is in dica t es eit h er a r ou t in g l oop or t oo sma l l a n in it ia l h op l imit va l u e. ICMPv6 Er r o r Me ssag e s (c o nt inue d) • Time Exceeded. • Hop l imit exceeded in t r a n sit • Fr a gmen t r ea ssembl y t ime exceeded • Pa r a met er Pr obl em. • Er r on eou s h ea der f iel d en cou n t er ed • Un r ecogn iz ed n est h ea der t ype en cou n t er ed • Un r ecogn iz ed IPv6 opt ion

• Par ame t e r Pr o bl e m Type: 4 Code: 0 Er r on eou s h ea der f iel d en cou n t er ed 1 Un r ecogn iz ed Next Hea der t ype en cou n t er ed 2 Un r ecogn iz ed IPv6 opt ion en cou n t er ed Th e f ir st 32 bit s of t h e ICMP messa ge compr ise a poin t er t h a t iden t if ies t h e oct et of f set wit h in t h e in vokin g pa cket wh er e t h e er r or wa s det ect ed. It poin t s beyon d t h e en d of t h e ICMPv6 pa cket if t h e f iel d in er r or is l a r ger t h a n t h e 576-byt e l imit of a n ICMPv6 er r or messa ge. If a n IPv6 n ode ca n n ot pr ocess t h e da t a gr a m du e t o some er r or in t h e h ea der s, it mu st disca r d t h e pa cket a n d sh ou l d sen d a n ICMPv6 Pa r a met er Pr obl em messa ge t o t h e pa cket ’s sou r ce, in dica t in g t h e t ype a n d l oca t ion of t h e pr obl em. A poin t er f iel d is pr ovided t o in dica t e t h e t ype of pr obl em. Th e poin t er f iel d in dica t es t h e poin t in t h e or igin a t in g h ea der wh er e t h e er r or wa s det ect ed. For exa mpl e, a n ICMPv6 messa ge wit h Type f iel d = 4, Code f iel d = 1, a n d Poin t er f iel d = 40, wou l d in dica t e t h a t t h e IPv6 ext en sion h ea der f ol l owin g t h e IPv6 h ea der of t h e or igin a l pa cket h ol ds a n u n r ecogn iz ed Next Hea der f iel d va l u e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 178 ICMP Informational Messages • Ec ho Re que st Type: 128 Code: 0 Th e f ir st 16 bit s of t h e ICMP messa ge a r e a n iden t if ier t o a id in t h e con st r u ct ion of a n Ech o Repl y t o a n Ech o Requ est . It ma y con t a in a 0. Th e n ext 16 bit s a r e a sequ en ce n u mber t o a id in ma t ch in g specif ica l l y mu l t ipl e ech o r equ est s f r om t h e sa me sou r ce. It , t oo, ma y con t a in a 0. Th e r ema in in g messa ge is opt ion da t a t h a t ma y h a ve been t yped in on t h e r equ est a n d is ech oed on t h e r epl y. Th is is t h e PING comma n d t h a t you ma y h a ve t yped in . For exa mpl e, PING 192.1.1.1 is a n ech o r equ est t o a n ech o ser ver r esidin g on h ost 192.1.1.1. • Ec ho Re pl y Type: 129 Code: 0 Th e f ir st 16 bit s (a f t er t h e ICMP h ea der ) compr ise a n iden t if ier f iel d f r om t h e pr eviou sl y r eceived Ech o Requ est messa ge, wh ich is u sed t o ma t ch r epl ies wit h r equ est s. Th e n ext 16 bit s compr ise a sequ en ce n u mber f r om t h e n ode t h a t sen t t h e ech o r equ est n u mber messa ge. Th is is u sef u l t o ma t ch mu l t ipl e r equ est s f r om t h e sa me h ost . Th e r est of t h e messa ge con t a in s ech oed da t a copied f r om t h e r eceived ech o r equ est . ICMP Inf o r mat io nal Me ssag e s • Ech o Requ est • Ech o Repl y • Good ol ’ PING

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 179 ICMP and Neighbor Discovery ICMP and Ne ig hbo r Disc o ve r y • • • • •

Rou t er Sol icit a t ion Rou t er Adver t isemen t Neigh bor Sol icit a t ion Neigh bor Adver t isemen t Redir ect

Addr ess r esol u t ion is a ccompl ish ed via Neigh bor

Discover y messa ges, wh ich a r e gen er a t ed a n d pr ocessed by ICMP. Th e f ol l owin g a r e t h ose messa ges: Ro ut e r So l ic it at io n. Host s sen d Rou t er Sol icit a t ion s in or der t o pr ompt r ou t er s t o gen er a t e Rou t er Adver t isemen t s qu ickl y. Ro ut e r Adve r t ise me nt . Rou t er s sen d ou t Rou t er Adver t isemen t messa ges per iodica l l y, or in r espon se t o Rou t er Sol icit a t ion s. Th ese messa ges con t a in in f or ma t ion r el a t ed t o t h e l oca l pr ef ixes a n d if t h e r ou t er ca n a ct a s a def a u l t r ou t er . Ne ig hbo r So l ic it at io n. Nodes sen d Neigh bor Sol icit a t ion s t o r equ est t h e l in kl a yer a ddr ess of a t a r get n ode wh il e a l so pr ovidin g t h eir own l in k-l a yer a ddr ess t o t h e t a r get . Neigh bor Sol icit a t ion s a r e mu l t ica st wh en t h e n ode n eeds t o r esol ve a n a ddr ess a n d u n ica st wh en t h e n ode seeks t o ver if y t h e r ea ch a bil it y of a n eigh bor . Ne ig hbo r Adve r t ise me nt . A n ode sen ds Neigh bor Adver t isemen t s in r espon se t o Neigh bor Sol icit a t ion s, a n d sen ds u n sol icit ed Neigh bor Adver t isemen t s in or der t o (u n r el ia bl y) pr opa ga t e n ew in f or ma t ion qu ickl y. For exa mpl e, if a n ode h a s det er min ed some ch a n ges, su ch a l in k-l evel a ddr ess ch a n ge, it ca n qu ickl y r el a y t h is in f or ma t ion t o it s n eigh bor s. Re dir e c t . Rou t er s sen d Redir ect pa cket s t o in f or m a h ost of a bet t er f ir st -h op

n ode on t h e pa t h t o a dest in a t ion . Host s ca n be r edir ect ed t o a bet t er f ir st -h op r ou t er , bu t ca n a l so be in f or med by a r edir ect t h a t t h e dest in a t ion is in f a ct a n eigh bor . Th e l a t t er is a ccompl ish ed by set t in g t h e ICMP Ta r get Addr ess equ a l t o t h e ICMP Dest in a t ion Addr ess.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 180 ICMPv6 and Multicast • Gr o up Me mbe r ship me ssag e s Th e f u n ct ion s of IGMP wer e moved in t o ICMPv6. Th e ICMPv6 Gr ou p Member sh ip messa ges a r e u sed t o con vey in f or ma t ion a bou t mu l t ica st gr ou p member sh ip f r om n odes t o t h eir n eigh bor in g r ou t er s. Pl ea se r ef er t o Pa r t Six f or mor e in f or ma t ion on t h e IGMP f u n ct ion s. Th is f u n ct ion of ICMPv6 a l l ows f or IGMP messa ges t o be sen t . Th ese a r e Gr ou p Member sh ip messa ges f or Qu er y, Repor t s, a n d Redu ct ion (or l ea vin g a gr ou p wit h a t er min a t ion messa ge). Du e t o t h e dyn a mic n a t u r e of t h e IPv6 a n d it s Neigh bor Discover y pr ot ocol s (r ou t er s a n d h ost s), IGMP f u n ct ion s wer e moved in t o t h e ICMP pr ot ocol su it e. For exa mpl e, wh en a n ode in it ia l iz es (in a n IPv6 en vir on men t ), it mu st immedia t el y join t h e a l l -n odes mu l t ica st a ddr ess on t h a t in t er f a ce, a s wel l a s t h e sol icit ed-n ode mu l t ica st a ddr ess cor r espon din g t o ea ch of t h e IP a ddr esses a ssign ed t o t h e in t er f a ce. In t h e IPv6 h ea der t h e Dest in a t ion Addr ess is set a s f ol l ows: In a Gr ou p Member sh ip Qu er y messa ge, t h e mu l t ica st a ddr ess of t h e gr ou p bein g qu er ied, or t h e Lin k-Loca l Al l -Nodes mu l t ica st a ddr ess. In a Gr ou p Member sh ip Repor t or a Gr ou p Member sh ip Redu ct ion messa ge, t h e mu l t ica st a ddr ess of t h e gr ou p bein g r epor t ed or t er min a t ed. ICMPv6 and Mul t ic ast • Gr ou p Member sh ip messa ges • Gr ou p Member sh ip Qu er y • Gr ou p Member sh ip Repor t • Gr ou p Member sh ip Redu ct ion (Lea ve Gr ou p)

Th e h op l imit is set t o 1 t o en su r e t h is messa ge does n ot l ea ve t h e l oca l su bn et wor k. Th e ICMPv6 f iel ds a r e set a s f ol l ows: Type:

130—Gr ou p Member sh ip Qu er y 131—Gr ou p Member sh ip Repor t 132—Gr ou p Member sh ip Redu ct ion Code: 0 Th e f ir st 16 bit s a f t er t h e ICMP h ea der a r e u sed f or t h e Ma ximu m Respon se Del a y. In Qu er y messa ges, it is t h e ma ximu m t ime t h a t r espon din g Repor t messa ges ma y be del a yed, in mil l isecon ds. In Repor t a n d Redu ct ion messa ges, t h is f iel d is in it ia l iz ed t o 0 by t h e sen der a n d ign or ed by r eceiver s. Th e n ext 16 bit s a r e u n u sed a n d t h ey a r e in it ia l iz ed t o 0 by t h e sen der a n d ign or ed by r eceiver s. Th e r est of t h e messa ge is f il l ed wit h t h e Mu l t ica st Addr ess, wh ich is t h e a ddr ess of t h e mu l t ica st gr ou p t o wh ich t h e messa ge is bein g sen t . In Qu er y messa ges, t h e Mu l t ica st Addr ess f iel d ma y be 0, impl yin g a qu er y f or a l l gr ou ps.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 181 IPv6 Cache Entries IPv6 Cac he Ent r ie s • Dest in a t ion ca ch e—con t a in s l in k l a yer in f or ma t ion a bou t dest in a t ion s t o wh ich da t a h a s been r ecen t l y sen t . • Neigh bor ca ch e—con t a in s l in k-l a yer in f or ma t ion a bou t a n eigh bor . • Pr ef ix List ca ch e—cr ea t ed f r om r ou t er a dver t isemen t s, t h is is a l ist in g of l oca l pr ef ixes. • Rou t er List ca ch e—con t a in s in f or ma t ion a bou t t h ose r ou t er s t o wh ich pa cket s ma y be sen t .

Al l

of t h e f ol l owin g ca ch es a r e bu il t in pa r t by t h e Neigh bor Discover y pr ocess. In st ea d of t h e simpl ex ARP ca ch e u sed wit h IPv4, IPv6 ma in t a in s f ou r ca ch es. (Act u a l l y, f ou r ca ch es ma y n ot be ma in t a in ed. Impl emen t er s ca n in t egr a t e t h is in f or ma t ion a n y wa y t h ey wish , in cl u din g simpl y u sin g on e l a r ge t a bl e or f ou r l in ked t a bl es in on e da t a ba se, bu t a l l t h e r equ ir ed in f or ma t ion mu st be ga t h er ed a n d ma in t a in ed. Th e en t r ies a r e sh own h er e sepa r a t el y f or simpl icit y r ea son s.) De st inat io n c ac he . Th is ca ch e con t a in s in f or ma t ion a bou t dest in a t ion s t o wh ich t r a f f ic h a s been r ecen t l y sen t . It in cl u des bot h l oca l a n d r emot e dest in a t ion s a n d a ssocia t es a n IPv6 a ddr ess of a dest in a t ion wit h t h a t of t h e n eigh bor t owa r d wh ich t h e pa cket s a r e sen t . Th is ca ch e is u pda t ed wit h in f or ma t ion l ea r n ed f r om ICMP Redir ect messa ges. Ot h er in f or ma t ion su ch a s t h e Pa t h MTU (PMTU) a n d r ou n d-t r ip t imer s ma in t a in ed by t r a n spor t pr ot ocol s ca n be in t h is ca ch e. En t r ies a r e cr ea t ed by t h e n ext -h op det er min a t ion pr ocedu r e. Ne ig hbo r c ac he . A r ecor d t h a t con t a in s in f or ma t ion a bou t in dividu a l n eigh bor s (h ost or a r ou t er ma y be a n en t r y) t o wh ich t r a f f ic h a s been r ecen t l y sen t . It con t a in s su ch in f or ma t ion a s t h e n eigh bor ’s l in k-l a yer a ddr ess, a n in dica t ion of wh et h er t h e n eigh bor is a h ost or a r ou t er , a n d a poin t er t o a n y qu eu ed pa cket s

wa it in g f or a ddr ess r esol u t ion t o compl et e. Th is in f or ma t ion is a l so u sed by t h e Neigh bor Un r ea ch a bil it y pr ot ocol . Pr e f ix List c ac he . Cr ea t ed f r om in f or ma t ion r eceived in Rou t er Adver t isemen t s, t h is is a l ist in g of t h e l oca l pr ef ixes a n d a n in dividu a l expir a t ion t imer t h a t def in es a set of a ddr esses t h a t a r e on -l in k. Nodes r eceive a n d st or e t h is in f or ma t ion t h a t is t r a n smit t ed f r om a r ou t er in t h is ca ch e. Th is en a bl es a n ode t o det er min e a r emot e dest in a t ion . A specia l “in f in it y” t imer va l u e specif ies t h a t a pr ef ix r ema in s va l id f or ever , u n l ess a n ew (f in it e) va l u e is r eceived in a su bsequ en t a dver t isemen t . For exa mpl e, t h e pr ef ix of t h e l oca l l in k t o wh ich a n ode is a t t a ch ed is con sider ed t o be on t h e pr ef ix l ist wit h a n in f in it e in va l ida t ion t imer , r ega r dl ess of wh et h er r ou t er s a r e a dver t isin g a pr ef ix f or it . Received r ou t er a dver t isemen t s ca n n ot ch a n ge t h is va l u e. Ro ut e r List c ac he . Bu il t f r om r eceived r ou t er a dver t isemen t s, t h is l ist con t a in in f or ma t ion a bou t t h ose r ou t er s t o wh ich pa cket s ma y be sen t . Rou t er List en t r ies poin t t o en t r ies in t h e Neigh bor ca ch e; t h e a l gor it h m f or sel ect in g a def a u l t r ou t er f a vor s r ou t er s kn own t o be r ea ch a bl e over t h ose wh ose r ea ch a bil it y is su spect . Ea ch en t r y is ma t ed wit h a n a ssocia t ed expir a t ion t imer va l u e (ext r a ct ed f r om Rou t er Adver t isemen t s). Th is t imer is u sed t o del et e en t r ies t h a t t h e n ode h a s n ot r eceived a dver t isemen t s f r om.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 182 IPv6 Algorithm IPv6 Al g o r it hm • Ea sier if you u n der st a n d RFC 1970. • To t r a n smit a da t a gr a m, t h e sou r ce mu st con su l t t h e dest in a t ion ca ch e, pr ef ix l ist , a n d t h e def a u l t r ou t er . • It n eeds t o det er min e t h e “n ext h op” • A sou r ce f ir st l ooks in t h e dest in a t ion ca ch e f or a ma t ch in g en t r y t o t h e dest in a t ion IP a ddr ess. • If on e is n ot f ou n d h er e, con su l t t h e pr ef ix l ist ca ch e • Loca l a ddr ess, t h e n ext h op is simpl y t h a t of t h e dest in a t ion IP a ddr ess

If you a r e l ookin g f or

mor e in f or ma t ion on h ow IPv6 r ou t es da t a gr a ms, you mu st f ir st r ea d RFC 1970. Th is is a ver y impor t a n t RFC f or you r u n der st a n din g of t h e IPv6 r ou t in g a l gor it h m. It con t a in s t h e Neigh bor Discover y mech a n ism a n d in cl u des ever yt h in g on IPv6 su bn et s, su ch a s h ost s a n d r ou t er s. IPv6 does n ot u se ARP; it u ses Neigh bor Discover y. IPv6 n eeds t h e pr eviou sl y l ist ed ca ch e en t r ies t o a ssist in r ou t in g a da t a gr a m. If a n IPv6 n ode n eeds t o t r a n smit a da t a gr a m, it mu st f ir st f in d ou t t h e n ext h op t owa r ds t h e dest in a t ion (kn own a s next-hop determination). In ot h er wor ds, it mu st det er min e if t h e dest in a t ion st a t ion is l oca l or r emot e, a n d t h er ef or e sen ds t h e pa cket dir ect l y t o t h e dest in a t ion or u t il iz es a r ou t er . Th is pr ocess u ses t h e Pr ef ix List ca ch e a n d t h e Dest in a t ion ca ch e. On ce t h e n ext h op is kn own , it mu st det er min e t h e n ext h op’s l in kl a yer a ddr ess. To r ou t e a da t a gr a m in IPv6, we con su l t t h e Dest in a t ion ca ch e, t h e Pr ef ix List , a n d t h e Def a u l t Rou t er List t o det er min e t h e IP a ddr ess of t h e a ppr opr ia t e n ext h op. Th e n ext h op det er min a t ion is in voked t o cr ea t e a Dest in a t ion Ca ch e en t r y. Th e r esu l t s of n ext -

h op det er min a t ion compu t a t ion s a r e sa ved in t h e Dest in a t ion ca ch e (wh ich a l so con t a in s u pda t es l ea r n ed f r om Redir ect messa ges). Th er ef or e, a sen din g n ode f ir st l ooks in t h e Dest in a t ion ca ch e f or a ma t ch in g en t r y t o t h e dest in a t ion IP a ddr ess. If on e is n ot f ou n d, t h e Pr ef ix List ca ch e is con su l t ed. Th e sen din g n ode compa r es t h e dest in a t ion pr ef ix ma sk wit h t h e en t r ies in t h e Pr ef ix List ca ch e. If a ma t ch is f ou n d, it is t h en det er min ed wh et h er t h e dest in a t ion is l oca l or r emot e. If it is l oca l , t h en t h e n ext -h op a ddr ess is simpl y t h e dest in a t ion a ddr ess of t h e da t a gr a m; ot h er wise, t h e dest in a t ion is r emot e a n d t h e n ode mu st sel ect a r ou t er f r om t h e def a u l t r ou t er l ist . If t h er e a r e n o en t r ies in t h e def a u l t r ou t er l ist , t h en t h e dest in a t ion is a ssu med t o be l oca l . Th e r esu l t s of t h is n ext -h op det er min a t ion l ooku p a r e st or ed in t h e Dest in a t ion ca ch e (a l on g wit h r eceived ICMP r edir ect s). On ce t h e n ext h op h a s been det er min ed, t h e cor r espon din g en t r y is a dded t o t h e Dest in a t ion ca ch e a n d t h e Neigh bor ca ch e is u sed t o det er min e t h e media a ddr ess of t h a t n ext -h op n eigh bor . On ce t h e IP a ddr ess of t h e n ext -h op n ode is kn own , t h e sen der exa min es t h e Neigh bor ca ch e f or l in k-l a yer in f or ma t ion a bou t t h a t n eigh bor . If n o en t r y exist s, t h e sen der cr ea t es on e, a n d t h en st a r t s t h e a ddr ess r esol u t ion pr ocedu r e t o compl et e t h e en t r y. Th e da t a gr a m t o be t r a n smit t ed mu st wa it f or t h is t o compl et e. On ce t h e n eigh bor en t r y is compl et e, t h is en t r y wil l be u sed f or su bsequ en t t r a n sf er s t o t h a t dest in a t ion st a t ion . No ot h er pr ocedu r es a r e n eeded.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 183 RFCs Related to IPv6 1883: Descr ibes t h e IPv6 pr ot ocol (RFC 2147 u pda t es [does n ot r epl a ce] RFC 1883). 2147 PS: D. Bor ma n , “TCP a n d UDP over IPv6 Ju mbogr a ms,” 05/23/97, (3 pa ges) (.t xt f or ma t ) (u pda t es RFC 1883). 2133 I: R. Gil l iga n , S. Th omson , J. Bou n d, W. St even s, “Ba sic Socket In t er f a ce Ext en sion s f or IPv6,” 04/21/97 (32 pa ges). 2080 PS: G. Ma l kin , R. Min n ea r , “RIPn g f or IPv6,” 01/10/97 (19 pa ges). 2073 PS: Y. Rekh t er , P. Lot h ber g, R. Hin den , S. Deer in g, J. Post el , “An IPv6 Pr ovider Ba sed Un ica st Addr ess For ma t ,” 01/08/97 (7 pa ges). 2030 I: D. Mil l s, “Simpl e Net wor k Time Pr ot ocol (SNTP) Ver sion 4 f or IPv4, IPv6, a n d OSI,” 10/30/96 (18 pa ges). 2019 PS: M. Cr a wf or d, “Tr a n smission of IPv6 Pa cket s Over FDDI,” 10/17/96 (6 pa ges). 1972 PS: M. Cr a wf or d, “A Met h od f or t h e Tr a n smission of IPv6 Pa cket s Over Et h er n et Net wor ks,” 08/16/96 (4 pa ges). 1971 PS: S. Th omson , T. Na r t en , “IPv6 St a t el ess Addr ess Au t ocon f igu r a t ion ,” 08/16/96 (23 pa ges). 1970 PS: T. Na r t en , E. Nor dma r k, W. Simpson , “Neigh bor Discover y f or IP Ver sion 6 (IPv6),” 08/16/96 (82 pa ges). 1933 PS: R. Gil l iga n , E. Nor dma r k, “Tr a n sit ion Mech a n isms f or IPv6 Host s a n d Rou t er s,” 04/08/96 (22 pa ges).

1924 I: R. El z , “A Compa ct Repr esen t a t ion of IPv6 Addr esses,” 04/01/96 (6 pa ges). 1897 E: R. Hin den , J. Post el , “IPv6 Test in g Addr ess Al l oca t ion ,” 01/25/96 (4 pa ges). 1888 E: J. Bou n d, B. Ca r pen t er , D. Ha r r in gt on , J. Hou l dswor t h , A. Ll oyd, “OSI NSAPs a n d IPv6,” 08/16/96 (16 pa ges). 1887 I: Y. Rekh t er , T. Li, “An Ar ch it ect u r e f or IPv6 Un ica st Addr ess Al l oca t ion ,” 01/04/96 (25 pa ges). 1885 PS: A. Con t a , S. Deer in g, “In t er n et Con t r ol Messa ge Pr ot ocol (ICMPv6) f or t h e In t er n et Pr ot ocol Ver sion 6 (IPv6),” 01/04/96 (20 pa ges). 1884 PS: R. Hin den , S. Deer in g, “IP Ver sion 6 Addr essin g Ar ch it ect u r e,” 01/04/96 (18 pa ges) (.t xt f or ma t ). 1883 PS: S. Deer in g, R. Hin den , “In t er n et Pr ot ocol , Ver sion 6 (IPv6) Specif ica t ion ,” 01/04/96 (37 pa ges) (u pda t ed by RFC 2147). 1881 I: I. IESG, “IPv6 Addr ess Al l oca t ion Ma n a gemen t ,” 12/26/95 (2 pa ges). 1809 I: C. Pa r t r idge, “Usin g t h e Fl ow La bel Fiel d in IPv6,” 06/14/95 (6 pa ges).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Part Four Beyond the IP Layer Chapter 184 Internet Control Message Protocol (ICMP) Th e job of IP is t o a ddr ess a n d r ou t e (l oca l

or r emot e) a da t a gr a m. Th a t ’s it . On ce t r a n smit t ed, IP l ooks f or t h e n ext pa cket t o t r a n smit or r eceive. Sin ce IP is a con n ect ion l ess, u n r el ia bl e del iver y ser vice, a l l owin g r ou t er s a n d h ost s on a n in t er n et t o oper a t e in depen den t l y, t h er e a r e cer t a in in st a n ces wh en er r or s wil l occu r . Some of t h ese er r or s cou l d be: a pa cket is n ot r ou t ed t o t h e dest in a t ion n et wor k, t h e r ou t er is t oo con gest ed t o h a n dl e a n y mor e pa cket s, or a h ost ma y n ot be f ou n d on t h e in t er n et . Th er e is n o pr ovision in IP t o gen er a t e er r or messa ges or con t r ol messa ges; ICMP is t h e pr ot ocol t h a t h a n dl es t h ese in st a n ces f or IP. Th e pu r pose of t h ese con t r ol messa ges is t o pr ovide f eedba ck a bou t pr obl ems in t h e commu n ica t ion en vir on men t , n ot t o ma ke IP r el ia bl e. ICMP does n ot u se a t r a n spor t l a yer a n d r u n s dir ect l y on t op of IP. Th er ef or e, ICMP is a n “u n r el ia bl e” f u n ct ion a n d n o ICMP er r or messa ge is sen t f or a n ICMP messa ge. For exa mpl e, wh en a t r a n smit t in g st a t ion t r a n smit s a pa cket u sin g in dir ect r ou t in g t o a r emot e dest in a t ion , wh a t h a ppen s if a f in a l r ou t er ca n n ot f in d t h e en dst a t ion (t h e en dst a t ion is n ot in t h e r ou t er ’s ARP ca ch e a n d it does n ot r espon d t o t h e r ou t er ’s ARP r equ est )? Th is is on e of t h e r ea son s f or t h e ICMP ser vice. Th e r ou t er sen ds a n ICMP messa ge ba ck t o t h e or igin a t or of t h e da t a gr a m, en dst a t ion A, t h a t t h e dest in a t ion n ode ca n n ot be f ou n d. Th is er r or messa ge is t h en t r a n smit t ed t o t h e u ser . Not ice t h a t ea ch ICMP messa ge h a s a Type f iel d a n d a Code f iel d. Th e Type f iel d iden t if ies t h e ICMP da t a gr a m a n d t h e Code f iel d pr ovides f u r t h er gr a n u l a r it y. For exa mpl e, Type Code 3 in dica t es t h a t t h e dest in a t ion is u n r ea ch a bl e, bu t a Code f iel d of 1 gives u s a f u r t h er cl u e t h a t t h e dest in a t ion h ost (a n d n ot t h e por t or n et wor k) is u n r ea ch a bl e. Th is cou l d mea n t h e n et wor k wa s f ou n d bu t n o st a t ion r espon ded t o a n

ARP r equ est wh en t r a n smit t ed by t h e sen din g r ou t er . Th e r eceiver of t h a t ICMP da t a gr a m wou l d t h en post a messa ge eit h er t o a scr een or t o a l og f il e in t er pr et in g t h e ICMP messa ge. Tr y t h is on you r own . Tr y pin gin g a device t h a t you kn ow does n ot exist .

In t er n et Con t r ol Messa ge Pr ot ocol (ICMP) ICMP wil l a l so copy t h e f ir st 64 bit s (IPv6 in cr ea ses t h is t o 512 byt es) of da t a f r om t h e or igin a l da t a gr a m in t o it s own . Th is pr ovides some in f or ma t ion a bou t t h e of f en din g da t a gr a m a n d ca n be u sed in t r ou bl esh oot in g. ICMPv6 pr ovides mor e of t h e or igin a l da t a . Th e sl ide sh ows t h e f or ma t f or ICMP a n d t h e en ca psu l a t ion in side of IP. ICMP r epor t s on ma n y en t it ies on a n in t er n et . As t h e t a bl e in t h e sl ide sh ows, t h er e a r e ma n y f u n ct ion s of ICMP a s in dica t ed by t h e u se of a Code f iel d. ICMP da t a gr a ms a r e r ou t a bl e sin ce t h ey u se IP t o del iver t h eir messa ges. IP r esides on t op of IP a n d does n ot u se TCP or UDP f or it s t r a n spor t . ICMP is a sepa r a t e pr ot ocol f r om IP, bu t it is a n in t egr a l pa r t of IP’s oper a t ion . ICMP is ext en sibl e beyon d con t r ol mech a n isms a s you wil l see n ext .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 185 ICMP PING Ask a n yon e in vol ved in t r ou bl esh oot in g a n IP n et wor k a n d h e or

sh e wil l t el l you t h e most -u sed a ppl ica t ion is t h e PING a ppl ica t ion —on e of t h e most common u ses f or ICMP is t h e PING pr ogr a m. Pin g (n ot or igin a l l y n a med, bu t common l y ca l l ed Pa cket In t er n et Gr oper ) is a n ICMP messa ge t h a t t r ies t o l oca t e ot h er st a t ion s on t h e in t er n et t o see if t h ey a r e a ct ive or t o see if a pa t h is u p. PING is a n ech o pr ogr a m. Th e or igin a t or of a da t a gr a m sen ds a PING r equ est a n d t h e dest in a t ion st a t ion sh ou l d ech o t h is r equ est . In f or ma t ion ca n be con t a in ed in t h e PING da t a gr a m, wh ich t h e dest in a t ion st a t ion sh ou l d ech o. PING h a s t h e f ol l owin g f or ma t (u sin g Win dows 95):

Usag e ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list

Opt io ns -t -a -n cou n t -l siz e -f -i TTL -v TOS -r cou n t -s cou n t -j h ost -l ist

Pin g t h e specif ied h ost u n t il in t er r u pt ed Resol ve a ddr esses t o h ost n a mes Nu mber of ech o r equ est s t o sen d Sen d bu f f er siz e Set Don ’t Fr a gmen t f l a g in pa cket Time t o Live Type of Ser vice Recor d r ou t e f or cou n t h ops Timest a mp f or cou n t h ops Loose sou r ce r ou t e a l on g h ost -l ist

-k h ost -l ist -w t imeou t

St r ict sou r ce r ou t e a l on g h ost -l ist Timeou t in mil l isecon ds t o wa it f or ea ch r epl y

Not ice t h a t you ca n t est ma n y t h in gs a l on g t h e pa t h t o a dest in a t ion u sin g t h e PING comma n d; f or exa mpl e, t imin g, sou r ce r ou t e, r ou t e r ecor din g, a n d da t a . An ot h er u se of t h e PING comma n d is t o ch eck f or n et wor k del a ys a l on g a pa t h . Th e r espon se t o a PING r equ est ca n r epor t t h e r espon se del a y (u su a l l y mea su r ed in mil l isecon ds). A l ot of n et wor k ma n a gemen t sof t wa r e u ses t h is comma n d t o det er min e t h e st a t u s of a given st a t ion . Net wor k ma n a gemen t sof t wa r e wil l bu il d ma ps t o sh ow t h e t opol ogy a n d pl a cemen t of n et wor k st a t ion s. Usin g col or s (gr een f or a ct ive, yel l ow f or possibl e er r or s, a n d r ed f or n ot r espon din g), a n et wor k ma n a ger ca n t r a ce pr obl ems on t h e n et wor k. A l ot of t h e wor k is don e t h r ou gh t h e u se of t h e PING u t il it y.

ICMP PING

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 186 More ICMP Functions ICMP h a s a dded f u n ct ion s over

t h e yea r s a s in dica t ed by RFCs 1256 (Rou t er Discover y) a n d 1393 (ICMP Tr a cer ou t e). ICMP r u n n in g in a r ou t er ca n r espon d t o a h ost ’s r equ est t o f in d t h e su bn et a ddr ess ma sk f or it s n et wor k. A h ost , u pon st a r t u p, ca n r equ est of a r ou t er t h e su bn et ma sk a ssign ed t o t h e n et wor k. Al t h ou gh n ot r ea l l y u sed a n ymor e (t h er e a r e bet t er met h ods f or con t r ol l in g t r a f f ic, su ch a s t h e Sl ow St a r t a l gor it h m discu ssed in a momen t ). Source quench is t h e en dst a t ion ’s a bil it y t o in dica t e t o t h e or igin a t or of a messa ge t h a t t h e h ost ca n n ot a ccept t h e r a t e a t wh ich t h e sen der is su bmit t in g t h e pa cket s. A sou r ce qu en ch pa cket is con t in u a l l y gen er a t ed t o t h e or igin a t or u n t il t h e r a t e of da t a f l ow sl ows down . Th e in t en ded r ecipien t of a sou r ce qu en ch wil l con t in u e t o sl ow down it s da t a r a t e u n t il it r eceives n o mor e sou r ce qu en ch pa cket s. Th e st a t ion t h a t wa s r equ est ed t o sl ow down wil l t h en st a r t t o in cr ea se t h e da t a r a t e a ga in . Th is is simil a r t o a f l ow con t r ol , except t h a t it is mor e l ike t h r ot t l e con t r ol —t h e da t a is n ot st opped, mer el y sl owed down a n d t h en in cr ea sed a ga in . It is gen er a t ed by a n y n et wor k st a t ion on t h e in t er n et t o in dica t e t h a t t h e n ode ca n n ot h a n dl e t h e r a t e of t h e in comin g da t a . Th is ICMP t ype wa s n ot in cl u ded in ICMPv6. It wa s f ou n d t h a t ot h er pr ot ocol s h a n dl e con gest ion bet t er t h a n f or cin g t h e r ou t er s t o h a n dl e it . Th er e a r e ma n y ot h er u ses of t h e ICMP pr ot ocol . Wh en a r ou t er r eceives a da t a gr a m, it ma y det er min e a bet t er r ou t er t h a t ca n pr ovide a sh or t er r ou t e t o t h e dest in a t ion n et wor k. Th is is a n ICMP Redir ect , a n d t h is messa ge in f or ms t h e sen der of a bet t er r ou t e. If t h e TTL f iel d is 0, a r ou t er wil l in f or m t h e or igin a t or of t h is t h r ou gh a n ICMP messa ge (Time Exceeded). A u ser ’s wor kst a t ion ca n r equ est a t imest a mp f r om a r ou t er , a skin g it t o r epea t t h e t ime wh en it r eceived a pa cket . Th is is u sed f or mea su r in g del a y t o a dest in a t ion .

Mo r e ICMP Func t io ns • ICMP h a s a dded f u n ct ion s beyon d wh a t is in t h e RFC. • Sepa r a t e RFCs su ch a s 1256 (Rou t er Discover y) a n d 1393 (t r a cer ou t e) h a ve been a dded a s sepa r a t e RFCs. • Sou r ce Qu en ch is n ot u sed a n ymor e. • Th e su mma r y of ICMP messa ge t ypes a r e: • Ech o Requ est a n d Repl y (PING) • Dest in a t ion Un r ea ch a bl e (h ost or n et wor k) • Sou r ce Qu en ch —sl ow down t h e r a t e of t r a n smission • Redir ect (t el l a h ost t o t a ke a bet t er pa t h ) • Time Exceeded (TTL decr emen t ed t o 0) • Pa r a met er pr obl em • Timest a mp a n d Repl y—r ecor d t h e t ime a da t a gr a m a r r ived/sen d t h e in f or ma t ion ba ck t o t h e or igin a t or • In f or ma t ion Requ est a n d Repl y—n ot impl emen t ed

Summar y o f Me ssag e Type s 0 3 4 5 8 11 12 13 14 15 16

Ech o Repl y Dest in a t ion Un r ea ch a bl e Sou r ce Qu en ch Redir ect (t h er e is a bet t er r ou t e messa ge) Ech o Time Exceeded (TTL) Pa r a met er Pr obl em Timest a mp Timest a mp Repl y In f or ma t ion Requ est In f or ma t ion Repl y

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 187 User Datagram Protocol (UDP) A t r a n spor t

l a yer a l l ows commu n ica t ion t o exist bet ween n et wor k st a t ion s. Da t a is h a n ded down t o t h is l a yer f r om a n u pper -l evel a ppl ica t ion . Th e t r a n spor t l a yer t h en en vel opes t h e da t a wit h it s h ea der s a n d gives it t o t h e IP l a yer f or t r a n smission on t o t h e n et wor k. Th er e a r e t wo t r a n spor t -l a yer pr ot ocol s in TCP/IP: UDP a n d TCP. Th e f u n ct ion a l it y of UDP sh ou l d sou n d f a mil ia r . It is a con n ect ion l ess, u n r el ia bl e t r a n spor t ser vice. It does n ot issu e a n a ckn owl edgmen t t o t h e sen der u pon t h e r eceipt of da t a . It does n ot pr ovide or der t o t h e in comin g pa cket s, a n d ma y l ose pa cket s or du pl ica t e t h em wit h ou t issu in g a n er r or messa ge t o t h e sen der . Th is sh ou l d sou n d l ike t h e IP pr ot ocol . Th e on l y of f er in g t h a t UDP h a s is t h e a ssign men t a n d ma n a gemen t of por t n u mber s t o u n iqu el y iden t if y t h e in dividu a l a ppl ica t ion s t h a t r u n on a n et wor k st a t ion a n d a ch ecksu m f or simpl ex er r or det ect ion . UDP t en ds t o r u n f a st er t h a n TCP, f or it h a s l ow over h ea d (8 byt es in it s h ea der compa r ed t o TCP’s t ypica l 40 byt es). It is u sed f or a ppl ica t ion s t h a t do n ot n eed a r el ia bl e t r a n spor t . Some exa mpl es a r e n et wor k ma n a gemen t , n a me ser ver , or a ppl ica t ion s t h a t h a ve bu il t -in r el ia bil it y. An y a ppl ica t ion pr ogr a m t h a t in cor por a t es t h e u se of UDP a s it s t r a n spor t -l evel ser vice mu st pr ovide a n a ckn owl edgmen t a n d sequ en ce syst em t o en su r e t h a t pa cket s a r r ive, a n d t h a t t h ey a r r ive in t h e sa me or der a s t h ey wer e sen t . As sh own in t h e sl ide, a n a ppl ica t ion ’s da t a is en ca psu l a t ed in a UDP h ea der . Th e t r a n spor t l a yer h a s it s own h ea der , in depen den t of a l l ot h er l a yer s, t h a t it pr ef a ces t o t h e da t a h a n ded t o it f r om it s u pper -l a yer pr ot ocol . Th e UDP h ea der a n d it s da t a a r e t h en en ca psu l a t ed in a n IP h ea der . Th e IP pr ot ocol wou l d t h en sen d t h e da t a gr a m t o t h e da t a -l in k l a yer , wh ich wou l d t h en en ca psu l a t e t h e da t a gr a m wit h it s h ea der s (a n d/or t r a il er s) a n d sen d t h e da t a t o t h e ph ysica l l a yer f or a ct u a l t r a n smission . Upon r eceipt of t h e pa cket , t h e da t a l in k wou l d in t er pr et t h e a ddr ess a s it s own , st r ip of f it s h ea der (a n d/or t r a il er s), a n d su bmit t h e pa cket t o t h e IP l a yer . IP wou l d a ccept t h e pa cket ba sed on t h e cor r ect IP a ddr ess in t h e IP h ea der , st r ip of f it s h ea der , a n d

su bmit t h e pa cket t o t h e UDP-l a yer sof t wa r e. Th e UDP l a yer a ccept s t h e pa cket a n d n ow h a s t o demu l t ipl ex t h e pa cket ba sed on t h e por t n u mber in t h e UDP h ea der . Lookin g a t t h e sl ide, t h e pa cket h ea der f or UDP is sma l l (t h e min imu m pa cket siz e is 8 byt es), bu t f u n ct ion a l . Th e messa ge l en gt h in dica t es t h e siz e of t h e UDP h ea der a n d it s da t a in byt es. Th e ch ecksu m is u sed t o ch eck f or t h e va l idit y of t h e UDP h ea der a n d da t a . It does n ot h a ve t o be impl emen t ed a n d wou l d be set t o 0 if n ot impl emen t ed. UDP is pr ima r il y u sed by a ppl ica t ion s t o simpl y pr ovide f or a n a ppl ica t ion MUX a t t h e t r a n spor t l a yer . Th is is descr ibed n ext .

User Da t a gr a m Pr ot ocol (UDP)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 188 Multiplexing and Demultiplexing UDP a ccept s da t a f r om t h e a ppl ica t ion l a yer , f or ma t s it

(UDP h ea der ) wit h it s in f or ma t ion , a n d pr esen t s it t o t h e IP l a yer f or n et wor k del iver y. UDP wil l a l so a ccept da t a f r om t h e IP l a yer a n d, depen din g on t h e por t va l u e, pr esen t it t o t h e a ppr opr ia t e a ppl ica t ion . As sh own in t h e sl ide, UDP is r espon sibl e f or dir ect in g t h e r est of t h e pa cket (a f t er st r ippin g of f it s h ea der s) t o t h e cor r ect pr ocess a ccor din g t o t h e por t n u mber a ssign ed in t h e UDP h ea der . Th is pr ocess is ca l l ed demultiplexing. Th er e a r e ma n y dif f er en t t ypes of por t n u mber s t o in dica t e a n y a ppl ica t ion r u n n in g on t h e n et wor k st a t ion . UDP r ea ds t h e Dest in a t ion Por t f iel d of t h e UDP h ea der (demu l t ipl ex) a n d gives t h e da t a t o t h e a ppl ica t ion . Wh en t h e a ppl ica t ion (iden t if ied by t h e por t n u mber ) in it ia l iz es, t h e st a t ion ’s oper a t in g syst em wor ks in con ju n ct ion wit h it a n d pr ovides a bu f f er a r ea in wh ich in f or ma t ion ma y be st or ed. UDP wil l pl a ce t h e da t a in t h is a r ea f or r et r ieva l by t h e a ppl ica t ion . UDP does pr ovide on e er r or mech a n ism f or por t s t h a t a r e n ot va l id. It ca n gen er a t e a n ICMP Por t Un r ea ch a bl e messa ge t o be sen t t o t h e or igin a t or of t h e pa cket . Sin ce t h e TCP/IP pr ot ocol su it e in cl u des a ppl ica t ion s t h a t a r e specif ica l l y wr it t en t o it (TFTP, Doma in Na me Ser vice, et c.), t h er e a r e st a t ica l l y a ssign ed por t n u mber s t h a t iden t if y t h ese a ppl ica t ion s. Cer t a in por t n u mber s a r e r eser ved a n d ca n n ot be u sed by a n y u n kn own a ppl ica t ion . Th e r eser ved por t n u mber s a r e specif ied in RFC 1700.

Mu l t ipl exin g a n d Demu l t ipl exin g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 189 Port Numbers Review RFC 814. Sin ce ma n y n et wor k a ppl ica t ion s ma y be r u n n in g on t h e sa me ma ch in e, a met h od is n eeded t o a l l ow a ccess t o t h ese a ppl ica t ion s, even t h ou gh t h ey r eside on t h e sa me ma ch in e a n d t h e ma ch in e con t a in s on e IP a ddr ess. On e IP a ddr ess a n d ma n y a ppl ica t ion s? How do we decide wh ich da t a gr a m bel on gs t o wh ich a ppl ica t ion ? It wou l d n ot be a dva n t a geou s t o a ssign ea ch pr ocess a n IP a ddr ess, n or t o ch a n ge t h e IP a ddr essin g sch eme t o in cl u de a ma r ker t o iden t if y a u n iqu e a ppl ica t ion in t h e ma ch in e. In st ea d, bot h t h e TCP a n d UDP pr ot ocol s pr ovide a con cept kn own a s ports (somet imes mist a ken l y ca l l ed sockets, wh ich is n ot cor r ect ). Por t s, a l on g wit h a n IP a ddr ess, a l l ow a n y a ppl ica t ion in a n y ma ch in e on a n in t er n et t o be u n iqu el y iden t if ied. Th er e a r e t h r ee dif f er en t t ypes of por t n u mber s: assigned, registered, a n d dynamic. Th e RFC of a ssign ed n u mber s (RFC 1700 a t t h e t ime of t h is wr it in g) con t a in s a ssign ed a n d r egist er ed n u mber s. Th e f ir st 1024 por t s a r e a ssign ed a n d in specif ic u se a n d sh ou l d n ot be u sed by a n y a ppl ica t ion . Th e r ema in in g a ddr esses ca n be dyn a mic a n d r egist er ed (16 bit s a l l ows f or 65,535 por t s) a n d ca n be u sed f r eel y, a l t h ou gh IANA does r equ est t h a t ven dor s r egist er t h eir a ppl ica t ion por t n u mber s wit h t h em. Wh en a st a t ion wish es t o commu n ica t e t o a r emot e a ppl ica t ion , it mu st iden t if y t h a t a ppl ica t ion in t h e da t a gr a m. For exa mpl e, if a st a t ion n eeded t o u se a simpl e f il e t r a n sf er pr ot ocol kn own a s trivial file transfer program (TFTP) on t h e st a t ion 130.1.1.1, it wou l d a ddr ess t h e da t a gr a m t o st a t ion 130.1.1.1 a n d in ser t destination port n u mber 69 in t h e UDP h ea der . Th e source port n u mber iden t if ies t h e a ppl ica t ion on t h e l oca l st a t ion t h a t r equ est ed t h e f il e t r a n sf er , a n d a l l r espon se pa cket s gen er a t ed by t h e dest in a t ion st a t ion wou l d be a ddr essed t o t h a t por t n u mber on t h e sou r ce st a t ion . Gen er a l l y, t h e sou r ce por t is r a n doml y gen er a t ed by t h e sou r ce st a t ion . If t h e sou r ce por t is n ot u sed (br oa dca st RIP u pda t e t a bl es), it sh ou l d be set t o 0. So, wh en t h e IP l a yer demu l t ipl exes t h e pa cket a n d h a n ds it t o UDP, UDP wil l pa ss t h e da t a t o t h e l oca l l y a ssign ed por t n u mber f or it t o pr ocess t h e da t a .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 190 Assigned, Registered, and Dynamic Port Numbers Assig ne d, Re g ist e r e d, and Dynamic Po r t Numbe r s • RFC 1700. • FTP sit e: f t p://f t p.isi.edu /in -n ot es/ia n a /a ssign men t s. • Up-t o-da t e a ssign men t s of n u mber s • Assign ed n u mber s r a n ge f r om 0–1023. • Assign ed a r e r eser ved by IANA a n d ca n n ot be u sed • Used f or TCP, IP, UDP, a n d va r iou s a ppl ica t ion s su ch a s TELNET • Regist er ed n u mber s r a n ge f r om 1024–65535, a n d t h ese a r e compa n ies t h a t h a ve r egist er ed t h eir a ppl ica t ion . • Dyn a mic por t n u mber s a l so r a n ge f r om 1024–65535.

Ref er en ce RFC 1700 a n d t h e FTP sit e f t p://f t p.isi.edu /in -n ot es/ia n a /a ssign men t s (poin t you r URL t o t h is a ddr ess on you r br owser ). In t h e TCP/IP pr ot ocol , UDP por t n u mber s come in t h r ee f l a vor s: assigned, registered, a n d dynamic. Assign ed n u mber s come in t h e r a n ge of 0–1023 a n d a r e f u l l y con t r ol l ed by t h e In t er n et Assign ed Nu mber s Au t h or it y (r ef er t o RFC 1700). Th ese a r e n u mber s t h a t dea l wit h pr ot ocol s su ch a s TELNET, FTP, Net wor k Time Pr ot ocol (NTP), a n d so on . No ma t t er wh ich impl emen t a t ion of TCP/IP (i.e., wh ich ven dor ’s TCP) is in u se, t h ose a ppl ica t ion s l ist ed beside t h e por t n u mber wil l a l wa ys be t h e sa me (t h ey a r e kn own a s well-known port numbers). Th ese a r e a ssign ed by a cen t r a l a u t h or it y. In t h is ca se, RFC 1700 spel l s ou t wh ich pr ocesses a r e a ssign ed t o wh ich por t n u mber s. Assign ed por t n u mber s (t h ose f or ma l l y r eser ved t h r ou gh In t er n et Addr ess Nu mber s Au t h or it y) r a n ge f r om 0–1023 f or TCP/UDP por t n u mber s. Af t er t h a t , a n y a ppl ica t ion ma y u se a n y por t n u mber beyon d 1023 bu t l ess t h a n 65,535. Some compa n ies h a ve r egist er ed t h eir por t n u mber s wit h IANA a n d ot h er compa n ies r espect t h is by n ot u sin g t h e sa me por t n u mber . Her e’s a n exa mpl e of a n a ssign ed por t n u mber : If st a t ion A wa n t s t o a ccess t h e TFTP

pr ocess on st a t ion B, it ca l l s it in t h e UDP h ea der wit h a dest in a t ion por t n u mber of 69 (decima l ). Th e sou r ce st a t ion r equ est in g TFTP ser vices a l so h a s a por t n u mber t h a t is dyn a mica l l y a ssign ed by it s TCP/IP st a ck. RFC 1700 su ggest s met h ods f or a ssist a n ce in a ssign in g a dyn a mic por t n u mber . In t h is wa y, t h e ser ver a n d cl ien t ca n commu n ica t e wit h on e a n ot h er u sin g t h e por t n u mber s t o u n iqu el y iden t if y t h e ser vice f or t h a t da t a gr a m.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 191 Dynamic Port Numbers TCP/IP a l so impl emen t s dyn a mic por t

n u mber s. Sin ce t h e Por t Nu mber f iel d in t h e UDP h ea der is 16 bit s l on g, 65,535 por t s (min u s t h e a ssign ed por t a ssign men t s) a r e a va il a bl e f or in dividu a l u se. Th is r a n ge ca n be u sed f or r egist er ed a n d dyn a mic por t s. On e u se f or a dyn a mic por t is a s a sou r ce st a t ion t h a t is r equ est in g t h e ser vices of TFTP on a r emot e st a t ion . Th e sou r ce st a t ion dyn a mica l l y a ssign s it sel f a n a va il a bl e por t n u mber (u su a l l y a bove 1024 t o u se so t h a t t h e r emot e st a t ion kn ows wh a t por t t o a ccess wh en it t r a n sf er s t h e f il e). In ot h er wor ds, if a u ser in it ia t es a t r ivia l f il e t r a n sf er (TFTP), t h e TFTP r equ est pa cket sen t t o t h e TFTP ser ver in cl u des in it s UDP h ea der a dyn a mic por t n u mber of t h e r equ est in g n et wor k st a t ion t h a t wa n t ed t h e TFTP, ca l l ed t h e sou r ce por t . Let ’s sa y it is a ssign ed por t 2000. Th e dest in a t ion por t n u mber wou l d be 69. In t h is wa y, t h e ser ver wil l a ccept t h e pa cket , give it t o t h e TFTP pr ocess in t h e h ost a n d, wh en t h e h ost r espon ds, it wil l kn ow h ow t o a ddr ess t h e por t n u mber in t h e r espon se pa cket . In t h e r espon se pa cket , t h e ser ver wou l d f il l ou t t h e UDP h ea der wit h a dest in a t ion por t of 2000, sou r ce por t of 69, a n d sen d t h e pa cket ba ck t o t h e r equ est in g st a t ion . An ot h er u se is wh en n et wor k ven dor s impl emen t pr opr iet a r y sch emes on t h eir devices; f or exa mpl e, a pr opr iet a r y sch eme f or a n et wor k st a t ion t o boot or a pr opr iet a r y sch eme t o a l l ow n et wor k ma n a gemen t st a t ist ics t o be ga t h er ed. Al l t h ese a ppl ica t ion s a r e va l id a n d ma y r u n on a n y TCP en vir on men t u sin g a dyn a mic por t a ssign men t .

Dyn a mic Por t Nu mber s Th e disa dva n t a ge of dyn a mic por t s occu r s wh en a br oa dca st IP da t a gr a m is t r a n smit t ed t o t h e n et wor k u sin g a dyn a mic por t . Th is por t cou l d be u sed by a n ot h er ven dor on t h e n et wor k, a n d a n ot h er n et wor k st a t ion ma y in voke a pr ocess t o a ccommoda t e t h a t r equ est . Th is is r a r e, bu t h a s been kn own t o h a ppen .

Dyn a mic por t n u mber s a r e a ssign ed by t h e TCP/IP sof t wa r e a t t h e l oca l wor kst a t ion , a n d ca n be du pl ica t ed f r om wor kst a t ion t o wor kst a t ion wit h ou t r espect t o t h e a ppl ica t ion . Th is is beca u se a n a ppl ica t ion on a n y n et wor k st a t ion is u n iqu el y iden t if ied by t h e IP a ddr ess (n et wor k n u mber , h ost n u mber ) a n d t h e por t n u mber . Wh en t a ken a s a wh ol e n u mber , it is ca l l ed t h e socket number, a n d ca n n ot be du pl ica t ed on a n IP n et wor k except by n egl igen ce. Fin a l n ot e: Some peopl e l ike t o u se t h e t er ms port a n d socket in t er ch a n gea bl y. You ca n , bu t pr oper IP sema n t ics st a t e t h a t a por t n u mber a n d a socket n u mber a r e n ot t h e sa me t h in g, a s in dica t ed in t h e pr ecedin g pa r a gr a ph .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 192 Transmission Control Protocol (TCP) Tr ansmissio n Co nt r o l Pr o t o c o l (TCP) • • • •

Th e pr ot ocol r espon sibl e f or t h e r el ia bl e t r a n smission a n d r ecept ion of da t a . Un r el ia bl e ser vice is pr ovided by UDP. Tr a n spor t l a yer pr ot ocol . Ca n r u n mu l t ipl e a ppl ica t ion s u sin g t h e sa me t r a n spor t . • Mu l t ipl ex t h r ou gh por t n u mber s

TCP is a l so a t r a n spor t -l a yer

pr ot ocol . Un l ike t h e UDP pr ot ocol , t h e pu r pose of t h e t r a n spor t -l a yer sof t wa r e TCP is t o a l l ow da t a t o be r el ia bl y exch a n ged wit h a n ot h er st a t ion on t h e n et wor k. It , t oo, pr ovides t h e demu l t ipl exes of por t n u mber s t o iden t if y a n a ppl ica t ion in t h e h ost , bu t a l so pr ovides r el ia bl e t r a n spor t of da t a , in cl u din g ma n y dif f er en t opt ion s t h a t ma y or ma y n ot be sen t by t h e or igin a t in g st a t ion . A commu n ica t ion s f a cil it y n eeds t o be a bl e t o r el ia bl y t r a n sf er da t a bet ween t wo poin t s. Ima gin e set t in g u p a commu n ica t ion s syst em t h a t on l y a l l owed f or u n r el ia bl e da t a t r a n sf er —t h e post of f ice t r a n sf er s most of it s ma il in t h is ma n n er . Wh en you ma il a l et t er , you h a ve n o idea if it r ea l l y r ea ch ed it s dest in a t ion u n l ess you ma ke t h e ef f or t t o ch eck. Sh ou l d ma ke you a l it t l e n er vou s on t h a t cr it ica l da t a . Th is is f u r t h er exempl if ied by a pa cket swit ch n et wor k in wh ich t h e sa me commu n ica t ion ch a n n el is u sed by mu l t ipl e en t it ies a l l vyin g f or t h e sa me pa t h , a n d ea ch h ea der con t a in s it s own dir ect ion a l in f or ma t ion . TCP/IP h ost s or igin a l l y wer e con n ect ed via t el eph on e l in es (common l y kn own a s serial l in es). Th is mode of commu n ica t ion wa s n ot t h e sa me in t h e ea r l y 1970s a s it is t oda y. Th e l in es wer e n oisy a n d wer e n ot con dit ion ed t o h a n dl e h igh -speed da t a . Th er ef or e, t h e TCP pr ot ocol h a s st r ict er r or -det ect ion a l gor it h ms bu il t in t o en su r e t h e in t egr it y of t h e da t a . Th e f ol l owin g pa r a gr a ph s expl a in t h e TCP pr ot ocol a n d sh ow h ow it s st r ict n ess in it s st r u ct u r e en su r es t h e in t egr it y of t h e da t a .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 193 TCP Details Not

a l l n et wor ks u se a sepa r a t e t r a n spor t -l a yer sof t wa r e t o con ver se on a n et wor k. Th e best exa mpl e of t h is is Novel l wit h it s LAN wor kgr ou p oper a t in g syst em of Net Wa r e. Net Wa r e r el ies on t h e n et wor k-l a yer sof t wa r e t o t r a n spor t da t a a n d t h e Net Wa r e Cor e Pr ot ocol (a s a n a ppl ica t ion ) t o pr ovide t h e sequ en ce n u mber in g of t h e pa cket s. Th er e is n ot h in g wr on g wit h t h is, a n d it gen er a l l y speeds u p t h e commu n ica t ion pr ocess bet ween t wo st a t ion s on t h e n et wor k. Th e over h ea d of t h e r ol e of t r a n spor t l a yer is dimin ish ed, bu t t h ose t ypes of pr ot ocol s wer e devel oped on h igh -speed, l ow-er r or -r a t e media su ch a s Et h er n et . TCP wa s n ot , a n d is mu ch mor e r obu st in it s t r a n spor t -l a yer pr ot ocol . TCP is a ct u a l l y a pr ot ocol a n d n ot a sepa r a t e piece of sof t wa r e. Th e pr ot ocol of TCP u ses sequ en ce n u mber s a n d a ckn owl edgmen t s t o r el ia bl y con ver se wit h ot h er st a t ion s on t h e n et wor k. Sequ en ce n u mber s a r e u sed t o det er min e t h e or der in g of t h e da t a in t h e pa cket s a n d t o f in d missin g pa cket s. Sin ce pa cket s on a n in t er n et ma y n ot a r r ive in t h e sa me sequ en ce in wh ich t h ey wer e sen t (f or exa mpl e, a sin gl e pa cket in a ser ies of pa cket s bein g t r a n smit t ed wa s disca r ded by a r ou t er ), sequ en cin g t h e da t a in t h e pa cket s en su r es t h a t t h e pa cket s a r e r ea d in t h e sa me or der in wh ich t h ey wer e sen t . Al so, a r eceivin g st a t ion ma y r eceive t wo of t h e sa me pa cket s. Th e sequ en ce n u mber wit h a ckn owl edgmen t s is u sed t o a l l ow a r el ia bl e t ype of commu n ica t ion . Th is pr ocess is ca l l ed full duplex, f or ea ch side of a con n ect ion ma in t a in s it s own sequ en ce n u mber f or t h e ot h er side. TCP is a byt e-or ien t ed sequ en cin g pr ot ocol . Ot h er pr ot ocol s su ch a s Novel l Net Wa r e a r e pa cket -or ien t ed sequ en cin g pr ot ocol s. Th is a ppl ies a sequ en ce n u mber t o ea ch pa cket t r a n smit t ed a n d n ot t o ea ch da t a byt e in t h e pa cket . Byt e or ien t ed mea n s t h a t ever y byt e in ea ch pa cket is a ssign ed a sequ en ce n u mber . Th is does n ot mea n t h a t TCP t r a n smit s a pa cket con t a in in g on l y 1 byt e. TCP wil l t r a n smit da t a (ma n y byt es) a n d a ssign t h e pa cket on e sequ en ce n u mber . Assign in g on e sequ en ce n u mber per byt e in t h e pa cket ma y sou n d r epet it iou s, bu t r emember t h a t TCP/IP wa s f ir st impl emen t ed over n oisy ser ia l l in es a n d n ot r el ia bl e h igh -speed LANs.

Th e sl ide sh ows t wo da t a gr a ms t h a t h a ve been t r a n smit t ed. Nor ma l l y, ea ch TCP segmen t is 512 or 536 byt es in l en gt h (bu t ca n be l a r ger ). Th e sh or t n u mber of byt es in t h is pict u r e is sh own f or cl a r it y on l y. Ea ch da t a gr a m is a ssign ed on e sequ en ce n u mber a ccor din g t o t h e n u mber of byt es in t h e TCP Da t a f iel d. Not ice h ow t h e sequ en ce n u mber ju mps by t h e sa me a mou n t of byt es t h a t a r e in ea ch pa cket . Th e r eceiver of t h ese da t a gr a ms wil l cou n t t h e a mou n t of byt es r eceived a n d in cr emen t it s sequ en ce n u mber of r eceived pa cket s. Th e f ir st pa cket r eceived h a s a sequ en ce n u mber of 40 a n d con t a in s 4 byt es. Th e r eceiver expect s t h e n ext sequ en ce n u mber t o be 44. It is, a n d t h a t pa cket con t a in s 7 byt es of da t a . Th e r eceiver expect s t h e n ext pa cket t o be sequ en ce n u mber of 51. It is. Th is is h ow t h e byt e sequ en cin g of TCP wor ks. Th e sl idin g win dow sch eme is discu ssed l a t er . Fir st , t h e TCP h ea der def in it ion s.

TCP Det a il s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 194 TCP Fields Th e sl ide sh ows t h e TCP h ea der

f iel ds a s en ca psu l a t ed in a IP da t a gr a m.

So ur c e po r t . Th e por t n u mber (a ppl ica t ion ) of t h e or igin a t in g st a t ion . De st inat io n po r t . Th e por t n u mber (a ppl ica t ion ) f or t h e r eceivin g st a t ion . Se que nc e numbe r . A n u mber a ssign ed t o a TCP da t a gr a m t o in dica t e t h e begin n in g byt e n u mber of a pa cket u n l ess t h e SYN bit is set . If t h is bit is set , t h e sequ en ce n u mber is t h e in it ia l sequ en ce n u mber (ISN) a n d t h e f ir st da t a byt e is ISN + 1. Ac kno wl e dg me nt numbe r . A Nu mber sen t by t h e dest in a t ion st a t ion t o t h e sou r ce st a t ion , a ckn owl edgin g r eceipt of a pr eviou sl y r eceived pa cket or pa cket s. Th is n u mber in dica t es t h e n ext sequ en ce n u mber t h e dest in a t ion st a t ion expect s t o r eceive. On ce a con n ect ion is est a bl ish ed, t h is f iel d is a l wa ys set . Dat a o f f se t . In dica t es h ow l on g t h e TCP h ea der is (i.e., t h e n u mber of 32-bit wor ds in t h e TCP h ea der ). It in dica t es wh er e t h e TCP h ea der en ds a n d t h e da t a begin s. Re se r ve d. Reser ved f or f u t u r e u se. Mu st be set t o 0.

TCP Fiel ds Co nt r o l bit s: URG Ur gen t poin t er : Used t o sen d a messa ge t o t h e dest in a t ion t h a t u r gen t da t a is wa it in g t o be sen t t o it . Th is cou l d be sen t t o a dest in a t ion st a t ion , wh en t h e dest in a t ion st a t ion h a s cl osed t h e Receive win dow t o t h e sen der . However , t h e r eceiver wil l st il l a ccept pa cket s wit h t h is bit set .

ACK PSH RST SYN FIN

If set , t h is pa cket con t a in s a n a ckn owl edgmen t t o a pr eviou sl y sen t da t a gr a m(s). Pu sh f u n ct ion : Immedia t el y sen ds da t a wh en r ea d t h e segmen t . Reset t h e con n ect ion . On e f u n ct ion f or t h is is t o n ot a ccept a con n ect ion r equ est . Used a t st a r t u p a n d t o est a bl ish sequ en ce n u mber . No mor e da t a is comin g f r om t h e sen der of t h e con n ect ion .

Windo w. Th e n u mber of da t a oct et s begin n in g wit h t h e on e in dica t ed in t h e Ackn owl edgmen t f iel d t h a t t h e sen der of t h is segmen t is wil l in g t o a ccept . It in dica t es t h e a va il a bl e bu f f er s (memor y) on t h e r eceiver . Che c ksum. An er r or -det ect ion n u mber . Ur g e nt po int e r . Th e u r gen t poin t er poin t s t o t h e sequ en ce n u mber of t h e byt e f ol l owin g t h e u r gen t da t a . Th is f iel d is in t er pr et ed on l y in segmen t s wit h t h e URG bit set . Opt io ns. Va r ia bl e in l en gt h , it a l l ows f or TCP opt ion s t o be pr esen t ed. Th ese a r e: En d of Opt ion List , No Oper a t ion , a n d Ma ximu m Segmen t Siz e (MSS).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 195 TCP Services TCP Se r vic e s • • • • • •

Ba sic da t a t r a n sf er Rel ia bil it y Fl ow con t r ol Mu l t ipl exin g Con n ect ion s Pr eceden ce a n d secu r it y

As n ot ed ea r l ier , t h e pr ima r y pu r pose of TCP is t o pr ovide r el ia bl e, secu r a bl e l ogica l cir cu it or con n ect ion ser vice bet ween pa ir s of pr ocesses. Pr ovidin g t h is ser vice on t op of a l ess-r el ia bl e in t er n et commu n ica t ion s syst em r equ ir es f a cil it ies in t h e f ol l owin g a r ea s, wh ich a r e f u l l y descr ibed in t h e n ext f ew sect ion s: • • • • • •

Ba sic da t a t r a n sf er Rel ia bil it y Fl ow con t r ol Mu l t ipl exin g Con n ect ion s Pr eceden ce a n d secu r it y

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 196 TCP Connection Establishment Un l ike it s br ot h er

UDP, TCP pr ovides f or r el ia bl e con n ect ion s. A TCP con n ect ion bet ween t wo st a t ion s on a n et wor k mu st be est a bl ish ed bef or e a n y da t a is a l l owed t o pa ss bet ween t h e t wo. Appl ica t ion s su ch a s TELNET a n d FTP commu n ica t e u sin g TCP t h r ou gh a ser ies of f u n ct ion ca l l s. Th is ma y seem a l it t l e con f u sin g n ow, bu t t h e f u n ct ion s a r e ver y simpl e. Th ese ca l l s in cl u de OPEN a n d CLOSE a con n ect ion , SEND a n d RECEIVE (in f or ma t ion ) t o t h a t con n ect ion , a n d STATUS t o r eceive in f or ma t ion f or a con n ect ion . Wh en a con n ect ion t o a r emot e st a t ion is n eeded, a n a ppl ica t ion wil l r equ est TCP t o pl a ce a n OPEN ca l l . Th er e a r e t wo t ypes of OPEN ca l l : passive a n d active. A pa ssive OPEN is a ca l l t o a l l ow con n ect ion s t o be a ccept ed f r om a r emot e st a t ion . Th is u su a l l y occu r s wh en a n a ppl ica t ion st a r t s on a n et wor k st a t ion (su ch a s TELNET, FTP), a n d it wil l in dica t e t o TCP t h a t it is wil l in g t o a ccept con n ect ion s f r om ot h er st a t ion s on t h e n et wor k. TCP wil l n ot e t h e a ppl ica t ion t h r ou gh it s por t a ssign men t a n d wil l a l l ow con n ect ion s t o come in . Th e n u mber of con n ect ion s a l l owed depen ds on t h e n u mber of pa ssive OPENs issu ed. Th is pa ssive en d of t h e TCP a ct ion s is kn own a s t h e responder TCP. It wil l open u p con n ect ion sl ot s t o a ccept a n y in comin g con n ect ion r equ est . Th is ma y be t h ou gh t of a s t h e ser ver en d of TCP. Th ese pa ssive OPEN ca l l s do n ot wa it f or a n y pa r t icu l a r st a t ion r equ est . An a ct ive OPEN is ma de wh en a con n ect ion a t t empt t o a r emot e n et wor k st a t ion is n eeded. Ref er r in g t o t h e sl ide, st a t ion A wish es t o con n ect t o st a t ion B. St a t ion A issu es a n a ct ive OPEN ca l l t o st a t ion B. In or der f or t h e con n ect ion t o be ma de, st a t ion B mu st a l r ea dy h a ve issu ed a pa ssive OPEN r equ est t o a l l ow in comin g con n ect ion s t o be est a bl ish ed. In t h e con n ect ion a t t empt pa cket is t h e por t n u mber t h a t st a t ion A wish es t o u se on st a t ion B. St a t ion B’s oper a t in g syst em wil l spa wn a sepa r a t e pr ocess on it s syst em t o ma in t a in t h a t con n ect ion . Th is pr ocess wil l a ct a s if it is r u n n in g l oca l l y on t h a t st a t ion . TCP wil l t h en a wa it a n ot h er in comin g con n ect ion r equ est . Th is pr ocess is simil a r t o t h e wa y a mu l t it a skin g oper a t in g syst em h a n dl es mu l t ipl e a ppl ica t ion s.

TCP Con n ect ion Est a bl ish men t

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 197 The Three-Way Handshake A con n ect ion wil l

on l y be a ct ive a f t er t h e sen der a n d r eceiver exch a n ge a f ew con t r ol pa cket s t o est a bl ish t h e con n ect ion . Th is is kn own a s t h e three-way handshake. It s pu r pose t o syn ch r on iz e ea ch en dpoin t a t t h e st a r t of a TCP con n ect ion wit h a sequ en ce n u mber a n d a ckn owl edgmen t n u mber . Ref er t o sl ide 215. St a t ion A wil l pl a ce a n a ct ive OPEN ca l l t o TCP t o r equ est con n ect ion t o a r emot e n et wor k st a t ion ’s a ppl ica t ion . St a t ion A wil l bu il d a TCP h ea der wit h t h e SYN (t h e syn c bit sh own wa s sh own pr eviou sl y in t h e TCP Hea der f iel ds) bit set a n d t h en a ssign a n in it ia l sequ en ce n u mber (it does n ot a l wa ys st a r t a t 0 a n d ca n st a r t a t a n y n u mber ; I h a ve ch osen 100) a n d pl a ce it in t h e Sequ en ce Nu mber f iel d. Ot h er f iel ds wil l be set in t h e TCP h ea der (n ot per t in en t t o u s a t t h is t ime) a n d t h e pa cket wil l be given t o IP f or t r a n smission t o st a t ion B. St a t ion B wil l r eceive t h is pa cket a n d n ot ice it is a con n ect ion a t t empt . If st a t ion B ca n a ccept a n ew con n ect ion it wil l a ckn owl edge st a t ion A by bu il din g a n ew pa cket . St a t ion B wil l set t h e SYN a n d t h e ACK bit s in t h e TCP h ea der sh own in t h e sl ide, pl a ce it s own in it ia l sequ en ce n u mber (200) in t h e Sequ en ce f iel d of t h e pa cket , a n d t h e Ackn owl edgmen t f iel d wil l be set t o 101 (t h e st a t ion A sequ en ce n u mber pl u s 1, in dica t in g t h e n ext expect ed sequ en ce n u mber ). St a t ion A wil l r eceive t h is r espon se pa cket a n d n ot ice it is a n a ckn owl edgmen t t o it s con n ect ion r equ est . St a t ion A wil l bu il d a n ew pa cket , set t h e ACK bit , f il l in t h e sequ en ce n u mber t o 101, f il l in t h e a ckn owl edgmen t n u mber t o 200 + 1, a n d sen d t h e pa cket t o st a t ion B. On ce t h is h a s been est a bl ish ed, t h e con n ect ion is a ct ive a n d da t a a n d comma n ds f r om t h e a ppl ica t ion (su ch a s TELNET) ma y pa ss over t h e con n ect ion . As da t a a n d comma n ds pa ss over t h e con n ect ion , ea ch side of t h e con n ect ion wil l ma in t a in it s own sequ en ce n u mber t a bl es f or da t a bein g sen t a n d r eceived a cr oss t h e con n ect ion . Th ey wil l a l wa ys be in a scen din g or der . Sequ en ce n u mber s do n ot h a ve t o a n d pr oba bl y wil l n ot st a r t a t 0. However , it is

f u n da men t a l l y impor t a n t t o n ot e t h a t t h ey wil l wr a p t o 0.

Th e Th r ee-Wa y Ha n dsh a ke

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 198 TCP Segment Ever yt h in g t h a t

TCP sen ds is ca l l ed a segment. Th is in f or ma t ion a l u n it ca n be con t r ol da t a or u ser da t a . Segmen t s a r e u sed t o est a bl ish a con n ect ion , sen d a n d r eceive da t a a n d a ckn owl edgmen t s, a dver t ise win dow siz es, a n d cl ose a con n ect ion . A TCP segmen t wil l con t a in t h e TCP h ea der (sh own in Sl ide 216) a n d it s da t a . Th e da t a h a n ded t o TCP f or t r a n smission is kn own a s a stream; mor e specif ica l l y, a n unstructured stream. A st r ea m is a f l ow of byt es of da t a a n d a n u n st r u ct u r ed st r ea m is a n u n kn own t ype of da t a f l ow of byt es. Th is mea n s t h a t TCP h a s n o wa y of ma r kin g t h e da t a t o in dica t e t h e en din g of a r ecor d or t h e t ype of da t a t h a t is in t h e st r ea m. Wh en TCP r eceives a da t a st r ea m f r om t h e a ppl ica t ion , it wil l divide t h e da t a in t o segmen t s f or t r a n smission t o t h e r emot e n et wor k st a t ion . A segmen t ca n h a ve con t r ol or da t a in f or ma t ion —it is simpl y a n u n st r u ct u r ed st r ea m of da t a byt es sen t t o a dest in a t ion . A TCP segmen t ma y be a s l on g a s 65,535 byt es (or l on ger , kn own a s ju mbogr a ms in IPv6), bu t is u su a l l y mu ch l ess t h a n t h a t . Et h er n et ca n on l y h a n dl e 1500 byt es of da t a in t h e Da t a f iel d of t h e Et h er n et pa cket (Et h er n et v2.0, 1496 byt es f or IEEE 802.3 u sin g IEEE 802.2). FDDI ca n h a n dl e a ma ximu m of 4472 byt es of da t a in a pa cket , a n d Token Rin g pa cket siz e va r ies depen din g on t h e speed. For 4 Mbps, t h e ma ximu m siz e is 4472 byt es. For 16 Mbps, t h e ma ximu m siz e of t h e pa cket is 17,800 byt es, bu t is u su a l l y set t o 4472 byt es. To n egot ia t e a segmen t siz e, TCP u ses on e of t h e Opt ion s (MSS) f iel ds l oca t ed in t h e TCP h ea der t o in dica t e t h e l a r gest segmen t siz e it ca n r eceive, a n d su bmit s t h is pa cket t o t h e r emot e n et wor k st a t ion .

TCP Segmen t TCP does n ot ca r e wh a t t h e da t a is; da t a in a TCP segmen t is con sider ed a st r ea m. Th is st r ea m is con st r u ct ed a t t h e sen der a n d sen t t o t h e r eceiver . Th e r eceiver r econ st r u ct s t h is st r ea m f r om t h e va r ia bl e segmen t s t h a t it r eceives. On ce t h e con n ect ion is

est a bl ish ed, TCP’s ma in job is t o ma in t a in t h e con n ect ion (s). Th is is a ccompl ish ed t h r ou gh t h e sequ en ce n u mber s, a ckn owl edgmen t s a n d r et r a n smission s, f l ow con t r ol , a n d win dow ma n a gemen t . Sin ce t h e con n ect ion bet ween st a t ion s A a n d B is n ow est a bl ish ed (by wa y of a su ccessf u l t h r ee-wa y h a n dsh a ke), TCP mu st n ow ma n a ge t h e con n ect ion . Th e f ir st of t h e ma n a gemen t t ech n iqu es t o be discu ssed is sequence numbers.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 199 Sequence Numbers and Acknowledgments A poin t

sh ou l d be ma de r igh t u p f r on t . Ackn owl edgmen t s do n ot simpl y r ef er t o a da t a gr a m or a TCP segmen t . TCP’s job is t o r econ st r u ct a piece of da t a t h a t wa s t r a n smit t ed by t h e sen der . Th er ef or e, t h e a ckn owl edgmen t n u mber a ct u a l l y r ef er s t o t h e posit ion in t h e st r ea m of da t a bein g sen t . Wh y? Beca u se IP is con n ect ion l ess a n d r et r a n smission s ma y con t a in a dif f er en t siz e f r om t h e or igin a l . Th e r eceiver col l ect s in f or ma t ion a n d r econ st r u ct s a n exa ct copy of t h e da t a bein g sen t .

Segmen t s ma y a l so a r r ive ou t of or der , a n d it is TCP’s job t o pl a ce t h em ba ck in t h e or der in wh ich t h ey wer e sen t . However , er r or s ma y occu r du r in g t h is pr ocess a n d TCP wil l on l y ACK t h e l on gest con t igu ou s pr ef ix of t h e st r ea m t h a t h a s been r eceived cor r ect l y. Ref er ba ck t o Sl ide 211. TCP ca l cu l a t es a sequ en ce n u mber f or ea ch byt e of da t a in t h e segmen t t a ken a s a su m. For ea ch byt e of da t a t h a t is t o be t r a n smit t ed, t h e sequ en ce n u mber in cr emen t s by 1. Let ’s sa y a con n ect ion wa s ma de bet ween st a t ion s A a n d B (r ef er t o Sl ide 217). St a t ion A sen ds a segmen t t o st a t ion B wit h a sequ en ce n u mber of 40 a n d kn ows t h e segmen t con t a in s 4 byt es; t h er ef or e, it in cr emen t s it s sequ en ce n u mber t o 44. Upon a ckn owl edgmen t f r om st a t ion B (con t a in in g t h e ACK n u mber of 44), st a t ion A t h en t r a n smit s t h e secon d segmen t t o st a t ion B, wh ich con t a in s 7 byt es. St a t ion A’s sequ en ce n u mber in cr emen t s t o 51, a n d it wa it s f or a n a ckn owl edgmen t f r om st a t ion B. Not e h er e t h a t st a t ion A ma y n ot n ecessa r il y wa it f or a n ACK f r om st a t ion B.

Se que nc e Numbe r s and Ac kno wl e dg me nt s • Sequ en ce n u mber s a r e u sed t o r ea ssembl e da t a in t h e or der in wh ich it wa s sen t . • Sequ en ce n u mber s in cr emen t ba sed on t h e n u mber of byt es in t h e TCP da t a f iel d. • Kn own a s a Byt e Sequ en cin g Pr ot ocol • Ea ch segmen t t r a n smit t ed mu st be a ckn owl edged. • Mu l t ipl e segmen t s ca n be a ckn owl edged • Th e ACK (Ackn owl edgemen t ) f iel d in dica t es t h e n ext byt e (sequ en ce) n u mber t h e r eceiver expect s t o r eceive. • Th e sen der , n o ma t t er h ow ma n y t r a n mit t ed segmen t s, expect s t o r eceive a n ACK t h a t is on e mor e t h a n t h e n u mber of t h e l a st t r a n smit t ed byt e.

Ea ch t r a n smission win dow wil l con t a in a s ma n y byt es a s in dica t ed by t h e dest in a t ion (win dows a r e discu ssed in a momen t ). Th e sequ en ce n u mber is set t o t h e n u mber of t h e f ir st byt e in t h e da t a gr a m bein g sen t —t h e l a st r eceived ACK n u mber f r om t h e dest in a t ion . Th e TCP segmen t (t h e da t a ) is t h en given t o IP f or del iver y t o t h e n et wor k. Mu l t ipl e da t a gr a ms ma y be sen t wit h on e a ckn owl edgmen t t o a l l r eceived good segmen t s. Th is is ca l l ed a n inclusive or cumulative ACK. TCP a ccompl ish es t h is bidir ect ion a l l y a cr oss t h e sa me con n ect ion . Ea ch da t a gr a m t r a n smit t ed wil l h a ve t h e TCP h ea der ACK bit set . Wit h t h e ACK bit set , TCP wil l r ea d t h e Ackn owl edgmen t f iel d t o f in d t h e n ext byt e n u mber of t h e segmen t t h a t t h e ot h er en d of t h e con n ect ion expect s. In ot h er wor ds, t h e n u mber in t h e ACK f iel d equ a l s t h e sequ en ce n u mber of t h e or igin a l segmen t t r a n smit t ed pl u s t h e n u mber of t h e byt es su ccessf u l l y r eceived in t h a t segmen t pl u s 1. Th e ACK n u mber is st u f f ed in t o a da t a gr a m t o ma ke TCP mor e ef f icien t . Th er e is u su a l l y n ot a sepa r a t e da t a gr a m on t h e n et wor k u sed ju st f or ACK pa cket s. Al l da t a byt es u p t o bu t n ot in cl u din g t h e ACK n u mber a r e con sider ed good a n d a ccept ed by t h e r eceiver . Sin ce TCP is a byt e-or ien t ed t r a n spor t pr ot ocol , sequ en cin g a n d a ckn owl edgmen t s a r e a ccompl ish ed f or ea ch byt e of TCP da t a t o en su r e t h e in t egr it y of t h e da t a a n d su ccessf u l del iver y t o t h e dest in a t ion . LAN pr ot ocol s su ch a s Novel l Net Wa r e a n d Xer ox XNS wer e devel oped t o wor k on h igh -r el ia bil it y mediu ms (sh iel ded copper ca bl e in con t r ol l ed en vir on men t s). Th eir sequ en ce n u mber s a r e ba sed n ot on byt es in t h eir da t a segmen t bu t on t h e n u mber of pa cket s. TCP ACKs TCP byt es of da t a n ot pa cket s, da t a gr a ms, or segmen t s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 200 Sequence and Acknowledgment Example As sh own in t h e sl ide, t h e con n ect ion wa s est a bl ish ed u sin g a n in it ia l

sequ en ce n u mber f r om t h e sen der a n d a n in it ia l sequ en ce n u mber su ppl ied by t h e r eceiver (t h e dest in a t ion ). Ea ch side wil l ma in t a in it s own sequ en ce n u mber , wh ich ma y be in t h e r a n ge of 0 t o 2,147,483,647. Ea ch side of a TCP con n ect ion kn ows t h e u pper a n d l ower l imit s of t h e sequ en ce n u mber s, a n d on ce t h e l imit h a s been r ea ch ed, it wil l r ol l over t o 0 (ea ch side kn ows t o in cl u de 0). Th e in it ia l iz a t ion sequ en ce n u mber s a r e sel ect ed a t r a n dom. Ea ch side mu st ACK ea ch ot h er ’s r eceived da t a gr a ms. ACK No. = sequ en ce n u mber + good byt es r ea d in t h e segmen t + 1 Th is is a cl ea n , f a st , ef f icien t wa y of det er min in g wh ich byt es wer e su ccessf u l l y r eceived a n d wh ich wer e n ot . Th e sen der mu st r et a in a copy of t r a n smit t ed da t a u n t il it r eceives a n a ckn owl edgmen t f or t h ose byt es f r om t h e r emot e n et wor k st a t ion of a con n ect ion . Ackn owl edgmen t pa cket s a r e n ot n ecessa r il y sepa r a t e pa cket s wit h on l y t h e a ckn owl edgmen t n u mber in t h e pa cket . Th is wou l d be in ef f icien t . For exa mpl e, if st a t ion A open s a con n ect ion t o st a t ion B, a n d st a t ion A a n d st a t ion B a r e sen din g da t a t o ea ch ot h er , t h e ACK da t a gr a m ca n be combin ed wit h t h e r espon se da t a pa cket . In ot h er wor ds, on e da t a gr a m t r a n smit t ed con t a in s t h r ee t h in gs: t h e da t a f r om st a t ion B t o st a t ion A, t h e a ckn owl edgmen t f r om st a t ion B of t h e da t a pr eviou sl y sen t f r om st a t ion A, a n d t h e sequ en ce n u mber f or t h e da t a B is sen din g t o A.

Sequ en ce a n d Ackn owl edgmen t Exa mpl e If t h e sen der does n ot r eceive a n a ckn owl edgmen t wit h in a specif ied t ime, it wil l r esen d t h e da t a st a r t in g f r om t h e f ir st u n a ckn owl edged byt e. TCP wil l t ime-ou t a f t er a

n u mber of u n su ccessf u l r et r a n smission s. Th e r et r a n smission of a da t a gr a m is a ccompl ish ed u sin g t h e Go-ba ck-t o-N r ou t in e. An y n u mber of ou t st a n din g byt es ma y n ot be a ckn owl edged. Wh en t h e dest in a t ion st a t ion does a ckn owl edge t h e r eceipt of a ser ies of byt es, t h e sou r ce wil l l ook a t t h e ACK n u mber . Al l sequ en ce n u mber s u p t o bu t n ot in cl u din g t h e ACK n u mber a r e con sider ed r eceived in good con dit ion . Th is mea n s t h a t a sou r ce st a t ion ca n st a r t t h e sequ en ce n u mber wit h 3 a n d t h en sen d t wo da t a gr a ms con t a in in g 100 TCP segmen t byt es ea ch . Wh en it r eceives a n ACK f r om t h e dest in a t ion of 203 (3 t o 102, a n d t h en 102 t o 202, l ea vin g t h e ACK a t 203 a s t h e n ext expect ed byt e), it wil l kn ow t h a t t h e da t a in bot h da t a gr a ms pr eviou sl y sen t a r e con sider ed r eceived in good con dit ion . Th e n u mber of ou t st a n din g pa cket s a l l owed is t h e n ext t opic of discu ssion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 201 TCP Flow and Window Management Two f u n ct ion s a r e r equ ir ed of TCP in or der

f or t h e pr ot ocol t o ma n a ge t h e da t a over a con n ect ion : flow control a n d transmission control. Do n ot con f u se t h ese f u n ct ion s wit h t h e ICMP sou r ce qu en ch mech a n ism. Sou r ce qu en ch is f or a h ost t o in f or m t h e sou r ce of t r a n smission s t h a t t h e h ost is f u l l a n d t h e h ost wou l d l ike t h e sen der t o sl ow it s r a t e of t r a n smission . For t h ose r ea der s wh o do n ot u n der st a n d f l ow con t r ol , it is a mech a n ism u sed t o con t r ol t h e f l ow of da t a . For exa mpl e, if da t a is bein g r eceived a t a dest in a t ion st a t ion f a st er t h a n t h a t st a t ion ca n a ccept it , it n eeds t o t el l t h e sou r ce st a t ion t o sl ow down or t o st op compl et el y u n t il it ca n cl ea r ou t some spa ce (r epl en ish bu f f er s). How ma n y segmen t s ma y be ou t st a n din g a t a n y on e t ime? Da t a ma n a gemen t u sin g a “win dow” is a ccompl ish ed a s sh own in t h e f ol l owin g sl ide. Da t a f or TCP t o t r a n smit t o t h e r emot e n et wor k st a t ion wil l be a ccept ed by TCP f r om a n a ppl ica t ion . Th is da t a wil l be pl a ced sequ en t ia l l y in memor y wh er e it wil l wa it t o be sen t a cr oss a con n ect ion t o a r emot e st a t ion (f or IP t o sen d t h e pa cket ). TCP pl a ces a “win dow” over t h is da t a in wh ich t o st r u ct u r e t h e da t a : da t a sen t a n d a ckn owl edged, da t a sen t bu t n ot a ckn owl edged, a n d da t a wa it in g t o be sen t . Th is is ca l l ed a sliding window, f or t h e win dow wil l sl ide u p t h e da t a segmen t a s ea ch da t a pa cket is sen t a n d a ckn owl edged. Ref er t o sl ide 219. Sequ en ce n u mber s 100–104 h a ve been t r a n smit t ed t o t h e dest in a t ion st a t ion a n d t h e dest in a t ion st a t ion h a s a ckn owl edged r eceipt of t h ese segmen t s. Pa cket s con t a in in g sequ en ce n u mber s 105–108 h a ve been t r a n smit t ed by t h e sou r ce st a t ion , bu t it h a s n ot r eceived a n a ckn owl edgmen t . Segmen t s con t a in in g sequ en ce n u mber s 109–114 a r e st il l in t h e sou r ce st a t ion a n d a r e wa it in g t o be sen t . Pa cket s con t a in in g 115–118 a r e n ot yet in t h e win dow. Th e impor t a n t t h in g t o n ot ice is t h e bl a ck box cover in g t h e segmen t s. Th is is t h e win dow. It wil l con st a n t l y move in a scen din g sequ en ce or der u pon r eceipt of a ckn owl edgmen t s f r om t h e dest in a t ion st a t ion .

Th is win dow siz e is va r ia bl e t h r ou gh t h e u se of t h e Win dow Siz e f iel d in t h e TCP h ea der of a n a ckn owl edgmen t . Wh en t h e r eceivin g st a t ion (t h e dest in a t ion st a t ion ) is r u n n in g l ow on bu f f er spa ce (a n a r ea of memor y in wh ich t o st or e in comin g da t a ), it ca n in f or m t h e sen der t o sl ow it s t r a n smission r a t e t o t h e a mou n t of da t a it ca n a ccept . Th is is a ccompl ish ed t h r ou gh t h e Win dow f iel d in t h e TCP h ea der pa cket . Th is f iel d wil l con t a in t h e n u mber of byt es (by in dica t in g t h e r a n ge of sequ en ce n u mber s) t h a t t h e dest in a t ion st a t ion is wil l in g t o a ccept . Sl ide 212 sh ows t h e TCP h ea der , specif ica l l y, t h e Win dow f iel d in t h e TCP h ea der . Wh en t h e r emot e n et wor k st a t ion ca n n ot a ccept a n y mor e da t a , it ma y set t h is Win dow f iel d t o a 0. It wil l con t in u e t o su bmit t h ese 0 pa cket s u n t il it ca n a ga in a ccept da t a (t h a t is, t h e sen der ca n sen d da t a t o a h ost , a n d t h is h ost sh ou l d r espon d wit h t h e ACK set t o t h e pr eviou s ACK sen t a n d a win dow set t o 0). Wh en bu f f er spa ce is f r eed u p, it ca n a ga in su bmit a pa cket wit h t h e win dow siz e set t o a n u mber ot h er t h a n 0 t o in dica t e it ca n a ga in a ccept da t a . However , if t h e u r gen t bit is set , t h is in dica t es t o t h e r eceiver t h a t t h e sen der h a s u r gen t da t a wa it in g t o sen d.

TCP Fl ow a n d Win dow Ma n a gemen t Th is con n ect ion ma n a gemen t t ech n iqu e a l l ows TCP t o ma in t a in con t r ol of t h e da t a t r a n sf er by in f or min g TCP on t h e sen din g side h ow mu ch da t a t h e r eceiver is wil l in g t o a ccept . Th is en a bl es bot h a sen der a n d r eceiver of da t a t o ma in t a in con sist en t da t a f l ow over t h e con n ect ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 202 TCP Retransmission On e l a st

f u n ct ion t o discu ss is TCP’s ca pa bil it y t o kn ow wh en t o sen d a r et r a n smission of a pa cket . Th is is a f a ir l y compl ex su bject t h a t wil l on l y be br ief l y discu ssed h er e. Sin ce da t a r u n s on a n In t er n et t h a t h a s va r yin g del a ys ca u sed by r ou t er s a n d l ow- or h igh -speed n et wor ks, it is n ea r l y impossibl e t o det er min e a n exa ct t imer del a y f or a n a ckn owl edgmen t . Th e a ckn owl edgmen t cou l d sh ow u p on e t ime in a ma t t er of mil l isecon ds, or it cou l d sh ow u p in a ma t t er of secon ds. Th e t ime is va r ia bl e is du e t o t h e h et er ogen eou s n a t u r e of t h e In t er n et . TCP a ccommoda t es t h is va r yin g del a y by u sin g a n a da pt ive r et r a n smission a l gor it h m. Th is a l l ot t ed t ime is dyn a mic (n ot h el d t o on e n u mber ) a n d is a ccompl ish ed a s f ol l ows: Wh en TCP su bmit s a pa cket t o be sen t , TCP r ecor ds t h e t ime of t h e t r a n smission a n d t h e sequ en ce n u mber of t h e segmen t . Wh en TCP r eceives a n a ckn owl edgmen t t o t h a t segmen t , it wil l a ga in r ecor d t h e t ime. Usin g t h is del t a , TCP bu il ds a sa mpl e r ou n d-t r ip del a y t ime. TCP u ses t h is t ime t o bu il d a n a ver a ge t ime f or a pa cket t o be sen t a n d a n a ckn owl edgmen t t o be r eceived. Wh en it ca l cu l a t es a n ew va l u e f r om a n ot h er sa mpl e, it wil l sl owl y ch a n ge it s t imer del a y f or t h e wa it in g of t h e ACK pa cket . TCP Re t r ansmissio n • TCP wil l r et r a n smit a segmen t u pon expir a t ion of a n a da pt ive t r a n smission t imer . • Th e t imer is va r ia bl e. • Wh en TCP t r a n smit s a segmen t , it r ecor ds t h e t ime of t r a n smission a n d t h e sequ en ce n u mber of t h e segmen t . • Wh en TCP r eceives a n a ckn owl edgmen t , it r ecor ds t h e t ime. • Th is a l l ows TCP t o bu il d a sa mpl e r ou n d-t r ip del a y t ime. • TCP wil l bu il d a n a ver a ge del a y t ime f or a pa cket t o be sen t a n d r eceived. • Th e t imer is sl owl y ch a n ged t o a l l ow f or t h e va r yin g dif f er en ces in t h e In t er n et .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 203 Slow Start and Congestion Avoidance Ot h er

f ea t u r es of TCP a r e t h e slow start a n d congestion avoidance mech a n isms. Or igin a l ver sion s of TCP wou l d st a r t a con n ect ion wit h t h e sen der t r a n smit t in g mu l t ipl e segmen t s in t o t h e n et wor k, u p t o t h e win dow siz e a dver t ised by t h e r eceiver (set u p du r in g t h e t h r ee-wa y h a n dsh a ke). Loca l su bn et s wer e n ot a f f ect ed a s mu ch a s commu n ica t ion bet ween su bn et s. If t h er e a r e r ou t er s a n d sl ower l in ks bet ween t h e sen der a n d t h e r eceiver , pr obl ems ca n a r ise. A h u ge a mou n t of da t a cou l d possibl y be sen t a t st a r t u p. Th e met h od t o a void t h is is ca l l ed t h e slow start. Wh en con gest ion occu r s, TCP mu st sl ow it s t r a n smission r a t e of pa cket s in t o t h e n et wor k, a n d t h en in voke sl ow st a r t a n d/or con gest ion con t r ol t o get t h in gs goin g a ga in . In pr a ct ice, t h ey a r e impl emen t ed t oget h er . Sl ow st a r t oper a t es by obser vin g t h a t t h e r a t e a t wh ich n ew pa cket s sh ou l d be t r a n smit t ed on t h e n et wor k is t h e r a t e a t wh ich t h e a ckn owl edgmen t s a r e r et u r n ed. Sl ow st a r t a dds a n ot h er win dow t o t h e sen der ’s TCP: t h e Congestion win dow. Th is is n ot a dver t ised in t h e TCP h ea der ; it is a ssu med. Wh en a n ew con n ect ion is est a bl ish ed wit h a l oca l or r emot e h ost , t h e con gest ion win dow is in it ia l iz ed t o on e segmen t . Segmen t siz es a r e va r ia bl e depen din g on t h e compu t er or LAN t ype u sed, bu t t h e def a u l t , t ypica l l y 536 (yes, 536 f or it t h e segmen t siz e [TCP l a yer ] t h a t we a r e wor kin g wit h ) or 512, cou l d be u sed. Ea ch t ime a n ACK is r eceived, t h e Con gest ion win dow is in cr ea sed by on e segmen t . Th e sen der ca n t r a n smit u p t o t h e min imu m of t h e Con gest ion win dow a n d t h e a dver t ised win dow. Th e dist in ct ion h er e is t h a t t h e con gest ion win dow is f l ow con t r ol imposed by the sender, wh il e t h e Adver t ised win dow is f l ow con t r ol imposed by the receiver.

Sl o w St ar t and Co ng e st io n Avo idanc e • Bef or e t h is, TCP wou l d st a r t t o t r a n smit a s mu ch da t a a s wa s a l l owed in t h e a dver t ised win dow. • A n ew win dow wa s a dded ca l l ed t h e con gest ion win dow. • It is n ot n egot ia t ed, it is a ssu med. It st a r t s ou t wit h on e segmen t • Segmen t siz e is va r ia bl e, bu t u su a l l y set t o 512 or 536 byt es • Mu l t ipl y t h is by t h e mil l ion s of h ost s t h a t a r e con ver sin g on t h e In t er n et a n d you ca n see t h a t immedia t e con gest ion f ol l ows. • Sl ow st a r t in it ia l iz es a con gest ion win dow of 1 segmen t . • Ea ch su bsequ en t ACK in cr emen t s t h is win dow expot en t ia l l y (1, 2, 4, 8, et c.) even t u a l l y t o t h e a dver t ised win dow siz e • As l on g a s t h er e a r e n o t ime-ou t s or du pl ica t e ACKs du r in g t h e t r a n smission bet ween t wo st a t ion s, it st a ys a t t h e a dver t ised win dow siz e.

Th e sen der st a r t s by t r a n smit t in g on e segmen t a n d wa it in g f or it s ACK. Wh en t h a t ACK is r eceived, t h e Con gest ion win dow is in cr emen t ed f r om 1 t o 2, a n d 2 segmen t s ca n be sen t . Wh en ea ch of t h ose 2 segmen t s is a ckn owl edged, t h e Con gest ion win dow is in cr ea sed t o 4. Th is r a t e con t in u es t o in cr ea se expon en t ia l l y u n t il t h e TCP Adver t ised win dow siz e is met . On ce t h e Con gest ion win dow siz e equ a l s t h e Adver t ised win dow siz e, segmen t s a r e con t in u a l l y t r a n sf er r ed bet ween st a t ion s u sin g t h e win dow siz e f or con gest ion con t r ol on t h e wor kst a t ion s (ju st a s if sl ow st a r t h a d n ever been in voked).

However , u pon con gest ion (a s in dica t ed by du pl ica t e ACKs or

t ime-ou t s), t h e a l gor it h m kicks ba ck in bu t st a r t s u p a n ot h er a l gor it h m a s wel l (kn own a s congestion control). Wh en con gest ion occu r s, a compa r ison is ma de bet ween t h e con gest ion win dow siz e a n d t h e TCP a dver t ised win dow siz e. Wh ich ever is sma l l er , t h is n u mber is t h en h a l ved a n d sa ved in a va r ia bl e kn own a s t h e slow-start threshold. Th is va l u e mu st be a t l ea st 2 segmen t s u n l ess t h e con gest ion wa s a t ime-ou t a n d t h en t h e con gest ion win dow is set t o 1 (sl ow st a r t ). Th e TCP sen der t h en ca n eit h er st a r t u p sl ow st a r t or con gest ion a voida n ce. On ce ACKs a r e r eceived, t h e con gest ion win dow is in cr ea sed. On ce t h e con gest ion win dow ma t ch es t h e va l u e sa ved in t h e sl ow-st a r t t h r esh ol d, t h e sl ow-st a r t a l gor it h m st ops a n d t h e con gest ion a voida n ce a l gor it h m st a r t s. Th is a l gor it h m a l l ows f or mor e con t r ol l ed (l in ea r , n ot expon en t ia l l ike t h e sl ow-st a r t a l gor it h m) gr owt h in t r a n smission in t h a t it mu l t ipl es t h e segmen t siz e by 2, divides t h is va l u e by t h e con gest ion win dow siz e, a n d t h en con t in u a l l y in cr ea ses t h e r a t e ba sed on t h is a l gor it h m ea ch t ime a n ACK is r eceived. Th is a l l ows f or gr owt h on t h e TCP con n ect ion bu t a t a mor e con t r ol l ed r a t e Th e ef f ect s of t h ese a l gor it h ms wer e dr a ma t ic on t h e In t er n et . Al l ver sion s of TCP/IP sof t wa r e n ow in cl u de t h ese a l gor it h ms a n d t h eir ef f ect s a r e n ot on l y ba sed on r emot e con n ect ion s. Th ese a l gor it h ms a r e pl a ced in t o a ct ion bet ween t wo st a t ion s on a l oca l su bn et a s wel l .

Sl o w St ar t and Co ng e st io n Avo idanc e (c o nt inue d) • Upon con gest ion (du pl ica t e ACKs or t ime-ou t ), t h e a l gor it h m kicks ba ck in . • A compa r ison is ma de bet ween t h e con gest ion win dow siz e a n d t h e a dver t ised win dow siz e • Wh ich ever is sma l l er , is h a l ved a n d sa ved a s t h e sl ow-st a r t t h r esh ol d • Th e va l u e mu st be a t l ea st 2 segmen t s u n l ess t h e con gest ion wa s a t imeou t , a n d t h en t h e con gest ion win dow is set t o 1 (sl ow st a r t ) • Th e TCP sen der ca n st a r t u p in sl ow st a r t or con gest ion a voida n ce • If t h e con gest ion va l u e ma t ch es (or is gr ea t er t h a n ) t h e va l u e of sl ow-st a r t t h r esh ol d, t h e con gest ion a voida n ce a l gor it h m st a r t s; ot h er wise, sl ow st a r t is br ou gh t u p. • Upon r eceipt of ACKs, t h e con gest ion win dow is in cr ea sed. • Al l ows f or a mor e l in ea r gr owt h in t r a n smission r a t e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 204 Termination Fin a l l y, TCP mu st

be a bl e t o gr a cef u l l y t er min a t e a con n ect ion . Th is is a ccompl ish ed u sin g t h e FIN bit in t h e TCP h ea der . Sin ce TCP of f er s a f u l l -du pl ex con n ect ion , ea ch side of t h e con n ect ion mu st cl ose t h e con n ect ion . Ref er t o sl ide 225 f or t wo commu n ica t in g devices, en dst a t ion A a n d h ost st a t ion B. Th e a ppl ica t ion r u n n in g on en dst a t ion A in dica t es t o h ost B t h a t it wish es t o cl ose a con n ect ion by sen din g a pa cket t o h ost st a t ion B wit h t h e FIN bit set . Host st a t ion B a ckn owl edges t h a t pa cket a n d n o l on ger a ccept s da t a f r om en dst a t ion A. However , h ost st a t ion B does a ccept da t a f r om it s a ppl ica t ion t o sen d t o en dst a t ion A. En dst a t ion A con t in u es t o a ccept da t a f r om h ost st a t ion B. Th is wa y, st a t ion A ca n , a t a min imu m, a ccept a FIN pa cket f r om h ost st a t ion B t o compl et el y cl ose t h e con n ect ion . To f in a l iz e t h e cl osin g of t h is con n ect ion , h ost st a t ion B sen ds a pa cket t o en dst a t ion A wit h t h e FIN bit set . En dst a t ion A ACKs t h is pa cket a n d t h e con n ect ion is cl osed. If n o ACK is r eceived, FINs a r e r et r a n smit t ed a n d wil l even t u a l l y t ime-ou t if t h er e is n o r espon se.

Ter min a t ion

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 205 Real-Time Protocol and the Real-Time Control Protocol Mu l t imedia over

t h e In t er n et . It u sed t o be t h a t da t a wa s simpl y moved over t h e In t er n et in or der f or peopl e t o commu n ica t e wit h on e a n ot h er . Movin g da t a su ch a s a f il e or a n ema il is r el a t ivel y simpl e a n d ver y f or givin g. Ot h er a ppl ica t ion s, su ch a s viewin g a video cl ip a s it is bein g down l oa ded t o you r n et wor k st a t ion , r equ ir e specia l a t t en t ion . Th is t ype of da t a movemen t is n ot ver y f or givin g. Dr opped pa cket s ca u se f a ded pict u r es a n d jer ky or in t er mit t en t a u dio. Some exa mpl es of mu l t imedia a r e t h e t r a n smission of cor por a t e messa ges t o empl oyees, video- a n d a u dio-con f er en cin g f or r emot e meet in gs a n d t el ecommu t in g, l ive t r a n smission of mu l t imedia t r a in in g, commu n ica t ion of st ock qu ot es t o br oker s, u pda t es on t h e l a t est el ect ion r esu l t s, col l a bor a t ive compu t in g wit h t imes su ch a s el ect r on ic wh it eboa r din g, t r a n smission over n et wor ks of l ive TV or r a dio n ews a n d en t er t a in men t pr ogr a ms, a n d ma n y ot h er s. Al l of t h is is gen er a l l y gr ou ped in t o on e ca t egor y kn own a s multimedia. Da t a t r a n sf er , wh et h er it is t ext or voice a n d video ca n be cl a ssif ied a s r ea l -t ime a n d n on r ea l -t ime. Mu l t imedia ca n be bot h r ea l -t ime a n d n on -r ea l t ime da t a . Rea l t ime is t h e a bil it y t o see a n d h ea r “da t a ” a s it is h a ppen in g. For exa mpl e, viewin g a video cl ip a s it is bein g down l oa ded t o you r n et wor k st a t ion is cl a ssif ied a s r ea l t ime. A ca mer a t h a t is ca pt u r in g a speech a n d, in con ju n ct ion wit h IP video ser ver s, is dist r ibu t in g t h e ca pt u r ed da t a t o t h ou sa n ds of deskt ops f or immedia t e viewin g is a n ot h er exa mpl e. Voice a n d video r equ ir e specia l con sider a t ion s. Let me be mor e specif ic: Rea l -t ime a ppl ica t ion s h a ve specif ic r equ ir emen t s, a s you wil l see in a momen t .

Re al -Time Pr o t o c o l and t he Re al -Time Co nt r o l Pr o t o c o l • Mu l t imedia da t a is becomin g common pl a ce on t h e In t er n et . • A commu n ica t ion pl a t f or m is n eeded t o su ppor t t h is n ew t ype of da t a . • Cl a ssif ied a s r ea l - a n d n on r ea l -t ime. • Rea l t ime is t h e a bil it y t o u se t h e in f or ma t ion a s it is bein g t r a n sf er r ed (e.g., el ect r on ic wh it eboa r ds, videocon f er en cin g, et c.) • Non r ea l -t ime is kn own a s st or e-a n d-f or wa r d, wh ich mea n s t h e en t ir e da t a f il e is t r a n sf er r ed t o be u sed a t a l a t er t ime • Exa mpl es a r e CBT, video pl a yba ck, et c. • RTP pr ovides en d-t o-en d del iver y ser vice f or r ea l -t ime a ppl ica t ion s. • Th e RFC con sist s of RTP a n d it s con t r ol pr ot ocol RTCP • Ser vices a r e pr ovided t h r ou gh pa yl oa d t ype iden t if ica t ion , sequ en ce n u mber in g, t imest a mpin g, a n d del iver y mon it or in g.

Non r ea l -t ime is t h e a bil it y t o t r a n sf er da t a a n d view it a t a l a t er da t e. Rel a t ivel y spea kin g, t ime is n ot a con sider a t ion . You ca n down l oa d a mu l t imedia f il e a n d view it a t you r l eisu r e. An ot h er n on r ea l -t ime exa mpl e is Web br owser s. It ma ke t a ke a f ew secon ds or min u t es t o view t h e Web pa ge, bu t on ce a l l t h e da t a is r eceived, t h e Web pa ge is a ccu r a t e, n ot f u z z y or in compl et e. RTP pr ovides en d-t o-en d da t a del iver y f or r ea l -t ime (t ime-sen sit ive) a ppl ica t ion s su ch a s t h ose r equ ir ed by t r a n spor t in g voice a n d video. It a ccompl ish es t h is t h r ou gh pa yl oa d t ype iden t if ica t ion , sequ en ce n u mber in g, t imest a mpin g, a n d del iver y mon it or in g. It does n ot pr ovide a n y qu a l it y-of -ser vice gu a r a n t ees.

Rea l -t ime da t a r equ ir es specia l

t r ea t men t , a n d pr ot ocol s h a ve been devel oped t o h a n dl e it . An ea r l y a t t empt t o move r ea l -t ime da t a a cr oss IP n et wor ks wa s a dopt ed a s St r ea ms 2 (ST2) pr ot ocol (RFC 1819). It wa s kn own a s IP ver sion 5 a n d wa s t h e IP r epl a cemen t f or st r ea min g da t a . IPv4 h a n dl ed del iver y of n on r ea l -t ime da t a a n d ST2 wa s t h e IP pr ot ocol t o h a n dl e r ea l -t ime st r ea min g. It in cl u ded t h e a bil it y t o do mu l t ica st , t r a n spor t , a n d qu a l it y of ser vice in on e pr ot ocol . However , t h e a bil it y of ST2 t o sca l e wa s l imit ed du e t o it s r equ ir emen t of st a t ic (ma n u a l ) bin din g t o en d n ode a ddr esses. Besides, t h e u ser commu n it y wa n t ed t h e a bil it y t o do bot h bu r st y da t a a n d st r ea min g da t a over a common IP l a yer . Th er ef or e, t h e IETF wor kin g gr ou ps ca me ou t wit h mu l t ipl e pr ot ocol s: RSVP, mu l t ica st su ppor t , a n d a n ew st r ea min g pr ot ocol kn own a s t h e Rea l -Time Tr a n spor t Pr ot ocol , or RTP. RTP r esides a t t h e sa me l a yer a s TCP. RTP is mor e a n a r ch it ect u r e t h a n a pr ot ocol a n d, a s st a t ed in t h e RFC, “[RTP] is a pr ot ocol f r a mewor k t h a t is del iber a t el y n ot compl et e.” Th e RFC in cl u des descr ipt ion s of t h ose f u n ct ion s t h a t sh ou l d be common a cr oss a ppl ica t ion s t h a t devel op t owa r d RTP. It pr ovides a f r a mewor k f or a pr ot ocol in t h a t it def in es t h e r ol es, oper a t ion s, a n d messa ge f or ma t s. Appl ica t ion s wr it t en t owa r d RTP

u su a l l y in cor por a t e t h e f u n ct ion s of RTP, t h er eby a ddin g t o t h e RTP. RTP f ol l ows t h e a r ch it ect u r e kn own a s application layer framing, wh ich a l l ows f or a mor e cooper a t ive r el a t ion sh ip bet ween pr ot ocol l a yer s t h a n a st r ict a dh er en ce t o t h em. RTP is con sider ed t o be a da pt a bl e a n d is of t en impl emen t ed in t h e a ppl ica t ion r a t h er t h a n a sepa r a t e pr ot ocol , su ch a s TCP. RTP r epl a ces t h e TCP l a yer f or a ppl ica t ion s a n d in most ca ses, RTP wor ks wit h t h e UDP l a yer f or socket a ddr esses (mu l t ipl exin g) a n d ch ecksu m ca pa bil it y. RTP wor ks in con ju n ct ion wit h a con t r ol pr ot ocol kn own a s t h e Rea l -Time Con t r ol Pr ot ocol (RTCP). Por t n u mber 5004 h a s been r egist er ed f or RTP a n d 5005 f or RTCP. Th e sou r ce a n d dest in a t ion por t a r e t h e sa me f or t h e sen der a n d t h e r eceiver f or RTP. Fr om t h e pr ecedin g t ext , you r min d h a s pr oba bl y wa n der ed a n d n ow you a r e t h in kin g a bou t mu l t imedia a n d mu l t ica st . Th is is t h e r igh t wa y of t h in kin g in t h a t a u dio a n d video a r e gen er a l l y u sed in gr ou p r eceiver s. RTP is design ed f or mu l t ica st oper a t ion . Th is is obviou s in on e sen der t o ma n y r eceiver s bu t a l so f or t h e con t r ol pr ot ocol t h a t is u sed f or f eedba ck of con t r ol in f or ma t ion . Feedba ck is n ot simpl y del iver ed t o t h e sen der . If f eedba ck is t r a n smit t ed in mu l t ica st , a l l pa r t icipa n t s in t h e mu l t ica st r eceive t h is in f or ma t ion . Feedba ck is sen t by a r eceiver of t h e mu l t ica st bu t t h e f eedba ck in f or ma t ion is sen t wit h a n IP mu l t ica st dest in a t ion . Th is h a s ma n y a dva n t a ges. It a l l ows a l l t h ose in vol ved in t h e mu l t ica st gr ou p t o r eceive t h e f eedba ck in f or ma t ion a n d pr ocess it . Th is a l so a l l ows a n y r eceiver s wh o a r e exper ien cin g dif f icu l t ies t o det er min e if t h e pr obl em is u n iqu e t o t h em or mor e widespr ea d. Re al -Time Pr o t o c o l (c o nt inue d) • An ea r l y pr ot ocol t ied t o r ea l -t ime da t a wa s ca l l ed St r ea ms 2 (RFC 1819). • It combin ed t h e a bil it y t o do mu l t ica st , t r a n spor t , a n d QoS in t o on e l a yer -3 pr ot ocol • Good st a r t bu t n ot u sed mu ch • Pr ot ocol s of St r ea ms 2 wer e devel oped sepa r a t el y a n d a r e n ow ou t a s RTP, RTCP, RSVP. • Al l ca n be u sed over t h e exist in g IPv4 in f r a st r u ct u r e • RTP r esides a t t h e sa me l a yer a s TCP (RTP wit h IPv4 u ses UDP). • RTP is mor e of a st r u ct u r e or f r a mewor k t h a n it is a pr ot ocol . • Del iber a t el y l ef t in compl et e • Fol l ows a n a r ch it ect u r e ca l l ed ¨a ppl ica t ion l a yer f r a min g. • Design ed wit h mu l t ica st in min d.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 206 Translators Th e RTP pr ot ocol

is open , wh ich a l l ows f or ma n y dif f er en t en codin g sch emes t o be u sed. Th is pr ovides ma n y a dva n t a ges. Some pr ot ocol sch emes a r e bet t er u sed in dif f er en t t opol ogies t h a n ot h er s. Mixer s a n d t r a n sl a t or s a r e u sed t o compen sa t e f or dif f er en ces in en codin g sch emes, a n d t r a n smission a n d r ecept ion r a t es. Tr a n sl a t or s a n d mixer s r eside in t h e middl e of a mu l t imedia n et wor k, a n d a r e n et wor k a t t a ch men t s l ike a n y ot h er a t t a ch men t . Th eir a ppl ica t ion ma kes t h em r eside l ogica l l y bet ween sen der s a n d r ecipien t s a n d t h ey pr ocess t h e RTP in f or ma t ion a s t h ey r eceive it a n d t h en r et r a n smit t h e in f or ma t ion . Th e t r a n sl a t or f u n ct ion s a r e t h e ea siest t o expl a in , so we wil l st a r t t h er e. As sh own in t h e sl ide, a t r a n sl a t or simpl y t r a n sl a t es f r om on e pa yl oa d f or ma t t o a n ot h er . Ta ke t h e exa mpl e of a n et wor k st a t ion t h a t wou l d l ike t o pa r t icipa t e in a st r ea m bu t is l oca t ed beyon d a WAN l in k t h a t pr ovides ver y l it t l e ba n dwidt h . Th e h igh speed wor kst a t ion s cou l d simpl y r edu ce t h eir ca pa bil it ies t o pr ovide f or t h e l owba n dwidt h l in k, bu t wit h t h e t r a n sl a t or t h ey do n ot h a ve t o. Th e t r a n sl a t or ca n simpl y r eceive t h e h igh -ba n dwidt h sign a l a n d t r a n sl a t e it t o a l ow-ba n dwidt h sign a l f or t h e r emot e n et wor k st a t ion . In t h is wa y, r eceiver s of h igh -qu a l it y l in ks ca n con t in u e u sin g t h em, wh il e r eceiver s of l ow-ba n dwidt h l in ks pa r t icipa t e a s wel l .

Tr a n sl a t or s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 207 Mixers Mixer s per f or m a vit a l

ser vice. Mixer s do n ot in t a ke a sou r ce st r ea m a n d t r a n sl a t e it t o a n ot h er t ype of st r ea m. Mixer s combin e mu l t ipl e sou r ce st r ea ms in t o on e sin gl e st r ea m a n d pr eser ve t h e or igin a l f or ma t . For exa mpl e, if you wer e h a vin g a a u dio con f er en ce bet ween f ou r n et wor k st a t ion s, a n d a n ot h er n et wor k st a t ion over a l ow-speed l in k wou l d l ike t o join , t h e mixer wou l d simpl y pu l l t h e t h r ee n et wor k st a t ion s in t o on e sin gl e st r ea m in st ea d of t h r ee f or commu n ica t ion t o t h e n et wor k st a t ion over t h e l owspeed l in k. As sh own in t h e sl ide, a digit a l a u dio con ver sa t ion is bein g ca r r ied on bet ween f ou r wor kst a t ion s, ea ch con su min g 64 kbps f or t h eir own per son a l u se. Wh en t h e f if t h n et wor k st a t ion wa n t s t o join t h e con ver sa t ion , bu t it s l in k is on l y 64 kbps, t h e mixer combin es a l l f ou r h igh er -speed a u dio sign a l s in t o on e 64 kbps st r ea m. Th is a l l ows t h e n et wor k st a t ion over t h e l ow-speed l in k t o join t h e con ver sa t ion a n d t h e ot h er n et wor k st a t ion s ma in t a in t h eir h igh -speed a n d pr oba bl y h igh -qu a l it y a u dio l in ks. Ba sica l l y, mixer s a n d t r a n sl a t or s a l l ow f or va r ia n ces t o occu r in a n mu l t imedia st r ea m. Wh et h er it is t r a n sl a t in g st r ea ms f r om on e f or ma t t o a n ot h er , or a l l owin g f or t h e mixin g of sign a l s t o a ccommoda t e f or dif f er en ces, t h ese t wo t ypes of devices a r e ver y mu ch a pa r t of t h e RTP pr ot ocol .

Mixer s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 208 RTP Message Format Ver s in dica t es t h e ver sion , wh ich a s of t h is wr it in g is 2 (ver sion 1 wa s t h e dr a f t

spec a n d 0 wa s u sed f or t h e pu bl ic doma in Visu a l Au dio Tool [VAT]). Th e P bit in dica t es t h a t pa ddin g is u sed a t t h e en d of t h e da t a gr a m a n d t h e l a st byt e in dica t es h ow ma n y byt es of pa ddin g. Th e X bit is t h e ext en sion bit , wh ich in dica t es t h a t t h e RTP f ixed h ea der is f ol l owed by a n ext en sion h ea der . Th is h a s l imit ed u se, bu t it does a l l ow f or ext en sibil it y. An ext en sion mech a n ism is pr ovided t o a l l ow in dividu a l impl emen t a t ion s t o exper imen t wit h n ew pa yl oa d-f or ma t -in depen den t f u n ct ion s t h a t r equ ir e a ddit ion a l in f or ma t ion t o be ca r r ied in t h e RTP da t a pa cket h ea der . Th e sequ en ce n u mber is 16 bit s l on g a n d in cr emen t s by 1 f or ea ch messa ge sen t . Th e st a r t n u mber is l ike TCP a n d ca n be st a r t ed a n ywh er e wit h in a 16-bit r a n ge. Th e t imest a mp in dica t es a n u mber r ef l ect ive of t h e t ime of t h e t r a n smission of t h e f ir st byt e in t h e RTP da t a pa cket a n d in cr emen t s sequ en t ia l l y. Timest a mps a r e u sed t o exa ct t h e t imin g a s it wa s sen t f r om t h e sou r ce. Sever a l messa ges ma y h a ve t h e sa me t imest a mp, wh ich cou l d in dica t e t h ey wer e sen t a t t h e sa me t ime a n d bel on g t o t h e sa me video f r a me. Syn ch r on iz a t ion Sou r ce f iel d is a 32-bit n u mber t h a t in dica t es t h e or igin a t or of t h e messa ge t h a t in ser t ed t h e sequ en ce n u mber a n d t h e t imest a mp f or t h e da t a so a s n ot t o be depen den t on t h e IP a ddr ess. As sh own in t h e pr eviou s sl ide on mixer s, t h er e a r e t wo sou r ces of a u dio da t a . Ea ch pa cket wil l con t a in t h eir a ddr ess f or t h e pa cket s t h a t t h ey sen d. Th e sel ect ion of t h e iden t if ier is beyon d t h e scope of t h is book, bu t t h er e is a r a n dom n u mber gen er a t ed f or t h is f iel d by t h e sou r ce, t h er eby a l l ows ea ch sou r ce t o be u n iqu e. If t wo sou r ces do sel ect t h e sa me iden t if ier , RTP does h a ve t h e mech a n isms wit h wh ich t o det ect a n d cor r ect t h is. Th is f iel d cou l d in dica t e a n a l t er n a t e sou r ce if t h e r eceived messa ge wa s or igin a t ed by a mixer . If t h e t wo pa cket s en t er ed a mixer , t h e mixer wou l d in ser t it s 32-bit n u mber a s t h e sou r ce a n d pu sh t h e pr eviou s SSRC n u mber s in t o t h e Con t r ibu t in g Sou r ce Iden t if ier .

RTP Messa ge For ma t Th e Con t r ibu t in g Sou r ce Iden t if ier in dica t es a sou r ce or sou r ces (t h e or igin a l IDs of t h e sou r ces) of a st r ea m of RTP pa cket s t h a t wer e in vol ved in t h e combin ed st r ea m pr odu ced by a mixer .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 209 Support for Time-Sensitive Apps RTP su ppor t s sequ en cin g, t imest a mps, syn ch r on iz es dif f er en t

st r ea ms (a u dio or video), a n d con t a in s in f or ma t ion descr ibin g RTP’s pa yl oa d t ype. In f or ma t ion descr ibin g t h e pa yl oa d t ype a l l ows RTP t o su ppor t mu l t ipl e compr ession t ypes su ch a s MPEG a n d H.261. In f a ct , a n RTP r eceiver ca n r eceive in f or ma t ion t h a t is en coded by t wo dif f er en t met h ods a n d h a s t h e a bil it y t o pr odu ce on e sin gl e st r ea m f r om t h is. Th is is a pr ocess kn own a s mixing. It is expl a in ed l a t er .

A digit iz ed a u dio sign a l ma y be pr odu ced u sin g a n simpl ex en codin g sch eme kn own a s pulse code modulation (PCM). Sa y, f or exa mpl e, t h a t PCM bu il ds 160 byt e pa cket s ever y 20 mil l isecon ds f or a sa mpl ed voice st r ea m. Th is in f or ma t ion is t r a n smit t ed t h r ou gh a n In t er n et u sin g IP. Th e digit iz in g of t h e voice sign a l is ver y sen sit ive t o t ime. Th e r ecept ion of t h e st r ea m of voice mu st be pu t ba ck in t o t h e or igin a l t imin g in wh ich it wa s t r a n smit t ed; ot h er wise, t h er e wil l be a n u n even f l ow f or voice a t t h e r eceiver a n d it wil l n ot be r eceived a s it wa s spoken a t t h e or igin a t or . IP does n ot ca r e a bou t t imin g, sequ en cin g, or del a ys. It on l y h a s t o del iver t h e da t a . IP wil l pr oba bl y del iver t h ese pa cket s a t dif f er en t t imes a n d ma y del iver t h em in va r yin g or der . Th er ef or e, a n RTP a ppl ica t ion mu st pu t t h e pa cket s ba ck in t h e or igin a l or der a n d r ea ppl y t h e t imin g bet ween t h e pa cket s. RTP pr ovides in f or ma t ion on t h is bu t does n ot a ccompl ish t h is dir ect l y. Timest a mps, wh ich ma r k t h e r el a t ive begin n in g of t h e even t , a r e pr ovided wit h t h e pa cket a n d t h is pr ovides en ou gh in f or ma t ion t o t h e a ppl ica t ion t o r ebu il d t h e or igin a l a u dio st r ea m.

Su ppor t f or Time-Sen sit ive Apps

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 210 Payload Type Th e n ext

f iel d is t h e pa yl oa d t ype. Pa yl oa d t ypes a r e l ist ed in t h e f ol l owin g t a bl e:

Payl o ad Type • Th e t ext pa ge in dica t es t h e wide r a n ge of su ppor t f or a u dio a n d video pa yl oa d t ypes f or RTP.

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

PCMU a u dio 1016 a u dio G721 a u dio GSM a u dio Un a ssign ed a u dio DVI4 a u dio (4 kHz ) DBI4 a u dio (16 kHz ) LPC a u dio PCMA a u dio G722 a u dio L16 a u dio (st er eo) L16 a u dio (mon o) TPS0 a u dio VSC a u dio MPA a u dio G728 a u dio

16–22 23 24 25 26 27 28 29 30 31 32 33 34–71 72–76 77–95 96–127

Un a ssign ed a u dio RGB8 video HDCC video Cel B video JPEG video CUSM video n v video PicW video CPV video H261 video MPV video MP2T video Un a ssign ed video Reser ved Un a ssign ed Dyn a mic

Not t h a t you wou l d ca r e a bou t a l l of t h ese pa yl oa d t ypes, bu t t h er e a r e a f ew t h a t you sh ou l d r ecogn iz e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 211 Providing Control for RTP RTCP (Rea l -Time Con t r ol

Pr ot ocol ) is t h e con t r ol mech a n ism f or RTP a n d it pr ovides in f or ma t ion , in t h e f or m of f eedba ck, on n et wor k con dit ion s a n d r ecept ion qu a l it y. Usin g RTCP a l l ows RTP a ppl ica t ion s t o a da pt t o va r ia n ces in t h e media . For exa mpl e, a r ou t er ca r r yin g t h e st r ea m cou l d become over l oa ded a n d sl ow down t h e f or wa r din g of pa cket s. An ot h er a ppl ica t ion on t h e n et wor k is u sin g con sider a bl e ba n dwidt h a n d t h e r eceiver s of RTP ca n n ot r eceive a s ma n y pa cket s a s qu ickl y a s t h ey wa n t t o. RTCP a l l ows f or con t r ol in f or ma t ion t o be dist r ibu t ed t o n ot on l y t h e ser ver bu t a l so t h e r eceiver s. Th is a l l ows f or r eceiver s a n d sen der s t o ma ke t h eir own decision s a bou t t h e qu a l it y. An ot h er f ea t u r e of RTCP is t h e ga t h er in g of u ser in f or ma t ion . RTCP r epor t s wh o t h a t a r e a t t en din g a “session .” RTP ca n wor k a l on e, bu t u su a l l y does n ot . RTP r el ies on RTCP t o con t r ol in f or ma t ion . Th e messa ge f or ma t t h a t RTP u ses is t h e sa me f or ma t f or a l l of it s messa ge.

Pr ovidin g Con t r ol f or RTP

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 212 Sender Reports Repor t s f or

RTCP a l l ow sen der s a n d r eceiver s t o commu n ica t e wit h ea ch ot h er f or qu a l it y r ea son s. Ea ch sen der sen ds a r epor t givin g st a t ist ics f or it s t r a n smission s. Receiver s con su me t h is da t a a n d a l so sen d ou t r epor t s t o in dica t e h ow wel l t h ey a r e r eceivin g da t a . Th e sen der s u se t h is da t a t o t u n e t h eir t r a n smission s. Th er e a r e t wo t ypes of r epor t s t h a t RTP r eceiver s ma y sen d: Sen der a n d Receiver r epor t s (SR a n d RR, r espect ivel y). Th e t ype of r epor t sen t depen ds on wh et h er t h e r eceiver is a l so a sen der . RTP r eceiver s pr ovide r ecept ion qu a l it y f eedba ck u sin g t h e RTCP r epor t s. Th e sen der r epor t t el l s r eceiver s wh a t t h ey sh ou l d h a ve r eceived. Th e V is f or t h e ver sion n u mber , wh ich sh ou l d be set t o 2. Th e R Cn t is t h e r eceiver bl ock cou n t a n d con t a in s t h e n u mber of r eceiver bl ocks in t h e messa ge. Th e Len gt h f iel d in dica t es t h e l en gt h of t h e pa cket in byt es. Bot h t ypes of r epor t s a r e ver y simil a r . Th e on l y dif f er en ce bet ween t h e t wo r epor t s, besides t h e pa cket t ype, is t h e 20-byt e sen der in f or ma t ion sect ion in t h e Sen der r epor t . Th e Sen der r epor t is issu ed t o l et t h e r eceiver kn ow wh a t sh ou l d h a ve been r eceived. Bot h t h e SR a n d RR ca n in cl u de f r om 0 t o 31 bl ocks (n ot ice t h e bl ocks a r e simpl y r epl ica t ed); 1 bl ock f or ea ch of t h e syn ch r on iz a t ion sou r ces f r om wh ich t h e r eceiver h a s r eceived RTP da t a pa cket s sin ce it s l a st r epor t . Th e SSRC f iel d t ies t h e Sen der r epor t t o a n y RTP da t a pa cket s t h e sou r ce ma y h a ve sen t . Th e NTP t imest a mp is t h e a ct u a l t ime of da y. It is u sed a s a con t r ol t o mea su r e t h e del t a f or t imest a mps ext r a ct ed f r om r ecept ion r epor t s. Th is a l l ows f or a n est ima t e t o be ma de a s t o t h e r ou n d-t r ip pr opa ga t ion del a y t o t h ose r eceiver s. Th e RTP t imest a mp a l l ows r eceiver s t o pu t t h is messa ge in a n or der r el a t ive t o t h e RTP pa cket s. Th e l a st f iel ds in dica t e t h e n u mber of pa cket s a n d byt es t h e sen der h a s t r a n smit t ed.

Sen der Repor t s Th e n ext sect ion s a r e r eceiver bl ocks. In t h e Sen der r epor t , t h ey a l l ow t h e sen der t o r epor t it s t r a n smit t ed da t a bu t a l so a n y RTP da t a t h a t is h a s r eceived. Ea ch bl ock r epr esen t s on e r emot e sou r ce. Th e bl ock in dica t es t h e f r a ct ion of pa cket s f r om t h a t sou r ce t h a t wer e l ost sin ce t h e l a st r epor t a n d t h e t ot a l n u mber of pa cket s l ost sin ce in cept ion . Th e Ext en ded High est Sequ en ce Nu mber Received is t h e h igh est sequ en ce n u mber f r om t h a t sou r ce. Th e In t er a r r iva l Jit t er f iel d a l l ows f or t h e r eceiver t o est ima t e t h e va r ia n ce of t h e sou r ce’s in t er a r r iva l t imes. A h igh va l u e in dica t es t h a t t h is r eceiver is r eceivin g a st r ea m of pa cket s ir r egu l a r l y. Th e l a st t wo f iel ds in dica t e wh en t h e l a st r epor t f r om t h is sou r ce a r r ived.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 213 Receiver Reports Th e Receiver

r epor t is ba sica l l y t h e sa me a s t h e Sen der r epor t , wit h t h e except ion t h a t t h e sen der in f or ma t ion is st r ipped ou t . Th e Pa cket Type f iel d is set t o 201.

Receiver Repor t s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 214 Source Description Packet Th e SSDP is u sed t o pr ovide mor e in f or ma t ion a bou t

t h e sou r ce. Th e RTP h ea der is u sed a n d t h e pa cket t ype is set t o 202. Th e f ir st f iel d con t a in s t h e SSRC or CSRC iden t if ier of t h e sou r ce. Appl ica t ion s a r e f r ee t o pu t t h eir own it ems in a s wel l . Th e ca n on ica l n a me (CNAME) is t h e most impor t a n t f iel d in t h e pa cket a n d t h e ot h er f iel ds ma y or ma y n ot be f il l ed ou t . Sin ce SSRC iden t if ier s ca n be du pl ica t ed, t h e RTP pr ot ocol pr ovides mech a n isms t o det ect a n d cor r ect t h is du pl ica t ion . Th er ef or e, t h e CNAME f u r t h er iden t if ies a sou r ce u sin g t h e f or ma t of u ser @doma in -n a me.

Sou r ce Descr ipt ion Pa cket

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 215 Bye Message (Packet) In or der

f or a sou r ce t o l ea ve a con f er en ce, it u ses t h e Bye pa cket . Even t u a l l y, a l l pa r t icipa n t s in t h e con f er en ce wou l d n ot ice t h e sou r ce is missin g, bu t t h is messa ge a l l ows t h is t o be qu ickl y l ea r n ed. In cl u ded in t h e pa cket is a f iel d t h a t a l l ows t h e sou r ce t o iden t if y t h e r ea son t h a t it is l ea vin g. Th is f iel d is opt ion a l .

Bye Messa ge (Pa cket )

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 216 Application-Specific Message Appl ic at io n-Spe c if ic Me ssag e • Used by a n a ppl ica t ion t o sen d a n d r eceive it s own messa ges. • Al l ows f or u n iqu en ess t o a n a ppl ica t ion . • Al l ows f or t h e RTCP pr ot ocol t o be ext en sibl e.

Th is t ype of messa ge a l l ows f or

exper imen t a t ion of t h e RTCP pr ot ocol . It a l l ows f or a ppl ica t ion devel oper s t o pl a ce t h eir own messa ges in a pa cket t o be u sed by a r eceiver or sen der of t h eir a ppl ica t ion . Th is is a n ot h er exa mpl e of h ow t h is pr ot ocol is r ea l l y n ot f in ish ed a n d n ever wil l be, wh ich a l l ows f or u n iqu en ess a n d ext en sibil it y.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 217 Caveats Cave at s • RTP does n ot pr ovide a n y QoS ca pa bil it ies. • RTP does n ot gu a r a n t ee del iver y or ou t -of -sequ en ce pa cket s. • RTP is on l y a f r a mewor k. • Mol ded in t o a n a ppl ica t ion • RTP is ext en sibl e. • Mor e in f or ma t ion ca n be a dded t o t h e pa cket pa ssed bet ween RTP cl ien t s a n d ser ver s

RTP does n ot

pr ovide f or a n y Qu a l it y of Ser vice (QoS) pa r a met er s su ch a s t h ose t h a t a l l ow f or t imel y del iver y. RTP does n ot gu a r a n t ee del iver y or in -sequ en ce pa cket s. It pr ovides sequ en cin g, bu t mer el y f or t h e t r a n spor t sequ en cin g of pl a cin g t h e or der of pa cket s in oper a t ion s l ike decodin g; h owever , t h e pa cket s ca n be decoded ou t of r eceivin g sequ en ce. Like most ot h er TCP/IP pr ot ocol s, a pr ot ocol is a pr ot ocol a n d n ot t wo pr ot ocol s. RTP expect s ot h er TCP/IP pr ot ocol s t o pr ovide f or QoS ser vices.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 218 RFCs To see wh a t

is pl a yin g on t h e MBONE:

www.pr ecept .com/cgi-bin /ipt v/ipt vma in .pl or www.cil ea .it /col l a bor a /MBon e/a gen da .h t ml RTP a n d RTCP a r e con t a in ed in RFC 1889. RFCs • RFC 1889—Th e Rea l -Time Pr ot ocol (t h is in cl u des t h e RTCP pr ot ocol a s wel l ).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 219 Selected TCP/IP Applications Th is sect ion gives you a n in t r odu ct ion t o TELNET, FTP, TFTP, SMTP (in cl u din g POP), a n d DNS. Th er e ca n be ma n y a ppl ica t ion s wr it t en f or t h e TCP/IP en vir on men t , a n d ma n y exist t oda y. Th er e a r e wor d pr ocessin g syst ems, CAD/CAM syst ems, ma il syst ems, a n d so on . Th e seven most common a ppl ica t ion s (besides Web a ppl ica t ion s) t h a t r u n on t h e TCP/IP n et wor k syst em a r e: TELNET (Remot e Ter min a l Emu l a t ion ) Fil e Tr a n sf er Pr ot ocol (FTP) Se l e c t e d TCP/IP Appl ic at io ns • • • • • • •

Remot e Ter min a l Emu l a t ion (TELNET) Fil e Tr a n sf er Pr ot ocol (FTP) Tr ivia l Fil e Tr a n sf er Pr ot ocol (TFTP) Simpl e Ma il Tr a n sf er Pr ot ocol (SMTP) Post Of f ice Pr ot ocol (POP) Doma in Na me Ser vice (DNS) Simpl e Net wor k Ma n a gemen t Pr ot ocol (SNMP)

Tr ivia l Fil e Tr a n sf er Pr ot ocol (TFTP) Simpl e Ma il Tr a n sf er Pr ot ocol (SMTP) Post Of f ice Pr ot ocol (POP) Doma in Na me Ser vice (DNS) Simpl e Net wor k Ma n a gemen t Pr ot ocol (SNMP) Th ese a ppl ica t ion s a r e f u l l y docu men t ed in t h e RFCs a n d a l most a l wa ys a r e del iver ed

wit h a n y TCP/IP pr ot ocol su it e in t h e ma r ket t oda y. Th is mea n s t h a t you ca n swit ch t o a l most a n y t ype of compu t er u sin g TCP a ppl ica t ion s sof t wa r e a n d t h e comma n ds a n d f u n ct ion s of t h ese pr ogr a ms wil l be t h e sa me. Th e a ppl ica t ion s wer e specif ica l l y wr it t en f or TCP/IP a n d ba sica l l y pr ovide a l most a l l t h e a ppl ica t ion s t h a t u ser s n eed t o a ccess a n y n et wor k. Da t a ba se pr ogr a ms, wor d pr ocessin g pr ogr a ms, a n d so f or t h , a r e a l l via bl e pr ogr a ms, bu t a r e n ot per t in en t t o t h e oper a t ion of a TCP/IP n et wor k. Usin g t h e f or egoin g a ppl ica t ion , a u ser ca n f in d a n y ot h er n eeded a ppl ica t ion on t h e In t er n et . Th e on es ju st l ist ed a r e t h e ba r e min imu m n eeded t o cr ea t e a n et wor ked u ser en vir on men t in wh ich a l l u ser s ca n a ct ivel y commu n ica t e a n d sh a r e da t a wit h ea ch ot h er a cr oss t h e n et wor k. On e n ice t h in g a bou t t h ese a va il a bl e n et wor k a ppl ica t ion s is t h a t t h ey r u n on TCP/IP n o ma t t er wh ich oper a t in g syst em is bein g u sed. Th e comma n ds, t h eir con n ect ion t ech n iqu es, t h e comma n ds t h a t con t r ol t h e a ppl ica t ion , a n d t h e in t er f a ce t o t h e u ser a l most a l wa ys wil l be t h e sa me. So, if you n or ma l l y wor k wit h Un ix a n d t h en swit ch f or a da y t o DOS, t h e sa me FTP comma n ds t h a t oper a t ed on t h e Un ix ma ch in e wil l be t h er e in t h e DOS ma ch in e. It is h a r d t o sa y t h a t wit h most a ppl ica t ion s t oda y. Th e discu ssion st a r t s wit h t h e TELNET pr ot ocol . Th e pr ot ocol s a r e cover ed br ief l y. Pl ea se r ef er t o t h e TCP/IP books l ist ed a t t h e ba ck of t h is book f or mor e in f or ma t ion a bou t t h ese pr ot ocol s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 220 TELNET Th e TELNET con n ect ion simpl y a l l ows a t er min a l

ser vice over t h e TCP/IP n et wor k a s if t h e t er min a l wer e dir ect l y con n ect ed. Remember t h a t compu t er s a n d t er min a l s wer e con n ect ed by a ca bl e a n d t h e t er min a l s wer e dir ect l y a t t a ch ed t o t h e h ost compu t er . Th e TELNET ser vice pr ovides a t er min a l ser vice f or t h e n et wor k. It a l l ows f or a n y t er min a l t o a t t a ch t o a n y compu t er over t h e n et wor k. It ca n emu l a t e ma n y dif f er en t t ypes of t er min a l s, depen din g on t h e ma n u f a ct u r er of t h e TELNET pr ogr a m. Th er e a r e TELNET pr ogr a ms t h a t emu l a t e DEC VTxxx ser ies of t er min a l s, IBM 3270 a n d 5250 t er min a l s, a n d mor e. Th e a dva n t a ge t o t h e TELNET pr ogr a m is t h a t a u ser ma y l og on t o a n y h ost on t h e TCP/IP in t er n et (pr ovided secu r it y opt ion s a r e a l l owed). Session s a r e set u p over t h e TCP/IP n et wor k. Th e sl ide sh ows a t ypica l TELNET con n ect ion on a TCP/IP n et wor k. Th e TELNET pr ot ocol u ses TCP a s it s t r a n spor t . Th e u ser st a r t s t h e TELNET pr ot ocol a t h is or h er wor kst a t ion , u su a l l y by t ypin g TELNET . Th e TELNET a ppl ica t ion ma y be st a r t ed wit h or wit h ou t a n a r gu men t . Th e a r gu men t a l l ows a simpl er pr ocedu r e t o be in voked so t h a t t h e TELNET pr ocess wil l a u t oma t ica l l y t r y t o con n ect t o t h e h ost sign if ied by t h e a r gu men t st a t emen t . Th e TELNET a ppl ica t ion st a r t s a n d a t t empt s t o est a bl ish a con n ect ion t o t h e r emot e device (by a ccessin g t h e ser vices of t h e Doma in Na me Ser ver or dir ect l y wit h t h e IP a ddr ess; DNS wil l be discu ssed l a t er ). If a n a r gu men t is n ot su ppl ied, t h e TELNET a ppl ica t ion wa it s f or t h e u ser t o issu e a n OPEN comma n d con n ect ion u sin g t h e DNS or a n IP a ddr ess.

TELNET

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 221 TELNET Options TELNET Opt io ns • Ea ch side of t h e con n ect ion r equ est s or t el l s it s pa r t n er t h e opt ion s it wa n t s or ca n do. • Opt ion s a r e f or ma t t ed in : • WILL or WON’T • DO or DON’T • Negot ia t es opt ion s su ch t h a t symmet r y ca n be set u p bet ween t wo st a t ion s. • Opt ion s in cl u de: • Abil it y t o ech o • Ter min a l t ype • Set t in g l in e mode so t h a t gr ou ps of ch a r a ct er s ca n be sen t

Th e TELNET pr ogr a m is ext en sibl e t h r ou gh t h e u se of opt ion s. Ea ch side of t h e con n ect ion r equ est s or t el l s t h e r emot e en d of t h e con n ect ion wh ich of t h ese opt ion s it ca n su ppor t a n d wh ich on e t h e r emot e en d sh ou l d su ppor t . Th is pr ovides f or symmet r y. Th e TELNET pr ot ocol wa s wr it t en so t h a t it wou l d wor k on a va r iet y of oper a t in g syst ems. Th er ef or e, bef or e a con n ect ion is ma de t o t h e r emot e device, t h e TELNET pr ot ocol h a s some wor k t o do in or der t o syn ch r on iz e t h e con n ect ion wit h t h e r emot e device. For exa mpl e, t h e DOS oper a t in g syst em f or per son a l compu t er s r equ ir es t h a t a CR-LF (ca r r ia ge r et u r n -l in e f eed) be u sed t o t er min a t e a l in e of t ext . Ot h er syst ems su ch a s Un ix r equ ir e a l in e of t ext t o be t er min a t ed wit h a n LF. An ot h er exa mpl e is t h e ech oin g of ch a r a ct er s. Upon con n ect ion a t t empt , t h e TELNET pr ot ocol wil l n egot ia t e wit h t h e r emot e device a s t o wh o wil l do t h e ech oin g of t yped ch a r a ct er s t o t h e in it ia t or of a con n ect ion . Du r in g t h e con n ect ion a t t empt bet ween a sou r ce a n d dest in a t ion st a t ion , t h e t wo st a t ion s wil l commu n ica t e opt ion s. Th ese opt ion s in dica t e h ow ea ch en d of t h e con n ect ion s wil l r espon d on t h e TELNET con n ect ion . Th ese opt ion s in cl u de:

1. Th e a bil it y t o ch a n ge f r om 7-bit t ext t o 8-bit bin a r y 2. Al l owin g on e side or t h e ot h er t o ech o ch a r a ct er s 3. Specif yin g a t er min a l t ype 4. Requ est in g t h e st a t u s of a TELNET opt ion f r om t h e r emot e con n ect ion 5. Set t in g a t imin g ma r k t o syn ch r on iz e t wo en ds of a con n ect ion 6. Th e a bil it y t o t er min a t e a r ecor d wit h a n EOR code 7. Set t in g l in e mode so t h a t st r in gs of ch a r a ct er s ma y be sen t in st ea d of a ch a r a ct er -a t -a -t ime t r a n smit 8. St oppin g t h e go-a h ea d sign a l a f t er da t a Th e opt ion s a r e n egot ia t ed bet ween t h e t wo n et wor k st a t ion s in t h e f ol l owin g ma n n er : Re que st WILL

Re spo nse DO or DON’T

For exa mpl e, WILL ECHO f r om st a t ion A is r equ est in g t h a t st a t ion A pr ovide t h e ech oin g of ch a r a ct er s. Th e r espon se wil l eit h er be DO ECHO, mea n in g t h e r emot e en d a gr ees, or DON’T ECHO, mea n in g t h e r emot e en d wil l n ot a l l ow st a t ion A t o ech o. Agr eemen t bet ween t h e t wo TELNET en ds commu n ica t ed f or a DO wil l be r espon ded t o wit h a WILL or WON’T . An exa mpl e of t h is opt ion n egot ia t ion : If t h e TELNET a ppl ica t ion is r u n n in g on a DOS per son a l compu t er wh ich is set u p f or l oca l ech o, u pon t h e con n ect ion set u p t h e TELNET opt ion f r om t h e PC wil l be WILL ECHO a n d t h e r espon se sh ou l d be DO ECHO. If t h e PC h a d been set u p wit h ou t t h e l oca l ech o opt ion a n d you wish t h e r emot e en d t o pr ovide ech o, t h e PC sh ou l d n egot ia t e ech o wit h DO ECHO a n d t h e r espon se wil l be WILL ECHO. Usin g WILL, WON’T, DO, a n d DON’T pr ovides symmet r y. Eit h er side of t h e con n ect ion ca n pr ovide t h e comma n d or t h e r espon se. On e side pr ovides ser vices in exa ct l y t h e sa me ma n n er a s t h e ot h er side.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 222 File Transfer Protocol (FTP) TELNET pr ovides u ser s wit h t h e a bil it y t o a ct

a s a l oca l t er min a l even t h ou gh u ser s a r e n ot dir ect l y a t t a ch ed t o t h e h ost . On e ot h er TCP/IP a ppl ica t ion t h a t pr ovides n et wor k ser vices f or u ser s on a n et wor k is a file transfer protocol. Wit h TCP/IP, t h er e a r e t h r ee popu l a r t ypes of f il e a ccess pr ot ocol s in u se: FTP, Tr ivia l Fil e Tr a n sf er Pr ot ocol (TFTP), a n d Net wor k Fil e Syst em (NFS). Th is FTP pr ot ocol pr ovides f or f il es t o be t r a n sf er r ed r el ia bl y a cr oss t h e n et wor k u n der t h e compl et e con t r ol of t h e u ser . FTP is t r a n sa ct ion ba sed. Ever y comma n d is r epl ied t o u sin g a n u mber sch eme simil a r t o t h e SMTP pr ot ocol (discu ssed in a momen t ). FTP is ver y r obu st . Remember t h e pr eviou s discu ssion on por t s a n d socket s a n d h ow t h ey a r e est a bl ish ed a n d u sed. Th e FTP pr ot ocol a ct u a l l y u ses t wo por t a ssign men t s (a n d t h er ef or e t wo con n ect ion s): 20 a n d 21. Remember t h a t most con n ect ion s bet ween t wo n et wor k st a t ion s a r e ma de via on e sou r ce por t a n d on e dest in a t ion por t . A n et wor k st a t ion wa n t in g a con n ect ion t o a r emot e n et wor k st a t ion mu st con n ect t o t wo por t s on t h e dest in a t ion st a t ion in or der f or FTP t o wor k. Por t 20 is u sed f or t h e in it ia l set u p of t h e con n ect ion a n d a s t h e con t r ol con n ect ion . No da t a pa sses over t h is cir cu it except f or con t r ol in f or ma t ion . Por t 21 is u sed f or u ser da t a (t h e f il e t o be t r a n sf er r ed) t o pa ss over t h e con n ect ion . Simil a r t o t h e TELNET a r gu men t s, simpl y t ypin g FTP wil l est a bl ish t h e con n ect ion . Th e comma n d l in e sh ou l d t h en r ea d FTP> (t h is depen ds on you r a ppl ica t ion ). Wit h t h e a dven t of Win dows a n d Win dows-l ike oper a t in g syst ems, FTP n ow h a s a GUI in t er f a ce in or der t o t a ke some of t h e h a r sh n ess ou t of t h e pr ot ocol . Af t er t h e con n ect ion is est a bl ish ed, t h e ser ver pr ocess a wa it s a comma n d f r om t h e cl ien t . To t r a n sf er a f il e f r om t h e ser ver t o t h e cl ien t , t h e u ser t ypes in g e t , wh ich is t r a n smit t ed over t o t h e r emot e n et wor k st a t ion . Wit h t h is, a secon d con n ect ion is est a bl ish ed bet ween t h e ser ver a n d cl ien t FTP pr ocess. It is kn own a s t h e data connection. Now we h a ve t wo con n ect ion s, bu t on l y du r in g t h e f il e t r a n sf er pr ocess. On ce t h e f il e is t r a n sf er r ed, t h e da t a con n ect ion por t is cl osed.

Th is is t h e wel l -kn own (or a ssign ed) FTP da t a por t . Fr om a u ser ’s st a n dpoin t , t o est a bl ish a con n ect ion bet ween it sel f a n d a r emot e st a t ion , t h e comma n d is simil a r t o TELNET: FTP . A u ser cou l d a l so t ype in FTP a n d wa it f or t h e FTP pr ompt . At t h e pr ompt , t h e u ser wou l d u se t h e OPEN comma n d t o est a bl ish t h e con n ect ion .

Fil e Tr a n sf er Pr ot ocol (FTP)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 223 FTP Commands Th e f ol l owin g a r e t h e a va il a bl e comma n ds in FTP. Th er e a r e a l ot

of comma n ds l ist ed

bu t , in r ea l it y, on l y a f ew a r e u sed. Th ey a r e: o pe n c l o se bye binar y get put cd dir hash

Open a con n ect ion t o a r emot e r esou r ce. Cl ose a con n ect ion t o a r emot e r esou r ce. En d t h is FTP session . In dica t e t h a t t h e f il e t r a n sf er wil l be a f il e of bin a r y t ype (i.e., execu t a bl e f il e, Lot u s f il e, et c.). Get a f il e f r om t h e r emot e r esou r ce; get mget . Pu t a f il e t o t h e r emot e r esou r ce; pu t mpu t . Ch a n ge dir ect or y on t h e r emot e device; t o ch a n ge t h e dir ect or y on t h e l oca l en d, u se l cd. Get a dir ect or y l ist in g on t h e r emot e device; t o get a dir ect or y l ist in g on t h e l oca l en d, u se l dir . Displ a y h a sh ma r ks on t h e scr een t o in dica t e a f il e is bein g t r a n sf er r ed.

FTP Co mmands • • • • • • • • • • • •

open —cr ea t es a con n ect ion bet ween t wo h ost s. cl ose—cl oses a con n ect ion bet ween t wo h ost s. bye—en ds t h e FTP session . bin a r y—in dica t e t h a t t h e f il e is bin a r y da t a . get —get t h e r emot e f il e. mget —wil dca r d t o get mu l t ipl e f il es. pu t —pu t s a f il e t o t h e r emot e r esou r ce. mpu t —wil dca r d t o pu t mu l t ipl e f il es. cd—ch a n ge dir ect or y on t h e r emot e device. dir —get a dir ect or y l ist in g on t h e r emot e device. l dir —get a l oca l dir ect or y. h a sh —displ a y h a sh ma r ks du r in g t h e t r a n sf er .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 224 FTP Data Transfer FTP Dat a Tr ansf e r C:\WINDOWS>ftp ftp> open mnauglepc Connected to mnauglepc. 220 mnauglepc FTP service (NEWT v4.01) ready for new user. User (mnauglepc:(none)): mnaugle 331 mnaugle, please enter your password. Password: 230 User mnaugle logged in. ftp> pwd 257 “c:\” is the current directory. ftp> lcd Local directory now C:\WINDOWS ftp> get autoexec.bat autoexec.002 200 PORT command successful. 150 Opening ASCII mode data connection for autoexec.bat. 226 File transfer complete. 1911 bytes received in 0.00 seconds (1911000.00 Kbytes/sec) ftp> bye 221 Goodbye.

Ref er

t o t h e sl ide. Comma n ds su ch a s t h e f ol l owin g a r e sen t over t h e con t r ol por t . On ce t h e con n ect ion is est a bl ish ed, f il e t r a n sf er a ct u a l l y occu r s over t h e da t a por t . If a u ser wa n t s t o est a bl ish a n FTP con n ect ion bet ween 148.1.1.2 a n d a n FTP ser ver pr ocess on 148.1.1.19, t h e f ol l owin g sequ en ce of even t s t a ke pl a ce on a DOS PC (f or ot h er

oper a t in g syst ems, t h e pr ompt wou l d ch a n ge, bu t t h e comma n ds a r e a l l t h e sa me in ever y FTP impl emen t a t ion ): C> FTP or FTP If mu l t ipl e f il es a r e n eeded, t h e u ser ca n u se t h e comma n ds MGET or MPUT, wh ich st a n ds f or Mu l t ipl e GET a n d Mu l t ipl e PUT, r espect ivel y. If t h e f il e we wa n t is a bin a r y f il e (a spr ea dsh eet a n d a n a ppl ica t ion a r e exa mpl es of bin a r y f il es), t h e u ser h a s t o t ype in t h e keywor d binar y a t t h e FTP pr ompt . Th is in dica t es t o t h e FTP pr ogr a m t h a t t h e f il e t o be t r a n sf er r ed is a bin a r y f il e. An y of t h e comma n ds ma y be en t er ed a t t h e FTP pr ompt . Th e pr ot ocol is t r a n sa ct ion ba sed a n d t h e n u mber s pr ecedin g ea ch l in e a r e f or t h e n ode t o in t er pr et t h e n ext comma n d. Th e t ext is f or h u ma n con su mpt ion . C:\WINDOWS>f t p f t p> open mn a u gl epc Con n ect ed t o mn a u gl epc. 220 mn a u gl epc FTP ser vice (NEWT v4.01) r ea dy f or n ew u ser . User (mn a u gl epc:(n on e)): mn a u gl e 331 mn a u gl e, pl ea se en t er you r pa sswor d. Pa sswor d: 230 User mn a u gl e l ogged in . f t p> pwd 257 “c:\” is t h e cu r r en t dir ect or y. f t p> l cd Loca l dir ect or y n ow C:\WINDOWS f t p> get a u t oexec.ba t a u t oexec.002 200 PORT comma n d su ccessf u l . 150 Open in g ASCII mode da t a con n ect ion f or a u t oexec.ba t . 226 Fil e t r a n sf er compl et e. 1911 byt es r eceived in 0.00 secon ds (1911000.00 Kbyt es/sec) f t p> bye 221 Goodbye.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 225 Trivial File Transfer Program (TFTP) An a l t er n a t ive t o t h e FTP pr ogr a m is t h e TFTP pr ogr a m. Th is is a simpl ex f il e t r a n sf er pr ogr a m a n d is pr ima r il y u sed t o boot st r a p diskl ess n et wor k wor kst a t ion s (t h e pr ogr a m is sma l l en ou gh t o f it in a ROM ch ip on t h e diskl ess wor kst a t ion t o in it ia t e a boot a cr oss t h e n et wor k) or even n et wor k compon en t s (n et wor k br idges a n d r ou t er s). Th e FTP pr ogr a m is a n ext r emel y r obu st a n d compl ex pr ogr a m, a n d sit u a t ion s exist t h a t r equ ir e f il e t r a n sf er ca pa bil it ies wit h ou t compl exit y. Hen ce, FTP is a l so a l a r ger f il e. TFTP is a sma l l f il e a n d pr ovides a mor e r est r ict ive f il e t r a n sf er (f or exa mpl e, n o u ser a u t h en t ica t ion ); it is a l so a sma l l er execu t a bl e sof t wa r e pr ogr a m. Th er e a r e dif f er en ces bet ween FTP a n d TFTP. TFTP does n ot pr ovide a r el ia bl e ser vice; t h er ef or e, it u ses t h e t r a n spor t ser vices of UDP in st ea d of TCP. It a l so r est r ict s it s da t a gr a m siz e t o 512 byt es, a n d ever y da t a gr a m mu st be a ckn owl edged (n o mu l t ipl epa cket win dowin g). Th er e a r e n o win dows f or pa cket s t o be a ckn owl edged. It cou l d be sa id t h a t it h a s a win dow of 1. Th e pr ot ocol is ver y simpl e. Th e f ir st pa cket t r a n smit t ed f r om t h e cl ien t pr ocess t o t h e ser ver pr ocess is a con t r ol pa cket , wh ich specif ies t h e f il en a me a n d wh et h er it is t o be r ea d f r om or wr it t en t o t h e r emot e wor kst a t ion (GET or PUT comma n d). Su bsequ en t pa cket s a r e da t a pa cket s a n d f il e t r a n sf er is a ccompl ish ed wit h 512 byt es t r a n sf er r ed a t on e t ime. Th e in it ia l da t a pa cket is specia l l y ma r ked wit h a n u mber of 1. Ea ch su bsequ en t da t a is in cr emen t ed by 1. Th is is t h e sequ en ce n u mber in g syst em f or TFTP. Th e r eceivin g st a t ion wil l a ckn owl edge t h is pa cket immedia t el y u pon r eceipt , u sin g t h is n u mber . An y pa cket of l ess t h a n 512 byt es in l en gt h sign if ies t h e en d of t h e t r a n sf er . Er r or messa ges ma y be t r a n smit t ed in pl a ce of t h e da t a in t h e da t a f iel d, bu t a n y er r or messa ge wil l t er min a t e t h e t r a n smission . Al so n ot ice t h a t on l y on e con n ect ion is ma de t o t h e r emot e r esou r ce. FTP h a s on e f or da t a a n d on e f or con t r ol in f or ma t ion . FTP is a ver y r obu st pr ot ocol , on e t h a t ca n h a n dl e ma n y t ypes of t r a n sf er s over va r iou s (n ot so good) media t ypes. Th e comma n ds of GET a n d PUT a r e u sed t h e sa me a s in t h e FTP pr ogr a m.

Tr ivial Fil e Tr ansf e r Pr o g r am (TFTP) • • • • • • •

A simpl ex f il e t r a n sf er pr ogr a m. Uses UDP. Tr a n sf er s 512 byt es a t a t ime. Tr a n sf er s on e segmen t a t a t ime. Ackn owl edged by t h e a ppl ica t ion . An y da t a gr a m l ess t h a n 512 byt es in dica t es t h e l a st da t a gr a m in t h e t r a n sf er . Popu l a r f or n et wor k boot in g of devices.

Th e sequ en cin g of t h e da t a is a ccompl ish ed t h r ou gh t h e TFTP a ppl ica t ion , n ot t h e t r a n spor t -l a yer ser vice of UDP. UDP pr ovides on l y u n r el ia bl e, con n ect ion l ess ser vice. TFTP keeps t r a ck of t h e sequ en cin g of t h e bl ocks of da t a a n d t h e a ckn owl edgmen t s t h a t sh ou l d be r eceived. For t h ose r ea der s f a mil ia r wit h Net Wa r e, t h is is t h e sa me t ype of t r a n sa ct ion a ccompl ish ed bet ween t h e Net Wa r e Cor e Pr ot ocol (NCP, n ot u sin g Bu r st mode) a n d it s u n der l yin g del iver y syst em, IPX.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 226 Domain Name Service (DNS) Rea d RFCs 1034 a n d 1035. Th ese con t a in t h e bu l k of t h e DNS in f or ma t ion a n d a r e su ppl emen t ed by RFCs 1535–1537. DNS h a s ma n y u ses, bu t it s ma in f u n ct ion con t in u es t o be t h e ma ppin g of IP a ddr ess t o h u ma n -u sa bl e n a mes. Th er e a r e mil l ion s of h ost s on t h e In t er n et t oda y r epr esen t in g even mor e mil l ion s of u ser s. Most u ser s h a ve n o idea wh a t t h e u n der l yin g pr ot ocol s a r e doin g, n or do t h ey ca r e. Bu t most of t h em wou l d if t h ey h a d t o memor iz e IP a ddr esses a n d det er min e ot h er f u n ct ion s su ch a s ma il . Act u a l l y, most wou l d be f r u st r a t ed by t h e n u mber in g syst em a n d t h e In t er n et wou l d n ot be a s popu l a r a s it is. Wh en t h e In t er n et wa s you n g, a n ea r l y met h od of ma ppin g t h e 32-bit a ddr ess t o a h ost n a me r equ ir ed down l oa din g a f il e ma in t a in ed by (a t t h e t ime) t h e Net wor k In f or ma t ion Cen t er (NIC). It wa s a sin gl e f il e (h ost s.t xt ) t h a t con t a in ed a simpl e ma ppin g of In t er n et a ddr esses t o h ost n a mes. Th is f il e wa s u su a l l y con t a in ed in t h e /et c su bdir ect or y on a wor kst a t ion a n d va r iou s TCP/IP a ppl ica t ion s cou l d a ccess t h e in f or ma t ion in t h is f il e. Not h a vin g t h is f il e mea n t t h a t a u ser h a d t o t ype in t h e 32-bit a ddr ess f or con n ect ivit y t o a r emot e h ost . Secon dl y, popu l a t ion of t h e In t er n et wa s becomin g ver y diver se a n d mor e a u t on omou s. In t h e 1980s t h e In t er n et wa s kn own a s t h e ARPAn et (n ow sh u t down ) a n d t h e h ost s wer e pr ima r il y t ime sh a r ed. Mor e a n d mor e con n ect ion s t o t h e In t er n et wer e sit es t h a t h a d LANs in st a l l ed a n d con n ect ed t o t h ese LANs wer e ma in f r a me a n d min icompu t er s or even per son a l compu t er s. Th ese sit es wer e a dmin ist er in g t h eir own n a mes a n d a ddr esses in t h e h ost s.t xt f il e, bu t h a d t o wa it f or t h e NIC t o ch a n ge h ost s.t xt t o ma ke ch a n ges visibl e t o t h e In t er n et a t l a r ge. La st l y, wit h t h e a ddit ion s of mor e sit es t o t h e In t er n et , t h e a ppl ica t ion s on t h e In t er n et wer e get t in g mor e soph ist ica t ed a n d cr ea t in g a n eed f or a gen er a l -pu r pose n a me ser vice.

Doma in Na me Ser vice (DNS)

Af t er ma n y exper imen t a l RFCs, t h e gl oba l n a me syst em f or t h e In t er n et beca me kn own a s t h e Doma in Na me Syst em (DNS). DNS is compr ised of t h r ee compon en t s: a name server, a database, a n d a name resolver. Na me ser ver s ma ke in f or ma t ion a va il a bl e t o t h e r esol ver s. Th e in f or ma t ion t h e n a me ser ver s con t a in a r e IP a ddr esses, a l ia ses, ma il in f or ma t ion , a n d so f or t h . Th e r esol ver s u su a l l y r eside on u ser s’ wor kst a t ion s a n d a r e embedded in t h e a ppl ica t ion s of TCP su ch a s TELNET a n d FTP. Th ey a r e n ot sepa r a t e pr ogr a ms. Th e n a me ser ver is a sepa r a t e pr ogr a m a n d r esides a n ywh er e on a n et wor k a n swer in g qu er ies f r om t h e r esol ver s. Th e doma in ser ver s ea ch ma in t a in a por t ion of t h e h ier a r ch ica l da t a ba se u n der sepa r a t e a dmin ist r a t ive a u t h or it y a n d con t r ol . Redu n da n cy is obt a in ed by t r a n sf er r in g da t a bet ween cooper a t in g ser ver s (pr ima r y ma st er s a n d secon da r y ma st er s). You r sit e ma y n ot r equ ir e a DNS. You ma y h a ve ju st a f ew h ost s a n d ca n depen d on a n ot h er DNS t o su ppl y t h e in f or ma t ion you n eed. For t h e In t er n et it sel f , it mu st h a ve t h e DNS syst em. A gr ea t exa mpl e on t h e depen den cy of DNS wa s wh en a cor r u pt ed da t a ba se (con t a in in g “dir ect ion s” t o ot h er h ost s) f il e wa s post ed on t h e n in e r oot ser ver s (expl a in ed in a momen t ). Mil l ion s of on -l in er s wer e wit h ou t t h e ca pa bil it y of a t t a ch in g or commu n ica t in g wit h ot h er h ost s on t h e n et wor k f or h ou r s. Wit h ou t in f or ma t ion (t h e IP a ddr ess) of a r emot e syst em, t wo n odes ca n n ot commu n ica t e. We cou l d l ook u p t h e in f or ma t ion in t h e In t er NIC da t a ba se, bu t wit h ou t pr ior kn owl edge on h ow t o qu er y t h eir da t a ba se ma n u a l l y, on e is l it er a l l y l ost on t h e In t er n et . DNS pr ovides in f or ma t ion a bou t h ost s, n ot u ser s, on t h e In t er n et .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 227 DNS Structure Th e Doma in Na me Spa ce is ver y mu ch l ike a f il e syst em on Un ix or

DOS. It st a r t s wit h a r oot a n d br a n ch es a t t a ch f r om t h is r oot t o give a n en dl ess a r r a y of pa t h s. Ea ch br a n ch in t h e f il e syst em is given a dir ect or y n a me, wh er ea s in DNS it is ca l l ed a label. Ea ch l a bel ca n be 63 ch a r a ct er s in l en gt h , bu t most a r e f a r l ess t h a n t h a t . Th is mea n s t h a t ea ch t ext wor d bet ween t h e dot s ca n be 63 ch a r a ct er s in l en gt h , wit h t h e t ot a l doma in n a me (a l l t h e l a bel s) l imit ed t o 255 byt es in over a l l l en gt h a ssu min g a scr een l in e l en gt h of 80 ch a r a ct er s t h is is ju st 3 scr een l in es. Th e IP pr ot ocol ma n da t es t h e u se of IP a ddr esses. An y u ser ma y u se t h is a ddr ess t o con n ect t o a n y ser vice on t h e n et wor k; h owever , f or a u ser t o r emember t h e a ddr esses of a l l t h e n et wor k ser ver s on t h e n et wor k is a n impossibl e t a sk. User s a r e mor e l ikel y t o r emember n a mes t h a n t h ey a r e t o r emember n u mber s. For t h ose f a mil ia r wit h da t a ba se en vir on men t s, t h e doma in n a me ser ver is simpl y a da t a ba se (con sist in g of in f or ma t ion su ch a s n a mes a n d IP a ddr esses, a n d mu ch mor e) t o wh ich a n y st a t ion on t h e n et wor k ca n ma ke qu er ies u sin g t h e doma in n a me r esol ver . Th e doma in n a me syst em is n ot n ecessa r il y compl ex, bu t it is in vol ved. It is ba sed on a h ier a r ch ica l st r u ct u r e a s sh own in t h e sl ide. Th e a ssign men t of n a mes is r el a t ivel y simpl e a n d is a ccompl ish ed via t h e In t er n et Regist r ies wit h t h e u l t ima t e a u t h or it y bein g IANA. Th e doma in n a me is simpl y t h a t : a n a me a ssign ed t o a doma in For exa mpl e, isi.edu , cisco.com, a n d 3Com.com r epr esen t t h e doma in n a me a t t h ose compa n ies or edu ca t ion a l in st it u t ion s. Th e n a min g wit h in t h ose doma in s (n a min g of t h e h ost s) is l ef t u p t o t h ose in dividu a l s wh o a r e a ssign ed t h ose doma in n a mes. Th e In t er NIC does n ot ca r e. Th e h ier a r ch ica l st r u ct u r e a l l ows h ost s t o h a ve t h e sa me n a me a s l on g a s t h ey a r e in dif f er en t br a n ch es of t h e st r u ct u r e or in dif f er en t doma in s.

DNS St r u ct u r e

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 228 DNS Components DNS does mu ch mor e t h a n t h e n a me-t o-a ddr ess t r a n sl a t ion . It

a l so a l l ows f or :

The Do main Name Spac e and r e so ur c e r e c o r ds. Th is is t h e da t a ba se of gr ou ped n a mes a n d a ddr esses t h a t a r e st r ict l y f or ma t t ed u sin g a t r ee-st r u ct u r ed n a me spa ce a n d da t a a ssocia t ed wit h t h e n a mes. Th e doma in syst em con sist s of sepa r a t e set s of l oca l in f or ma t ion ca l l ed zones. Th e da t a ba se is divided u p in t o sect ion s ca l l ed zones, wh ich a r e dist r ibu t ed a mon g t h e n a me ser ver s. Wh il e n a me ser ver s ca n h a ve sever a l opt ion a l f u n ct ion s a n d sou r ces of da t a , t h e essen t ia l t a sk of a n a me ser ver is t o a n swer qu er ies u sin g da t a in it s z on es. Con cept u a l l y, ea ch n ode a n d l ea f of t h e doma in n a me spa ce t r ee n a mes a set of in f or ma t ion , a n d qu er y oper a t ion s a r e a t t empt s t o ext r a ct specif ic t ypes of in f or ma t ion f r om a pa r t icu l a r set . A qu er y n a mes t h e doma in n a me of in t er est a n d descr ibes t h e t ype of r esou r ce in f or ma t ion t h a t is desir ed. DNS Co mpo ne nt s • Doma in Na me Spa ce a n d r esou r ce r ecor ds • Na me ser ver s • Resol ver s

Name se r ve r s. Th ese a r e wor kst a t ion s t h a t con t a in a da t a ba se of in f or ma t ion a bou t h ost s in z on es. Th is in f or ma t ion ca n be a bou t wel l -kn own ser vices, ma il exch a n ger , or h ost in f or ma t ion . A n a me ser ver ma y ca ch e st r u ct u r e or set in f or ma t ion a bou t a n y pa r t of t h e doma in t r ee, bu t in gen er a l , a pa r t icu l a r n a me ser ver h a s compl et e in f or ma t ion a bou t a su bset of t h e doma in spa ce, a n d poin t er s t o ot h er n a me ser ver s t h a t ca n be u sed t o l ea d t o in f or ma t ion f r om a n y pa r t of t h e doma in t r ee. Na me ser ver s kn ow t h e pa r t s of t h e doma in t r ee f or wh ich t h ey h a ve compl et e in f or ma t ion ; a n a me ser ver is sa id t o be a n a u t h or it y f or t h ese

pa r t s of t h e n a me spa ce. Au t h or it a t ive in f or ma t ion is or ga n iz ed in t o u n it s ca l l ed zones, a n d t h ese z on es ca n be a u t oma t ica l l y dist r ibu t ed t o t h e n a me ser ver s t h a t pr ovide r edu n da n t ser vice f or t h e da t a in a z on e. Th e n a me ser ver mu st per iodica l l y r ef r esh it s z on es f r om ma st er copies in l oca l f il es or f or eign n a me ser ver s. Re so l ve r s. Th ese a r e pr ogr a ms t h a t gen er a l l y r eside on u ser s’ wor kst a t ion s a n d sen d r equ est s over t h e n et wor k t o ser ver s on beh a l f of t h e u ser s. Resol ver s mu st be a bl e t o a ccess a t l ea st on e n a me ser ver a n d u se t h a t n a me ser ver ’s in f or ma t ion t o a n swer a qu er y dir ect l y, or pu r su e t h e qu er y u sin g r ef er r a l s t o ot h er n a me ser ver s. Wh en a DNS ser ver r espon ds t o a r esol ver , t h e r equ est er a t t empt s a con n ect ion t o t h e h ost u sin g t h e IP a ddr ess a n d n ot t h e n a me. Th e pr ecedin g exa mpl e cou l d h a ve u sed on l y pa r t of a n a me: h ost . Th is is kn own a s a relative name. It is pa r t of a l a r ger n a me kn own a s t h e absolute name. Th e a bsol u t e n a me f or t h e pr ecedin g exa mpl e cou l d be h ost .r esea r ch .Na u gl e.com. Th is n a me wou l d be in t h e doma in n a me ser ver . Most r esol ver s wil l st ep t h r ou gh a pr econ f igu r ed l ist of su f f ixes (in or der of con f igu r ed in pu t ), a ppen d it t o t h e n a me, a n d a t t empt a l ooku p wh en t h e f u l l DNS (a bsol u t e) n a me is n ot specif ied.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 229 Domain Structure DNS is h ier a r ch ica l

in st r u ct u r e, a s sh own pr eviou sl y. A doma in is a su bt r ee of t h e doma in n a me spa ce. Th e a dva n t a ge of t h is st r u ct u r e is t h a t a t t h e bot t om, t h e n et wor k a dmin ist r a t or ca n a ssign t h e n a mes. Fr om t h e r oot , t h e a ssign ed t op-l evel doma in s (TLD) a r e a s f ol l ows: GOV Gover n men t body. EDU Edu ca t ion a l body. COM Commer cia l en t it y. MIL Mil it a r y. ORG An y ot h er or ga n iz a t ion n ot pr eviou sl y l ist ed. CON An y cou n t r y u sin g t h e ISO st a n da r d 3166 f or n a mes of cou n t r ies As st a t ed in RFC 1591, “t h e IANA is n ot in t h e bu sin ess of wh a t is a n d wh a t is n ot a cou n t r y.” Th er ef or e, it is u p t o ISO t o det er min e wh o is on t h a t l ist . Now l et ’s l ook a t t h e gen er a l iz ed f or ma t f or a doma in n a me. Goin g down t h e t r ee, we ca n pick ou t a doma in n a me, su ch a s r esea r ch .Na u gl e.com. Th is wou l d sign if y t h e Resea r ch depa r t men t (wh ich is a su bdoma in of doma in Na u gl e.com) a t Na u gl e En t er pr ises, wh ich is def in ed a s a commer cia l en t it y of t h e In t er n et . Na u gl e.com ca n be a n ode in t h e doma in a ct in g a s a n a me ser ver , or t h er e ma y be dif f er en t n a me ser ver s f or Na u gl e.com. A u ser a t wor kst a t ion 148.1.1.2 t ypes in t h e TELNET comma n d a n d t h e doma in n a me of h ost 1.r esea r ch .Na u gl e.com. Th is wor kst a t ion mu st h a ve t h e doma in n a me r esol ver in st a l l ed on it . Th is pr ogr a m wou l d sen d ou t t h e t r a n sl a t ion r equ est t o a doma in n a me ser ver t o r esol ve t h e h ost n a me-t o-IP a ddr ess. If t h e h ost n a me is f ou n d, t h e doma in n a me ser ver wou l d r et u r n t h e IP a ddr ess t o t h e wor kst a t ion . If t h e n a me is n ot f ou n d, t h e

ser ver ma y sea r ch f or t h e n a me el sewh er e a n d r et u r n t h e in f or ma t ion t o t h e r equ est in g wor kst a t ion , or r et u r n t h e a ddr ess of a n a me ser ver t h a t t h e wor kst a t ion (if a bl e) ca n qu er y t o get mor e in f or ma t ion . Mor e on t h a t in a momen t . A doma in con t a in s a l l h ost s wh ose doma in n a mes a r e wit h in a cer t a in doma in . A doma in n a me is a sequ en ce of l a bel s sepa r a t ed by dot s. A doma in is a su bdoma in of a n ot h er doma in if it is con t a in ed wit h in t h a t doma in . Th is r el a t ion sh ip ca n be t est ed by seein g if t h e su bdoma in ’s n a me en ds wit h t h e con t a in in g doma in ’s n a me. For exa mpl e, r esea r ch .Na u gl e.com is a su bdoma in of Na u gl e.com. Na u gl e.com is a su bdoma in of .com, a n d “ “ (r oot ).

Doma in St r u ct u r e Th er e a r e specia l ser ver s on t h e In t er n et t h a t pr ovide gu ida n ce t o a l l n a me ser ver s. Th ese a r e kn own a s r oot n a me ser ver s a n d, a s of t h is wr it in g, t h er e a r e n in e of t h em. Th ey do n ot con t a in a l l in f or ma t ion a bou t ever y h ost on t h e In t er n et , bu t t h ey do pr ovide dir ect ion a s t o wh er e doma in s a r e l oca t ed (t h e IP a ddr ess of t h e n a me ser ver f or t h e u pper most doma in a ser ver is r equ est in g). Th e r oot n a me ser ver is t h e st a r t in g poin t t o f in d a n y doma in on t h e In t er n et . If a ccess t o t h e r oot ser ver s cea sed, t r a n smission over t h e In t er n et wou l d even t u a l l y come t o a h a l t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 230 Name Servers Th e pr ogr a ms t h a t

keep in f or ma t ion a bou t t h e doma in n a me spa ce a r e ca l l ed name servers. Th e n a me r esol ver s do n ot u su a l l y st or e in f or ma t ion , n or a r e t h ey pr ogr a mmed wit h in f or ma t ion l ike a n a me ser ver . Al l in f or ma t ion is kept in t h e ser ver . Na me ser ver s keep in f or ma t ion a bou t some pa r t of t h e n a me spa ce, ca l l ed a zone. Na me ser ver s ca n be “a u t h or it a t ive” a bou t on e or mor e z on es. Bein g a u t h or it a t ive mea n s t h a t t h is ser ver is a l l -kn owin g a bou t t h e z on e. A ser ver ca n be a u t h or it a t ive f or mor e t h a n on e z on e, a n d it ca n be a pr ima r y n a me ser ver f or on e z on e a n d a secon da r y n a me ser ver f or a n ot h er . However , t h ese f u n ct ion s r a r el y cr oss; n a me ser ver s a r e eit h er pr ima r y or secon da r y f or t h e z on es t h ey l oa d. Th er e a r e t wo t ypes of n a me ser ver s: primary masters a n d secondary masters. Th e pr ima r y ma st er bu il ds it s da t a ba se f r om f il es t h a t wer e pr econ f igu r ed on it s h ost s, ca l l ed zone or database files. Th e n a me ser ver r ea ds t h ese f il es a n d bu il ds a da t a ba se f or t h e z on e it is a u t h or it a t ive f or . Secon da r y ma st er s ca n pr ovide in f or ma t ion t o r esol ver s ju st l ike t h e pr ima r y ma st er s, bu t t h ey get t h eir in f or ma t ion f r om t h e pr ima r y. An y u pda t es t o t h e da t a ba se a r e pr ovided by t h e pr ima r y. Th is syst em wa s set u p f or ea se of u se. It is a l so impor t a n t t o n ot e t h a t t h er e sh ou l d be mor e t h a n on e n a me ser ver per z on e or doma in .

Na me Ser ver s

Let ’s t a ke a simpl e exa mpl e. You a r e h ost

on doma in Na u gl e.com. Specif ica l l y, h ost 1.r esea r ch .Na u gl e.com. You a r e l ookin g f or a h ost n a med l a bh ost .bn r .ca .u s. You t ype in TELNET l a bh ost .bn r .ca .u s. Th e n a me ser ver on you r n et wor k is a pr ima r y a n d is n ot a u t h or it a t ive f or t h e .u s doma in . You r n a me ser ver t h en sen ds ou t a qu er y t o t h e r oot ser ver t h a t it kn ows a bou t a n d t h a t r oot ser ver r ef er s you t o t h e n a me ser ver f or

t h e .u s doma in . You r n a me ser ver wil l sen d ou t a r equ est t o t h a t n a me ser ver f or .ca . Th e .ca n a me ser ver r ef er s you t o a n ot h er n a me ser ver a u t h or it a t ive f or t h e doma in bn r .ca . You r ser ver t h en sen ds on e f in a l r equ est t o t h a t ser ver f or in f or ma t ion on l a bh ost .bn r .ca . Th a t ser ver r espon ds wit h t h e IP a ddr ess, wh ich you r ser ver r et u r n s t o you r wor kst a t ion . Th e TELNET pr ot ocol t h en u ses t h a t IP a ddr ess t o a t t empt a con n ect ion t o you r r equ est ed dest in a t ion . A poin t t o br in g ou t h er e is t h a t t h e in f or ma t ion in t h e n a me ser ver da t a ba se is n ot dyn a mic in t h a t it does n ot kn ow of t h e st a t u s of a n y st a t ion (t h a t st a t ion ma y be t u r n ed of f , n ot a ccept in g a n y n ew con n ect ion s, et c). Th e n a me ser ver f u n ct ion simpl y r espon ds t o r equ est s f or in f or ma t ion t h a t is con t a in ed in it s da t a ba se.

Na me Ser ver s (con t in u ed)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 231 Query Function Types Th er e a r e t wo t ypes of qu er ies issu ed: recursive a n d iterative. Recu r sive qu er ies r eceived by a ser ver f or ces t h a t ser ver t o f in d t h e in f or ma t ion r equ est ed or post a messa ge ba ck t o t h e qu er ier t h a t t h e in f or ma t ion ca n n ot be f ou n d. It er a t ive qu er ies a l l ow t h e ser ver t o sea r ch f or t h e in f or ma t ion a n d pa ss ba ck t h e best in f or ma t ion it kn ows a bou t . Th is is t h e t ype t h a t is u sed bet ween ser ver s. Cl ien t s u sed t h e r ecu r sive qu er y. Th is is sh own in t h e sl ide. Gen er a l l y (bu t n ot a l wa ys), a ser ver -t o-ser ver qu er y is it er a t ive a n d a cl ien t -r esol ver t o-ser ver qu er y is r ecu r sive. You sh ou l d a l so n ot e t h a t a ser ver ca n be qu er ied or it ca n be t h e per son pl a cin g a qu er y. Th er ef or e, a ser ver con t a in s bot h t h e ser ver a n d cl ien t f u n ct ion s. A ser ver ca n t r a n smit eit h er t ype of qu er y. If it is h a n ded a r ecu r sive qu er y f r om a r emot e sou r ce, it mu st t r a n smit ot h er qu er ies t o f in d t h e specif ied n a me, or sen d a messa ge ba ck t o t h e or igin a t or of t h e qu er y t h a t t h e n a me cou l d n ot be f ou n d.

Qu er y Fu n ct ion Types

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 232 Example DNS Database Exampl e DNS Dat abase • Recor ds in t h e da t a ba se in cl u de: • A—h ost ’s IP a ddr ess • PTR—h ost ’s doma in n a me, h ost iden t if ied by it s IP a ddr ess • CNAME—h ost ’s ca n on ica l n a me, h ost iden t if ied by a n a l ia s doma in n a me • MX—h ost ’s or doma in ’s ma il exch a n ger • NS—h ost ’s or doma in ’s n a me ser ver (s) • SOA—In dica t es a u t h or it y f or t h e doma in • TXT—gen er ic t ext r ecor d • SRV—ser vice l oca t ion r ecor d • RP—t ext n a me of t h e per son r espon sibl e f or t h e doma in DNS

A da t a ba se is ma de u p of r ecor ds a n d t h e DNS is a da t a ba se. Th er ef or e, common r esou r ce r ecor d t ypes in t h e DNS da t a ba se a r e: A Host ’s IP a ddr ess, PTR Host ’s doma in n a me, h ost iden t if ied by it s IP a ddr ess CNAME Host ’s ca n on ica l n a me, h ost iden t if ied by a n a l ia s doma in n a me MX Host ’s or doma in ’s ma il exch a n ger NS Host ’s or doma in ’s n a me ser ver (s) SOA In dica t es a u t h or it y f or t h e doma in TXT Gen er ic t ext r ecor d SRV Ser vice l oca t ion r ecor d RP Respon sibl e per son

Wh en a r esol ver s r equ est s in f or ma t ion f r om t h e ser ver , in cl u ded in t h e r equ est wil l be on e of t h e pr ecedin g t ypes. In t h is wa y, t h e ser ver wil l kn ow exa ct l y wh a t t h e r esol ver is r equ est in g; t h is cou l d be a ma il ser ver , a n IP a ddr ess t r a n sl a t ion , or simpl y a r equ est f or some gen er ic in f or ma t ion . I a m n ot goin g t o expl a in all t h e r ecor ds in t h e da t a ba se, bu t some of t h e mor e u sef u l on es a r e discu ssed n ext .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 233 SOA Record Th e St a r t

of Au t h or it y r ecor d is t h e f ir st en t r y in t h e da t a ba se f il e. Th is r ecor d in dica t es t h a t t h e n a me ser ver is t h e best -a va il a bl e sou r ce of in f or ma t ion f or t h is doma in . For exa mpl e: Na u gl e.com. IN 1567 18000 3600 604800 86400

SOA n s1.Na u gl e.com Ma t t .NT1Ser ver .Na u gl e.com.( ;Ser ia l ;Ref r esh a f t er 5 h ou r s ;Ret r y a f t er 1 h ou r ;Expir e a f t er 1 week ;Min imu m TTL of 1 da y

Th e n u mer ic en t r ies a bove a r e in dica t ed in secon ds. Not ice t h a t a n yt h in g f ol l owin g a semicol on is ign or ed. Th e f ir st en t r y on t h e f ir st l in e in dica t es t h e doma in t h is ser ver is a u t h or it a t ive f or : Na u gl e.com. Th e n ext f iel d in dica t es t h e cl a ss of da t a in In t er n et (ot h er t ypes a r e def in ed, bu t n ot u sed t oda y). Th e f ir st n a me a f t er t h e SOA in dica t es t h e pr ima r y n a me ser ver f or t h is doma in , a n d t h e f iel d a f t er t h is in dica t es t h e per son t o con t a ct . Repl a ce t h e f ir st “.” wit h t h e @ symbol a n d sen d a n ema il t h er e f or mor e in f or ma t ion . Th e in f or ma t ion con t a in ed in t h e pa r en t h eses is f or t h e secon da r y n a me ser ver . For exa mpl e, t h e ser ia l n u mber on t h e pr ima r y n a me ser ver sh ou l d be in cr emen t ed wh en n ew in f or ma t ion is pl a ced in t h e da t a ba se. In t h is wa y, t h e secon da r y ser ver s wil l kn ow t h ey h a ve ol d in f or ma t ion a n d sh ou l d be u pda t ed by t h is pr ima r y.

SOA Recor d Not ice t h a t some doma in n a mes a r e wr it t en wit h or wit h ou t a dot a t t h e en d. Th e on es wit h a dot on t h e en d a r e kn own a s absolute n a mes a n d t h ey specif y a doma in n a me exa ct l y a s it l ies in t h e h ier a r ch y n a me spa ce st a r t in g f r om t h e r oot . Th ose n a mes t h a t do n ot en d wit h a dot a r e doma in n a mes t h a t ma y t r a il f r om some ot h er doma in . Th is is a ga in , best exempl if ied t h r ou gh t h e dir ect or y syst em. To ch a n ge dir ect or ies in DOS or Un ix, you u se t h e CD (CHDIR) comma n d. Wit h t h is you ca n specif y dir ect l y f r om t h e r oot wh ich dir ect or y you wou l d l ike t o ch a n ge t o, or you ca n ch a n ge dir ect or ies r el a t ive t o a n ot h er dir ect or y. You do n ot h a ve t o t ype in t h e f u l l dir ect or y pa t h n a me ea ch t ime you wa n t t o ch a n ge dir ect or ies. Th is is t h e sa me f or DNS u sin g t h e dot t o sign if y t h e f u l l pa t h n a me (wit h t h e dot ) a n d r el a t ive t o a n ot h er pa t h n a me (wit h ou t t h e dot ).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 234 Name Server Records Name Se r ve r Re c o r ds • Na u gl e.com. IN NS n s0.Na u gl e.com. • Na u gl e.com. IN NS n s1.Na u gl e.com. • Na u gl e.com. IN NS n s2.Na u gl e.com. • Na u gl e.com. IN NS n s3.Na u gl e.com. • Na u gl e.com. IN NS n s4.Na u gl e.com.

Th e n ext

en t r y in ou r ser ver da t a ba se is f or n a me ser ver r esou r ce r ecor ds. If you h a ve f ive n a me ser ver s in you r doma in , you sh ou l d l ist t h em h er e. Na u gl e.com. Na u gl e.com. Na u gl e.com. Na u gl e.com. Na u gl e.com.

IN IN IN IN IN

NS NS NS NS NS

n s0.Na u gl e.com. n s1.Na u gl e.com. n s2.Na u gl e.com. n s3.Na u gl e.com. n s4.Na u gl e.com.

Th e pr ecedin g en t r ies in dica t e t h a t t h er e a r e f ive n a me ser ver s f or doma in Na u gl e.com. Na me ser ver s ca n be mu l t ih omed (on e st a t ion con n ect ed t o mor e t h a n on e su bn et ).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 235 Address Records Th e f ol l owin g in dica t es t h e n a me-t o-IP-a ddr ess ma ppin gs: Loca l h ost .Na u gl e.com. Da t a ba seSer ver .Na u gl e.com. HRSer ver .Na u gl e.com. En gSer ver .Na u gl e.com. NS0.Na u gl e.com. NS1.Na u gl e.com. NS2.Na u gl e.com. NS3.Na u gl e.com. NS4.Na u gl e.com. ; Al iase s NT1Ser ver .Na u gl e.com NT2.Na u gl e.com NT3.Na u gl e.com

IN IN IN IN IN IN IN IN IN

A A A A A A A A A

127.0.0.1 128.1.1.1 128.1.15.1 128.1.59.150 128.1.1.2 128.1.15.2 128.1.16.190 128.1.59.100 128.1.59.101

IN IN IN

CNAME DBSer ver .Na u gl e.com. CNAME HRSer ver .Na u gl e.com. CNAME En gSer ver .Na u gl e.com.

Addr e ss Re c o r ds Loca l Host .Na u gl e.com. IN A 127.0.0.1 Da t a ba seSer ver .Na u gl e.com. IN A 128.1.1.1 HRSer ver .Na u gl e.com. IN A 128.1.15.1 En gSer ver .Na u gl e.com. IN A 128.1.59.150 NS0.Na u gl e.com. IN A 128.1.1.2 NS1.Na u gl e.com. IN A 128.1.15.2 NS2.Na u gl e.com. IN A 128.1.16.190 NS3.Na u gl e.com. IN A 128.1.59.100 NS4.Na u gl e.com. IN A 128.1.59.101 ;Al iase s NT1.Na u gl e.com. IN CNAME DBSer ver .Na u gl e.com. NT2.Na u gl e.com. IN CNAME HRSer ver .Na u gl e.com. Th is f il e h a s n ew t ypes: A (a ddr ess) a n d CNAME (ca n on ica l n a me). Th e A r ecor d t ype st a n ds f or Addr ess (A f or 32-bit a ddr ess, a n d AAAA f or IPv6 a ddr esses). Th er e ca n be mor e t h a n on e a ddr ess f or a n a me, a s in t h e ca se of a mu l t ih omed h ost (a h ost wit h a con n ect ion t o mor e t h a n on e su bn et ). Th is cou l d be st a t ed a s: ;mul t ho me d ho st s NT5.Na u gl e.com

IN IN

A A

128.1.60.5 128.1.61.5

Na me ser ver s wil l r et u r n t h e cl osest a ddr ess t o t h e r equ est er , depen din g on t h e r equ est er ’s a ddr ess. If t h ey a r e on t h e sa me n et wor k, t h e n a me ser ver wil l pl a ce t h e cl osest a ddr ess f ir st . Sin ce t h e DNS h a s n o idea of r ou t e t a bl es, if t h e r equ est er a n d it s n et wor k a ddr ess a r e dif f er en t , it wil l r et u r n bot h a ddr esses. Wit h ea ch su bsequ en t a ddr ess, it wil l r ever se t h e IP a ddr esses in t h e r espon se t o pr ovide some ba l a n ce. Al ia ses a r e ju st t h a t , a n a me f or a n ot h er n a me. Wh en a r equ est comes in a n d t h e ser ver f in ds a CNAME r ecor d, it r epl a ces t h e n a me wit h t h e CNAME. It wil l t h en do a n ot h er l ooku p, f in d t h e a ddr ess, a n d r et u r n t h is t o t h e r equ est er .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 236 Mail Exchange Records (MX) On e of t h e l a r gest

u ses of t h e In t er n et is ema il , a n d DNS pl a ys a ma jor r ol e in t h is a s wel l . It does n ot sen d or r eceive ma il , bu t it does pr ovide in f or ma t ion on t h e ma il ser ver s f or a given n a me. In t h e da t a ba se is a r esou r ce r ecor d of MX. DNS u ses t h is sin gl e t ype of r esou r ce r ecor d f or ma il r ou t in g. It specif ies a ma il exch a n ger f or a doma in n a me. Th is ma il exch a n ger is a h ost t h a t wil l eit h er pr ocess t h e ma il or f or wa r d it on . Pr ocessin g is simpl y t h e t a sk of pr ovidin g f or del iver y t o t h e a ddr essee or pr ovidin g a pa t h t o a n ot h er ma il t r a n spor t . It ma y a l so f or wa r d t h e ma il t o it s f in a l dest in a t ion or pa ss it on t o a n ot h er ma il exch a n ger in cl oser pr oximit y of t h e r ecipien t u sin g SMTP (expl a in ed n ext ). An exa mpl e r ecor d is: en gin eer in g.n a u gl e.com.

IN

MX

5 ma il .n a u gl e.com.

Wh a t t h e pr ecedin g r ecor d st a t es is t h e ma il exch a n ger f or t h e doma in en gin eer in g.n a u gl e.com is ma il .n a u gl e.com. Th e n u mber (5, in t h is ca se) is a pr eceden ce va l u e. It ca n r a n ge f r om 0 t o 65535. If t h er e is on l y on e MX f or a doma in , t h is f iel d is u sel ess. For exa mpl e: en gin eer in g.n a u gl e.com. en gin eer in g.n a u gl e.com.

IN IN

MX MX

5 10

ma il 1.n a u gl e.com. ma il 2.n a u gl e.com.

Mail Exc hang e Re c o r ds (MX) en gin eer in g.n a u gl e.com. IN MX 5 ma il .n a u gl e.com. en gin eer in g.n a u gl e.com. IN MX 5 ma il 1.n a u gl e.com. en gin er in g.n a u gl e.com. IN MX 10 ma il 2.n a u gl e.com. A ma il pr ogr a m (su ch a s SMTP) sh ou l d u se t h e ma il exch a n ger wit h t h e l owest va l u e

f ir st . If t h is f a il s, t h e n ext on e a ssocia t ed wit h t h a t doma in is u sed. If t h er e a r e n o r ecor ds a ssocia t ed wit h a doma in or h ost , t h e ma il mu st be a bl e t o del iver t h e messa ge dir ect l y, a n d some ver sion s of ma il sen der s h a ve t h is ca pa bil it y. Th e most common ma il t r a n spor t ou t t h er e t oda y is ca l l ed sendmail.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 237 Playing with the Database Pl aying wit h t he Dat abase • n sl ooku p • Go t o Web sit e: ://ds/in t er n ic.n et /cool /dn s.h t ml • Use t h is t o see if a doma in n a me is a l r ea dy a ssign ed!!

Th er e is a pr ogr a m a va il a bl e (n ot

u su a l l y a va il a bl e on Win dows 95, bu t is on a l l Un ix syst ems) ca l l ed nslookup. Th is is a pr ogr a m t h a t t r a n smit s qu er ies t o a specif ied n a me ser ver . If you h a ve t h is pr ogr a m, you ca n u se it a n d a n ot h er n a me ser ver t o su ppl y in f or ma t ion t o you . n sl ooku p Wh ois a scen d.com Ascen d Commu n ica t ion s, In c. ASCEND-DOM 1275 Ha r bor Ba y Pkwy Al a meda , CA 94502 Doma in n a me: ASCEND.COM Admin ist r a t ive con t a ct , t ech n ica l con t a ct , z on e con t a ct : Roch on , Lyl e LR88 l r och on @ASCEND.COM (510) 769-6001 Recor d l a st u pda t ed on 10-Ju l -97. Recor d cr ea t ed on 05-Dec-90. Da t a ba se l a st u pda t ed on 3-Au g-97 04:39:20 EDT. Doma in ser ver s in l ist ed or der : DRAWBRIDGE.ASCEND.COM 198.4.92.1 NS.UU.NET

WHOIS Co mmand • En a bl es you t o get mor e in f or ma t ion on doma in n a mes, n et wor ks, et c., on t h e Web. • ://ds.in t er n ic.n et /cgi-bin /wh ois. • “wh ois a scen d.com” (wit h ou t t h e qu ot es). • Det a il s Ascen d.com doma in su ch a s: • Admin ist r a t ive con t a ct (wh o t o ca l l ) • Doma in ser ver s • Ca n det er min e IP a ddr ess bl ocks. • WHOIS n et 192.1 • BBN Cor por a t ion NETBLK-BBN-CNETBLK BBN-NCETBLK 192.1.0.0192.1.255.255

Let ’s sa y you wa n t ed t o f in d ou t wh o own ed t h e 192.1 Cl a ss C bl ock of a ddr esses. At t h e wh ois ser ver you wou l d t ype in who is ne t 192.1 a n d a l ist in g wou l d f ol l ow: BBN Cor por a t ion NETBLK-BBN-CNETBLK BBN-CNET BLK 192.1.0.0 - 192.1.255.255 Act u a l l y, t h er e wa s a l ot mor e in f or ma t ion l ist ed bu t it wa s t oo mu ch f or t h is pa ge. Tr y it you r sel f a n d see wh a t h a ppen s! You ca n u se t h e In t er NIC’s wh ois ser ver a s sh own pr eviou sl y or TELNET in t o t h eir ser ver by t ypin g Te l ne t who is.int e r nic .ne t . Af t er you h a ve a con n ect ion , t ype in t h e comma n d WHOIS a n d you sh ou l d get t h e WHOIS pr ompt . Fr om t h er e you ca n ch eck on per son (wh ois pe r obbin s), doma in (wh ois dom ba yn et wor ks.com), a n d n et wor k n u mber s (wh ois n et 192.32). Pr et t y cool st u f f a n d ver y, ver y open !

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 239 More DNS Information DNS is a va il a bl e t h r ou gh a pr ogr a m kn own a s BIND (Ber kel ey In t er n et

Na me Doma in , a n d n ot pr on ou n ced BIN-DEE). It is a va il a bl e on most Un ix a n d Win dows NT syst ems. It is cu st omiz a bl e t h r ou gh exa mpl e f il es t h a t a r e in cl u ded. Most impl emen t a t ion s simpl y set u p f or t h eir h ost s a n d poin t t o a n u pst r ea m r oot n a me ser ver f or r ef er en ce t o ot h er sit es on t h e In t er n et . BIND (DNS) sh ips wit h most ver sion s of Un ix, bu t if f or some r ea son it does n ot , you ca n down l oa d BIND f r om t h e f ol l owin g sit e: www.isc.or g Th is sit e a l so con t a in s in f or ma t ion on DHCP a n d Win dows NT por t of BIND (n ot su ppor t ed). Th er e a r e ma n y sit es a r ou n d t h e Web t o a ssist you (f or a sma l l ch a r ge) wit h DNS. DNS ca n be a da u n t in g t a sk, especia l l y f or l a r ge in st a l l a t ion s. You ma y wa n t t o con su l t h el p f or you r f ir st in st a l l . Ot h er wise, on ce you get t h e h a n g of it a n d r ea d a f ew books on DNS, you wil l see h ow simpl ist ic it is. On e of t h e best (a n d on l y) books a bou t t h is is DNS and BIND by Pa u l Al bit z a n d Cr icket Liu (O’Riel l y) ISBN 1-56592-236-0.

Mo r e DNS Inf o r mat io n • 2136 PS: P. Vixie, S. Th omson , Y. Rekh t er , J. Bou n d, “Dyn a mic Upda t es in t h e Doma in Na me Syst em (DNS UPDATE)”, 04/21/97 (26 pa ges). • 2137 PS: D. Ea st l a ke, “Secu r e Doma in Na me Syst em Dyn a mic Upda t e,” 04/21/97 (11 pa ges) (.t xt f or ma t ). • 1996 PS: P. Vixie, “A Mech a n ism f or Pr ompt Not if ica t ion of Zon e Ch a n ges (DNS NOTIFY),” 08/28/96 (7 pa ges) (.t xt f or ma t ). • 1995 PS: M. Oh t a , “In cr emen t a l Zon e Tr a n sf er in DNS”, 08/28/96 (8 pa ges) (.t xt f or ma t ). • www.isc.or g • DNS a n d BIND Book by Pa u l Al bit z a n d Cr icket Liu ISBN 1-56592-236-0

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 240 Simple Mail Transfer Protocol (SMTP) Simpl e Mail Tr ansf e r Pr o t o c o l (SMTP) • • • • •

Toda y kn own a s El ect r on ic Ma il , or ema il . RFCs 821, 822, 974. Ema il st il l ca n n ot t r a n spor t pa cka ges a n d ot h er it ems. Ema il is ver y f a st a n d gu a r a n t ees del iver y. Th r ee pr ot ocol s a r e u sed f or t oda y’s ema il : • SMTP—oper a t es over TCP • POP—oper a t es over TCP • DNS—oper a t es over UDP • SMTP a l l ows f or t h e sen din g/r eceivin g of ema il . • POP a l l ows u s t o in t er mit t en t l y r et r ieve ema il . • DNS ma kes it simpl e.

RFC 822 def in es t h e st r u ct u r e f or

t h e messa ge, a n d RFC 821 specif ies t h e pr ot ocol t h a t is u sed t o exch a n ge t h e ma il bet ween t wo n et wor k st a t ion s. It t r u l y is a ma z in g h ow ol d t h e or igin a l ma il pr ot ocol is, a n d it is st il l in u se t oda y. So we h a ve ema il t o sen d t o on e a n ot h er , compl et el y bypa ssin g t h e post a l syst em. Th er e a r e some wh o ca l l t h e post a l syst em “sn a il ma il .” Tr u e, if st a t ed wit h ou t emot ion ; ot h er wise, I ca l l t h ese peopl e wh o st a t e t h a t a r r oga n t . Ma n y peopl e t oda y st il l immen sel y en joy r eceivin g a h a n dwr it t en l et t er f r om a f a mil y member , f r ien d, or a bu sin ess cor r espon den ce t h r ou gh t h e post a l syst em. Su f f ice it t o sa y t h a t t h e post a l syst em wil l be h er e f or ma n y yea r s t o come. Al so, I h a ve t h e h a r dest t ime sen din g pa cka ges t h r ou gh t h e ema il syst em a n d some I do get t h r ou gh (a t t a ch men t s) get ba n ged u p a l on g t h e wa y. Yes, t h e post a l syst em is ol d a n d cr a n ky, bu t it wor ks, a n d in some ca ses bet t er t h a n ema il . Bu t t h is is a n el ect r on ic

discu ssion a n d I wil l keep it a t t h a t . Ema il does h a ve ma n y, ma n y a dva n t a ges a n d on e of t h e t op a dva n t a ges is speed. Th e biggest disa dva n t a ge: l a ck of emot ion . Like ever yt h in g el se, ema il h a s it s pl a ce, bu t it is n ot 100 per cen t of t h e pie; it is mer el y a n ot h er f or m of commu n ica t ion . In or der t o sen d a n d r eceive ma il bet ween u ser s, t h er e a r e a ct u a l l y t wo pr ot ocol s (possibl y t h r ee) t h a t a r e u sed: SMTP: Used f or t h e a ct u a l t r a n spor t of ma il bet ween t wo en t it ies (ma il ser ver s). POP (Po st Of f ic e Pr o t o c o l ): A pr ot ocol t h a t a l l ows sin gl e u ser s t o col l ect t h eir ma il on on e ser ver . DNS: Used t o iden t if y t h e ma il h ost s f or a doma in or h ost n a me. Ma il ca n be sen t a n d r eceived u sin g on l y SMTP, bu t t h e ot h er pr ot ocol in vol vemen t ma kes it mu ch ea sier t o u se a n d is mor e ef f icien t . Th is sect ion wil l con cen t r a t e on SMTP a n d POP. Th e h ooks in t o DNS wer e a l r ea dy expl a in ed in t h e Mail Exchanger sect ion of DNS a n d a r e sh own a ga in on sl ide 264. SMTP wa s cr ea t ed f ir st a n d t h en POP, so I wil l st a r t wit h t h e SMTP pr ot ocol . Th is is a pr ot ocol t h a t a l l ows u ser s t o t r a n smit messa ges (ma il ) bet ween ot h er u ser s. It is on e of t h e most widel y u sed a ppl ica t ion s of t h e TCP/IP pr ot ocol .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 241 SMTP Functions Th e pr ot ocol

is r el a t ivel y simpl e. A messa ge wil l be cr ea t ed, pr oper l y a ddr essed, a n d sen t f r om a l oca l a ppl ica t ion t o t h e SMTP a ppl ica t ion , wh ich wil l st or e t h e messa ge. Th e ser ver wil l t h en ch eck (a t per iodic in t er va l s) t o see if t h er e a r e a n y messa ges t o del iver . If t h er e a r e, t h e ma il ser ver wil l t r y t o del iver t h e messa ge. If t h e in t en ded r ecipien t is n ot a va il a bl e a t t h e t ime of del iver y, t h e ma il ser ver wil l t r y a ga in l a t er . Th e ma il ser ver wil l t r y a f ew t imes t o del iver t h e messa ge a n d, if it ca n n ot , wil l eit h er del et e t h e messa ge or r et u r n it t o t h e sen der . Th e a ddr ess h a s t h e gen er a l f or ma t of l oca l -pa r t @doma in -n a me. By t h is, you sh ou l d r ecogn iz e t h e doma in n a me f or ma t . For exa mpl e, a n a ddr ess a t t h e SMTP h ea der cou l d be ma t t @en gin eer in g.n a u gl e.com. Th is wou l d in dica t e t h a t t h e messa ge is a ddr essed t o a u ser n a med Ma t t in t h e doma in of en gin eer in g.n a u gl e.com. Wh en DNS is u sed t o l ook u p t h e ma il h a n dl er f or Ma t t , it wil l h a ve some sor t of en t r y l ike: en gin eer in g.n a u gl e.co IN NT1ma il _ser ver .en gin eer in g.n a u gl e.com.

MX

Fr om t h is, t h e n a me wil l be l ooked u p a n d t h e ma il wil l be del iver ed t o t h a t h ost . Th er e a r e t wo en t it ies t o t h is syst em, t h e sender SMTP a n d t h e receiver SMTP, t h a t a r e u sed t o t r a n spor t ma il bet ween t wo syst ems. Th e sen der SMTP wil l est a bl ish commu n ica t ion s wit h a r eceiver SMTP. At t a ch men t s a r e a l l owed wit h In t er n et ema il bu t n ot dir ect l y wit h t h e pr ot ocol u sed in SMTP (sen dma il pr ot ocol ). Th e In t er n et ema il ma il er pr ogr a m

10

SMTP Func t io ns • A messa ge is cr ea t ed, pr oper l y a ddr essed, a n d t r a n smit t ed u sin g SMTP sen der , wh ich t r a n smit s it t o a n SMTP r eceiver , wh ich st or es t h e f il e. • Addr ess h a s t h e f or ma t of : • l oca l -pa r t @doma in -n a me • Exa mpl e: ma t t @n a u gl e.com • Ma il ser vice r ecor d in DNS: • n a u gl e.com IN MX 10 NT1ma il _ser ver .en g.n a u gl e.com • SMTP wa s set u p t o h a n dl e on l y t ext . • Ba sed on t h e h ist or y of t h e pr ot ocol • Ema il a ppl ica t ion s con ver t u sin g a va r iet y of pr ot ocol s l ike MIME (Mu l t ipu r pose In t er n et Ma il Ext en sion s).

SMTP (or mor e specif ic, sen dma il ) ca n on l y h a n dl e t ext . Th er ef or e, most ema il a ppl ica t ion s con ver t a n a t t a ch men t t o t ext bef or e sen din g. A common t ype is MIME (Mu l t ipu r pose In t er n et Ma il Ext en sion s, beyon d t h e scope of t h is book). At t h e r eceiver , t h e ema il a ppl ica t ion con ver t s t h e a t t a ch men t ba ck t o it s or igin a l f or ma t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 242 SMTP Flow Th e SMTP design is ba sed on t h e f ol l owin g model

of commu n ica t ion :

On ce you h a ve f il l ed ou t t h e h ea der a n d body sect ion of you r ma il messa ge, t h e sen der SMTP est a bl ish es t wo-wa y commu n ica t ion t o a r eceiver SMTP. Th e r eceiver SMTP ma y be eit h er t h e u l t ima t e dest in a t ion or a t r a n sien t st op on t h e wa y t o t h e f in a l dest in a t ion . Comma n ds a r e sen t t o t h e r eceiver by t h e sen der SMTP a n d SMTP r epl ies a r e sen t f r om t h e r eceiver SMTP t o t h e sen der SMTP in r espon se t o ea ch of t h e comma n ds. On ce t wo-wa y commu n ica t ion h a s been est a bl ish ed, a ser ies of comma n ds (of wh ich you ca n see oper a t e u sin g some ma il a ppl ica t ion s) a r e issu ed. Th e sen der SMTP wil l sen d a HELLO (HELO) comma n d iden t if yin g wh o it is u sin g it s doma in n a me t o t h e r eceiver . Th e r eceiver a ckn owl edges t h is wit h a r epl y u sin g it s doma in n a me. Next , t h e ser ver issu es a MAIL comma n d t o t h e r eceiver . In t h is wil l be t h e iden t if ica t ion of t h e per son (pl a ce, or t h in g) sen din g t h e ma il . Th e r eceiver a ckn owl edges t h is wit h a n OK. Th e sen der SMTP t h en sen ds a RCPT comma n d t o t h e r eceiver , u sin g t h e in t en ded r eceiver n a me a s a n a r gu men t . Ea ch r ecipien t in t h e l ist is sen t t o t h e r eceiver on e a t a t ime, a n d ea ch t ime t h e r eceiver a ckn owl edges wit h a n OK f or t h ose r ecipien t s t h a t it kn ows a bou t . For t h ose t h a t it does n ot kn ow a bou t (dif f er en t doma in n a me), it wil l sen d ba ck a dif f er en t r epl y t h a t it is f or wa r din g t h e messa ge on . For a n y in t en ded r ecipien t s r eceived f r om t h e SMTP sen der f or wh ich it h a s n o a ccou n t , t h e r eceiver wil l r epl y t o t h e sen der t h a t n o su ch u ser (s) exist s. Af t er t h e in t en ded r ecipien t s h a ve been ACK’d or NACK’d, t h e SMTP sen der sen ds t h e DATA comma n d a n d t h e SMTP r eceiver wil l OK t h is a n d in dica t e wh a t t h e en d of messa ge iden t if ier sh ou l d be. On ce t h is is r eceived (t h e en din g iden t if ier ), t h e SMTP r eceiver wil l r epl y wit h a n OK. Not ice t h a t a l l da t a is r eceived, t h e en din g iden t if ier is r eceived, a n d t h en a r epl y messa ge is sen t by t h e r eceiver .

SMTP Fl ow If ever yt h in g wen t oka y, t h e sen der en ds t h e con n ect ion wit h a QUIT comma n d. Th e SMTP r eceiver wil l r epl y in dica t in g t h a t t h e commu n ica t ion ch a n n el is cl osed. Th e min imu m comma n ds t h a t a r eceiver mu st su ppor t a r e HELO, MAIL, RCPT, DATA, RSET, NOOP, a n d QUIT. Depen din g on t h e ma il pr ogr a m t h a t you u se, t h e t r a n sa ct ion bet ween a r ecipien t a n d sen der of ma il h a s been t h e sa me sin ce RFC 821 wa s wr it t en . Th e in t er f a ce a l l ows you t o compl et e t h e ma il messa ge, f il l in g in t h e h ea der (a ddr esses a n d su bject ) a n d t h e body (t ext ) of t h e l et t er . Wh en you pr ess t h e Sen d bu t t on , t h e f ol l owin g t r a n sa ct ion t a kes pl a ce. Some ma il pr ogr a ms a ct u a l l y pl a ce t h e ma il comma n ds a n d st a t e n u mber s on displ a y wh il e t h e t r a n sa ct ion is t a kin g pl a ce. It sh ou l d be n ot ed h er e t h a t sen din g ma il is immedia t e. It ma y get qu eu ed f or a sma l l l en gt h of t ime on dif f er en t r ou t er s, a n d t r a n sien t ma il ser ver s, bu t n ot f or l on g. Th is is f or t h e t r a n spor t of ma il . Most el ect r on ic ma il t oda y is sen t via SMTP a n d wil l r eside on you r ma il ser ver h ost u n t il you r et r ieve it u sin g POP (discu ssed n ext ). Toda y, r et r ievin g you r ma il does n ot mea n t h a t you h a ve t o r u n t h e SMTP pr ot ocol . A ser ver h ost wil l a ccept ma il messa ges dir ect ed t o you on you r beh a l f . Th en you ca n sign on a n y t ime you wa n t a n d r et r ieve you r ma il .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 243 DNS Interaction for Mail Th e f ol l owin g sl ide sh ows t h e in t er a ct ion wit h DNS f or

t h e ma il ser vice.

A r ecor d kn own a s t h e MX r ecor d in DNS iden t if ies a ma il exch a n ger f or t h e pu r pose of iden t if yin g h ost s f or r ecipien t s. A ma il exch a n ger is a h ost t h a t wil l eit h er pr ocess or f or wa r d ma il f or t h e doma in n a me. Pr ocessin g mea n s t h a t t h e h ost wil l del iver it t h e h ost t o wh ich it is a ddr essed or h a n d it of f t o a n ot h er t r a n spor t , su ch a s UUCP or BITNET. For wa r din g mea n s t h a t t h e h ost wil l f or wa r d t h e messa ge on t o t h e f in a l dest in a t ion or t o a n ot h er ma il exch a n ger cl oser t o t h e dest in a t ion . Th er e ca n be mu l t ipl e en t r ies f or a ma il exch a n ger in a DNS. Ea ch MX en t r y wil l h a ve a pr eceden ce n u mber beside it a n d t h is sign a l s t h e sen der wh ich ma il h ost it sh ou l d t r y f ir st . If t h e pr eceden ce va l u e is equ a l a mon g MX r ecor ds, t h en t h e sen der wil l r a n doml y pick on e f r om t h e l ist . On ce t h e ma il sen der h a s su ccessf u l l y del iver ed t h e ma il t o on e of t h e MX h ost s, it s job is don e. It is t h e job of t h e MX h ost t o ma ke su r e it is f or wa r ded on t o it s f in a l dest in a t ion . If t h er e a r e n o MX r ecor ds f or a doma in n a me, it is u p t o t h e ma il er a pp a s t o wh a t h a ppen s n ext . Some wil l t r y t o del iver it t o t h e IP a ddr ess of t h e ma il dest in a t ion .

DNS In t er a ct ion f or Ma il

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 244 Post Office Protocol (POP) Th e or igin a l

ma il pr ogr a m RFC 821 (wh ich is t h e on e in u se t oda y) wa s set u p t o sen d messa ges dir ect l y t o a u ser l ogged in t o a t er min a l , a s wel l a s st or e t h ese messa ges t o a ma il box. Th e comma n ds a l l owed f or t h e r eceiver t o det er min e if t h e u ser wa s l ogged on t o a t er min a l (n ot a PC), if t h ey wer e a ccept in g messa ges, a n d if t h ey wer e n ot , is t h er e a ma il box t o del iver some ma il t o. Th er e wer e n o messa ge a t t a ch men t s a n d messa ges wer e sen t a n d r eceived in 7-bit ASCII (8t h bit wa s set t o 0); t h er ef or e, t h is wou l d n ot a l l ow f or bin a r y messa ges t o be sen t (i.e., n o a t t a ch men t s). In f a ct , t h e or igin a l messa ge wa s n ot t o exceed 1000 ch a r a ct er s (h owever , impl emen t a t ion s t h a t cou l d go beyon d t h is ba r r ier wer e st r on gl y en cou r a ged t o do so). So, t o oper a t e ma il , t h e h ost mu st be oper a t ion a l (a bl e t o r eceive) a l l t h e t ime. Toda y, t er min a l s do exist , bu t mor e common l y, per son a l compu t er s h a ve t a ken t h eir pl a ce. Th er ef or e, t h e f in a l r ecipien t wil l be t h e per son a l compu t er . Th e per son a l compu t er wil l h a ve bot h SMTP a n d POP. Even t h ou gh a per son a l compu t er wil l r et r ieve it s ma il via POP, it wil l st il l u se t h e SMTP f u n ct ion s t o sen d it s ma il . Sin ce SMTP expect s t o be a bl e t o del iver ma il immedia t el y, t h is wou l d mea n t h a t a l l u ser s wou l d h a ve t o h a ve t h eir per son a l compu t er s on 100 per cen t of t h e t ime in or der t o a ccept ma il . Secon d, t o r eceive a n d r ea d you r ma il , you mu st l og on t o a specif ic h ost . To oper a t e a ma il ser ver gen er a l l y r equ ir es t h a t t h e ma il ser ver is a va il a bl e f or a ma jor it y of t h e t ime, h a s t h e a bil it y t o st or e ma n y ma il messa ges, a n d is a bl e t o f u l l y r u n SMTP a n d a ccept ma il f r om a n SMTP sen der . Wh il e t h is ma y h a ve been f ea sibl e f or sit u a t ion s l ike t er min a l -t o-h ost con n ect ivit y, it is n ot f ea sibl e f or sit u a t ion s t h a t we h a ve t oda y; n a mel y, per son a l compu t er s a n d mobil e wor ker s. SMTP is a ver y r obu st t r a n sa ct ion -or ien t ed pr ot ocol a n d r equ ir es t h e st a t emen t s pr eviou sl y discu ssed t o oper a t e f u l l y.

Po st Of f ic e Pr o t o c o l (POP) • SMTP is set u p t o sen d a n d r eceive ma il by h ost s t h a t a r e u p f u l l t ime. • No r u l es f or t h ose h ost s t h a t a r e in t er mit t en t on t h e LAN • POP emu l a t es you a s a h ost on t h e n et wor k. • It r eceives SMTP ma il f or you t o r et r ieve l a t er • POP a ccou n t s a r e set u p f or you by a n ISP or you r compa n y. • POP r et r ieves you r ma il a n d down l oa ds it t o you r per son a l compu t er wh en you sign on t o you r POP a ccou n t .

Wh a t we n eed is t h e a bil it y f or SMTP t o oper a t e (dr op of f t h e ma il , l ike a PO Box a t t h e post of f ice), a n d t h en a n ot h er pr ot ocol t o down l oa d t o ou r per son a l compu t er s (we dr op by t h e post of f ice a n d r et r ieve ou r ma il f r om t h e post of f ice box.). POP is t h e pr ot ocol t o a l l ow f or t h is. Ma il ca n be del iver ed t o a dr op-of f poin t a n d POP a l l ows u s t o l og in a n d r et r ieve ou r ma il . Wh en you sign u p wit h a n In t er n et Ser vice Pr ovider , a POP a ccou n t is a ssign ed t o you ; f or exa mpl e, mn a u gl [email protected]. You u se t h is wh en con f igu r in g you r ma il pr ogr a m. Al so, wh en sen din g ma il you mu st give t h e SMTP ser ver n a me t o t h e con f igu r a t ion pr ogr a m a s wel l . Th e pr ot ocol of POP3 is n ot u sed f or sen din g ma il .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 245 POP Operation POP3 sh ou l d be viewed on l y t o retrieve you r

ma il f r om t h e ma il dr op-of f poin t . Sending ma il is a dif f er en t st or y. You r per son a l compu t er st il l h a s t h e a bil it y t o est a bl ish a TCP con n ect ion t o a r el a y h ost (in t er media t e ma il h ost ) t o sen d ma il . Th er ef or e, you sh ou l d con sider you r h ost a s h a vin g t h e a bil it y t o be a n SMTP sen der , a n d t h e SMTP pr ot ocol expl a in ed ea r l ier a ppl ies. However , t o r et r ieve you r ma il , POP3 comes in t o pl a y. Th e cl ien t (you r PC wit h a ma il a ppl ica t ion su ch a s Eu dor a ), on ce est a bl ish ed wit h TCP/IP on it s n et wor k, bu il ds a con n ect ion t o t h e POP3 ser ver . Th e POP3 ser ver con f igu r a t ion is bu il t du r in g t h e in st a l l a t ion of you r ma il pr ogr a m on t h e PC. Th e con n ect ion bet ween you r PC a n d t h e POP3 ser ver is a TCP con n ect ion on TCP por t 110. Simil a r t o SMTP, on ce t h e con n ect ion is est a bl ish ed, t h e ser ver wil l r espon d wit h a gr eet in g l ike “POP3 ser ver r ea dy.” Th e POP3 pr ot ocol t h en en t er s t h e a u t h en t ica t ion st a t e. Du r in g t h is ph a se, you mu st iden t if y you r sel f wit h a u ser n a me a n d pa sswor d. Th e RFC does n ot in dica t e wh ich a u t h en t ica t ion mech a n ism you sh ou l d u se. Th e most common is t h e simpl e u ser n a me/pa sswor d combin a t ion . However , ot h er opt ion s a r e a va il a bl e, su ch a s Ker ber os a n d APOP, wh ich a r e beyon d t h e scope of t h is book. On ce you h a ve been “a u t h en t ica t ed,” t h e POP3 ser ver pu t s a n excl u sive l ock on you r ma il box, en su r in g t h a t n o ot h er t r a n sa ct ion s t a ke pl a ce on t h e messa ges wh il e you a r e r et r ievin g you r ma il . Th e ser ver n ow en t er s t h e t r a n sa ct ion st a t e in wh ich ea ch of t h e messa ges in you r ma il box is a ssign ed a n u mber . Th is a l l ows you r cl ien t POP t o in dica t e h ow ma n y messa ges a r e in you r ma il box. Ea ch messa ge ca n be r et r ieved on e a t a t ime or a l l ca n be r et r ieved. Fu r t h er mor e, you ca n in st r u ct you r cl ien t POP t o del et e messa ges a s t h ey a r e r et r ieved. Th is ca n be good a n d ba d. It wou l d be n ice t o h ol d on t o you r messa ges a s a ba cku p on t h e ser ver , bu t t h is r equ ir es disk spa ce t h a t ca n be depl et ed qu ickl y. Fr om h er e, you r et r ieve you r messa ges a n d, depen din g on h ow you con f igu r ed you PC ma il pr ogr a m, t h e messa ges a r e ma r ked f or del et ion a f t er you r session . Af t er you

r et r ieve you r messa ges, you r ma il pr ogr a m wil l sen d t h e QUIT comma n d, wh ich cl oses t h e POP3 session down . Th en t h e UPDATE pr ocess begin s on t h e ser ver , wh ich is h ou sekeepin g wor k on t h e ser ver (del et in g messa ges, et c.). Fr om h er e, you ca n r ea d you r messa ges l oca l l y on you r PC. You a r e n ow discon n ect ed f r om t h e POP3 ser ver a n d you ca n ma n ipu l a t e t h e messa ges l oca l l y. Th er e a r e ma n y ot h er opt ion s a va il a bl e f or POP3 wh ich ma y or ma y n ot be impl emen t ed; h owever , f r om a u ser s’ poin t of view, t h ey a r e n ot n ot iced.

POP Oper a t ion

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 246 SMTP, DNS, and POP Topology Th e f ol l owin g sl ide sh ows t h e r el a t ion sh ip bet ween SMTP, DNS, a n d POP. In t h is exa mpl e, ma il is sen t f r om you r PC t o Joe’s PC. In or der t o a ccompl ish t h is, t h e sen d ma il (SMTP) pr ogr a m is est a bl ish ed t o t h e SMTP ser ver on you r ISP. A DNS l ooku p is a ccompl ish ed u sin g t h e r oot DNS ser ver t o f in d t h e doma in of t h e in t en ded r ecipien t . A ca l l is ma de t o r ecipien t s DNS t o f in d t h e ma il ser ver (wh ich cou l d be t h e sa me ser ver a s t h e DNS). On ce t h e ma il ser ver is f ou n d (it s IP a ddr ess is f ou n d), ma il is sen t t o t h a t ser ver . Th e POP f u n ct ion del iver s it t o you r ma il box on t h a t ma il ser ver so t h a t wh en Joe’s PC r et r ieves ma il , you r ma il messa ge wil l be wa it in g.

SMTP, DNS, a n d POP Topol ogy

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Part Five IP Multicast Chapter 247 Introduction Wit h a ddr essin g, a s I h a ve men t ion ed bef or e, t h er e a r e t h r ee t ypes wit h IPv4: poin t -t opoin t (u n ica st ), poin t -t o-mu l t ipoin t (mu l t ica st ), a n d poin t -t o-a l l -mu l t ipoin t s (br oa dca st ). Bu t mu l t ica st a s it per t a in s t o IP is mu ch mor e t h a n a simpl e a ddr ess; it ’s wh a t en a bl es IP t o del iver mu l t imedia over a pa cket swit ch ed n et wor k wit h ver y l it t l e ba n dwidt h con su mpt ion (r el a t ive t o pu sh in g t h e da t a t o t h e sa me r ecipien t s u sin g u n ica st ). You wil l of t en h ea r t h e pseu do-t ech n ica l t er m push or pull t ech n ol ogy. Th is mea n s you h a ve t o go a n d get t h e in f or ma t ion of f t h e In t er n et (pu l l ), or t h e in f or ma t ion comes t o you (pu sh ). Th er e is a va st a r r a y of in f or ma t ion in t h e In t er n et a n d f in din g it ca n be a da u n t in g t a sk. Pu sh t ech n ol ogy mea n s t h a t in f or ma t ion is sen t t o you . An exa mpl e of t h is ca n be a n in f or ma t ion n ews ser vice t h a t r et r ieves in f or ma t ion on cer t a in su bject s t h r ou gh ou t t h e da y. A l ot of r ea der s h a ve pr oba bl y h ea r d of Poin t Ca st . Th is is a n exa mpl e of a pseu do-pu sh t ech n ol ogy t h a t wil l even t u a l l y be a f u l l -bl own pu sh t ech n ol ogy. Wh en ever in f or ma t ion ch a n ges on t h a t n ews ser ver , st or ies r el a t ed t o you r r equ est s a r e pu sh ed down t o you r wor kst a t ion , sa vin g you t h e t r ou bl e of f in din g a n d down l oa din g t h e in f or ma t ion . An ot h er excit in g evol u t ion is t h e a bil it y t o h a ve voice a n d video r u n over a n IP n et wor k. I kn ow, it ca n be a ccompl ish ed t oda y, bu t I a m n ot f on d of viewin g a 2" × 2" f u z z y scr een t h a t h a s in cr edibl e del a y a n d n on -l ip syn c a u dio. It is l ike wa t ch in g a n ol d Ja pa n ese movie t h a t h a s been con ver t ed t o En gl ish . Fr a me r ecept ion a t 5 f ps is n ot gr ea t . It is f u n t o exper imen t , bu t u n t il it a ppea r s l ike CATV (ca bl e TV), u ser s wil l n ot con sider it a s a ser iou s r equ ir emen t f or t h e LAN in f r a st r u ct u r e.

In t r odu ct ion An ot h er a dva n cemen t on t h e In t er n et is voice a n d video over IP. Repl ica t in g a sepa r a t e st r ea m of da t a f or ever y u ser r equ est t o a sin gl e video sou r ce wou l d ea sil y over l oa d t h e In t er n et . Th e a bil it y t o t r a n smit on e pa cket a n d h a ve it r epl ica t ed a t cer t a in poin t s a l on g t h e ma n y pa t h s t o sepa r a t e dest in a t ion s is a mu ch mor e ef f icien t syst em of dist r ibu t in g da t a , voice, a n d video. Mu l t ica st in g a l l ows t h is a s wel l .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 248 Multicast Components Th er e a r e f ou r

compon en t s t o a mu l t ica st n et wor k: mu l t ica st -en a bl ed h ost NIC, mu l t ica st -en a bl ed TCP/IP sof t wa r e, mu l t ica st -en a bl ed in f r a st r u ct u r e (r ou t er s, swit ch es, et c.), a n d mu l t ica st -en a bl ed a ppl ica t ion s. Do n ot con f u se t h e oper a t ion of IP mu l t ica st a s a st a n da l on e a ppl ica t ion . Th is oper a t es on t h e ver y sa me wor kst a t ion t h a t you a r e u sin g t oda y t o a ccess IP a ppl ica t ion s a n d/or t h e In t er n et . IP mu l t ica st pea cef u l l y coexist s wit h you r IP a ppl ica t ion s. IP mu l t ica st u su a l l y does n ot oper a t e a l on e; t h er e a r e ot h er pr ot ocol s t h a t a r e u sed in con ju n ct ion wit h it t o pr ovide f or VVD (voice, video, a n d da t a ) over IP. Su ch pr ot ocol s a r e Rea l Time Pr ot ocol (RTP) a n d t h e Rea l Time Con t r ol Pr ot ocol (RTCP), Rea l Time St r ea min g Pr ot ocol (RTSP), a n d Resou r ce Reser va t ion Pr ot ocol (RSVP). Simil a r t o t h is is IP. Th er e a r e ma n y compon en t s t o t h e TCP/IP n et wor k a n d IP is simpl y on e of t h e compon en t s. It pr ovides f or da t a gr a m del iver y. IP mu l t ica st is a l so a compon en t of ma n y. IP mu l t ica st is ba sed on a f ew pr ot ocol s, bu t it is a l l t h e ot h er n ecessa r y compon en t s t h a t r ea l l y ma ke it wor k. Ber kel ey Socket s f or Mu l t ica st pr ovides a n API set t h a t ea sil y en a bl es most Un ix h ost s t o become mu l t ica st r ea dy, a n d Micr osof t is su ppor t in g mu l t ica st in it s socket s in t er f a ce kn own a s Win Sock 2.0. Wit h t h e APIs in pl a ce, mu l t ica st a ppl ica t ion s ca n be bu il t .

Mu l t ica st Compon en t s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 249 Multicast Caveats Mul t ic ast Cave at s • Mu l t ica st is n ot simpl y a “t u r n it on a n d it wor ks” pr ot ocol . • Mu ch t h ou gh t mu st go in t o impl emen t in g a mu l t ica st n et wor k • Th er e a r e ma n y pr ot ocol s t h a t r u n wit h mu l t ica st . • Mu l t ica st r equ ir es a s mu ch t h ou gh t t o impl emen t a s OSPF. • Ma n y dif f er en t t ypes of pr ot ocol s ca n be impl emen t ed a n d some a r e st il l exper imen t a l • WAN n et wor ks a s wel l a s LANs mu st be con sider ed. • Fr a me r el a y is st il l on l y pa r t ia l l y mu l t ica st r ea dy • Th e In t er n et is n ot mu l t ica st r ea dy • Th er e is a l ea r n in g cu r ve wit h mu l t ica st .

Mu l t ica st

t r a n smission a n d r ecept ion ca n t a ke pl a ce a n ywh er e it is en a bl ed. Th er e a r e, h owever , a f ew obst r u ct ion s in t h e pa t h t o widespr ea d impl emen t a t ion of mu l t ica st : r ou t er s a n d swit ch es mu st be mu l t ica st r ea dy; t h e ba ckbon e of you r in t er n et mu st be mu l t ica st r ea dy; t h e WAN mu st be mu l t ica st r ea dy; a n d so on a n d so on . Add t o t h is t h e gen er a l l a ck of kn owl edge a n d a mpl e st u dies on t h e ef f ect s of mu l t ica st a n d you sh ou l d be a bl e t o see wh y impl emen t a t ion is sl ow. Th e Un ica st f or wa r din g In t er n et cu r r en t l y pl a ys a pa r t in mu l t ica st , bu t on l y a s a t r a n spor t bet ween mu l t ica st -en a bl ed n et wor ks. Tu n n el s ca n be bu il t a cr oss t h e In t er n et u sin g t h e l oose sou r ce r ou t in g f ea t u r e of IP. In t h is wa y, t wo “isl a n ds” of mu l t ica st ca n be con n ect ed t oget h er t o pr ovide con n ect ivit y. Ot h er wise, t h e In t er n et (a t t h e t ime of t h is wr it in g) is n ot mu l t ica st -en a bl ed a n d pr oba bl y won ’t be f or some yea r s t o come. Ma n y cor por a t e n et wor ks h a ve moved t o f r a me r el a y a s t h eir WAN pr ot ocol , wh ich con sist s of t h e cu st omer device (ca l l ed t h e CPE f or cu st omer pr emise equ ipmen t , u su a l l y a r ou t er ) a n d t h e f r a me r el a y pr ovider ’s equ ipmen t (f r a me r el a y swit ch es). Ma kin g t h e

f r a me r el a y cl ou d mu l t ica st r ea dy, h owever , is n ot t h a t ea sy. Th er e a r e ma n y st u dies a n d t est s t h a t h a ve t o be per f or med t o see h ow mu l t ica st r ea ct s t o a n exist in g n et wor k t h a t h a s ma n y cu st omer s a l r ea dy en a bl ed wh o expect 99.999 per cen t u pt ime. Th e f r a me r el a y pr ovider s wil l mu l t ica st -en a bl e t h eir WAN n et wor ks, bu t it ma y n ot h a ppen f or a wh il e. Cor por a t e n et wor ks a r e n ot mu l t ica st -en a bl ed eit h er . Th ese en vir on men t s h a ve ju st r edon e t h eir t opol ogies t o a l l ow f or ATM a n d LAN swit ch es t o be empl oyed a n d a r e n ow l ookin g a t mu l t ica st . Most cor por a t e en vir on men t s do n ot even r ea l iz e t h a t t h eir r ou t er s a r e mu l t ica st -r ea dy a n d bel ieve t h a t n ew equ ipmen t mu st be pu r ch a sed bef or e mu l t ica st is en a bl ed. Al l r ou t er s su ppor t t h e mu l t ica st pr ot ocol of IGMP. Most r ou t er s su ppor t t h e mu l t ica st r ou t in g pr a ct ice of DMVRP, PIM, a n d a f ew su ppor t MOSPF. Th ese wil l be discu ssed in det a il l a t er bu t su f f ice it t o sa y, t h ese a r e sof t wa r e f ea t u r es t h a t ca n be t u r n ed on , bu t ver y ca r ef u l l y. Mu l t ica st ma y be a n ext en sion of t h e IP pr ot ocol , bu t r ou t in g mu l t ica st pa cket s is a dif f er en t st or y.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 250 Unicast (versus Multicast) For

exa mpl e, l et ’s sa y t h a t t h e en d of t h e mon t h sa l es r epor t is compl et e a n d n eeds t o be t r a n smit t ed t o 200 f il e ser ver s a r ou n d t h e cou n t r y. Wit h u n ica st a ddr essin g, on e cou l d wr it e a simpl e scr ipt t h a t wou l d in it ia t e a f il e t r a n sf er t o ea ch of t h e 200 f il e ser ver s. If t h e f il e is 2 MB in l en gt h , you n ow h a ve a 400 MB f il e t r a n sf er t h a t wil l u n n ecessa r il y con su me bot h t ime a n d ba n dwidt h . En a bl in g mu l t ica st wou l d pu sh t h a t on e f il e t o t h e 200 f il e ser ver s simu l t a n eou sl y, r edu cin g t h e n u mber of f il e t r a n sf er s f r om 200 t o 1, a n d t h e siz e of t h e f il e f r om 400 MB t o 2 MB. On e exa mpl e in wh ich mu l t ica st f il e t r a n sf er is u sed ext en sivel y is sof t wa r e dist r ibu t ion . Micr osof t a n d ot h er a ppl ica t ion compa n ies u pgr a de t h eir sof t wa r e a t l ea st t wice a yea r —a da u n t in g t a sk in l a r ge en vir on men t s. If t h e u pgr a de is 20 MB a n d mu st be dist r ibu t ed t o 50,000 deskt ops, it wou l d r equ ir e 1000 bil l ion byt es t o be del iver ed. Assu min g t h e t r a n sf er occu r s a t 512,000 bit s per secon d, t h e u pgr a de wou l d t a ke 180 da ys t o compl et e. An d ju st wh en you compl et ed on e u pgr a de, t h e n ext on e is r ea dy. However , u sin g r el ia bl e mu l t ica st in g, t h e f il e cou l d be del iver ed t o 50,000 deskt ops a s a sin gl e st r ea m. Th is mea n s on e t r a n sf er l ooks l ike 50,000. Wit h mu l t ica st , t h e sa me t r a n smission wou l d compl et e in 5.2 h ou r s. (Th is n u mber a ssu mes n o r ea l -t ime er r or s su ch a s r et r a n smission s. Ret r a n smission cost s a r e va r ia bl e depen din g on t h e n u mber of cl ien t s r equ est in g, t h e st a t u s of t h e l in es, et c.) Even so, t h e wor st cost is l ess t h a n 25 per cen t of t h e or igin a l pa ss. Th e exa mpl e is t h eor y, bu t if pu t in t o pr a ct ice I bel ieve t h a t it wou l d be a r ou n d t h e n u mber in dica t ed. Even if it t ook 10 h ou r s t o compl et e, l ook a t t h e a l t er n a t ive.

Un ica st (Ver su s Mu l t ica st ) Th er ef or e, t h e a dva n t a ges t o mu l t ica st -en a bl ed a ppl ica t ion s a n d n et wor ks a r e t ime sa vin gs a n d sca l ea bl e ba n dwidt h .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 251 Multicast (versus Unicast) As n ot ed f r om t h e sl ide, mu l t ica st

is on e st r ea m of pa cket s t h a t is h ea r d by ma n y r eceiver s a l l u sin g t h e sa me IP mu l t ica st a ddr ess a s t h eir r eceivin g IP in t er f a ce. IP mu l t ica st pl a ces t h e bu r den of pa cket r epl ica t ion on t h e n et wor k via t h e IP mu l t ica st a ddr ess a n d r ou t er s t h a t a r e a bl e t o f or wa r d r eceived mu l t ica st pa cket s t o mor e t h a n on e por t .

Mu l t ica st (ver su s Un ica st )

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 252 Multicasting Type Th er e a r e t wo t ypes of da t a t r a n smission n or ma l l y a ssocia t ed wit h mu l t ica st in g: realtime a n d nonreal-time. Rea l -t ime t r a n smission is t h e a bil it y t o wor k wit h t h e in f or ma t ion wh il e it is bein g t r a n smit t ed. Two exa mpl es of t h is a r e video a n d voice t r a n smission s. Non r ea l -t ime t r a n smission is t h e a bil it y t o t r a n sf er t h e in f or ma t ion f or u se a t a l a t er t ime, dir ect l y a f t er t h e t r a n sf er or da ys l a t er . Exa mpl es in cl u de CBT f il es, kiosk, or a n y t ype of da t a f il e. Bot h t ypes of t r a n smission h a ve t h eir pu r poses in t h e mu l t ica st a r en a . However , n on r ea l -t ime t r a n s mission s a r e mor e a ppl ica bl e t oda y beca u se t h eir u se is n ot immedia t e. Mul t ic ast ing Type s • Two t ypes of da t a mu l t ica st in g: • Rea l -t ime a n d n on r ea l -t ime • Rea l -t ime t r a n sf er s a r e t h ose t h a t a r e u sed a s t h e t r a n sf er is occu r r in g. • Exa mpl es in cl u de voice a n d video su ch a s voice over IP, movies, video con f er en cin g, et c. • Non r ea l -t ime a r e t h ose t r a n sf er s t h a t a r e mu l t ica st bu t t h e da t a is u sed a t a l a t er t ime. • Kiosk, CBI, st or e-a n d-f or wa r d video

Rea l -t ime t r a n sf er s su ch a s video a n d voice a r e st il l in t h e exper imen t a l st a ge. Tr a n sf er r in g in f or ma t ion a cr oss a n et wor k t h a t is pa cket swit ch ed wit h ou t some ca pa bil it y f or pr ior it y is exper imen t a l . In some en vir on men t s, it wor ks r a t h er wel l (on a sin gl e su bn et ), bu t wh en t r a n spor t ed a cr oss a n in t er n et , t h e qu a l it y det er ior a t es a n d t h er ef or e t h e in t er est in t h e pr odu ct s wa n es. Th er e a r e pr ot ocol s t h a t a r e exper imen t a l (RSVP) t h a t sh ou l d a ssist r ea l -t ime mu l t ica st pr ot ocol s by pr ovidin g ba n dwidt h t o t h e a ppl ica t ion in st ea d of t o t h e n et wor k.

Some r ea l -t ime mu l t ica st t r a n sf er s u se a simpl ex a ppr oa ch t h a t ma kes it “r ea l n ea r ” r ea l -t ime—t h ey bu f f er t h e in comin g da t a f or a bou t 30 secon ds a n d st a r t t h e pl a y. Wh il e t h e in f or ma t ion is bein g u sed, t h e a ppl ica t ion con t in u es t o bu f f er t h e in comin g da t a f or pl a yba ck. Not per f ect , bu t it ’s bet t er t h a n n ot h in g.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 253 Addressing Type Review Addr e ssing Type Re vie w • IPv4 h a s t h r ee a ddr ess t ypes: • Un ica st : A on e-t o-on e IP t r a n sf er • Br oa dca st : A on e-t o-a l l IP t r a n sf er • Mu l t ica st : A on e-t o-ma n y-bu t -n ot -a l l t r a n sf er

Th e exa mpl e given in t h e pr ecedin g sect ion is simpl e, bu t

ver y r ea l . However , t h er e a r e ma n y a ppl ica t ion s t oda y t h a t r equ ir e a on e-t o-ma n y or ma n y-t o-ma n y t ype of t r a n smission a n d r ecept ion (e.g., a u dio a n d video, st ock t icker , wor kgr ou p a ppl ica t ion s, el ect r on ic wh it eboa r ds, et c.). Al l of t h ese a ppl ica t ion s ca n h a ve on e or mor e sen der s a n d on e or mor e r eceiver s. In IPv4, t h er e a r e t h r ee t ypes of a ddr esses: Unic ast : A u n iqu e a ddr ess t h a t a l l ows on e h ost t o r eceive a da t a gr a m. Br o adc ast : An a ddr ess t h a t a l l ows ever y h ost t o r eceive a da t a gr a m. Mul t ic ast : An a ddr ess t h a t a l l ows a specif ic gr ou p t o r eceive a da t a gr a m. Un ica st is t h e a bil it y t o u n iqu el y iden t if y a h ost on a su bn et or in t er n et . Th e t r a n smission a n d r ecept ion is a ccompl ish ed in a on e-t o-on e r el a t ion sh ip. A br oa dca st a ddr ess is exa ct l y t h a t : An a ddr ess t h a t is r eceived by ever y h ost on t h e su bn et . Rou t er s (wit h except ion s l ike DHCP a n d BOOTP) wil l n ot f or wa r d da t a gr a ms t h a t h a ve a l oca l br oa dca st a ddr ess. A mu l t ica st a ddr ess is on e t h a t a l l ows a specif ic gr ou p of h ost s t o r eceive a da t a gr a m, wh il e a l l ot h er s ign or e t h e da t a gr a m. For t h is con ver sa t ion , we wil l st a y wit h mu l t ica st in g a s it a ppl ies t o t h e IP pr ot ocol .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 254 Introduction to IP Multicast Accor din g t o RFC 1112, “Host

Ext en sion s f or IP Mu l t ica st in g,” t h e f ol l owin g is t h e

descr ipt ion of IP mu l t ica st in g: IP multicasting is the transmission of an IP datagram to a “host group,” a set of zero or more hosts identified by a single IP destination address. A multicast datagram is delivered to all members of its destination host group with the same “best-effort” reliability as regular unicast IP datagrams; i.e., the datagram is not guaranteed to arrive intact at all members of the destination group or in the same order relative to other datagrams. The membership of a host group is dynamic; that is, hosts may join and leave groups at any time. There is no restriction on the location or number of members in a host group. A host may be a member of more than one group at a time. A host need not be a member of a group to send datagrams to it. As you l ea r n mor e a bou t IP mu l t ica st in g, you wil l r ea l iz e, t h a t t h is pr ot ocol is simpl y a n ext en sion of t h e IP pr ot ocol it sel f . It does n ot r epl a ce t h e IP pr ot ocol a n d, in f a ct , it a dds a f ew f u n ct ion s t o t h e IP pr ot ocol t o a l l ow a h ost t o sen d a n d r eceive mu l t ica st da t a gr a ms. Th is is simil a r t o t h e wa y ICMP wor ks wit h IP. Int r o duc t io n t o IP Mul t ic ast • RFC 1112. • “IP mu l t ica st is t h e t r a n smission of a n IP da t a gr a m t o a ‘h ost gr ou p,’ a set of z er o or mor e h ost s iden t if ied by a sin gl e IP dest in a t ion a ddr ess.” • Member sh ip is dyn a mic; h ost s ma y join a n d l ea ve a t a n y t ime. • No r est r ict ion on t h e l oca t ion or t h e n u mber of member s in a gr ou p. • A h ost n eed n ot be a member of a gr ou p t o sen d da t a gr a ms t o it . • IP mu l t ica st is n ot a sepa r a t e pr ot ocol , bu t a n ext en sion of t h e IP pr ot ocol . • A h ost ca n pr ovide t h r ee l evel s of su ppor t : • No su ppor t , sen d on l y, a n d sen d/r eceive

Th er e a r e t h r ee l evel s a ssocia t ed wit h mu l t ica st : Le ve l 0: No su ppor t f or mu l t ica st . Le ve l 1: Th e a bil it y t o sen d mu l t ica st bu t n ot r eceive. Le ve l 2: Th e a bil it y t o bot h sen d a n d r eceive mu l t ica st pa cket s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 255 Extensions to the IP Service Interface Th e n or ma l

IP t r a n smission l ogic is a s simpl e a s:

If the IP destination is on the same local network, send the datagram locally directly to the destination. If not, send the datagram locally to a router. Sin ce mu l t ica st in g is n ot h in g mor e t h a n a n ext en sion of t h e IP pr ot ocol , t h e l ogic is simpl y expa n ded: If the IP destination is on the same local network or if it is a host group, send the datagram directly to the destination. If neither, send the datagram locally to a router. Not ice t h a t t h e mu l t ica st h ost does n ot specif ica l l y l ook f or a r ou t er , even t h ou gh member s of t h e h ost gr ou p ma y be mu l t ipl e h ops a wa y. Mu l t ica st da t a gr a ms a r e n ot a ddr essed t o a r ou t er , bu t mu l t ica st da t a gr a ms ca n be r ea ch ed t h r ou gh a n in t er n et —t h ey do n ot h a ve t o r ema in l oca l . Mu l t ica st da t a gr a ms t h a t spa n su bn et s r equ ir e r ou t er s a n d t h ese r ou t er s mu st be r u n n in g a specia l mu l t ica st in g pr ot ocol (a f ew of wh ich wil l be expl a in ed n ext . Wh en a h ost t r a n smit s a mu l t ica st pa cket , it simpl y t r a n smit s t h e pa cket ou t it s in t er f a ce u sin g t h e n or ma l IP da t a gr a m t r a n smission (sh own ). In t h is wa y, a l l t h e h ost s t h a t bel on g t o t h e sa me gr ou p on t h e l oca l n et wor k r eceive a n d pr ocess t h is da t a gr a m. If t h e TTL f iel d (kn own a s t h e scope ) is gr ea t er t h a n 1, t h e mu l t ica st r ou t er s r eceive a n d f or wa r d t h is pa cket ou t t h eir in t er f a ces t owa r ds a l l ot h er n et wor ks t h a t bel on g t o t h a t gr ou p. (How t h e r ou t er det er min es wh ich in t er f a ces bel on g t o t h a t gr ou p is discu ssed in t h e sect ion , “DVMRP.”) Th er ef or e, t h e r ou t er is a l so a member of t h e h ost gr ou p. Th e r eceivin g r ou t er decr emen t s t h e TTL a n d f or wa r ds t h e pa cket a s a l oca l mu l t ica st on it s n et wor ks t h a t a r e pa r t icipa t in g in t h a t gr ou p. In mu l t ica st in g, a r ou t er is con sider ed pa r t of t h e gr ou p a s wel l a s in dividu a l h ost s.

Ext e nsio ns t o t he IP Se r vic e Int e r f ac e • An a ddit ion t o t h e IP in t er f a ce f or sen din g da t a gr a ms is simpl y l ookin g t o see if t h e dest in a t ion is a h ost gr ou p. • If it is, t h en f or wa r d t h e da t a gr a m t o t h e h ost gr ou p in t er f a ces • Th e r ou t er is a member of t h e mu l t ica st gr ou p. • A r ou t er is simpl y a n ot h er mu l t ica st in t er f a ce (a h ost ). • Th e r ou t er is u sed t o simpl y ma ke a det er min a t ion if it sh ou l d f or wa r d t h e pa cket ba sed on t h e gr ou p a ddr ess a n d n ot t h e n et wor k a ddr ess. • A f iel d in t h e da t a gr a m pa cket det er min es h ow f a r t h e pa cket sh ou l d be f or wa r ded.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 256 Receiving Multicast Datagrams Re c e iving Mul t ic ast Dat ag r ams • Da t a gr a ms a r e r eceived l ike u n ica st da t a gr a ms wit h t h e except ion t h a t a h ost mu st “join ” a gr ou p bef or e it ca n r eceive mu l t ica st da t a gr a ms. • Th e IP Ser vice In t er f a ce wa s ext en ded t o in cl u de t wo n ew oper a t ion s: • Join Host Gr ou p (gr ou p-a ddr ess, in t er f a ce) • Lea veHost Gr ou p (gr ou p-a ddr ess, in t er f a ce) • Th e r eceiver mu st join ea ch mu l t ica st gr ou p f r om wh ich it wish es t o r eceive mu l t ica st da t a gr a ms. • Wh en t h e st a t ion n o l on ger wa n t s t o r eceive mu l t ica st da t a gr a ms f or a gr ou p, it issu es t h e Lea veHost Gr ou p.

Mu l t ica st

IP da t a gr a ms a r e r eceived u sin g t h e sa me Receive IP oper a t ion a s n or ma l , u n ica st da t a gr a ms. However , bef or e a n y da t a gr a ms dest in ed t o a pa r t icu l a r gr ou p ca n be r eceived, a n u pper -l a yer pr ot ocol (a n a ppl ica t ion ) mu st a sk t h e IP modu l e t o join t h a t gr ou p. Th u s, t h e IP ser vice in t er f a ce mu st be ext en ded t o pr ovide t wo n ew oper a t ion s: Join Host Gr ou p (gr ou p-a ddr ess, in t er f a ce) a n d Lea veHost Gr ou p (gr ou p-a ddr ess, in t er f a ce). Th e Join Host Gr ou p oper a t ion r equ est s t h a t t h is h ost become a member of t h e h ost gr ou p iden t if ied by “gr ou p-a ddr ess” on t h e given n et wor k in t er f a ce. Th e Lea veGr ou p oper a t ion r equ est s t h a t t h is h ost give u p it s member sh ip in t h e h ost gr ou p iden t if ied by “gr ou p-a ddr ess” on t h e given n et wor k in t er f a ce. Th e in t er f a ce specif ies a u n iqu e in t er f a ce f or t h ose IP h ost s h a vin g mor e t h a n on e in t er f a ce. If you h a ve mor e t h a n on e in t er f a ce, you ca n join t h e sa me gr ou p on ea ch of t h e in t er f a ces; h owever , t h is wil l a l l ow you t o r eceive du pl ica t e mu l t ica st da t a gr a ms. Mor e t h a n on e a ppl ica t ion ma y r equ est t o join t h e sa me gr ou p; t h e por t n u mber s wil l dif f er en t ia t e t h e a ppl ica t ion s.

Th e possibil it y exist s f or ea ch oper a t ion t o n ot wor k. Sin ce a n a ppl ica t ion ca n join a n y gr ou p, mu l t ipl e a ppl ica t ion s or on e a ppl ica t ion ma y join ma n y gr ou ps, wh ich ca n l ea d t o r esou r ce pr obl ems. Join Host Gr ou p ma y f a il du e t o l a ck of l oca l r esou r ces. A mu l t ica st member sh ip ma y per sist even a f t er a n a ppl ica t ion h a s r equ est ed t h e Lea veHost Gr ou p, du e t o t h e f a ct t h a t ot h er a ppl ica t ion s ma y be u sin g t h a t h ost gr ou p. Remember , a gr ou p is a r a n ge of h ost s t h a t ca n r eceive a n d t r a n smit IP da t a gr a ms u sin g a specif ic IP cl a ss D a ddr ess. A gr ou p of h ost s a l l u se t h e sa me (u n iqu e) cl a ss D a ddr ess t o in dica t e t h e gr ou p.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 257 Address Format We kn ow a l l

a bou t t h e a ddr ess f or ma t s of Cl a sses A, B, a n d C. Th e a ddr ess f or ma t t h a t a l l ows f or mu l t ica st a ddr ess is kn own a s t h e Cl a ss D a ddr ess. It is r eser ved by IANA a n d h a s a r a n ge of 224.0.0.0 t o 239.255.255.255. Th is a l l ows f or 228 bit s (gr ou ps) f or mu l t ica st a ddr essin g. Th e ba se a ddr ess, 224.0.0.0, is r eser ved a n d ca n n ot be a ssign ed t o a n y gr ou p. Fu r t h er mor e, IANA h a s r eser ved t h e r a n ge of 224.0.0.1 t h r ou gh 224.0.0.255 f or t h e u se of r ou t in g pr ot ocol s, t opol ogy discover y, a n d ma in t en a n ce pr ot ocol s. Wh a t is in t er est in g is t h a t n o r ou t er t h a t r eceives a da t a gr a m wit h t h is a ddr ess r a n ge is a l l owed t o f or wa r d it . It mu st eit h er con su me or disca r d (f il t er ) t h e da t a gr a m. Ot h er a ddr esses of in t er est a ccor din g t o RFC 1700 a r e: 224.0.0.0 224.0.0.1 224.0.0.2 224.0.0.3 224.0.0.4 224.0.0.5 224.0.0.6

Ba se Addr ess (Reser ved) Al l Syst ems on Th is Su bn et Al l Rou t er s on Th is Su bn et Un a ssign ed DVMRP OSPFIGP OSPFIGP

[RFC1112] [RFC1112]

Rou t er s OSPFIGP Al l Rou t er s OSPFIGP Design a t ed Rou t er s [RFC1190] [RFC1190] [RFC1723] [Cisco]

224.0.0.7 ST Rou t er s 224.0.0.8 ST Host s 224.0.0.9 RIP2 Rou t er s 224.0.0.10 IGRP Rou t er s 224.0.0.11 Mobil e-Agen t s 224.0.0.12 DHCP Ser ver / Rel a y Agen t [RFC1884] 224.0.0.12–224.0.0.255 Un a ssign ed [IANA]

[RFC1075] [RFC1583] [RFC1583]

Addr e ss Fo r mat • IP mu l t ica st a ddr esses a r e Cl a ss D a ddr esses. • Th ey r a n ge f r om 224.0.0.0 t h r ou gh 239.255.255.255. • Th e a ddr ess of 224.0.0.0 is r eser ved. • Th e a ddr ess r a n ge of 224.0.0.1 t h r ou gh 224.0.0.255 is r eser ved f or t h e u se of r ou t in g pr ot ocol s. • Not n ecessa r il y gen er ic mu l t ica st da t a gr a ms. OSPF u ses 224.0.0.5 a s a n Al l OSPFRou t er s mu l t ica st a ddr ess. • Th e r eser ved r a n ges a r e n ot a l l owed t o be f or wa r ded by a r ou t er . • It mu st eit h er con su me or disca r d t h e da t a gr a m.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 258 Mapping to an Ethernet or IEEE 802.X MAC Address Net wor k in t er f a ce ca r ds a r e n ot

in t er est ed in a n y t ype of La yer 3 a ddr essin g. NICs r eceive a n d t r a n smit da t a on t h e n et wor k u sin g MAC (Media Access Con t r ol ) or h a r dwa r e a ddr esses. Th er ef or e, some t ype of ma ppin g mu st be u sed t o ma p a n IP mu l t ica st a ddr ess t o a MAC a ddr ess. Bu t t h e NIC pl a ys a n impor t a n t r ol e in r eceivin g mu l t ica st pa cket s. Someh ow, t h er e h a s t o be a MAC a ddr ess f or mu l t ica st , a n d on e f or a l l mu l t ica st pa cket s is n ot ef f icien t . You sh ou l d n ot e t h a t u p t o 32 dif f er en t IP mu l t ica st gr ou ps ma y be con ver t ed t o t h e sa me MAC a ddr ess. Th e u pper 5 bit s of t h e IP a ddr ess a r e ign or ed. It l ooks l ike t h e u pper 9 bit s, bu t t h e f ir st f ou r bit s of a Cl a ss D a ddr ess a r e a l wa ys 1110 (wh ich con ver t s t o a 224 in decima l , t h e st a r t in g n u mber f or Cl a ss D a ddr esses), a n d sin ce 9 bit s a r e displ a ced in t h is pr ocedu r e, on l y t h e n ext 5 bit s a r e r ea l l y ign or ed. If you r ea d t h r ou gh RFC 1700 you wil l see t h a t most of t h e a ssign ed a ddr esses wil l n ot be a f f ect ed by t h is pr ocedu r e. Wh en u sed on a n Et h er n et or IEEE 802 n et wor k, t h e 23 l ow-or der bit s of t h e IP mu l t ica st a ddr ess a r e pl a ced in t h e l ow-or der 23 bit s of t h e Et h er n et or IEEE 802 n et mu l t ica st a ddr ess. Th e IANA h a s been a l l oca t ed a r eser ved bl ock of MAC l a yer a ddr esses. Th er ef or e, a mu l t ica st MAC a ddr ess a l wa ys begin s wit h 01-00-5E (h ex). For exa mpl e, r ef er t o t h e sl ide. Th e IP mu l t ica st a ddr ess 224.0.1.88 is ma pped in t o a MAC a ddr ess (con ver t ed t o h ex). Fir st , t h e IP a ddr ess mu st be con ver t ed t o h ex (it is u su a l l y wr it t en in dot t ed decima l n ot a t ion a s sh own ). Th e a ddr ess 224 is E0 in h ex, 0 is 00 in h ex, 1 is 01 in h ex, a n d 88 is 58 in h ex. However , on l y t h e l ow-or der 23 bit s a r e u sed. Th er ef or e, t h e IP a ddr ess of 224.0.1.88 con ver t ed t o a MAC a ddr ess is 01-00-5E-00-01-88.

Mapping t o an Et he r ne t o r IEEE 802 MAC Addr e ss Hex 01-00-5E-00-00-00 Binary 0 23 47 | | | 0000 0001 0000 0000 0101 1110 0xxx xxxx xxxx xxxx xxxx xxxx | | Multicast bit 0=Internet multicast 1 = Assigned by IANA for other uses

In or der f or t h e NIC ca r d t o r eceive or t r a n smit mu l t ica st pa cket s, t h e f ol l owin g f u n ct ion s mu st be in voked t o pl a ce t h e mu l t ica st a ddr ess in t h e NIC ca r d a n d t o r emove it . Jo inLo c al Gr o up (mappe d g r o up addr e ss): Al l ows t h e l in k l a yer t o r eceive mu l t ica st pa cket s f or a pa r t icu l a r h ost gr ou p. Le ave Lo c al Gr o up (mappe d g r o up addr e ss): Al l ows t h e l in k l a yer t o st op r eceivin g mu l t ica st pa cket s f or a pa r t icu l a r h ost gr ou p. Th e ma pped gr ou p a ddr ess is t h e MAC a ddr ess t h a t is ma pped f r om t h e h ost gr ou p mu l t ica st a ddr ess.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 259 A Converted IP Multicast Address Th e sl ide sh ows a n IP mu l t ica st

a ddr ess a n d it s MAC a ddr ess equ iva l en t .

A Con ver t ed IP Mu l t ica st Addr ess

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 260 Protocols Review RFC 1112. Na t u r a l l y, t h er e a r e a f ew pr ot ocol s in vol ved in or der

t o ma ke mu l t ica st in g wor k. We wil l st a r t ou t wit h t h e most pr eva l en t pr ot ocol s a n d t h en wor k ou r wa y in t o ot h er s. No ma t t er wh ich r ou t er -r ou t er pr ot ocol is u sed, on e pr ot ocol is u sed wit h a l l of t h em: t h e In t er n et Gr ou p Ma n a gemen t Pr ot ocol (IGMP). To su ppor t IGMP, a h ost mu st join t h e “a l l -h ost s” gr ou p (a ddr ess 224.0.0.1) on ea ch n et wor k in t er f a ce a t in it ia l iz a t ion t ime a n d mu st r ema in a member f or a s l on g a s t h e h ost is a ct ive. Th er ef or e, t h er e is a t l ea st on e mu l t ica st a ddr ess t h a t ever y mu l t ica st h ost sh ou l d be a member of . IGMP is t h e pr ot ocol t h a t r u n s bet ween mu l t ica st h ost s a n d t h eir a dja cen t mu l t ica st r ou t er s. (Rou t er ma n u f a ct u r er s ca n ch oose wh et h er t o impl emen t mu l t ica st or n ot . Rou t er s t h a t pa r t icipa t e in mu l t ica st mu st r u n a mu l t ica st pr ot ocol (beyon d RIP2, OSPF, et c.) Most ma jor r ou t er ma n u f a ct u r er s h a ve or a r e in t h e pr ocess of impl emen t in g t h ese pr ot ocol s.) IGMP is u sed t o keep n eigh bor in g mu l t ica st r ou t er s in f or med of t h e h ost gr ou p member sh ips pr esen t on a pa r t icu l a r l oca l n et wor k. Th e IGMP h ea der is u sed f or a l l mu l t ica st commu n ica t ion , wh et h er it is bet ween h ost s or r ou t er s. In or der f or a n in t er f a ce t o r eceive a mu l t ica st da t a gr a m, it mu st h a ve pr eviou sl y been set u p t o r eceive a n d pr ocess mu l t ica st da t a gr a ms. Sin ce IGMP does n ot u se a t r a n spor t l a yer su ch a s TCP or UDP, t h e IP Pr ot ocol f iel d is set t o 2 (a s r eser ved by IANA RFC 1700) in or der t o iden t if y t h e pr ocess (IGMP) u sin g t h e IP ser vice. Th er ef or e, bef or e a n y mu l t ica st pa cket s a r e r eceived, t h e u pper -l a yer sof t wa r e mu st en su r e t h a t IP a n d t h e MAC l a yer in t er f a ces a r e set u p t o r eceived mu l t ica st da t a gr a ms.

Pr o t o c o l s • IGMP is t h e f r a min g pr ot ocol u sed wit h a l l ot h er pr ot ocol s t o t r a n sf er in f or ma t ion . • IGMP r u n s bet ween h ost s a n d h ost s, h ost s a n d r ou t er s, a n d r ou t er s a n d r ou t er s. • Used t o a l l ow h ost s t o commu n ica t e wit h r ou t er s a n d f or r ou t er s t o commu n ica t e wit h ot h er r ou t er s • To su ppor t IGMP, a h ost mu st join t h e a l l -h ost s mu l t ica st a ddr ess of 224.0.0.1. • IGMP r u n s on a l l h ost s.

A h ost ma y be a member of mor e t h a n on e gr ou p; in f a ct , t h er e is n o u pper l imit on t h e n u mber of gr ou ps a l l owed (except f or t h e u pper l imit of t h e IP mu l t ica st a ddr ess). NICs h a ve a ver y l imit ed ca pa bil it y f or r eceivin g mu l t ica st pa cket s. In ot h er wor ds, wh en t h e u ser in st a l l s t h e ver sion of IP f or mu l t ica st , it mu st a l so be a bl e t o set u p t h e NIC t o r eceive mu l t ica st pa cket s a s wel l . Ea ch h ost gr ou p wil l h a ve a dif f er en t mu l t ica st a ddr ess a n d t h er ef or e it wil l be ma pped t o a mu l t ica st MAC a ddr ess a s wel l (discu ssed pr eviou sl y). Bu t t h e NIC ca r d ma y on l y be a bl e t o h ol d a f in it e n u mber of mu l t ica st a ddr esses. In t h is ca se, ch eck wit h t h e ma n u f a ct u r er . Some h a ve impl emen t ed t h e a bil it y t o r eceive a l l mu l t ica st pa cket s. In t h is wa y, it wil l be u p t o t h e IP l a yer sof t wa r e t o f il t er ou t u n wa n t ed pa cket s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 261 IGMP Header Th e IGMP r ou t er

pl a ces qu er ies t o it s su bn et s a n d t h e h ost s t h a t bel on g t o a gr ou p specif ied in t h e qu er y r espon se r epor t . Th e IGMP h ea der s f or ver sion 1 a n d ver sion 2 a r e sh own in t h e sl ide (you wil l f in d bot h t ypes on you r n et wor k). Th e Type f iel d ca n be on e of f ou r t ypes: 0x11: Member sh ip Qu er y 0x16: Ver sion 2 Member sh ip Repor t 0x17: Lea ve Gr ou p—f or IGMP ver sion 1 compa t ibil it y (expl a in ed l a t er in t h e sect ion ) 0x12: Ver sion 1 Member sh ip Repor t —f or ba ckwa r d compa t ibil it y IGMP ver sion 2 h a s a dif f er en t h ea der t h a n ver sion 1. Th e Ver sion a n d Type f iel ds of a ver sion 1 h ea der a r e combin ed in t o on e f iel d ca l l ed t h e Type f iel d. To a l l ow a mu l t ica st r ou t er t o det er min e t h e dif f er en ce bet ween t h e t wo, a n ew Type f iel d wa s cr ea t ed f or Ver sion 2—Member sh ip Repor t Messa ge. IGMP ver sion 1 a n d ver sion 2 r ou t er s ma y coexist . An IGMP ver sion 2 r ou t er mu st be a bl e t o a ct a s a ver sion 1 IGMP r ou t er . To det er min e t h is, t h e Ma x Respon se Time f iel d is set t o 0 in a l l qu er ies (t h is ma ps t o t h e u n u sed f iel d in ver sion 1). Th e member sh ip qu er y pa cket h a s t wo t ypes: Gen er a l Qu er y (u sed t o l ea r n gr ou p member s of a n y gr ou p on a n a t t a ch ed n et wor k) Gr ou p Specif ic Qu er y (u sed t o l ea r n member s of a specif ic gr ou p). How do you t el l t h e dif f er en ce bet ween t h e t wo? Th is is det er min ed by t h e gr ou p a ddr ess in t h e IGMP h ea der . A gen er a l qu er y u ses a l l 0s in t h e Gr ou p Addr ess f iel d a n d t h e specif ic qu er y u ses t h e exa ct gr ou p a ddr ess. Bot h of t h ese messa ges a r e sen t u sin g t h e IP h ea der a ddr ess 224.0.0.1 a n d a ma pped mu l t ica st MAC a ddr ess 01-00-5E-00-00-01 (r eview t h e con ver sion met h od, expl a in ed pr eviou sl y). Th e Lea ve Gr ou p messa ge is n ew t o IGMP ver sion 2. It a l l ows a r ou t er t o immedia t el y

det er min e if t h er e a r e a n y member s of a gr ou p l ef t on it s in t er f a ce t h a t r eceived t h e Lea ve Gr ou p messa ge. Th is is expl a in ed in a momen t .

IGMP Hea der

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 262 Router Functions of IGMP Mu l t ica st

r ou t er s u se IGMP t o l ea r n wh ich gr ou ps h a ve member s on ea ch of t h e r ou t er s’ in t er f a ces. Th is in f or ma t ion wil l in t u r n be u sed t o bu il d mu l t ica st t r ees f or f or wa r din g mu l t ica st da t a . It wil l a l so h a ve a t imer f or ea ch of t h ose gr ou p member sh ips. A r ou t er t h a t r u n s IGMP is a l so a member of a n y h ost gr ou p t h a t h a s member s on on e or mor e of it s in t er f a ces. Th e mu l t ica st r ou t er keeps a l ist of t h e member sh ips on it s in t er f a ces a n d n ot t h e in dividu a l h ost s t h a t bel on g t o t h a t gr ou p. Th er e r ea l l y is n o n eed t o keep t r a ck of t h e h ost s. Simpl e en ou gh : If on l y on e h ost on a r ou t er in t er f a ce wish es t o join a gr ou p, t h e r ou t er h a s t o f or wa r d mu l t ica st da t a gr a ms on t h a t in t er f a ce. It does n ot ma t t er if t h er e a r e 100 h ost s or 1 on t h a t in t er f a ce; t h e r ou t er mu st be a member of t h a t gr ou p a s wel l a n d f or wa r d mu l t ica st da t a gr a ms ou t t h a t in t er f a ce. Th e mu l t ica st r ou t er wil l kn ow if t h er e a r e a n y member s of a gr ou p l ef t on it s in t er f a ce by sen din g a qu er y pa cket ou t t h a t in t er f a ce. For IGMP ver sion 2, a mu l t ica st r ou t er ma y a ssu me on e of t wo r ol es: querier or nonquerier. Al l mu l t ica st r ou t er s, u pon in it ia l iz in g, a ssu me t h ey a r e t h e qu er ier r ou t er . Sin ce mu l t ica st r ou t er s per iodica l l y t r a n smit a qu er y t o f in d h ost s f or gr ou ps, t h e n ew r ou t er wil l even t u a l l y r eceive a qu er y if t h er e is a n ot h er r ou t er pr ovidin g t h is f u n ct ion . If t h e r ou t er r eceives a n ot h er qu er y messa ge f r om a n ot h er r ou t er a n d on l y if t h a t r ou t er h a s a l ower IP a ddr ess, t h e n ew r ou t er wil l a ssu me t h e r ol e a s a n on qu er ier . If t h e n ew r ou t er h a s a l ower IP a ddr ess, it wil l a ssu me t h e r ol e of qu er ier a n d t h e ot h er r ou t er wil l a ssu me t h e r ol e of n on qu er ier .

Rou t er Fu n ct ion s of IGMP Wh en a h ost r eceives a qu er y, it wil l set del a y t imer s f or ea ch gr ou p t o wh ich it bel on gs (set bet ween 0 a n d t h e t imer in dica t ed in t h e Ma x Respon se Time f iel d of t h e r eceived qu er y). For a h ost wit h mor e t h a n on e in t er f a ce, ea ch in t er f a ce ma in t a in s it s own

t imer s. Wh en t h e t ime is u p, t h e h ost r espon ds wit h a ver sion 2 Member sh ip Repor t . Th e TTL f iel d of t h e IP h ea der wil l be set t o 1. Th is en su r es t h a t t h e pa cket wil l n ot be f or wa r ded beyon d t h a t l oca l n et wor k on wh ich it wa s t r a n smit t ed. If t h e h ost r eceives a r epor t f r om a n ot h er h ost in t h e sa me gr ou p, t h e h ost wil l st op it s t imer a n d wil l n ot sen d a r epor t . Th is is t o con ser ve ba n dwidt h a n d pr ocessin g t ime, a n d a voids h a vin g du pl ica t e r epor t s on t h e n et wor k. Al l of t h is is a ccompl ish ed u sin g mu l t ica st a ddr essin g. 224.0.0.2 is t h e a l l -r ou t er s mu l t ica st a ddr ess a n d 224.0.0.1 is t h e a l l -h ost s a ddr ess. If t h e r ou t er r eceives a r epor t or r epor t s, it wil l a dd t h e gr ou p t o it s in t er n a l l ist , n ot in g t h e in t er f a ce on wh ich it r eceived t h e r epor t . It t h en set s a t imer f or t h e n ext qu er y messa ge. If it r eceives mor e r epor t s f or a gr ou p, t h en t h e t imer wil l be r eset t o t h e ma x va l u e a n d r est a r t ed. If n o r epor t s a r e r eceived bef or e t h is t imer expir es, t h en t h e r ou t er a ssu mes t h er e a r e n o member s f or t h a t gr ou p a n d it wil l n ot f or wa r d r emot el y r eceived mu l t ica st da t a gr a ms on t h e in t er f a ce.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 263 HostJoin Wh en a h ost

join s a mu l t ica st gr ou p, it immedia t el y t r a n smit s a ver sion 2 Member sh ip Repor t t wo or t h r ee t imes (r emember , IGMP does n ot u se ICMP or TCP). Th is is don e in ca se t h a t h ost is t h e f ir st member of t h e gr ou p a n d it is r epea t ed in ca se t h e f ir st r epor t get s l ost or cl obber ed. Wh en a h ost l ea ves a gr ou p (IGMPv2), it t r a n smit s a Lea ve Gr ou p messa ge. A h ost ma y or ma y n ot be a bl e t o det er min e if it is t h e l a st member of a gr ou p—t h is is a st or a ge a n d pr ocessin g decision on t h e pa r t of t h e impl emen t er . A h ost t h a t ca n det er min e if it is t h e l a st h ost in t h e gr ou p wil l t r a n smit t h e Lea ve Gr ou p messa ge. Ot h er impl emen t a t ion s t h a t ca n n ot det er min e t h is ma y or ma y n ot sen d t h is messa ge. Th e mu l t ica st r ou t er wil l det er min e if a n y h ost s exist f or a gr ou p by t h e qu er y messa ge a n ywa y. Wh en a mu l t ica st r ou t er r eceives t h is messa ge, it wil l sen d gr ou p-specif ic qu er ies t o t h e gr ou p bein g l ef t . If n o r epor t s a r e r eceived, t h en t h e mu l t ica st r ou t er wil l a ssu me t h er e a r e n o member s l ef t in t h a t gr ou p a n d it wil l n ot f or wa r d a n y mu l t ica st da t a gr a ms f or t h a t gr ou p ou t t h a t in t er f a ce. IGMPv2 is a pr el imin a r y dr a f t specif ica t ion a s of t h is wr it in g a n d ca n be f ou n d a t t h e In t er NIC (ds.in t er n ic.n et ) u n der Draft RFCs. It most l y con t a in s t h e a bil it y t o con ser ve ba n dwidt h by a l l owin g a h ost t o el ect t o r eceive t r a f f ic f r om specif ied sou r ces (IP a ddr esses) of a mu l t ica st gr ou p. Al t er n a t ivel y, it a l l ows a h ost t o specif y wh ich sou r ces it does n ot wa n t t o r eceive in f or ma t ion f r om. Wh a t is a sou r ce? It is simpl y a h ost t h a t or igin a t ed a mu l t ica st da t a gr a m. Th er e ma y be ma n y sou r ces in a n y on e gr ou p. Wit h IGMP ver sion s 1 a n d 2, a h ost is r equ ir ed t o r eceive a l l in f or ma t ion f or a gr ou p of wh ich it is a member , n o ma t t er wh ich sou r ce t r a n smit t ed it . Al so, t h e Lea ve Gr ou p messa ge is en h a n ced t o a l l ow a h ost t o specif y wh ich sou r ces it n o l on ger wish es t o r eceive in f or ma t ion f r om. Th e mu l t ica st r ou t er wil l r eceive t h is a n d possibl y st op sen din g in f or ma t ion t o t h a t gr ou p f r om t h a t sou r ce. Now t h a t we u n der st a n d h ow t h e h ost oper a t es wit h IP mu l t ica st a n d h ow a h ost in t er a ct s wit h a mu l t ica st r ou t er , we n eed t o l ea r n h ow mu l t ica st a ct u a l l y oper a t es.

Fir st , we wil l st u dy t h e a l gor it h ms a n d t h en we wil l t a ke a n in -dept h l ook a t on e mu l t ica st pr ot ocol : t h e Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol , or DVMRP. Th e dr a f t RFC u sed is ver sion 3 of DVMRP.

Host Join

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 264 Multicast Algorithms A l ot

of peopl e do n ot even r ea l iz e t h a t t h ey h a ve a l r ea dy wor ked wit h mu l t ica st in g. If you h a ve wor ked wit h t h e Spa n n in g Tr ee a l gor it h m f or br idgin g or t h e Open Sh or t est Pa t h Fir st (OSPF) pr ot ocol f or IP r ou t in g u pda t es, you h a ve a l r ea dy wor ked wit h a mu l t ica st a l gor it h m. IP mu l t ica st in g f or su bn et r ou t in g u ses t h e f ol l owin g pr ot ocol s: • Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol (DVMRP) • Mu l t ica st Open Sh or t est Pa t h Fir st (MOSPF) • Pr ot ocol In depen den t Mu l t ica st (PIM) • Spa r se mode • Den se mode

Th er e a r e essen t ia l l y t h r ee f or wa r din g a l gor it h ms t h a t ca n be u sed wit h IP mu l t ica st in g: • Fl oodin g • Spa n n in g Tr ee • Simpl e Spa n n in g Tr ee • Rever se Pa t h Br oa dca st in g • Rever se Pa t h Mu l t ica st in g (most widel y impl emen t ed) • Cor e-Ba sed Tr ees (Used in spa r se en vir on men t s [en vir on men t s t h a t do n ot h a ve a den sel y popu l a t ed en vir on men t of h ost s], CBT is a t ype of spa n n in g t r ee a l gor it h m bu t dif f er en t en ou gh t o mer it it s own ca t egor y). Th e pu r pose of a l l t h e a l gor it h ms is t o bu il d a mu l t ica st t r ee f or t h e f or wa r din g of mu l t ica st da t a gr a ms. Some a l gor it h ms (CBT a n d somet imes PIM-SM) bu il d on l y on e t r ee t h a t a l l member s of t h e gr ou p sh a r e, even if t h e t r ee does n ot su ppl y t h e most ef f icien t (sh or t est pa t h ) r ou t e bet ween a l l member s of t h e gr ou p. Ot h er pr ot ocol s bu il d sh or t est pa t h t r ees t h a t a l l ow f or t h e sh or t est pa t h f or a l l member s in t h e gr ou p (DVMRP,

OSPF). Th er e ca n a n d wil l be mu l t ipl e mu l t ica st t r ees bu il t f or ea ch sou r ce/gr ou p on a n et wor k. Th ese t r ees a r e bu il t dyn a mica l l y wh en t h e f ir st mu l t ica st da t a gr a m a r r ives f r om t h e sou r ce (wit h t h e except ion of MOSPF). Mul t ic ast Al g o r it hms • • • •

• • •



IP mu l t ica st pr ot ocol s. Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol (DVMRP) Mu l t ica st Open Sh or t est Pa t h Fir st (MOSPF) Pr ot ocol In depen den t Mu l t ica st (PIM) • Den se mode • Spa r se mode For wa r din g a l gor it h m. Fl oodin g. Spa n n in g t r ee. • Simpl e spa n n in g t r ee (on e mu l t ica st t r ee f or a l l gr ou ps) • Rever se pa t h f or wa r din g • Rever se pa t h mu l t ica st in g Cor e-ba sed t r ees.

Mu l t ica st da t a gr a ms do n ot n ecessa r il y f ol l ow t h e u n ica st da t a gr a m’s pa t h . Th e mu l t ica st t r ee t h a t is bu il t is a dyn a mic l ogica l t r ee t h a t a r ou t er wil l bu il d t o f or wa r d mu l t ica st da t a gr a ms t o it s r eceiver s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 265 Leaves, Branches, and the Root A f ew t er ms sh ou l d be expl a in ed bef or e we con t in u e. Th ose f a mil ia r

wit h spa n n in g t r ees a l r ea dy u n der st a n d a bou t l ea ves, br a n ch es, a n d t h e r oot . For t h ose wh o a r e n ot , r ea d on .

Ref er t o t h e sl ide. It sh ows t h e l ea ves, br a n ch es, a n d t h e r oot of a spa n n in g t r ee. Th e l ea ves a r e simpl y t h e en dpoin t s of t h e t r ee. If t h er e a r e n o ot h er f or wa r din g pa t h s beyon d a r ou t er pa t h , t h en t h e in t er f a ce is con sider ed a leaf in t er f a ce. If t h er e a r e mor e f or wa r din g pa t h s t o a h ost gr ou p, t h en t h e in t er f a ce is con sider ed a branch. Th e root is t h e sou r ce of t h e mu l t ica st t r a n smission . Th er e ca n be ma n y sou r ces f or a mu l t ica st n et wor k. Pict u r e a t r ee. A t r ee h a s a r oot , a t r u n k, br a n ch es, a n d l ea ves. Lea ves a r e t h e ou t er most pa r t of t h e t r ee; in f a ct , t h ey a r e en dpoin t s. Th e br a n ch es con t a in t h e l ea ves, bu t l ea ves ca n n ot con t a in br a n ch es. Th e r oot is t h e sou r ce of a l l l if e in t h e t r ee. Lose t h e r oot a n d t h e t r ee dies.

Lea ves, Br a n ch es, a n d t h e Root

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 266 Spanning Tree and Flooding Th e simpl est

a n d most in ef f icien t a l gor it h m f or IP mu l t ica st f or wa r din g is flooding. Essen t ia l l y, wh en a mu l t ica st r ou t er r eceives a mu l t ica st da t a gr a m, it wil l f ir st ch eck t o see if it h a s r eceived t h is ver y sa me da t a gr a m bef or e. If it h a s, it wil l disca r d t h e da t a gr a m. However , if it h a s n ot , t h e da t a gr a m wil l be f or wa r ded t o a l l in t er f a ces on t h e mu l t ica st r ou t er except f or t h e on e on wh ich t h e da t a gr a m wa s r eceived. You ca n see h ow simpl e t h is wou l d be t o impl emen t . Th er e a r e n ot ma n y r esou r ces r equ ir ed t o impl emen t t h is a l gor it h m. However , t h e f l oodin g a l gor it h m does n ot sca l e wel l . As you r n et wor k gr ows, t h e f l oodin g a l gor it h m becomes a r esou r ce h og a n d is ver y in ef f icien t . It gen er a t es a l a r ge n u mber of du pl ica t e pa cket s a n d it f or wa r ds ou t a l l t h e in t er f a ces t h a t it h a s con f igu r ed, even if t h er e a r e n o h ost s down st r ea m t h a t bel on g t o t h a t mu l t ica st gr ou p. Th e down st r ea m r ou t er s h a ve t o pr ocess t h e da t a gr a m a s wel l , a n d t h e r ou t er a l so h a s t o ma in t a in a t a bl e f or ea ch pa cket r ecen t l y r eceived (a t imer mech a n ism wou l d h a ve t o be est a bl ish ed t o cl ea n u p t h e t a bl e a s wel l ). Th er ef or e, t h e spa n n in g t r ee a l gor it h ms l ook mor e a ppea l in g. Th ey r equ ir e mor e l ogic in t h e mu l t ica st r ou t er s, bu t t h e t r a de-of f in ef f icien cy is wel l wor t h t h e pr ice. Th e f ir st a l gor it h m t h a t wa s in voked wa s a simpl e spa n n in g t r ee. It cr ea t ed on e spa n n in g t r ee ou t of t h e cu r r en t In t er n et t opol ogy. On ce t h e spa n n in g t r ee wa s bu il t , if a mu l t ica st r ou t er r eceived a mu l t ica st da t a gr a m, it wou l d f or wa r d t h e da t a gr a m ou t ea ch of it s spa n n in g t r ee in t er f a ces, except t h e on e on wh ich it r eceived t h e da t a gr a m. We h a ve el imin a t ed t h e l oops pr ovided f or u s in t h e simpl ex f l oodin g a l gor it h m a n d t h e r ou t er is n ot t a xed wit h ma in t a in in g t a bl es f or r ecen t l y f or wa r ded pa cket s (du pl ica t es). Al t h ou gh t h e spa n n in g t r ee a dds mor e ma in t en a n ce t r a f f ic on t h e n et wor k (t o ma in t a in t h e spa n n in g t r ee t opol ogy), a n d h a s mor e over h ea d pr ocessin g in t h e r ou t er , t h e ef f icien cies pr ovided a r e bet t er t h a n t h e f l oodin g a l gor it h m. Th is met h od h a s it dr a wba cks, h owever , in t h a t it ma y n ot pr ovide t h e best pa t h s t o a l l dest in a t ion s ba sed on t h e gr ou p a ddr ess a n d t h e sou r ce. It simpl y f or wa r ds mu l t ica st da t a gr a ms ou t it s spa n n in g t r ee in t er f a ces wit h ou t r ega r d t o gr ou p a ddr ess a n d t h e sou r ce a n d wh et h er t h er e a r e a n y r ecipien t s on a n y pa r t of t h e

spa n n in g t r ee. In ot h er wor ds, t h e compl et e spa n n in g t r ee sees a l l mu l t ica st s even if t h er e a r e n o member s.

Spa n n in g Tr ee a n d Fl oodin g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 267 Reverse Path Forwarding (RPF) Sin ce t h e spa n n in g t r ee wa s bet t er

bu t st il l n ot ef f icien t or sca l ea bl e, ma n y ot h er mu l t ica st pr ot ocol s wer e t est ed a n d exper imen t ed, bu t t h e pr ot ocol t h a t is u sed wit h mu l t ica st in g is Rever se Pa t h For wa r din g, or RPF. Th is a l gor it h m pr ovides a gr ou pspecif ic spa n n in g t r ee. Th a t is, f or ea ch gr ou p sou r ce (t h e h ost t h a t is or igin a t in g t h e mu l t ica st da t a gr a m), a sepa r a t e dist in ct spa n n in g t r ee is bu il t bet ween t h a t sou r ce a n d a l l t h e pot en t ia l h ost r ecipien t s. Th is a l gor it h m t h a t you a r e a bou t t o l ea r n ma y seem ba ckwa r ds, a n d in a wa y it is. We kn ow t h a t mu l t ica st in g is ba sed on a (sou r ce, gr ou p) pa ir . If a mu l t ica st da t a gr a m is r eceived on a r ou t er ’s in t er f a ce, t h e r ou t er t h en det er min es if t h e in t er f a ce t h a t t h e da t a gr a m wa s r eceived on is t h e sh or t est pa t h ba ck t o t h e sou r ce. Sou n ds l ike t h e opposit e of RIP? Wel l , it is. If t h e r ou t er det er min es t h a t t h e in t er f a ce does pr ovide t h e sh or t est pa t h ba ck t o t h e sou r ce, it f or wa r ds t h e r eceived da t a gr a m on ever y a ct ive in t er f a ce except t h e on e on wh ich it r eceived t h e da t a gr a m. Ot h er wise, t h e r ou t er det er min es t h a t t h e in t er f a ce does n ot pr ovide t h e sh or t est pa t h ba ck t o t h e sou r ce, a n d it disca r ds t h e da t a gr a m. Th e in t er f a ce det er min ed t o be t h e sh or t est pa t h ba ck t o t h e sou r ce is ca l l ed t h e parent link. Th e in t er f a ce on wh ich t h e r ou t er f or wa r ds t h e mu l t ica st da t a gr a m is ca l l ed t h e child link. Wh er e does t h e r ou t er get t h is in f or ma t ion t o a l l ow it t o ma ke a decision on wh a t is t h e sh or t est pa t h ba ck t h e sou r ce? Th e r ou t in g t a bl es of t h e r ou t er . If you a r e u sin g a l in k-st a t e r ou t in g u pda t e pr ot ocol su ch a s OSPF, ea ch r ou t er ma in t a in s a r ou t in g t a bl e f or wh ol e n et wor k, mu l t ica st or u n ica st . If you a r e u sin g a dist a n ce-vect or pr ot ocol su ch a s RIP or RIP2, a r ou t in g u pda t e is n eeded. We wil l expl a in it in f u r t h er det a il in ou r discu ssion of DVMRP. RPF con t a in s ma n y a dva n t a ges over t h e mech a n ism pr eviou sl y descr ibed. It is simpl e t o impl emen t . Mu l t ica st da t a gr a ms a r e f or wa r ded over mu l t ipl e l in ks sin ce RDF a l l ows f or bu il din g sepa r a t e spa n n in g t r ees f or ea ch sou r ce a n d gr ou p pa ir .

Rever se Pa t h For wa r din g (RPF)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 268 Pruning and Grafting (Definition) Some mu l t ica st

f or wa r din g a l gor it h ms, su ch a s DVMRP, br oa dca st (f l oods) t h e f ir st pa cket t h a t it r eceives a n d t h en wa it s f or Pr u n e messa ges f r om t h e down st r ea m in t er f a ces. Th e Pr u n e messa ges come ba ck f r om mu l t ica st r ou t er s in r espon se t o r eceivin g u n wa n t ed mu l t ica st t r a f f ic a t t h e l ea ves of t h e mu l t ica st t r ee; t h er ef or e, f in din g t h e l ea f n et wor ks f or a n y mu l t ica st t r ee is impor t a n t . Th ese r ou t er s t h a t con n ect t o l ea f n et wor ks st a r t t h e pruning pr ocess by iden t if yin g wh ich down st r ea m in t er f a ces do n ot bel on g t o t h e mu l t ica st gr ou p. Rou t er s t h a t iden t if y t h ese in t er f a ces pr u n e t h ose in t er f a ces. If a f t er pr u n in g it s own in t er f a ces, t h e r ou t er f in ds t h a t n on e of it s in t er f a ces bel on g t o t h a t gr ou p, it wil l sen d a Pr u n e messa ge u pst r ea m t o it s n eigh bor . If t h e r ou t er con t in u es t o r eceive mu l t ica st da t a gr a ms f or t h a t sou r ce, it wil l con t in u e t o sen d Pr u n e messa ges (in cr ea sin g t h e del t a bet ween t h em) u n t il t h e mu l t ica st t r a f f ic f or t h a t gr ou p st ops. A pr u n e l if et ime is a bou t t wo h ou r s. To join n ew r eceiver s ba ck on t o t h e t r ee, t h e Graft messa ge is sen t . Th is messa ge is sen t h op by h op t o ea ch mu l t ica st r ou t er . Ea ch messa ge is a ckn owl edged bet ween r ou t er s t o en su r e t h a t it wa s r eceived, t h er eby gu a r a n t eein g en d-t o-en d del iver y. Rou t er s t h a t r eceive Gr a f t messa ges ca n ma ke a ser ies of decision s. If t h e r eceivin g r ou t er h a s a pr u n e st a t e f or t h e (sou r ce, gr ou p) pa ir , t h en it a ckn owl edges t h e Gr a f t messa ge a n d sen ds a Gr a f t messa ge of it s own t o it s u pst r ea m r ou t er . If t h e r ou t er h a s some pr u n ed down st r ea m in t er f a ces bu t n ot a pr u n ed u pst r ea m in t er f a ce, it simpl y a dds t h a t in t er f a ce t o t h e l ist of down st r ea m in t er f a ces in it s r ou t in g t a bl e. It wil l a l so sen d a n a ckn owl edgmen t t o t h e sou r ce of t h e Gr a f t messa ge. If t h e r ou t er h a s n o st a t e (pr u n ed or ot h er wise) f or t h e (sou r ce, gr ou p) pa ir , t h en a n y r eceived da t a gr a ms f or t h e (sou r ce, gr ou p) pa ir sh ou l d be a u t oma t ica l l y f l ooded. A gr a f t a ckn owl edgmen t is sen t t o t h e sou r ce of t h e Gr a f t messa ge a s wel l .

Pr u n in g a n d Gr a f t in g (Def in it ion )

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 269 Reverse Path Multicasting (RPM) Th e a l gor it h m t h a t u ses pr u n in g a n d gr a f t in g is h ow RPM wa s devised. Act u a l l y, a f ew ot h er pr ot ocol s wer e devel oped, bu t RPM is u sed in ma n y mu l t ica st a l gor it h ms, especia l l y dist a n ce-vect or su ch a s Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol (DVMRP). RPM a l l ows u s t o t r im t h e t r ee so t h a t mu l t ica st da t a gr a ms a r r ive on t h ose br a n ch es a n d l ea f segmen t s t h a t h a ve a ct ive pa r t icipa n t s. Th e a l gor it h m ba sica l l y f or wa r ds t h e f ir st mu l t ica st pa cket of ever y (sou r ce, gr ou p) pa ir t o a l l pa r t icipa t in g r ou t er s in t h e spa n n in g t r ee (sou r ce, gr ou p). Th is a l gor it h m is a ssist ed by t h e IGMP pr ot ocol t o det er min e wh ich segmen t s h a ve a ct ive h ost gr ou ps. Usin g IGMP, mu l t ica st r ou t er s ca n det er min e t h e gr ou p member sh ips on ea ch l ea f su bn et wor k. In t h is wa y, a mu l t ica st r ou t er ca n det er min e wh et h er a n y of it s segmen t s h a ve a ct ive h ost gr ou ps. If a h ost gr ou p is n ot a ct ive, t h e r ou t er does n ot f or wa r d a mu l t ica st da t a gr a m ou t t h a t in t er f a ce—it is t r u n ca t ed. RPM a l l ows t h e r ou t er t o t r a n smit a Prune messa ge ba ck t h r ou gh t h e in t er f a ce on wh ich it r eceived t h e mu l t ica st da t a gr a m (it s pa r en t l in k) t h a t a l l ows it s u pst r ea m n eigh bor t o ba sica l l y sh u t of f t h a t in t er f a ce t o t h a t down st r ea m r ou t er —n o n eed t o f or wa r d mu l t ica st da t a gr a ms t o t h e r ou t er if it is on l y goin g t o t h r ow t h em a wa y. Pr u n e messa ges a r e on l y sen t on ce f or ea ch mu l t ica st pa cket t h e r ou t er does n ot h a ve a gr ou p in t er f a ce f or . If t h a t u pst r ea m r ou t er does n ot h a ve a n y l ea f n et wor ks f or a h ost gr ou p a n d ot h er br a n ch in t er f a ces a l l sen t ba ck a Pr u n e messa ge, t h en t h a t u pst r ea m r ou t er ma y sen d a Pr u n e messa ge t o it s u pst r ea m r ou t er (it s pa r en t l in k) a s wel l . Th e n ext u pst r ea m r ou t er wou l d t h en sh u t of f it s in t er f a ce t o t h a t down st r ea m r ou t er . You ca n pr u n e a l l t h e wa y ba ck t o t h e r oot . Th is ca sca din g of Pr u n e messa ges cr ea t es a t r u e spa n n in g t r ee t opol ogy t h a t wil l on l y f or wa r d mu l t ica st da t a gr a ms t o t h ose in t er f a ces t h a t h a ve a ct ive gr ou p h ost s. How do we gr ow ba ck a br a n ch or cr ea t e l ea ves? Per iodica l l y, t h e pr u n e in t er f a ces a r e r emoved f r om t h e r ou t er ’s t a bl e a n d t h e br a n ch es a n d l ea ves gr ow ba ck. Th is a l l ows t h e f or wa r din g of mu l t ica st da t a gr a ms down t h ose br a n ch es, r esu l t in g in a n ew st r ea m of Pr u n e messa ges t o cr ea t e t h e t r u e spa n n in g t r ee.

Th is a l gor it h m el imin a t es most pr obl ems except f or on e: sca l in g. It st il l does n ot a l l ow f or gr owin g t h e n et wor k t o t h ou sa n ds or t en s of t h ou sa n ds of r ou t er s wit h h u n dr eds or t h ou sa n ds of mu l t ica st gr ou ps. Th e f ir st mu l t ica st pa cket is r eceived by a l l r ou t er s, a n d t h en con st a n t pr u n in g messa ges a r e n eeded t o keep t h e spa n n in g t r ee ef f icien t .

Rever se Pa t h Mu l t ica st in g (RPM)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 270 Core-Based Tree (CBT) Th e pr eviou s a l gor it h ms bu il d spa n n in g t r ees ba sed on a sou r ce h ost , a n d mu l t ipl e t r ees ca n be bu il t f r om dif f er en t sou r ces. Th e sou r ce h ost is ba sica l l y t h e r oot of t h e spa n n in g t r ee a n d t h e spa n n in g t r ee br a n ch es ou t f r om t h e sou r ce. If t h er e a r e ma n y sou r ces, t h er e a r e ma n y r oot s. If t h er e a r e ma n y mu l t ica st s, ea ch h a s it s own mu l t ica st t r ee. CBT bu il ds a sin gl e f or wa r din g t r ee t h a t is sh a r ed by a l l member s of a gr ou p. Th e cor e of t h is t r ee (t h e r oot ) is ba sed on t h e cor e r ou t er a n d n ot t h e sou r ce of t h e mu l t ica st da t a gr a m. CBT wor ks on a con cept t h a t bu il ds a ba ckbon e con sist in g of a t l ea st on e cor e r ou t er . Mu l t ica st messa ges f or a gr ou p a r e t r a n smit t ed in t h is dir ect ion . An y h ost t h a t wish es t o r eceive mu l t ica st in f or ma t ion f or a specif ic gr ou p t r a n smit s a Join messa ge a n d t r a n smit s it t owa r ds t h e cor e ba ckbon e. Ea ch sou r ce mu st be con f igu r ed wit h a t l ea st on e IP a ddr ess of t h e cor e r ou t er s. Th e cor e con sist s of a t l ea st on e r ou t er t h a t a ct s a s t h e cor e. Th er e ca n be mu l t ipl e r ou t er s a ct in g a s cor e r ou t er s a n d, if so, t h e l in ks t h a t con n ect t h ese cor e r ou t er s become t h e cor e ba ckbon e. If t h er e a r e mu l t ipl e gr ou ps in t h e n et wor k, t h en mu l t ipl e t r ees ma y be bu il t . It is n ot t h e con cept of on e mu l t ica st t r ee f or a l l gr ou ps. However , t h er e is on l y on e mu l t ica st t r ee f or ea ch gr ou p. Af t er issu in g t h e Join messa ge, ea ch in t er media t e r ou t er ma r ks t h e in t er f a ce a n d mu l t ica st gr ou p a n d t h en f or wa r ds t h e messa ge t owa r ds t h e cor e. In doin g t h is, t h e r ou t er is a bl e t o f or wa r d mu l t ica st da t a t owa r ds t h e cor e f or t h a t gr ou p. Wh en t h e cor e r ou t er s r eceive t h is da t a , t h ey wil l mu l t ica st t h e da t a ba ck ou t a l l por t s, except t h e on e on wh ich it r eceived t h e da t a .

Cor e-Ba sed Tr ee (CBT) Th is a l gor it h m ma y simpl y st a y a n a r ch it ect u r e f or wh ich ot h er pr ot ocol s wil l be devel oped. To become a pr ot ocol , issu es of dyn a mic sel ect ion of t h e cor e ba ckbon e a n d ma n a gemen t mu st be set t l ed. Th e most n ot a bl e pr ot ocol u sin g it is t h e Pr ot ocol In depen den t Mu l t ica st (PIM) Spa r se Mode (discu ssed l a t er ). Th er e a r e a dva n t a ges a n d disa dva n t a ges of t h e a l gor it h m: Sin ce ea ch gr ou p is ba sed on a sin gl e t r ee r oot ed a t t h e cor e, st a t e in f or ma t ion on t h e r ou t er is ea sier t o ma in t a in , t h er eby r equ ir in g f ewer r esou r ces on t h e r ou t er . In f or ma t ion t h a t mu st be pa ssed bet ween r ou t er s t o ma in t a in t h ese st a t es is a l so l ess, r esu l t in g in bet t er ef f icien cy of t h e ba n dwidt h . However , sin ce a l l in dividu a l da t a a n d con t r ol messa ges t r a vel t owa r ds a specif ic cor e, con gest ion ma y be in evit a bl e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 271 Distance Vector Multicast Routing Protocol (DVMRP) Th e f ol l owin g t ext

a bou t t h e DVMRP r ou t in g pr ot ocol is a l ign ed wit h t h e DVMRP ver sion 3 specif ica t ion , wh ich a s of t h is wr it in g is st il l a dr a f t RFC. DVMRP u ses t h e Rever se Pa t h Mu l t ica st in g (RPM) a l gor it h m t o dyn a mica l l y bu il d mu l t ica st del iver y t r ees a n d det er min e t h e r ou t er ’s posit ion in t h e mu l t ica st t r ee in r ef er en ce t o t h e sou r ce su bn et of a mu l t ica st da t a gr a m. DMVRP is a “br oa dca st a n d pr u n e” mu l t ica st r ou t in g pr ot ocol . It u ses Rever se Pa t h For wa r din g t o see if a mu l t ica st da t a gr a m sh ou l d be f or wa r ded down st r ea m. A mu l t ica st f or wa r din g t r ee is bu il t bet ween a sou r ce a n d a l l member s of t h e gr ou p (r eceiver s). For t h ose f a mil ia r wit h t h is pr ot ocol , it sh ou l d be n ot ed u p f r on t t h a t t h e l a t est ver sion of t h is pr ot ocol f or Un ix, mr ou t ed 3.5, is a l so ba sed on RPM, wh ich is sign if ica n t l y dif f er en t f r om pr eviou s ver sion s in t h e a r ea s of pa cket f or ma t , t u n n el in g, a n d so f or t h . In or der f or DVMRP t o wor k, t wo t a bl es mu st be bu il t : a u n ica st r ou t e t a bl e a n d a f or wa r din g r ou t e t a bl e. Th e u n ica st r ou t e t a bl e is u sed t o det er min e if a mu l t ica st da t a gr a m wa s r eceived on t h e cor r ect por t (t h e u pst r ea m in t er f a ce). Th e f or wa r din g t a bl e is u sed t o det er min e on wh ich in t er f a ces of a r ou t er , a r ou t er sh ou l d f or wa r d a mu l t ica st da t a gr a m (t h e down st r ea m in t er f a ce). To bu il d t h e u n ica st r ou t in g t a bl e, DVMRPs pa ss r ou t e r epor t s t o ea ch ot h er con t a in in g en t r ies f or sou r ce su bn et s. Th is t a bl e is pr ocessed l ike RIP a n d t h e sh or t est dist a n ce ba ck t o a sou r ce is compu t ed a n d pl a ced in t h e t a bl e. Th e f or wa r din g t a bl e is bu il t by br oa dca st in g t h e f ir st mu l t ica st da t a gr a m r eceived a n d t h en wa it in g f or ot h er r ou t er s t o sen d ba ck Pr u n e a n d Gr a f t messa ges t o in dica t e wh o a n d wh o does n ot wa n t t h e da t a gr a m. Wh y n ot simpl y u se t h e u n ica st r ou t in g t a bl e? Th is is a ccompl ish ed t o a l l ow mu l t ica st t r a f f ic t o f ol l ow a dif f er en t pa t h t h a n t h e u n ica st t r a f f ic a n d f or t h e su ppor t of a t u n n el in t er f a ce, wh ich u n ica st t r a f f ic does n ot u n der st a n d. DVMRP r ou t er s su ppor t t wo t ypes of in t er f a ces: router a n d tunnel. Th e mu l t ica st r ou t er in t er f a ce is obviou s, bu t t h e t u n n el in t er f a ce is n ot so obviou s. To a l l ow f or n on mu l t ica st r ou t er s t o exist in a mu l t ica st n et wor k, t h e con cept of t u n n el s is u sed.

Mu l t ica st da t a gr a ms a r e en ca psu l a t ed in u n ica st IP pa cket s (u sin g IP in IP) a n d t h ese a r e sen d over t h e u n ica st r ou t er s. Con t a in ed in t h e IP h ea der is a r ou t e l ist t h a t t h e u n ica st r ou t er s sh ou l d u se. Th e l a st en t r y in t h is l ist is t h e en d of t h e t u n n el a n d is a r ou t er t h a t a ga in su ppor t s IP mu l t ica st . Th e l a st r ou t er st r ips of f t h e u n ica st in f or ma t ion a n d sen ds t h e da t a gr a m on . DVMRP is a pr ot ocol t h a t u ses a dist a n ce-vect or dist r ibu t ed r ou t in g a l gor it h m in or der f or ea ch r ou t er t o det er min e t h e dist a n ce f r om it sel f t o a n y IP mu l t ica st t r a f f ic sou r ce. Wh en DVMRP det er min es t h is, it cr ea t es IP mu l t ica st del iver y t r ees bet ween a sou r ce a n d it s dist r ibu t ed gr ou p h ost s. Dist anc e Ve c t o r Mul t ic ast Ro ut ing Pr o t o c o l (DVMRP) • DVMRP u ses t h e Rever se Pa t h Mu l t ica st in g (RPM). • Br oa dca st a n d Pr u n e. • DVMRP bu il ds t wo r ou t in g t a bl es: • Un ica st a n d f or wa r din g r ou t e t a bl es • Un ica st r ou t in g t a bl e is bu il t by pa ssin g r ou t e r epor t s. • Two t ypes of in t er f a ces su ppor t ed: • Rou t er a n d Tu n n el • Tu n n el s exist t o a l l ow mu l t ica st t o l ive in a n on mu l t ica st wor l d. • An IP mu l t ica st pa cket is wr a pped in a n IPv4 u n ica st pa cket

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 272 DVMRP and IGMP Th e f ol l owin g sl ide sh ows t h e compa r ison bet ween t h e mu l t ica st

r ou t in g pr ot ocol of DVMRP a n d t h e h ost member sh ip pr ot ocol IGMP. Th e pr ot ocol of IGMP r u n s bet ween t h e h ost s a n d t h e r ou t er s, a n d t h e DVMRP pr ot ocol r u n s bet ween t h e r ou t er s. However , it sh ou l d be n ot ed t h a t wit h IPv4, t h e en ca psu l a t ion of DVMRP da t a is a ccompl ish ed u sin g a n IP en ca psu l a t ion pr ot ocol of 2, wh ich is IGMP. If you pl a ce a pr ot ocol a n a l yz er on t h e n et wor k you wil l see DVMRP commu n ica t in g u sin g IP pr ot ocol t ype 2 f or IGMP en ca psu l a t ion . Th is does n ot mea n t h a t IGMP is r u n n in g bet ween r ou t er s; it is simpl y u sin g t h e IGMP en ca psu l a t ion t o sen d it s da t a .

DVMRP and IGMP

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 273 Neighbor Discovery A DVMRP r ou t er

ca n a n d does discover n eigh bor DVMRP r ou t er s t h r ou gh a pr ocess kn own a s Neigh bor Discover y u sin g t h e probe packet. Wh en a DVMRP r ou t er is in it ia l iz ed, it t r a n smit s t h ese discover y pa cket s t o in f or m ot h er DVMRP r ou t er s t h a t it is oper a t ion a l . Th ese messa ges a r e sen t per iodica l l y (ever y 10 secon ds) t o t h e Al l DVMRP Rou t er s mu l t ica st a ddr ess. Ea ch of t h e messa ges sh ou l d con t a in t h e l ist of n eigh bor DVMRP r ou t er s t h a t it kn ows a bou t on t h a t in t er f a ce. Ot h er r ou t er s on ot h er in t er f a ces a r e n ot in cl u ded in t h is l ist in g; t h is is l oca l on l y. Rou t er s sh ou l d see t h eir IP a ddr esses in t h eir n eigh bor s’ messa ges. Th e pr obe pa cket s a l l ow ot h er DVMRP r ou t er s t o discover ea ch ot h er a n d t o a l so det ect wh en a n eigh bor r ou t er n o l on ger exist s. If a DVMRP r ou t er does n ot det ect t h is messa ge f r om a n eigh bor wit h in 35 secon ds, it con sider s t h a t n eigh bor t o be down . Con t a in ed in t h is messa ge is a l ist in g of a l l ot h er DVMRP n eigh bor r ou t er s t h a t t h e r ou t er kn ows a bou t . If a r ou t er does n ot r eceive a n y Pr obe messa ges, it con sider s t h e su bn et t o be a l ea f n et wor k on l y.

Neigh bor Discover y

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 274 Route Reports Un ica st

r ou t in g in f or ma t ion is sen t bet ween n eigh bor s u sin g a specia l pa cket ca l l ed a route report. Con t a in ed in t h e r ou t e r epor t is a l ist in g of u n ica st (sou r ce) su bn et s a n d t h eir ma sks, a n d t h e met r ic (cost ) a ssocia t ed wit h ea ch su bn et . A r ou t e l ea r n ed t h r ou gh r ou t e r epor t s sh ou l d be r ef r esh ed wit h in 140 secon ds (2 × r epor t in t er va l + 20), a f t er wh ich it ca n be r epl a ced wit h t h e n ext best r ou t e t o t h e sa me sou r ce. If n o u pda t e a n d n o a l t er n a t ive r ou t e exist s a n d 200 secon ds h a ve pa ssed, t h e r ou t e is disca r ded f r om t h e r ou t in g t a bl e. A r ou t e r epor t is sen t ou t ever y 60 secon ds, a n d a n y n u mber of r ou t e r epor t s ca n be sen t a t a n y t ime du r in g t h is in t er va l . In t h is wa y, a r ou t er is n ot con su med by a per iodic u pda t e l ike RIP t h a t cou l d con sist of t h ou sa n ds of r ou t es. At a n y t ime du r in g t h is in t er va l , “f l a sh u pda t es” ca n be sen t . Th ese r epor t s in dica t e ch a n ges in t h e n et wor k bu t on l y con t a in t h e sou r ce su bn et t h a t ch a n ged. Th is r edu ces t h e l oop ch a n ges a n d ot h er ca t a st r oph es wh en pa t h s f or sou r ce n et wor ks ch a n ge.

Rou t e Repor t s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 275 Receiving a Route Report Receivin g a r ou t e r epor t

is a dif f er en t ma t t er . Th er e a r e ma n y ch ecks don e on t h e r eceived in f or ma t ion . Rou t e r epor t s a r e pr ocessed on l y by t h ose sen t by a kn own n eigh bor ; ot h er wise, t h ey a r e disca r ded. Gen er a l l y, t wo r u l es a r e f ol l owed: If t h e r ou t e en t r y is n ew a n d t h e met r ic is l ess t h a n in f in it y, t h e r ou t e is a dded. Th a t ’s t h e simpl e on e. Th e secon d r u l e is t ou gh er a n d is sh own in t h e t a bl e. If t h e r ou t e en t r y exist s, per f or m t h e f ol l owin g ch ecks: If New Met r ic < in f in it y AND New met r ic > exist in g met r ic If New Met r ic < in f in it y AND New met r ic < exist in g met r ic If New Met r ic < in f in it y AND New met r ic = exist in g met r ic If New Met r ic = in f in it y AND New ga t ewa y = exist in g ga t ewa y If New Met r ic = in f in it y AND New ga t ewa y n ot equ a l t o exist in g ga t ewa y If New met r ic is bet ween r ou t e in f in it y a n d 2x in f in it y

If t h e sa me n eigh bor is r epor t in g it , u pda t e t h e en t r y; ot h er wise, disca r d t h e en t r y. Upda t e t h e en t r y wit h t h e r ou t e a n d if n ecessa r y, u pda t e t h e r epor t in g n eigh bor . Ref r esh t h e r ou t e a n d if t h e n ew n eigh bor h a s a l ower IP a ddr ess, u pda t e t h a t en t r y. Rou t e is n ow u n r ea ch a bl e, u pda t e t h e en t r y. Ign or e

Neigh bor con sider s t h e r eceivin g r ou t er t o be u pst r ea m f or t h e in dica t ed a n d t h a t r ou t er is depen den t on t h e r eceivin g r ou t er f or t h e r ou t e in dica t ed. If t h e r eceivin g n eigh bor r ou t er con sider s t h a t r ou t er t o be down st r ea m, t h e r eceivin g r ou t er ma r ks t h a t n eigh bor a s depen den t f or t h a t r ou t e; ot h er wise, disca r d t h e pa cket , f or a depen den t r ou t er ca n n ot be con sider ed t o be u pst r ea m.

If t h e met r ic is gr ea t er t h a n 2x in f in it y

Ign or e

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 276 DVMRP Tables DVMRP Tabl e s • DVMRP r ou t e t a bl e con t a in s Sou r ce su bn et s a n d Fr om Ga t ewa ys. • Th is t a bl e con t a in s en t r ies u sed t o det er min e if a sou r ce’s mu l t ica st pa cket s wer e r eceived on t h e cor r ect in t er f a ce • For wa r din g t a bl e. • Used t o det er min e wh ich in t er f a ces a mu l t ica st pa cket sh ou l d be f or wa r ded on

Wh en a n IP mu l t ica st

da t a gr a m is r eceived by a r ou t er r u n n in g DVMRP, it f ir st l ooks u p t h e sou r ce n et wor k in it s DVMRP u n ica st r ou t in g t a bl e . Th a t ’s r igh t ! In or der t o en su r e t h a t a l l DVMRP r ou t er s h a ve a con sist en t view of t h e u n ica st pa t h ba ck t o a sou r ce, a u n ica st r ou t in g t a bl e is pr opa ga t ed t o a l l DVMRP r ou t er s a s a n in t egr a l pa r t of t h e pr ot ocol . Th is is a sepa r a t e u n ica st r ou t in g t a bl e f or DVMRP. Act u a l l y, t h er e a r e t wo t a bl es u sed in mu l t ica st r ou t in g: a routing t a bl e a n d a forwarding t a bl e. Th e DVMRP routing t a bl e con t a in s Sou r ce Su bn et s a n d Fr om Ga t ewa ys. It h a s t h e sh or t est pa t h sou r ce-r oot ed spa n n in g t r ee t o ever y pa r t icipa t in g sou r ce su bn et in t h e in t er n et . Compa r e t h is wit h en t r ies f r om a t ypica l IGP t a bl e su ch a s RIP, wh ich con t a in s Dest in a t ion s a n d Next -Hop Ga t ewa ys. Th e forwarding t a bl e is cr ea t ed beca u se t h e r ou t in g t a bl e is n ot a wa r e of gr ou p member sh ips. Th e f ol l owin g t a bl e sh ows a simpl e DVMRP r ou t in g t a bl e. So ur c e Subne t 150.1.0.0 150.2.0.0

Subne t Mask 255.255.0.0 255.255.0.0

A simpl e DVMRP r ou t in g t a bl e.

Fr o m Gat e way 150.1.1.1 150.1.2.1

Me t r ic 5 3

St at us UP UP

TTL 400 350

So ur c e subne t : Th e su bn et wor k t h a t con t a in s a h ost sou r ce. Subne t mask: Th e su bn et ma sk of t h e Sou r ce Su bn et . Fr o m-g at e way: Th e immedia t e u pst r ea m r ou t er t h a t l ea ds ba ck t o t h e sou r ce su bn et . Me t r ic : h ops (r ou t er s) t o t h e sou r ce su bn et . TTL (Time t o Live ): In dica t es h ow l on g t h e en t r y in t h e t a bl e st a ys bef or e bein g r emoved. So ur c e Subne t 150.1.0.0 150.2.0.0 224.0.2.5 300 3 5

Mul t ic ast Gr o up 224.0.1.1 224.0.1.2 500 1 3

TTL Upst r e am Po r t 430 1

Do wnst r e am Po r t s 2,3

A DVMRP f or wa r din g t a bl e. An y in t er f a ce t h a t is design a t ed a l ea f n et wor k, or a n y down st r ea m r ou t er s f or t h e sou r ce gr ou p wil l be in cl u ded in t h e down st r ea m por t s. Th e u pst r ea m por t is det er min ed by t h e u n ica st r ou t in g t a bl e in t h a t if t h is in t er f a ce h a s t h e sh or t est r ou t e ba ck t o t h e sou r ce su bn et of t h is gr ou p, it is r egist er ed a s t h e u pst r ea m in t er f a ce wit h t h a t por t design a t ion . Th e f or wa r din g t a bl e is cr ea t ed t o r epr esen t t h e l oca l r ou t er ’s u n der st a n din g of t h e sh or t est -pa t h sou r ce-r oot ed del iver y t r ee f or ea ch (sou r ce, gr ou p) pa ir .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 277 DVMRP Route Tables To bu il d a u n ica st

r ou t e t a bl e, t h e u pst r ea m DVMRP r ou t er is depen den t on ot h er down st r ea m r ou t er s f or in f or ma t ion . Th e in f or ma t ion t h a t is sen t t o ot h er DVMRP r ou t er s is ca l l ed a route report. Th e met r ics in t h e r ou t e r epor t s a r e t h e most impor t a n t f iel ds of t h e r epor t . Th is n ot on l y bu il ds t h e sou r ce su bn et wor k t a bl e (in dica t in g t h e sou r ce su bn et wor ks a n d t h eir r ea ch a bil it y), bu t a l so a l l ows f or t h e bu il din g of a f or wa r din g t a bl e t h a t in dica t es t o t h e r ou t er wh ich down st r ea m r ou t er s a r e depen din g on t h a t u pst r ea m r ou t er f or f or wa r din g mu l t ica st da t a gr a ms t o t h em. Upst r ea m r ou t er s sen d r ou t e r epor t s t o t h eir down st r ea m n eigh bor s in dica t in g sou r ce su bn et s a n d t h eir met r ics. Like RIP, t h e met r ic t o a sou r ce su bn et is t h e cu mu l a t ive cost of a l l t h e in comin g in t er f a ces so f a r . Th e r ou t e r epor t s wil l be sen t t o a DVMRP’s n eigh bor r ou t er . Con t a in ed in t h is l ist a r e sou r ce su bn et s a n d met r ics (in t h e r a n ge of 1–31). If a down st r ea m r ou t er wish es t o in dica t e t o a n u pst r ea m r ou t er t h a t it is depen den t on it f or r eceivin g mu l t ica st da t a gr a ms f or a pa r t icu l a r sou r ce su bn et , t h a t down st r ea m r ou t er wil l ech o t h e r ou t e ba ck t o t h e u pst r ea m n eigh bor wit h a met r ic h igh er t h a n 32. In f in it y f or DVMRP is con sider ed t o be 32. Th er ef or e, t h e down st r ea m n eigh bor wil l a dd 32 t o t h e in comin g met r ic a n d ech o t h is ba ck t o t h e u pst r ea m r ou t er . Th is r el ies on a t ech n iqu e kn own a s poison reverse. Wh en t h e u pst r ea m r ou t er r eceives t h is u pda t e, a n d sees t h e met r ic f or t h e sou r ce su bn et wor k in t h e r a n ge bet ween in f in it y t o t wice in f in it y, t h en t h e u pst r ea m r ou t er wil l a dd t h e down st r ea m r ou t er t o a l ist of depen den t r ou t er s f or t h a t sou r ce. Th e va l u e of in f in it y is 32 a n d in dica t es t h a t a sou r ce n et wor k is n ot r ea ch a bl e. Th e r a n ge of met r ics ma y be bet ween 1–63. Th e or igin a l met r ic of t h e sou r ce is 1–31, 32 mea n s n ot r ea ch a bl e, a n d 33–63 is t h e poison r ever se met r ic of a down st r ea m r ou t er t el l in g it s u pst r ea m r ou t er t h a t it wa n t s t o be a dded t o it s t a bl e f or mu l t ica st da t a gr a ms of a given sou r ce.

DVMRP Ro ut e Tabl e s • To bu il d a u n ica st r ou t e t a bl e, a DVMRP t a bl e is depen den t on ot h er down st r ea m r ou t er s or in f or ma t ion . • Met r ics a r e dif f er en t t h a n t h ose u sed by t ypica l t a bl es. • Rel ies on t h e pr ot ocol of poison r ever se. • Met r ics r a n ge f r om 1 t h r ou gh 63. • In f in it y is a r ou t e wit h a h op cou n t of 32. • 1–31 is t h e or igin a l met r ic of t h e sou r ce. • 32 is in f in it y. • 33–63 is t h e poison r ever se met r ic of a down st r ea m r ou t er t el l in g it s u pst r ea m r ou t er t h a t it wa n t s t o be a dded t o t h e down st r ea m t a bl e.

Wh y n ot ju st u se t h e exist in g u n ica st r ou t in g t a bl e l ike a RIP2 t a bl e? Th e r ea son is t h a t n ot a l l r ou t er s wil l be r u n n in g DVMRP a n d mu l t ica st r ou t er s mu st be a bl e t o in t er a ct wit h n on mu l t ica st r ou t er s. In or der t o a ccompl ish t h is, we mu st bu il d t u n n el s a cr oss n on mu l t ica st r ou t er s. Wit h t u n n el s, we ef f ect ivel y f or ce t h e pa t h t h a t t h e mu l t ica st da t a gr a m wil l t a ke. Th e t u n n el ma y t a ke on e r ou t e, bu t a r egu l a r u n ica st pa cket ma y t a ke a n ot h er r ou t e pa t h . Wit h t h is, a r ou t er ’s u n ica st t a bl e ma y n ot coin cide wit h a DVMRP r ou t er ’s u n ica st t a bl e. Th er ef or e, we u se t h e u n ica st in f or ma t ion in DVMRP excl u sivel y t o det er min e t h e sh or t est r ou t e ba ck t o t h e sou r ce su bn et of a mu l t ica st da t a gr a m.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 278 DVMRP Tunneling RFC 2003 descr ibes IP en ca psu l a t ion or

t u n n el in g. It is n ot n ecessa r y a n d ca n be t h e ca se ma n y t imes, t o h a ve a l l r ou t er s r u n n in g a mu l t ica st pr ot ocol . Th e qu est ion is, h ow do you get mu l t ica st da t a gr a ms t h r ou gh t h e In t er n et ? Most r ou t er s on t h e In t er n et a r e n ot r u n n in g a mu l t ica st pr ot ocol . Th e a n swer is tunneling. Wit h t u n n el in g, you bu il d “isl a n ds” of mu l t ica st a u t on omou s n et wor ks a n d t h ey commu n ica t e wit h on e a n ot h er over t h e In t er n et by t u n n el in g t h e mu l t ica st da t a gr a m over t h e In t er n et . DVMRP su ppor t s t h e a bil it y t o t u n n el a mu l t ica st da t a gr a m t h r ou gh n on mu l t ica st r ou t er s. Th e mu l t ica st da t a gr a m is en ca psu l a t ed in a u n ica st IP pa cket a n d a ddr essed t o t h e r ou t er s t h a t do su ppor t n a t ive mu l t ica st r ou t in g. In ot h er wor ds, we wr a p t h e mu l t ica st pa cket in a n IP h ea der a n d t el l it wh ich pa t h t o t a ke t o a dest in a t ion mu l t ica st r ou t er . To en ca psu l a t e a n IP da t a gr a m u sin g IP-in -IP en ca psu l a t ion , a n IP h ea der is in ser t ed bef or e t h e exist in g IP da t a gr a m h ea der . Th e sou r ce a n d dest in a t ion a ddr ess of t h e ou t er IP h ea der a r e descr ibed in t h e in pu t a n d ou t pu t of t h e t u n n el or t h e t u n n el en dpoin t s. Th e or igin a l IP h ea der con t a in s t h e IP sou r ce a n d dest in a t ion a ddr ess of t h e or igin a t or a n d f in a l dest in a t ion of t h e da t a gr a m.

DVMRP Tu n n el in g

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 279 IP-in-IP Packet Format Th e sl ide sh ows IP-in -IP pa cket

en ca psu l a t ion f or t u n n el in g.

IP-in -IP Pa cket For ma t

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 280 Protocol-Independent Multicast (PIM) DVMRP pr ovides gr ea t

mech a n isms f or mu l t ica st in g. Usin g t h e l a t est ver sion s of IGMP a n d DVMRP, a f u l l y f u n ct ion a l mu l t ica st t r ee ca n be dyn a mica l l y bu il t a n d u t il iz ed f or voice, video, a n d da t a . Th er e is, h owever , a disa dva n t a ge t o DVMRP: It does n ot sca l e wel l . DVMRP is a dist a n ce-vect or mu l t ica st r ou t in g u pda t e pr ot ocol . DVMRP br oa dca st s t h e f ir st mu l t ica st pa cket it r eceives f r om t h e sou r ce a n d t h en pr u n es t h e t r ee ba sed on f eedba ck f r om ot h er r ou t er s. DVMRP is kn own a s a dense mode mu l t ica st pr ot ocol , a n d is most ef f icien t wh en t h e cl ien t s a r e den sel y l oca t ed on t h e n et wor k. It does n ot sca l e wel l wh en t h e pr ot ocol is bein g u sed over WAN l in ks, or wh en t h er e a r e simpl y a f ew cl ien t s sca t t er ed t h r ou gh ou t t h e cu st omer ’s n et wor k. Th is br oa dca st a n d pr u n e mech a n ism, a l on g wit h mu l t ica st r ou t in g u pda t es, ca u ses u n n ecessa r y over h ea d over l ow-ba n dwidt h media t ypes. Fu r t h er mor e, DVMRP r ou t in g t a bl es a r e ba sed on a RIP-l ike u pda t e. DVMRP a l so r equ ir es t h e r ou t er s t o keep st a t e in f or ma t ion . Th is in cl u des gr ou p a n d sou r ce in f or ma t ion t h a t is u sed t o ca l cu l a t e a t r ee. If a l l t h e member s of a mu l t ica st gr ou p a r e l oca t ed in a ba n dwidt h -r ich r egion (su ppor t ed by h igh -speed LANs a n d n ot l ow-speed WANs), t h en it sh ou l d be su ppor t ed by a den se mode pr ot ocol su ch a s DVMRP, MOSPF, or PIM-Den se Mode (DM). Th is ca n be l imit in g in t h a t t h e scope of t h e gr ou p ca n n ot in cl u de a n y member s beyon d t h e scope of t h e doma in wit h ou t pl a cin g t h e u n n ecessa r y bu r den of Br oa dca st a n d Pr u n e messa ges a n d possibl y mu l t ica st r ou t in g u pda t es over t h e l in k t h a t in cl u des t h a t r emot e r eceiver .

Pr o t o c o l -Inde pe nde nt Mul t ic ast (PIM) • DVMRP is a good pr ot ocol , bu t it does n ot sca l e wel l . • Ext r a over h ea d wit h t h e RIP-l ike bu il t r ou t in g t a bl e. • Rou t e r epor t s • Br oa dca st a n d Pr u n e. • Kn own a s a den se-mode pr ot ocol . • In ef f icien t over l ess den sel y popu l a t ed n et wor ks • PIM of f er s t wo ver sion s: • Den se mode (simil a r t o DVMRP) • Spa r se mode

PIM of f er s t wo ver sion s f or mu l t ica st r ou t in g: dense mode a n d sparse mode.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 281 PIM—Dense Mode (PIM-DM) PIM–De nse Mo de (PIM-DM) • Simil a r t o DVMRP bu t does n ot bu il d it s own u n ica st r ou t in g t a bl e. • Less compl ex t h a n DVMRP. • Br oa dca st a n d Pr u n e. • It wil l con t in u e t o br oa dca st pa cket s u n t il Pr u n e messa ges a r e r eceived • Accept s du pl ica t e pa cket s in a t r a de of f f or ef f icien cy. • Assu mes a l l down st r ea m in t er f a ces wa n t t o r eceive a l l mu l t ica st pa cket s. • Th r ee mech a n isms u sed t o bu il d a mu l t ica st t r ee: • Pr u n e • Gr a f t • Lea f Net wor k det ect ion

Den se Mode is t h e ea siest

t o expl a in , especia l l y if you h a ve r ea d t h e pr eviou s sect ion on DVMRP. It f u n ct ion s simil a r t o DVMRP in t h a t it u ses RPM t o bu il d sou r ce-r ou t ed mu l t ica st t r ees. However , u n l ike DVMRP, PIM does n ot r el y on a in depen den t u n ica st r ou t in g pr ot ocol .

Wh en a mu l t ica st pa cket a r r ives on a PIM-DM in t er f a ce, it is f or wa r ded t o a l l in t er f a ces u n t il t h e br a n ch es a r e specif ica l l y pr u n ed. Un l ike DVMRP, PIM-DM wil l con t in u e t o f or wa r d mu l t ica st pa cket s u n t il specif ic Pr u n e messa ges a r e r eceived. No t a bl es a r e bu il d f r om t h ese pr u n e messa ges. DVMRP u ses a r ou t in g t a bl e t o det er min e if t h er e a r e down st r ea m r ou t er s t h a t wa n t t o r eceive t h e mu l t ica st da t a gr a ms f or a specif ic gr ou p. DVMRP, r el yin g on a r ou t in g t a bl e t h a t is sen t t o a l l mu l t ica st r ou t er s, is mor e sel ect ive wh en it f or wa r ds messa ges du r in g t h e con st r u ct ion of a sou r ce-r oot ed mu l t ica st t r ee. Th e r ea son in g beh in d t h is is t h a t simpl icit y a n d pr ot ocol in depen den ce a r e con sider ed a h igh er pr ior it y t h a n a ddit ion a l over h ea d ca u sed by pa cket du pl ica t ion . Bu il din g a u n ica st r ou t in g t a bl e vir t u a l l y el imin a t es du pl ica t e pa cket s. PIM-DM

a ccept s du pl ica t e pa cket s a s a n a l t er n a t ive t o n ot become depen den t on a u n ica st r ou t in g pr ot ocol , a n d t h er ef or e a voids bu il din g yet a n ot h er r ou t in g da t a ba se. PIM-DM a ssu mes t h a t a l l down st r ea m in t er f a ces wa n t t o r eceive mu l t ica st da t a gr a ms. PIM wa s a ct u a l l y bu il t f or spa r se-mode mu l t ica st n et wor ks a n d DM wa s a dded f or simpl e f u n ct ion a l it y. PIM-DM does n ot con t a in t h e con cept of r en dez vou s poin t s a n d t h er e a r e n o per iodic join s (h owever , t h e Join messa ge is st il l u sed). Th er e cu r r en t l y is a dr a f t RFC t o a l l ow f or “bor der r ou t er s,” wh ich a l l ow PIM a n d DVMRP in t er oper a bil it y. (Th e RFC ca n be f ou n d a t n et web.u sc.edu /pim/.) PIM-DM is l ess compl ex t h a n DVMRP. Th er e a r e t h r ee mech a n isms t h a t PIM-DM u ses t o bu il d a mu l t ica st t r ee: Pr u n e, Gr a f t , a n d Lea f n et wor k det ect ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 282 PIM—Dense Mode Operation Wh en a mu l t ica st

da t a gr a m is r eceived, it s in comin g in t er f a ce is l ooked u p in t h e u n ica st r ou t in g t a bl e; t h er ef or e, t h e r ou t er mu st be r u n n in g some t ype of u n ica st r ou t in g pr ot ocol (r emember t h e n a me, Protocol Independent Mu l t ica st ). If t h e r eceiver in t er f a ce is t h e on e on wh ich t h e r ou t er f or wa r ds u n ica st da t a gr a ms ba ck t o t h a t su bn et , t h e mu l t ica st da t a gr a m is a ccept ed a n d f or wa r ded t o a l l por t s except t h e in comin g in t er f a ce. If n ot , t h e da t a gr a m is simpl y disca r ded wit h ou t er r or messa ges bein g sen t (sil en t l y disca r ded). Fr om h er e, t h e r ou t er ch ecks f or a f or wa r din g st a t e f or t h e gr ou p a ddr ess. If t h er e is n ot a n en t r y f or t h e gr ou p a ddr ess, t h e r ou t er a dds on e. Th e r ou t er ch ecks t h e ou t goin g in t er f a ce l ist t o see wh et h er it sh ou l d f or wa r d t h e da t a gr a m. Th is l ist con t a in s a l ist in g of in t er f a ces f r om wh ich t h e r ou t er h a s h ea r d gr ou p member sh ip or PIM r ou t er messa ges. Th e PIM-DM r ou t er ’s messa ges ca n be Hel l o, Pr u n e, Join , or Gr a f t . If t h er e is a n a ct ive in t er f a ce(s), t h e r ou t er f or wa r ds t h e da t a gr a m ou t t h ose in t er f a ces. If n o in t er f a ces a r e in dica t ed, a Pr u n e messa ge is sen t . Th e in t en ded r eceiver r ou t er of t h a t Pr u n e messa ge wil l be pl a ced in t h e messa ge (n ot in t h e IP h ea der ). Th e down st r ea m r ou t er kn ows t h is a ddr ess by doin g a n RPF l ooku p in t h e u n ica st r ou t in g t a bl e. Wh en t h e r eceiver r ou t er r eceives t h is Pr u n e r equ est , it wil l sch edu l e a del et ion of t h a t LAN in t er f a ce f or t h a t gr ou p, wh ich mea n s it in ser t s a del a y bef or e del et ion . It is wa it in g t o see if a n y ot h er r ou t er s r espon d. Ot h er r ou t er s on t h e su bn et wil l a l so r eceive t h is Pr u n e messa ge a n d wil l in t u r n sen d a Join messa ge t o t h a t r ou t er , f or cin g it t o ca n cel t h e del et ion of t h e LAN in t er f a ce f or t h e (sou r ce, gr ou p) pa ir . Ju st beca u se on e r ou t er pr u n es doesn ’t mea n t h er e a r en ’t ot h er r ou t er s on t h a t sa me LAN t h a t wa n t t o con t in u e r eceivin g in f or ma t ion f or t h e gr ou p a ddr ess.

PIM—Den se Mode Oper a t ion No en t r ies in t h e ou t goin g l ist cou l d be a r esu l t of n o gr ou p member s on t h e in t er f a ce

a n d t h e r ou t er n ot r eceivin g a n y PIM-Hel l o messa ges f r om ot h er r ou t er s l oca t ed on t h a t su bn et (t h is a l l ows f or l ea f n et wor k det ect ion , in t h a t in a bsen ce of t h ese messa ges, on l y mu l t ica st h ost s r eside on a su bn et ). A r ou t er wil l keep t r a ck of t h e l ea f member s (l oca l -gr ou p da t a ba se bu il t by IGMP) a n d wil l a l so con t a in a l ist in g of r ou t er s a s wel l . Wh en a r ou t er is n ot h ea r d f r om wit h in a specif ied a mou n t of t ime, t h e r ou t er del et es t h a t r ou t er ’s en t r y f r om t h e l ist . Pr u n ed st a t es f or a n y mu l t ica st en t r y a r e even t u a l l y t imed ou t , f or cin g a l l mu l t ica st da t a gr a ms t o be f or wa r ded on a l l in t er f a ces a ga in , u n t il t h e mu l t ica st t r ees a r e pr u n ed.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 283 Adding Interfaces A r ou t er

ca n a dd in t er f a ces f or wh ich it r eceived a Gr a f t messa ge (r ejoin a br a n ch f or a gr ou p) or a n IGMP member sh ip r epor t . If t h e r ou t er a l r ea dy h a s st a t e in f or ma t ion a bou t a gr ou p (it h a s bu il t a n en t r y f or t h e gr ou p), it simpl y a dds or r ef r esh es t h e in t er f a ce en t r y on wh ich t h e IGMP messa ge or Gr a f t messa ge wa s r eceived. If t h e ou t goin g l ist en t r y is empt y, t h e r ou t er wil l sen d a Gr a f t messa ge u pst r ea m t owa r ds t h e sou r ce. An y r ou t er t h a t r eceives t h is messa ge wil l u se t h a t r eceived in t er f a ce a s t h e ou t goin g in t er f a ce f or t h e exist in g (sou r ce, gr ou p) pa ir . If t h e r ou t er h a s n o st a t e in f or ma t ion a t a l l f or t h e (sou r ce, gr ou p) pa ir , it wil l do n ot h in g, f or it kn ows t h a t PIM-DM r ou t er s wil l del iver a mu l t ica st da t a gr a m t o a l l in t er f a ces wh en cr ea t in g a st a t e f or t h e gr ou p. PIM-Gr a f t messa ges a r e posit ive a ckn owl edged. A PIM-Gr a f t messa ge is u n ica st t o t h e u pst r ea m r ou t er . Th e u pst r ea m r ou t er ch a n ges t h e Gr a f t messa ge in t o a Gr a f t ACK a n d sen ds it ba ck t o t h e or igin a t in g r ou t er . Adding Int e r f ac e s • Rou t er s a dd in t er f a ces by u sin g t h e Gr a f t messa ge. • Wh en a r ou t er r eceives a Gr a f t it wil l ma ke on e of t h e f ol l owin g decision s: • If t h e r ou t er a l r ea dy h a s in f or ma t ion a bou t t h e gr ou p, it simpl y a dds or r ef r esh es t h e in t er f a ce f or t h a t gr ou p. • If t h e ou t goin g l ist is empt y (bu t it kn ows a bou t t h e gr ou p) t h a t r ou t er wil l sen d a Gr a f t messa ge u pst r ea m. • If t h e r ou t er does n ot kn ow a bou t t h e gr ou p, it wil l do n ot h in g wit h t h e r eceived Gr a f t messa ge kn owin g t h a t mu l t ica st da t a gr a ms f or a n u n kn own gr ou p wil l a l wa ys be f or wa r ded a n d it wil l wa it f or t h ose f r a mes. • Gr a f t messa ges a r e a ckn owl edged by ea ch r ou t er t o t h e sou r ce of t h e Gr a f t messa ge.

• It is u n ica st t o u pst r ea m r ou t er s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 284 PIM—Sparse Mode (PIM-SM) PIM–Spar se Mo de (PIM-SM) • Used in spa r sel y popu l a t ed mu l t ica st n et wor ks. • Uses t h e con cept of a r en dez vou s poin t : • A pl a ces wh er e a l l sou r ces a n d dest in a t ion s meet ea ch ot h er • Rou t er s f in d RP f or a gr ou p a ddr ess a n d u n ica st da t a gr a ms t o t h e RP t o be r edist r ibu t ed. • Al l PIM r ou t er s f in d ea ch ot h er . • On e r ou t er is sel ect ed t h e Design a t ed Rou t er (DR) by IGMPv2. • Wh en a n ew n eigh bor is f ou n d, t h e RP a ddr ess is sen t t o it by it s DR. • Th e DR is a l so r espon sibl e f or sen din g Join /Pr u n e comma n ds f or it s l oca l r eceiver s a n d sou r ces.

PIM-SM wa s design ed t o r est r ict

mu l t ica st t r a f f ic on l y t o t h ose r ou t er s t h a t h a ve a n eed f or t h e mu l t ica st pa cket . In PIM-SM, a specif ic r ou t er (f or r edu n da n cy a n d sca l a bil it y, some PIM-SM impl emen t a t ion s a l l ow f or mor e t h a n on e r en dez vou s poin t , bu t t h a t is beyon d t h e scope of t h is book) is kn own a s t h e rendezvous point (RP). Sen der s a n d r eceiver s join a mu l t ica st gr ou p by r egist er in g a t t h e r en dez vou s r ou t er . Rou t er s f in d ou t t h eir RP (expl a in ed l a t er on sl ide 313) a n d t h en sen d r eceived mu l t ica st da t a gr a ms a s u n ica st da t a gr a ms t o t h e RP. Th e RP r ou t er r edist r ibu t es mu l t ica st da t a gr a ms ou t t h e gr ou p t r ees t h a t it h a s bu il t . A r en dez vou s poin t is simpl y a n IP a ddr ess of a sin gl e r ou t er a n d is u sed by sen der s t o a n n ou n ce t h emsel ves a n d f or r eceiver s t o f in d ou t a bou t n ew sen der s f or a gr ou p.

Al l r ou t er s r u n n in g PIM per iodica l l y (ever y 30 secon ds by def a u l t ) t r a n smit Hel l o messa ges t o ea ch ot h er , f or t h e pu r pose of discover in g ot h er PIM r ou t er s u sin g 224.0.0.13 (ALL_ PIM_ROUTERS gr ou p a ddr ess). Th is is l oca l mu l t ica st t h a t is in t h e r a n ge of n ot bein g a l l owed t o t r a ver se a r ou t er . Wh en a PIM r ou t er r eceives t h is messa ge, it st or es

t h e IP a ddr ess f or t h a t n eigh bor . Ea ch PIM r ou t er en t r y wil l h a ve it s own t imer f or r epea t Hel l o messa ges. Th is t ime is in cl u ded in t h e r eceived Hel l o messa ge a n d t h e r ou t er wil l n ot e t h is t ime in it s t a bl e (set t o 3.5 * Hel l o Per iod (30 secon ds) or def a u l t t o 105 secon ds). If t h e r ou t er does n ot per iodica l l y h ea r f r om t h e n eigh bor , it wil l t imeou t a n d del et e t h a t n eigh bor f r om t h e t a bl e. Wh en t h e DR (sel ect ed by IGMPv2) r eceives a n ew en t r y (a n ew r ou t er ), it u n ica st s it s most r ecen t RP a ddr ess in f or ma t ion t o t h e n ew n eigh bor . A r ou t er kn own a s t h e designated router (t h e DR, u su a l l y a n IGMPv2 f u n ct ion ) is r espon sibl e f or sen din g Join /Pr u n e comma n ds t o t h e RP on beh a l f of it s l oca l r eceiver s a n d sou r ces. Th e ch oice of t h e DR is n ot ba sed on t h e IGMP qu er ier , n or is it ba sed on t h e l on g-t er m, l a st -h op r ou t er f or t h e gr ou p. Th e r ou t er wit h t h e h igh est IP a ddr ess wit h in a l l t h e r eceived Hel l o messa ges is el ect ed DR. Th e l a st -h op r ou t er is t h e l a st r ou t er t o r eceive mu l t ica st messa ges bef or e t h ey a r e del iver ed t o t h e l oca l r eceiver s. If t h is is t h e ca se, t h en t h is r ou t er wil l be t h e DR.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 285 Types of Multicast Trees Using PIM-SM Mu l t ica st

t r ees a r e st il l bu il t u sin g PIM, bu t t h er e a r e t wo t ypes:

Shar e d Tr e e (Re nde zvo us Po int (RP) r o o t e d t r e e s): In dica t ed by a (*,G) in t h e r ou t in g t a bl e, wh ich in dica t es a sh a r ed t r ee f or t h e mu l t ica st Gr ou p G. So ur c e -Ro o t e d Tr e e (o r SRT t r e e ): In dica t ed by a (S,G) in t h e r ou t in g t a bl e. A sou r ce-r oot ed t r ee h a s been bu il t f or t h e mu l t ica st Gr ou p G a n d is sou r ced by t h e IP a ddr ess(es). Like a l l ot h er mu l t ica st r ou t in g pr ot ocol s, PIM con veys it s messa ges in IGMP h ea der da t a pa cket s. If a h ost (r eceiver ) wa n t s t o join a gr ou p, it wil l con vey it s member sh ip in f or ma t ion t h r ou gh IGMP. Wh en a PIM r ou t er r eceives t h is IGMP messa ge, t h e DR l ooks u p t h e a ssocia t ed RP. Th e DR cr ea t es a “wil dca r d” en t r y f or t h e gr ou p, wh ich is wr it t en a s (*,G). Th e DR cr ea t es a Join /Pr u n e messa ge (bot h Join a n d Pr u n e en t r ies a r e in cl u ded in t h e sa me messa ge). Th e f l owch a r t f or t h is pr ocess is sh own in t h e sl ide. PIM wor ks in con ju n ct ion wit h IGMP. For a given (sou r ce, gr ou p) a mu l t ica st t r ee is in it ia l l y bu il t a r ou n d t h e RP r ou t er . Th is in it ia l t r ee is ca l l ed a shared tree in t h a t a l l member s of t h e gr ou p con ver se u sin g t h is sin gl e sh a r ed t r ee (a l beit , it ma y n ot be t h e sh or t est pa t h bet ween a sou r ce a n d a h ost ). It is ea sy t o con st r u ct , r edu ces t h e a mou n t of over h ea d in t h e r ou t er (t a bl es, st a t e in f or ma t ion , et c.), a n d is ea sy t o impl emen t ; h owever , it ma y n ot be ef f icien t . Sh a r ed t r ees a r e bu il t ba sed on t h e cen t er poin t r en dez vou s r ou t er . Th is sh a r ed t r ee ma y n ot a l l ow f or t h e sh or t est t r ee t o be bu il t bet ween a sou r ce a n d some r eceiver h ost s.

Type s o f Mul t ic ast Tr e e s using PIM-SM • Two t ypes of t r ees ca n be bu il t : • Sh a r ed Tr ee (RP r oot ed t r ees) • Sou r ce Root ed Tr ees

Th e PIM pr ot ocol ca n a da pt h er e a s wel l . Ba sed on t h e da t a r a t e, a f t er t h e sh a r ed t r ee is con st r u ct ed (a f t er meet in g a t t h e r en dez vou s poin t ) bet ween a h ost r eceiver a n d a sou r ce, it ca n ch a n ge f r om bein g a sh a r ed t r ee t o a sh or t est -pa t h t r ee. Th e r ou t er sen ds a Join comma n d dir ect l y t o t h e sou r ce a n d a mu l t ica st t r ee is bu il t . Th e or igin a l pa t h t h r ou gh t h e r en dez vou s r ou t er is t or n down . An impor t a n t poin t n eeds t o be br ou gh t ou t h er e: PIM, l ike ot h er mu l t ica st a l gor it h ms, u ses RPF. Sin ce PIM-SM u ses bot h sou r ce-r oot ed t r ees a n d RP-r oot ed t r ees (expl a in ed l a t er ), t h e RPF ch eck is don e dif f er en t l y f or sou r ce t r ees a n d sh a r ed t r ees. If a PIM r ou t er h a s a sou r ce-r oot t r ee st a t e, it does t h e RPF ch eck f r om t h e sou r ce IP a ddr ess of t h e mu l t ica st pa cket . If t h e r ou t er h a s a sh a r ed-t r ee st a t e (a n d n o expl icit sou r ce-t r ee st a t e), it does t h e RPF ch eck on t h e RP’s a ddr ess (wh ich is kn own wh en member s join t h e gr ou p). PIM-SM u ses t h e RPF l ooku p f u n ct ion t o det er min e wh er e it n eeds t o sen d Join s a n d Pr u n es.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 286 Joining a Group Ar ou t er

wit h dir ect l y con n ect ed n eigh bor s mu st f ir st join t h e sh a r ed t r ee. Wh en t h e DR get s a member sh ip n ot if ica t ion f r om a h ost , it l ooks u p t h e a ssocia t ed RP f or t h a t gr ou p (mor e in f or ma t ion on t h e RP is comin g u p). Th e DR cr ea t es a wil dca r d mu l t ica st en t r y f or t h e gr ou p in t h e f or m of (*,G). If t h er e is n ot a specif ic ma t ch f or t h e gr ou p, t h e pa cket is f or wa r ded a ccor din g t o t h is en t r y. Th e RP a ddr ess is con t a in ed in a specia l f iel d in t h e r ou t e en t r y a n d is in cl u ded in per iodic Join /Pr u n e messa ges. Th e DR sen ds a Join messa ge t o t h e pr ima r y RP. Th e (*,G) en t r y in dica t es a (a n y sou r ce, gr ou p) pa ir . Th e in t er media t e r ou t er (B) f or wa r ds t h e u n ica st PIM-JOIN messa ge. Rou t er B a l so cr ea t es a f or wa r din g ca ch e en t r y f or t h e (*,G) pa ir , so t h a t t h ey wil l kn ow h ow t o f or wa r d mu l t ica st da t a gr a ms f or t h e gr ou p. Th e sl ide sh ows t h e sequ en ce of join in g a gr ou p.

Join in g a Gr ou p

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 287 A Host Sending to a Group Wh en a h ost

t r a n smit s a mu l t ica st pa cket t o a specif ic gr ou p, t h e design a t ed r ou t er (ch osen by IGMPv2) f or wa r ds t h e mu l t ica st da t a gr a m a s a u n ica st da t a gr a m t o t h e RP. Th is u n ica st da t a gr a m is t h e mu l t ica st da t a gr a m en ca psu l a t ed a s a PIM-SM-Regist er pa cket . Th is t ype of pa cket in f or ms t h e RP of a n ew sou r ce. Th e RP st r ips of f t h e en ca psu l a t ed (r egist er ) h ea der s a n d r edist r ibu t es t h e mu l t ica st da t a gr a m ou t t h e del iver y t r ee. Th e a ct ive RP f or t h a t sou r ce t r a n smit s PIM-JOIN messa ges ba ck t o t h e sou r ce st a t ion ’s DR. Th e r ou t er s l yin g bet ween t h e sou r ce’s DR a n d t h e RP ma in t a in t h e pa t h in f or ma t ion by t h e r eceived PIM-JOIN messa ges. Th is is don e so t h a t wh en n on r egist er ed en ca psu l a t ed pa cket s a r e r eceived, t h ey wil l kn ow wh a t in t er f a ces t o f or wa r d t h em on . Th e RP wil l sen d t h e u n ica st da t a gr a m ba ck ou t a s a mu l t ica st da t a gr a m a cr oss t h e gr ou p’s mu l t ica st t r ee. Th e sou r ce’s DR wil l con t in u e t o en ca psu l a t e t h e mu l t ica st da t a gr a ms a n d sen d t h em t o t h e RP. Wh en t h e DR r eceives a Regist er -St op messa ge f r om t h e RP (t h e RP sen ds t h ese messa ges if t h e RP h a s n o down st r ea m r eceiver s f or t h e gr ou p or f or t h a t sou r ce) it wil l a l so sen d Regist er -St op messa ges if t h e RP h a s a l r ea dy join ed t h e (S,G) t r ee a n d is r eceivin g t h e da t a pa cket s n a t ivel y (u n en ca psu l a t ed). A t imer is u sed by t h e DR a n d if t h is t imer expir es, it wil l st a r t t o r esen d t h e mu l t ica st da t a gr a ms en ca psu l a t ed in Regist er messa ges. Th e sl ide sh ows t h e sequ en ce of a h ost sen din g t o a gr ou p.

A Host Sen din g t o a Gr ou p

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 288 Converting to a Source-Rooted Tree Th e in it ia l

t r ee bu il t in PIM-SM is t h e sh a r ed RP-t r ee. However , ba sed on da t a t h r esh ol ds t h a t a r e r el a t ive t o t ime, t h e t r ee ca n be con ver t ed t o sou r ce-r oot ed t r ees.

Con ver t in g t o a Sou r ce-Root ed Tr ee

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 289 Rendezvous Points PIM-SM u ses specif ic r ou t er s kn own a s t h e rendezvous point (RP) t o st a r t

ou t t h e sh a r ed t r ee. Sen der s a n d r eceiver s join a mu l t ica st gr ou p by r egist er in g a t t h eir r en dez vou s r ou t er . A r en dez vou s poin t is simpl y a n IP a ddr ess of a sin gl e r ou t er . Th ese poin t s a r e u sed by sen der s t o a n n ou n ce t h emsel ves a n d f or r eceiver s t o f in d ou t a bou t n ew sen der s f or a gr ou p. Wh er e a n d h ow is t h e RP f ou n d? Th er e is on e r ou t er in a sin gl e PIM doma in (a con t igu ou s set of r ou t er s t h a t a l l impl emen t PIM) ca l l ed t h e bootstrap router (BSR). Th is r ou t er is r espon sibl e f or sen din g ou t Boot st r a p messa ges. Th e BSR is dyn a mica l l y el ect ed a n d dist r ibu t es in f or ma t ion a bou t t h e RP. BSR in f or ma t ion is sen t t o ea ch r ou t er in t h e PIM doma in . To f in d ou t a bou t RPs, a l l r ou t er s wit h in a PIM doma in col l ect Boot st r a p messa ges a n d st or e t h e in f or ma t ion con t a in ed in t h e BSR messa ges. If a r ou t er wish es t o wor k a s a n RP, it becomes a candidate RP (C-RP). C-RPs sen d ou t Adver t isemen t messa ges t o t h e BSR f or t h e doma in . In side t h e a dver t isemen t s a r e t h e Gr ou p Addr ess a n d t h e Gr ou p Ma sk (pr ef ix) f iel ds f or wh ich it ca n become t h e RP; in ot h er wor ds, wh a t gr ou p a ddr ess r a n ges it ca n su ppor t a s a n RP. Th is r a n ge ca n be on e gr ou p t o a l l gr ou ps. Th is a l l ows t h e BSR t o dist r ibu t e RP in f or ma t ion t o ot h er PIM r ou t er s in t h e doma in u sin g t h e Al l -PIM-Rou t er s messa ge.

Re nde zvo us Po int s • PIM-SM u ses specif ic r ou t er s kn own a s RP t o st a r t ou t a sh a r ed t r ee. • Sen der s a n d r eceiver s join a mu l t ica st gr ou p by r egist er in g t h e gr ou p a ddr ess wit h t h eir RP. • RP is simpl y on e or mor e r ou t er s a ssocia t ed wit h a mu l t ica st a ddr ess. • On e r ou t er in t h e PIM-SM doma in is kn own a s t h e Boot st r a p Rou t er (BSR). • A simpl e el ect ion pr ocess is u sed t o det er min e t h e on e BSR • Th e BSR dist r ibu t es in f or ma t ion a bou t t h e RP • PIM r ou t er s col l ect a n d st or e BSR in f or ma t ion • A r ou t er t h a t wish es t o become a n RP sen ds ou t messa ges in dica t in g t h is a n d f or wh a t gr ou ps. • Th e BSR dist r ibu t es t h is in f or ma t ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 290 Comparison of Sparse- and Dense-Mode Protocols Spar se Mo de Requ ir es expl icit join in g of sen der s a n d r eceiver s. Does n ot sen d pa cket s wh er e t h ey h a ve n ot been r equ est ed. St or es sh a r ed-t r ee join in f or ma t ion in a n t icipa t ion of da t a pa cket s. Rel ies on a n RP in it ia l l y f or sen der s a n d r eceiver s t o meet a n d bu il d a sh a r ed t r ee. Un ica st pr ot ocol in depen den t . Requ ir es per iodic r ef r esh in g of expl icit Join /Pr u n e messa ges.

De nse Mo de Sen ds a n d st or es expl icit pr u n e in f or ma t ion in r espon se t o u n wa n t ed pa cket s. St a t el ess u n t ol l da t a pa cket s a r e sen t . No RP, t h e br oa dca st n a t u r e of t h e pr ot ocol bu il ds t h e t r ee. Un ica st pr ot ocol depen den t . No per iodic u pda t es on Pr u n e messa ges, even t dr iven .

PIM-Spa r se Mode is model ed a f t er t h e Cor e-Ba sed Tr ee a l gor it h m. However , t h e dif f er en ce bet ween t h e t wo is t h a t CBT u ses on e t r ee, cen t er ed a t a cor e r ou t er , in st ea d of a t t h e sou r ce of a mu l t ica st da t a gr a m. CBT bu il ds a sin gl e t r ee f or a l l member s in a gr ou p. Co mpar iso n o f Spar se - and De nse -Mo de Pr o t o c o l s Spar se Mo de Requ ir es expl icit join in g of sen der s a n d r eceiver s Does n ot sen d pa cket s wh er e t h ey h a ve n ot been r equ est ed St or es sh a r ed-t r ee join in f or ma t ion in a n t icipa t ion of da t a pa cket s

De nse Mo de Sen ds a n d st or es expl icit pr u n e st a t e a n d r eceiver s in f or ma t ion in r espon se t o u n wa n t ed pa cket s Br oa dca st s t h e f ir st mu l t ica st pa cket St a t el ess u n t il da t a pa cket s a r e sen t

Rel ies on a n RP in it ia l l y f or sen der s a n d r eceiver s t o meet a n d bu il d a sh a r ed t r ee Un ica st pr ot ocol in depen den t Requ ir es per iodic r ef r esh in g of expl icit Join /Pr u n e messa ges

No RP, t h e br oa dca st n a t u r e of t h e pr ot ocol bu il ds t h e t r ee Un ica st pr ot ocol depen den t No per iodic u pda t es on Pr u n e messa ges; even t dr iven

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 291 Multicast Open Shortest Path First (MOSPF) Review RFC 1584. If you a r e n ot

f a mil ia r wit h t h e OSPF (RFC 1583) pr ot ocol , pl ea se r eview t h e sect ion on t h a t pr ot ocol . Th er e a r e a ssu mpt ion s a bou t t h a t pr ot ocol t h a t a r e ma de h er e. Modif ica t ion s h a ve been ma de t o t h e OSPF r ou t in g pr ot ocol t h a t h a ve en a bl ed t h e pr ot ocol t o r ou t e IP mu l t ica st da t a gr a ms. Th er e a r e t h r ee t ypes of r ou t in g pr ovided: in t r a -a r ea r ou t in g, in t er -a r ea r ou t in g, a n d in t er -a u t on omou s syst em r ou t in g. In t r a -a r ea r ou t in g is t h e most ba sic r ou t in g a l gor it h m pr ovided. It r u n s in a sin gl e OSPF a r ea a n d su ppor t s t h e f or wa r din g of mu l t ica st da t a gr a ms wit h in a sin gl e a r ea . Th is cou l d be a sin gl e a r ea in a mu l t ipl e a r ea of a n OSPF a u t on omou s syst em, or it cou l d be a sin gl e a u t on omou s syst em wh en t h er e is on l y on e a r ea in t h e OSPF t opol ogy. In t er -a r ea r ou t in g is a n OSPF t opol ogy t h a t is spl it in t o sever a l r ou t in g a r ea s con n ect ed t h r ou gh a common a r ea kn own a s t h e backbone a r ea . Decision s on f or wa r din g mu l t ica st da t a gr a ms a r e st il l det er min ed a s in t h e in t r a -a r ea r ou t in g; t h e in f or ma t ion con t a in ed in t h e f or wa r din g ca ch e is u sed. Th e dif f er en ce bet ween t h e t wo is t h e met h od of f or wa r din g gr ou p member sh ip in f or ma t ion a n d t h e met h od of con st r u ct in g t h e in t er -a r ea mu l t ica st t r ee. Sel ect ed Ar ea Bor der Rou t er s (ABRs) a r e con f igu r ed t o per f or m a f u n ct ion kn own a s in t er -a r ea mu l t ica st r ou t er s. Th ese r ou t er s a r e r espon sibl e f or t h e f or wa r din g of gr ou p member sh ip in f or ma t ion a n d mu l t ica st da t a gr a ms bet ween a r ea s.

Mul t ic ast Ope n Sho r t e st Pat h Fir st (MOSPF) • An ext en sion of OSPF [RFC 1584] Ma r ch 1994. • A n ew LSA [gr ou p-member sh ip-LSA] is u sed t o descr ibe t h e l oca t ion of mu l t ica st dest in a t ion s. • A mu l t ica st pa cket ’s pa t h is ca l cu l a t ed u sin g a sh or t est -pa t h t r ee ba sed on t h e IP da t a gr a m’s sou r ce a n d dest in a t ion . • It is n ot ba sed on a Br oa dca st a n d Pr u n e • Mu l t ica st Host s join /l ea ve via IGMP [RFC 1112] f a cil it ies. • Br a n ch es of t h e t r ee n ot con t a in in g mu l t ica st member s a r e pr u n ed f r om t h e t r ee. • Ven dor specif ic impl emen t a t ion s ca n do “r ou t e pr u n in g” f or bet t er member a dmin ist r a t ion . • Th r ee t ypes of r ou t in g a r e pr ovided: • In t r a -a r ea , in t er -a r ea , a n d in t er -a u t on omou s syst em r ou t in g

In t er -a u t on omou s r ou t in g in vol ves a sou r ce a n d dest in a t ion pa t h t h a t is ou t side a t l ea st on e a u t on omou s syst em (AS). Sel ect ed Au t on omou s Syst em Bou n da r y Rou t er s (ASBRs) a r e sel ect ed a s in t er -AS mu l t ica st f or wa r der s. MOSPF ma kes t h e a ssu mpt ion t h a t ea ch in t er -AS mu l t ica st f or wa r der is r u n n in g a mu l t ica st r ou t in g pr ot ocol (su ch a s PIM or DVMRP) t h a t u ses t h e RPF f or wa r din g mech a n ism. Th is is t h e met h od u sed by MOSPF t o l ea ve it s AS a n d r ou t e t o a n ot h er AS t h a t cou l d be r u n n in g a n ot h er r ou t in g pr ot ocol , or t o get a cr oss t h e u n ica st In t er n et (sin ce MSOPF does n ot su ppor t t u n n el s).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 292 MOSPF Differences MOSPFdif f er s f r om DVMRP a n d PIM is ma n y wa ys, bu t

it sh ou l d be n ot ed r igh t u p f r on t t h a t MOSPF does n ot br oa dca st t h e f ir st mu l t ica st pa cket it r eceives. Th e pr ot ocol bu il ds a sou r ce-r oot ed, sh or t est -pa t h t r ee “on dema n d” wh en it r eceives t h e f ir st mu l t ica st pa cket a n d t h en pr u n es t h e br a n ch es n ot a ssocia t ed wit h t h is gr ou p. Al so, MOSPF does n ot a l l ow f or t u n n el in g a s DVMRP does. Mu l t ica st da t a gr a ms a r e sen t in n a t ive mode a n d a r e n ot en ca psu l a t ed (DVMRP u ses IP-in -IP en ca psu l a t ion f or t u n n el in g). A dif f er en ce bet ween OSPF a n d MOSPF is t h a t MOSPF does n ot a l l ow f or equ a l -cost mu l t ipa t h s. Th er e a r e t ie-br ea kin g r u l es t h a t h a ve been iden t if ied f or pa t h s t h a t a r e f ou n d t o be equ a l wh en ca l cu l a t in g t h e sh or t est -pa t h t r ee. On e of t h ese r u l es is t h a t , given a n equ a l -cost pa t h t o a dest in a t ion , t h e r ou t er or LAN wit h t h e h igh er IP a ddr ess wil l be ch osen . Th e secon d t ie-br ea kin g r u l e is t h a t a br oa dca st -or ien t ed n et wor k is a l wa ys ch osen over WAN r ou t er s (poin t -t o-poin t l in ks). MOSPF Dif f e r e nc e s • MOSPF dif f er s f r om DVMRP a n d PIM: • It does n ot br oa dca st t h e f ir st mu l t ica st pa cket it r eceives • Mu l t ica st is a n in t egr a l pa r t of t h e pr ot ocol . • Th e pr ot ocol bu il ds a sou r ce-r oot ed t r ee on -dema n d a n d t h en pr u n es br a n ch es. • Mu l t ica st member s a r e pa r t of t h e l in k st a t e da t a ba se. • Rou t es a r e compu t ed l ike r ea l r ou t es a n d t h ey a r e pu t in t o t h e f or wa r din g ca ch e. • MOSPF does n ot a l l ow f or equ a l cost mu l t ipa t h : • Tie-br ea kin g a l gor it h ms h a ve been pu t in t o pl a ce • MOSPF r ou t es sh ou l d be t h e DR a n d BDR in a n y mixed (i.e., n on -MOSPF) en vir on men t s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 293 MOSPF Caveats OSPF a l l ows f or

a n a u t on omou s syst em t o be spl it in t o a r ea s. Pr obl ems ma y occu r wh en u sin g MOSPF in a mu l t i-a r ea OSPF t opol ogy, f or t h e a bil it y of a r ou t er t o h a ve compl et e kn owl edge of t h e en t ir e a u t on omou s syst em is l ost a n d in compl et e sh or t est pa t h t r ees a r e bu il t . Mu l t ica st s wil l st il l get t h r ou gh , bu t t h ey ma y t a ke t h e most ef f icien t pa t h s. MOSPF Cave at s • MOSPF on l y oper a t es ef f ect ivel y in pu r e OSPF en vir on men t s, wh er ea s most n et wor ks combin e: • Dif f er en t IGPs, su ch a s RIP wit h OSPF • IGPs wit h EGPs, su ch a s BGP-4 wit h EGPs • MOSPF a ssu mes n et wor k t opol ogy in a mu l t i-a r ea t opol ogy. • MOSPF is kn own a s a den se-mode mu l t ica st pr ot ocol . • MOSPF ca n sca l e t o l a r ge n u mber s of mu l t ica st gr ou ps bu t it comes a t a cost of pr ocessin g r esou r ces. • MOSPF h a s been impl emen t ed by a f ew ven dor s. • No a bil it y t o “t u n n el ” mu l t ica st da t a gr a ms t h r ou gh n on mu l t ica st r ou t er s (MOSPF r ou t er s ca n f or wa r d u n ica st ).

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 294 Local-Group Database and the Group-Membership LSA MOSPF pr ovides f or

t h e a bil it y t o f or wa r d mu l t ica st da t a gr a ms f r om on e IP su bn et t o a n ot h er . A n ew OSPF l in k-st a t e a dver t isemen t (gr ou p-member sh ip LSA) h a s been a dded t o a ccommoda t e t h is by a l l owin g a sou r ce-r oot ed, pr u n ed, sh or t est -pa t h t r ee t o be bu il t . Th is n ew LSA a u gmen t s t h e l in k-st a t e da t a ba se; t h er ef or e, t h e MOSPF da t a ba se is t h e l in k-st a t e da t a ba se of OSPF bu t wit h en t r ies t h a t per t a in t o mu l t ica st n et wor ks. Th e n ew LSA pl a ces t h e l oca t ion of mu l t ica st dest in a t ion s in t h e da t a ba se. Usin g t h is in f or ma t ion , MOSPF ca n bu il d a sh or t est -pa t h t r ee f or a sou r ce gr ou p. MOSPF is a n ext en sion of OSPF a n d MOSPF r ou t er s wil l in t er oper a t e in n on mu l t ica st r ou t er s wh en f or wa r din g u n ica st da t a gr a ms. An MOSPF r ou t er ba ses it s f or wa r din g decision on t h e con t en t s of a da t a ca ch e kn own a s t h e forwarding cache. Ea ch en t r y in t h e ca ch e r epr esen t s a sou r ce/dest in a t ion combin a t ion (a n d possibl y ToS). Th is f or wa r din g ca ch e is bu il t f r om t wo compon en t s: a l oca l gr ou p da t a ba se (bu il t by IGMP) da t a gr a m’s sh or t est -pa t h t r ee. Th e l oca l -gr ou p da t a ba se keeps t r a ck of t h e l oca l member sh ip f or t h e r ou t er s dir ect l y a t t a ch ed t o n et wor ks. Th ese en t r ies a r e pa ir ed in t h e f or m of (gr ou p, a t t a ch ed n et wor k). Th e a t t a ch ed n et wor k is t h e IP a ddr ess of t h e n et wor k, a n d t h e gr ou p is t h e IP mu l t ica st a ddr ess of t h e mu l t ica st gr ou p. Al l we h a ve t o h a ve is on e h ost on t h a t n et wor k in dica t in g member sh ip a n d t h e r ou t er wil l pl a ce a n en t r y in t h e l oca l -gr ou p da t a ba se. Simil a r t o t h e ot h er mu l t ica st r ou t in g pr ot ocol s, t h is da t a ba se a l l ows t h e r ou t er t o det er min e wh ich por t (s) it sh ou l d f or wa r d a r eceived mu l t ica st da t a gr a m. Th e IGMP pr ot ocol a ssist s in bu il din g t h is da t a ba se. To a l l ow f or mu l t ica st da t a gr a ms t o be f or wa r ded t o a l l member s of t h e gr ou p in a n a r ea , t h e l oca l -gr ou p da t a ba se is f l ooded t h r ou gh ou t t h e a r ea (in cl u din g bein g r eceived by ABRs) u sin g t h e gr ou p-member sh ip LSA. Th er e is a sepa r a t e gr ou p-member sh ip

LSA f or ea ch mu l t ica st gr ou p in t h e r ou t er ’s gr ou p da t a ba se. Th e r ou t er ’s gr ou pmember sh ip LSA f or a specif ied gr ou p l ist s t h ose l oca l r ou t er por t s (i.e., t h e r ou t er it sel f a n d/or a n y dir ect l y con n ect ed t r a n sit n et wor ks) t h a t sh ou l d n ot be pr u n ed f r om t h e gr ou p’s da t a gr a m sh a r ed t r ees. Lo c al -Gr o up Dat abase and t he Gr o up-Me mbe r ship LSA • New LSA devised: • Gr ou p-member sh ip LSA • Ba sed on IGMP r epor t s • Au gmen t s t h e l in k-st a t e da t a ba se: • Th er e is n ot a sepa r a t e da t a ba se f or t h ese LSAs • Sepa r a t e gr ou p member sh ip LSA sen t f or ea ch gr ou p t o wh ich a h ost bel on gs. • Mu l t ica st t r ee is devel oped f r om t h is t a bl e. • En t r ies a r e pa ir ed (gr ou p, a t t a ch ed n et wor k). • Loca l -gr ou p da t a ba se is f l ooded t h r ou gh ou t t h e a r ea . • Rou t er in t er f a ces a r e in cl u ded a s pa r t of a gr ou p. • ABRs a l so r eceive t h ese LSAs. • ABRs a r e in cl u ded in a l most a l l mu l t ica st t r ees: • Wil dca r d f ea t u r e t o en su r e t h a t t h ey kn ow a bou t a l l mu l t ica st t r ees, wh ich en a bl es t h em t o bu il d su mma r y in f or ma t ion t o sen d t o t h e ba ckbon e

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 295 Role of the DR and the BDR Ro l e o f t he DR and t he BDR • Th e DR issu es Host Member sh ip qu er ies f or t h e n et wor ks a t t a ch ed t o it f or wh ich it is t h e DR. • An MOSPF t h a t is n ot t h e DR ign or es r epor t s. • Pr even t s u n n ecessa r y r epl ica t ion of pa cket s. • Th e BDR per f or ms t h e sa me f u n ct ion s a s t h e DR except t h a t it does n ot t r a n smit qu er ies u n t il t h e DR goes a wa y. • Set n on -MOSPF r ou t er s wit h a pr ior it y of 0 t o en su r e t h ey do n ot become t h e DR or BDR.

It

is t h e design a t ed r ou t er (DR) t h a t issu es t h e Host Member sh ip Qu er ies f or t h e n et wor ks a t t a ch ed t o it . An MOSPF r ou t er ign or es r epor t s f or t h ose n et wor ks n ot el ect ed t h e DR. An y r espon ses (IGMP r epor t s) r eceived f r om t h e n et wor ks bu il ds en t r ies ba sed on gr ou ps, in t h e da t a ba se. A gr ou p a ddr ess (member ) in t h is da t a ba se wil l be del et ed wh en t h e DR does n ot r eceive a r epor t f r om t h a t member . In a mu l t ica st en vir on men t , it is ver y impor t a n t t h a t t h e DR is a mu l t ica st -en a bl ed r ou t er . Ha vin g t h e DR become t h e qu er ier pr even t s u n n ecessa r y r epl ica t ion of pa cket s. Th is pr even t s mu l t ica st da t a gr a ms f r om bein g r epl ica t ed a s t h ey a r e del iver ed t o l oca l gr ou p member s. Th is a l l ows f or dif f er en t en t r ies in t h e l oca l -gr ou p da t a ba se f or t h e DRs in t h e a u t on omou s syst em, wh ich mea n s t h a t ea ch r ou t er in t h e a u t on omou s syst em h a s a dif f er en t l oca l -gr ou p da t a ba se. However , t h e MOSPF l in k-st a t e da t a ba se a n d t h e da t a gr a m sh or t est -pa t h t r ees a r e iden t ica l in ea ch r ou t er bel on gin g t o t h e a u t on omou s syst em. Th e ba cku p design a t ed r ou t er (BDR) per f or ms t h e sa me f u n ct ion s a s t h e DR. It does n ot sen d ou t a qu er y, bu t it pr ocesses t h e IGMP r epor t s (h ost r espon ses) so t h a t it wil l

con t a in a compl et e pict u r e of t h e DR. In ca se t h e DR f a il s, t h e BDR ca n t a ke over . On e wor d of ca u t ion : You n ever wa n t a n n on -MOSPF r ou t er t o become t h e DR or BDR. To disa bl e t h ese r ou t er s f r om becomin g t h e DR or BDR, set t h eir pr ior it y t o 0. Wit h ou t t h e DR or BDR bein g a n MOSPF r ou t er , MOSPF ca n n ot oper a t e pr oper l y. Wh en a n IGMP r epor t is r eceived, t h e DR (a l l ot h er r ou t er s except f or t h e BDR disca r d t h is messa ge) does some simpl e er r or ch eckin g (ma kin g su r e t h e a ddr ess is n ot in t h e l oca l u se r a n ge of 224.0.0.0– 244.0.0.255). If t h er e is n ot a n en t r y in t h e l oca l -gr ou p da t a ba se, it cr ea t es on e (u sin g t h e f or ma t of IP gr ou p a ddr ess, a t t a ch ed n et wor k n u mber ) a n d set s t h e a ge en t r y t o 0. In t h e l oca l -gr ou p da t a ba se, t h er e is on l y on e en t r y per mu l t ica st a ddr ess, even if mu l t ipl e h ost s r epor t member sh ip. Th e DR ma y t r a n smit a n ew gr ou pmember sh ip LSA. Gr ou p-member sh ip LSAs a r e on l y f l ooded t o t h ose n eigh bor s t h a t h a ve in dica t ed (t h r ou gh t h eir da t a ba se descr ipt ion pa cket s) t h a t t h ey a r e mu l t ica st r ea dy. Th is is a ccompl ish ed by set t in g t h e MC (Mu l t ica st Ca pa bl e) bit in t h e OSPF Opt ion s f iel d of a l l Hel l o pa cket s, Da t a ba se Descr ipt ion pa cket s, a n d a l l l in k-st a t e a dver t isemen t s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 296 The Local-Group Database Th e l oca l -gr ou p da t a ba se con sist s of t h r ee compon en t s: Mul t ic ast g r o up: A Cl a ss D IP a ddr ess. At t ac he d ne t wo r k: Th e IP a ddr ess of t h e a t t a ch ed n et wor k t h a t con t a in s t h e mu l t ica st gr ou p. Ag e : Th e n u mber of secon ds sin ce a n IGMP Host Member sh ip r epor t h a s been seen . Ot h er r ou t er s f in d ou t a bou t l oca l -gr ou p member s t h r ou gh t h e gr ou p-member sh ip LSA. Th er e is on e LSA f or ea ch mu l t ica st gr ou p t h a t h a s on e or mor e en t r ies in t h e l oca l gr ou p da t a ba se. Th e l in k-st a t e da t a ba se in dica t es wh ich r ou t er s/t r a n sit n et wor ks h a ve a t t a ch ed gr ou p member s. The Lo c al -Gr o up Dat abase • Bu il t in t h e DR a n d BDR. • Con sist s of t h r ee compon en t s: • A mu l t ica st gr ou p—a Cl a ss D a ddr ess • At t a ch ed n et wor k—t h e IP a ddr ess of t h e a t t a ch ed n et wor k t h a t con t a in s t h e mu l t ica st gr ou p • Age—t h e n u mber of secon ds sin ce a n IGMP Host Member sh ip r epor t h a s been seen • Fl ooded t h r ou gh ou t t h e AS (or sin gl e a r ea ). • Assist s in bu il din g t h e l in k-st a t e da t a ba se a n d t h e sh or t est -pa t h t r ee. • Fa cil it a t es in t h e del iver y of l oca l mu l t ica st da t a gr a ms.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 297 Operation Ope r at io n • Wh en t h e f ir st mu l t ica st da t a gr a m (con t a in in g t h e sou r ce n et , mu l t ica st dest in a t ion ) is r eceived by a r ou t er , it wil l f in d t h e sou r ce su bn et in t h e l in kst a t e da t a ba se. • A sou r ce-r oot ed mu l t ica st t r ee is bu il t u sin g t h e Rou t er LSAs a n d t h e Net wor k LSAs a n d t h e Dykst r a a l gor it h m. • On ce t h e t r ee is bu il t , it is pr u n ed u sin g t h e in f or ma t ion f r om t h e gr ou pmember sh ip LSAs. • Fin a l r esu l t of t h e Dykst r a a l gor it h m is t h e pr u n ed sh or t est -pa t h t r ee t h a t is r oot ed a t t h e sou r ce. • Ba sed on t h is, a n en t r y is ma de in t h e f or wa r din g ca ch e of t h e r ou t er .

Th e l oca l -gr ou p da t a ba se en a bl es t h e l oca l

del iver y of mu l t ica st da t a gr a ms. Th e da t a gr a m’s sh or t est -pa t h t r ee en a bl es t h e del iver y of mu l t ica st da t a gr a ms t o dist a n t (i.e., n ot dir ect l y a t t a ch ed) gr ou p member s. Bot h of t h ese a r e u sed in t h e ca l cu l a t ion of t h e f or wa r din g ca ch e. Th e f ol l owin g a r e st a n da r d a ssu mpt ion s wh en u sin g MOSPF: • Al l MOSPF r ou t er s wit h in t h e sa me a r ea ca l cu l a t e t h e sa me sh or t est -pa t h t r ee f or a given mu l t ica st da t a gr a m. Th is is a ccompl ish ed via syn ch r on iz ed l in k-st a t e da t a ba ses. • Lin k-st a t e da t a ba ses ca n be syn ch r on iz ed u sin g t h e n ew gr ou p-member sh ip LSA. Wit h ea ch r ou t er in a n a r ea h a vin g t h e sa me da t a ba se, ea ch r ou t er sh ou l d be a bl e t o bu il d a sou r ce-r oot ed, sh or t est -pa t h , mu l t ica st t r ee wit h ou t h a vin g t o br oa dca st t h e f ir st mu l t ica st pa cket . • Th e sh or t est -pa t h mu l t ica st t r ee is bu il t “on dema n d.” Th is mea n s t h a t t h e t r ee

is bu il t wh en a r ou t er r eceives a mu l t ica st da t a gr a m f or t h e f ir st t ime f or a given mu l t ica st gr ou p. An MOSPF r ou t er does n ot a u t oma t ica l l y f or wa r d t h e f ir st mu l t ica st da t a gr a m l ike DVMRP does. Sin ce t h e syn ch r on iz ed l in k-st a t e da t a ba se con t a in s gr ou p-member sh ip LSAs, t h is a l l ows a MOSPF r ou t er t o per f or m “br oa dca st t h e f ir st da t a gr a m” in it s memor y a n d t h e t r ee is bu il t on dema n d. Th e r ou t er s a l r ea dy kn ow wh er e t h e a ct ive gr ou p member sh ips a r e a n d ca n bu il d t h e t r ee wit h ou t f or wa r din g t h e f ir st da t a gr a m a n d t h en wa it in g f or Pr u n e messa ges. Wh en t h e f ir st mu l t ica st da t a gr a m a r r ives (a t a n y r ou t er ), t h e sou r ce su bn et (IP a ddr ess of t h e sou r ce) is l oca t ed in t h e l in k-st a t e da t a ba se. Th is is somet imes ca l l ed t h e MOSPF link-state database, bu t t h e sin gl e da t a ba se (l in k-st a t e da t a ba se) con t a in s en t r ies f or bot h u n ica st a n d mu l t ica st . A sou r ce-r oot ed mu l t ica st t r ee is ca l cu l a t ed u sin g t h e r ou t er LSAs a n d t h e n et wor k LSAs u sin g t h e Dykst r a a l gor it h m (sa me a s u n ica st OSPF). On ce t h e t r ee is bu il t , it is pr u n ed (t o el imin a t e l in ks t h a t do n ot con t a in a t l ea st on e member of a gr ou p) u sin g t h e gr ou p-member sh ip LSAs. Th e f in a l r esu l t of t h e Dykst r a a l gor it h m is t h e pr u n ed sh or t est -pa t h t r ee t h a t is r oot ed a t t h e sou r ce (r emember , OSPF ca l cu l a t es it s sh or t est -pa t h t r ee u sin g it sel f a s t h e r oot ). Th is sh or t est -pa t h t r ee is u sed t o u n der st a n d wh ich por t s sh ou l d be u sed f or t h e f or wa r din g of mu l t ica st da t a gr a ms t h a t a r e dist a n t (i.e., n o l oca l -gr ou p member sh ip, bu t t h er e a r e member s of t h e gr ou p down st r ea m f r om t h is r ou t er ), a n d wh ich por t s sh ou l d r eceive wh ich mu l t ica st da t a gr a m (sou r ce). Now we h a ve t wo sou r ces of in f or ma t ion : t h e sou r ce-r ou t ed sh or t est -pa t h t r ee a n d t h e l oca l -gr ou p da t a ba se. Bot h of t h ese a r e u sed t o det er min e t h e f or wa r din g ca ch e, wh ich is t h e on l y pl a ce t h e r ou t er wil l l ook t o det er min e f or wa r din g of a mu l t ica st da t a gr a m.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 298 Forwarding Cache Th e f or wa r din g ca ch e is u sed t o det er min e h ow t o f or wa r d a mu l t ica st

da t a gr a m. A mu l t ica st da t a gr a m ma y be del iver ed l oca l l y or it ma y be f or wa r ded on a br a n ch t o a n ot h er mu l t ica st r ou t er . I men t ion ed bef or e t h a t u pon r eceipt of a mu l t ica st da t a gr a m, Dykst r a r u n s a n d t h e r esu l t is a pr u n ed, sou r ce-r oot ed t r ee. Th e f or wa r din g ca ch e is bu il t u sin g t h e sh or t est -pa t h t r ee bu il t by t h e Dykst r a a l gor it h m a n d t h e en t r ies in t h e l oca l -gr ou p da t a ba se. Th e r ou t er f ir st f in ds it s posit ion in t h e sh or t est pa t h t r ee. On ce t h e r ou t er discover s it s posit ion , it wil l cr ea t e a en t r y in t h e f or wa r din g ca ch e t h a t con t a in s t h e (sou r ce, gr ou p) pa ir , t h e u pst r ea m n ode, a n d t h e down st r ea m in t er f a ces. Fo r war ding Cac he • Used t o det er min e t h e cor r ect pa t h on wh ich t o f or wa r d a mu l t ica st da t a gr a m. • En t r ies a r e pl a ced h er e by t h e sh or t est -pa t h t r ee bu il t u sin g t h e Dykst r a a l gor it h m a n d t h e l oca l -gr ou p da t a ba se. • Rou t er mu st f in d it s posit ion in t h e sh or t est -pa t h t r ee. • Rou t er cr ea t es a n en t r y t h a t con sist s of t h e (sou r ce, gr ou p) pa ir , t h e u pst r ea m n ode, a n d t h e down st r ea m in t er f a ces.

Th e f ol l owin g en t r ies a r e pl a ced in t o t h e f or wa r din g ca ch e: So ur c e ne t wo r k: Th e n et wor k n u mber of t h e sou r ce. De st inat io n mul t ic ast g r o up: A kn own dest in a t ion gr ou p a ddr ess t o wh ich mu l t ica st da t a gr a ms a r e cu r r en t l y bein g f or wa r ded. Upst r e am no de : Th e in t er f a ce t h a t da t a gr a ms a ddr essed t o (sou r ce, gr ou p) sh ou l d be r eceived on . List o f do wnst r e am int e r f ac e s: Th e in t er f a ce(s) t h a t a mu l t ica st da t a gr a m (in dexed by sou r ce, gr ou p) sh ou l d be f or wa r ded on .

List o f do wnst r e am ne ig hbo r s: To a ssist in t h e f or wa r din g of mu l t ica st da t a gr a ms in a h ybr id (mixed OSPF a n d MOSPF) n et wor k. TTL: Th e n u mber of h ops t h e da t a gr a m wil l t r a vel t o r ea ch a n y ou t l yin g gr ou p member s. Th is pr ovides f or ef f icien cy in t h a t t h e r ou t er ca n disca r d a mu l t ica st da t a gr a m if t h e r eceived TTL is l ess t h a n t h is TTL. TTLs a r e u sed by t r a n smit t in g h ost s t o r est r ict t h e f or wa r din g of a mu l t ica st da t a gr a m. Th is a l l ows f or ef f icien cy in t h a t a mu l t ica st da t a gr a m wil l on l y be f or wa r ded (over r ou t er s) t h e n u mber of h ops in dica t ed by t h e TTL of t h e r eceived da t a gr a m. Not ice t h a t in t h e f or wa r din g ca ch e, ea ch of t h e down st r ea m n eigh bor s is l a bel ed wit h a TTL (Time t o Live) va l u e. Th e is a n opt imiz in g f ea t u r e in t h a t if a MOSPF r ou t er r eceives a mu l t ica st da t a gr a m wh ose TTL is l ower t h a n t h e en t r y in it s r ou t in g t a bl e, t h e r ou t er wil l disca r d t h e da t a gr a m. Th e in f or ma t ion con t a in ed in t h e ca ch e r ema in s st a bl e u n t il on e of t wo t h in gs h a ppen s: An OSPF t opol ogy ch a n ge f or ces t h e ca ch e t o be f l u sh ed (a l l en t r ies a r e del et ed a n d a r e n ot pl a ced ba ck in t o t h is ca ch e u n t il r eceipt of a mu l t ica st da t a gr a m wh ich wil l bu il d a n ew en t r y); or a gr ou p-member sh ip LSA is r eceived t h a t con t a in s a ch a n ge in t h e member s of a gr ou p. A n ew t r ee wil l h a ve t o be con st r u ct ed ba sed on t h is in f or ma t ion .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 299 Inter-Area MOSPF Routing Th e ba sic a l gor it h m f or

MOSPF wor ks in a sin gl e a r ea . In t er -a r ea r ou t in g f or mu l t ica st in vol ves a sou r ce a n d on e or mor e dest in a t ion gr ou ps in dif f er en t a r ea s. Th e f or wa r din g of mu l t ica st da t a gr a ms bet ween a r ea s is st il l decided by t h e in f or ma t ion con t a in ed in t h e f or wa r din g ca ch e. Th e pr obl em is t h e a bil it y t o a ccu r a t el y bu il d a compl et e sh or t est -pa t h t r ee beca u se det a il ed in f or ma t ion a bou t t h e ot h er a r ea ’s t opol ogy is n ot kn own (in OSPF it is su mma r iz ed, in MOSPF it is n ot kn own ). Fu r t h er mor e, sin ce LSAs a r e n ot f l ooded t o dif f er en t a r ea s, t h e gr ou p LSA is n ot pr opa ga t ed t o ot h er a r ea s. To compen sa t e f or t h is “u n kn own ” in f or ma t ion , est ima t es a r e ma de by u sin g t h e wil dca r d f ea t u r e of t h e Ar ea Bor der Rou t er (n ew t o MOSPF) a n d t h e su mma r y l in k a dver t isemen t s pr ovided by t h e ABR. Af t er a f ew in t r odu ct ion s, h ow MOSPF over comes t h ese l imit a t ion s is expl a in ed.

In a mu l t ica st t opol ogy t h a t is r epr esen t ed by mu l t ipl e a r ea s, a n ew f u n ct ion wit h in t h e ABR, ca l l ed inter-area multicast forwarders, is impl emen t ed. Th ese f or wa r der s pa ss gr ou p in f or ma t ion a n d a l l ow f or t h e a bil it y of mu l t ica st da t a gr a ms t o cr oss a r ea s. It is t h e ABR t h a t is con f igu r ed t o per f or m t h is f u n ct ion . For wa r der s r u n s a s a sepa r a t e f u n ct ion of t h e ABR a n d a r e u sed on l y f or mu l t ica st da t a gr a ms. ABRs impl emen t in g t h e mu l t ica st f or wa r der su mma r iz e t h eir a r ea ’s gr ou p in f or ma t ion (h ow is expl a in ed in a momen t ) a n d sen d it t o t h e ba ckbon e a r ea t h r ou gh t h e u se of gr ou p-member sh ip LSAs, wh ich a r e “in ject ed” in t o t h e ba ckbon e a r ea . Th e ba ckbon e r ou t er s r eceive t h is in f or ma t ion a n d in cl u de it in t h eir l in k-st a t e da t a ba se by gr ou p a n d t h e r ou t er it r eceived it f r om. Th e ba ckbon e r ou t er s pr ocess t h is in f or ma t ion bu t do n ot f or wa r d a n y mu l t ica st in f or ma t ion on t o a n y ot h er mu l t ica st ABRs. Fu r t h er mor e, n o in f or ma t ion r ega r din g t h e ba ckbon e’s gr ou p member sh ip is f or wa r ded t o a n y a r ea . It is a symmet r ica l . In f or ma t ion f l ows in t o t h e ba ckbon e, bu t t h e ba ckbon e does n ot f l ow t h e in f or ma t ion in t o ot h er a r ea s. So h ow does in f or ma t ion f l ow bet ween a r ea s, or f r om t h e ba ckbon e t o a n a r ea ? So h ow does t h e mu l t ica st f or wa r der kn ow of t h e gr ou ps in it s a r ea a n d kn ow wh en t o pa ss in f or ma t ion f r om t h e ba ckbon e t o a n a r ea ? Th is in vol ves t h e con cept kn own a s t h e wildcard receiver.

Int e r -Ar e a MOSPF Ro ut ing • Ba sic a l gor it h m f or MOSPF wor ks in a sin gl e a r ea . • Topol ogies t h a t in cl u de mu l t ipl e a r ea s h a ve a n ew f u n ct ion in t h e ABR kn own a s t h e “in t er -a r ea mu l t ica st f or wa r der ”: • Pa sses gr ou p in f or ma t ion a n d a l l ows f or t h e a bil it y of mu l t ica st da t a gr a ms t o cr oss a r ea s • ABRs su mma r iz e t h eir a r ea ’s gr ou p in f or ma t ion a n d in ject t h is in f or ma t ion in t o t h e ba ckbon e. • Ba ckbon e r ou t er s r ecor d t h is in f or ma t ion in t h eir l in k-st a t e da t a ba se a n d t h e r ou t er f r om wh ich t h ey r eceived t h is in f or ma t ion . • In f or ma t ion is a symmet r ic. • In t er -a r ea mu l t ica st f or wa r der s a r e ABR wil dca r d r eceiver s.

MOSPF r ou t er s ma y in dica t e t h ey wa n t t o r eceive a l l mu l t ica st da t a gr a ms r ega r dl ess of t h e dest in a t ion . Th ey ca n in dica t e t h is t h r ou gh t h eir r ou t er -LSA u sin g a n ewl y def in ed bit in t h e r t ype f iel d kn own a s t h e W bit, or wildcard bit. Th is bit is u sed wit h in t er -a r ea mu l t ica st f or wa r der s (ABRs) a n d per mit s a MOSPF r ou t er t o r eceive a l l mu l t ica st t r a f f ic in a n a r ea r ega r dl ess of t h e gr ou p. MOSPF r ou t er s t h a t empl oy t h is f u n ct ion en su r e t h a t t h ey r ema in on a l l pr u n ed mu l t ica st t r ees, t h u s a l l owin g t h em t o r eceive a l l mu l t ica st da t a gr a ms r ega r dl ess of gr ou p member sh ip. By def a u l t , a l l mu l t ica st f or wa r der ABRs a r e wil dca r d r eceiver s.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 300 Inter-Area Multicast Example Ha vin g t h e mu l t ica st

f or wa r der s a s wil dca r ds en a bl es t h em t o r eceive mu l t ica st da t a gr a ms f r om t h e ba ckbon e a n d a n y mu l t ica st f or wa r der t o be in cl u ded in a n y mu l t ica st t r ee bu il t in t h eir a r ea . Wh en a mu l t ica st da t a gr a m is t o be f or wa r ded, it is r eceived by t h e ABR (mu l t ica st f or wa r der ) f or f or wa r din g t o t h e ba ckbon e. Th e ba ckbon e r ou t er s kn ow wh ich gr ou ps a r e a ct ive in wh ich a r ea s, a n d sin ce t h e ABR is pa r t of t h e ba ckbon e t h ey ca n r eceive t h e in f or ma t ion f r om t h e ba ckbon e t o be f or wa r ded t o t h eir a r ea . Th e ba ckbon e r ou t er s do n ot impl emen t t h e wil dca r d f u n ct ion , f or t h ese r ou t er s in h er en t l y kn ow a bou t a l l mu l t ica st gr ou ps t h r ou gh t h e mu l t ica st ABRs f l owin g su mma r y in f or ma t ion in t o t h e ba ckbon e, wh ich is r eceived by t h e ba ckbon e r ou t er s. How is t h e f or wa r din g ca ch e bu il t ba sed on t h ese a ssu mpt ion s? It depen ds on wh et h er t h e sou r ce a n d a r ou t er bu il din g t h e t r ee a r e in t h e sa me a r ea or n ot . Th e f or wa r din g of mu l t ica st in f or ma t ion is st il l a ccompl ish ed u sin g t h e f or wa r din g ca ch e, bu t a n a ccu r a t e pict u r e ca n n ot be dr a wn . If t h e sou r ce a n d t h e r ou t er per f or min g t h e ca l cu l a t ion a r e in t h e sa me a r ea , t h e wil dca r d f ea t u r e of t h e ABR comes in t o pl a y. Th is f or ces t h e r ou t er t o be in cl u ded in a l l mu l t ica st compu t a t ion s, wh ich a l l ows f or t h e br a n ch es of t h e ABR t o be in cl u ded in t h e sh or t est -pa t h t r ee. Th e ABR wil l n ot be pr u n ed. If t h e sou r ce a n d t h e r ou t er per f or min g t h e ca l cu l a t ion a r e in dif f er en t a r ea s, t h en t h e su mma r y l in k a dver t isemen t s a r e u sed. Th is f or ces t h e in t er -a r ea mu l t ica st f or wa r der s of t h e ABR t o be in cl u ded in t h e ca l cu l a t ed t r ee. A f in a l n ot e: Ar ea Bor der Rou t er s h a ve sepa r a t e l in k-st a t e da t a ba ses f or ea ch a r ea t h ey a t t a ch t o—t h is is a n or ma l OSPF pr ocess. For mu l t ica st , h owever , t h is mea n s t h a t ea ch mu l t ica st f or wa r der mu st bu il d a sepa r a t e f or wa r din g t r ee f or ea ch a r ea t h ey a t t a ch t o. Bu t a l l of t h e a r ea ’s f or wa r din g in f or ma t ion is con t a in ed in on e f or wa r din g

ca ch e a n d a s soon a s t h is is bu il t , t h e sh or t est -pa t h t r ees f or ea ch a r ea a r e disma n t l ed. Th er e is n o n eed f or t h em on ce t h e f or wa r din g ca ch e con t a in s a l l t h e in f or ma t ion n eeded f or f or wa r din g mu l t ica st da t a gr a ms.

In t er -Ar ea Mu l t ica st Exa mpl e

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 301 Inter-Area Shortest-Path Tree Th e f ol l owin g sl ide sh ow t h e pa t h bet ween a r ea s. Not ice t h a t

t h e ABRs a r e wil dca r d r eceiver s. Th is a l l ows t h em t o be in cl u ded in a l l t r ees t h a t a r e bu il t .

In t er -Ar ea Sh or t est -Pa t h Tr ee

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 302 Inter-Autonomous System Multicast Th is t ype of mu l t ica st

r ou t in g in vol ves a sou r ce a n d dest in a t ion t h a t r eside in dif f er en t a u t on omou s syst ems. Th is in cl u des t h e a bil it y of r ou t in g bet ween a n MOSPF doma in a n d a DVMRP doma in , bu t wit h in t h e sa me AS. Th is is simil a r in t h e wa y OSPF t r ea t s RIP. Bot h OSPF a n d RIP ca n be u sed in t h e sa me AS, bu t t h ey a r e t r ea t ed a s sepa r a t e r ou t in g doma in s. Ju st a s in t h e in t er -a r ea mu l t ica st r ou t in g, con f igu r ed Au t on omou s Syst em Bou n da r y Rou t er s a r e con f igu r ed t o per f or m t h e in t er -AS mu l t ica st f or wa r der f u n ct ion . Th is wor ks u n der t h e a ssu mpt ion t h a t ea ch in t er -AS mu l t ica st f or wa r der empl oys a mu l t ica st f or wa r din g pr ot ocol t h a t u ses Rever se Pa t h For wa r din g, su ch a s DVMRP or PIM. Th e mu l t ica st ASBRs u se t h e wil dca r d ca pa bil it y. Wit h t h is, ea ch ASBR a ct s a s a mu l t ica st wil dca r d r eceiver f or ea ch of it s a t t a ch ed a r ea s. Th is en su r es t h a t t h e in t er AS mu l t ica st f or wa r der s a r e in cl u ded in a l l mu l t ica st t r ees. Th ey a r e n ot pr u n ed. Most of t h e oper a t ion of t h is r ou t er is simil a r t o t h e in t er -a r ea mu l t ica st f or wa r der . However , t h er e is on e ca se in wh ich it is dif f er en t : If t h e sou r ce of t h e mu l t ica st da t a gr a m a n d t h e r ou t er ma kin g t h e ca l cu l a t ion a r e in dif f er en t ASs. Aga in , t h e det a il s of ea ch AS t opol ogy wil l n ot be kn own . To compen sa t e f or t h is, in f or ma t ion ca n be a ssu med by u sin g t h e Su mma r y-ASBR l in k a n d t h e AS Ext er n a l l in ks, wh ich descr ibe t h e sou r ce su bn et . Af t er t h e ca l cu l a t ion is don e, t h e mu l t ica st t r ee begin s a t t h e in t er AS mu l t ica st f or wa r der , wit h a l l br a n ch es st emmin g f r om t h is r ou t er . Int e r -Aut o no mo us Syst e m Mul t ic ast • In vol ves sou r ce a n d dest in a t ion s t h a t r eside in dif f er en t a u t on omou s syst ems. • ASBRs per f or m a n ew f u n ct ion kn own a s In t er -AS mu l t ica st f or wa r der . • ASBRs u se t h e wil dca r d mech a n ism: • Al l ows ASBRs t o be in cl u ded in a l l mu l t ica st t r ees

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 303 Multicast Conclusion Mul t ic ast Co nc l usio n • • • • •

MOSPF r equ ir es t h a t you r u n OSPF or MOSPF n et wor k. MOSPF con ver ges in st a n t l y. MOSPF does n ot su ppor t t u n n el s dir ect l y. MOSPF sca l es wel l . MOSPF wor ks in spa r sel y popu l a t ed a r ea s a s wel l a s den se.

Mu l t ica st in g is comin g a n d it

is t a kin g ma n y f or ms on a n in t er n et or t h e In t er n et . We h a ve voice, video, a n d da t a mu l t ica st in g. Th er e is on e common pr ot ocol messa ge f or ma t , a n d t h a t is IGMP. PIM a n d DVMRP u se t h is f r a min g f or t h eir messa ges a s wel l . MOSPF u ses it s own LSA f or commu n ica t in g bet ween r ou t er s. However , a l l mu l t ica st a ppl ica t ion s con f or m t o IGMP t o r egist er t h emsel ves on t h e l oca l su bn et . Al l of t h e pr ot ocol s h a ve t h eir own a dva n t a ges a n d disa dva n t a ges. MOSPF r equ ir es t h a t you a r e r u n n in g OSPF. A RIPv1 or RIPv2 n et wor k ca n n ot simpl y in st a l l MOSPF. If t h e sit e ch ooses t o u se RIP, it mu st u se PIM or DVMRP. MOSPF con ver ges in st a n t l y, wh er ea s PIM a n d DVMRP ma y h a ve r ou t in g l oops du r in g a sl ow con ver gen ce. However , in st a l l in g MOSPF is n ot a simpl e t a sk, f or MOSPF is OSPF wit h mu l t ica st ext en sion s; t h er ef or e, a l l of t h e r u l es wit h OSPF st il l a ppl y. MOSPF does n ot su ppor t t u n n el s. It expect s some t ype of ot h er pr ot ocol su ch a s DVMRP t o be r u n n in g on t h e M-ASBR r ou t er s. DVMRP does n ot sca l e wel l a n d n eit h er does PIM wit h ou t some t u n in g. DVMRP a n d MOSPF wor k bet t er in den sel y popu l a t ed en vir on men t s, wh er ea s PIM h a s t wo modes of oper a t ion : spa r se a n d den se mode. PIM a l l ows f or du pl ica t e pa cket s in den se mode, in f a vor of a simpl er pr ot ocol t h a t is n ot depen den t on a u n ica st r ou t in g mech a n ism. You r ea l l y mu st con sider a l l t h e opt ion s bef or e pl a cin g a mu l t ica st pr ot ocol on you r n et wor k.

On e of t h e t h in gs you mu st t h in k a bou t wit h mu l t ica st is n ot on l y r eceivin g da t a , bu t h ow t o r espon d t h a t da t a . Yes, mu l t ica st in g does a l l ow f or on e st a t ion t o sen d on e da t a -st r ea m t o be r eceived by l it er a l l y t en s of t h ou sa n ds of r eceiver s. Bu t wh a t if t h er e is a n eed f or a ckn owl edgmen t of t h a t da t a ? Th is poses a con sider a bl e pr obl em: on e sen der , mu l t ipl e r eceiver s. If t h e n u mber of r eceiver s is 2000 a n d t h ey a l l n eed t o sen d some t ype of Receiver St a t u s messa ge ba ck t o t h e sen der , t h e sen der mu st be a bl e t o h a n dl e t h is t ype of ba ck-ch a n n el in f or ma t ion f l ow—especia l l y if t h e st a t u s is l on g. Th e in a bil it y t o h a n dl e t h is is ca l l ed implosion, du r in g wh ich t h e or igin a t or is over r u n by t h e ba ck ch a n n el .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 304 RFCs to Be Reviewed 2236 In t er n et Gr ou p Ma n a gemen t Pr ot ocol , Ver sion 2. W. Fen n er . November 1997. (For ma t : TXT=51048 byt es) (Upda t es RFC1112) (St a t u s: PROPOSED STANDARD). 2201 Cor e Ba sed Tr ees (CBT) Mu l t ica st Rou t in g Ar ch it ect u r e. A.Ba l l a r die. Sept ember 1997. (For ma t : TXT=38040 byt es) (St a t u s: EXPERIMENTAL). 2189 Cor e Ba sed Tr ees (CBT ver sion 2) Mu l t ica st Rou t in g. A. Ba l l a r die. Sept ember 1997. (For ma t : TXT=52043 byt es) (St a t u s: EXPERIMENTAL). 2117 Pr ot ocol In depen den t Mu l t ica st -Spa r se Mode (PIM-SM): Pr ot ocol Specif ica t ion . D. Est r in , D. Fa r in a cci, A. Hel my, D. Th a l er , S. Deer in g, M. Ha n dl ey, V. Ja cobson , C. Liu , P. Sh a r ma , L. Wei. Ju n e 1997. (For ma t : TXT=151886 byt es) (St a t u s: EXPERIMENTAL). 1700 ASSIGNED NUMBERS. J. Reyn ol ds,J. Post el . Oct ober 1994. (For ma t : TXT=458860 byt es) (Obsol et es RFC1340) (Al so STD0002) (St a t u s: STANDARD). 1584 Mu l t ica st Ext en sion s t o OSPF. J. Moy. Ma r ch 1994. (For ma t : TXT=262463, PS=426358 byt es) (St a t u s: PROPOSED STANDARD). 1469 IP Mu l t ica st over Token -Rin g Loca l Ar ea Net wor ks. T. Pu sa t er i. Ju n e 1993. (For ma t : TXT=8189 byt es) (St a t u s: PROPOSED STANDARD). 1458 Requ ir emen t s f or Mu l t ica st Pr ot ocol s. R. Br a u des & S. Za bel e. Ma y 1993. (For ma t : TXT=48106 byt es) (St a t u s: INFORMATIONAL). 1112 Host ext en sion s f or IP mu l t ica st in g. S.E. Deer in g. Au g-01-1989. (For ma t : TXT=39904 byt es) (Obsol et es RFC0988, RFC1054) (Upda t ed by RFC2236) (St a t u s: STANDARD). 1075 Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol . D. Wa it z ma n , C.Pa r t r idge, S.E. Deer in g. Nov-01-1988. (For ma t : TXT=54731 byt es) (St a t u s: EXPERIMENTAL).

Mul t ic ast dr af t s —t h ese ca n be obt a in ed f r om ma n y sou r ces. Th e on e t h a t I u sed is:h t t p://in f o.in t er n et .isi.edu :80/in -dr a f t s/id-a bst r a ct s.h t ml “Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol ”, T. Pu sa t er i, 08/11/1998, . Th is docu men t is a n u pda t e t o Ver sion 1 of t h e pr ot ocol specif ied in RFC 1075. “Doma in Wide Mu l t ica st Gr ou p Member sh ip Repor t s”, Bil l Fen n er , 08/07/1998, . Doma in Wide Mu l t ica st Gr ou p Member sh ip Repor t s a l l ow t h is in f or ma t ion t o be l ea r n ed in a f a sh ion simil a r t o IGMP a t t h e doma in l evel . “In t er n et Gr ou p Ma n a gemen t Pr ot ocol , Ver sion 3”, St eve Deer in g, B. Ca in , A. Th ya ga r a ja n , 12/03/1997, . Th is docu men t specif ies Ver sion 3 of t h e In t er n et Gr ou p Ma n a gemen t Pr ot ocol , IGMPv3. Ver sion 3 of IGMP a dds su ppor t f or “sou r ce f il t er in g.”œ“PIM Ver sion 2 DR El ect ion Pr ior it y Opt ion ”, L. Wei, 03/05/1998, . Th is dr a f t specif ies t h e DR El ect ion Pr ior it y Opt ion in PIMver sion 2 Hel l o messa ges. “IGMP Mu l t ica st Rou t er Discover y”, B. Ca in , Sh a n t a m Biswa s, 03/12/1998, . Compa n ies h a ve been pr oposin g “IGMP sn oopin g” t ype sch emes f or l a yer -2 br idgin g devices. A met h od f or discover y mu l t ica st ca pa bl e r ou t er s is n ecessa r y f or t h ese sch emes. “Cor e Ba sed Tr ees (CBT ver sion 3) Mu l t ica st Rou t in g—Pr ot ocol Specif ica t ion —”, . Th is specif ica t ion su per cedes a n d obsol et es RFC 2189. RFCs t o Be Re vie we d • 2236 In t er n et Gr ou p Ma n a gemen t Pr ot ocol , Ver sion 2. W. Fen n er . November 1997. (For ma t : TXT=51048 byt es) (Upda t es RFC1112) (St a t u s: PROPOSED STANDARD). • 2201 Cor e Ba sed Tr ees (CBT) Mu l t ica st Rou t in g Ar ch it ect u r e. A.Ba l l a r die. Sept ember 1997. (For ma t : TXT=38040 byt es) (St a t u s:EXPERIMENTAL). • 2189 Cor e Ba sed Tr ees (CBT ver sion 2) Mu l t ica st Rou t in g. A. Ba l l a r die. Sept ember 1997. (For ma t : TXT=52043 byt es) (St a t u s: EXPERIMENTAL). • 2117 Pr ot ocol In depen den t Mu l t ica st -Spa r se Mode (PIM-SM): Pr ot ocol Specif ica t ion . D. Est r in , D. Fa r in a cci, A. Hel my, D. Th a l er , S. Deer in g, M. Ha n dl ey, V. Ja cobson , C. Liu , P. Sh a r ma , L. Wei. Ju n e 1997. (For ma t : TXT=151886 byt es) (St a t u s: EXPERIMENTAL). • 1700 ASSIGNED NUMBERS. J. Reyn ol ds,J. Post el . Oct ober 1994. (For ma t : TXT=458860 byt es) (Obsol et es RFC1340) (Al so STD0002) (St a t u s: STANDARD). • 1584 Mu l t ica st Ext en sion s t o OSPF. J. Moy. Ma r ch 1994. (For ma t : TXT=262463, PS=426358 byt es) (St a t u s: PROPOSED STANDARD). • 1469 IP Mu l t ica st over Token -Rin g Loca l Ar ea Net wor ks. T. Pu sa t er i. Ju n e 1993. (For ma t : TXT=8189 byt es) (St a t u s: PROPOSED STANDARD). • 1458 Requ ir emen t s f or Mu l t ica st Pr ot ocol s. R. Br a u des & S. Za bel e. Ma y 1993.

(For ma t : TXT=48106 byt es) (St a t u s: INFORMATIONAL). • 1112 Host ext en sion s f or IP mu l t ica st in g. S. Deer in g. Au g-01-1989. (For ma t : TXT=39904 byt es) (Obsol et es RFC0988, RFC1054) (Upda t ed by RFC2236) (St a t u s: STANDARD). • 1075 Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol . D. Wa it z ma n , C.Pa r t r idge, S. Deer in g. Nov-01-1988. (For ma t : TXT=54731 byt es). (St a t u s: EXPERIMENTAL). Mul t ic ast dr af t s —t h ese ca n be obt a in ed f r om ma n y sou r ces. Th e on e t h a t I u sed is:h t t p://in f o.in t er n et .isi.edu :80/in -dr a f t s/id-a bst r a ct s.h t ml “Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol ”, T. Pu sa t er i, 08/11/1998, . Th is docu men t is a n u pda t e t o Ver sion 1 of t h e pr ot ocol specif ied in RFC 1075. “Doma in Wide Mu l t ica st Gr ou p Member sh ip Repor t s”, Bil l Fen n er , 08/07/1998, . “In t er n et Gr ou p Ma n a gemen t Pr ot ocol , Ver sion 3”, St eve Deer in g, B. Ca in , A. Th ya ga r a ja n , 12/03/1997, . “PIM Ver sion 2 DR El ect ion Pr ior it y Opt ion ”, L. Wei, 03/05/1998, . “IGMP Mu l t ica st Rou t er Discover y”, B. Ca in , Sh a n t a m Biswa s, 03/12/1998, . “Cor e Ba sed Tr ees (CBT ver sion 3) Mu l t ica st Rou t in g — Pr ot ocol Specif ica t ion —” . We b Sit e s www.ipmu l t ica st .com www.mbon e.com

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Part Six BOOTP, DHCP, RSVP, and SNMP Chapter 305 Boot Protocol (BOOTP) Th is pr ot ocol

h a s been a r ou n d a l on g t ime. It wa s most of t en u sed wit h diskl ess wor kst a t ion s. It en a bl ed t h ese wor kst a t ion s t o get t h eir con f igu r a t ion a n d boot f il es t o r emot el y boot over t h e n et wor k. Th e best exa mpl e of t h is wa s SUN wor kst a t ion s a n d t h eir Net wor k Fil e Syst em (NFS). Th ese diskl ess n et wor k st a t ion s cou l d boot over t h e n et wor k (u sin g a sma l l boot st r a p pr ot ocol f ou n d in a PROM). Wit h t h is t h ey cou l d get t h eir con f igu r a t ion pa r a met er s su ch a s t h eir IP a ddr ess a n d su bn et ma sk a n d t h en per f or m t h e boot sequ en ce t o boot u p t h eir ma ch in e f r om a r emot e ser ver . Th e Boot st r a p Pr ot ocol (BOOTP) is a UDP/IP-ba sed cl ien t -ser ver a ppl ica t ion or igin a l l y pr omot ed t o a l l ow diskl ess cl ien t s t o boot r emot el y f r om a ser ver on t h e sa me n et wor k or f r om a ser ver on a dif f er en t n et wor k f or t h e pu r pose of obt a in in g t h e n a me of a f il e t o be l oa ded in t o memor y a n d execu t ed, a n IP a ddr ess, a n d t h e a ddr ess of it s boot ser ver . Th e RFC f or BOOTP is RFC 951, bu t t h er e h a ve been a f ew su ppl emen t a l RFCs sin ce t h en t o cl ea r u p some “l oosel y def in ed” f ea t u r es of t h e pr ot ocol t h a t ca n l ea d t o misin t er pr et a t ion a n d even t u a l l y in compa t ibil it ies bet ween ven dor s su ppor t in g t h e pr ot ocol . Th e most r ecen t on e is RFC 1542, “Cl a r if ica t ion s a n d Ext en sion s f or t h e Boot st r a p Pr ot ocol .” Ot h er con f igu r a t ion in f or ma t ion su ch a s t h e l oca l su bn et ma sk, t h e l oca l t ime of f set , t h e a ddr esses of def a u l t r ou t er s, a n d t h e a ddr esses of va r iou s In t er n et ser ver s ca n a l so be commu n ica t ed t o a h ost u sin g BOOTP.

Bo o t Pr o t o c o l (BOOTP) • RFC 951. • Upda t ed by RFCs 1395, 1497, 1532, a n d 1542 • Or igin a t ed ma n y yea r s a go a s a met h od of boot in g diskl ess wor kst a t ion s on a LAN. • Wor ks a s micr ocode in a PROM. • Wor kst a t ion boot s a simpl e oper a t in g syst em. • Ju st en ou gh t o sen d ou t Boot messa ges t o a BOOTP ser ver • Usu a l l y oper a t es in t wo st a ges: • Fir st , it get s it s IP a ddr ess • Next , it u ses t h e TFTP pr ot ocol t o boot it s f u l l oper a t in g ima ge

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 306 BOOTP Operation Th e ba sic oper a t ion is a s f ol l ows: Th er e is a sin gl e pa cket t ype exch a n ged bet ween t h e cl ien t a n d t h e ser ver . On e f iel d in t h e pa cket is ca l l ed t h e opcode a n d ca n h a ve on e of t wo va l u es: BOOTREQUEST or BOOTREPLY. Th e cl ien t br oa dca st s a BOOTREQUEST pa cket t h a t con t a in s t h e cl ien t ’s h a r dwa r e a ddr ess a n d it s IP a ddr ess if kn own . Th e BOOTREQUEST ma y con t a in t h e n a me of t h e ser ver t h e cl ien t wish es t o r espon d. Th is is t o f or ce t h e BOOTREQUEST pa cket t o a pa r t icu l a r ser ver f r om wh ich t o obt a in it s in f or ma t ion . Th is ma y occu r if t h er e a r e ma n y ser ver s on t h e n et wor k or if t h er e is mor e t h a n on e ima ge (ol der /n ewer ) ver sion t h a t cou l d be sen t t o t h e cl ien t . In side t h e BOOTREQUEST ma y be a gen er ic f il en a me t o be boot ed. Simpl e n a mes l ike ipboot or u n ixboot a r e u sed. Wh en t h e ser ver r epl ies wit h a BOOTREPLY, it r epl a ces t h is en t r y wit h t h e f u l l pa t h n a me by wh ich t h e f il e ca n be l oca t ed on t h a t ser ver . If t h e cl ien t does n ot kn ow it s IP a ddr ess, t h e ser ver mu st possess a da t a ba se of MAC-t oIP a ddr ess ma ppin gs. On ce a ma t ch is f ou n d, t h is IP a ddr ess is pl a ced in a f iel d in t h e BOOTREPLY pa cket .

BOOTP Oper a t ion

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 307 BOOTP Field Definitions Fie l d op

Byt e s 1

h t ype

1

h l en

1

h ops

1

xid

4

secs

2

cia ddr yia ddr

4 4

sia ddr gia ddr

4 4

ch a ddr

16

sn a me

64

f il e Ven d

128 64

De sc r ipt io n Pa cket oper a t ion code/messa ge t ype. 1 = BOOTREQUEST, 2 = BOOTREPLY Ha r dwa r e a ddr ess t ype, sa me a s ARP sect ion in “Assign ed Nu mber s” RFC. For exa mpl e, “1” = 10 Mb Et h er n et . Ha r dwa r e a ddr ess l en gt h . For exa mpl e, “6” (byt es) f or 10 Mb Et h er n et . Cl ien t set s t o 0 a n d opt ion a l l y u sed by ga t ewa ys in BOOTP Rel a y. Tr a n sa ct ion ID. A r a n dom n u mber u sed t o ma t ch t h is boot r equ est wit h t h e r espon ses it gen er a t es. Fil l ed in by t h e cl ien t , in dica t in g t h e n u mber of secon ds t h a t h a ve el a psed sin ce t h e cl ien t st a r t ed t r yin g t o boot . Cl ien t IP a ddr ess; f il l ed in by cl ien t in BOOTREQUEST, if kn own . “You r ” (cl ien t ) IP a ddr ess; f il l ed in by t h e ser ver if t h e cl ien t doesn ’t kn ow it s own a ddr ess (i.e., cia ddr wa s a 0). Ser ver IP a ddr ess, r et u r n ed in t h e BOOTREPLY by t h e ser ver . Th e ga t ewa y’s IP a ddr ess of t h e por t t h a t r eceived t h e f ir st BOOTREQUEST. It is u sed in t h e BOOTREPLY f u n ct ion . Th e cl ien t ’s h a r dwa r e (MAC) a ddr ess. It is f il l ed in by t h e cl ien t . Opt ion a l . Th e ser ver h ost n a me bein g r equ est ed by t h e cl ien t . Al l ot h er ser ver s wou l d t h en ign or e t h is pa cket . Th e boot f il en a me. Th e ‘”gen er ic” n a me in t h e BOOTREQUEST. Th is is a n opt ion a l ven dor -specif ic f iel d. Exa mpl es of it s u se cou l d be a ser ia l n u mber , ver sion n u mber , et c. It is gen er a l l y ign or ed by BOOTP.

BOOTP Fiel d Def in it ion s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 308 Client Side (BOOTREQUEST) Th e f ol l owin g is t h e ser ies of st eps t a ken by t h e cl ien t

t o bu il d a BOOTREQUEST

pa cket : 1. Th e IP dest in a t ion a ddr ess (in t h e IP h ea der , n ot t h e BOOTP f iel ds) is set t o 255.255.255.255. Opt ion a l l y, it ma y set t h e a ddr ess t o t h e ser ver ’s IP a ddr ess, if it is kn own . 2. Th e IP sou r ce a ddr ess is set t o it s IP a ddr ess (if kn own ); ot h er wise, it is set t o 0. 3. Th e UDP por t n u mber s a r e set t o 67 f or UDP dest in a t ion por t (t h e ser ver ) a n d 68 f or t h e UDP sou r ce por t (t h e cl ien t ). 4. Th e op f iel d is set t o 1 (BOOT-REQUEST). 5. Th e h t ype is set t o t h e h a r dwa r e a ddr ess t ype (bit l en gt h ) a n d t h e h l en is set t o t h e l en gt h of t h e h a r dwa r e a ddr ess. 6. xid is set t o a r a n dom n u mber . 7. secs is set t o t h e n u mber of secon ds t h a t h a ve el a psed sin ce t h e cl ien t st a r t ed boot in g. 8. Th e cia ddr is set t o a n IP a ddr ess of t h e cl ien t (if kn own ); ot h er wise, it is set t o 0 a n d t h e ch a ddr is set t o t h e cl ien t ’s h a r dwa r e a ddr ess. 9. If t h e cl ien t wish es t o r est r ict boot in g t o a pa r t icu l a r ser ver n a me, it wil l set t h is n a me in t h e Sn a me f iel d; ot h er wise, t h e Sn a me f iel d is set t o 0. 10. Th e Fil e f iel d ca n be set t o 0 t o in dica t e t o t h e ser ver t h a t it wish es t o boot f r om t h e def a u l t f il e f or it s ma ch in e. Set t in g t h is f iel d t o 0 cou l d a l so in dica t e t h a t t h e cl ien t is in t er est ed in f in din g ou t cl ien t /ser ver /ga t ewa y IP a ddr esses a n d does n ot ca r e a bou t a f il e f r om wh ich t o boot . Th e f iel d cou l d be set t o a simpl e gen er ic n a me su ch a s ipboot or u n ixboot , in dica t in g t h a t it wish es t o boot t h e n a med pr ogr a m con f igu r ed f or t h e cl ien t . Fin a l l y, t h e f iel d ca n be set t o t h e f u l l pa t h n a me of t h e ser ver on wh ich t h e boot f il e r esides. 11. Th e Ven d f iel d is set t o wh a t ever t h e ven dor wish es. However , it is r ecommen ded t h a t t h e f ir st 4 byt es be set t o a “ma gic” n u mber (t h a t is, you pick it ). Th is a l l ows t h e ser ver t o det er min e wh a t kin d of in f or ma t ion it is seein g in t h is f iel d.

If n o r epl y is r eceived by t h e cl ien t wit h in a pr eset l en gt h of t ime, t h e cl ien t wil l r et r a n smit t h e r equ est u p t o a n a dmin ist er ed a mou n t of t imes. Th e r et r a n smission is r egu l a t ed in t h a t it wil l r a n doml y sen d r et r a n smission r equ est s. Th is is t o en su r e t h a t t h e n et wor k wil l n ot be f l ooded wit h r equ est s sh ou l d cl ien t s someh ow syn c t h eir t r a n smission s (pu r el y by coin ciden ce). Bef or e r et r a n smission , t h e Secs f iel d is u pda t ed.

Cl ien t Side (BOOTREQUEST)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 309 Server Side Wh en t h e ser ver

r eceives t h e pa cket , a ser ies of decision s t a kes pl a ce:

• If t h e UDP dest in a t ion por t is n ot set t o 67, t h en t h e ser ver wil l disca r d t h e pa cket . • If t h e Ser ver f iel d (sn a me) is set t o 0 or ma t ch es ou r n a me, f u r t h er pr ocess t h e pa cket . • If t h e ser ver n a me does n ot ma t ch ou r n a me, bu t t h e n a me is l oca l on t h e n et wor k, t h en disca r d t h e pa cket . • If t h e ser ver n a me is n ot on t h e l oca l n et wor k, t h e ser ver ma y ch oose t o f or wa r d t h e pa cket t o t h a t ser ver . Usu a l l y, t h is is a ccompl ish ed via t h e BOOTP r el a y ser vice (expl a in ed in a momen t ). • If t h e Cia ddr f iel d is 0, t h en t h e cl ien t does n ot kn ow it s IP a ddr ess, so t h e ser ver wil l l ook t h is u p in it s da t a ba se If n o ma t ch is f ou n d f or t h is ch a ddr , t h en disca r d t h e pa cket . Ot h er wise, t h e Yia ddr f iel d is f il l ed in on t h e r espon se pa cket . • Th e Fil en a me f iel d is t h en ch ecked. If t h is f iel d con t a in s a 0, t h en t h e cl ien t is eit h er n ot in t er est ed in a boot f il e or wish es t o u se t h e def a u l t boot f il e. If t h er e is a f il en a me specif ied, or a def a u l t f il e is f ou n d, or t h e f iel d con t a in s a f u l l l en gt h pa t h n a me, t h en t h e Fil e f iel d is r epl a ced wit h t h e f u l l -l en gt h pa t h n a me of t h e sel ect ed boot f il e. If t h e f iel d is set t o a n on -0 a n d n o ma t ch is f ou n d f or t h is f iel d on t h is ser ver , t h en t h e cl ien t is a skin g f or a f il e t h a t t h e ser ver does n ot h a ve, a n d t h e ser ver wil l disca r d t h e pa cket . • Fin a l l y, t h e Ven d f iel d is ch ecked a n d if a r ecogn iz ed t ype of da t a is pr ovided, cl ien t -specif ic a ct ion s sh ou l d be t a ken a n d a r espon se f r om t h ese a ct ion s is pl a ced in t h e Ven d Da t a f iel d of t h e Repl y pa cket . Th is f iel d, f or exa mpl e cou l d con t a in con f igu r a t ion opt ion s t h a t ca n be pa ssed t o t h e boot f il e t h a t wil l be t r a n smit t ed t o t h e cl ien t a f t er t h e BOOTP is f in ish ed.

Ser ver Side • Th e Sia ddr f iel d is set t o t h e ser ver ’s a ddr ess a n d t h e Op f iel d is set t o a BOOTREPLY. Th e UDP dest in a t ion por t is set t o 68 (BOOTP cl ien t ). • If t h e Cia ddr a ddr ess of t h e BOOT-REQUEST is set t o a n on -0 a ddr ess, t h en t h e pa cket is IP r ou t ed ba ck t o t h e cl ien t . However , if t h e Gia ddr is set t o a n on -0, t h en t h e BOOTREPLY is sen t dir ect l y t o t h is r ou t er a n d t h e UDP dest in a t ion por t is set t o BOOTPS (67). Ot h er wise, t h e cl ien t is l oca l a n d t h e BOOTREPLY is sen d ba ck t o t h e cl ien t on t h e l oca l LAN.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 310 Chicken-or-the-Egg? Dilemma A qu est ion sh ou l d come t o min d h er e f or

t h ose wh o h a ve been f ol l owin g a l on g: If t h e cl ien t does n ot yet kn ow it s IP a ddr ess, h ow is it goin g t o r espon d t o t h e ser ver ’s ARP r equ est wh en t h e ser ver decides t o r espon d? Wel l , if t h e cl ien t kn ows it s IP a ddr ess (a s in dica t ed in t h e Cia ddr f iel d), t h e BOOTREPLY ca n be sen t a s a n or ma l IP pa cket , sin ce t h e cl ien t wil l r espon d t o ARPs. Bu t if t h e cl ien t does n ot yet kn ow it s IP a ddr ess, t h en t h e cl ien t ca n n ot r espon d t o ARPs sen t by t h e ser ver . Th er e a r e t wo opt ion s a va il a bl e: If t h e ser ver h a s t h e ca pa bil it y t o ma n u a l l y con st r u ct a n ARP en t r y in it s t a bl e f or t h is cl ien t , it wil l do so u sin g t h e Ch a ddr a n d Yia ddr f iel ds t h a t it is r espon din g wit h in it s BOOTREPLY (BSD Un ix h a s t h is ca pa bil it y). Th e ser ver wil l t h en r epl y u sin g IP ser vices a n d skip t h e ARP pr ocess. If t h e ser ver does n ot h a ve t h is ca pa bil it y, t h en it simpl y sen ds t h e BOOTREPLY wit h t h e IP a ddr ess set t o Br oa dca st (B). Th is even t is sh own in t h e t a bl e. Chic ke n-o r -t he -Eg g ? Dil e mma • If t h e cl ien t does n ot yet kn ow it s IP a ddr ess, h ow does it r espon d t o ARP r equ est s du r in g a ser ver r espon se? • If t h e cl ien t kn ows it s IP a ddr ess, t h is is n ot a pr obl em. • Two opt ion s: • Simpl y sen d t h e r epl y set t o br oa dca st • Th e ser ver ca n ma n u a l l y con st r u ct t h e ARP en t r y u sin g t h e f iel ds in t h e r eceived r equ est

c iaddr n on -0 0.0.0.0 0.0.0.0

g iaddr X n on -0 0.0.0.0

B X X 0

UDP De st inat io n BOOTCl ien t (68) BOOTPSer ver BOOTPCl ien t (68)

IP De st inat io n cia ddr gia ddr yia ddr

Link De st inat io n n or ma l n or ma l ‘ch a ddr ’

0.0.0.0

0.0.0.0

1 BOOTPCl ien t (68)

255.255.255.255

Pr eviou s Ta bl e of Con t en t s Next

br oa dca st X

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 311 BOOTP Relay Agents (or BOOTP Gateway) Th e BOOTP oper a t ion a l so con sider s t h e possibil it y t h a t

cl ien t s a n d ser ver s ma y n ot be on t h e sa me IP n et wor k or su bn et (t h ose n et wor k segmen t s n ot sepa r a t ed by a r ou t er ). Th er ef or e, some kin d of r el a y a gen t is n eeded t o f or wa r d t h e BOOTP messa ges. Th is t ype of ser vice is most common l y f ou n d a s pa r t of t h e r ou t er f u n ct ion ; h owever , it is mor e t h a n a r ou t er simpl y r eceivin g a BOOTP messa ge a n d f or wa r din g it on t o t h e n ext segmen t . Ba sica l l y, t h e r ou t er r eceives t h e messa ge, pr ocesses it a s if t h e messa ge wa s a ddr essed t o it , a n d t h en sen ds ou t a n ew BOOTP messa ge t o t h e a ppr opr ia t e f or wa r ded por t . Th e f or wa r din g (scope) of a BOOTP or DHCP pa cket ca n be l imit ed by con f igu r in g t h e r ou t er t o l imit t h e scope. Ea ch r ou t er in cr emen t s t h e TTL f iel d. If t h e r eceived pa cket h a s it s l imit a l r ea dy set in t h e TTL f iel d, t h e pa cket wil l be disca r ded. Al so, t h e r ou t er mu st be con f igu r ed a s t o wh ich por t s t h e r ou t er sh ou l d f or wa r d t h is pa cket on . It is n ot simpl y f or wa r ded t o on e por t . Wh en t h e r ou t er f or wa r ds t h e pa cket on , if it is t h e f ir st r ou t er t o do so, it wil l pl a ce it s a ddr ess in t h e Gia ddr f iel d of t h e pa cket . It kn ows t h a t it is t h e f ir st r ou t er beca u se t h is f iel d is set t o 0.0.0.0. Wh en a r ou t er f or wa r ds t h e pa cket , it f or wa r ds it set t o Br oa dca st . Cisco en a bl es t h is f ea t u r e a s IP h el per -a ddr ess. Th is f ea t u r e a l l ows f or mor e t h a n ju st BOOTP pa cket s t o be f or wa r ded a cr oss t h e r ou t er . Ba sica l l y, a n y UDP br oa dca st a ddr ess ca n be f or wa r ded a cr oss t h e r ou t er .

BOOTP Re l ay Ag e nt s (Or BOOTP Gat e way) • Used wh en r equ est s a n d ser ver s a r e n ot on t h e sa me n et wor k. • Sepa r a t ed by a r ou t er • Need some t ype of a gen t t h a t ca n f or wa r d t h ese r equ est s over a r ou t er : • Rou t er mu st be a wa r e of t h is beca u se r ou t er s do n ot f or wa r d messa ges a ddr essed in br oa dca st • Rou t er r eceives a messa ge a n d r esen ds it a s if t h e r ou t er h a d sen t it : • Pl a ces it s a ddr ess in t h e Gia ddr f iel d • Ca n set t h e scope f iel d t o l imit t h e f or wa r din g of t h e r equ est .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 312 Dynamic Host Configuration Protocol (DHCP) Wh ich ca me f ir st , BOOTP or

DHCP? Wh ich on e does bot h ? Wh y do you h ea r a bou t BOOTP ever y t ime somet h in g is wr it t en a bou t DHCP? Sin ce t h e pr ot ocol is ba sed on a br oa dca st mech a n ism, wh y a n d h ow do t h ese pr ot ocol s oper a t e in a r ou t ed en vir on men t ? In f a ct , wh y do we n eed a n ot h er con f igu r a t ion mech a n ism wh en we h a ve DRARP (Dyn a mic Rever se Addr ess Resol u t ion Pr ot ocol ) a n d ICMP (In t er n et Con t r ol Messa ge Pr ot ocol )? DRARP a ddr esses t h e pr obl em of IP a ddr ess a ssign men t a n d h ost s ca n u se ICMP t o f in d ou t t h e su bn et ma sk f or a n et wor k a n d t o dyn a mica l l y discover r ou t er s, r igh t ? An d, sin ce we con sider a r ou t er t o somet imes be a h ost , does DHCP pr ovide con f igu r a t ion in f or ma t ion f or a r ou t er ? Or , h a ve you f or got t en a bou t t h ose ca pa bil it ies? Dynamic Ho st Co nf ig ur at io n Pr o t o c o l (DHCP) • DHCP bu il ds on t h e BOOTP pr ot ocol . • Pr oba bl y best kn own f or it s IP a ddr ess l ea sin g ca pa bil it y. • Con f igu r ed a s: • DHCP Cl ien t • DHCP Ser ver • BOOTP Rel a y Agen t • Bin din g

DHCP is ga in in g con sider a bl e a t t en t ion du e t o a n u mber of f a ct or s: t igh t a ddr ess a l l oca t ion r est r ict ion s, wh ich r equ ir es ef f icien t a ssign men t or r ea ssign men t of IP a ddr esses (IP a ddr esses a r e in sh or t su ppl y a n d a r e h a n ded ou t ver y ca r ef u l l y. DHCP of f er s u s t h e ca pa bil it y of h a n din g t h em ou t st a t ist ica l l y ba sed on pr oba bil it y. Th er ef or e, we ca n h a ve ma n y u ser s a n d n ot a s ma n y IP a ddr esses.). Th is ch a pt er expl a in s t h e DHCP pr ot ocol . Th e DHCP pr ot ocol f or t h e pu r poses of t h is

wr it in g ca n f u l l y in t er oper a t e wit h BOOTP ser ver s a n d cl ien t s. Ter ms u sed in t h e DHCP pr ot ocol a r e a s f ol l ows: DHCP Cl ie nt : A h ost t h a t is r equ est in g con f igu r a t ion in f or ma t ion . DHCP Se r ve r : A DHCP h ost s t h a t su ppl ies con f igu r a t ion pa r a met er s t o a r equ est in g h ost . BOOTP Re l ay Ag e nt : Th e pr ot ocol t h a t a l l ows BOOTP a n d DHCP pa cket s t o t r a ver se a r ou t er . Binding : Con f igu r a t ion pa r a met er s, in cl u din g a n IP a ddr ess, t h a t a r e “bou n d t o” a h ost .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 313 DHCP DHCP pr ovides a t r a n spor t

mech a n ism f or pa ssin g con f igu r a t ion in f or ma t ion (t h a t is l oca t ed on a ser ver ) t o r equ est in g h ost s on a TCP/IP n et wor k. Wh a t kin d of pa r a met er s a r e u sed f or t h is in f or ma t ion ? Th e pa r a met er in f or ma t ion is ba sed on t h e h ost r equ ir emen t s RFCs (RFCs 1122, 1123, 1112, et c.) Af t er bein g su ppl ied wit h t h is con f igu r a t ion in f or ma t ion , t h e h ost sh ou l d be a bl e t o commu n ica t e wit h a n y ot h er h ost on t h e In t er n et . It is t r u e t h a t DHCP is ba sed on BOOTP, bu t it a dds mu ch mor e f u n ct ion a l it y in cl u din g t h e a bil it y t o “l ea se” IP n et wor k a ddr esses. DHCP a l so u ses some of t h e f ea t u r es of BOOTP (r el a y a gen t , f or f or wa r din g t h e messa ges a cr oss r ou t er s) a n d is in t er oper a bl e wit h exist in g BOOTP cl ien t s (RFC 1534 descr ibes t h e in t er oper a bil it y f u n ct ion s of BOOTP a n d DHCP). Th e DHCP messa ges a r e in t h e exa ct sa me f or ma t a s BOOTP. Ref er t o t h e sl ide. DHCP a dds t h e a bil it y t o su ppor t “l ea sed” IP a ddr esses a n d ot h er f u n ct ion s. Th is a l l ows r equ est in g st a t ion s t o get t h eir IP a ddr esses f r om a ser ver a n d t h en r et u r n t h em wh en t h ey a r e f in ish ed. Th ese a dded f u n ct ion s a r e descr ibed in RFC 2132. DHCP con sist s of t wo pa r t s: a pr ot ocol f or del iver in g h ost -specif ic con f igu r a t ion pa r a met er s, a n d t h e a bil it y t o a l l oca t e IP a ddr esses. It is ba sed on a cl ien t /ser ver model in wh ich t h e h ost r equ est s in f or ma t ion f r om a ser ver . A h ost ca n a sk a specif ic ser ver t o su ppl y in f or ma t ion t o it , or it ma y simpl y r el y on a n y ser ver t o r el a y in f or ma t ion t o it . A ser ver mu st be pr econ f igu r ed t o h a n dl e a specif ic cl ien t ’s r equ est , or t h e ser ver wil l ign or e t h e r equ est . Th e f ir st ser vice pr ovided by DHCP is st a t ic st or a ge of n et wor k pa r a met er s f or r equ est in g cl ien t s. Th is in f or ma t ion is st or ed in a da t a ba se (or t a bl e) on a h ost ser ver . Th e en t r ies a r e “keyed.” Th is mea n s t h a t a u n iqu e iden t if ier is u sed t o sin gl e ou t t h e pa r a met er s of a r equ est in g h ost . Th is iden t if ier is st a t ed a s t h e “cl ien t iden t if ier ” (or Ch a ddr ), a n d t h e a ssign ed n et wor k a ddr ess, a n d u n iqu el y iden t if ies t h e l ea se bet ween t h e cl ien t a n d t h e ser ver f or DHCP.

DHCP • Pr ovides a t r a n spor t mech a n ism f or pa ssin g con f igu r a t ion in f or ma t ion t o r equ est in g h ost s. • Con f igu r a t ion in f or ma t ion is ba sed on t h a t specif ied in RFCs 1112, 1122, a n d 1123. • DHCP a n d BOOTP a r e in t er oper a bl e. • DHCP messa ges a r e in t h e sa me f or ma t a s BOOTP. • DHCP is con sider ed t o do t wo t h in gs: • IP a ddr ess a l l oca t ion • Del iver y of con f igu r a t ion in f or ma t ion • Con f igu r a t ion in f or ma t ion is st or ed in a da t a ba se t a bl e on t h e DHCP ser ver : • Cl ien t specif ies wh ich pa r a met er s it is l ookin g f or in t h e Ven dor Ext en sion s f iel d of t h e r equ est pa cket

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 314 IP Address Allocation IP Addr e ss Al l o c at io n • Au t oma t ic Al l oca t ion : per ma n en t l y a ssign s a n IP a ddr ess t o a st a t ion . • Dyn a mic Al l oca t ion : a ssign s a n IP a ddr ess t o a r equ est in g st a t ion f or specif ied a mou n t of t ime. • Ma n u a l Al l oca t ion : pr econ f igu r es t h e ser ver t o give t h e r equ est in g st a t ion t h e sa me IP a ddr ess ever y t ime it r equ est s it .

Th e n ext

ser vice t h a t DHCP pr ovides f or is IP a ddr ess a l l oca t ion . Th r ee met h ods a r e su ppor t ed: a u t oma t ic a l l oca t ion , dyn a mic a l l oca t ion , a n d ma n u a l a l l oca t ion . Au t oma t ic a l l oca t ion per ma n en t l y a ssign s a n IP a ddr ess t o a r equ est in g h ost . Dyn a mic a l l oca t ion gives a n IP a ddr ess t o a r equ est in g h ost f or a specif ic a mou n t of t ime. Ma n u a l a l l oca t ion is t h e a bil it y t o r econ f igu r e a n IP a ddr ess f or a h ost , a n d t h e ser ver simpl y r el a ys t h a t in f or ma t ion wh en t h e h ost r equ est s it s IP a ddr ess. Th is dif f er s f r om a u t oma t ic a l l oca t ion in t h a t wit h ma n u a l a l l oca t ion , t h e IP a ddr ess is pr econ f igu r ed f or t h e h ost by t h e syst em a dmin ist r a t or , wh er ea s t h e a u t oma t ic a l l oca t ion gives a n a r bit r a r y a ddr ess (f r om a pool of IP a ddr esses) t o a r equ est in g h ost . In ot h er wor ds, t h e h ost is n ot pr econ f igu r ed wit h t h e IP a ddr ess f or t h a t h ost .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 315 DHCP Messages Th e f ol l owin g messa ge t ypes a r e u sed wit h cl ien t /ser ver

in t er a ct ion :

• DHCPDISCOVER : Th is is a cl ien t br oa dca st t h a t is u sed t o l oca t e a va il a bl e ser ver s. It ma y be f or wa r ded by r ou t er s t o a l l ow f or ser ver segmen t s. • DHCPOFFER : Th is is a ser ver -t o-cl ien t r espon se t o a DHCPDISCOVER messa ge wit h a n of f er of con f igu r a t ion pa r a met er s. • DHCPREQUEST : Th is is a cl ien t messa ge t o ser ver s f or : • Requ est in g of f er ed pa r a met er s f r om on e ser ver a n d impl icit l y decl in in g of f er s f r om a l l ot h er s. • Con f ir min g cor r ect n ess of pr eviou sl y a l l oca t ed a ddr esses, (e.g., syst em r eboot ). • Ext en din g t h e l ea se on a pa r t icu l a r n et wor k a ddr ess. • DHCPACK : Th is is a ser ver -t o-cl ien t messa ge t h a t con t a in s con f igu r a t ion pa r a met er s, in cl u din g a commit t ed n et wor k a ddr ess. • DHCPNAK : Th is is a ser ver -t o-cl ien t messa ge in dica t in g t h e cl ien t ’s n ot ion of n et wor k a ddr ess is in cor r ect (e.g., cl ien t h a s moved t o n ew su bn et ) or a cl ien t ’s l ea se h a s expir ed. • DHCPDECLINE : Th is is a cl ien t -t o-ser ver messa ge in dica t in g a n et wor k a ddr ess is a l r ea dy in u se. • DHCPRELEASE : Th is is a cl ien t -t o-ser ver messa ge r el in qu ish in g a n et wor k a ddr ess a n d ca n cel in g t h e r ema in in g l ea se. • DHCPINFORM: New wit h RFC 2131, t h is is a cl ien t -t o-ser ver messa ge a skin g on l y f or l oca l con f igu r a t ion pa r a met er s; t h e cl ien t a l r ea dy h a s a n ext er n a l l y con f igu r ed n et wor k a ddr ess.

DHCP Me ssag e s • • • • • • • •

DHCPDISCOVER DHCPOFFER DHCPREQUEST DHCPACK DHCPNAK DHCPDECLINE DHCPRELEASE DHCPINFORM

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 316 DHCP Operation Fir st , a cl ien t

t r a n smit s a DHCPDISCOVER messa ge on it s l oca l ph ysica l su bn et . Bot h t h e IP dest in a t ion a ddr ess a n d t h e MAC dest in a t ion a ddr ess a r e set t o br oa dca st . Th e IP sou r ce a ddr ess is set t o 0x00000000 a n d t h e MAC sou r ce a ddr ess is set t o Ch a ddr , or t h e cl ien t ’s h a r dwa r e a ddr ess. Th e cl ien t ma y pl a ce in t h is messa ge some opt ion s t h a t in cl u de a n IP a ddr ess a n d t h e l ea se du r a t ion . If t h e cl ien t h a s pl a ced a “su ggest ed” IP a ddr ess in t h e Opt ion s f iel d, t h e cl ien t h a s been pr eviou sl y con f igu r ed u sin g DHCP a n d is n ow r est a r t in g a n d wou l d l ike t o u se t h a t a ddr ess a ga in . If t h e cl ien t wa s ma n u a l l y con f igu r ed wit h a n IP a ddr ess, t h e cl ien t sh ou l d u se t h e DHCPINFORM messa ge in st ea d of t h e DHCPREQUEST messa ge. On e f ea t u r e t h a t t h e cl ien t ma y u se is t o obt a in a specif ic l ist of pa r a met er s. Th e cl ien t ma y in dica t e t h is by u sin g t h e “pa r a met er r equ est l ist ,” wh ich in dica t es t o t h e ser ver wh ich pa r a met er s, by t a g n u mber , t h e cl ien t is specif ica l l y in t er est ed in . See RFC 2132 f or mor e in f or ma t ion on DHCP opt ion s. Th is messa ge wil l be picked u p by t h e r ou t er s t h a t impl emen t t h e BOOTP r el a y a gen t a n d f or wa r ded t o ot h er n et wor k segmen t s. Aga in , you ca n l imit t h e scope (h ow ma n y r ou t er s it ca n t r a ver se). Th e Hops f iel d (set t o 0 by t h e cl ien t ) is in cr emen t ed (u su a l l y by 1) wit h ea ch r ou t er a n d t h e a dmin ist r a t or of t h e r ou t er set s t h e ma ximu m h op cou n t . If t h e r eceived pa cket h a s a h op cou n t of 2 a n d t h e Ma x Hops pa r a met er con f igu r ed in t h e r ou t er is 3, t h e r ou t er wil l set t h e Hops f iel d t o 3 a n d f or wa r d t h e pa cket . If t h e r eceived pa cket a l r ea dy h a s a 3 in t h e Hops f iel d, t h e r ou t er is n ot a l l owed t o in cr emen t t h e f iel d t o a 4 a n d it wil l disca r d t h e pa cket . Th is is kn own a s t h e scope (r a n ge) of t h e DHCP pa cket .

DHCP Oper a t ion

Ea ch a ct ive ser ver t h a t r eceives t h is messa ge ma y r espon d wit h a DHCPOFFER messa ge t h a t in cl u des a n IP a ddr ess in t h e Yia ddr f iel d of t h e pa cket . Not a l l ser ver s wil l r espon d. Some ma y be pr econ f igu r ed t o n ot r espon d t o cer t a in r equ est s, a n d ot h er s ma y n ot h a ve t h e bin din g f or t h a t cl ien t . It ma y a l so a ppea r in va r iou s Opt ion f iel ds a s wel l . Th e ser ver does n ot h a ve t o t a ke t h e of f er ed IP a ddr ess of f t h e a va il a bl e l ist , bu t it does h el p wh en t h e ser ver does r emove t h is of f er ed IP a ddr ess f r om it s a va il a bil it y pool . At t h is t ime, t h e ser ver ma y ch eck f or cu r r en t u se of t h e of f er ed IP a ddr ess by sen din g a n ICMP ECHO r equ est u sin g t h e of f er ed IP a ddr ess. Th is is con f igu r a bl e.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 317 DHCP Responses Respon ses f r om t h e ser ver

ca n be a ddr esses in a f ew dif f er en t wa ys:

• If t h e Gia ddr f iel d of t h e r eceived cl ien t pa cket is set t o 0 a n d t h e Cia ddr f iel d is set t o a n on -0, t h en r espon ses a r e t o be sen t a s u n ica st t o t h e cl ien t u sin g t h e yia ddr a s t h e dest in a t ion IP a ddr ess a n d t h e ch a ddr a s t h e dest in a t ion MAC a ddr ess. (Gia ddr f iel d set t o 0 in dica t es t h e cl ien t is on t h e l oca l su bn et ). • If t h e Gia ddr f iel d is set t o a n on -0 va l u e, t h en t h e r espon se is sen t t o t h e BOOTP Rel a y a gen t u sin g t h e IP a ddr ess in dica t ed by t h e Gia ddr f iel d. • If t h e br oa dca st bit wa s set , t h en t h e ser ver br oa dca st s (IP a n d MAC a ddr esses) it s r espon ses t o t h e cl ien t . Usin g t h e B bit a l l ows t h e cl ien t t o in dica t e t o a pot en t ia l ser ver t h a t it ca n n ot r eceive u n ica st IP da t a gr a ms bef or e it s TCP/IP con f igu r a t ion h a s been set . If t h e ser ver r eceives a DHCPREQUEST messa ges wit h a n in va l id “r equ est ed IP a ddr ess,” t h e ser ver sh ou l d r espon d t o t h e cl ien t wit h a DHCPNAK messa ge a n d r epor t t h is er r or in a l og. Th e cl ien t ma y r eceive on e or mor e of f er s f r om dif f er en t ser ver s. Th e cl ien t wil l sel ect on e of t h e ser ver s f r om t h e r espon ses t h a t cl osel y ma t ch it s or igin a l r equ est pa r a met er s. If t h e cl ien t does n ot r eceive a r espon se t o it s DHCPREQUEST, it wil l t imeou t , a n d r et r a n smit a DHCPREQUEST messa ge. To r espon d t o a DHCPOFFER, t h e cl ien t t r a n smit s a DHCPREQUEST. In t h e Opt ion s f iel d of t h is messa ge is t h e ser ver iden t if ier (t h e ser ver ’s IP a ddr ess) in dica t in g wh ich ser ver t h e cl ien t h a s sel ect ed. Al l ot h er ser ver s wil l pa r t ia l l y ign or e t h is messa ge. However , t h ose decl in ed ser ver s do u se t h is messa ge t o in dica t e t h a t t h e cl ien t wil l n ot be u sin g t h eir ser vices, a n d t h is r el ea ses t h e of f er ed IP a ddr ess ba ck t o t h e a va il a bl e pool . Th e sel ect ed ser ver commit s t h is bin din g t o a pl a ce in memor y wh er e it wil l be st or ed. (A bin din g is a key t h a t is u sed t o l ook u p in f or ma t ion . For exa mpl e, t h e pr ecedin g en t r y

cou l d be a n IP-a ddr ess-t o-cl ien t -h a r dwa r e a ddr ess.) Th e ser ver wil l r espon d t o t h e cl ien t wit h a DHCPACK messa ge con t a in in g a l l t h e cl ien t ’s con f igu r a t ion pa r a met er s. Th is bin din g is in dica t ed a s t h e client identifier, a n d t h e a ssign ed IP a ddr ess. Wh en t h e cl ien t r eceives t h e DHCPACK, it wil l per f or m some f in a l ch ecks, su ch a s ARPin g f or t h e n ewl y a ssign ed IP a ddr ess t o en su r e t h a t n o on e el se is a ssign ed t o t h is a ddr ess. If t h er e a r e a n y in con sist en cies, t h e cl ien t wil l sen d a DHCPDECLINE messa ge t o t h e ser ver a n d a f t er wa it in g 10 secon ds (it sh ou l d wa it a t l ea st 10 secon ds), it wil l r est a r t t h e con f igu r a t ion pr ocess. Al so, if t h e ser ver t r a n smit t ed a DHCPNAK messa ge t o t h e cl ien t , t h e cl ien t wil l r est a r t (a f t er 10 secon ds).

DHCP Respon ses

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 318 Releasing an IP Address To “gr a cef u l l y” st op u sin g t h e a ssign ed IP a ddr ess, t h e cl ien t

sh ou l d t r a n smit a DHCPRELEASE messa ge t o t h e ser ver (u sin g t h e sa me keyed bin din g t h a t it u sed t o get t h e a ddr ess f r om t h a t ser ver ). Th is ma y occu r bef or e t h e l ea se du r a t ion is u p.

Rel ea sin g a n IP Addr ess

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 319 DHCP Shortcuts DHCP Sho r t c ut s • A cl ien t ma y skip t h e DHCPDISCOVER if it kn ows t h e ser ver a ddr ess t h a t it wa n t s t o t a l k t o. • Ser ver wil l r espon d wit h a DHCP ACK. • If t h e ser ver r espon ds wit h a DHCPNAK, t h e cl ien t ca n n ot u se t h e pa r a met er s it specif ied in t h e DHCPREQUEST: • Rest a r t wit h DHCPDISCOVER • DHCPINFORM messa ge ca n be u sed by a cl ien t t o in f or m a ser ver t h a t it h a s a n IP a ddr ess bu t wou l d l ike some pa r a met er s. • Repl y is in u n ica st

A simpl er

a ppr oa ch is u sed f or t h ose cl ien t s t h a t wer e pr eviou sl y ser viced by DHCP. Th e cl ien t ma y skip t h e DHCP Discover messa ge a n d in st ea d t r a n smit a DHCPREQUEST messa ge. A ser ver wil l t h en r espon d wit h a DHCPACK messa ge t o f il l in t h e cl ien t ’s con f igu r a t ion pa r a met er s. If a n y of t h e con sist en cy ch ecks come ba ck a s in va l id, t h e ser ver wil l r espon d wit h a DHCPNAK messa ge, mea n in g t h a t t h e cl ien t ma y n ot r eu se t h e r equ est ed IP a ddr ess. Th e cl ien t wil l r est a r t t h e pr ocess u sin g t h e l on ger met h od (i.e., st a r t in g wit h DHCPDISCOVER). Th e DHCPINFORM messa ge ca n be u sed by t h e cl ien t t o in f or m a ser ver t h a t it a l r ea dy h a s a n IP a ddr ess (t h r ou gh a ma n u a l con f igu r a t ion pr ocess) bu t it wou l d l ike a down l oa d of some con f igu r a t ion pa r a met er s t h a t ma y be set f or it in t h e ser ver bin din gs. Th e r epl y f r om t h e ser ver is u n ica st (a ma jor dif f er en ce f r om a l l of t h e ot h er DHCP messa ges, wh ich a r e br oa dca st ) dir ect l y ba ck t o t h e cl ien t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 320 Lease Duration Timer s bet ween t h e ser ver

a n d cl ien t ma y be dif f er en t . Th er e is n ot a syn ch r on iz a t ion of t imer s bet ween cl ien t s a n d ser ver s u sin g DHCP. Th is ma y l ea d t o a pr obl em in t h a t t h e ser ver a ssu mes t h e l ea se is u p bef or e t h e cl ien t does (beca u se of t h e possibil it y of t h e in a ccu r a cy of t h e cl ocks). To compen sa t e f or t h is, t h e DHCP ser ver ma y r et u r n a l ea se sma l l er t h a n r equ est ed by t h e cl ien t . Bu t t h is is on l y in r espon se t o t h e cl ien t . Th e ser ver wr it es t h e or igin a l t ime in t o it s bin der y. Th is ma y or ma y n ot be a ccompl ish ed; it depen ds on h ow t h e devel oper in t er pr et ed t h e RFC. A cl ien t t r a n smit s a DHCPREQUEST f or t h e u se of a n IP a ddr ess f or a cer t a in per iod of t ime. Th e ser ver gu a r a n t ees n ot t o h a n d ou t a n a l l oca t ed IP a ddr ess t h a t is in u se by a n ot h er cl ien t . Fu r t h er mor e, t h e ser ver wil l t r y t o r ea l l oca t e t h e sa me IP a ddr ess t o a r equ est in g cl ien t ea ch t ime it r equ est s a n IP a ddr ess. Th e l en gt h of t ime t h a t a cl ien t u ses a n IP a ddr ess is kn own a s t h e lease. If a cl ien t n eeds t o ext en d t h e l ea se, it ma y su bmit t h ese r equ est s t o t h e ser ver . It is u n der st ood bet ween t h e cl ien t a n d t h e ser ver t h a t if t h e ser ver does n ot r eceive a messa ge f r om t h e cl ien t in dica t in g t h a t t h e cl ien t wou l d l ike t o ext en d t h e l ea se, t h e ser ver a ssu mes t h a t t h e cl ien t is n o l on ger u sin g t h e IP a ddr ess, a n d t h e l ea se expir es. However , a DHCP ser ver does n ot a u t oma t ica l l y r eu se expir ed l ea sed IP a ddr esses. Th e ser ver wil l con t in u e down t h e n u mber of IP a ddr esses a n d a ssign t h ose t h a t h a ve n ot been a ssign ed u n t il it exh a u st s it s l ist of IP a ddr esses. Wh en t h is occu r s, t h e ser ver wil l r ea l l oca t e a n IP a ddr ess t h a t wa s pr eviou sl y a ssign ed bu t h a s expir ed. Th e ser ver ma y pr obe t h e n et wor k t o see if t h e a ddr ess is st il l bein g u sed by simpl y sen din g a n ICMP ECHO r equ est a n d wa it in g f or a r epl y. As a n ot h er con sist en cy ch eck, t h e h ost wit h t h e n ewl y a ssign ed a ddr ess ma y issu e a n ARP t o see if t h e a ddr ess h a s a l r ea dy been a ssign ed t o a n ot h er h ost . Not ice, h owever , t h e RFC pl a ces t h ese ch ecks a s “SHOULD,” wh ich mea n s t h e impl emen t er of t h e pr ot ocol sh ou l d impl emen t t h e f ea t u r e, bu t it is n ot r equ ir ed. You ma y wa n t t o a sk bef or e impl emen t in g a specif ic ven dor ’s DHCP code.

Le ase Dur at io n • Th e l en gt h of t ime t h a t a cl ien t h a s sol e u se of a n IP a ddr ess is kn own a s a l ea se. • Lea se du r a t ion is n egot ia t ed bet ween t h e cl ien t a n d t h e ser ver du r in g t h e Requ est /Of f er pr ot ocol . • Th er e is n o syn ch r on iz a t ion of t imer s bet ween t h e ser ver a n d a cl ien t : • A ser ver ma y gr a n t a sma l l er t ime t h a n r equ est ed t o t h e cl ien t , bu t wr it e t h e or igin a l t ime in it s da t a ba se. • To ext en d t h e l ea se, t h e cl ien t mu st r equ est t h is of t h e ser ver : • If t h er e is n ot a n ext en sion r equ est , t h e l ea se expir es. • Times a r e ba sed on a 32-bit in t eger : • Dif f er en t impl emen t a t ion s a l l ow f or dif f er en t ma ximu m l en gt h s.

DHCP impl emen t a t ion s ma y va r y, bu t t h e l ea se t ime is a 32-bit u n sign ed in t eger . Th is n u mber is expr essed in secon ds, wh ich a l l ows f or a l ea se t ime in t h e r a n ge of 1 secon d t o (a ppr oxima t el y) 136 yea r s—l on ger t h a n I pl a n t o be in t h is bu sin ess! Accor din g t o RFC 2131, t h er e is n o min imu m l ea se t ime r equ ir emen t .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 321 Efficiencies Cl ien t s u su a l l y do n ot

n eed a l l t h e con f igu r a t ion pa r a met er s t h a t a r e a va il a bl e u sin g DHCP. To bu il d some ef f icien cy in t o t h is pr ot ocol , t h e pr ot ocol a ssu mes def a u l t s. Host r equ ir emen t RFCs (1122, 1123) n a me t h e def a u l t f or t h e pa r a met er s. Wh en t h e cl ien t r eceives t h e DHCPNAK pa cket s t h a t con t a in con f igu r a t ion in f or ma t ion , a l ot of t h e in f or ma t ion wil l n ot be in cl u ded. Th e h ost a ssu mes t h a t def a u l t va l u e f or a n yt h in g n ot con t a in ed in t h e DHCPNAK messa ge.

An ot h er qu est ion sh ou l d h a ve come in t o you r min d by n ow (if you wer e pa yin g a t t en t ion ). If a h ost is u sin g DHCP f or it s in it ia l con f igu r a t ion , h ow does it kn ow t o a ccept TCP/IP pa cket s wh en TCP/IP h a s n ot been f u l l y in it ia l iz ed in t h e h ost ? To wor k a r ou n d t h is pr obl em, DHCP u ses t h e Fl a gs f iel d. Th e f iel d is 16 bit s in l en gt h , bu t on l y 1 bit is u sed. Th e ot h er 15 mu st be set t o 0. Th e bit t h a t is u sed is ca l l ed t h e Broadcast bit, or B bit. An y st a t ion t h a t ca n n ot r eceive u n ica st da t a gr a ms (u su a l l y sen t by BOOTP Rel a y a gen t s a n d ser ver s on DHCPOFFER, DHCPACK, a n d DHCPNAK messa ges) mu st set t h is bit on DHCPDISCOVER a n d DHCPREQUEST messa ges. DHCP ser ver s pr ocessin g t h e r equ est wil l ma r k t h is bit a n d t r a n smit t h eir r espon ses a s br oa dca st in bot h t h e IP h ea der a n d t h e MAC h ea der . If t h e br oa dca st bit is set t o 0, t h e r espon ses of t h e ser ver wil l be t r a n smit t ed a s u n ica st , wit h t h e IP a ddr ess set t o Yia ddr a n d t h e MAC dest in a t ion a ddr ess set t o Ch a ddr . Fin a l l y, a cl ien t ma y u se t h e DHCPRELEASE messa ge t o gr a cef u l l y sh u t down or t o in dica t e t o t h e DHCP ser ver t h a t t h e cl ien t n o l on ger n eeds t h e IP a ddr ess a ssign ed by t h e ser ver . Th e cl ien t does n ot h a ve t o u se t h is messa ge a n d ma y simpl y l et t h e l ea se expir e.

Ef f ic ie nc ie s • Not a l l pa r a met er s a r e n eeded: • Ext en sive u se of def a u l t s • Set a ccor din g t o t h e Host Requ ir emen t RFCs 1122, 1123 • Host a ssu mes t h e def a u l t va l u e f or a n yt h in g n ot con t a in ed in t h e DHCPACK messa ge. • DHCP ma kes u se of t h e Fl a gs f iel d t o wor k a r ou n d t h e ch icken -a n d-t h e-egg pr obl em of IP a ddr ess a n d ARP r espon ses.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 322 Operational Tables Ope r at io nal Tabl e s • Th e pa ge con t a in s t h e DHCP f iel ds a n d t h e pr ocesses t h a t set or r eset t h e f iel ds. Ope r at io nal Tabl e s (c o nt inue d) • Th e pa ge con t a in s t h e DHCP f iel ds a n d t h e pr ocesses t h a t set or r eset t h e f iel ds.

Fie l d DHCPOFFER op BOOTREPLY h t ype (Fr om RFC 1700,“Assign edNu mber s”) h l en (Ha r dwa r e a ddr ess l en gt h in oct et s) h ops 0 xid xid f r om cl ien t DHCPDISCOVER messa ge secs 0 cia ddr 0

DHCPACK BOOTREPLY

DHCPNAK BOOTREPLY

0 xid f r om cl ien t DHCPREQUEST messa ge 0 cia ddr f r om DHCPREQUEST or 0

0 xid f r om cl ien t DHCPREQUEST messa ge 0 0

yia ddr

sia ddr

f l a gs

gia ddr

ch a ddr

sn a me f il e

opt ion s Fie l d

IP a ddr ess IP a ddr ess of f er ed t o cl ien t a ssign ed t o cl ien t IP a ddr ess of IP a ddr ess of n ext n ext boot st r a p ser ver boot st r a p ser ver f l a gs f r om cl ien t f l a gs f r om cl ien t DHCPDISCOVER DHCPREQUEST messa ge messa ge gia ddr f r om gia ddr f r om cl ien t cl ien t DHCPDISCOVER DHCPREQUEST messa ge messa ge ch a ddr f r om ch a ddr f r om cl ien t cl ien t DHCPDISCOVER DHCPREQUEST messa ge messa ge Ser ver h ost n a me Ser ver h ost n a me or opt ion s or opt ion s Cl ien t boot Cl ien t boot f il en a me f il en a me or opt ion s or opt ion s opt ion s opt ion s DHCPDISCOVER DHCPINFORM BOOTREQUEST (f r om RFC 1700, “Assign ed Nu mber s”) (Ha r dwa r e a ddr ess l en gt h in oct et s) 0 Sel ect ed by cl ien t

DHCPREQUEST

0

0

f l a gs f r om cl ien t DHCPREQUEST messa ge gia ddr f r om cl ien t DHCPREQUEST messa ge ch a ddr f r om cl ien t DHCPREQUEST messa ge (u n u sed) (u n u sed)

(u n u sed)

DHCPDELCINE DHCPRELEASE op BOOTREQUEST BOOTREQUEST h t ype (f r om RFC 1700, “Assign ed (f r om RFC 1700, Nu mber s”) “Assign ed Nu mber s”) h l en (Ha r dwa r e a ddr ess l en gt h in (Ha r dwa r e a ddr ess oct et s) l en gt h in oct et s) h ops 0 0 xid xid f r om ser ver Sel ect ed by cl ien t DHCPOFFER messa ge secs 0 or secon ds sin ce DHCP 0 or secon ds sin ce DHCP 0 pr ocess h a s st a r t ed pr ocess h a s st a r t ed 0 or cl ien t ’s n et wor k a ddr ess 0 (DHCPDECLINE) or cia ddr 0 (DHCPDISCOVER) or cl ien t ’s n et wor k cl ien t ’s n et wor k a ddr ess (bou n d/r en ew/r ebin d) a ddr ess (DHCPRELEASE) (DHCPINFORM) yia ddr 0 0 0 sia ddr 0 0 0

f l a gs

Set Br oa dca st bit if cl ien t r equ ir es a br oa dca st r espon se gia ddr 0 ch a ddr Cl ien t ’s h a r dwa r e a ddr ess sn a me Opt ion s, if in dica t ed in sn a me/f il e opt ion ; ot h er wise, u n u sed f il e Opt ion s, if in dica t ed in sn a me/f il e opt ion ; ot h er wise, u n u sed Opt ion s Opt ion s

Set Br oa dca st bit if cl ien t

0

r equ ir es a br oa dca st r espon se 0 Cl ien t ’s h a r dwa r e a ddr ess Opt ion s, if sn a me/f il e u n u sed Opt ion s, if sn a me/f il e u n u sed Opt ion s

0 Cl ien t ’s h a r dwa r e a ddr ess

in dica t ed in opt ion ; ot h er wise, (u n u sed) in dica t ed in (u n u sed) opt ion ; ot h er wise,

Pr eviou s Ta bl e of Con t en t s Next

(u n u sed)

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 323 RFCs to Be Reviewed RFCs t o Be Re vie we d • • • •

951: “Boot st r a p Pr ot ocol (BOOTP)” 1534: “In t er oper a t ion bet ween DHCP a n d BOOTP” 2131: “Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP)” 2132: “DHCP a n d BOOTP Ven dor Ext en sion s”

951: “Boot st r a p Pr ot ocol (BOOTP).” Th is in cl u des in f or ma t ion on t h e Rel a y Agen t . 1534: “In t er oper a t ion bet ween DHCP a n d BOOTP.” 2131: “ Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP).” (obsol et es 1541) 2132: “DHCP Opt ion s a n d BOOTP Ven dor Ext en sion s.” (obsol et es 1533)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 324 Resource Reservation Protocol (RSVP) QoS (Qu a l it y of Ser vice) is cu r r en t l y l imit ed t o ma n u a l

it ems su ch a s f il t er s, pr ot ocol pr ior it iz a t ion (f a n cy f il t er s), compr ession , n et wor k design , a n d f a t pipes. Most of t h ese t ech n iqu es a r e a ppl ied t o WAN por t s. Wh il e t h ese in t er im sol u t ion s wor k wel l , ma n y a ppl ica t ion s su ch a s voice a n d video a r e r u n n in g on LANs a n d WANs. Th er e is a n ot h er st ep t o pr ovidin g QoS wit h br oa dca st n et wor ks—RSVP. RSVP pr ovides a gen er a l f a cil it y f or cr ea t in g a n d ma in t a in in g dist r ibu t ed r eser va t ion st a t es a cr oss u n ica st or mu l t ica st en vir on men t s. It is n ot su pposed t o be t h e QoS t h a t r iva l s ATM’s gu a r a n t eed QoS. It sh ows pr omise a s t h e f ir st of ma n y en t r ies in t o bu il din g QoS f or exist in g br oa dca st or ien t ed n et wor ks wit h ou t h a vin g t o t ea r ou t a n et wor k a n d r epl a ce it wit h ATM. Qu a l it y of Ser vice h a s n ever been bu il t in t o most pr ot ocol s t h a t a r e cu r r en t l y r u n n in g on n et wor ks t oda y. Wh en Et h er n et wa s in ven t ed in t h e l a t e 1970s, 10 Mega bit s seemed a h u ge-en ou gh pipe t o give a n y ba n dwidt h -h u n gr y a ppl ica t ion mor e t h a n en ou gh r oom. However , a ba n dwidt h -h u n gr y a ppl ica t ion is n ot t h e cu l pr it ; t h e cu l pr it is mil l ion s of ba n dwidt h -h u n gr y users. Per son a l iz in g t h e compu t er wa s n ot t h ou gh t t o h a ve a gr ea t impa ct on t h e bu sin ess wor l d. Ma in f r a mes a n d min icompu t er s wer e expect ed t o con t in u e t o be t h e compu t in g sou r ce of ch oice; h owever , t h e PC ch a n ged t h a t . Af t er a f ew yea r s, t h e per son a l compu t er beca me a bl e t o h a n dl e soph ist ica t ed gr a ph ics, a n d ma n y dif f er en t opt ion s of voice a n d video soon beca me a va il a bl e. Con n ect ion t o t h e In t er n et beca me a mu st -h a ve a s wel l .

Re so ur c e Re se r vat io n Pr o t o c o l (RSVP) • QoS a bil it ies on most IP n et wor ks a r e u su a l l y a bou t f il t er s, pr ot ocol pr ior it iz a t ion (f a n cy f il t er s), compr ession , a n d f a t pipes (f a st or giga bit Et h er n et ). • QoS n ever seemed l ike a pr essin g issu e u n t il t h e Web. • Ca n n ot con t in u e t o simpl y pr ovide f or f a t t er pipes. • We mu st f in d a wa y t o a l l ow mu l t imedia t o wor k on t h e exist in g in f r a st r u ct u r e. • ATM is n ot a n a l t er n a t ive f or most impl emen t a t ion s.

Sh a r ed Et h er n et a n d Token Rin g n et wor ks cou l d n ot pr ovide t h e ba n dwidt h n ecessa r y t o su ppor t n ot on l y ba n dwidt h -in t en sive a ppl ica t ion s t h a t a r e n et wor k a wa r e, bu t t h e mil l ion s of per son a l compu t er u ser s a s wel l . Et h er n et h a s sin ce sca l ed t o 100 Mega bit s per secon d a n d Giga bit Et h er n et is ma kin g in r oa ds a s wel l . Th e vir t u a l l y l imit l ess sca l a bil it y of t h e ATM pr ot ocol is t h e f ir st commer cia l pr ot ocol t h a t h a s QoS sca l ea bl e pa r a met er s bu il t in ; h owever , ATM is st il l l ess t h a n 1 per cen t of a l l deskt op in st a l l a t ion s. An d t h er e a r e ma n y con su mer s t h a t wil l n ot t ea r down t h eir Et h er n et or Token Rin g n et wor ks a n d r epl a ce it wit h ATM ju st t o get QoS a n d sca l ea bl e ba n dwidt h . Con su mer s wa n t QoS, bu t t h ey wa n t it wit h t h eir exist in g n et wor ks.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 325 Alternatives Al t e r nat ive s • Et h er n et a l l ows u s some sca l in g wit h t h r ee speeds. • ToS of f er s dif f er en t pa t h s ba sed on a n a ppl ica t ion r equ est . • RSVP is a pr ot ocol u sef u l wh er e impr oved Qu a l it y of Ser vice (QoS) wou l d en h a n ce t r a n smission of a n a ppl ica t ion ’s da t a st r ea m a n d cr ea t e h igh er r el ia bil it y of it s r ecept ion a t t h e r eceivin g en dst a t ion (s). • An exa mpl e wh er e RSVP wou l d be a ppr opr ia t e wou l d be a n a ppl ica t ion f or st r ea min g video t o t h e deskt op, in a mu l t ica st en vir on men t , in a r ou t ed in f r a st r u ct u r e.

Sin ce it s in cept ion , IP h a s h a d a f iel d kn own a s Type of Ser vice (ToS). Th e ToS is f or in t er n et ser vice qu a l it y sel ect ion a n d is specif ied a l on g t h e a bst r a ct pa r a met er s of pr eceden ce, del a y, t h r ou gh pu t , r el ia bil it y, a n d cost . Th ese a bst r a ct pa r a met er s a r e ma pped in t o t h e a ct u a l ser vice pa r a met er s of t h e pa r t icu l a r n et wor ks t h e da t a gr a m t r a ver ses. Fil e t r a n sf er s cou l d t a ke a h igh -del a y n et wor k wh il e t er min a l a ccess cou l d t a ke on e wit h l ow del a y (r ef er t o Pa r t III, t h e IP Pr ot ocol ). In or der t o pr ovide f or t h is, r ou t er ven dor s h a ve t o pr ovide f or ToS in t h eir r ou t er s, a n d a ppl ica t ion ven dor s h a ve t o bu il d t h is in t o t h eir a ppl ica t ion s. For r ou t er s, t h is ca n r equ ir e t h e ma in t en a n ce of mu l t ipl e r ou t in g t a bl es f or ea ch ToS. Th e a ppl ica t ion pr ogr a m is t h e pr ogr a m t h a t set s t h ese bit s a n d in t h e pa st , most a ppl ica t ion pr ogr a ms moved da t a a n d t h er e r ea l l y wa s n o dema n d f or ToS. Over t h e yea r s, we simpl y ca me u p wit h f a st er n et wor ks t o compen sa t e f or t h e mil l ion s of n ew u ser s a n d ba n dwidt h -h u n gr y a ppl ica t ion s—t h e ea sy wa y t o su ppor t QoS is t o ma n ipu l a t e t h e ba n dwidt h . Giga bit Et h er n et n ow a l l ows u s t h r ee ch oices f or Et h er n et : 10, 100, or 1000 Mbps. Th is a l l ows f or sca l in g bu t n ot f or da t a QoS. Ba n dwidt h is simpl y on e f a ct or in t h e equ a t ion . Al so, wh a t comes a f t er giga bit Et h er n et (t h e cu r r en t Pr oposa l is 10 giga bit

Et h er n et )? Af t er t h is we a r e f in a l l y movin g in t o t h e ca pa bil it ies of ATM; h owever , we st il l r u n in t o cu st omer r esist a n ce t o ATM con ver sion . Th ey wil l pl a ce ATM on t h e ba ckbon e a n d possibl y u se it f or t h e WAN, bu t n ot t o t h e deskt op. We ca n n ot keep pr odu cin g mor e ba n dwidt h wit h ou t givin g some con sider a t ion t o t a min g t h e a ppl ica t ion s. RSVP is t h e f ir st widel y kn own pr ot ocol t o a l l ow f or some t ype of QoS on a n exist in g br oa dca st -or ien t ed n et wor k. As of t h is wr it in g, it is st il l a n RFC dr a f t , wit h t h e l a t est ver sion bein g t h e f u n ct ion a l specif ica t ion of Ma y 1997. It ca n be u sed wit h IPv6 or IPv4. RSVP cover s t h e QoS por t ion of pr ot ocol s opt imiz ed f or r ea l -t ime, st r ea min g, mu l t imedia issu es. It oper a t es dir ect l y on t op of IP a n d su ppor t s bot h u n ica st a n d mu l t ica st pr ot ocol s. Th e oper a t ion of RSVP a ppea r s t o h a ve f a r gr ea t er a dva n t a ges wh en u sed in a mu l t ica st n et wor k. It is n ot a t r a n spor t pr ot ocol , bu t a con t r ol pr ot ocol l ike ICMP or IGMP. Wit h IPv4, RSVP oper a t es wit h UDP, bu t wit h IPv6, it wil l oper a t e on t op of IP u sin g t h e ext en sion h ea der con cept .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 326 Where It Will Be Used Let ’s be u p f r on t : RSVP is n ot

design ed t o pr ovide QoS f or t h e en t ir e In t er n et . It s or igin a l design wa s t o a l l ow QoS f or mu l t imedia a ppl ica t ion s on sma l l er n et wor ks. It is design ed t o a l l ow a ppl ica t ion s t o ch oose a mon g mu l t ipl e, con t r ol l ed l evel s of del iver y ser vice f or t h eir da t a pa cket s. It r eser ves n et wor k r esou r ces a l on g t h e t r a n smission pa t h of a da t a st r ea m. It commu n ica t es bet ween sen din g a n d r eceivin g h ost s, bu t t h e cr ea t ion of t h e r eser va t ion is a ccompl ish ed by t h e r eceivin g h ost a n d on l y in on e dir ect ion f or da t a f l ows. On ce t h e r eser va t ion is ma de, r ou t er s bet ween t h e sen der a n d r eceiver ma in t a in t h e r eser va t ion . Fin a l l y, it is n ot a r epl a cemen t f or a n y of t h e QoS of f er in gs in ATM. Ma n y see it a s t h e migr a t or y st ep in movin g t o ATM. Like ToS in t h e IP h ea der (IPv4), a ppl ica t ion s mu st be RSVP a wa r e. Th e u ser a ppl ica t ion is t h e on e t h a t ma kes u se of RSVP. As of t h is wr it in g, t h er e a r e ju st a f ew a ppl ica t ion s t h a t ma ke u se of RSVP; f or exa mpl e, Win Sock (t h e API f or Win dows a ppl ica t ion s) is QoS a wa r e st a r t in g wit h Win Sock 2. Appl ica t ion s t h a t a r e n ot RSVP a wa r e ma y be a bl e t o u se RSVP t ool -kit s or dia l er pr ogr a ms, wh ich a r e secon da r y a ppl ica t ion s t h a t ca n ma ke a r equ est f or you bef or e st a r t in g you r a ppl ica t ion . Appl ica t ion s su ch a s t h ose t h a t a r e ma kin g u se of ot h er In t er n et pr ot ocol s (su ch a s Rea l Time Pr ot ocol (RTP), a n d t h e Rea l Time St r ea min g Pr ot ocol (RTSP) a r e bet t er su it ed t o RSVP. Whe r e It Wil l Be Use d • RSVP cover s t h e QoS por t ion of pr ot ocol s opt imiz ed f or r ea l -t ime, st r ea min g, a n d mu l t imedia issu es: • RTSP: Rea l -Time St r ea min g Pr ot ocol —App La yer • RTP: Rea l -Time Tr a n spor t Pr ot ocol s (RFC 1889) • RTCP: Fl ow/Con t r ol Mech a n isms (RFC 1890) • RSVP: IETF Dr a f t -14 (QoS)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 327 Operation Ope r at io n • A ba sic RSVP r eser va t ion r equ est (Resv messa ge) con sist s of a flowspec a n d a filter spec t h a t t oget h er a r e ca l l ed a “flow descriptor.” • flowspec def in es: • Ser vice cl a ss desir ed (Gu a r a n t eed or Con t r ol l ed-l oa d) • Reser va t ion r equ est ed (Rspec) • Descr ipt ion of t h e da t a f l ow (Tspec) • filter spec, wit h t h e session specif ica t ion , def in es t h e da t a “f l ow” t o r eceive t h e QoS def in ed by t h e flowspec.

Reser va t ion r equ est s a r e ma de by t h e r eceiver , n ot

t h e sen der . Wh y? Th e r eceiver bet t er u n der st a n ds it s l oca l pa r a met er s (su ch a s LAN t ype) a n d is bet t er a bl e t o ma ke a n in t el l igen t r equ est t h a n a ser ver ; ot h er wise, we wou l d h a ve t o con f igu r e t h e ser ver t o kn ow ever y a spect of it s possibl e r eceiver s. For exa mpl e, if a ser ver mu st ma ke a ba n dwidt h r eser va t ion , h ow wou l d it kn ow t h a t a r eceiver is on Et h er n et , Token Rin g, FDDI, or ATM? How wou l d a ser ver kn ow t h e t ype of compu t er ma kin g t h e r eser va t ion ? Wh y does t h is ma t t er ? Speed. An ATM st a t ion sh ou l d be a bl e t o ma ke a r equ est l a r ger t h a n a n Et h er n et st a t ion simpl y beca u se t h e ba n dwidt h is a va il a bl e. An a ppl ica t ion on a h ost u ses RSVP t o r equ est specif ic QoS f r om t h e n et wor k f or pa r t icu l a r da t a st r ea ms or f l ows f r om t h e a ppl ica t ion .

Th e oper a t ion of RSVP is ba sed on t wo con cept s: flows a n d reservations. RSVP r eser ves r esou r ces ba sed on a f l ow. Fl ows a r e t r a f f ic st r ea ms (da t a ) f r om a sen der t o a r eceiver , or possibl y t o mu l t ipl e r eceiver s. Th e f l ow is def in ed by t h e dest in a t ion IP a ddr ess a n d, opt ion a l l y, a dest in a t ion por t . RSVP ma y a l so def in e t h e f l ow by u sin g t h e Fl ow La bel f iel d in t h e IPv6 h ea der in con ju n ct ion wit h t h e sou r ce IP a ddr ess. In combin a t ion wit h t h e f l ow, RSVP det er min es t h e QoS t h a t a f l ow r equ ir es. QoS det er min es t h e n et wor k

r esou r ces f or t h e f l ow. RSVP does n ot in t er pr et t h e f l owspec, bu t it does give t h a t in f or ma t ion t o h ost s a n d r ou t er s a l on g t h e f l ow’s pa t h . Th ose syst ems ca n exa min e t h e f l owspec t o see if t h ey h a ve t h e r esou r ces t o a ccept t h e r eser va t ion , a n d if t h ey a ccept it t h ey u se t h e f l owspec t o r eser ve t h e r equ ir ed r esou r ces. As st a t ed bef or e, t h e r eceiver s u sin g RSVP a ct u a l l y ma ke t h e r eser va t ion s. Th is is t o a l l evia t e t h e ser ver f r om bein g t h e over a l l a dmin ist r a t or of a l l t h e possibl e r eceiver s. Some r eceiver s a r e l oca t ed on Et h er n et , ot h er s on Token Rin g (speed dif f er en ces). Some ma y wa n t t o l ea ve t h e f l ow a t a n y t ime. Receiver s h a ve bet t er in depen den t con t r ol over t h emsel ves a n d t h is a l l ows f or f l exibil it y in RSVP. Th e r eser va t ion is spl it in t o t wo f u n ct ion s: on e is per f or med by t h e sen der , a n d on e is per f or med by t h e r eceiver . Ha vin g t h e r eceiver ma ke t h e r eser va t ion l ea ds t o a qu est ion : How does t h e r eceiver kn ow t h e pa t h by wh ich t h e f l ow wil l be f or wa r ded?” Th e sen der wil l sen d Pa t h messa ges t h a t wil l f ol l ow a pa t h f r om t h e sen der a n d be pr opa ga t ed by r ou t er s. Th e Pa t h messa ge descr ibes t h e f l ow t o a n y possibl e r eceiver s, a n d a l l ows r ou t er s t o get pr epa r ed f or a possibl e f l ow. It iden t if ies t h e f l ow t o t h e r ou t er s a n d a l er t s t h e r ou t er s t o t h e possibil it y of in comin g r eser va t ion r equ est s. For mu l t ica st , a Pa t h messa ge is sen t t o a dest in a t ion mu l t ica st a ddr ess.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 328 Path Messages Wh en a sen der

t r a n smit s a Pa t h messa ge, it wil l be r eceived by r ou t er s a l on g t h e pa t h . A r ou t er in ser t s it s own IP a ddr ess a s t h e messa ge’s l a st h op. As t h e Pa t h messa ge is pr opa ga t ed t h r ou gh t h e n et wor k, ea ch r ou t er n ot es t h e pr eviou s r ou t er ’s a ddr ess a n d t h en in ser t s it s own IP a ddr ess bef or e f or wa r din g t h e Pa t h messa ge on . Ha vin g ea ch r ou t er n ot e t h e l a st r ou t er ’s IP a ddr ess, f or a f l ow, a l l ows a r ou t er t h a t r eceives a r eser va t ion r equ est t o kn ow h ow t o f or wa r d t h a t r equ est ba ck in t h e dir ect ion of t h e sen der . Th is en su r es t h a t t h e r eceiver s wil l t a ke t h e cor r ect pa t h f or a pa r t icu l a r f l ow. Wh y? Most n et wor k design s h a ve mor e t h a n on e pa t h a n d a r eceiver ma y ma ke a r eser va t ion in a pa t h t h a t t h e sen der did n ot specif y. Pa t h messa ges ca n be sen t a t a n y t ime a n d r ou t er s ma in t a in t h e pa t h st a t e in wh a t is kn own a s a soft st a t e. Rou t er s ma in t a in t h e pa t h in f or ma t ion on l y f or a cer t a in per iod of t ime, a f t er wh ich t h ey wil l del et e t h e st a t e. Th is a l l ows f or dyn a mic f l exibil it y in t h e pa t h . A n ew pa t h (via t opol ogy ch a n ges) ma y be set u p t h a t r en der s t h e ol d pa t h obsol et e. A r ou t er ma y f a il in t h e pa t h a n d n o a l t er n a t e pa t h is a va il a bl e; t h er ef or e, t h e pa t h in f or ma t ion is obsol et e a n d n eeds t o be del et ed. Pat h Me ssag e s • Two f u n da men t a l RSVP messa ge t ypes: Path a n d Resv messa ges. • Path messa ges descr ibe: • Pr eviou s h op IP (RSVP_HOP or “PHOP”) • For ma t of t h e da t a t o come (Sen der Templ a t e w/f il t er spec) • Tr a f f ic ch a r a ct er ist ics of t h e da t a st r ea m (Sen der Tspec) a n d Adspec (OPWA) • Sen t en d-t o-en d f r om app host sender t o app host receiver, a l on g exist in g r ou t es, wit h t h e sa me a ddr essin g a s da t a pa cket s. • Path messa ges st or e path state in ea ch n ode a l on g t h e wa y (u sed by Resv messa ges)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 329 RSVP and Routers RSVP a l so r u n s in r ou t er s a n d wor ks in con ju n ct ion wit h t h e r equ est s bein g t r a n smit t ed by a n et wor k a ppl ica t ion . RSVP is u sed in r ou t er s t o f or wa r d QoS r equ est s t o a l l st a t ion s a l on g t h e pa t h or pa t h s of t h a t pa r t icu l a r f l ow. It is a l so u p t o t h e r ou t er s t o est a bl ish a n d ma in t a in a n RSVP st a t e. In ot h er wor ds, if a n a ppl ica t ion ma kes a n RSVP r equ est , ea ch r ou t er mu st f or wa r d it t o a n ot h er r ou t er en r ou t e t o t h e sou r ce; yes, t h e r ever se pa t h , r eceiver t o sen der . An RSVP pr ocess u ses t h e l oca l r ou t e t a bl e t o obt a in r ou t es. QoS is impl emen t ed by a col l ect ion of mech a n isms kn own a s traffic control. Th is in cl u des t h r ee mech a n isms: Pac ke t c l assif ie r : Det er min es t h e QoS cl a ss a n d possibl y t h e r ou t er f or ea ch pa cket . Admissio n c o nt r o l : Det er min es if r esou r ces a r e a va il a bl e t o a ccept or r eject a r equ est . Pac ke t sc he dul e r : Ach ieves t h e pr omised QoS f or ea ch ou t goin g in t er f a ce. Th e sl ide sh ows a bl ock dia gr a m f or RSVP. Two modu l es wit h in RSVP kn own a s admission control a n d policy control a r e u t il iz ed by a RSVP r equ est . Admission con t r ol det er min es wh et h er t h e n ode h a s t h e a va il a bl e r esou r ces t o a ccept t h e r equ est (sou n ds l ike Ca l l Admission Con t r ol u n der ATM, r igh t ?). Pol icy con t r ol det er min es t h e per mission r igh t s of t h e r equ est er . If eit h er of t h ese ch ecks f a il , t h e r equ est is disca r ded a n d a messa ge is sen t ba ck t o t h e r equ est er (t h e a ppl ica t ion t h a t ma de t h e r equ est ) in dica t in g t h e t ype of f a il u r e. If bot h of t h ese ch ecks cl ea r , t h en pa r a met er s a r e set in t h e pa cket cl a ssif ier a n d t h e pa cket sch edu l er in h opes of obt a in in g t h e r esou r ces r equ ir ed by t h e r equ est .

RSVP a n d Rou t er s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 330 RSVP Requests RSVP Re que st s • Resv messa ges: r eser va t ion r equ est s sen t h op by h op f r om host receiver(s) t o host sender a l on g t h e r ever se pa t h . • Ea ch RSVP-spea kin g r eceiver n ode f or wa r ds a Resv messa ge t o t h e u n ica st a ddr ess of t h e pr eviou s RSVP h op. • Resv messa ges cr ea t e a n d ma in t a in r eser va t ion st a t es in ea ch n ode a l on g t h e pa t h (s).

Th e most

ba sic RSVP r equ est con sist s of a f l ow descr ipt or . A f l ow descr ipt or con t a in s:

f l o wspe c : A r eser va t ion r equ est t h a t def in es a desir ed QoS a n d is u sed t o set pa r a met er s in a n ode’s pa cket sch edu l er . f il t e r spe c : Used t o def in e t h e set of pa cket s t o r eceive QoS a s def in ed in t h e f l ow spec a n d t o set pa r a met er s in t h e pa cket cl a ssif ier . RSVP is ba sed on session s a n d def in es a session a s a da t a f l ow wit h a pa r t icu l a r dest in a t ion a n d t r a n spor t -l a yer pr ot ocol . Ea ch session is ma in t a in ed in depen den t l y. It is def in ed by a combin a t ion of : De st inat io n addr e ss: A mu l t ica st or u n ica st dest in a t ion a ddr ess. Pr o t o c o l ID :(Pr ot ocol ID is 46) De st inat io n po r t : TCP or UDP por t n u mber or a n a ppl ica t ion -specif ic por t n u mber . Th is ma y be omit t ed wh en t h e dest in a t ion a ddr ess is mu l t ica st . Th er e a r e t wo messa ge t ypes sen t bet ween sen der s a n d r eceiver s f or r eser va t ion of r esou r ces. Th ese messa ges a r e n ot sen t r el ia bl y beca u se t h e pr ogr a m u ses IP dir ect l y:

Pat h: Sen t down st r ea m by t h e RSVP sen der h ost . Th is messa ge is f or wa r ded by r ou t er s u sin g t h e u n ica st /mu l t ica st r ou t in g t a bl e. Th ese messa ges st or e pa t h st a t e in ea ch f or wa r din g n ode. Th is in f or ma t ion in cl u des t h e u n ica st IP a ddr ess of t h e pr eviou s h op n ode. Th is is u sed t o r ou t e t h e Resv (sen t by a r eceiver in r espon se t o a Pa t h messa ge) messa ges in t h e r ever se pa t h . In a ddit ion , t h e Pa t h messa ge con t a in s in f or ma t ion on t h e f or ma t of da t a pa cket s t h a t t h e sen der wil l gen er a t e, t h e t r a f f ic ch a r a ct er ist ics of t h e da t a f l ow, a n d ma y ca r r y a dver t isin g in f or ma t ion kn own a s On e Pa ss wit h Adver t isin g (OPWA). Th is is kn own a s a n Adspec a n d a l l ows Pa t h messa ges t o ga t h er in f or ma t ion en r ou t e t o t h e r eceiver t h a t t h e r eceiver ca n u se t o pr edict en d-t o-en d ser vice. Re sv: Sen t u pst r ea m by t h e r eceiver t o t h e sen der . Th ey ca n eit h er be dist in ct or sh a r ed, a l l owin g f or u n iqu e r eser va t ion s t o occu r f or r eceiver s or a sin gl e sh a r ed r eser va t ion t h a t is sh a r ed a mon g a l l pa cket s of sel ect ed sen der s. Th ese messa ges a r e sen t u pst r ea m a l on g t h e t r ee u n t il it r ea ch es a poin t wh er e a n exist in g r eser va t ion is equ a l or gr ea t er t h a n t h a t bein g r equ est ed. At t h a t poin t , t h e r eser va t ion is a l r ea dy in pl a ce a n d does n ot n eed t o be f or wa r ded a n y f u r t h er .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 331 Reservation Style In t h is r eser va t ion r equ est

is a set of opt ion s t h a t a r e col l ect ivel y kn own a s t h e reservation style. Th ese opt ion s a l l ow f or shared or u n iqu e (distinct) r eser va t ion s. Exa mpl es of sh a r ed r eser va t ion s a r e f or t h ose in vokin g t h e u se of mu l t ica st . Video a n d a u dio a pps t h a t ma ke u se of mu l t ica st a r e gr ea t exa mpl es of t h is. Wh y h a ve mu l t ipl e r eser va t ion s f or t h ese r eceiver s wh en on e gu a r a n t eed pipe wil l do? Th e dist in ct t ype of r eser va t ion is f or on e-on -on e a ppl ica t ion s su ch a s a sma l l deskt op-t o-deskt op videocon f er en ce or wh en some ot h er t ype of h igh -pr ior it y, l ow-l oss da t a st r ea m is n eeded. Re se r vat io n St yl e • RSVP u ses sever a l r eser va t ion “st yl es” t o f it a va r iet y of a ppl ica t ion s wit h in Resv messa ges: • Styles a r e col l ect ive set s of opt ion s in cl u ded in t h e Resv r equ est messa ge • On e opt ion con cer n s t h e t r ea t men t of r eser va t ion s a s distinct or shared • An ot h er opt ion con t r ol s t h e sel ect ion of sen der s, be t h a t a n expl icit l ist or a wil dca r d impl emen t a t ion : • Wil dca r d-Fil t er (WF) st yl e • Fixed-Fil t er (FF) st yl e • Sh a r ed- Expl icit (SE) st yl e

A r eceiver ma y r equ est a con f ir ma t ion a n d wil l in dica t e t h is in t h e Resv messa ge a l on g wit h it s a ddr ess. On e t h e r eser va t ion is con f ir med eit h er u n iqu e or mer ged, a con f ir ma t ion messa ge is sen t . Th e ba sic r eser va t ion is compl et ed in on e pa ss. Th is mea n s t h a t t h e Resv messa ge is sen t f r om on e r ou t er t o a n ot h er in t h e r ever se pa t h t o t h e sen der . Ea ch r ou t er a l on g t h e wa y h a s t h e r igh t t o r eject a n Resv r equ est .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 332 RSVP Control Th ese opt ion s a l so a l l ow f or

t h e con t r ol of t h e sel ect ion of sen der s: explicit, wh ich a l l ows f or a sel ect ed gr ou p of sen der s (ea ch f il t er spec mu st ma t ch exa ct l y on e sen der ); or a wildcard t h a t impl icit l y sel ect s a l l t h e sen der s t o t h e session (n o f il t er spec is n eeded). Th ese st yl es def in e h ow r eser va t ion s a r e t r ea t ed f r om dif f er en t sen der s wit h in t h e sa me session , a n d if t h e r equ est s n eed t o meet a specif ic cr it er ia or n ot . Th er e a r e t h r ee t ypes: Wil dc ar d f il t e r t ype : Impl ies bot h t h e sh a r ed r eser va t ion a n d t h e wil dca r d sen der sel ect ion . Th is cr ea t es a sin gl e r eser va t ion sh a r ed by f l ows f r om a l l u pst r ea m n eigh bor s. You ca n t h in k of t h is a s a big pipe, compl et el y in depen den t of t h e n u mber of sen der s u sin g it , wh ich is sh a r ed by mu l t ipl e in pu t s t o t h e pipe. Th e siz e is simpl y t h e l a r gest of t h e r esou r ce r equ est s f r om a l l r eceiver s; it a u t oma t ica l l y ext en ds t o n ew sen der s a s t h ey a ppea r . Fixe d Fil t e r : Impl ies dist in ct r eser va t ion a n d expl icit sen der sel ect ion . Th is a l l ows a r eser va t ion t o be set u p f or pa cket s f r om a pa r t icu l a r sen der , wh ich a r e n ot sh a r ed wit h ot h er sen der s’ pa cket s, even f r om t h e sa me session . Th is st yl e ca n qu ickl y u se u p a l l a va il a bl e r esou r ces. Shar e d Expl ic it : Th is impl ies sh a r ed r eser va t ion a n d expl icit sen der . It cr ea t es a sin gl e r eser va t ion sh a r ed by sel ect ed, n ot a l l , u pst r ea m n eigh bor s.

RSVP Con t r ol

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 333 Disabling a Reservation Disabl ing a Re se r vat io n • Pa t h Tea r : Received by a l l r eceiver s down st r ea m a n d del et es t h e pa t h st a t e in ea ch n ode. • ResvTea r : del et es t h e r eser va t ion st a t e a n d t r a vel s u pst r ea m t owa r ds a l l sen der s f r om it s poin t of in it ia t ion : • Th is messa ge specif ies st yl es a n d f il t er s • Fl owspecs a r e ign or ed

Reser va t ion s a r e r emoved by Teardown messa ges. Th is is n ot

r equ ir ed, bu t is r ecommen ded. If a r eser va t ion is n ot r emoved by t h e a ppl ica t ion , it wil l even t u a l l y be r emoved by t h e r ou t er s—a Ref r esh messa ge h a s n ot been r eceived a n d wit h in a cer t a in a mou n t of t ime, t h e r eser va t ion mu st be r emoved. Th er e a r e t wo t ypes of Tea r down messa ges: Pat hTe ar : Received by a l l r eceiver s down st r ea m (f r om t h e poin t of in it ia t ion , n ot n ecessa r il y t h e sen der ) a n d del et es t h e pa t h st a t e (in r ou t er s, f or exa mpl e) a n d a l l depen den t r eser va t ion st a t e in ea ch n ode t h a t r eceives t h is in f or ma t ion . Re svTe ar : Del et es r eser va t ion st a t e a n d t r a vel s u pst r ea m t owa r ds a l l sen der s f r om it s poin t of in it ia t ion (a ga in , n ot n ecessa r il y t h e f in a l r eceiver ). Th is messa ge specif ies st yl e a n d f il t er s. An y f l owspec is ign or ed.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 334 Handling Errors RSVP messa ges a r e sen t

u n r el ia bl y beca u se t h e pr ogr a m u ses IP dir ect l y, simil a r t o IGMP or ICMP. Th e er r or messa ges t h a t RSVP u ses a r e Pa t h Er r a n d ResvEr r . Th is is a simpl ex pr ocess in t h a t a n er r or messa ge is sen t u pst r ea m t o t h e sen der t h a t cr ea t ed t h e er r or . Handl ing Er r o r s • RSVP messa ges a r e u n r el ia bl e. • Er r or messa ges a r e sen t u sin g t h e Pa t h Er r a n d ResvEr r . • Simpl ex pr ocess t h a t is sen t u pst r ea m t o t h e sen der t h a t cr ea t ed t h e er r or .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 335 Merging Flowspecs On e l a st

st a t emen t sh ou l d be ma de h er e, a poin t t h a t sh ou l d h a ve come u p a s a qu est ion a bou t mu l t ipl e r eser va t ion s bein g ma de a n d t h e a va il a bil it y of r esou r ces t o h a n dl es su ch r equ est s. Given t h e st a t e of t oda y’s r ou t er s, wou l dn ’t we simpl y r u n ou t of r esou r ces wit h in a sh or t a mou n t of t ime? Th e qu est ion is h a r d t o a n swer a n d depen ds on t h e ma n u f a ct u r er of t h e r ou t er . Some r ou t er s a r e h igh per f or ma n ce, possess mu l t ipl e pr ocessor s (some of t h em on t h e I/O ca r d), a n d h a ve l ot s of memor y, h igh -speed in t er f a ces, a n d so on . Me r g ing Fl o wspe c s • RSVP wil l a ccommoda t e t r a n spa r en t oper a t ion s t h r ou gh n on -RSVP-ca pa bl e devices or cl ou ds. • On e Pa ss Wit h Adver t isin g (OPWA) is a n RSVP en h a n cemen t t h a t ma y be u sed t o pr edict en d-t o-en d QoS. • RSVP wil l mer ge r eser va t ion s a s t h ey t r a vel u pst r ea m t o opt imiz e n et wor k r esou r ces. • RSVP u ses “st yl es” t o def in e specif ic opt ion s desir ed by t h e a ppl ica t ion .

Some r ou t er ven dor s do n ot su ppor t t h is. Th er ef or e, it is h a r d t o t el l h ow t h is con t r ol pr ot ocol (RSVP) is goin g t o wor k on r ou t er s. Th er e a r e some ef f icien cies in t h e RSVP pr ot ocol it sel f . On e of t h em is ca l l ed merging flowspecs. Mu l t ipl e r eser va t ion r equ est s f r om dif f er en t n ext h ops f or t h e sa me session a n d wit h t h e sa me f il t er spec wil l h a ve on l y on e r eser va t ion on t h a t in t er f a ce. Con t a in ed in t h e Resv messa ge f or wa r ded t o a pr eviou s h op is t h e “l a r gest ” of t h e f l owspecs r equ est ed by t h e n ext h ops t o wh ich t h e da t a f l ow wil l be sen t . In ot h er wor ds, f l owspecs ca n be cu mu l a t ive or mer ged.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 336 A Simple Example An RSVP mu l t ica st

exa mpl e is given wit h t h e t h ou gh t of r ea l -t ime a n d n on r ea l -t ime. Mu l t ica st t en ds t o be a ba n dwidt h h og a n d a s so, is t h e f ir st exa mpl e u sed. Bef or e a session ca n be cr ea t ed, it mu st be iden t if ied. Th is is a ccompl ish ed u sin g t h e Dest Addr ess, Pr ot ocol ID a n d Dest Por t [opt ion a l ], wh ich mu st be pr opa ga t ed t o a l l t h e sen der s a n d r eceiver s. Th e f ol l owin g occu r s du r in g a session set u p: • Th e r eceiver join s a mu l t ica st gr ou p u sin g IGMP. • An RSVP-a wa r e a ppl ica t ion st a r t s t o sen d Pa t h messa ges t o t h e mu l t ica st dest in a t ion a ddr ess, wh ich wil l be r eceived by a l l r eceiver s in t h e mu l t ica st gr ou p. • A r eceiver sen ds a Resv messa ge, specif yin g t h e desir ed f l ow descr ipt or s. Th ese wil l be r eceived by t h e sen der . • Th e sen der st a r t s sen din g t h e da t a pa cket s. On ce t h e r equ est h a s been a ccept ed a n d pr ocessed, t h e r esou r ces a r e r eser ved, bu t t h ey a r e in a soft state. A sof t st a t e is on e t h a t h a s a n en t r y, bu t r equ ir es some ma in t en a n ce t o st a y a l ive. If t h is ma in t en a n ce is n ot a ppl ied, t h e en t r y wil l be del et ed. Th is sof t st a t e ma in t a in s t h e r eser va t ion , a n d it is t h e Pa t h a n d Resv messa ges t h a t a r e u sed t o ma in t a in t h is sof t st a t e. Th is mea n s t h e r esou r ces est a bl ish ed ca n be modif ied dyn a mica l l y a s ch a n ges occu r . Th is sof t st a t e is ma in t a in ed by RSVP sen din g r ef r esh messa ges a l on g t h e pa t h t o in dica t e t o t h e r ou t er s a n d n odes t o keep t h e r esou r ces ma in t a in ed. If t h ese Ref r esh messa ges a r e n ot r eceived, a n RSVP r esou r ce t imes ou t a n d is del et ed.

A Simpl e Exa mpl e

Th is sl ide sh ows t h e f l ow of t h e a ct u a l

r eser va t ion messa ge f r om t h e RSVP App h ost .

A Simpl e Exa mpl e (con t in u ed)

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 337 Issues Won ’t

a r ou t er become over wh el med wit h ea ch r eceiver ma kin g RSVP r equ est s?

No. Fir st , a n y r ou t er h a s t h e ca pa bil it y of r eject in g a r equ est . Secon d, RSVP is ma in t a in ed in t h e r ou t er via a sof t st a t e. A r eser va t ion wil l be t or n down wh en it is n ot n eeded. Th ir d, RSVP a l l ows f or t h e con cept of merging. Th is a l l ows r equ est s t o be mer ged t oget h er (sh a r ed) wh en a r eser va t ion equ a l in g t h e siz e of t h e r equ est is a l r ea dy in pl a ce. Wil l RSVP wor k in a r ea s t h a t do n ot su ppor t it ? Yes. Th e a bil it y t o simpl y “f l ip a swit ch ” a n d a l l r ou t er s on t h e In t er n et a r e RSVP ca pa bl e is n ot a r ea l it y. In 1983, we did “f l ip a swit ch ” a n d a l l r ou t er s (IMPs) a n d h ost s wer e r u n n in g t h e TCP/IP pr ot ocol , bu t t oda y we h a ve mil l ion s of r ou t er s con n ect ed t o t h e In t er n et , a n d movin g sl owl y is t h e met h od. Th er ef or e, RSVP wil l be impl emen t ed sl owl y on t h e In t er n et . We a l so n eed some RSVP-a wa r e a pps. RSVP wor ks wit h n on -RSVP en vir on men t s; h owever , t h e n on -RSVP en vir on men t s ca n n ot pr ovide a n y r eser va t ion . RSVP Pa t h messa ges a r e f or wa r ded wit h ou t pr obl ems beca u se t h ey u se t h eir l oca l u n ica st of mu l t ica st r ou t in g t a bl es. In t h e Pa t h messa ge is t h e IP a ddr ess of t h e l a st RSVP-ca pa bl e n ode bef or e t h e messa ge t r a ver sed a n on -RSVP n ode. In t h is wa y, a Resv messa ge is t h en f or wa r ded dir ect l y t o t h e n ext RSVP-ca pa bl e r ou t er on t h e pa t h ba ck t owa r ds t h e sou r ce. Fu r t h er mor e, t h er e is a bit set t in g t h a t RSVP sen ds t o t h e l oca l t r a f f ic con t r ol mech a n ism wh en it kn ows t h a t t h er e a r e n on -RSVP n odes h ops in t h e pa t h t o a given sen der . Th is a l l ows t h e r ou t er t o combin e t h is wit h ot h er sou r ces of in f or ma t ion t o f or ewa r d a messa ge a l on g t h e pa t h t o r eceiver s u sin g Adspecs.

Issue s • Rou t er s h a ve t h e ca pa bil it y of r eject in g a r equ est a n d r equ est s ca n be mer ged. • Wor ks in a r ea s t h a t a r e n ot su ppor t in g it . • To ma ke u se of RSVP, a ppl ica t ion s mu st be RSVP a wa r e, a n d t h er e a r e f ew: • Apps ma y be r ewr it t en t o u se QoS-sen sit ive APIs su ch a s Win Sock 2 • Exist in g a pps ma y u se RSVP Dia l er pr ogr a ms or t ool kit s in st ea d • In t r a n et ver su s In t er n et u sa ge. • In t er n et ISPs comin g u p wit h bil l in g pr ocedu r es f or cl ien t s wh o desir e QoS ca pa bil it ies

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 338 RSVP Summary RSVP Summar y • Resou r ce ReSer Va t ion Pr ot ocol (RSVP) is a pr ot ocol u sed t o r eser ve n et wor k r esou r ces a l on g t h e t r a n smission pa t h (s) of a da t a st r ea m: • Th e goa l bein g t o obt a in opt ima l QoS f or t h a t a ppl ica t ion in st a n ce • RSVP commu n ica t es bet ween sen din g a n d r eceivin g h ost s wit h t h e r eceiver s cr ea t in g t h e a ct u a l r eser va t ion f or t h e session : • Reser va t ion s a r e ma de by r eceiver s upstream ba ck t owa r ds t h e sen der (s) • Th e f ocu s of r eser va t ion s is on Net wor k l a yer r esou r ces in in t er con n ect in g devices (i.e., r ou t er s, or devices a ct in g a s r ou t er s)

Th e f ol l owin g sl ide su mma r iz es t h e ch a pt er . Th e f ol l owin g sl ide is a con t in u a t ion of t h e su mma r y. RSVP Summar y (c o nt inue d) • RSVP oper a t es on t op of IP, occu pyin g t h e pl a ce of a Tr a n spor t pr ot ocol a n d wor ks a s a n internet control pr ot ocol simil a r t o ICMP. • Su ppor t s u n ica st a n d mu l t ica st pr ot ocol s: • Design ed t o a ccommoda t e l a r ge, h et er ogen eou s gr ou ps of u ser s wit h dyn a mic member sh ips a n d t opol ogy • RSVP is u n idir ect ion a l , or on l y ma kes r eser va t ion s in on e dir ect ion f or da t a f l ows. • On ce a r eser va t ion is ma de, it ’s ma in t a in ed by u sin g “sof t st a t e” in t h e r ou t er s: • Sof t st a t e pr ovides gr a cef u l su ppor t f or member sh ip ch a n ges a n d a da pt a t ion t o r ou t in g ch a n ges

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 339 Conclusion In dividu a l

u ser dema n ds f or bet t er IP ser vice a r e dr ivin g t h e n eed f or some t ype of ba n dwidt h r eser va t ion . Most of u s con t in u e t o u se t h e ph on e a s t h e st a n da r d t o compa r e t o. Th e In t er n et con t in u es t o del iver y a n y t ype of da t a ba sed on a f ir st -comef ir st -ser ved ba sis. Th e In t er n et r ou t er s st il l dr op a n ext r a or din a r y a mou n t of pa cket s over t h e In t er n et , ca u sin g r et r a n smission s. Mor e a ppl ica t ion s a r e r u n n in g over t h e In t er n et ever y da y. Mu l t imedia a ppl ica t ion s a r e t h e on es t h a t r equ ir e QoS on l y beca u se t h e u ser s dema n d it . We h a ve expect ed it du e t o t h e t el eph on e a n d ca bl e TV n et wor ks. RSVP wil l a l l ow f or t h is t o exist , bu t it wil l r ema in on l y in pocket s of n et wor ks a n d n ot t h r ou gh ou t t h e In t er n et . RSVP wil l pl a ce gr ea t dema n ds on t h e r ou t er s. Toda y’s r ou t er s h a ve yet t o pr ove t h ey ca n h a n dl e a n yt h in g mor e t h a n simpl e da t a f or wa r din g, a n d t h ey a r e n ot doin g that ver y wel l . Fa st er r ou t er s a r e comin g on t o t h e ma r ket a n d wil l h el p a l l evia t e t h e pr obl em. Th e In t er n et is becomin g ch a n n el iz ed, wh ich mea n s t h a t t h er e wil l be st r ea ms of da t a r u n n in g a cr oss t h e In t er n et t h a t a u ser ca n “t u n e in t o.” Th e poin t t h a t I a m t r yin g t o ma ke h er e is t h a t QoS is ma de u p of ma n y f a ct or s, a n d RSVP is simpl y on e of t h e f a ct or s. Do n ot t h in k t h a t by a ppl yin g RSVP, a l l you r t r ou bl es wil l disa ppea r . You mu st con t in u e t o a ppl y t h e ot h er f a ct or s a s wel l , su ch a s compr ession , f il t er s, pr ot ocol pr ior it iz a t ion , n et wor k design , OSPF, IP a ddr ess su mma r ies, a n d so f or t h . On e mor e t h in g: Mu l t imedia r ea l l y r equ ir es (f or best oper a t ion ) t h a t mu l t ica st be en a bl ed. On l y r ecen t l y h a ve ISPs st a r t ed t o mu l t ica st en a bl e t h eir n et wor ks (even wit h t h e en t ir e In t er n et bein g n on mu l t ica st ). St r ea min g r ea l -t ime da t a a cr oss t h e In t er n et is n ot ver y ef f icien t .

Co nc l usio n • RSVP is on e a r ea a ddr essin g QoS issu es t h a t a r e dr ivin g f or ces f or f u t u r e n et wor kin g r equ ir emen t s: • Web-ba sed ever yt h in g—wa ve of t h e f u t u r e • Rea l -t ime video a pps a n d pr ot ocol a va il a bil it y • In t egr a t ion of voice a n d da t a ca pa bil it ies, a va il a bil it y of mu l t imedia t ech n ol ogy, mu l t ica st n et wor ks—a l l on l y in cr ea ses t h e dema n d f or QoS f ea t u r es • Specif ica t ion s su ch a s RSVP wil l on l y a id in br idgin g t h e ga p bet ween La yer 2 a n d La yer 3 QoS ca pa bil it ies. • View www.isi.edu /r svp.

La st l y, you sh ou l d be a wa r e t h a t RSVP is n ot a n a t t empt t o r ecover l ost gr ou n d f r om ATM a s some Et h er n et z ea l ot s wou l d h a ve you bel ieve. ATM a n d ot h er sof t wa r e a n d h a r dwa r e t ech n ol ogies wil l con t in u e t o in t egr a t e. RSVP is t h e f ir st a t t empt t o pr ovide f or some t ype of Qu a l it y of Ser vice ba sed on a u ser -by-u ser n eed. Th e RSVP h omepa ge ca n be f ou n d a t : www.isi.edu /r svp

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 340 Simple Network Management Protocol (SNMP) Net wor k Ma n a gemen t

ca n be br oken down in t o f ive dist in ct ca t egor ies:

Ac c o unt manag e me nt : Ga t h er s in f or ma t ion on wh ich u ser s or depa r t men t s a r e empl oyin g wh ich n et wor k ser vices. Faul t manag e me nt : In cl u des t r ou bl esh oot in g, f in din g, a n d cor r ect in g f a il ed or da ma ged compon en t s, mon it or in g equ ipmen t f or ea r l y pr obl em in dica t or s, a n d t r a ckin g down dist r ibu t ed pr obl ems. Se c ur it y: In cl u des a u t h or iz a t ion , a ccess con t r ol , da t a en cr ypt in g, a n d ma n a gemen t of en cr ypt in g keys. Co nf ig ur at io n manag e me nt : Tr a cks h a r dwa r e a n d sof t wa r e in f or ma t ion . In cl u ded wit h t h is a r e a dmin ist r a t ion t a sks, su ch a s da y-t o-da y mon it or in g a n d ma in t en a n ce of t h e cu r r en t ph ysica l a n d l ogica l st a t e of t h e n et wor k, a s wel l a s r ecogn it ion a n d r egist r a t ion s of a ppl ica t ion s a n d ser vices on t h e n et wor k. Pe r f o r manc e : Th e mon it or in g of t r a f f ic on t h e n et wor k. Simpl e Ne t wo r k Manag e me nt Pr o t o c o l (SNMP) • Net wor k ma n a gemen t is divided in t o f ive ca t egor ies: • Accou n t ma n a gemen t • Fa u l t ma n a gemen t • Secu r it y • Con f igu r a t ion ma n a gemen t • Per f or ma n ce

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 341 SNMP Elements Th er e a r e sever a l

el emen t s t h a t compr ise SNMP a n d t h ey a l l mu st wor k t oget h er in or der f or SNMP t o oper a t e. Manag e me nt se r ve r : Th e n et wor k st a t ion t h a t r u n s t h e ma n a gemen t a ppl ica t ion t o mon it or or con t r ol t h e ma n a gemen t cl ien t s. Manag e me nt c l ie nt s: Th e n et wor k st a t ion t h a t con t a in s t h e a gen t (a sof t wa r e compon en t ), wh ich en a bl es t h e ma n a gemen t ser ver t o con t r ol a n d mon it or t h em. Th e a gen t ca n be l oca t ed in a n y dir ect l y a t t a ch ed n et wor k device su ch a s r ou t er , a PC, a swit ch , et c. SNMP: A Requ est /Respon se pr ot ocol t h a t a l l ows f or t h e exch a n ge of in f or ma t ion bet ween t h e ser ver a n d a n a gen t . Th is pr ot ocol does n ot def in e t h e it ems t h a t ca n be ma n a ged. MIB: Th e Ma n a gemen t In f or ma t ion Ba se. A col l ect ion of object s t h a t con t a in in f or ma t ion t h a t wil l be u t il iz ed by a n et wor k ma n a gemen t ser ver . It con t a in s a l l of t h is in f or ma t ion u n der a n en t it y kn own a s object. Simil a r object s a r e pl a ced t oget h er t o f or m gr ou ps. In ot h er wor ds, t h e MIB is a da t a ba se. It is a col l ect ion of object s f or med in t o gr ou ps, ea ch of wh ich con t a in s in f or ma t ion t h a t wil l be given ba sed on a r equ est f r om a ma n a gemen t st a t ion .

SNMP El emen t s

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 342 SNMP Manager An SNMP ma n a ger

is a sof t wa r e a ppl ica t ion t h a t qu er ies t h e a gen t s f or in f or ma t ion , or set s in f or ma t ion on t h e cl ien t a gen t . Th e r et u r n ed in f or ma t ion is t h en st or ed in a da t a ba se t o be ma n ipu l a t ed by ot h er a ppl ica t ion sof t wa r e t h a t is n ot def in ed by SNMP. Th e in f or ma t ion ga t h er ed ca n be u sed t o displ a y gr a ph s of h ow ma n y byt es of in f or ma t ion a r e t r a n smit t ed ou t a por t , h ow ma n y er r or s h a ve occu r r ed, a n d so f or t h . SNMP simpl y set s or ga t h er s in f or ma t ion in a n ode. Th er ef or e, t h e ser ver wil l be compr ised of t wo t h in gs: Manag e me nt appl ic at io ns: Appl ica t ion s t h a t ca n r eceive a n d pr ocess t h e in f or ma t ion ga t h er ed by t h e SNMP ma n a ger . Th ese a ppl ica t ion s a r e t h e on es t h a t h a ve some t ype of u ser in t er f a ce t o a l l ow t h e n et wor k ma n a ger t o ma n ipu l a t e t h e SNMP pr ot ocol ; f or exa mpl e, set t h e SNMP n ode t h a t it wou l d l ike t o t a l k t o, sen d t h a t n ode in f or ma t ion , get in f or ma t ion f r om t h a t n ode, a n d so on . Dat abase s: Th e in f or ma t ion t h a t is st or ed in t h e da t a ba se is f r om t h e con f igu r a t ion , per f or ma n ce, a n d a u dit da t a of t h e a gen t s. Th er e a r e mu l t ipl e da t a ba ses on t h e ser ver : t h e MIB da t a ba se, t h e Net wor k El emen t da t a ba se, a n d t h e Ma n a gemen t Appl ica t ion da t a ba ses (Topol ogy da t a ba se, Hist or y Log, Mon it or Logs). Al l of t h is r u n s on t op of SNMP. It is n ot n ecessa r y f or SNMP t o oper a t e, bu t it does a l l ow f or t h e h u ma n f a ct or t o f it in .

SNMP Ma n a ger

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 343 Agent Agen t s a r e simpl e el emen t s t h a t

h a ve a ccess t o a n et wor k’s el emen t s (r ou t er , swit ch , PC, et c.) MIB. Agen t s a r e t h e in t er f a ce f r om t h e n et wor k ma n a gemen t ser ver t o t h e cl ien t MIB. Th ey per f or m ser ver -r equ est ed f u n ct ion s. Wh en a ser ver r equ est s in f or ma t ion f r om a cl ien t , it wil l bu il d it s SNMP r equ est (expl a in ed in a momen t ) a n d sen d it , u n ica st , t o t h e cl ien t . Th e a gen t r eceives t h is r equ est , pr ocesses it , r et r ieves or set s t h e in f or ma t ion in t h e MIB of t h e cl ien t , a n d gen er a t es some t ype of r espon se t o t h e ser ver . Usu a l l y, a gen t s on l y t r a n smit in f or ma t ion wh en r equ est ed by a ser ver . However , t h er e is on e in st a n ce in wh ich a n a gen t wil l t r a n smit u n sol icit ed in f or ma t ion . It is kn own a s a trap.

Th er e a r e cer t a in t h in gs on a n et wor k st a t ion t h a t ma y f or ce it t o immedia t el y n ot if y t h e ser ver . Some of t h ese t r a ps a r e def in ed by t h e RFC. Th in gs su ch a s col d/wa r m st a r t a n d a u t h en t ica t ion f a il u r e a r e t r a ps t h a t a r e sen t t o t h e ser ver . Most a gen t a ppl ica t ion s t oda y per mit t h e u se of u ser -def in ed t r a ps. Th is mea n s t h a t t h e n et wor k a dmin ist r a t or of a n SNMP compl ia n t device ca n con f igu r e t h e r ou t er t o sen d t r a ps t o t h e ser ver wh en cer t a in con dit ion s a r e met . For exa mpl e, a r ou t er ma y sen d a t r a p t o t h e ser ver wh en it s memor y bu f f er s con st a n t l y over f l ow or wh en t oo ma n y ICMP r edir ect s h a ve been sen t . An ot h er t ype of a gen t is kn own a s t h e proxy agent. Th is a l l ows on e st a t ion t o become a n a gen t f or a n ot h er n et wor k st a t ion t h a t does n ot su ppor t SNMP. Ba sica l l y, pr oxy a gen t s ser ver a s t r a n sl a t or s bet ween ser ver s a n d n on -SNMP ca pa bl e cl ien t s (f or secu r it y, l imit ed r esou r ces, et c.).

Agen t

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 344 Management Information Base (MIB) Th e MIB is a col l ect ion of object s t h a t

con t a in specif ic in f or ma t ion t h a t t oget h er f or m a gr ou p. You ca n t h in k of a MIB a s a da t a ba se t h a t con t a in s cer t a in in f or ma t ion t h a t wa s eit h er pr eset (du r in g con f igu r a t ion of t h e n ode) or wa s ga t h er ed by t h e a gen t a n d pl a ced in t o t h e MIB. Simpl y st a t ed, t h e MIB is a da t a ba se t h a t con t a in s in f or ma t ion a bou t t h e cl ien t t h a t is cu r r en t l y pl a ced on it . Th e st r u ct u r e of ma n a gemen t in f or ma t ion is def in ed in RFC 1155 a n d def in es t h e f or ma t of t h e MIB object s. Th is in cl u des t h e f ol l owin g: Manag e me nt Inf o r mat io n Base (MIB) • Col l ect ion of object s t h a t con t a in specif ic in f or ma t ion t h a t t oget h er f or m a gr ou p. • St r u ct u r e of Ma n a gemen t In f or ma t ion is specif ied in RFC 1155. • Th e object s con t a in t h e f ol l owin g: • Syn t a x • Access • St a t u s • Descr ipt ion • In dex • Def Va l • Va l u e n ot a t ion

Syn t a x Access

Requ ir ed. Th e a bst r a ct n ot a t ion f or t h e object t ype. Th is def in es t h e da t a t ype t h a t model s t h e object . Requ ir ed. Def in es t h e min ima l l evel of su ppor t r equ ir ed f or t h e object t ypes. Mu st be on e of r ea d-on l y, r ea d-wr it e, wr it e-on l y, or n ot a ccessibl e.

St a t u s

Requ ir ed. Th e st a t u s of t h e MIB en t r y. Ca n be ma n da t or y, opt ion a l , obsol et e, or depr eca t ed (r emoved). Descr ipt ion Opt ion a l . A t ext descr ipt ion of t h e object t ype. In dex Pr esen t on l y if t h e object t ype cor r espon ds t o a r ow in a t a bl e. Def Va l Opt ion a l . Def in es a def a u l t va l u e t h a t ma y be a ssign ed t o t h e object wh en a n ew in st a n ce is cr ea t ed by a n a gen t . Va l u e Not a t ion Th e n a me of t h e object , wh ich is a n Object Iden t if ier .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 345 Example MIB Entry Exampl e MIB Ent r y Object: IfOperStatus {ifEntry 8} Syntax: INTEGER { up (1) — ready to pass packets down(2), testing (3) — in some test mode } Definition: The current operational state of the interface. The testing (3) state indicates that no operational packets can be passed. Access: Read-only. Status: Mandatory.

Object : ------ifOperStatus { ifEntry 8 } Syntax: INTEGER { up(1), — ready to pass packets down(2),

testing(3) — in some test mode } Def in it ion : Th e cu r r en t oper a t ion a l st a t e of t h e in t er f a ce. Th e t est in g(3) st a t e in dica t es t h a t n o oper a t ion a l pa cket s ca n be pa ssed. Access: Rea d-on l y. St a t u s: Ma n da t or y.

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 346 The Protocol of SNMP SNMP is t h e pr ot ocol

t h a t is u sed bet ween a ma n a ger a n d a cl ien t . SNMP u ses a ser ies of SNMP comma n ds a n d pr ot ocol da t a u n it s (PDUs) t o sen d a n d r eceive ma n a gemen t in f or ma t ion . SNMP wa s even t u a l l y t o be migr a t ed t o t h e OSI ma n a gemen t sch eme (wh ich n ever ca me a bou t ). Th er ef or e a en codin g sch eme kn own a s Abst r a ct Syn t a x Not a t ion , or ASN.1, wa s u sed. On l y t h e INTEGER, OCTET, STRING, OBJECT IDENTIFIER, NULL, SEQUENCE, AND SEQUENCE OF a r e u sed. Th er e a r e mor e en codin gs, bu t t h ey a r e n ot u sed. SNMP u ses UDP a s it s t r a n spor t l a yer . Th e f ol l owin g a r e t h e SNMP pr ot ocol da t a u n it (PDU Pa cket ) t ypes: Ge t Re que st . Requ est s a n a gen t t o r et u r n a t t r ibu t e va l u es f or a l ist of ma n a ged object s. Ge t Ne xt Re que st . Used t o t r a ver se a t a bl e of object s. Sin ce t h e object a t t r ibu t es a r e st or ed in l exicogr a ph ica l or der , t h e r esu l t of t h e pr eviou s Get Next Requ est ca n be u sed a s a n a r gu men t in a su bsequ en t Get Next -Requ est . In t h is wa y, a ma n a ger ca n go t h r ou gh a va r ia bl e-l en gt h t a bl e u n t il it h a s ext r a ct ed a l l t h e in f or ma t ion f or t h e sa me t ypes of object s. Ge t Re spo nse . Ret u r n s a t t r ibu t e va l u es f or t h e sel ect ed object s or er r or in dica t ion s f or su ch con dit ion s a s in va l id object n a me or n on exist en t object . Se t Re que st . Used t o ch a n ge t h e a t t r ibu t e va l u es of sel ect ed object s. Tr ap. Used by t h e a gen t . Tr a ps a r e u sed t o r epor t cer t a in er r or con dit ion s a n d ch a n ges of st a t e t o t h e ma n a gin g pr ocess. Th e con dit ion s a r e col d-st a r t , wa r mst a r t , l in k-u p, l in k-down , EGP n eigh bor l oss (n ot mu ch u se f or t h is on e a n ymor e), a n d a u t h en t ica t ion f a il u r e.

Th e pr ot ocol of SNMP SNMP pr ovides f or a simpl e a u t h en t ica t ion pr ocess bet ween t h e cl ien t a n d t h e ser ver . Th is is kn own a s t h e community string a n d it mu st ma t ch bet ween a cl ien t a n d t h e ser ver . Th is st r in g is embedded in t h e pr ot ocol pa cket a n d if eit h er side h a s a dif f er en t en t r y, t h e r eceived SNMP pa cket is disca r ded. Th is commu n it y st r in g is ma n u a l l y con f igu r ed on t h e ser ver a n d t h e cl ien t . Th e pr obl em is t h a t it is n ot en cr ypt ed in a n y wa y wh en it is t r a n smit t ed. An y pr ot ocol a n a l yz er t h a t is on t h e sa me l in k a s t h is pa cket ca n see t h e commu n it y st r in g n a me. It is pl a in t ext .

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Chapter 347 SNMP Encapsulation Th e f ol l owin g sl ide sh ows t h e en ca psu l a t ion of a n SNMP pa cket .Th e commu n it y st r in g is a simpl e pa sswor d pr ot ect ion mech a n ism. Most a r e set t o “pu bl ic” f or r ea d a ccess a n d “pr iva t e” f or r ea d-wr it e a ccess. Th is f iel d is est a bl ish ed a t set u p t ime. Th e va r ia bl e bin din g in dica t es wh ich gr ou ps or wh ich object s in t h e gr ou ps a r e bein g r equ est ed f or in f or ma t ion .

SNMP En ca psu l a t ion

Pr eviou s Ta bl e of Con t en t s Next

Illustrated TCP/IP by Matthew G. Naugle Wiley Computer Publishing, John Wiley & Sons, Inc. ISBN: 0471196568 Pub Date: 11/01/98

Pr eviou s Ta bl e of Con t en t s Next

Index A ABR. See Ar ea Bor der Rou t er . Absol u t e n a me, 329 Accou n t ma n a gemen t , 476 ACK, 248, 285, 290–293, 295–299, 402 Ackn owl edgemen t , 290–291, 295 exa mpl e, 292–293 f iel d, 285 n u mber , 284 Ada pt ive r et r a n smission a l gor it h m, 295 Addr ess a ggr ega t ion , 113, 114 a l l oca t ion , 96–97 a ssign a t ion . See In t er f a ce. a u t ocon f igu r a t ion , 235 def in it ion s, 113–114 ef f icien cy, 115–116 f iel ds, 84 f or ma t , 368 pr obl ems, 108–110 r ecor ds, 338–339 r esol u t ion , 235, 238–239 sch emes, 67 t er ms, 113–114 Addr ess a ssign men t , 95, 97, 105, 123. See also In t er n et Assign ed Nu mber s Au t h or it y; In t er n et Ser vice Pr ovider a ddr esses. r el a xa t ion , 123–124 Addr ess f a mil y iden t if ier (AFI), 169 Addr ess Resol u t ion Pr ot ocol (ARP), 39, 46, 100–101, 106, 107, 146, 147, 236, 237, 438, 439. See also Pr oxy ARP; Rever se Addr ess Resol u t ion Pr ot ocol . ca ch e, 263 oper a t ion , 102–104

pa cket f or ma t , 101–102 pr ot ocol . See Appl eTa l k. r epl y pa cket , 103 r u l es, 104–105 t a bl e, 104, 146, 204 Addr ess Un r ea ch a bl e, 257 Addr essa bl e st a t ion s, 144 Addr essin g, 50, 51 t ype r eview, 363–364 Adja cen cy, 189–190 Adja cen t r ou t er s, 189 Admission con t r ol , 459 Adva n ced Resea r ch Pr oject Agen cy (ARPA), 11, 12 AFI. See Addr ess f a mil y iden t if ier . Agen t s, 477 Al l Su bn et s Br oa dca st (ASB), 140 AND oper a t ion , 86 ANDin g, 81, 86 An yca st , 220 a ddr essin g, 249 API, 358, 456 APNIC, 28, 96, 226, 230, 342 APOP, 352 Appl eTa l k, 8, 101, 157, 158, 165 ARP pr ot ocol , 101 Appl eTa l k Remot e Access (ARA), 8 Appl ica t ion -specif ic messa ge, 315 ARA. See Appl eTa l k Remot e Access. Ar ea Bor der Rou t er (ABR), 181, 182, 184, 192–196, 411, 422–425 Ar ea ID, 191 ARP. See Addr ess Resol u t ion Pr ot ocol . ARPA. See Adva n ced Resea r ch Pr oject Agen cy. ARPAn et , 8, 11, 14, 24, 100, 111, 154, 175, 325 Net wor kin g Gr ou p, 12 r ou t in g t a bl es, 80 AS. See Au t on omou s Syst em. ASB. See Al l Su bn et s Br oa dca st . ASBR. See Au t on omou s Syst em Bou n da r y Rou t er . ASCII, 31, 323, 350 Assign ed por t n u mber s, 278, 279 Asyn ch r on ou s Tr a n sf er Mode (ATM), 27, 38, 144, 180, 186, 234, 359, 456–459, 462, 475 ATM. See Asyn ch r on ou s Tr a n sf er Mode. Au t h en t ica t ion , 167, 169, 174, 209, 217 t ype, 169 Au t ocon f igu r a t ion , 231–232. See also St a t ef u l a u t ocon f igu r a t ion ; St a t el ess a u t ocon f igu r a t ion .

Au t oma t ic t u n n el in g, 240 Au t on omou s Syst em (AS), 42, 45, 111, 140, 179, 181, 195–197, 411, 412, 426 Ext er n a l Lin k Adver t isemen t , 184, 198 in f or ma t ion , 197 Au t on omou s Syst em Bou n da r y Rou t er (ASBR), 181, 197, 412, 425 Su mma r y Lin k Adver t isemen t , 184 Au t o-r ea ddr essin g, 252

B B bit . See Br oa dca st . Ba ckbon e, 14, 15, 193, 194, 195. See also FDDI. a r ea , 193 commu n ica t ion , 20 con n ect ivit y, 195 n et wor k, 13 pr ovider , 124 Ba ckbon e Rou t er (BR), 181, 422 Ba cku p Design a t ed Rou t er (BDR), 179, 182, 187–189 r ol e, 417 Ba n ya n . See VINES. BDR. See Ba cku p Design a t ed Rou t er . Beca u se It ’s Time Net wor k (BITNET), 12, 13, 349 Ber kel ey In t er n et Na me Doma in (BIND), 344 Best -ef f or t del iver y ser vice. See Con n ect ion l ess best -ef f or t del iver y ser vice. Best -ef f or t r el ia bil it y, 364 BGP. See Bor der Ga t ewa y Pr ot ocol . BIND. See Ber kel ey In t er n et Na me Doma in . BITNET. See Beca u se It ’s Time Net wor k. Boot Pr ot ocol (BOOTP), 39, 49, 105, 106, 172, 429, 430, 437 dil emma , 438–439 f iel d def in it ion s, 434, 437 ga t ewa y, 439–440 oper a t ion , 431 r el a y a gen t s, 439–441, 445, 451 BOOTP. See Boot Pr ot ocol . BOOTREPLY, 431, 434, 438, 439 BOOTREQUEST, 431–436, 438 Boot st r a p r ou t er (BSR), 409 Bor der Ga t ewa y Pr ot ocol (BGP), 42, 145, 171, 197 Bor der r ou t er s, 399 BR. See Ba ckbon e Rou t er . Br oa dca st , 364 a ddr esses, 174 bit (B bit ), 451 pa cket , 76 Br oa dca st in g, 75

BSR. See Boot st r a p r ou t er . Bu sin ess n et wor ks, 127 Bye messa ge, 314

C Ca ch e. See For wa r din g ca ch e. en t r ies. See In t er n et Pr ot ocol IPv6. CAD/CAM syst ems, 316 Ca l if or n ia Edu ca t ion a l Resea r ch Net wor k (CERFn et ), 13 Ca l l Admission Con t r ol , 462 Ca n dida t e RP (C-RP), 409 Ca n on ica l n a me (CNAME), 313, 339 CATNIP, 211 CBT. See Cor e-Ba sed Tr ee. CERFn et . See Ca l if or n ia Edu ca t ion a l Resea r ch Net wor k. Ch ecksu m, 214, 285 f iel ds, 61–62 CIDR. See Cl a ssl ess In t er -Doma in Rou t in g. Cir cu it swit ch in g, 27–28. See also Vir t u a l cir cu it swit ch in g. CIX. See Commer cia l In t er n et eXch a n ge. Cl a ss A, 132 exa mpl e, 126 n et wor ks, 131 su bn et t in g exa mpl e, 81–82 Cl a ss A a ddr ess, 67–72, 75, 79–81, 87, 94, 95, 108, 109, 133 f or ma t , 368 r eview, 77–78 Cl a ss a ddr esses/a ddr essin g, 138, 139, 222 Cl a ss B, 132 exh a u st ion , 110 n et wor k, 85, 131 pr ef ix, 135 su bn et t in g exa mpl e, 81–82 Cl a ss B a ddr ess, 41, 67–70, 72–73, 79–83, 87, 94, 102, 108, 109, 117, 133 f or ma t , 368 r eview, 77–78 Cl a ss C, 132, 135, 136 a ssign men t , 124 n et wor k, 93, 111, 131 su bn et t in g exa mpl e, 81–82 Cl a ss C a ddr ess, 67–70, 74–75, 79–81, 87, 88, 93, 94, 108, 109, 115, 121, 123–125, 131, 133, 135, 137, 343 f or ma t , 368 r eview, 77–78 Cl a ss D a ddr ess, 68–70, 75–76, 367, 369, 418 r eview, 77–78

Cl a ss D a ddr essin g, 250 Cl a ss E a ddr ess, 68–70, 95 Cl a ss iden t if ica t ion , 69–70 Cl a ssf u l a ddr esses, 115 Cl a ssf u l a ddr essin g, 67 Cl a ssf u l IP a ddr ess r eview, 94 Cl a ssf u l n et wor k a ddr essin g sch eme, 66 Cl a ssl ess In t er -Doma in Rou t in g (CIDR), 66, 109, 110, 113–115, 130–132, 223, 230, 251 r ou t er doma in , 140 VLSM, compa r ison , 138–139 Cl a ssl ess IP, 67 a ddr essin g, 113 Cl a ssl ess n et wor k a ddr essin g sch eme, 66 Cl ien t side, 435–436 CLNP. See Con n ect ion l ess Pr ot ocol . Cl osed syst em, 11 CME. See Cu st omer pr emise equ ipmen t . CNAME. See Ca n on ica l n a me. CNRI. See Cor por a t ion f or Na t ion a l Resea r ch In it ia t ives. Commer cia l In t er n et eXch a n ge (CIX), 14 Common pr ef ix, det er min a t ion , 127–128 Commu n ica t ion wit h Dest in a t ion , 257 Compa t ibil it y swit ch , 167 Compu t er Scien ce Net wor k (CSNET), 12, 13 Con ca t en a t ed h ea der s, 215 Con cen t r ic Net wor ks, 226 Con f igu r a t ion ma n a gemen t , 474 Con f igu r ed t u n n el in g, 240 Con gest ion a voida n ce, 296–298 Con gest ion con t r ol , 298 Con n ect ion l ess best -ef f or t del iver y ser vice, 50–51 Con n ect ion l ess Pr ot ocol (CLNP), 210, 233 Con n ect ion l ess t r a n spor t -l a yer ser vice, 48 Con t r ol bit s, 284 Con ver gen ce, 163 Con ver sion , exa mpl e, 86–87 Con ver t ed IP mu l t ica st a ddr ess, 371 Cor e-Ba sed Tr ee (CBT), 378, 386–387, 410 f il es, 362 Cor por a t ion f or Na t ion a l Resea r ch In it ia t ives (CNRI), 23 CRC. See Cycl ic Redu n da n cy Ch eck. C-RP. See Ca n dida t e RP. CSNET. See Compu t er Scien ce Net wor k. CSRC, 313 Cu mu l a t ive ACK, 291 Cu st omer pr emise equ ipmen t (CME), 359

Cycl ic Redu n da n cy Ch eck (CRC), 61, 62, 147, 148, 204

D DARPA. See Depa r t men t of Def en se Adva n ced Resea r ch Pr oject s Agen cy. Da t a en ca psu l a t ion . See La yer s. Da t a of f set , 284 Da t a Ser vice Un it /Cu st omer Ser vice Un it (DSU/CSU), 202, 203 Da t a t r a n sf er , 50, 219, 285 Da t a ba se descr ipt ion pa cket , 189 f il es, 332, 336 ma in t en a n ce, 190–191 Da t a gr a ms, 52, 56, 58, 59, 63, 126, 150, 175, 218, 249, 274, 279, 368, 381. See also In t er n et Pr ot ocol . f r a gmen t a t ion , 50 r eceivin g. See Mu l t ica st . Da t a l in k l a yer , 52 DBR, 188 DDN. See Def en se Da t a Net wor k. Dea d Ga t ewa y Det ect ion , 236 DECn et , 6, 7 Def a u l t ga t ewa ys, 158–159 Def a u l t r ou t er s, 158–159, 235 Def en se Da t a Net wor k (DDN), 12 Demu l t ipl exin g, 277 Den se Mode, 378, 398. See also Pr ot ocol -In depen den t Mu l t ica st Den se Mode. Depa r t men t of Def en se Adva n ced Resea r ch Pr oject s Agen cy (DARPA), 9–12, 14, 22 In t er n et , 12 Design a t ed Rou t er (DR), 181, 182, 184, 187–189, 403–407. See also Ba cku p design a t ed r ou t er . r ol e, 417 Dest in a t ion Addr ess, 103, 261, 463, 469. See Addr ess Resol u t ion Pr ot ocol . f iel ds, 64–65 Dest in a t ion ca ch e, 254 Dest in a t ion mu l t ica st gr ou p, 421 Dest in a t ion opt ion s, 216 Dest in a t ion por t , 284, 463, 469 n u mber , 278 Dest in a t ion Un r ea ch a bl e Type, 356 DHCP. See Dyn a mic Host Con f igu r a t ion Pr ot ocol . Dia gr a m r ou t in g, 203–204 Dia l -in u ser s, 25 Dir ect r ou t in g, 145–146 Dir ect ed br oa dca st , 95 Diskl ess wor kst a t ion s, 105 Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol (DVMRP), 213, 366, 377, 378, 382–384,

387–389, 398, 399, 412, 419, 425, 427 r ou t e t a bl es, 394–395 t a bl es, 393–394 t u n n el in g, 396 Dist a n ce vect or s, 149–151 Dist a n ce-vect or a l gor it h ms, 154 Dist in ct r eser va t ion s, 464 DMVRP, 359 DNS. See Doma in Na me Ser vice. Doma in Na me Ser vice (DNS), 39, 49, 221, 277, 316–318, 325–326, 339, 340, 345, 346 compon en t s, 328–329 da t a ba se, exa mpl e, 335 in f or ma t ion , 344 in t er a ct ion . See Ma il . Micr osyst ems, 2 st r u ct u r e, 327–328 t opol ogy, 353 Doma in st r u ct u r e, 330–331 DOS, 17, 64, 156, 317, 319, 320, 323, 327, 337 Dot t ed decima l n ot a t ion syst em, 67 Dot t ed-decima l n ot a t ion , 221 Down st r ea m in t er f a ces/n eigh bor s, 421 DR. See Design a t ed Rou t er . Dr a f t RFCs, 377, 387 DRARP. See Dyn a mic Rever se Addr ess Resol u t ion Pr ot ocol . DSU/CSU. See Da t a Ser vice Un it /Cu st omer Ser vice Un it . Du a l IP l a yer /st a ck, 239, 242 Du a l st a ck IP, 240, 241 Du a l -st a ck st r a t egy. See In t er n et Pr ot ocol IPv4; In t er n et Pr ot ocol IPv6. Du pl ica t e Addr ess Det ect ion , 235 DVMRP. See Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol . Dykst r a , 185, 196 a l gor it h m, 45, 188, 190, 419, 420 Dyn a mic Host Con f igu r a t ion Pr ot ocol (DHCP), 39, 49, 105, 106, 145, 172, 208, 231, 249, 344, 429, 439–443, 450, 451 messa ges, 444 oper a t ion , 445–446 r espon ses, 446–447 ser ver s, 251, 452 sh or t cu t s, 449 Dyn a mic por t n u mber s, 278–281 Dyn a mic Rever se Addr ess Resol u t ion Pr ot ocol (DRARP), 440 Dyn a mic r ou t in g, compa r ison . See St a t ic r ou t in g.

E ECHO, 446, 450

Ech o Repl y/Requ est , 260 Ef f icien cies, 451–452 EGP. See Ext er ior Ga t ewa y Pr ot ocol . Embedded IPv4 a ddr esses. See In t er n et Pr ot ocol IPv6. En ca psu l a t in g Secu r it y Pa yl oa d, 217 En dst a t ion , 107, 145 En d-t o-en d er r or ch eckin g, 48 Er r or -det ect ion a l gor it h ms, 282 Er r or -det ect ion n u mber , 285 ES-IS pr ocedu r es, 233 Et h er n et , 7, 12, 38, 52, 56, 66, 100, 101, 180, 202, 214, 230, 369, 456, 457, 459 a ddr ess, ma ppin g, 369–370 ma ppin g, 76 mu l t ica st a ddr ess, 172 pa cket h ea der s, 57 pa cket s, 104, 212 Type f iel d, 101 Et h er Type, 104, 105 f iel d, 212, 243 Ext en sion h ea der , 213 Ext en sion s/opt ion s, su ppor t , 209 Ext er ior Ga t ewa y Pr ot ocol (EGP), 41–42, 145, 153, 177, 483 Ext r a n et s, 20–21

F Fa u l t ma n a gemen t , 476 FDDI, 7, 38, 52, 100, 180, 214, 457 ba ckbon e, 218 n et wor k, 57 st a t ion , 57 FDDI-t o-Token -Rin g t opol ogies, 257 Feder a l Net wor k Cou n cil (FNC), 141 Fil e Tr a n sf er Pr ot ocol (FTP), 4, 30, 39, 49, 56, 103, 141, 279, 286, 316, 317, 320–321, 324, 327 comma n ds, 322 da t a t r a n sf er , 323 Fil t er spec, 463 Fir ewa l l s, 21 Fixed f il t er , 465–466 Fl a g bit s, 250 Fl oa t in g st a t ic r ou t e, 200 Fl oodin g, 45, 180, 378, 380–381 Fl ow con t r ol , 285, 294 Fl ow l a bel , 219 Fl ow l a bel in g ca pa bil it y, 209 Fl owspec, 463, 467

mer gin g, 468–469 FNC. See Feder a l Net wor k Cou n cil . For wa r din g ca ch e, 415, 420–421 For wa r din g t a bl e, 393, 394 Fr a gmen t a t ion , 51, 57–60, 212, 217–218. See also Da t a gr a ms. Fr a me Rel a y, 52, 180, 234 specif ica t ion , 31 swit ch es, 359 FTP. See Fil e Tr a n sf er Pr ot ocol . Fu l l du pl ex, 283 Fu l l -du pl ex con n ect ion , 299

G Ga t ewa y t o Ga t ewa y Pr ot ocol (GGP), 154 Ga t ewa ys. See Boot Pr ot ocol ; Def a u l t ga t ewa ys. Gen er ic pa cket f or ma t , 186–187 GGP. See Ga t ewa y t o Ga t ewa y Pr ot ocol . Gl oba l a ddr essin g, 4 Gl oba l r ou t in g t a bl es, 111, 115, 125 Gr a f t in g, def in it ion , 383–384 Gr ou p h ost , sen din g, 406–407 join in g, 405–406 Member sh ip messa ges, 262 Gr ou p-a ddr ess, 367 Gr ou p-Member sh ip LSA, 415–416, 418 Gr ou p-specif ic qu er ies, 376

H Ha n dl in g er r or s, 468 Hea der f or ma t simpl if ica t ion , 209 Hea der l en gt h , 55–56 Hel l o pr ot ocol , 187–188 Hol d-down t imer , 161, 165 Hop cou n t , 160, 162, 238, 445 Hop l imit , 215, 237 Hop-by-Hop opt ion s, 216 Hop-cou n t dist a n ce, 162 Hop-cou n t en t r y, 152 Host a ddr esses, 77, 78, 120 Host bit s, 81 Host f il e, 64 Host ID, 73, 82, 83, 86, 87, 90, 92, 93 Host mobil it y, 252 Host n u mber , 82

Host t o Host , 241 Host t o Rou t er , 241 Host Join , 376–377

I IAB. See In t er n et Act ivit ies Boa r d. IANA. See In t er n et Assign ed Nu mber s Au t h or it y. ICB. See In t er n a t ion a l Cooper a t ion Boa r d. ICCB. See In t er n et Con f igu r a t ion Con t r ol Boa r d. ICMP. See In t er n et Con t r ol Messa ge Pr ot ocol . ICMPv4. See In t er n et Con t r ol Messa ge Pr ot ocol ICMPv4. ICMPv6. See In t er n et Con t r ol Messa ge Pr ot ocol ICMPv6. IDRP, 251 I-Ds. See In t er n et Dr a f t s. IEEE 802 n et wor ks, 212, 230 IEEE 802.X MAC a ddr ess, ma ppin g, 369–370 IESG. See In t er n et En gin eer in g St eer in g Gr ou p. IETF. See In t er n et En gin eer in g Ta sk For ce. IGMP. See In t er n et Gr ou p Ma n a gemen t Pr ot ocol . IGP. See In t er ior Ga t ewa y Pr ot ocol . IMP. See In t er f a ce Messa ge Pr ocessor ; In t er n et Messa ge Pr ocessor . In cl u sive ACK, 291 In dir ect r ou t in g, 147–148 In f in it y t imer va l u e, 264 In f or ma t ion Scien ces In st it u t e (ISI), 141 In -l in e r ou t er , 116 In -sequ en ce pa cket s, 315 In t egr a t ed Ser vice Digit a l Net wor k (ISDN), 202 In t er -Ar ea MOSPF r ou t in g, 422–423 In t er -Ar ea Mu l t ica st exa mpl e, 423–424 f or wa r der s, 422–424 In t er -a r ea r ou t in g, 183, 196 In t er -Ar ea Sh or t est -Pa t h Tr ee, 425 In t er a r r iva l Jit t er , 311 In t er -AS mu l t ica st f or wa r der , 412, 426 In t er -AS r ou t in g, 183 In t er -Au t on omou s Syst em Mu l t ica st , 426 In t er doma in Rou t in g Pr ot ocol , 210 In t er f a ce a ddit ion , 402 In t er f a ce a ddr ess a ssign a t ion , 93 In t er f a ce ID, 226, 231 In t er f a ce Messa ge Pr ocessor (IMP), 12, 13, 100, 472 In t er ior Ga t ewa y Pr ot ocol (IGP), 40–42, 44, 145, 150, 171, 177, 179 In t er n a l Rou t er (IR), 181 In t er n a t ion a l Cooper a t ion Boa r d (ICB), 22

In t er n a t ion a l Or ga n iz a t ion f or St a n da r diz a t ion (ISO), 38, 210 In t er n et , 11, 20–21, 25, 472 gover n in g body, 21–24 r ou t in g, 132 r ou t in g t a bl es, 85, 130, 138 t imel in e, 26 t imest a mp, 214 In t er n et Act ivit ies Boa r d (IAB), 21–23, 154 In t er n et Ar ch it ect u r e Boa r d, 23 In t er n et Assign ed Nu mber s Au t h or it y (IANA), 15, 21, 96, 124, 135, 138, 141, 225, 230, 250, 327, 368, 369 a ddr ess bl ock a ssign men t s, 142–144 IANA-a ssign ed RFC n u mber s, 139 In t er n et Con f igu r a t ion Con t r ol Boa r d (ICCB), 22 In t er n et Con t r ol Messa ge Pr ot ocol (ICMP), 39, 46, 58, 60, 158, 159, 215, 237, 254–255, 271–272, 365, 440, 446, 450, 457, 468, 479 da t a gr a m, 271 f u n ct ion s, 274–275 h ea der , 260, 262 in f or ma t ion a l messa ges, 260 messa ge, 234 n eigh bor discover y, 261 PING, 272–273 Redir ect , 233, 236, 265 Rou t er Discover y, 233, 236 In t er n et Con t r ol Messa ge Pr ot ocol (ICMP)ICMPv4, 256 In t er n et Con t r ol Messa ge Pr ot ocol (ICMP) ICMPv6, 256 en ca psu l a t ion , 255 er r or messa ges, 257–259 mu l t ica st , 262–263 In t er n et Dr a f t s (I-Ds), 31 In t er n et En gin eer in g St eer in g Gr ou p (IESG), 23, 31, 141 In t er n et En gin eer in g Ta sk For ce (IETF), 22–24, 31, 32, 301 In t er n et Gr ou p Ma n a gemen t Pr ot ocol (IGMP), 39, 46, 173, 250, 256, 262, 359, 372, 384, 389, 401, 402, 417, 418, 427, 468, 469 h ea der , 373–374 IGMPv2, 376, 377, 403, 406 r ou t er f u n ct ion s, 375–376 In t er n et Messa ge Pr ocessor (IMP), 44 In t er n et Of f icia l Pr ot ocol St a n da r ds (STD 1), 34 In t er n et Pr ot ocol (IP), 12, 50, 141, 165, 206, 215, 290, 421. See also Cl a ssl ess IP; Na t ive IP; Tr a n smission Con t r ol Pr ot ocol /In t er n et Pr ot ocol . a ddr essed n et wor ks, 40 a ddr essin g, 208 a l t er n a t ives, 457 da t a f iel d, 61

da t a gr a m, 57, 58, 103, 121, 366 h ea der , 53, 55, 104, 147, 204, 388, 396, 400 IP-a ddr ess-t o-cl ien t -h a r dwa r e a ddr ess, 447 IP-a ddr ess-t o-ph ysica l -st a t ion -a ddr ess, 100 IP-in -IP en ca psu l a t ion , 396, 397, 412 IP-in -IP pa cket f or ma t , 397 IP-r el a t ed pr ot ocol s, 46–47 IP-t o-ph ysica l -a ddr ess ma ppin g, 146 l a yer , 51, 52, 58, 68, 148, 203, 211, 269, 301 mu l t ica st in g, 213, 378 n et wor k, 64 opt ion s f iel ds, 63–64 over view, 40–41 pa cket , 212 pa r a met er s, 49 ser vice in t er f a ce, ext en sion s, 365–366 sou r ce a ddr ess, 445 ver sion n u mber s, 211 video ser ver s, 300 In t er n et Pr ot ocol Addr ess En ca psu l a t ion (IPAE), 211 In t er n et Pr ot ocol (IP) a ddr esses, 17, 43, 68–70, 80, 85, 92, 102, 103, 106, 108, 113, 115, 116, 126, 130, 132, 146, 157, 170, 191, 204, 235, 238, 242, 265, 266, 305, 318, 331, 333, 335, 375, 403, 405, 419, 431, 436, 441, 443, 446, 448, 450, 452, 459, 460, 463. See also Cl a ssor ien t ed IP a ddr esses; Loca l l oopba ck IP a ddr ess. a l l oca t ion , 443 a ssign men t (ol d met h od), 111–113 a ssign men t s, 192 f or ma t , 68–69 ma n a gemen t , 49 r el ea sin g, 448 r est r ict ion s, 95 r eview, 110. See also Cl a ssf u l IP a ddr ess r eview. sch eme, 66 In t er n et Pr ot ocol (IP) IPv4, 6, 39, 41, 57, 63, 66, 69, 108, 206–211, 220–223, 227–230, 253, 389, 457, 458 a ddr ess spa ce, l if e ext en sion , 110 du a l -st a ck st r a t egy, 243 embedded a ddr esses. See In t er n et Pr ot ocol IPv6. h ea der , 53–54, 242 IPv6 h ea der dif f er en ces, 214–215 n eigh bor discover y, 236–237 opt ion s, r eview, 213–214 r ou t er s, 139, 244 t u n n el in g, 240 In t er n et Pr ot ocol (IP) IPv6, 6, 39, 41, 63, 65, 69, 77, 206–211, 253, 457 a ddr ess, embedded IPv4 a ddr esses, 228–229

a l gor it h m, 265–266 ca ch e en t r ies, 263–264 da t a gr a m, 242 depl oymen t met h ods, 239–240 du a l -st a ck st r a t egy, 243 ext en sion h ea der s, 216–217 f ea t u r es, 209–210 mu l t ica st in g, 250–251 RFCs, 266–267 r ou t er s, 244 r ou t in g, 251–252 t u n n el a ddr essin g, 242 In t er n et Pr ot ocol (IP) IPv6 a ddr essin g, 220–223. See also Loca l -u se IPv6 a ddr essin g; Pr ovider -ba sed IPv6 a ddr essin g. pr ef ix, 224 st r u ct u r e, 229 In t er n et Pr ot ocol (IP) IPv6 h ea der , 212–213 dif f er en ces. See In t er n et Pr ot ocol IPv4. In t er n et Pr ot ocol (IP) IPv6 t u n n el in g, 240, 241, 244–248 In t er n et Pr ot ocol (IP) Mu l t ica st , 68, 302, 355–357 a ddr ess, 361, 369. See also Con ver t ed IP mu l t ica st a ddr ess. ca vea t s, 359 compa r ison . See Un ica st . compon en t s, 357–358 f or wa r din g, 380 In t er n et Pr ot ocol (IP) r ou t in g, 144–145 a l gor it h ms, 148 t a bl es, 153 In t er n et Regist r y (IR), 75, 96–97, 115, 138. See also Loca l IRs; Region a l IRs. In t er n et Resea r ch Gr ou p, 22 In t er n et Resea r ch Ta sk For ce (IRTF), 23 In t er n et Ser vice Pr ovider (ISP), 16–18, 21, 25, 42, 66, 67, 72, 75, 96, 97, 115, 116, 121–125, 127, 130, 133, 135, 137–139, 226, 350, 353, 475 In t er n et Ser vice Pr ovider (ISP) a ddr esses, 135–136 a ssign men t , 121–122 exa mpl e, 137–138 In t er n et Societ y (ISOC), 23, 24, 141 In t er n et St r ea m Pr ot ocol (ST2), 207, 301 In t er NIC, 28, 135, 226, 230, 327, 342 da t a ba se, 326 In t r a -a r ea r ou t in g, 183, 411 In t r a n et s, 20–21 In t r a Net Wa r e, 4 I/O con n ect ion s, 215 IP. See In t er n et Pr ot ocol . IPAE. See In t er n et Pr ot ocol Addr ess En ca psu l a t ion .

IPX, 6, 146, 157, 158, 165 pr ot ocol , 5 IR. See In t er n a l Rou t er ; In t er n et Regist r y. IRTF. See In t er n et Resea r ch Ta sk For ce. ISDN. See In t egr a t ed Ser vice Digit a l Net wor k. ISI. See In f or ma t ion Scien ces In st it u t e. ISIS, 251 ISO. See In t er n a t ion a l Or ga n iz a t ion f or St a n da r diz a t ion . ISOC. See In t er n et Societ y. ISP. See In t er n et Ser vice Pr ovider . It er a t ive qu er ies, 334

J Ja va , 18 Join Host Gr ou p, 367 Join Loca l Gr ou p, 370 Ju mbo da t a gr a ms (ju mbogr a ms), 215

K Ker ber os, 352

L LAN. See Loca l Ar ea Net wor k. LAN-t o-LAN con n ect ivit y, 27 LAN-t o-WAN con n ect ivit y, 27 La r ge-sca l e n et wor ks, 161 LAT. See Loca l Ar ea Tr a n spor t . La yer s, da t a en ca psu l a t ion , 52–53 Lea f in t er f a ce, 379 Lea f n et wor k det ect ion , 401 Lea se du r a t ion , 450–451 Lea sed l in es, 203 Lea sed-l in e u ser s, 25 Lea veHost Gr ou p, 367 Lea veLoca l Gr ou p, 370 Lea ves, 379 Len gt h f iel ds. See Tot a l l en gt h f iel ds. Lin k l oca l , 227 Lin k St a t e Adver t isemen t (LSA), 179, 182, 184, 189, 190, 194, 417–419, 421–423, 427. See also Gr ou p Member sh ip LSA. da t a ba se, 185, 191 pa cket s, 184 Lin k-l a yer a ddr esses, 234, 237 Lin k-l a yer br oa dca st a ddr ess, 258 Lin k-l a yer mu l t ica st , 258

Lin k-l evel a ddr ess ch a n ge, 261 Lin k-Loca l Al l -Nodes mu l t ica st a ddr ess, 262 Lin k-st a t e da t a ba se, 45, 419, 424 Lin k-st a t e pr ot ocol , 45 Lin k-st a t e r ou t in g, 382 a l gor it h m, 191 Loca l Ar ea Net wor k (LAN), 7, 12, 47, 71, 90, 100, 101, 105, 106, 111, 146, 171, 188, 203, 230, 282, 283, 297, 325, 359, 398, 412, 456 in f r a st r u ct u r e, 357 in t er con n ect , 202 in t er f a ce, 400, 401 ph ysica l -a ddr ess-t o-IP a ddr ess t a bl e, 102 pr ot ocol , 38, 291 t r a f f ic, 148 Loca l Ar ea Tr a n spor t (LAT), 6–7, 146 Loca l IRs, 96 Loca l l oopba ck IP a ddr ess, 94 Loca l -gr ou p da t a ba se, 415–416, 418 Loca l -u se IPv6 a ddr essin g, 227–228 Logica l a ddr esses, 84 Lon gest ma t ch r u l e, 120–121 Loopba ck, 72 Loop-ba ck f u n ct ion , 95 Loose sou r ce r ou t e (LSR), 63 Loose sou r ce r ou t in g, 213 LSA. See Lin k St a t e Adver t isemen t . LSR. See Loose sou r ce r ou t e.

M MAC. See Media Access Con t r ol . Ma il , DNS in t er a ct ion , 349 Ma il exch a n ge (MX) r ecor ds, 340–341, 349 Ma n a gemen t a ppl ica t ion s, 478 Ma n a gemen t In f or ma t ion Ba se (MIB), 477, 479, 480 en t r y, exa mpl e, 481 Ma n a gemen t ser ver /cl ien t s, 477 Ma sk yiel ds, 117 Ma sks, 82, 87, 116–118 Ma t ch r u l e. See Lon gest ma t ch r u l e. Ma ximu m Segmen t Siz e (MSS), 285, 290 Ma ximu m Tr a n smission Un it (MTU), 57, 216, 217, 235, 236, 253, 254, 257 discover y. See Pa t h MTU discover y. MBONE, 316, 428 Media Access Con t r ol (MAC), 174 a ddr esses, 76, 100, 102, 105, 172, 204, 227, 230, 238, 370–372, 446. See also IEEE 082.X MAC a ddr ess.

h ea der , 452 mu l t ica st a ddr ess, 234, 238 Media Access Con t r ol (MAC) l a yer , 76, 203 in t er f a ces, 372 Media a ddr ess, 234 MERIT Net wor k, 14 Messa ge t ypes, 184–185 Met r ics, 150, 157, 185–186, 197 MIB. See Ma n a gemen t In f or ma t ion Ba se. Micr osegmen t in g, 111 Micr osu bn et t in g, 111 Mil it a r y n et wor k (MILNET), 12 MILNET. See Mil it a r y n et wor k. MIME. See Mu l t ipu r pose In t er n et Ma il Ext en sion s. Mixer s, 304 Mobil it y a gen t , 239 MOSPF. See Mu l t ica st Open Sh or t est Pa t h Fir st . MPEG, 306 MSS. See Ma ximu m Segmen t Siz e. MTU. See Ma ximu m Tr a n smission Un it . Mu l t ia ccess n et wor ks, 188 Mu l t i-a r ea OSPF t opol ogy, 414 Mu l t ica st , 167, 220, 364, 460, 463. See also In t er -Ar ea Mu l t ica st ; In t er -Au t on omou s Syst em Mu l t ica st ; In t er n et Con t r ol Messa ge Pr ot ocol ICMPv6; In t er n et Pr ot ocol Mu l t ica st ; Pr ot ocol -In depen den t Mu l t ica st . a ddr esses, 74, 76, 250, 263. See also Con ver t ed IP Mu l t ica st a ddr ess. a l gor it h ms, 378 a ppl ica t ion , 140 compa r ison . See Un ica st . member sh ip r epor t in g, 255 pa cket s, 373 su ppor t , 172–173 t r ee t ypes, PIM-SM u sa ge, 404–405 Mu l t ica st da t a gr a ms, 365, 381, 387, 394, 396, 419 r eceivin g, 367 Mu l t ica st Open Sh or t est Pa t h Fir st (MOSPF), 359, 378, 398, 411–412, 415, 417, 423 ca vea t s, 414 dif f er en ces, 412–413 r ou t in g. See In t er -Ar ea MOSPF r ou t in g. Mu l t ica st in g, 357. See also In t er n et Pr ot ocol IPv6; Rever se Pa t h Mu l t ica st in g. t ype, 362–363 Mu l t imedia , 300 Mu l t in et t in g, 93 Mu l t ipl e-pa cket win dowin g, 324 Mu l t ipl exin g, 277, 285 Mu l t ipu r pose In t er n et Ma il Ext en sion s (MIME), 346

Mu l t isu bn et br oa dca st s, 139 MX. See Ma il exch a n ge.

N Na me ser ver s, 326, 329, 332–333 da t a ba se, ma n ipu l a t ion , 341–342 r ecor ds, 337 Na me-t o-a ddr ess t r a n sl a t ion , 328 Na me-t o-IP-a ddr ess ma ppin g, 338 Na me-t o-n et wor k a ddr ess t r a n sl a t ion ser vice, 49 NAPs. See Net wor k Access Poin t s. NAT. See Net wor k Addr ess Tr a n sl a t ion . Na t ion a l Scien ce Fou n da t ion (NSF), 13, 15 Na t ive IP, 4 Na t u r a l ma sk, 80, 126, 171 NBMA. See Non -Br oa dca st Mu l t ia ccess. NCP. See Net Wa r e Cor e Pr ot ocol .; Net wor k Con t r ol Pr ogr a m. NCSA. See U.S. Na t ion a l Cen t er f or Su per compu t er Appl ica t ion s. Neigh bor Adver t isemen t , 238, 261 Neigh bor ca ch e, 264 Neigh bor Discover y, 233–234, 390. See also In t er n et Con t r ol Messa ge Pr ot ocol ; In t er n et Pr ot ocol IPv4. pr ocess, 263 t ypes, 235 Neigh bor Sol icit a t ion , 238, 261 Neigh bor Un r ea ch a bil it y Det ect ion , 234–236, 239 Neigh bor Un r ea ch a bil it y pr ot ocol , 264 Net BIOS, 4, 146 Net sca pe Na viga t or , 2, 16 Net Wa r e Cor e Pr ot ocol (NCP), 282, 324 Net Wa r e (Novel l ), 2, 3, 5–7, 146, 157, 250, 282, 291 in t er f a ce, 5 wor kst a t ion s, 4 Net wor k Access Poin t s (NAPs), 15, 125 Net wor k Addr ess Tr a n sl a t ion (NAT), 95, 228 Net wor k a ddr esses, 82, 86, 91, 93 Net wor k Con t r ol Pr ogr a m (NCP), 11 Net wor k Fil e Syst em (NFS), 320, 432 Net wor k ID, 69, 81, 91, 107, 109, 114, 119, 120, 153, 163, 164, 170, 175 Net wor k Lin ks Adver t isemen t , 184 Net wor k ma sk, 80 Net wor k n u mber , 72–74, 146, 148, 153 Net wor k pr ef ix, 78 Net wor k pr ot ocol s, 52 Net wor k Time Pr ot ocol (NTP), 279, 310 Net wor k Wor kin g Gr ou p, 33

Net wor k-l a yer sof t wa r e, 282 New Yor k St a t e Edu ca t ion a l Resea r ch Net wor k (NYSERn et ), 13 Next -Hop det er min a t ion , 234, 235 Next -h op f iel ds, 171–172 Next -Hop Ga t ewa ys, 393 Next -h op n eigh bor , 265 NFS. See Net wor k Fil e Syst em. NIC, 74, 76, 173, 234, 326, 357, 369, 370, 372. See also In t er NIC. sof t wa r e, 243 No Rou t e t o Dest in a t ion , 257 Non -Br oa dca st Mu l t ia ccess (NBMA), 180, 234 Non con t igu ou s bit pa t t er n , 129 Non -IPv6 ma ch in es, 236 Non -r ea l t ime da t a , 300 t r a n smission , 362 Not a Neigh bor , 257 NSF. See Na t ion a l Scien ce Fou n da t ion . NSFn et , 13–16, 22 NTP. See Net wor k Time Pr ot ocol . NYSERn et . See New Yor k St a t e Edu ca t ion a l Resea r ch Net wor k.

O Of f -l in k sen der s, 237 Of f set , 58–59 On e Pa ss wit h Adver t isin g (OPWA), 461 On -l in k dest in a t ion , 235, 237 Open Sh or t est Pa t h Fir st (OSPF), 39, 43–45, 61, 90–92, 109, 113, 114, 118, 120, 145, 146, 153, 167, 169, 171, 175–176, 185, 199, 201, 203, 251, 252, 372, 378, 382, 414, 415, 419, 427 a r ea s, 191–192 a u t on omou s syst em, 191 doma in , 197, 198 media su ppor t , 180–181 n et wor k, 176–177, 183, 192 over view, 179–180 pa cket s, 186 r ou t er s, 184, 187, 188 r ou t es, 190 r ou t in g pr ot ocol , 56 r ou t in g u pda t es, 68 t opol ogy, 192, 411, 421. See also Mu l t i-a r ea OPSF t opol ogy. Oper a t ion , 419–420. See also Resou r ce Reser va t ion Pr ot ocol . Oper a t ion a l t a bl es, 453–454 Opt ion s, 55 OPWA. See On e Pa ss wit h Adver t isin g. Or igin a t or , 64 OSI, 228

OSI model , 38, 40 OSI su it e, 233 OSPF. See Open Sh or t est Pa t h Fir st .

P Pa cket cl a ssif ier , 461 Pa cket In t er n et Gr oper (PING), 272. See also In t er n et Con t r ol Messa ge Pr ot ocol . Pa cket Ra dio, 24 Pa cket Sa t el l it e, 24 r esea r ch , 22 Pa cket sch edu l er , 461 Pa cket t ype, 312 Pa cket s, 144, 151, 162, 168, 314 swit ch in g, 27–28 Pa r a met er discover y, 235 Pa r en t l in k, 382 Pa t h messa ges, 460–461 Pa t h MTU (PMTU), 239, 264 discover y, 217, 218, 258 Pa t h Tea r , 467 Pa yl oa d t ype, 308 PCM. See Pu l se Code Modu l a t ion . Peer in g, 25 Peer -t o-peer , 8 Ph ysica l a ddr esses, 84, 100 Ph ysica l -a ddr ess-t o-IP-a ddr ess t a bl e. See Loca l Ar ea Net wor k. PIM. See Pr ot ocol In depen den t Mu l t ica st . PIM-DN. See Pr ot ocol -In depen den t Mu l t ica st Den se Mode. PIM-SM. See Pr ot ocol -In depen den t Mu l t ica st Spa r se Mode. PING, 46, 260. See also In t er n et Con t r ol Messa ge Pr ot ocol . da t a gr a m, 272 r equ est , 272, 273 PMTU. See Pa t h MTU. Poin t s of Pr esen ce (POPs), 16, 25 Poin t -t o-poin t con n ect ion , 181 Poin t -t o-poin t l in k, 92, 171, 180, 189, 412 Poin t -t o-poin t ser ia l l in es, 202 Poison r ever se, 165, 395 Poison ed r ever se, 161, 167 POP. See Post Of f ice Pr ot ocol . POPs. See Poin t s of Pr esen ce. Por t , 153, 163 Por t n u mber s, 277, 278, 280. See also Assign ed por t n u mber s; Dyn a mic por t n u mber s; Regist er ed por t n u mber s. Por t Un r ea ch a bl e, 257, 277 Post Of f ice Pr ot ocol (POP), 49, 318, 319, 345, 348, 350–351

oper a t ion , 351–352 POP3, 351, 352 t opol ogy, 353 Pr eceden ce, 55, 285 Pr ef ix List , 265 ca ch e, 264, 265 Pr ef ixes, 116–117. See also Cl a ss B; In t er n et Pr ot ocol IPv6 t u n n el in g; Net wor k pr ef ix. a ssign men t s, 133–134 det er min a t ion . See Common pr ef ix. discover y, 235 l en gt h , 130 Pr ima r y ma st er s, 332 Pr iva cy ca pa bil it ies, 209 Pr iva t e in t er n et , 20 Pr obe pa cket , 390 Pr ocess-t o-pr ocess commu n ica t ion s, 11 Pr opr iet a r y syst em, 11 Pr ot ocol a n d Hea der Ch ecksu m, 212 Pr ot ocol f iel ds, 61–62 Pr ot ocol ID, 463, 469 Pr ot ocol In depen den t Mu l t ica st (PIM), 359, 398, 426, 427 Pr ot ocol su it e, 39, 50, 99, 214, 277 Pr ot ocol -In depen den t Mu l t ica st Den se Mode (PIM-DM), 398, 399 oper a t ion , 400–401 pr ot ocol s, compa r ison . See Pr ot ocol -In depen den t Mu l t ica st Spa r se Mode. Pr ot ocol -In depen den t Mu l t ica st Spa r se Mode (PIM-SM), 378, 387, 403, 406, 408, 409 pr ot ocol s, PIM-DM pr ot ocol compa r ison , 410 u sa ge. See Mu l t ica st . Pr ot ocol s, 372–373 Pr ovider ID, 230 Pr ovider sel ect ion , 251 Pr ovider -ba sed IPv6 a ddr essin g, 226 Pr ovider -or ien t ed u n ica st a ddr ess, 226 Pr oxy ARP, 82, 107–108 Pr u n in g, def in it ion , 383–384 Pu l se Code Modu l a t ion (PCM), 306 Pu sh /Pu l l t ech n ol ogy, 356

Q Qu a l it y of Ser vice (QoS), 27, 28, 46, 315, 456–459, 461, 463, 474, 475 Qu er y f u n ct ion t ypes, 334

R RARP. See Rever se Addr ess Resol u t ion Pr ot ocol .

Rea l Time Con t r ol Pr ot ocol (RTCP), 39, 47, 48, 300–302, 309, 310, 357 pr ot ocol , 315 Rea l Time Pr ot ocol (RTP), 39, 47, 48, 300–302, 357, 458 ca vea t s, 315 con t r ol , pr ovidin g, 309 messa ge f or ma t , 305–306 pr ot ocol , 303, 304 Rea l Time St r ea min g Pr ot ocol (RTSP), 357, 458 Rea l -t ime da t a , 300 t r a n smission , 362 Rea l -t ime st r ea min g, 301 Rea l -t ime t r a n sf er s, 363 Rea l -t ime t r a n spor t , 207 Receiver r epor t s, 312 Receiver SMTP, 346 Recor d r ou t e, 214 Recu r sive qu er ies, 334 Redir ect s, 234, 235, 237, 261, 264 Region a l IRs, 96 Regist er ed por t n u mber s, 278, 279 Remot e n et wor ks, 202–203 Ren devou s poin t (RP), 399, 403–407, 409. See also Ca n dida t e RP. Requ est f or Commen t s (RFCs), 28–31, 53, 57, 66, 67, 78, 80, 82, 95, 96, 101, 109–111, 113, 115, 116, 123, 132, 139–141, 154, 169, 172, 174–176, 186, 197, 199, 211, 215, 217–219, 226, 228, 233–236, 253, 254, 265–267, 274, 277–279, 301, 316, 317, 325, 326, 345, 348, 350, 351, 364, 369, 372, 396, 411, 428, 430, 441, 442, 444, 450, 451, 455, 457, 479. See also Dr a f t RFCs; In t er n et Pr ot ocol IPv6. a n n ou n cemen t s, 32 Edit or , 31 n u mber s. See In t er n et Assign ed Nu mber s Au t h or it y. r equ ir emen t s, 37 r eview, 428, 455 st u dy, 30 su bmission , 31–32 u pda t es, 32 Requ est f or Commen t s (RFCs) f or ma t , 33–34 r equ ir emen t s, 35–36 Reser va t ion s, 459 disa bl in g, 467 st yl e. See Resou r ce Reser va t ion Pr ot ocol . Resol ver s, 329 Resou r ce Reser va t ion Pr ot ocol (RSVP), 39, 46, 48, 172, 301, 357, 363, 429, 456–459, 468 a l t er n a t ives, 457 con t r ol , 465–466 exa mpl e, 469–471

issu es, 472 oper a t ion , 459–460 r equ est s, 463–464 Resou r ce Reser va t ion Pr ot ocol (RSVP) (Continued) r ou t er s, 461–462 st yl e, 464–465 su mma r y, 473–474 u sa ge, l oca t ion , 458 ResvTea r , 467 Rever se Addr ess Resol u t ion Pr ot ocol (RARP), 105–107. See also Dyn a mic Rever se Addr ess Resol u t ion Pr ot ocol . Rever se Pa t h Br oa dca st in g, 378 Rever se Pa t h For wa r din g (RPF), 381–382, 400, 405, 412, 425 Rever se Pa t h Mu l t ica st in g (RPM), 378, 384–385, 387, 399 RFCs. See Requ est f or Commen t s. RIP. See Rou t in g In f or ma t ion Pr ot ocol . RIPE, 28, 96, 226, 230, 342 RIPn g. See Rou t in g In f or ma t ion Pr ot ocol . Root , 379 Rou t a bl e pr ot ocol , 43 Rou t e a ggr ega t ion , 126–127, 129–130 Rou t e r epor t s, 391, 394 r eceivin g, 392 Rou t e Ta bl e En t r ies (RTE), 253 Rou t e t a g, 167, 171–172 Rou t er Adver t isemen t , 237, 261, 264 Rou t er IDs, 252 Rou t er Lin ks Adver t isemen t , 184 Rou t er List ca ch e, 264 Rou t er Sol icit a t ion , 261 Rou t er t o Host , 241 Rou t er t o Rou t er , 241 Rou t er Dea dIn t er va l , 187 Rou t er s, 12, 28, 50, 60, 63, 82, 126, 144, 152, 162–166, 385, 386, 388, 390. See also Def a u l t r ou t er s; Resou r ce Reser va t ion Pr ot ocol . a l gor it h m, 180 discover y, 235 n a mes, 183 por t , 175 t ypes, 181–182 u pda t in g, 151, 152 ven dor s, 106 Rou t in g, 50, 216. See also In t er n et Pr ot ocol r ou t in g. met h ods, 183 pr ocess, f l owch a r t , 148–149 t a bl e, 190, 201, 393

u pda t e, 164 Rou t in g In f or ma t ion Pr ot ocol (RIP), 40, 43–45, 60, 145, 146, 150, 153, 155, 156, 160, 163, 165, 167, 170, 175–179, 201, 251, 252, 381, 391, 394 f iel d descr ipt ion s, 157–158 f ixes, 165 n et wor k, 60 oper a t ion a l t ypes, 155–156 pr ot ocol , 150, 158, 172, 200 RIPn g, 253 sca l in g, 161–163 u pda t e t a bl es, 278 Rou t in g In f or ma t ion Pr ot ocol (RIP1) RIPv1, 90–92, 119, 154–155, 161, 163, 164, 168, 169, 171, 173, 174, 252, 382 pr ot ocol , disa dva n t a ges, 160–161 RIPv2 compa t ibil it y, 173–174 Rou t in g In f or ma t ion Pr ot ocol (RIP2) RIPv2, 90–92, 109, 145, 167–169, 171, 173, 174, 203, 252, 372, 382 compa t ibil it y. See Rou t in g In f or ma t ion Pr ot ocol (RIP) RIPv1. t a bl e, 395 Rou t in g pr ot ocol s, 40–43, 90, 149–150 compa r ison , 177–178 RP. See Ren devou s poin t . RPF. See Rever se Pa t h For wa r din g. RPM. See Rever se Pa t h Mu l t ica st in g. RSVP. See Resou r ce Reser va t ion Pr ot ocol . RTCP. See Rea l Time Con t r ol Pr ot ocol . RTE. See Rou t e Ta bl e En t r ies. RTP. See Rea l Time Pr ot ocol . RTSP. See Rea l Time St r ea min g Pr ot ocol .

S SAP, 212 Secon da r y ma st er s, 332 Sen der r epor t s, 310–311 Sen der SMTP, 346 Sequ en ce n u mber s, 287, 288, 290–291 exa mpl e, 292–293 Ser ia l l in e, 171 Ser ver side, 435–436 Ser vice t ype, 55–56 Sh a r ed expl icit , 466 Sh a r ed r eser va t ion s, 464 Sh a r ed RP-t r ee, 408 Sh a r ed t r ee, 404 Sh a r ewa r e, 18 Sh or t est -pa t h sou r ce-r oot ed del iver y t r ee, 394

Sh or t est -pa t h t r ee, 404, 414, 415, 419 Simpl e In t er n et Pr ot ocol Pl u s (SIPP), 211 Simpl e In t er n et Pr ot ocol (SIP), 211 Simpl e Ma il Tr a n sf er Pr ot ocol (SMTP), 39, 49, 103, 316, 317, 320, 340, 341, 345, 350, 351. See also Receiver SMTP; Sen der SMTP. f l ow, 347–348 f u n ct ion s, 346 t opol ogy, 353 Simpl e Net wor k Ma n a gemen t Pr ot ocol (SNMP), 39, 172, 429, 476 el emen t s, 477 en ca psu l a t ion , 484 ma n a ger , 478 pr ot ocol , 482–483 Simpl e Spa n n in g Tr ee, 378 SIP. See Simpl e In t er n et Pr ot ocol . SIPP. See Simpl e In t er n et Pr ot ocol Pl u s. Sit e l oca l , 227, 228 6Bon e, 209, 225, 241 Sl ow st a r t , 296–298 SMDS. See Swit ch ed Mu l t imega bit Da t a Ser vice. SMTP. See Simpl e Ma il Tr a n sf er Pr ot ocol . SNA. See Syst em Net wor k Ar ch it ect u r e. SOA. See St a r t of Au t h or it y. Socket n u mber , 281 Sof t st a t e, 460 Sol icit ed-n ode mu l t ica st a ddr ess, 238 Sou r ce descr ipt ion pa cket , 313 Sou r ce f iel ds, 64–65 Sou r ce n et wor ks, 391, 421 Sou r ce por t , 278, 284 Sou r ce qu en ch , 274 Sou r ce r ou t in g, 214 Sou r ce su bn et s, 388, 393, 394 Sou r ce-Root ed Tr ee (SRT), 404, 420 con ver sion , 408 Spa n n in g t r ee, 378–381 t opol ogy, 385 Spa r se Mode, 378, 398. See also Pr ot ocol -In depen den t Mu l t ica st Spa r se Mode. SPF a l gor it h m, 190, 191 Spl it h or iz on , 161, 165, 167 demon st r a t ion , 166–167 SRI. See St a n f or d Resea r ch In st it u t e. SRT. See Sou r ce-Root ed Tr ee. SSDP, 313 SSR. See St r ict sou r ce r ou t e. SSRC n u mber s, 306, 310, 313

ST2. See In t er n et St r ea m Pr ot ocol . St a r t of Au t h or it y (SOA) r ecor d, 336 St a t ef u l a u t ocon f igu r a t ion , 231, 232 St a t el ess a u t ocon f igu r a t ion , 231, 232 St a t ic en t r ies, 200 St a t ic r ou t in g, dyn a mic r ou t in g compa r ison , 200–201 STD 1. See In t er n et Of f icia l Pr ot ocol St a n da r ds. St r ea m, 289 St r ea m ID, 214 St r ea ms 2 pr ot ocol , 53 St r ict sou r ce r ou t e (SSR), 63 St u b a r ea s, 198 Su bn et ID, 226, 228, 231 Su bn et ma skin g, 167 Su bn et ma sks, 84, 90, 111, 117, 119, 123, 163–164. See also Va r ia bl e-l en gt h su bn et ma sks. decision s, 91–92 f iel d, 170–171 n u mber , 88 t empl a t e, 85–86 Su bn et s, 43, 88, 95, 107, 117–118, 120, 121, 139, 145, 166, 167, 226. See also Sou r ce su bn et s. bit s, 89 n u mber , 82, 86 r est r ict ion s, 90–91 specia l con sider a t ion s, 139–140 Su bn et t in g, 78–79, 85, 111 exa mpl es, 82–83. See also Cl a ss A; Cl a ss B; Cl a ss C. r ea son s, 80 Su bn et wor k, 100 Su bscr iber ID, 226, 230 Su b-su bn et s, 120 Su mma r y Lin ks Adver t isemen t , 184 Su per n et t in g, 113–115, 124–125 Swit ch ed Mu l t imega bit Da t a Ser vice (SMDS), 202 Syst em Net wor k Ar ch it ect u r e (SNA), 2, 6, 7 a r ch it ect u r e, 5

T T1 l in es, 160, 181 TAR comma n d, 17 Ta r get Addr ess, 261 TCP. See Tr a n smission Con t r ol Pr ot ocol . TCP a n d UDP over Bigger Addr esses (TUBA), 210 TCP/IP. See Tr a n smission Con t r ol Pr ot ocol /In t er n et Pr ot ocol . Tel en et , 49

TELNET, 4, 39, 55, 56, 103, 279, 286, 288, 316–318, 321, 326, 330, 333, 343 opt ion s, 319–320 pr ot ocol , 49 Ter min a t ion , 299 TFTP. See Tr ivia l Fil e Tr a n sf er Pr ogr a m. Th r ee-wa y h a n dsh a ke, 287–288 Th r ou gh pu t , 55 Time Exceeded, 258, 259, 275 Time l ef t t o del et e, 153 Time t o Live (TTL), 60–62, 147, 162, 204, 212, 215, 250, 274, 366, 376, 421, 439 Time-ou t s, 298, 299 Time-sen sit ive a ppl ica t ion s, su ppor t , 306–307 Timest a mp, 274, 307, 310, 311 TLD. See Top-l evel doma in . Token Rin g, 7, 38, 52, 56, 63, 66, 100, 180, 212, 214, 219, 457 n et wor ks, 218, 456 st a t ion , 57 Top-l evel doma in (TLD), 124, 330 TOS. See Type of Ser vice. Tot a l l en gt h f iel ds, 55–56 TP/IX, 211 Tr a cer ou t e, 64 Tr a n sl a t or s, 303 Tr a n smission con t r ol , 294 Tr a n smission Con t r ol Pr ot ocol (TCP), 4, 12, 31, 47, 49, 51, 53, 61, 102, 103, 141, 154, 206, 210, 211, 255, 257, 272, 275, 279–283, 294, 295, 301, 305, 318, 372, 376 da t a gr a m, 284 det a il s, 282–283 f iel ds, 284–285 f l ow, 293–295 h ea der , 283, 284, 287, 294 r et r a n smission , 295–296 segmen t , 289–290 ser vices, 285 Tr a n smission Con t r ol Pr ot ocol (TCP) con n ect ion , 351 est a bl ish men t , 286–287 pa t h , 57 Tr a n smission Con t r ol Pr ot ocol /In t er n et Pr ot ocol (TCP/IP), 2, 214 a ppl ica t ion s, 316–317 impl emen t a t ion s, 107 in t er n et su ppor t su bn et ma skin g, 108 n et wor k, 102, 439 or igin s, 9–16 pr ot ocol , 38, 100, 216, 317, 345 pr ot ocol docu men t s, 28–29 sof t wa r e st a cks, 243

st a ck, 71 st a n da r d a ppl ica t ion s, 49 st a t ion , 86 Tr a n spor t Con t r ol Pr ot ocol , 39 Tr a n spor t La yer Pr ot ocol s, 47–48 Tr a n spor t -l a yer sof t wa r e, 281 Tr ees. See In t er -Ar ea Sh or t est -Pa t h Tr ee. con ver sion . See Sou r ce-r oot ed t r ee. t ypes. See Mu l t ica st . Tr igger ed u pda t es, 161, 165 Tr ivia l Fil e Tr a n sf er Pr ogr a m (TFTP), 39, 277, 278, 280, 316, 317, 320, 324 TTL. See Time t o Live. TUBA. See TCP a n d UDP over Bigger Addr esses. Tu n n el , 388 en dpoin t s, 396 Tu n n el in g, 63, 412. See also Au t oma t ic t u n n el in g; Con f igu r ed t u n n el in g; Dist a n ce Vect or Mu l t ica st Rou t in g Pr ot ocol ; In t er n et Pr ot ocol IPv4; In t er n et Pr ot ocol IPv6 t u n n el in g. Type of Ser vice (TOS), 55, 175, 177, 212, 415, 421, 457, 458 f iel ds, 56

U UDP. See User Da t a gr a m Pr ot ocol . Un ica st , 220, 363, 463 a ddr esses, 230–231. See also Pr ovider -or ien t ed u n ica st a ddr ess. IP Mu l t ica st compa r ison , 360–362 t a bl e, 395 Un iqu e r eser va t ion s, 464 Un iver sa l Time (UT), 214 Un st r u ct u r ed st r ea m, 289 Upper -l a yer h ea der , 217 Upper -l a yer pr ot ocol s, 239, 276, 367 Upper -l a yer sof t wa r e, 75, 234 Upst r ea m n ode, 421 Ur gen t poin t er , 285 U.S. Na t ion a l Cen t er f or Su per compu t er Appl ica t ion s (NCSA), 16 User Da t a gr a m Pr ot ocol (UDP), 39, 46–48, 51, 53, 61, 158, 160, 206, 210, 275–276, 277–279, 281, 286, 324, 372, 435, 440, 457 dest in a t ion por t , 437, 438 h ea der , 215, 276, 277, 280 l a yer , 302 User t o User Copy (UUCP), 12, 13, 349 UT. See Un iver sa l Time. UUCP. See User t o User Copy.

V Va r ia bl e Len gt h Su bn et Ma sks (VLSM), 66, 92, 111, 113–115, 119–120, 124, 164, 175, 252 compa r ison . See Cl a ssl ess In t er -Doma in Rou t in g. Va r ia bl e-l en gt h ma sks, 139 Va r ia bl e-l en gt h su bn et , 167 VAT. See Visu a l Au dio Tool . Vect or , 149 VERS f iel d, 53, 212 Ver sion n u mber , 54 VINES (Ba n ya n ), 6 Vir t u a l cir cu it swit ch in g, 27 Vir t u a l l in k, 194, 195 Visu a l Au dio Tool (VAT), 305 VLSM. See Va r ia bl e Len gt h Su bn et Ma sks. VMS oper a t in g syst em, 8

W WAN. See Wide Ar ea Net wor k. Web. See Wor l d Wide Web. Wel l -kn own por t n u mber s, 279 WGs. See Wor kin g Gr ou ps. WHOIS comma n d, 342–343 Wide Ar ea Net wor k (WAN), 7, 144, 202, 359, 398, 412, 456 l in ks, 192, 196, 303, 398 pr ot ocol , 38 Wil dca r d f il t er t ype, 465 Win dow ma n a gemen t , 293–295 Wor kin g Gr ou ps (WGs), 31 Wor l d Wide Web (WWW / Web), 16–20 br owser , 28 ca pa bil it ies, 24 pa ge, 17, 18 pr ogr a mmin g, 2 WWW. See Wor l d Wide Web.

X X.25, 7, 49, 52, 180, 234 Xer ox docu men t a t ion , 161 Xer ox Net wor k Syst em (XNS), 6, 7, 43, 154, 157, 158, 165, 291 XNS. See Xer ox Net wor k Syst em.

Z Zon es, 328, 329, 332

Pr eviou s Ta bl e of Con t en t s Next