0% found this document useful (0 votes)
13 views87 pages

Ipv6 Essentials 2nd Edition Silvia Hagen Download

IPv6 Essentials, Second Edition by Silvia Hagen provides a comprehensive guide to the next generation Internet protocol, IPv6, highlighting its advantages over IPv4, including an expanded address space and new functionalities. The book covers various aspects of IPv6, such as addressing, security, quality of service, and interoperability, while also addressing common misconceptions and transition mechanisms from IPv4. It aims to familiarize readers with IPv6 and its features, making it easier for them to adapt to future networking needs.

Uploaded by

merrinuzho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views87 pages

Ipv6 Essentials 2nd Edition Silvia Hagen Download

IPv6 Essentials, Second Edition by Silvia Hagen provides a comprehensive guide to the next generation Internet protocol, IPv6, highlighting its advantages over IPv4, including an expanded address space and new functionalities. The book covers various aspects of IPv6, such as addressing, security, quality of service, and interoperability, while also addressing common misconceptions and transition mechanisms from IPv4. It aims to familiarize readers with IPv6 and its features, making it easier for them to adapt to future networking needs.

Uploaded by

merrinuzho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 87

Ipv6 Essentials 2nd Edition Silvia Hagen

download

https://ebookbell.com/product/ipv6-essentials-2nd-edition-silvia-
hagen-2458704

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Ipv6 Essentials Third Edition Silvia Hagen

https://ebookbell.com/product/ipv6-essentials-third-edition-silvia-
hagen-4725332

Ipv6 Essentials 1st Edition Silvia Hagen

https://ebookbell.com/product/ipv6-essentials-1st-edition-silvia-
hagen-976822

Ipv6 Essentials Silvia Hagen

https://ebookbell.com/product/ipv6-essentials-silvia-hagen-48121150

Ipv6 Essentials Silvia Hagen

https://ebookbell.com/product/ipv6-essentials-silvia-hagen-48085980
Understanding Ipv6 Your Essential Guide To Ipv6 On Windows Networks
Third Edition Joseph Davies

https://ebookbell.com/product/understanding-ipv6-your-essential-guide-
to-ipv6-on-windows-networks-third-edition-joseph-davies-2620252

Ipv6 Security Protection Measures For The Next Internet Protocol Hogg

https://ebookbell.com/product/ipv6-security-protection-measures-for-
the-next-internet-protocol-hogg-21983642

Ipv6 For Enterprise Networks 1st Edition Shannon Mcfarland Muninder


Sambi

https://ebookbell.com/product/ipv6-for-enterprise-networks-1st-
edition-shannon-mcfarland-muninder-sambi-2224282

Ipv6 Network Administration Niall Richard Murphy David Malone

https://ebookbell.com/product/ipv6-network-administration-niall-
richard-murphy-david-malone-2461360

Ipv6 Theory Protocol And Practice 2nd Edition Pete Loshin

https://ebookbell.com/product/ipv6-theory-protocol-and-practice-2nd-
edition-pete-loshin-36528636
IPv6 Essentials
Other resources from O’Reilly
Related titles IPv6 Network Administration Cisco Cookbook™
TCP/IP Network BGP
Administration Essential SNMP
Cisco IOS in a Nutshell JUNOS Cookbook™

oreilly.com oreilly.com is more than a complete catalog of O’Reilly books.


You’ll also find links to news, events, articles, weblogs, sample
chapters, and code examples.

oreillynet.com is the essential portal for developers interested in


open and emerging technologies, including new platforms, pro-
gramming languages, and operating systems.

Conferences O’Reilly brings diverse innovators together to nurture the ideas


that spark revolutionary industries. We specialize in document-
ing the latest tools and systems, translating the innovator’s
knowledge into useful skills for those in the trenches. Visit
conferences.oreilly.com for our upcoming events.

Safari Bookshelf (safari.oreilly.com) is the premier online refer-


ence library for programmers and IT professionals. Conduct
searches across more than 1,000 books. Subscribers can zero in
on answers to time-critical questions in a matter of seconds.
Read the books on your Bookshelf from cover to cover or sim-
ply flip to the page you need. Try it today for free.
SECOND EDITION

IPv6 Essentials

Silvia Hagen

Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo


IPv6 Essentials, Second Edition
by Silvia Hagen

Copyright © 2006, 2002 O’Reilly Media, Inc. All rights reserved.


Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (safari.oreilly.com). For more information, contact our
corporate/institutional sales department: (800) 998-9938 or [email protected].

Editor: Tatiana Apandi and Mike Loukides Indexer: John Bickelhaupt


Production Editors: Reba Libby and Cover Designer: Hanna Dyer
Genevieve d’Entremont Interior Designer: David Futato
Copyeditor: Reba Libby Illustrators: Robert Romano and Jessamyn Read
Proofreader: Genevieve d’Entremont

Printing History:
May 2006: Second Edition.
July 2002: First Edition.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. IPv6 Essentials, the image of a rigatella snail, and related trade dress are trademarks
of O’Reilly Media, Inc.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a
trademark claim, the designations have been printed in caps or initial caps.

While every precaution has been taken in the preparation of this book, the publisher and author(s)
assume no responsibility for errors or omissions, or for damages resulting from the use of the
information contained herein.

This book uses RepKover™, a durable and flexible lay-flat binding.

ISBN: 0-596-10058-2
[M]
Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

1. Why IPv6? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The History of IPv6 3
What’s New in IPv6? 4
Why Do We Need IPv6? 5
Common Misconceptions 8
When Is It Time for IPv6? 10
IPv6 Around the World 12
IPv6 Status and Vendor Support 15
References 16

2. The Structure of the IPv6 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


General Header Structure 17
The Fields in the IPv6 Header 18
Extension Headers 22
References 34

3. IPv6 Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The IPv6 Address Space 35
Address Types 36
Address Notation 37
Prefix Notation 38
Global Routing Prefixes 39
Global Unicast Address 40
Special Addresses 44
Link- and Site-Local Addresses 48
Anycast Address 49

v
Multicast Address 51
Required Addresses 56
Default Address Selection 57
References 58

4. ICMPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
General Message Format 60
ICMP Error Messages 64
ICMP Informational Messages 69
Processing Rules 70
The ICMPv6 Header in a Trace File 71
Neighbor Discovery (ND) 73
Autoconfiguration 87
Network Renumbering 91
Path MTU Discovery 92
Multicast Listener Discovery (MLD) 93
Multicast Router Discovery (MRD) 98
References 99

5. Security with IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101


General Security Concepts 101
General Security Practices 102
IPsec Basics 103
IPv6 Security Elements 108
Overview of New IPsec RFCs 115
Interaction of IPsec with IPv6 Elements 116
IPv6 Security “Gotchas” 116
Enterprise Security Models for IPv6 122
References 124

6. Quality of Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128


QoS Basics 128
QoS in IPv6 Protocols 130
Using QoS 135
References 135

7. Networking Aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137


Layer 2 Support for IPv6 137
Detecting Network Attachment (DNA) 145
References 146

vi | Table of Contents
8. Routing Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
The Routing Table 149
RIPng 152
OSPF for IPv6 (OSPFv3) 163
BGP-4 Support for IPv6 201
Additional Routing Protocols for IPv6 214
References 222

9. Upper-Layer Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224


UDP/TCP 224
DHCP 226
DNS 242
SLP 247
FTP 248
Telnet 250
Web Servers 250
References 252

10. Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255


Dual-Stack Techniques 255
Tunneling Techniques 256
Network Address and Protocol Translation 278
Comparison 284
Integration Scenarios 286
Case Studies 288
What Is Missing? 301
Security Aspects 305
Applications 305
Cost of Introduction 306
Vendor Support 308
References 310

11. Mobile IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314


Overview 315
The Mobile IPv6 Protocol 319
ICMPv6 and Mobile IPv6 326
Mobile IPv6 Communication 329
Security 336
Extensions to Mobile IPv6 337
References 339

Table of Contents | vii


12. Get Your Hands Dirty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Linux 341
BSD 343
Sun Solaris 347
Macintosh 348
Microsoft 350
Cisco Router 354
Applications 359
Description of the Tests 359

A. RFCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365

B. IPv6 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

C. Recommended Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

viii | Table of Contents


Preface 1

This book is about the next generation Internet protocol. We have become familiar
with the strengths and weaknesses of IPv4; we know how to design and configure it,
and we have learned how to troubleshoot it. And now we have to learn a new proto-
col? Start from scratch? Not really. The designers of IPv6 have learned a lot from over
15 years of experience with IPv4, and they have been working on the new protocol
since the early 1990s. They retained the strengths of IPv4, extended the address
space from 32 bits to 128 bits, and added functionality that is missing in IPv4. They
developed transition mechanisms that make IPv4 and IPv6 coexist peacefully and
that guarantee a smooth transition between the protocols. In fact, this was one of the
major requirements for the development of the new protocol version.
So you do not need to forget what you know about IPv4; many things will feel famil-
iar with IPv6. When you get started, you will discover new features and functional-
ities that will make your life a lot easier. IPv6 has features that you will need in
tomorrow’s networks—features that IPv4 does not provide. The day will come when
our Personal Digital Assistants (PDAs) and mobile phones have IP addresses. Aside
from the fact that the IPv4 address space could never cover the demand for that num-
ber of IP addresses, imagine configuring those devices with the means we have today!
One of the coolest features built into IPv6 is the autoconfiguration capability. Haven’t
we always struggled with IP address assignment? The advent of DHCP made our lives a
little easier, but now we need to maintain and troubleshoot the DHCP servers. And
when our refrigerator, our PDA, and our TV each have an IP address, will we need a
DHCP server at home? Not with autoconfiguration. If you have an IPv6-enabled host,
you can plug it into your network, and it will configure automatically for a valid IPv6
address. Internet Control Message Protocol (ICMP), which is a networker’s best friend,
has become much more powerful with IPv6. Many of the new features of IPv6, such as
autoconfiguration, optimized multicast routing and multicast group management,
Neighbor Discovery, path MTU discovery, and Mobile IPv6 are based on ICMPv6.
I hope that this book will help you to become familiar with the protocol and provide
an easy-to-understand entry point and guide to exploring this new area.

ix

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Audience
This book covers a broad range of information about IPv6 and is an excellent
resource for anybody who wants to understand or implement the protocol. Whether
you are the owner or manager of a company or an IT department; whether you are a
system or network administrator, an engineer, or a network designer; or whether you
are just generally interested in learning about the important changes with IPv6, this
book discusses economic and strategic aspects as well as technical details. I describe
interoperability mechanisms and scenarios that ensure a smooth introduction of
IPv6. Quick start guides for different operating systems help with the first hands-on
steps. If you are a company owner or manager, you will be most interested in Chap-
ters 1 and 10. If you need to plan your corporate network strategy, you will be most
interested in Chapters 1, 4, 8, 9, and 10. If you manage the infrastructure in your
company, you will especially be interested in Chapters 4, 7, and 8, which cover
ICMPv6, Layer 2 issues and routing, and in Chapter 10, which addresses interopera-
bility. If you are a system or network administrator, all chapters are relevant: this
book provides a foundation for IPv6 implementation and integration with IPv4.

About This Book


This book covers IPv6 in detail and explains all the new features and functions. It
will show you how to plan for, design, and integrate IPv6 in your current IPv4 infra-
structure. It also teaches you what you need to know to get started, to configure IPv6
on your hosts and routers, and to find the right applications that support IPv6.
Now that you know what this book is about, I should explain this this book is not
written for developers. This doesn’t mean you should not be reading it if you are a
developer. If you do read it, you will understand the implications of introducing IPv6
in your network and how important it is to develop cool applications for IPv6. If you
need a specific guide to developing for IPv6, look for developer resources.
This book assumes that you have a good understanding of network issues in gen-
eral and a familiarity with IPv4. It is beyond the scope of this book to discuss IPv4
concepts in detail. I refer to them when necessary, but if you want to learn more
about IPv4, there are a lot of good resources on the market. You can find a list of
books in Appendix C.

Organization
This book is organized so that a reader familiar with IPv4 can easily learn about the
new features in IPv6 by reading Chapters 2 through 6. These chapters cover what
you need to know about addressing, the new IPv6 header, ICMPv6, security, and
Quality of Service (QoS). Chapters 7 through 11 cover topics such as networking

x | Preface

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
aspects, support of different link-layer services, routing, upper layer protocol sup-
port, the transition mechanisms that make IPv6 interoperable with IPv4, and Mobile
IPv6. Chapter 12 is a quick-start guide and includes a short description of how differ-
ent operating systems are configured for IPv6. Here is a chapter-by-chapter break-
down of the book:
• Chapter 1, Why IPv6?, briefly explains the history of IPv6 and gives an overview
of the new functionality. It draws a bigger picture of Internet and service evolu-
tion, showing that the large address space and the advanced functionality of IPv6
are much needed for different reasons. It then discusses the most common mis-
conceptions that prevent people from exploring and integrating the protocol,
and provides a summary of the most important steps to undertake today, along
with a picture of what is happening around the world.
• Chapter 2, The Structure of the IPv6 Protocol, describes the new IPv6 header for-
mat with a discussion of each field and trace file examples. It also describes what
Extension headers are, what types of Extension headers have been defined, and
how they are used.
• Chapter 3, IPv6 Addressing, explains everything you need to know about the
new address format, address notation, address types, international registry ser-
vices, and prefix allocation.
• Chapter 4, ICMPv6, describes the new ICMPv6 message format, the ICMPv6
Error messages and Informational messages, and the ICMPv6 header in the trace
file. This chapter also discusses the extended functionality based on ICMPv6,
such as Neighbor Discovery, Autoconfiguration, Path MTU Discovery, and Mul-
ticast Listener Discovery (MLD). You will learn how ICMPv6 makes an adminis-
trator’s life easier.
• Chapter 5, Security with IPv6, begins with a short discussion of basic security
concepts and requirements. It then covers the IPsec framework, security ele-
ments available in IPv6 for authentication and encryption, and how they are
used. Our future networks will require new security architectures. This chapter
includes a description of a new model.
• Chapter 6, Quality of Service, discusses basic requirements and types of QoS. I
explain the QoS elements available in IPv6 and how they can be implemented. I
also describe different QoS architectures and introduce further work in this area.
• Chapter 7, Networking Aspects, discusses Layer 2 support for IPv6 (Ethernet,
Token Ring, ATM, frame relay, etc.), the mapping of multicast addresses to Layer
2 addresses, and the Detecting Network Attachment (DNA) working group.
• Chapter 8, Routing Protocols, discusses the advanced routing features of IPv6 and
covers the available routing protocols such as RIPng, OSPFv3 for IPv6, and BGP
extensions for IPv6, IS-IS, and EIGRPv6. (This chapter was written by Stefan
Marzohl.)

Preface | xi

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
• Chapter 9, Upper-Layer Protocols, discusses what is going on above the IP layer,
starting with changes for TCP and UDP, continuing with a detailed discussion of
the DHCPv6 specification, DNS extensions for IPv6, SLPv2 in IPv6 networks,
FTP, Telnet, and web servers.
• Chapter 10, Interoperability, discusses the different transition mechanisms that
have been defined, such as dual-stack operation, tunneling, and translation tech-
niques. It also shows how they can be used and combined to ensure peaceful
coexistence and smooth transition. A broad variety of case studies show that
IPv6 is mature enough to be introduced and that there are many ways to do this.
It also provides an overview of what is still missing, security and application
aspects, vendor status, and the cost of introduction.
• Chapter 11, Mobile IPv6, covers Mobile IPv6. This chapter explains why this
technology will become the foundation for a new generation of mobile services.
• Chapter 12, Get Your Hands Dirty, explains how to get started with IPv6 on dif-
ferent operating systems, such as Sun Solaris, Linux, BSD, Windows 2003, Win-
dows XP, Mac OS, and a Cisco router. It introduces the most common IPv6
tools available for each operating system. This chapter also explains what I did
in my lab and provides examples of trace files.
• Appendix A, RFCs, includes a short introduction to the RFC process and author-
ities, and provides a list of relevant RFCs for IPv6.
• Appendix B, IPv6 Resources, reflects the chapter organization of the book and
provides summaries of all indexes, protocol numbers, message types, and
address allocations.
• Appendix C, Recommended Reading, provides a list of books that I recommend.
Some important topics and information appear in multiple places in the book. This
is not because I want to bore you, but because I assume that most readers will not
read the book from the first page to the last page, but rather will pick and choose
chapters and sections depending on interest. So if the information is important with
regard to different sections and contexts, I may mention it again.

