Preface

For a long time, I was very happy building Ethernet networks, working with switches and then moving to 802.11. It took awhile, but eventually I realized that the world of interconnected networks cannot be reached with Layer 2 alone. In addition, as you spread your wings from the Layer 2 broadcast domains, you encounter the wonders of virtual local area networks and trunks. I became an “all over” networking sort of guy. Like my own progression, this book moves up to the next layers and ideas.

If you read the Packet Guide to Core Network Protocols (O’Reilly), you have a handle on the type of communication seen on every single network (ARP, ICMP, IP, Ethernet), regardless of operating system or networking equipment vendor. This book now moves to the advanced link and internetwork layer protocols that will enable the reader to expand to internetworks and larger topologies.

Like the first book, each chapter will tear apart a particular protocol or set of ideas, explaining the structure and operation. The discussion will be supported by ample packet captures. There is nothing theoretical about the stuff between these covers: the topologies depicted in each chapter were built in a lab as the chapters took form.

And like the first book, what you see here will be part of every network that you encounter. So, the practices, ideas and protocols seen here will continue to help you on your way for many years to come. I’ll also continue to refer to and work with networking tables including routing (host and router), source address, and ARP tables.

Recently, many in the networking profession experienced, or at least paid attention to, IPv6 day. But the results were largely unimpressive. Several challenges—such as properly operating 6to4 tunnels, filters blocking some IPv6 messaging, and a seeming lack of support for security features—indicate that IPv4 will be with us for some time to come. That said, many of the chapters touch on IPv6, including some basic configurations and a comparison to IPv4 operation.

Each chapter contains a collection of review questions to remind the reader about key ideas. A series of lab experiences ranging from basic to advanced are also included. These experiences are designed such that the reader can perform them with the help of the chapter, welding the ideas into place.

I hope you enjoy this book and that it helps you on your way to networking greatness.

Audience

As this book contains both ground-up explanations and advanced ideas, it is appropriate for those just beginning as well as the pros out there, who might need a refresher. Whether you are working with small networks or interconnecting larger ones, the principles contained remain true.

This book is meant to be a companion to The Packet Guide to Core Network Protocols. Both books stand on their own, but this book assumes that you understand the concepts and protocols explained previously, including ARP, ICMP, IP, equipment, Ethernet, and masking. Occasionally I’ll throw in a little review, but these sections will be few and far between.

Contents of This Book

Chapter 1, Routing and Switching Strategies

This chapter ties the book together, covering the integrated nature of the forwarding decisions made on the network and introduces many of the concepts that form the basis of later chapters. The chapter addresses key ideas, including classification of protocols, static versus dynamic topologies, and the reasons for installing a particular route.

Chapter 2, Host Routing

This chapter picks up where the discussion of masks in Chapter 1 leaves off. Hosts are like routers in many ways, and possessing a routing table is just one of them. Reading this chapter will show you how to process a host routing table and how traffic starts out across a network. Conversations crossing routers will also be examined, with special attention paid to addressing and frame construction.

Chapter 3, Spanning Tree and Rapid Spanning Tree

Loops are problematic for Ethernet networks. The Spanning Tree Protocol is an integral part of every network containing switches and works to protect the topology against them. It can also affect the performance of your network and consume bandwidth. This chapter covers Spanning Tree and the faster Rapid Spanning Tree protocol.

Chapter 4, VLANs and Trunking

As good as switches have been for modern communication topologies, once the Layer 2 network grows beyond a certain size, bottlenecks and security concerns start to assert themselves. VLANs are a valuable tool used to address these problems. This chapter covers the design and operation of VLANs and includes sections for trunking protocols that allow VLANs to spread out over many switches.

Chapter 5, Routing Information Protocol

One of the first distance vector protocols, RIP is often used as a basis for understanding dynamic routing. However, RIP also has a place in small, modern communication networks. This chapter addresses the operation and structure of RIP. Also discussed are improvements to simple dynamic routing, including split horizon, poisoning, count to infinity, and triggered updates.

Chapter 6, Open Shortest Path First

OSPF is a link state protocol, and as such, is generally considered superior to protocols like RIP. This chapter will explain the operation of link state protocols and why convergence times are improved over distance vector. The protocol structure, addressing, and operation will be covered with support from packet captures.

Chapter 7, Network Address Translation

One of the reasons for the delay in full IPv6 deployment is the success of network address translation (NAT). NAT converts internal private (RFC 1918) addresses to globally unique IP addresses used on the Internet. Most home and many small office networks use this highly effective networking technology. This chapter will explain NAT operation and run through several examples depicting the translation tables and the traffic resulting from its deployment.

Chapter 8, Multicast

Multicast messaging is used when transmissions must reach a collection of nodes without using broadcast addressing. By default, routers do not forward multicast traffic. In order for nodes to reach multicast streams across a network, the Interior Group Management Protocol (IGMP) and protocol independent multicast (PIM) are configured on network devices. This chapter will explain the structure of these protocols, their operation, and multicast addressing for both IPv4 and IPv6.

Conventions Used in This Book

The following typographical conventions are used in this book:

Plain text

Indicates menu titles, menu options, menu buttons, and keyboard accelerators (such as Alt and Ctrl).

Italic

Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames, directories, and Unix utilities.

Constant width

Indicates commands, options, switches, variables, attributes, keys, functions, types, classes, namespaces, methods, modules, properties, parameters, values, objects, events, event handlers, XML tags, HTML tags, macros, the contents of files, or the output from commands.

Constant width bold

Shows commands or other text that should be typed literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied values.

Note

This icon signifies a tip, suggestion, or general note.

Warning

This icon indicates a warning or caution.

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: “Packet Guide to Routing and Switching by Bruce Hartpence (O’Reilly). Copyright 2011 Bruce Hartpence, 978-1-449-30655-7.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Safari® Books Online

Note

Safari Books Online (www.safaribooksonline.com) is an on-demand digital library that delivers expert content in both book and video form from the world’s leading authors in technology and business.

Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.

Safari Books Online offers a range of plans and pricing for enterprise, government, and education, and individuals.

Members have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and hundreds more. For more information about Safari Books Online, please visit us online.

How to Contact Us

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)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

http://www.oreilly.com/catalog/9781449306557

To comment or ask technical questions about this book, send email to:

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Content Updates

September 28, 2012

  • Swapped Switch 2 and Switch 3 in Figure 3-1.

  • Swapped Switch 2 and Switch 3 in Figure 3-5.

  • Changed the direction of the arrow between Switch 2 and Switch 3 in Figure 3-14.

  • Fixed a minor issue from change lowest bridge ID to highest bridge ID.

  • Fixed a typo in Question 10 of Chapter 3 from teo to two.

  • Made some minor changes to Questions 5, 6, and 7 of Chapter 5.

Acknowledgments

This book follows closely on the heels of the first one. So, members of my family and many of the folks in my department have been putting up with my writing activities for several months now. Cables everywhere, signs hanging on equipment, demands for coffee, and general grumpiness were par for the course. Thanks to all of you for putting up with my shenanigans.

I’d like to thank the folks at O’Reilly for making both of these writing experiences the best they could be, and especially for helping a new writer get his legs.

Special thanks to my writing conscience: Jim Leone, who helps keep me on track and away from excessive pronouns. I also had loads of help from Jonathan Weissman, who not only shares a love of all things networking, but also helped me keep the fields in the correct order and the redundant phrases at bay.

Get Packet Guide to Routing and Switching now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.