Conventions Used in This Book


I use the following font conventions in this book:
Italic
Used to indicate commands, directory paths, filenames, and URLs.
Constant width
Used to indicate IP and MAC addresses, command-line utilities and tools, inter-
faces, and flags.

xii | Preface

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Constant width italic
Used in code examples to show sample text to be replaced with your own values.
Constant width bold
Used to highlight portions of code, typically new additions to old code.

Using Code Examples


This book is here to help you get your job done. In general, you may use the code in
this book in your programs and documentation. You do not need to contact us for
permission unless you’re reproducing a significant portion of the code. For example,
writing a program that uses several chunks of code from this book does not require
permission. Selling or distributing a CD-ROM of examples from O’Reilly books does
require permission. Answering a question by citing this book and quoting example
code does not require permission. Incorporating a significant amount of example
code from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the
title, author, publisher, and ISBN. For example: “IPv6 Essentials, Second Edition, by
Silvia Hagen. Copyright 2006 O’Reilly Media, Inc., 0-596-10058-2.”

Safari® Enabled
When you see a Safari® enabled icon on the cover of your favorite tech-
nology book, that means the book is available online through the
O’Reilly Network Safari Bookshelf.
Safari offers a solution that’s better than e-Books. It’s a virtual library that lets you
easily search thousands of top tech books, cut and paste code samples, download
chapters, and find quick answers when you need the most accurate, current informa-
tion. Try it for free at http://safari.oreilly.com.

Comments and Questions


Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international or local)
(707) 829-0104 (fax)

Preface | xiii

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
This book’s web site lists errata, examples, or any additional information. You can
access this page at:
http://www.oreilly.com/catalog/ipv6ess2
To comment or ask technical questions about this book, send email to:
[email protected]
For more information about books, conferences, Resource Centers, and the O’Reilly
Network, see the O’Reilly web site at:
http://www.oreilly.com/

Acknowledgments
There are many people all over the world who have contributed to this book. With-
out their help and input, it would not be what it is. Big thanks go to Stefan Marzohl,
who is a Cisco- and Nortel-certified instructor and the author of Chapter 8. He wrote
the chapter for the first edition and made all the updates and additions for the sec-
ond edition. Many thanks go out to Anja Spittler (Maggy). She spent hours, days,
and weeks in our lab setting up SuSE Linux, getting BIND and other services to
work, and writing parts of Chapters 9 and 12 in the first edition. I also want to thank
the technical editors, who have made this book much better with their invaluable
comments, corrections, and clarifications. They were great resources when I was
struggling with a topic and needed some answers. The technical reviewers of the first
edition were Patrick Grossetete, who works as a product manager for the Internet
Technology Division (ITD) at Cisco, and Neil Cashell, who is a great TCP/IP guy at
Novell. Thanks also to Brian McGehee, who has been working with IPv6 for many
years and has written numerous courses for IPv6. He did the final technical edits of
the first edition and added a lot of useful information. I’d like to thank Cisco Swit-
zerland, especially René Räber, both for providing an updated router and access to
their technical resources as well as for his continuing support of my work for IPv6.
Thanks to the guys at SuSE for providing software and supporting us in getting our
SuSE host ready for IPv6, Microsoft for providing software and information about
their implementations, Network General for providing Sniffer Pro Software for the
trace files, Bob Fink for running the 6Bone web site, Cricket Liu for answering my
DNS questions, and Peter Bieringer for running a great Internet resource site and for
answering my questions with lightning speed.
There were many additional supporters, writers, and reviewers for the second edi-
tion. They include: Jim Bound from HP, CTO of the IPv6 Forum and Chair of the
NAv6TF; Latif Ladid, President of the IPv6 Forum; Tim Chown, Department of
Electronics and Computer Science at the University of Southampton; and Vijayab-
haskar from McAfee. Yurie Rich, John Spence, and Mike Owen from Native6 Inc. in
Seattle have provided substantial input into Chapters 1, 5, 6, and 10. Gene Cronk
from the Robin Shepherd Group has given substantial input into Chapters 5 and 10,

xiv | Preface

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
and John Jason Brzozowski, North American IPv6 Task Force and Chair of the Mid-
Atlantic IPv6 Task Force, contributed great input into Chapters 1 and 9. Thanks to
David B. Green from SRI International for the permission to quote his Enterprise
Security Model presentation in Chapter 5 and for reviewing different parts of the
book. Thanks to Merike Kaeo, Chief Network Security Architect at Double Shot
Security, for all her inputs and comments to Chapter 5. And thanks to Chris Engdahl
from Microsoft for his review of Chapter 10. Thanks to Jimmy Ott from Sunny Con-
nection for researching and writing all updates for Chapter 12. David Malone, author
of the companion book IPv6 Network Administration, reviewed the whole book—
thank you, David, for your great and clarifying comments. A great thank you goes
out to all the people who were ready to share their experience with us and have pro-
vided case studies. They are Paolo Vieira from the University of Porto, Pierre David
from the University of Strasbourg, Cody Christman from NTT Communications,
and Flavio Curti and Ueli Heuer from Cyberlink AG in Zurich. Wolfgang Fritsche
from IABG Germany and Karim El-Malki from Ericsson AB in Stockholm reviewed
and provided input on Chapter 11 about Mobility. Thanks to the people at Check-
point for providing information and connections, especially Patrik Honegger and
Yoni Appel; and thanks also to Jean-Marc Uzé at Juniper for his information and
connections. I also want to thank all the people and developers in the international
working groups. Without their visionary power, enthusiasm, and tireless work, we
would not have IPv6 ready.
A special thank you goes to Jim Sumser, Mike Loukides, and Tatiana Apandi at
O’Reilly. Jim Sumser guided me through the whole writing process of the first edi-
tion with a lot of enthusiasm, patience, and experience. Thank you, Jim, for being
there, and thank you for never hassling me when I was already struggling. You made
a difference! Mike and Tatiana, with whom I worked on the second edition, have
also been very supportive throughout the whole process. I also want to thank all the
other folks at O’Reilly who contributed to this book, especially Tim O’Reilly for
making it possible in the first place.
Another very special thank you goes to Hanspeter Bütler, who was my teacher back
in school, for teaching me the beauty of the ancient Greek language. His insightful
and sensitive way of guiding me into understanding and feeling the richness of old
languages laid the foundation for my understanding of language in general, of differ-
ent cultures and how the differences in viewing the world are expressed in language.
I can probably make him partially responsible for my becoming an author. Language
is made to communicate, and the more precisely we use our language, the better we
can understand and be understood. Without communication, there can be no under-
standing. On a different level, TCP/IP is the protocol that enables communication in
the network and therefore creates the foundation for Internet communication. And
the Internet creates the physical foundation for global communication. It offers a
great opportunity to communicate, share, and understand globally across all cul-
tures. That is how we should be using it.

Preface | xv

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Chapter 1 CHAPTER 1
Why IPv6? 1

The IP version currently used in networks and the Internet is IP Version 4 (IPv4).
IPv4 was developed in the early ’70s to facilitate communication and information
sharing between government researchers and academics in the United States. At the
time, the system was closed with a limited number of access points, and conse-
quently the developers didn’t envision requirements such as security or quality of
service. To its credit, IPv4 has survived for over 30 years and has been an integral
part of the Internet revolution. But even the most cleverly designed systems age and
eventually become obsolete. This is certainly the case for IPv4. Today’s networking
requirements extend far beyond support for web pages and email. Explosive growth
in network device diversity and mobile communications, along with global adoption
of networking technologies, are overwhelming IPv4 and have driven the develop-
ment of a next-generation Internet Protocol.
IPv6 has been developed based on the rich experience we have from developing and
using IPv4. Proven and established mechanisms have been retained, known limita-
tions have been discarded, and scalability and flexibility have been extended. IPv6 is
a protocol designed to handle the growth rate of the Internet and to cope with the
demanding requirements on services, mobility, and end-to-end security.
When the Internet was switched from using Network Control Protocol (NCP) to
Internet Protocol (IP) in one day in 1983, IP was not the mature protocol that we
know today. Many of the well-known and commonly used extensions were devel-
oped in subsequent years to meet the growing requirements of the Internet. In com-
parison, hardware vendors and operating system providers have been supporting
IPv6 since 1995 when it became a Draft Standard. In the decade since then, those
implementations have matured, and IPv6 support has spread beyond the basic net-
work infrastructure and will continue to be extended.
There is certainly a need for caution when considering adoption of IPv6—there is
still work to be done to reach parity with the maturity of IPv4 (refer to Chapter 10
for more details). The missing pieces of IPv6 will be developed in the coming years,
just the way it happened with IPv4. And many enterprises are not finding enough

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
reasons to adopt it right now. However, it is very important for organizations to pay
attention to the introduction of IPv6 because its use is inevitable in the long term. If
IPv6 is included in strategic planning; if organizations think about possible integra-
tion scenarios ahead of time; and if its introduction is considered when investing in
IT capital expenditures, organizations can save considerable cost and can enable
IPv6 more efficiently when it is needed.
An interesting and humorous overview of the history of the Internet can be found in
RFC 2235, “Hobbes’ Internet Timeline.” The account starts in 1957 with the launch
of Sputnik in Russia and the formation of the Advanced Research Projects Agency
(ARPA) by the Department of Defense (DoD) in the United States. The RFC con-
tains a list of yearly growth rate of hosts, networks, and domain registrations in the
Internet.
Some excerpts from the RFC:
• 1969: Steve Crocker makes the first Request for Comment (RFC 1): “Host
Software.”
• 1970: ARPANET hosts start using Network Control Protocol (NCP).
• 1971: 23 hosts connect with ARPANET (UCLA, SRI, UCSB, University of Utah,
BBN, MIT, RAND, SDC, Harvard, Lincoln Lab, Stanford, UIU(C), CWRU,
CMU, NASA/Ames).
• 1972: InterNetworking Working Group (INWG) is created with Vinton Cerf as
Chairman to address the need for establishing agreed-upon protocols. Telnet
specification (RFC 318) is published.
• 1973: First international connections to the ARPANET are made at the Univer-
sity College of London (England) and Royal Radar Establishment (Norway). Bob
Metcalfe’s Harvard Ph.D. thesis outlines the idea for Ethernet. File transfer spec-
ification (RFC 454) is published.
• 1976: Queen Elizabeth II sends an email.
• 1981: Minitel (Teletel) is deployed across France by France Telecom.
• 1983: The cutover from NCP to TCP/IP happens on January 1.
• 1984: The number of hosts breaks 1,000.
• 1987: An email link is established between Germany and China using CSNET
protocols, with the first message from China sent on September 20. The thou-
sandth RFC is published. The number of hosts breaks 10,000.
• 1988: An Internet worm burrows through the Net, affecting 10 percent of the
60,000 hosts on the Internet.
• 1989: The number of hosts breaks 100,000. Clifford Stoll writes Cuckoo’s Egg,
which tells the real-life tale of a German cracker group that infiltrated numerous
U.S. facilities.

2 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
• 1991: The World Wide Web (WWW) is developed by Tim Berners-Lee and
released by CERN.
• 1992: The number of hosts breaks 1,000,000. The World Bank comes online.
• 1993:The White House comes online during President Bill Clinton’s time in
office. Worms of a new kind find their way around the Net—WWW Worms
(W4) are joined by Spiders, Wanderers, Crawlers, and Snakes.
• 1994: Internet shopping is introduced; the first spam mail is sent; Pizza Hut
comes online.
• 1995: The Vatican comes online. Registration of domain names is no longer free.
• 1996: 9,272 organizations find themselves unlisted after the InterNIC drops their
name service as a result of their not having paid their domain name fees.
• 1997: The 2,000th RFC is published.
This is as far as the RFC goes. But history goes on. According to http://www.nua.ie/
surveys/how_many_online/world.html, the worldwide online population reached
254 million users in 2000 and 580 million users in 2002. According to http://www.
clickz.com/stats/web_worldwide, the online user population reached 1.08 billion
users in 2005. In 2003, the U.S. Department of Defense (DoD) announced that they
would be migrating the DoD network to IPv6 by 2008, and the Moonv6 (http://
www.moonv6.com) project was started. In 2005, Google registered a /32 IPv6 pre-
fix, and Vint Cerf, known as “Father of the Internet,” joined Google. These are just
a few selected events and milestones of the Internet’s history. Keep watching as
more history unfolds.

The History of IPv6


The Internet Engineering Task Force (IETF) began the effort to develop a successor
protocol to IPv4 in the early 1990s. Several parallel efforts to solve the foreseen
address space limitation and to provide additional functionality began simulta-
neously. The IETF started the Internet Protocol—Next Generation (IPng) area in
1993 to investigate the different proposals and to make recommendations for further
procedures.
The IPng area directors of the IETF recommended the creation of IPv6 at the Tor-
onto IETF meeting in 1994. Their recommendation is specified in RFC 1752, “The
Recommendation for the IP Next Generation Protocol.” The Directors formed an
Address Lifetime Expectation (ALE) working group to determine whether the
expected lifetime for IPv4 would allow the development of a protocol with new func-
tionality, or if the remaining time would allow only the development of an address
space solution. In 1994, the ALE working group projected that the IPv4 address
exhaustion would occur sometime between 2005 and 2011 based on the available
statistics.

The History of IPv6 | 3

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
For those of you who are interested in the different proposals, here’s some more
information about the process (from RFC 1752). There were four main proposals:
CNAT, IP Encaps, Nimrod, and Simple CLNP. Three more proposals followed: the
P Internet Protocol (PIP), the Simple Internet Protocol (SIP), and TP/IX. After the
March 1992 San Diego IETF meeting, Simple CLNP evolved into TCP and UDP with
Bigger Addresses (TUBA), and IP Encaps became IP Address Encapsulation (IPAE).
IPAE merged with PIP and SIP and called itself Simple Internet Protocol Plus (SIPP).
The TP/IX working group changed its name to Common Architecture for the Inter-
net (CATNIP). The main proposals were now CATNIP, TUBA, and SIPP. For a short
discussion of the proposals, refer to RFC 1752.

CATNIP is specified in RFC 1707; TUBA in RFCs 1347, 1526, and


1561; and SIPP in RFC 1710.

The Internet Engineering Steering Group approved the IPv6 recommendation and
drafted a Proposed Standard on November 17, 1994. RFC 1883, “Internet Protocol,
Version 6 (IPv6) Specification,” was published in 1995. The core set of IPv6 proto-
cols became an IETF Draft Standard on August 10, 1998. This included RFC 2460,
which obsoleted RFC 1883.

Why isn’t the new protocol called IPv5? The version number 5 could
not be used, because it had been allocated to the experimental stream
protocol.

What’s New in IPv6?


IPv6 is an evolution of IPv4. The protocol is installed as a software upgrade in most
devices and operating systems. If you buy up-to-date hardware and operating sys-
tems, IPv6 is usually supported and needs only activation or configuration. Cur-
rently available transition mechanisms allow the step-by-step introduction of IPv6
without putting the current IPv4 infrastructure at risk.
Here is an overview of the main changes:
Extended address space
The address format is extended from 32 bits to 128 bits. This provides an IP
address for every grain of sand on the planet. In addition, it also allows for hier-
archical structuring of the address space in favor of optimized global routing.
Autoconfiguration
Perhaps the most intriguing new feature of IPv6 is its Stateless autoconfiguration
mechanism. When a booting device in the IPv6 world comes up and asks for its
network prefix, it can get one or more network prefixes from an IPv6 router on
its link. Using this prefix information, it can autoconfigure for one or more valid

4 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
global IP addresses by using either its MAC identifier or a private random num-
ber to build a unique IP address. In the IPv4 world, we have to assign a unique
IP address to every device, either by manual configuration or by using DHCP.
Stateless autoconfiguration should make the lives of network managers easier
and save substantial cost in maintaining IP networks. Furthermore, if we imag-
ine the number of devices we may have in our homes in the future that will need
an IP address, this feature becomes indispensable. Imagine reconfiguring your
DHCP server at home when you buy a new television! Stateless autoconfigura-
tion also allows for easy connection of mobile devices, such as a mobile phone or
handheld, when moving to foreign networks.
Simplification of header format
The IPv6 header is much simpler than the IPv4 header and has a fixed length of
40 bytes. This allows for faster processing. It basically accommodates two times
16 bytes for the Source and Destination address and only 8 bytes for general
header information.
Improved support for options and extensions
IPv4 integrates options in the base header, whereas IPv6 carries options in so-
called extension headers, which are inserted only if they’re needed. Again, this
allows for faster processing of packets. The base specification describes a set of
six extension headers, including headers for routing, Mobile IPv6, and quality of
service and security.

Why Do We Need IPv6?


For historic reasons, organizations and government agencies in the United States use
approximately 60 percent of the allocatable IPv4 address space. The remaining 40
percent is shared by the rest of the world. Of the 6.4 billion people in the world,
approximately 330 million live in North America, 807 million in Europe, and 3.6 bil-
lion in Asia. This means that the 5 percent of the world’s population living in the
United States has 60 percent of the address space allocated. Of the 3.6 billion people
living in Asia, approximately 364 million have Internet access, and the growth rate is
exponential. This is one explanation of why the deployment of IPv6 in Asia is much
more common than in Europe and the United States. (All statistics are based on 2005
numbers.)

An interesting resource site for statistics can be found at:


http://www.internetworldstats.com/stats.htm.

The IPv4 address space has a theoretical limit of 4.3 billion addresses. However,
early distribution methods allocated addresses inefficiently. Consequently, some
organizations obtained address blocks much larger than they needed, and addresses

Why Do We Need IPv6? | 5

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
that could be used elsewhere are now unavailable. If it were possible to reallocate the
IPv4 address space, it could be used much more effectively, but this process is not
possible, and a global reallocation and renumbering is simply not practical. We also
have to be aware of the fact that today, as the IPv4 address space approaches exhaus-
tion, only about 14 percent of the world’s population has Internet access. If we want
to provide Internet access to only 20 percent of the world’s population, we will need
the IPv6 address space. And this calculation does not take into account that in the
future we will need IP addresses for billions of devices. Vendors in all industries are
developing monitoring, control, and management systems based on IP.
As the previous section shows, the IPv6 working group has done more than extend
the address space. For many complex networks of today and tomorrow, and for
the number of IP devices of all types, the autoconfiguration capability of IPv6 will
be a necessity. The management of such services can’t be accomplished with tradi-
tional addressing methods, and Stateless autoconfiguration will also help to reduce
administrative costs for organizations.
The extended address space and the restoration of the original end-to-end model of
the Internet allows for the elimination of Network Address Translation (NAT), in
which a single or a few public IPv4 address(es) are used to connect a high number of
users with private addresses to the Internet by mapping the internal addresses to the
public address(es). NATs were introduced as a short term fix for solving the address
space limitations with IPv4, since IPv6 was not ready yet (refer to RFC 1631; the
original NAT specification was obsoleted by RFC 3022 in 2001). NATs have become
pretty common in IPv4 networks, but they create serious disadvantages in manage-
ment and operation: in order to do the address mapping, NATs modify end node
addresses in the IP header. Very often, application level gateways (ALG) are used in
conjunction with NAT to provide application-level transparency. There is a long list
of protocols and applications that create problems when used in a NAT environ-
ment. IPsec and peer-to-peer applications are two well-known examples. Another
known issue with NAT is the overlapping of private address space when merging
networks, which requires either the renumbering of one of the networks or the cre-
ation of a complex address mapping scheme. The amplification of limited address
space, the primary benefit of NAT, is not needed with IPv6 and therefore is not sup-
ported by design.
By introducing a more flexible header structure (extension headers), the protocol has
been designed to be open and extensible. In the future, new extensions can easily be
defined and integrated in the protocol set. Based on the fact that IPv4 has been in use
for almost 30 years, the development of IPv6 was based on the experience with IPv4
and focused on creating an extensible foundation; you can expect it to last a long
time.
Broadband penetration rates in countries such as South Korea, Japan, Germany,
France, and the United States continue to accelerate and, in some cases, have

6 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
reached 65 percent or more. In fact, a 2004 study done by Nielsen//NetRatings
(http://www.nielsen-netratings.com) showed that the city of San Diego, California
had a broadband penetration rate of 69 percent. This level of always-on connectiv-
ity with substantial bandwidth capacity (when compared to dial-up services) means
that there is greater opportunity for devices to be connected. And many consumer
electronic manufacturers have taken advantage of this. Online gaming is no longer
the sole purview of games on PCs. Gaming stations, such as Sony’s PlayStation 2,
the Nintendo DS, and Microsoft’s Xbox, have added capabilities to take them
online. In Japan, many telecommunication carriers are providing television-type ser-
vices (movies, audio content, etc.) over their IP networks. Even appliances, such as
refrigerators, stoves, water heaters, and bathtubs are getting connected. While it
may seem rather silly to network-enable a bathtub, many of these devices are being
connected to facilitate things such as power management, remote control, and trou-
bleshooting, and for telemetry/monitoring purposes. The end result of this network-
enablement process is a greater number of devices that need addressing, many of
which will not have standard user interfaces. In these cases, the IPv6 address space,
coupled with features such as Neighbor Discovery, autoconfiguration, and Mobile
IPv6, will help to usher in a new era of computerization in the home, but hopefully
without the enormous deployment headache that it would cause if it were attempted
with the current protocol.
The growth of the wireless industry (both cellular and wireless networks based on
protocols such as 802.11x, 802.16, 802.20, UMTS, UWB, MIMO, etc.) has been
nothing short of phenomenal. In some countries, such as Italy and Great Britain, the
number of cell phones actually exceeds the number of people. In this world of con-
tinuous reachability and reliance on the ability to access information at any time, the
mobility requirements for end users have become exceptionally important. From the
carriers’ perspective, especially those supporting multiple media access types (e.g. 3G
and WiMax), leveraging IP as the method of transporting and routing packets makes
sense. Cell phones and PDAs can already access the Internet, play games with other
users, make phone calls, and even stream video content. Instead of supporting all of
these functions using different transport protocols and creating intermediary applica-
tions to facilitate communications, it is far more efficient to leverage the existing net-
work infrastructure of the Internet and a company’s network. We will see later that
from a technical perspective, Mobile IPv6 is very elegant in its design, supporting
mobile users in a highly efficient manner and providing the overlay mechanisms for
users to maintain their connections when moving between networks, even if those
networks do not use the same type of media access.
For many of the reasons discussed here, much of the world is already adopting IPv6.
There has been significant adoption in Japan and Korea, with production networks
and consumers paying for IPv6-based services. China is spending millions of dollars
(USD) developing a new backbone network that is reportedly going to be IPv6. The
European Union (EU) has also spent millions for the research and development of

Why Do We Need IPv6? | 7

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
IPv6 backbone networks and innovative services that leverage many of the beneficial
features of IPv6. India, with a growing middle class and a strong presence in the
world of IT, has demonstrated substantial interest in the deployment and use of
IPv6. In June 2003 and then again in July 2005, the U.S. government mandated the
adoption of IPv6. Other countries such as Australia, Taiwan, Singapore, England,
and Egypt have all made similar announcements. So IPv6 is on its way, and it hap-
pened faster than we expected when we published the first edition of this book.
There still remain some questions about the value of IPv6 to the enterprise, and it is
worth conceding that each organization needs to evaluate the benefits of IPv6 care-
fully for their own internal use and determine the best time for its introduction. In
many instances, organizations can find clever ways to use IPv6 to solve “pain” issues
without migrating their entire network. Adoption can occur in an incremental fash-
ion with a plan that minimizes integration pain but also ensures that everything is
ready when the time comes to “flip the switch.” As the case studies in Chapter 10
show, well-planned introduction costs less than you would expect; the step-by-step
introduction allows you to learn as you go, thereby saving a lot of money and head-
aches, and you can do it without putting the current IPv4 infrastructure at risk.
But with all these thoughts and considerations, let’s not forget the most essential
advantage of IPv6. With its new structure and extensions, IPv6 provides the founda-
tion for a new generation of services. There will be devices and services on the mar-
ket in the near future that cannot be developed with IPv4. This opens up new
markets and business opportunities for vendors and service providers alike. The first-
mover opportunities are substantial, as are the opportunities to extend current prod-
uct lifecycles by refreshing their technology with IPv6. On the other hand, it means
that organizations and users will require such services in the mid-term. It is therefore
advisable to integrate the new protocol carefully and in a nondisruptive manner, by
taking one step at a time to prepare the infrastructure for these new services. This
protects you from having to introduce a business-critical application based on IPv6
with no time for thorough planning and unreasonably high cost.

Common Misconceptions
When considering all these advantages, maybe the question should be: “Why not
IPv6?” When talking to customers, we often find that they share a similar set of mis-
conceptions preventing them from considering IPv6. Here are the most common
ones:
“The introduction of IPv6 puts our current IP infrastructure—our networks and
services—at risk.”
This concern is unsubstantiated. A major focus in IPv6’s development was to
create integration mechanisms that allow both protocols to coexist peacefully.
You can use IPv6 both in tandem with and independently of IPv4. It is possible
to introduce IPv6 and use it for access to new services while retaining IPv4 to

8 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
access legacy services. This not only ensures undisrupted access to IPv4 services,
but it also allows a step-by-step introduction of IPv6. I discuss these mecha-
nisms in Chapter 10.
“The IPv6 protocol is immature and hasn’t proven that it stands the test of time or
whether it is capable of handling the requirements.”
This is only partially true. IPv6 has been implemented in most router and oper-
ating systems for almost a decade, and has been tested and optimized exten-
sively. There are substantial international research efforts and test networks for
deployment that are further optimizing integration methods. One of the largest
tests currently running is Moonv6 (http://www.moonv6.com). Moonv6 is a test
network where the U.S. Department of Defense (DoD), IPv6 developers and
vendors, and various academic and industry bodies conduct extensive interoper-
ability and conformance testing of the IPv6 base features, as well as extended
features such as quality of service, mobility, and security. You can find a more
detailed description of Moonv6 in Chapter 10.
“The costs of introducing IPv6 are too high.”
There will certainly be costs associated with adopting IPv6. In many cases,
newer networks will find that the level of IPv6 support in their current infra-
structure is actually high. Regardless, the transition will necessitate some hard-
ware and software costs. Organizations will need to train their IT staff, and,
depending on the speed at which integration must occur, they may need to seek
outside expertise.
However, the cost savings associated with IPv6 are becoming easier to define.
Networks based on IPv4 are becoming increasingly more complex. New IT ser-
vices such as VoIP, instant messaging, video teleconferencing, IPTV, and unified
communications are adding layers of middleware and complexity. Merging orga-
nizations or those conducting B2B transactions are implementing NAT overlap
solutions that have high management costs and are difficult to troubleshoot.
And a growing market of mobile devices and network appliances requires robust
access models that are expensive and difficult to implement in an IPv4 world. In
all of these cases, IPv6 presents a cleaner and more cost-effective model in the
long run than IPv4 can provide.
“With Stateless autoconfiguration, we will not be able to control or monitor network
access.”
While this statement may generally be true for networks that widely utilize State-
less autoconfiguration, administrators will have a choice about their level of con-
trol. DHCPv6 as defined in RFC 3315 has been extended to support two general
modes of operation, Stateful and Stateless. Stateful mode is what those who cur-
rently utilize DHCP (for IPv4) are familiar with, in which a node (DHCP client)
requests an IP address and configuration options dynamically from a DHCP
server. DHCPv6 also offers a Stateless mode in which DHCPv6 clients simply
request configuration options from a DHCPv6 server and use other means, such

Common Misconceptions | 9

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
as Stateless autoconfiguration, to obtain an IPv6 address. On the other hand,
you can configure IPv6 networks to force the use of DHCPv6 for dynamic
address assignment and configure DHCPv6 to enhance security, since authenti-
cation is available as part of the protocol.
“Our Internet Service Provider (ISP) does not offer IPv6 services, so we can’t use it.”
You do not have to wait for your ISP to use IPv6 in your corporate or private net-
work. If you want to connect to the global IPv6 Internet, you can use one of the
transition mechanisms and tunnel your IPv6 packets over the IPv4 infrastruc-
ture of your ISP.
“It would be too expensive and complex to upgrade our backbone.”
The transition mechanisms make it possible to use IPv6 where appropriate with-
out dictating an order of upgrade. Usually for the backbone it is advisable to
wait for the regular life cycle, when hardware needs to be exchanged anyway.
Make sure to choose hardware that supports performance IPv6 routing. In the
meantime, you can tunnel your IPv6 packets over the IPv4 backbone. Networks
that use MPLS have an easy way to tunnel IPv6 packets over their IPv4 MPLS
backbone. Read more about it in Chapter 10.
“It would be too complex and expensive to port all of our applications to IPv6.”
The effort necessary to port applications to run over IPv6 is often much lower
than expected. If an application is well-written, it may simply run over IPv6
without modification. Instead of assuming that it won’t work, test it to find out.
For applications that need modifications that are not yet available, or for appli-
cations in which porting does not make sense, there are mechanisms available
that support IPv4 applications in IPv6 networks and IPv6 applications in IPv4
networks. Alternatively, you can run a dual-stack network, in which you use IPv4
to access IPv4 applications and IPv6 to access IPv6 applications.
“We have enough IPv4 addresses; we don’t need IPv6.”
True—if you have enough IPv4 addresses, there may be no immediate need to
integrate IPv6 today. But ignoring IPv6 for this reason is a perspective that
assumes that your network stands completely isolated from the rest of the world,
including your vendors, partners, and customers. IPv6 adoption is further along
in Asia than in the United States, so even though you may have adequate address
space for your operations in Denver, interconnecting with a partner organiza-
tion in Tokyo may eventually become complicated if you do not support IPv6.
Plus, the assumption that IPv6 is about address space only doesn’t account for
the advanced features that IPv6 brings to the table.

When Is It Time for IPv6?


If the rest of the world moves to IPv6 while you insist on continuing to use IPv4, you
will exclude yourself from global communication and reachability. This might not be

10 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
a critical issue today, but times are changing fast these days. The risks if you wait too
long include losing potential customers and access to new markets and the inability
to use new IPv6-based business applications until you implement it.
There is a golden rule in IT: “Never touch a running system.” As long as your IPv4
infrastructure runs well and fulfills your needs, there is no reason to change any-
thing. But from now on, whenever you invest in your infrastructure, you should con-
sider IPv6. An investment in the new technology gives it a much longer lifetime and
keeps your network state-of-the-art.
These are the main indicators that it may be time for you to consider switching to or
integrating IPv6:
• You need to extend or fix your IPv4 network or NAT implementation.
• You are running out of address space.
• You want to prepare your network for applications that are based on advanced
features of IPv6.
• You need end-to-end security for a large number of users and you do not have
the address space, or you struggle with a NAT implementation.
• You need to replace your hardware or applications that are at the end of their
lifecycles. Make sure you buy products that support IPv6, even if you don’t
enable it right away.
• You want to introduce IPv6 while there is no time pressure.
The following provisions can be taken in order to prepare for IPv6 adequately:
• Build internal knowledge, educate IT staff, and create a test network.
• Include IPv6 in your IT strategy.
• Create integration scenarios based on your network and requirements.
• Put IPv6 support on all of your hardware and software shopping lists. Be spe-
cific about which features (RFCs) must be supported.
• Compel your vendors to add IPv6 support to their products.
If you do this, you can determine the right moment for the introduction of IPv6 in
your network. You can also assess whether a further investment in your IPv4 infra-
structure makes sense or whether introducing IPv6 would be a better way to go.
There will be no “flag day” for IPv6 like there was for the 1983 move from NCP to
IPv4. Probably there will be no killer application either, so don’t wait for one. IPv6
will slowly and gradually grow into our networks and the Internet. Taking a step-by-
step approach to IPv6 may be the most cost-efficient way to integrate it, depending
on your requirements. This method does not put your current infrastructure at risk
or force you to exchange hardware or software before you are ready, and it allows
you to become familiar with the protocol, to experiment, to learn, and to integrate
what you’ve learned into your strategy.

When Is It Time for IPv6? | 11

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
IPv6 Around the World
The oldest IPv6 network is the 6Bone (http://www.6bone.net). It was started in 1996,
and by 2004 it connected more than 1,000 hosts in more than 50 countries across the
world. Originally, it was used as a test network for the IETF working groups. Over
time it became an international project in which everybody was welcome to partici-
pate. The address allocation had not been standardized at that time, so the 6Bone
received the special prefix 3FFE. Today, the IPv6 address allocation is specified and
open for registration, and the 6Bone will gradually be moved to the official IPv6
address space by mid-2006. Their web site is still accessible for historical and statisti-
cal reasons. The 6Bone proved that IPv6 is stable and can be used globally. It was
also used to get experience with routing and network management processes, as well
as to test transition mechanisms and IPv6 applications and services.
If we look at the global deployment of IPv6, the scenarios are different on each conti-
nent. The International IPv6 Forum (http://www.ipv6forum.com) coordinates the
worldwide activities. The International Task Force (http://www.ipv6tf.org) coordi-
nates the regional Task Forces all over the world. There is a North American IPv6
Task Force (http://www.nav6tf.org), a European Task Force (http://www.eu.ipv6tf.org),
and different Task Forces in Asia and other parts of the world. They can all be found
from the main Task Force Site. The regional Task Forces coordinate the activities in
their regions. In Europe, for example, there is a Task Force in almost every country.

Asia
In Asia, IPv6 is already a reality. The high population and accelerated Internet
growth rate, combined with the limited IPv4 address space, does not leave any other
choices.
Japan was one of the first countries to take the lead. In March 2001, they published the
“e-Japan Priority Policy Program,” announcing that they would build the largest IPv6
network. The Japanese Task Force can be found at http://www.v6pc.jp/en/index.phtml.
In Japan there is a showroom where vendors demo their IPv6-capable devices. Sony,
for instance, announced that in the near future, all Sony devices will include IPv6
support. To give you an idea of the status of IPv6 in Japan, here are some things you
can see in this showroom:
Toshiba
Displays a refrigerator and a microwave oven with routing and IPv6 support
included. You operate the devices by a panel through web access and email.
Sanyo
Shows an IPv6-capable digital camera and an IPv6-enabled television with a home
gateway. The camera can upload your digital pictures to your home gateway
when you are on the road through any public wireless network. The television

12 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
can be operated and used remotely, so different participants can view the same
pictures or movies from different locations.
Canon
Demonstrates a webcam system that can be remotely controlled. You can watch
your kids, your dogs, or your coffee machine while you are on the road.
Nokia Japan and NTT Communications (global ISP)
Displays an Internet terminal that combines wireless, RFID, and Mobile IPv6
technology. The demo shows that it is possible for mobile devices to use ser-
vices over the Internet in a secured, certified way.
In China, the China Next Generation Internet (CNGI) project was started in 2001. In
the first half of 2006, the deployment of IPv6 in the backbone should be completed
in 300 campus networks, including 100 universities, 100 institutes, and 100 enter-
prises. China’s five major telecommunication operators play a key role in this
project. They estimate that they will complete the construction of all the backbone
and Shanghai NAPs in the first quarter of 2006, and complete the interlink of for-
eign IPv6 Internet before mid-2006. IPv6 Mobility was built into the CNGI from the
beginning. The CNGI production deployment and application trials in 2005 consist
of a total of 61 projects undertaken by over 100 of China’s top technology compa-
nies and universities; these trials have been approved and are estimated to be com-
plete before the end of 2006. Metropolitan Area Networks (MANs) will be deployed
gradually in each city, with IPv6 playing an important part in this deployment. IPv6
will also be used in other industries, such as the military, meteorology, seismology,
intelligence architecture, and digital home networking. Many of the giant industry
companies in China began to focus on IPv6, such as Lenovo (IBM PCs) and Konka.
Lenovo has launched its Intelligent Grouping and Resource Sharing (IGRS) technol-
ogy to support IPv6.
Many other countries in Asia are active as well. Countries such as India, Korea, Thai-
land, and Taiwan each have their own Task Force, and in most of these countries,
IPv6 has strong governmental support.

Europe
In Europe, the European Commission has taken the lead and supported the intro-
duction of IPv6 since 2000. The European Commission believes that IPv6 is essen-
tial for the competitiveness of their economic area. The European Task Force (http://
www.eu.ipv6tf.org) coordinates the activities in Europe.
Telia Sweden was one of the first ISPs to offer commercial IPv6 services. In 2001,
Telia already offered six POPs (Points of Presence) in different locations in Europe.
Most ISPs currently do not offer IPv6 services commercially, but in the background,
many of them have prepared the introduction and will be able to react quickly to
growing demand on the market. The numbers of IPv6 Internet backbones and Inter-
net Exchange Points (IEX) are growing. For instance, NTT Communications offers

IPv6 Around the World | 13

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
commercial IPv6 services around the globe. They started in 2001 in Japan; since Feb-
ruary 2003, they have offered their services in Europe; and since June 2003, in the
United States and in some Asian countries. NTT Communication runs two network
operation centers around the clock, seven days a week, and the company has more
than four years of IPv6 network management experience. You’ll find a description of
their deployment in Chapter 10.
In Europe, there are two major research projects partially funded by the European Com-
mission: the 6net project (http://www.6net.org) and Euro6IX (http://www.euro6ix.org).
6net was a three-year European project created to test whether IPv6 could cope with the
demands of today’s global Internet. For this purpose, an IPv6 network connecting 16
countries was created and used as a platform for interoperability and integration tests.
The three years have passed, and the 6net project ended in 2005. The Internet Society
Technologies (IST) initialized the Euro6IX project. Its goal is to support a rapid intro-
duction of IPv6 in Europe. You can find details on both projects and tons of interesting
research materials on their respective web sites.
The IPv6 address space and Mobility support offer a good basis for further deploy-
ment of Voice over IP (VoIP). Mobile IPv6 removes some limitations with the IPv4
implementations of Mobility and makes it much more suitable for global use. The
German company Telekom stated in early 2004 that they believe that by the year
2020, global telephone communication will be entirely IP-based. Many of the tele-
com providers are preparing for this challenge in the background. There are a num-
ber of VoIP implementations using IPv6.
Car vendors will use IP as well. Renault, for instance, has a prototype of an IPv6-
networked car that they co-developed with Cisco. It has a Cisco router built-in with
a Mobile IPv6 implementation, so the car has an internal IPv6-based network that
can be used for monitoring, control, and maintenance; for accessing weather, traf-
fic, and road condition information; or by passengers to connect through wireless
or Bluetooth to surf the Web or watch digital TV with any IPv6-capable device.
With the Mobile IPv6 implementation, the Cisco router can switch networks to find
the best possible connection depending on its position. The systems and devices
connected from inside the car will not lose their connections while the router is
switching from one network to another. Other car vendors, such as BMW, Daimler-
Chrysler, and Audi, are working on similar projects. I heard that the IP car of the
future will have a minimum of 20 IP addresses. Go figure.

The United States


Originally it was assumed that the United States would be the last part of the world
to adopt IPv6, simply because the address space issue is not that critical. In summer
2003, the situation significantly changed with the U.S. DoD’s announcement that it
will migrate its network to IPv6 by 2008. Starting in 2003, all IT purchasing done by
DoD agencies had to include requirements for IPv6 enablement. Given that the U.S.

14 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
DoD’s IT spending budget is around 30 billion dollars a year (USD), this provides
significant motivation for vendors. Many other defense departments and NATO
allies all over the globe have followed their example. This decision will accelerate the
IPv6 market not only in the United States, but all over the world. Given the extreme
diversity of how IP can be applied in the military space, there should be accelerated
development of additional services and applications.
In addition to the U.S. DoD, the Office of Management and Budget (OMB), a presi-
dential office, announced in July 2005 that all Federal agencies must also use IPv6 by
2008. While the DoD budget for IT is impressive, the entire U.S. Federal govern-
ment is certainly bigger.
The North American IPv6 Task Force can be found at http://www.nav6tf.org. The
largest test and research network is Moonv6 (http://www.moonv6.com). Use these
two entry points to find the information about activities, tests and results, deploy-
ments, and general IPv6 resources.

IPv6 Status and Vendor Support


As previously mentioned, IPv6 is implemented in most up-to-date versions of rout-
ing and operating systems. For standard applications, assume that IPv6 support will
be added with their next major release at the latest. For creating an IPv6 integration
plan for your corporate network, you will need to assess the status and degree of
IPv6 support with each vendor individually. Many vendors have an information site
that can often be found at http://www.<vendor>.com/ipv6.
It can be said that IPv6 support up to the network layer is mature, tested, and opti-
mized. This includes routing, transition mechanisms, and DNS. DHCPv6 was stan-
dardized in 2004, and early implementations have been available in select platforms
since 2005.
Development is most active in the quality of service, security, IPv4/IPv6 MIB integra-
tion, and Mobile IPv6 areas. Currently, there is a lack of support in the areas of net-
work management, firewalls, and proxies. Vendors such as Cisco, Checkpoint,
Juniper, and many others are working on these areas. The application area is contin-
uously developing, and new applications will appear on the market that will make
use of the advanced features of IPv6. Thanks to the transition mechanisms men-
tioned earlier, you can still use IPv4 applications in IPv6 networks. Worldwide devel-
opment goes beyond infrastructure, as the showroom in Japan demonstrates.

Find more information on the status of application and vendor sup-


port in Chapter 10.

Now you know why you should care about IPv6. The rest of the chapters in this
book aim to make learning about IPv6 a joy. So please read on.

IPv6 Status and Vendor Support | 15

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
References
Here’s a list of the most important RFCs and Drafts mentioned in this chapter.
Sometimes I include additional subject-related RFCs for your personal further study.

RFCs
• RFC 1, “Host Software,” 1969
• RFC 318, “Telnet Protocol,” 1972
• RFC 454, “FILE TRANSFER PROTOCOL,” 1973
• RFC 1347, “TCP and UDP with Bigger Addresses (TUBA),” 1992
• RFC 1526, “Assignment of System Identifiers for TUBA/CLNP Hosts,” 1993
• RFC 1561, “Use of ISO CLNP in TUBA Environments,” 1993
• RFC 1631, “The IP Network Address Translator (NAT),” 1994
• RFC 1707, “CATNIP: Common Architecture for the Internet,” 1994
• RFC 1710, “Simple Internet Protocol Plus White Paper,” 1994
• RFC 1752, “The Recommendation for the IP Next Generation Protocol,” 1995
• RFC 1883, “Internet Protocol, Version 6 (IPv6) Specification,” 1995
• RFC 2235, “Hobbes’ Internet Timeline,” 1997
• RFC 2324, “Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0),” 1998
• RFC 2460, “Internet Protocol, Version 6 (IPv6) Specification,” 1998
• RFC 2663, “IP Network Address Translator (NAT) Terminology and Consider-
ations,” 1999
• RFC 3022, “Traditional IP Network Address Translator (Traditional NAT),”
2001
• RFC 3027, “Protocol Complications with the IP Network Address Translator,”
2001
• RFC 3315, “Dynamic Host Configuration Protocol for IPv6 (DHCPv6),” 2003

16 | Chapter 1: Why IPv6?

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Chapter 2 CHAPTER 2
The Structure of the IPv6 Protocol 2

This chapter explains the structure of the IPv6 header and compares it to the IPv4
header. It also discusses Extension headers, which are new in IPv6.
Understanding the structure of a protocol header and the type of information that
can be transported with it is the best foundation for working with a protocol. This
understanding helps you to identify how the protocol can best be configured and
what the options are. It also helps you to identify possible sources of problems and
issues when troubleshooting.
The header structure of an IPv6 packet is specified in RFC 2460. The header has a
fixed length of 40 bytes. The two fields for Source and Destination addresses each
use 16 bytes (128 bits), so there are only 8 bytes for general header information. The
IPv6 header is therefore much simpler and leaner than the IPv4 header, allowing for
more efficient processing and, as we will see, more flexibility in extending the proto-
col to meet future needs.

General Header Structure


In IPv6, five fields from the IPv4 header have been removed:
• Header Length
• Identification
• Flags
• Fragment Offset
• Header Checksum
The Header Length field was removed because it is not needed in a header with a
fixed length. In IPv4, the minimum header length is 20 bytes, but if options are
added, it can be extended in 4-byte increments up to 60 bytes. Therefore, with IPv4,
the information about the total length of the header is important. In IPv6, options
are defined in Extension headers (covered later in this chapter).

17

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
The Identification, Flags, and Fragment Offset fields handle fragmentation of a
packet in the IPv4 header. Fragmentation happens if a large packet has to be sent
over a network that supports only smaller packet sizes. In that case, the IPv4 router
splits the packet into smaller slices and forwards multiple packets. The destination
host collects the packets and reassembles them. If only one packet is missing or has
an error, the whole transmission has to be redone; this is very inefficient. In IPv6, a
host learns the Path Maximum Transmission Unit (MTU) size through a procedure
called Path MTU Discovery. If a sending IPv6 host wants to fragment a packet, it will
use an Extension header to do so. IPv6 routers along the path of a packet do not pro-
vide fragmentation as they did with IPv4. So the Identification, Flags, and Fragment
Offset fields were removed from the IPv6 header and will be inserted in an Exten-
sion header by the source host if needed. I explain Extension headers later in this
chapter.

Path MTU Discovery is explained in Chapter 4.

The Header Checksum field was removed to improve processing speed. If routers do
not have to check and update checksums, processing becomes much faster. At the
time when IPv4 was developed, checksumming at the media access level wasn’t com-
mon, so the checksum field in the IPv4 header made sense. Today, the risk for unde-
tected errors and misrouted packets is minimal. There is also a checksum field at the
transport layer (UDP and TCP). With IPv4, a UDP checksum is optional; with IPv6,
a UDP checksum is mandatory. IP is a best-effort delivery protocol; it is the responsi-
bility of upper layer protocols to ensure integrity.
The Traffic Class field replaces the “Type of Service” field. IPv6 has a different mech-
anism to handle preferences. Refer to Chapter 6 for more information.
The Protocol Type and “Time-to-Live” (TTL) fields were renamed and slightly modi-
fied. A Flow Label field was added.

The Fields in the IPv6 Header


By becoming familiar with the fields of the IPv6 header, you will better understand
how IPv6 works.

For a detailed description of all the fields in an IPv4 header, refer to


Novell’s Guide to Troubleshooting TCP/IP (Wiley).

Figure 2-1 provides an overview of the IPv6 header. The fields are discussed in detail
in the following paragraphs.

18 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Version (4 bits) 6 Version of the protocol.
Traffic Class Used to distinguish different priorities of IPv6 packets.
(1 byte) Refer to RFC 2474 for more information.
Flow Label Used to label sequences of packets that require the
(20 bits) same treatment for more efficient processing on routers.
Payload Length Length of data carried after IPv6 header.
(2 bytes)
Next Header Contains a protocol number or a value for an Extension
(1 byte) header. Refer to Table 2-1.
Hop Limit Number of hops. Decremented by one by every router.
(1 byte)
Source Address
(16 bytes)
Destination Address
(16 bytes)

Figure 2-1. Fields in the IPv6 header

Figure 2-1 shows that even though the header has a total size of 40 bytes, which is
twice as long as a default IPv4 header, it has actually been streamlined because most
of the header is taken up by the two 16-byte IPv6 addresses. That leaves only 8 bytes
for other header information.

Version (4 Bits)
This is a 4-bit field containing the version of the protocol. In the case of IPv6, the
number is 6. The version number 5 could not be used because it had already been
assigned to the experimental stream protocol.

Traffic Class (1 Byte)


This field replaces the “Type of Service” field in IPv4. It facilitates the handling of
real-time data and any other data that requires special handling, and sending nodes
and forwarding routers can use it to identify and distinguish between different
classes or priorities of IPv6 packets.
RFC 2474, “Definition of the Differentiated Services Field (DS Field) in the IPv4 and
IPv6 Headers,” explains how the Traffic Class field in IPv6 can be used. RFC 2474 uses
the term DS Field to refer to the “Type of Service” field in the IPv4 header, as well as to
the Traffic Class field in the IPv6 header. Refer to Chapter 6 for more information.

Flow Label (20 Bits)


This field distinguishes packets that require the same treatment in order to facilitate
the handling of real-time traffic. A sending host can label sequences of packets with a
set of options. Routers keep track of flows and can process packets belonging to the

The Fields in the IPv6 Header | 19

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
same flow more efficiently because they do not have to reprocess each packet’s
header. The flow label and address of the source node uniquely identify the flow.
Nodes that do not support the functions of the Flow Label field are required to pass
the field unchanged when forwarding a packet and to ignore the field when receiv-
ing a packet. All packets belonging to the same flow must have the same Source and
Destination IP address.

The use of the Flow Label field is experimental and is currently still
under discussion at the IETF at the time of writing. Refer to Chapter 6
for more information.

Payload Length (2 Bytes)


This field specifies the payload—i.e., the length of data carried after the IP header.
The calculation in IPv6 is different from the one in IPv4. The Length field in IPv4
includes the length of the IPv4 header, whereas the Payload Length field in IPv6 con-
tains only the data following the IPv6 header. Extension headers are considered part
of the payload and are therefore included in the calculation.
The fact that the Payload Length field has 2 bytes limits the maximum packet pay-
load size to 64 KB. IPv6 has a Jumbogram Extension header, which supports bigger
packet sizes if needed. Jumbograms are relevant only when IPv6 nodes are attached
to links that have a link MTU greater than 64 KB; they are specified in RFC 2675.

Next Header (1 Byte)


In IPv4, this field is called the Protocol Type field, but it was renamed in IPv6 to
reflect the new organization of IP packets. If the next header is UDP or TCP, this
field will contain the same protocol numbers as in IPv4—for example, protocol num-
ber 6 for TCP or 17 for UDP. But if Extension headers are used with IPv6, this field
contains the type of the next Extension header. Extension headers are located
between the IP header and the TCP or UDP header. Table 2-1 lists possible values in
the Next Header field.

Table 2-1. Values in the Next Header field

Value Description
0 In an IPv4 header: reserved and not used
In an IPv6 header: Hop-by-Hop Option Header following
1 Internet Control Message Protocol (ICMPv4)—IPv4 support
2 Internet Group Management Protocol (IGMPv4)—IPv4 support
4 IPv4
6 TCP
8 Exterior Gateway Protocol (EGP)

20 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Table 2-1. Values in the Next Header field (continued)

Value Description
9 IGP—any private interior gateway (used by Cisco for their IGRP)
17 UDP
41 IPv6
43 Routing header
44 Fragmentation header
45 Interdomain Routing Protocol (IDRP)
46 Resource Reservation Protocol (RSVP)
47 General Routing Encapsulation (GRE)
50 Encrypted Security Payload header
51 Authentication header
58 ICMPv6
59 No Next Header for IPv6
60 Destination Options header
88 EIGRP
89 OSPF
108 IP Payload Compression Protocol
115 Layer 2 Tunneling Protocol (L2TP)
132 Stream Control Transmission Protocol (SCTP)
135 Mobility Header (Mobile IPv6)
136–254 Unassigned
255 Reserved

Header type numbers derive from the same range of numbers as protocol type num-
bers, and therefore should not conflict with them.

The complete list of protocol numbers can be found in Appendix B.


For the most current list, go to IANA’s web site at http://www.iana.org/
assignments/protocol-numbers.

Hop Limit (1 Byte)


This field is analogous to the TTL field in IPv4. The TTL field contains a number of
seconds, indicating how long a packet can remain in the network before being
destroyed. In IPv4, most routers simply decrement this value by one at each hop.
This field has been renamed Hop Limit in IPv6. The value in this field now expresses
a number of hops instead of a number of seconds. Every forwarding node decre-
ments the number by one. If a router receives a packet with a Hop Limit of 1, it dec-
rements it to 0, discards the packet, and sends the ICMPv6 message “Hop Limit
exceeded in transit” back to the sender.

The Fields in the IPv6 Header | 21

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Source Address (16 Bytes)
This field contains the IP address of the originator of the packet.

Destination Address (16 Bytes)


This field contains the IP address of the intended recipient of the packet. This can be
the ultimate destination or if, for example, a Routing header is present, the address
of the next hop router.
Figure 2-2 shows the IPv6 header in the trace file.

Figure 2-2. The IPv6 header in a trace file

This trace file shows all of the header fields discussed and how they can be pre-
sented in a trace file. The Version field is set to 6 for IPv6. The Traffic Class (Prior-
ity) and Flow Label fields are not used in this packet and are set to 0. The Payload
Length is 40, and the Next Header value is set to 58 for ICMPv6. The Hop Limit is
set to 128, and the Source and Destination addresses contain the link local addresses
of my IPv6 nodes. The first line in the detail window shows Ethertype 0x86DD. This
value indicates that this is an IPv6 packet. For IPv4, the value would be 0x0800. This
field can be used to set an analyzer filter for all IPv6 packets.

Analyzer tools can decode packets in different ways. If you use another
version or another type of analyzer, your decode may look slightly dif-
ferent. The difference is not in the packet, but in the way the packet is
presented in the analyzer.

Extension Headers
The IPv4 header can be extended from a minimum of 20 bytes to a maximum of 60
bytes in order to specify options such as Security Options, Source Routing, or Times-
tamping. This capacity has rarely been used because it causes a performance hit. For

22 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
example, IPv4 hardware forwarding implementations have to pass the packet con-
taining options to the main processor (software handling).
The simpler a packet header, the faster the processing is. IPv6 has a new way to deal
with options that has substantially improved processing: it handles options in addi-
tional headers called Extension headers. Extension headers are inserted into a packet
only if the options are needed.
The current IPv6 specification (RFC 2460) defines six Extension headers:
• Hop-by-Hop Options header
• Routing header
• Fragment header
• Destination Options header
• Authentication header
• Encrypted Security Payload header
There can be zero, one, or more than one Extension header in an IPv6 packet. Exten-
sion headers are placed between the IPv6 header and the upper-layer protocol
header. Each Extension header is identified by the Next Header field in the preced-
ing header. The Extension headers are examined or processed only by the node iden-
tified in the Destination address field of the IPv6 header. If the address in the
Destination address field is a multicast address, the Extension headers are examined
and processed by all the nodes belonging to that multicast group. Extension headers
must be strictly processed in the order in which they appear in the packet header.
There is one exception to the rule that only the destination node will process an
Extension header. If the Extension header is a Hop-by-Hop Options header, the
information it carries must be examined and processed by every node along the path
of the packet. The Hop-by-Hop Options header, if present, must immediately follow
the IPv6 header. It is indicated by the value 0 in the Next Header field of the IPv6
header (see Table 2-1 earlier in this chapter).

The first four Extension headers are described in RFC 2460. The
Authentication header is described in RFC 2402, and the Encrypted
Security Payload header in RFC 2406.

This architecture is very flexible for developing additional Extension headers for
future uses as needed. New Extension headers can be defined and used without
changing the IPv6 header. A good example is the Mobility header defined for Mobile
IPv6 (RFC 3775), which is discussed in Chapter 11.
Figure 2-3 shows how Extension headers are used.
Each Extension header’s length is a multiple of eight bytes so that subsequent head-
ers can always be aligned. If a node is required to process the next header but cannot

Extension Headers | 23

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
IPv6 header TCP header
Next header = TCP and data
Value 6

IPv6 header Routing header TCP header


Next header = Routing Next header = TCP and data
Value 43 Value 6

IPv6 header Routing header Fragment header TCP header


Next header = Routing Next header = Fragment Next header = TCP and data
Value 43 Value 44 Value 6

RFC 2460

Figure 2-3. The use of Extension headers

identify the value in the Next Header field, it is required to discard the packet and
send an ICMPv6 Parameter Problem message back to the source of the packet. (For
details on ICMPv6 messages, refer to Chapter 4.)
If more than one Extension header is used in a single packet, the following header
order should be used (RFC 2460):
1. IPv6 header
2. Hop-by-Hop Options header
3. Destination Options header (for options to be processed by the first destination
that appears in the IPv6 Destination address field, plus subsequent destinations
listed in the Routing header)
4. Routing header
5. Fragment header
6. Authentication header
7. Encapsulating Security Payload header
8. Destination Options header (for options to be processed only by the final desti-
nation of the packet)
9. Upper-Layer header
In cases when IPv6 is encapsulated in IPv4, the Upper-Layer header can be another
IPv6 header and can contain Extension headers that have to follow the same rules.

Hop-by-Hop Options Header


The Hop-by-Hop Options header carries optional information that must be exam-
ined by every node along the path of the packet. It must immediately follow the IPv6
header and is indicated by a Next Header value of 0. For example, the Router Alert
(RFC 2711) uses the Hop-by-Hop Options header for protocols such as Resource
Reservation Protocol (RSVP) or Multicast Listener Discovery (MLD) messages. With

24 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
IPv4, the only way for a router to determine whether it needs to examine a datagram
is to at least partially parse upper-layer data in all datagrams. This process slows
down the routing process substantially. With IPv6, in the absence of a Hop-by-Hop
Options header, a router knows that it does not need to process router-specific
information and can route the packet immediately to the final destination. If there is
a Hop-by-Hop Options header, the router needs only to examine this header and
does not have to look further into the packet.
The format of the Hop-by-Hop Options header is shown in Figure 2-4.

Next Header Identifies type of following header.


(1 byte) Refer to Table 2-1.
Header Extension Length Length of Hop-by-Hop options header in units of
(1 byte) 8 bytes, not including the first 8 bytes.
Options Data of length as specified in
Option Data Length field Contains one or more options.
(Variable)

Option Type Option Data Length

Figure 2-4. Format of the Hop-by-Hop Options header

The following list describes each field:


Next Header (1 byte)
The Next Header field identifies the type of header that follows the Hop-by-Hop
Options header. The Next Header field uses the values listed in Table 2-1,
shown earlier in this chapter.
Header Extension Length (1 byte)
This field identifies the length of the Hop-by-Hop Options header in eight-byte
units. The length calculation does not include the first eight bytes. So if the
header is shorter than eight bytes, this field contains the value 0.
Options (variable size)
There can be one or more options. The length of the options is variable and is
determined in the Header Extension Length field.
The Option Type Field, the first byte of the Options fields, contains information
about how this option must be treated in case the processing node does not recog-
nize the option. The value of the first two bits specifies the actions to be taken:
• 00: Skip and continue processing.
• 01: Discard the packet.
• 10: Discard the packet and send ICMP Parameter Problem, Code 2 message to
the packet’s Source address pointing to the unrecognized option type.
• 11: Discard the packet and send ICMP Parameter Problem, Code 2 message to
the packet’s Source address only if the destination is not a multicast address.

Extension Headers | 25

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
The third bit of the Options Type field specifies whether the option information can
change en route (value 1) or does not change en route (value 0).

Option Type Jumbogram


This Hop-by-Hop Option Type supports the sending of IPv6 Jumbograms. The IPv6
Payload Length field supports a maximum packet size of 65,535 bytes. The Jumbo
Payload Option (RFC 2675) allows for larger packets to be sent.
In the IPv6 header of a packet with the Jumbo Payload option, the Payload Length
field is set to 0. The Next Header field contains the value 0, which indicates a Hop-
by-Hop Options header. The Option Type value of 194 indicates the Jumbo Payload
option. The Jumbo Payload Length field has 32 bits and therefore supports the trans-
mission of packets that are between 65,536 and 4,294,967,295 bytes. RFC 2675 also
defines extensions to UDP and TCP that have to be implemented on hosts that need
to support the sending of Jumbograms.

Option Router Alert


This option type indicates to the router that the packet contains important informa-
tion to be processed when forwarding the packet. The option is currently used
mostly for MLD (Multicast Listener Discovery) and RSVP (Resource Reservation
Protocol). It is specified in RFC 2711.
RSVP uses control packets containing information that needs to be interpreted or
updated by routers along the path. These control packets use a Hop-by-Hop Options
header, so only routers process the packet. Regular data packets do not have this
Extension header and are therefore forwarded immediately without further inspec-
tion by the router.
The first 3 bits of the Option Type field are set to 0. A router that doesn’t know this
option ignores it and forwards the packet. In the remaining 5 bits of the first byte,
the option type 5 is specified. The Option Data Length field contains the value 2,
which indicates that the following value field has a length of 2 bytes (refer to
Figure 2-4). RFC 2711 defines the following values for the value field:
• 0: Packet contains an MLD message
• 1: Packet contains an RSVP message
• 2: Packet contains an Active Networks message
• 3–35: Packet contains an Aggregated Reservation Nesting Level (RFC 3175,
RSVP)
• 36–65,535: Reserved by IANA

26 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
The list of Router Alert values can be found at http://www.iana.org/
assignments/ipv6-routeralert-values.

Routing Header
The Routing header is used to give a list of one or more intermediate nodes that
should be visited on the packet’s path to its destination. In the IPv4 world, this is
called the “Loose Source and Record Route” option. The Routing header is identi-
fied by a Next Header value of 43 in the preceding header. Figure 2-5 shows the for-
mat of the Routing header.

Next Header Identifies type of following header.


(1 byte) Refer to Table 2-1.
Header Extension Length Length of routing header in units of 8 bytes,
(1 byte) not including the first 8 bytes.
Routing Type Identifies type of routing header.
(1 byte) Currently type zero defined.
Segments Left Number of listed nodes until final destination.
(1 byte)
Type Specific Data Depends on routing type.
(Variable) For type zero:
Reserved
(4 bytes)
Address 1
(16 bytes)
Address 2
(16 bytes)
Address X
(16 bytes)

Figure 2-5. Format of the Routing header

The following list describes each field:


Next Header (1 byte)
The Next Header field identifies the type of header that follows the Routing
header. It uses the same values as the IPv4 Protocol Type field (see Table 2-1 ear-
lier in this chapter).
Header Extension Length (1 byte)
This field identifies the length of the Routing header in 8-byte units. The length
calculation does not include the first 8 bytes.

Extension Headers | 27

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Routing Type (1 byte)
This field identifies the type of Routing header. RFC 2460 describes Routing
Type 0. The Mobile IPv6 specification defines a Routing Type 2. (This specifica-
tion is discussed in Chapter 11.)
Segments Left (1 byte)
This field identifies how many nodes are left to be visited before the packet
reaches its final destination.
Type-Specific Data (variable length)
The length of this field depends on the Routing Type. The complete header is
always a multiple of 8 bytes.
If a node processing a Routing header cannot identify a Routing Type value, the
action taken depends on the content of the Segments Left field. If the Segments Left
field does not contain any nodes to be visited, the node must ignore the Routing
header and process the next header in the packet, which is determined by the Next
Header field’s value. If the Segments Left field is not zero, the node must discard the
packet and send an ICMP Parameter Problem, Code 0 message to the packet’s
Source address pointing to the unrecognized Routing Type. If a forwarding node
cannot process the packet because the next link MTU size is too small, it discards the
packet and sends an ICMP Packet Too Big message back to the source of the packet.
The only Routing Type described in RFC 2460 is a Type 0 Routing header. The first
node that processes the Routing header is the node addressed by the Destination
address field in the IPv6 header. This node decrements the Segments Left field by one
and inserts the next address field from within the Routing header in the IPv6 header
Destination address field. Then the packet is forwarded to the next hop that will
again process the Routing header as described until the final destination is reached.
The final destination is the last address in the Routing Header Data field. Refer to
Chapter 11 to find out how the Routing header is used for Mobility. Figure 2-6
shows the Routing header in a trace file.
The Next Header field within the IPv6 header shows the value 43 for the Routing
header. The Source and Destination addresses have the prefix 2002, which is allocated
to 6to4 sites (6to4 is a transition mechanism described in Chapter 10). The Routing
header contains the fields discussed earlier in this section. Next Header is ICMPv6,
indicated by the value 58. The Header Length contains two 8-byte units, which add up
to a total length of 16 bytes (one address). The Segments Left field contains the value 1
because there is one address entry in the Options field. Finally, the Options field lists
the addresses to be visited. In this case, there is only one entry. If several hosts are listed
here, every forwarding node (that is, the destination IP address in the IPv6 header) takes
the next entry from this host list, uses it as a new destination IP address in the IPv6
header, decrements the Segments Left field by one, and forwards the packet. This is
done until it reaches the last host in the list.

28 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Figure 2-6. Routing header in a trace file

A source node S sends a packet to destination node D using a Routing header to send
the packet through the intermediate nodes I1, I2, and I3. See the Routing header
changes in Table 2-2 (example taken from RFC 2460).

Table 2-2. Processing the Routing header

IPv6 header Routing header


Packet from S to I1 Source address S Segments Left 3
Destination address I1 Address (1) = I2
Address (2) = I3
Address (3) = D
Packet from I1 to I2 Source address S Segments Left 2
Destination address I2 Address (1) = I1
Address (2) = I3
Address (3) = D
Packet from I2 to I3 Source address S Segments Left = 1
Destination address I3 Address (1) = I1
Address (2) = I2
Address (3) = D
Packet from I3 to D Source address S Segments Left = 0
Destination address D Address (1) = I1
Address (2) = I2
Address (3) = I3

Extension Headers | 29

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Fragment Header
An IPv6 host that wants to send a packet to an IPv6 destination uses Path MTU dis-
covery to determine the maximum packet size that can be used on the path to that
destination. If the packet to be sent is larger than the supported MTU, the source
host fragments the packet. Unlike in IPv4, with IPv6 a router along the path does not
fragment packets. Fragmentation occurs only at the source host sending the packet.
The destination host handles reassembly. A Fragment header is identified by a Next
Header value of 44 in the preceding header. The format of the Fragment header is
shown in Figure 2-7.

Next Header Initial header type of original packet.


(1 byte)
Reserved Not used; set to zero.
(1 byte)
The offset in 8-byte units of the data in the
Fragment Offset (13 bits) packet relative to the start of the original packet.

Reserved (2 bits) Not used; set to zero.

Value 1 = more fragments.


M-flag (1 bit) Value 0 = last fragment.
Identification Identification generated by the source node in order to
(4 bytes) identify all packets belonging to the original packet.

Figure 2-7. Format of the Fragment header

The following list describes each field:


Next Header (1 byte)
The Next Header field identifies the type of header that follows the Fragment
header. It uses the same values as the IPv4 Protocol Type field. (See Table 2-1.)
Reserved (1 byte)
Not used; set to 0.
Fragment Offset (13 bits)
The offset in 8-byte units of the data in this packet relative to the start of the data
in the original packet.
Reserved (2 bits)
Not used; set to 0.
M-Flag (1 bit)
Value 1 indicates more fragments; a value of 0 indicates last fragment.
Identification (4 Bytes)
Generated by the source host in order to identify all packets belonging to the
original packet. This field is usually implemented as a counter, increasing by one
for every packet that needs to be fragmented by the source host.

30 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
The Fragment header does not contain a Don’t Fragment field. It is
not necessary, because routers no longer fragment in IPv6. Only the
source host can fragment a packet.

The initial unfragmented packet is referred to as the original packet. It has an unfrag-
mentable part that consists of the IPv6 header plus any Extension headers that must
be processed by nodes along the path to the destination (i.e., Hop-by-Hop Options
header). The fragmentable part of the original packet consists of any Extension
headers that need only to be processed by the final destination, plus the upper-layer
headers and any data. Figure 2-8 (RFC 2460) illustrates the fragmenting process.

Unfragmentable Fragment First


part header fragment

Unfragmentable Fragment Second


part header fragment

Unfragmentable Fragment Last


part header fragment

Figure 2-8. Fragmentation with IPv6

The unfragmentable part of the original packet appears in every fragment, followed
by the Fragmentation header and then the fragmentable data. The IPv6 header of the
original packet has to be slightly modified. The length field reflects the length of the
fragment (excluding the IPv6 header) and not the length of the original packet.
The destination node collects all the fragments and reassembles them. The frag-
ments must have identical Source and Destination addresses and the same identifica-
tion value in order to be reassembled. If all fragments do not arrive at the destination
within 60 seconds after the first fragment, the destination will discard all packets. If
the destination has received the first fragment (offset = zero), it sends back an
ICMPv6 Fragment Reassembly Time Exceeded message to the source.
Figure 2-9 shows a Fragment header.
I created this Fragment header by generating an oversized ping from Marvin to Ford
(Windows to Linux). The whole fragment set consists of two packets, the first of
which is shown in Figure 2-9. In the IPv6 header, the Payload Length field has a
value of 1456, which is the length of the fragmentation header and this one frag-
ment, not the length of the whole original packet. The Next Header field specifies
the value 44, which is the value for the Fragment header. This field is followed by the
Hop Limit field and the Source and Destination IP addresses. The first field in the
Fragment header is the Next Header field. Because this is a ping, it contains the value
58 for ICMPv6. And because this is the first packet in the fragment set, the value in

Extension Headers | 31

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Figure 2-9. Fragment header in a trace file

the Offset field is 0 and the M-Flag is set to 1, which means there are more frag-
ments to come. The Identification field is set to 1 and has to be identical in all pack-
ets belonging to this fragment set. Figure 2-10 shows the second packet of the
fragment set.

Figure 2-10. The second and last packet in the fragment set

32 | Chapter 2: The Structure of the IPv6 Protocol

This is the Title of the Book, eMatter Edition


Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Other documents randomly have
different content
The Project Gutenberg eBook of The History of the
Great and Mighty Kingdom of China and the Situation
Thereof, Volume 2 (of 2)
This ebook is for the use of anyone anywhere in the United States and most
other parts of the world at no cost and with almost no restrictions whatsoever.
You may copy it, give it away or re-use it under the terms of the Project
Gutenberg License included with this ebook or online at www.gutenberg.org.
If you are not located in the United States, you will have to check the laws of
the country where you are located before using this eBook.

Title: The History of the Great and Mighty Kingdom of China and the Situation
Thereof, Volume 2 (of 2)

Author: Juan González de Mendoza

Editor: Sir George Thomas Staunton

Translator: active 1588 Robert Parke

Release date: April 16, 2013 [eBook #42551]


Most recently updated: October 23, 2024

Language: English

Credits: Produced by Chris Curnow, Joseph Cooper, Tom Cosmas and


the Online Distributed Proofreading Team at
http://www.pgdp.net

*** START OF THE PROJECT GUTENBERG EBOOK THE HISTORY OF THE


GREAT AND MIGHTY KINGDOM OF CHINA AND THE SITUATION THEREOF,
VOLUME 2 (OF 2) ***
WORKS ISSUED BY

MENDOZA'S HISTORIE OF THE

KINGDOME OF CHINA.

VOL. II.

NO. XV

THE HISTORY
OF THE

GREAT AND MIGHTY


KINGDOM OF CHINA
AND

COMPILED BY THE PADRE

JUAN GONZALEZ DE MENDOZA


AND NOW REPRINTED FROM THE EARLY TRANSLATION OF R. PARKE.

EDITED BY

SIR GEORGE T. STAUNTON, Bart.

BY

R. H. MAJOR, ESQ.

VOL. II.

BURT FRANKLIN, PUBLISHER


NEW YORK, NEW YORK
ORIGINALLY PUBLISHED BY THE HAKLUYT SOCIETY

REPRINTED BY PERMISSION

Published by LENOX HILL Pub. & Dist. Co. (Burt Franklin)


235 East 44th St., New York, N.Y. 10017
Originally Published: 1854
Reprinted: 1970
Printed in the U.S.A.

S.B.N.: 8337-23626
Library of Congress Card Catalog No.: 73-141353
Burt Franklin: The Hakluyt Society First Series 15
THE HAKLUYT SOCIETY.
SIR RODERICK IMPEY MURCHISON, G.C.St.S., F.R.S.,
Corr. Mem. Inst. Fr., Hon. Mem. Imp. Acad. Sc.
St. Petersburgh, &c., &c., President.

The EARL OF ELLESMERE.


Capt. C. R. DRINKWATER BETHUNE, R.N., C.B.
} Vice-Presidents.
Rear-Admiral Sir FRANCIS BEAUFORT, K.C.B., F.R.S.
Captain BECHER, R.N.
CHARLES T. BEKE, Esq., Phil. D., F.A.S.
WILLIAM DESBOROUGH COOLEY, Esq.
BOLTON CORNEY, Esq., M.R.S.L.
The Right Rev. LORD BISHOP OF ST DAVID'S.
Rt. Hon. Sir DAVID DUNDAS.
Sir HENRY ELLIS, K.H., F.R.S.
JOHN FORSTER, Esq.
R. W. GREY, Esq.
JOHN HOLMES, Esq.
JOHN WINTER JONES, Esq.
Sir CHARLES LEMON, Bart., M.P., F.R.S.
P. LEVESQUE, Esq., F.A.S.
Sir JOHN RICHARDSON, M.D.
The EARL SOMERS.
Sir GEORGE STAUNTON, Bart. F.R.S.
R. H. MAJOR, Esq., F.R.G.S., Honorary Secretary.

THE SECOND PART

OF THE
HISTORIE
OF THE

MIGHTIE KINGDOME OF CHINA,


THAT IS DIUIDED INTO THREE PARTS.

The first containeth such thinges as the fathers, frier Martin de Herrada,
prouinciall of the order of Saint Augustine, in the Ilands Philipinas, and his
companion fryer Geronimo Martin, and other souldiers that went with them,
did see and had intelligence of in that kingdom.
The second containeth the miraculous voiage that was made by frier Pedro
de Alfaro, of the order of S. Francis, and his companions, vnto the said
kingdome.
The third containeth a briefe declaration by the said frier, and of frier
Martin Ignacio, that went out of Spaine vnto China, and returned into Spaine
againe by the Orientall India, after that he had compassed the world. Wherein
is contained many notable things that hee did see and had intelligence of in
the voiage.
THE ARGUMENT OF THE FIRST PART.
Wherein is declared the cause that moued frier Martin de Herrada and frier
Geronimo Martin, and such souldiers as went in their companie, for to passe
from the Ilands Philipinas, vnto the kingdome of China, in the yeare 1577; and
of the entrie they made therein, and what they did see there for the space of
foure monethes and sixteene daies that they remained: and of what they
vnderstood, and of al things that happened vnto them, till they returned
againe vnto the ilands from whence they went: all the which are notable and
strange.

HISTORIE

OF THE

MIGHTIE KINGDOME OF CHINA,

SECOND PART.

CHAP. I.
The Spanyards departe from Mexico vnto the
Ilandes Phillipinas, where they had intelligence of the
mightie kingdome of China.
Gouerning in the kingdom of Mexico, Don Luys de Velasco, who was
viceroye, and lieftenant in that place for the Catholike king Don Philip king of
Spaine, was commanded by his maiestie to prepare a great armie in the South
Sea, and to leuie souldiers necessarie for the same, and to send them to
discouer the ilands of the west, those which that famous captaine Magallanes
did giue notice of when he did compasse the world in the ship called the
Victorie.
The viceroy with great care and diligence did performe the kinges
commandement. This fleete and armie being prepared readie (which was not
without great cost), hee caused them to depart out of the port at Christmas
time in the yeare of 1564; and sent, for general of the same fleet and for
gouernour of that countrie which they should discouer, the worthie Miguel
Lopez de Legaspi, who afterwarde died in the said Ilande with the title of
Adelantado, a yeare after that the fathers Fryer Martin de Herrada and Fryer
Geronimo Marin and their companies did enter into China.
So after that our Spaniardes hadde discouered the sayde ilandes, and
some of them populared to the vse of his maiestie, but in especiall that of
Manilla, which is fiue hundred leagues in circuit; in the which is situated the
citie of Luson, and is also called Manilla, and as the metropolitane of all the
iland, whereas the gouernours haue ordeined their place of abiding euer since
the first discouery. They haue also founded in that citie a cathedrall church,
and erected a bishopricke.
And for bishops of the same, his maiestie did ordaine the most reuerend
fryer Don Domingo de Salazar, of the order of preachers, in whom was
comprehended some holinesse, good life, and learning, as was requisite and
necessarie for that prouince: and was consecrated in Madrid the yeare of
1579.
At this present there be three monasteries of religious men in that iland,
the one of the order of S. Austen, and were the first that by the
commandement of his maiestie did enter into this iland, preaching the law of
the gospell, which was great profit vnto those soules, yet great trauaile vnto
them, and cost many of them their liues in dooing it: the other monasterie is
of barefoote fryers of the order of S. Francis, of the prouince of S. Joseph,
who haue beene great examples, with great profit vnto them of those portes.
The third are of the order of S. Dominicke or preachers, who haue done their
dutie in all things so well as the other. These three orders were alonely in
those ilands for certaine yeares, till now of late time haue gone thither
Jesuites, which haue bin a great aide and helpe vnto their religion.
When these Spaniardes were come vnto these ilands, they had
strightwaies notice of the mightie kingdome of China, as well by the relation
of them of the ilands (who tolde vnto them the maruels thereof), as also
within a fewe daies after they did see and vnderstand, by ships that came into
those ports with marchants, that brought marchandise and other things of
great curiositie from that kingdome, and did particularly declare the
mightinesse and riches thereof: all which haue been declared vnto you in the
first three bookes of this historie. This beeing knowen vnto the religious
people of S. Austin, who at that time were alone in those ilands, but in
especiall vnto the prouinciall, Frier Martin de Herrada, a man of great valour
and wel learned in all sciences, who seeing ye great capacitie or towardnesse
which the Chinos had more than those of the Ilandes in all things, but in
especiall of their gallantnesse, discretion, and wit, he straightwaies had a
great desire to go thether with his fellow to preach the gospell vnto those
people, of so good a capacitie to receiue the same: who with a pretended
purpose to put it in vse and effect, he began with great care and studie to
learne that language, the which he learned in a few daies, and did make
thereof a dictionarie. Then afterwards, they did giue great entertainment and
presents vnto the merchants that came from China, for to procure them to
carie them thether, and many other things, the which did shew their holie
zeale; yea, they did offer themselues to bee slaues vnto the marchants,
thinking by yt meanes to enter in to preach: but yet none of these diligences
did take effect, till such time as the diuine maiestie did discover a better way,
as shalbe declared vnto you in this chapter following.
CHAP. II.
A rouer of this kingdome of China called Limahon,
doth make himselfe strong at the sea, and doth
ouercome an other rouer of the same countrie called
Vintoquiam.
The Spaniards did enioy their new habitation of Manilla in great
quietnesse, voide of all care of any accident that might disquiet them, or any
strange treasons of enimies for to offend them; for that those Ilandes were in
great quietnes, and in obedience vnto the Christian king Don Phillip, and in
continuall traficke with the Chinos, which seemed vnto them a sufficient
securitie for the continuance of the quietnesse they liued in. And againe, for
that they vnderstoode that they had a law amongst them (as hath bin told
you in this historie), yt it was forbidden to make any wars out of their owne
countrie. But being in this security and quietnes, vnlooked for, they were beset
with a mightie and great armada or fleete of ships, by the rouer Limahon, of
whose vocation there are continually on yt coast, the one by reason yt the
country is full of people, wheras of necessitie must be many idle persons; and
the other and principall occasion, by reason of the great tyranny yt the
gouernors doo vse vnto the subjects. This Limahon came vpon them with
intent to do them harme, as you shal vnderstand. This rouer was borne in the
citie of Trucheo, in the prouince of Cuytan, which the Portingals do call Catin.
He was of mean parentage, and brought vp in his youth in liberty and vice:
hee was by nature warlike and euill inclined. He would learne no occupation,
but all giuen to robbe in the high waies, and became so expert that many
came vnto him and followed that trade. He made himself captain ouer them
which were more then two thousand, and were so strong yt they were feared
in all that prouince where as they were. This being knowen vnto the king and
to his councell, they did straight way command the viceroy of the prouince
where as the rouer was, that with all the haste possible he should gather
together all the garrisons of his frontyers, to apprehende and take him, and if
it were possible to carrye him aliue vnto the citie of Taybin, if not his head.
The viceroy incontinent did gather together people necessarie and in great
haste to followe him.
The which being knowen vnto Limahon the rouer, who saw that, with the
people he had, he was not able to make resistance against so great a number
as they were, and the eminent danger that was therein, he called together his
companies, and went from thence vnto a port of the sea, that was a few
leagues from that place; and did it so quickly and in such secret, that before
the people that dwelt therein could make any defence (for that they were not
accustomed to any such assaultes, but liued in great quietnesse), they were
lordes of the port and of all such ships as were there: into the which they
imbarked themselues straightwaies, wayed anker and departed to the sea,
whereas they thought to bee in more securitie than on the lande (as it was
true). Then hee seeing himselfe lorde of all those seas, beganne to robbe and
spoyle all shippes that he could take, as well strangers as of the naturall
people: by which meanes, in a small time, hee was prouided of mariners and
other things which before hee lacked, requisite for that new occupation. He
sacked, robbed, and spoyled all the townes that were vpon the coast, and did
verie much harme. So he finding himselfe verie strong with fortie shippes well
armed, of those he had out of the port, and other that he had taken at the
sea, with much people such as were without shame, their handes imbrued
with robberie and killing of men, hee imagined with himselfe to attempt
greater matters, and did put it in execution: he assaulted great townes, and
did a thousand cruelties: in such sort, that on all that coast whereas hee was
knowen, he was much feared, yea and in other places farther off, his fame
was so published abroad. So he following this trade and exercise, he chanced
to meete with an other rouer as himselfe, called Vintoquian, likewise naturally
borne in China, who was in a port voide of any care or mistrust, whereas
Limahon finding opportunitie, with greater courage did fight with the shippes
of the other: and although they were threescore ships great and small, and
good souldiers therein, hee did ouercome them, and tooke fiue and fiftie of
their ships. So that Vintoquian escaped with five ships. Then Limahon, seeing
himselfe with a fleete of nintie fiue shippes well armed, and with many stout
people in them, knowing that if they were taken, they should be all executed
to death: they therefore setting all feare a part, gaue themselues to attempt
new inuentions of euill, not onely in robbing of great cities, but also in
destroying of them.
CHAP. III.
The kinge of China doth arme a fleete of shippes
against the rouer Lymahon, who withdraweth himselfe
to Touzuacaotican, whereas he hath notice of the
Philippinas.
The complayntes increased euerie day more and more vnto the king and
his counsell, of the euils doone vnto the Chinos by this rouer Lymahon. For
the which commandement was giuen straightwaies vnto the uiceroy of that
prouince (whereas he vsed to execute his euill), that with great expedition he
might be taken (for to cut off this inconuenience), who in few dayes did set
foorth to sea, one hundred and thirtie great shippes well appointed, with
fortie thousand men in them, and one made generall ouer them all, a gentle
man called Omoncon, for to go seeke and followe this rouer, with expresse
commandement to apprehende or kill him, although to the executing of the
same he put both shippes and men in danger.
Of all this prouision, Lymahon had aduertisement by some secrete friends,
who seeing that his enemies were many, and he not able to counteruaile
them, neither in shippes nor men, determined not to abide the comming, but
to retire and depart from that coast: so in flying he came vnto an ilande in
secrete called Touznacaotican, which was fortie leagues from the firme land,
and is in the right way of nauigation to the Ilands Philippinas.
In this iland was Lymahon retyred with his armie a certaine time, and durst
not returne to the firme land, for that he knew that the kinges fleete did lie
vpon the coast to defende the same. And although he did send foorth some
ships a robbing, yet did they not doo any thing of importance, but rather
came flying away from the mightie power of the kinges. From this ilande they
did goe foorth with some of their ships, robbing and spoyling al such as they
met with marchandice and other things that they carried from one ilande to
an other, and from the iland vnto the firme, and comming from thence
amongst them all, they caused to take two ships of China which came from
Manilla, and were bound to their owne countrie. And hauing them in their
power they searched them vnder hatches, and found that they had rich things
of golde, and Spanish ryalles, which they had in truck of their marchandice
the which they carried to the ilandes. They informed themselues in all points
of the state and fertilitie of that countrie, but in particular of the Spaniardes,
and how many there were of them in the citie of Manilla, who were not at that
present aboue seuentie persons, for that the rest were separated in the
discouering and populing of other ilands newly found; and vnderstanding that
these few did liue without any suspition of enimies, and had neuer a fort nor
bulwarke, and the ordinance which they had (although it was very good), yet
was it not in order to defend themselues nor offend their enemies, hee
determined to goe thither with all his fleete and people, for to destroy and kill
them, and to make himselfe lorde of the saide ilande of Manilla and other
adiacent there nigh the same. And there he thought himselfe to be in securitie
from the power of the king, which went seeking of him. And so, as he was
determined, he put it in vre[1] with as much expedition as was possible.
[1] "Use", supposed to be contracted from the Latin word "usura", usage.
CHAP. IV.
This rouer Limahon goeth to the Ilands Philippinas,
and commeth to the citie of Manilla.
This rouer Limahon determining to goe and to take the Ilands Philippinas,
and to make himselfe lord and king ouer them all, but first to kill the
Spaniardes, which hee thought easely to be done, for that there was so few.
And there he pretended to liue in securitie, without feare that before he had
of the kings great fleete, for that it was so farre distant from the firme lande.
So with this determination hee departed from those ilandes whereas he was
retyred, and went to sea, and sayling towardes the Ilandes Philippinas they
passed in sight of the Ilandes of the Illocos, which had a towne called
Fernandina,[2] which was newe founded by the captaine John de Salzedo,
who at that instant was in the same for lieutenant to the gouernour. Foure
leagues from the same they met with a small galley, which the said John de
Salzedo had sent for victuals. There was in her but 25 souldiers besides ye
rouers, so that with the one and the other they were but a fewe in number;
for that as they thought they did trauaile in places of great securitie, and
without any suspition to meete enemies. So soone as Limahon had discouered
the galley, hee cast about towardes her, and with great ease did take her, and
did burne and kill all that was in her, and pardoned one of them.
[2] The Illocos, Ilocos, Ylocos, or Hilocos, here erroneously called "islands",
is the name of a province on the west side of the Island of Luzon.

This being done, he did prosecute his voyage according vnto his
determination, and passed alongest, but not in such secret but that hee was
discouered by the dwellers of the towne of Fernandina, who gaue notice
thereof vnto the lieutenant of the gouernor aforesaide, as a woonder to see
so many shippes together, and a thing neuer seene before at those ilands.
Likewise it caused admiration vnto him, and made him to thinke and to
imagine with great care what it might bee; hee sawe that they did beare with
the citie of Manilla, and thought with himselfe, that so great a fleete as that
was could not goe to the place which they bare in with, for any goodnesse
towardes the dwellers therein, who were voide of all care, and a small number
of people as aforesaid. Wherewith hee determined with himselfe with so great
speede as it was possible, to ioyne togither such Spaniards as were there,
which were to ye number of fiftie foure, and to depart and procure (although
they did put themselues in danger of inconuenience) to get the forehande of
them, to aduertise them of Manilla, and to ayde and helpe them to put their
artilerie in order, and all other thinges necessarie for their defence.
This determination the captayne did put in vse verie speedily, which was
the occasion that the citie and all those that were in it was not destroyed and
slayne: yet they could not eschue all the harme, for that the shippes that
carried them were small, and a few rouers and not very expert, for that the
suddennesse of their departure would not afforde better choice, as also they
went from one place to an other procuring of victuals: all which was the
occasion that they did not come thither in such time as they desired, and as
was conuenient.
This Lymahon was well prouided of prouision and al other thinges
necessarie, and hauing the wind fayre, he was alwaies in the fore front, and
came in the sight of Manilla vppon Saint Andros Eue, in the yeare 1574,
whereas he came to an anker that night with all his whole fleete. And he
seeing that the end of his pretence consisted in expedition before that they
should be seene of those of the citie, or discouered by them on the coasts:
the nightes at that time being very darke, which was a great helpe vnto them,
he chose foure hundred of his best souldiers, such as hee was fully perswaded
of their valour and stout courage, and put them in small vessels, and charged
those that went with them for captaines, to make such expedition that they
might come vnto the citie before it was day; and the first thing that they did
was to set fire on the citie, and not to let escape one man liuing therein,
promising them that at the break of the day he would be with them to giue
them aide and succour if neede did require, which they did. But for that
nothing is done without the will and permission of God, it went not with
Limahon and his foure hundred souldiers according as he did make reckoning;
for that all that night the winde was of the shoore, and the more the night
came on, the more the wind encreased, which was such a contradiction vnto
their expectation, that they could not by night disembarke themselues,
although they did procure by all meanes possible by policie and force for to do
it. Which of certaintie and without all doubt, if this had not beene (at great
ease), they had brought to a conclusion their euill pretence, with the spoyle
and losse of the citie and all that dwelt therein: for their pretence was for to
destroy and beat it downe, as it might well appeare by the commandement
hee gaue vnto his captaines.
CHAP. V.
Limahon doth send 400 souldiers before for to
burne the citie of Manilla, and they were resisted by
other men.
For all the contradiction of the winde this same night, the foure hundred
Chinos did put themselues within a league of the citie, vpon S. Andrewes day,
at eight of the clocke in the morning, whereas they left their boates and went
a land, and in great haste beganne to march forwardes in battaile a raye
deuided in two partes, with two hundred hargabuses afore, and immediatly
after them other two hundred pickemen: and by reason that they were manie
and the countrie verie plaine, they were straightwayes discouered by some of
the citie, who entered in with a great noyse, crying, Arme, arme, arme, the
enemies come! The which aduice did little profite, for that there was none
that would beleeue them: but beleeued that it was some false larum doone by
the people of the countrie for to mocke them. But in conclusion the enemies
were come vnto the house of the generall of the fielde, who was called Martin
de Goyti, which was the first house in all the citie that wayes which the
enemies came. And before that the Spaniardes and souldiers that were within
the towne could bee fully perswaded the rumour to be true, the enemies had
set fire vpon his house, and slewe him and all that were within, that none
escaped but onely the goodwife of the house, whom they left naked and verie
sore wounded, beleeuing that she had beene dead: but afterwards shee
recouered and was healed of her woundes. In the meane time that they were
occupied in their first crueltie, they of the citie were fully resolued of the
trueth, although all of them, with this successe unlooked for, were as people
amased and from themselues; yet in the end they sounded to armour, and did
provide to saue their liues. Some souldiers went foorth vppon the sandes, but
in ill order as the time did permitte, and slewe all the Chinos that they did
meete, and none escaped: which was the occasion that the rest did ioyne
themselues together, and put themselues in order to make some resistance
against their enemies, who with great furie entred into the citie, burning and
destroying all before them, and crying victorie.
This is the proper resistance of the Spaniardes when they doo finde
themselues in such like perilles: and this was doone with such great courage,
that it was sufficient to stay the furie of those which vnto that time had the
victorie: and to make them to retyre, although there was great difference in
number betwixt the one and the other.
The Chinos in retyring lost some of their souldiers, but vnto the Spaniardes
no great harme, and in this their defence did notable actes. This being
considered of the Chinos, and that their boates were farre off, for that time
would not giue them place to bring them any nearer, they did resolue
themselues to leaue assault in the state that it was in, and put themselues in
couert, and there to refresh themselues of the trauaile past, and afterwarde to
returne with their generall Captaine Lymahon, to prosecute their intent, which
they thought to bee comprehended with great ease. So when they came vnto
their boates, to avoyde any danger that might happen, they embarked
themselues and returned vnto their fleete whereas they left them. And not
long after they were departed, they might see them rowe with great furie
towardes their shippes, and when they came vnto their captaine Limahon,
they did aduertise him in particular of all that had happened, and how that by
reason of the contrarie winde, they could not come thether in time as he had
commanded them, and according vnto their desire, which was the occasion
that they could not bring to passe their pretence, and that by reason of his
absence they had referred it till a better occasion did serue. Their captaine did
comfort them, and gaue them great thankes, for that which they had done,
promising them in short time to bring to effect their euill intent; and
straightway commanded to weigh anker, and to enter into a port called Cabile,
which is but two leagues from the citie of Manilla. Thither they of the citie
might plainely see them to enter.
CHAP. VI.
The gouernour of Manilla purposeth himselfe to
abide the assault of the Chinos, to whom they gaue the
repulse: then Limahon returned and planted himselfe
vppon the plaine nigh the riuer Pagansinan.
At this time, by the order of his majestie, was elected for gouernour of
these Ilandes Philippinas, Guido de Labacares, after the death of Miguel Lopez
de Legaspi, who understanding the great fleete and power of Lymahon the
rover, and the small resistance and defence that was in the citie of Manilla,
with as much speede as was possible he did call together all their captaynes
and dwellers therein: and with a generall consent they did determine to make
some defence for to resist them as well as they could (for the time that the
enemie did remaine in the port aforesaide): for to the contrarie the
Spaniardes should loose great credite, if that they should forsake and leaue
the towne, so long as their liues did indure. For in no other place in all the
ilandes there about, they could haue any securitie. With this determination
they put this worke in execution, and spared no person, of what qualitie and
degree so euer he was, but that his hande was to helpe all that was possible,
the which indured two dayes and two nightes, for so long the rouer kept his
shippes and came not abrode: for these woorthie souldiers vnderstoode, that
remayning with their liues their labour and trauaile would soone be eased.
In which time of their continuall labour, they made a fort with pipes and
bordes filled with sande and other necessaries thereto belonging, such as the
time would permit them: they put in carriages foure excellent peeces of
artilerie that were in the citie. All the which being put in order, they gathered
together all the people of the citie into that little fort, which they made by the
prouidence of God our Lorde, as you may beleeue, for that it was not his
pleasure that so many soules as were in those ilands, baptised and sealed
with the light and knowledge of his holy faith, should returne againe to be
ouercome with the deuill: out of whose power hee brought them by his
infinite goodness and mercie: neither would hee that the friendship should be
lost that these ilands had with the mightie kingdome of China. By which
meanes we may coniecture that the diuine power had ordained the remedie of
saluation for all that countrie. The night before the enemie did giue assault
vnto the citie, came thether the captayne John de Salzedo, lieutenant vnto the
gouernour of the townes of Fernandina, who, as aforesayde, came with
purpose to ayde and helpe the Spaniardes that were then in Manilla. Whose
comming, without all doubt, with his companions, was the principall remedie,
as well vnto the citie, as vnto all those that were within it: for considering that
they were but fewe, and the great paines they tooke in making the last
resistance, and the labor and trauaile they had in the ordayning of the fort for
their defence, with other necessaries, against that which was to come, ioyning
therewith the feare that was amongst them of the assalt past: surely they had
neede of such a succour as this was: and surely by the opinion of all men, it
was a myracle of God, doone to bring them thether. So with the comming of
this captaine with his people, they all recouered newe courage, with great
hope valiantly to resist their enemies: for the which incontinent they did put
all thinges in good order, for that the rouer the morning following, before the
breake of the day (which was the second day after hee gaue the first assalt),
was with all his fleete right against the port, and did put a lande sixe hundreth
souldiers, who at that instant did set vppon the citie, the which at their
pleasure they did sacke and burne (for that it was left alone without people,
as aforesayde by the order and commaundement of the gouernour, which for
their more securitie were retyred into the fort).
So hauing fired the citie, they did assalt the fort with great crueltie, as
men fleshed with the last slaughter, thinking that their resistance was but
small. But it fell not out as they did beleeue, for that all those that were within
were of so valiant courage, that who so euer of their enemies that were so
bolde as to enter into their fort, did paye for their boldnesse with the losse of
their liues. Which being seene by the Chinos they did retire, hauing continued
in the fight almost all the day, with the losse of two hundreth men, that were
slaine in the assalt, and many other hurt; and of the Spaniardes were slaine
but onely two, the one was the Ancient bearer, called Samho[3] Hortiz, and
the other was the bayliefe of the citie, called Francisco de Leon. All which
being considered by Lymahon the rouer, who being politike and wise, and saw
that it was losse of time and men, to goe forwardes with his pretence against
the valiauntnesse of the Spaniardes (which was cleane contrarie vnto that
which had proued vnto that day), he thought it the best way to embarke
himselfe and to set sayle, and goe vnto the porte of Cabite from whence he
came. But first hee gathered together all his dead people, and after did burie
them at the ilande aforesaid, where as he stayed two dayes for the same
purpose.
[3] Misspelt for Sancho.
That being doone, he straightwayes departed from thence and returned
the same way that he came, till he ariued in a mightie riuer, fortie leagues
from the citie of Manilla, that is called Pangasinan, the which place or soyle
did like him verie well, and where he thought he might be sure from them,
who by the commaundement of the king went for to seeke him.
There hee determined to remayne, and to make him selfe lorde ouer all
that countrie, the which hee did with little trauaile, and built himselfe a fort
one league within the ryuer, where as he remayned certayne dayes, receauing
tribute of the inhabitants there abouts, as though he were their true and
naturall lorde: and at times went foorth with his ships, robbing and spoyling
all that he met vpon the coast. And spred abroade that hee had taken to him
selfe the Ilandes Philippinas, and howe that all the Spaniardes that were in
them, were eyther slaine or fledde away: wherewith hee put all cities and
townes bordering there aboutes in great feare, and also how that he had
setled himselfe upon this mightie riuer Pangasinan, whereas they did receiue
him for their lord, and so they did obey him, and paide him tribute.
CHAP. VII.
The generall of the fielde, called Salzedo, doth set
vppon Limahon, he doth burne his fleete, and besiege
his fort three moneths, from whence this rouer dooth
escape with great industrie.
The gouernour vnderstanding by the ilanders, and of those that dwelt in
the citie of Manilla, of the fame that the rouer Limahon did publish abroad in
all places where as he went, howe that he had ouerthrowen and slaine the
Spaniardes; and being of them well considered, that if in time they did not
preuent the same, it might be the occasion of some great euill, that
afterwardes they should not so easely remedie as presently they might: and
those which were their friendes and subiectes in all those ilandes, giuing
credite vnto that which the rouer declared, might be an occasion that they
should rebell against them, by reason that the naturall people were many and
they but a few: for that vnto that time they had sustained themselues onely
by the fame to be inuincible. With this consideration they entred into counsell,
and did determine to ioyne together all the people they could, and being in
good order, to follow and seeke the rouer, for that they vnderstood of
necessitie he must abide and repayre himself in some place nigh there
aboutes, for that he durst not goe vnto China for feare that he had of the
kings fleete; and fearing that they should vse such policies as hee hath vsed,
they might come on him unwares, and destroy him as he had done others.
And seeming vnto them (that although they could not destroy him altogether)
yet at the least they should be reuenged of the harme that they had receiued,
and thereby to giue to vnderstand that the fame that he hath giuen out of
himselfe was a lie, and should be an occasion for to remaine in their old
securitie, and also had in better estimation and opinion of the dwellers there
abouts, as also to cause great friendship with the King of China, for that it is
against a traytor and one that hath offended him.
This determination they put in vre and effect according as the time would
permit: in which time they had certaine newes howe that the rouer was in the
river of Pagansinan, and there did pretende to remaine. These newes were
very ioyfull vnto the Spaniardes. Then the gouernours commanded to be
called together all people bordering there abouts, and to come vnto the citie
where as hee was. Likewise at that time he did giue aduice vnto such as were
lordes and gouernours of the ilandes called Pintados,[4] commanding them to
come thither, with such shippes and people as they could spare, as well
Spaniardes as the naturall people of the countrie. All this was accomplished
and done with great speede; the people of the countrie came thither with
great good will, but in especiall those of the ilandes of the Pintados. After the
death of Martin de Goyti, who was slaine in the first assault of the Chinos as
aforesayde in the citie of Manilla, the governour did ordaine in his roome for
generall of the field, in the name of his maiestie, John de Salzedo, who with
all this people, and with those that were in the citie, went foorth (leauing the
gouvernor no more ayde then that which was sufficient for the defence of the
citie and the fort that they had new made, which was verie strong), and
carried in his company two hundred and fifty Spanish souldiers, and two
thousand five hundred Indians their friends. All which went with great good
will and courage to be revenged on the iniurie receiued, or to die in the
quarrell. All which people were embarked in small ships and two foygattes[5]
that came from the ilandes there borderers, for that the shortnes of time
would not permit them to prouide bigger shipping, neyther should they haue
found them as they would, for at such time as the inhabitants therabouts did
see the rouer in assalt against the citie, they did set fire on a small galley and
other bigge ships that were in the same port, and did rise against the
Spaniards, beleeuing that it had not been possible for them to escape so great
and mightie a power: although since the first entrie of the Spaniardes in those
ilandes they were verie subiect. The generall of the fielde with the people
aforesaide, did depart from Manilla the three and twentieth day of March anno
1575, and arrived at the mouth of the river Pagansinan vpon tenable[6]
Wednesday in the morning next following, without being discouered of any,
for that it was doone with great aduice, as a thing that did import verie much.
Then straightwaies at that instant the generall did put a lande all his people
and foure peeces of artilerie, leauing the mouth of the riuer shutte vp with his
shipping, inchayning the one to the other, in such sort that none could enter
in, neyther yet goe foorth to give anie aduice vnto the rouer of his ariuall: hee
commaunded some to goe and discouer the fleete of the enimie, and the
place whereas hee was fortified, and charged them verie much to doo it in
such secrete sort that they were not espied, for therein consisted all their
whole worke. The captaines did as they were commanded, and found the
rouer voyde of all care or suspition to receiue there any harme, as he found
them in the citie of Manilla when he did assault them.
[4] More correctly, the Islands of Painted Men. Martinière, in his
"Dictionnaire géographique, historique, et critique," thus speaks of these
Pintados in his article "Philippines":—"Ceux qu'on appelle Bisayas et
Pintados dans la Province de Camerinos, comme aussi à Leyte, Samar,
Panay, et autres lieux, viennent vraisemblablement de Macassar, où l'on dit
quil y a plusieurs peuples qui se peignent le corps comme ces Pintados."
[5] Misspelt for frigattes.
[6] Ash Wednesday: the Wednesday to be kept holy.

This securitie that hee thought himselfe in did proceede from the newes
that hee had from his friendes at the China, that although they did prouide to
sende against him, yet could they not so quickly haue any knowledge where
hee was, neyther finde out the place of his abiding: and againe, hee knewe
that the Spaniards of the Phillippinas remained without shippes, for that they
had burnt them as you haue heard, and that they had more need to repayre
themselues of their ill intreatie the yeare past, then to seeke any reuengement
of their iniuries receiued.
The generall of the fielde being fully satisfied of his negligence and voide
of care, and giuen to vnderstande of the secretest way that was to goe vnto
the fort whereas the rouer was, he commaunded the captayne Gabriell de
Ribera that straightwayes he should depart by lande, and that vppon a
suddaine, he should strike alarum vpon the enimie, with the greatest tumult
that was possible. Likewise he commanded the captaynes Pedro de Caues[7]
and Lorenso Chacon, that either of them with fortie souldiers should goe vp
the riuer in small shippes and light, and to measure the time in such sort, that
as well those that went by lande, as those that went by water, should at one
instant come vppon the fort, and to give alarum both together, the better to
goe thorough with their pretence: and he himselfe did remaine with all the
rest of the people to watch occasion and time for to ayde and succour them if
neede required. This their purpose came so well to passe, that both the one
and the other came to good effect: for those that went by water did set fire
on all the fleete of the enemie, and those that went by lande at that instant
had taken and set fire on a trench made of tymber, that Lymahon had caused
to be made for the defence of his people and the fort: and with that furie they
slewe more then one hundreth Chinos, and tooke prisoners seuentie women
which they founde in the same trench; but when that Lymahon vnderstoode
the rumour, he tooke himselfe straightwayes to his fort, which he had made
for to defend himselfe from the kinges navie, if they should happen to finde
him out: and there to saue his life vpon that extremitie, he commaunded
some of his souldiers to goe foorth and to skirmish with the Spaniardes, who
were verie wearie with the trauaile of all that day, and with the anguish of the
great heate, with the burning of the ships and the trench, which was
intollerable, for that they all burned together.
[7] Chabes in original.

The captaines seeing this, and that their people were out of order, neither
could they bring them into any, for that they were also weary (although the
generall of the field did succour them in time, the which did profite them
much), yet did they sound a retraite, and did withdraw themselues with the
losse of fiue Spaniards and thirtie of the Indians their friends, and neuer a one
more hurt. Then the next day following the generall of the fielde did bring his
souldiers into a square battle, and began to march towards the fort, with
courage to assalt it if occasion did serve thereunto: he did pitch his campe
within two hundreth paces of the fort, and founde that the enimie did all that
night fortifie himselfe verie well, and in such sort that it was perilous to assalt
him, for that he had placed vpon his fort three peeces of artilerie, and many
bases,[8] besides other ingins of fire worke. Seeing this, and that his peeces of
artilerie that hee brought were very small for to batter, and little store of
munition, for that they had spent all at the assalt which the rouer did giue
them at Manilla, the generall of the fielde and the captaines concluded
amongst themselues, that seeing the enimie had no ships to escape by water,
neither had hee any great store of victuals, for that all was burnt in the ships,
it was the best and most surest way to besiege the fort, and to remaine there
in quiet vntill that hunger did constraine them either to yeeld or come to some
conclusion, which rather they will then to perish with hunger.
[8] In the original Spanish versete. A "base" was the smallest piece of
ordnance made.
This determination was liked well of them all, although it fell out cleane
contrarie vnto their expectation; for that in the space of three monethes
that siege indured, this Limahon did so much that within the fort he made
certaine small barkes, and trimmed them in the best manner he coulde,
wherewith in one night hee and all his people escaped, as shall bee tolde
you: a thing that seemed impossible, and caused great admiration
amongst the Spaniards, and more for that his departure was such that he
was not discouered, neither by them on the water nor on the lande. What
happened in these three monethes, I doo not here declare, although some
attempts were notable, for that my intent is to declare what was the
occasion that those religious men and their consorts did enter into the
kingdome of China, and to declare of that which they said they had seene:
for the which I haue made relation of the comming of Limahon, and of all
the rest which you haue heard.
CHAP. VIII.
Omoncon, captain of the king of China, commeth to
seeke Limahon, and doth meete with Spaniards.
In the meane time that the siege indured at the fort, as you haue
vnderstood, there went and came certaine vessels which brought victuals and
other necessaries from the cittie of Manilla, which was but fortie leagues from
the mouth of that riuer of Pagansinan, as hath beene tolde you. It happened
vppon a day that a shippe of Myguel de Loarcha, wherein was frier Martin de
Herrada, provinciall of the Augustine friers, who was come vnto the riuer
Pagansinan for to see the generall of the fielde, and in the same shippe
returned vnto Manilla to hold Capitulo, or court, in the saide ilande and port of
Buliano. Seuen leagues after they were out of the mouth of Pagansinan, they
met with a shippe of Sangleyes, who made for the port, and thinking them to
bee enimies, they bore with them (hauing another shippe that followed them
for their defence), and had no more in them but the saide prouinciall and fiue
Spanyards, besides the mariners. This shippe of Sangley, seeing that hee did
beare with them, would haue fledde, but the winde woulde not permit him,
for that it was to him contrarie; which was the occasion that the two shippes
wherein the Spanyards were, for that they did both saile and rowe, in a small
time came within cannon shot. In one of the shippes there was a Chino called
Sinsay, one who had beene many times at Manilla with merchandise, and was
a verie friend and knowne of the Spanyards, and vnderstoode their language;
who knowing that shippe to be of China, and not to be a rouer, did request
our people not to shoote, neither to doo them any harme, vntill such time as
they were informed what they were in that same shippe.
This Sinsay went straight wayes into the fore shippes, and demanded what
they were, and from whence they came: and being well informed, he
vnderstoode that he was one of the ships of warre that was sent out by the
king of China, to seeke the rouer Limahon, who leauing the rest of the fleet
behinde, came forth to seeke in those ilands to see if he coulde discouer him
to be any of them: and the better to be informed thereof, they were bounde
into the port of Buliano, from whence they came with their two shippes: from
whome they woulde haue fledde, thinking they had beene some of the rouers
shippes. Being fully perswaded the one of the other, they ioyned together with
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like