ccna routing and switching 100 - 105

Views:
 
Category: Entertainment
     
 

Presentation Description

ccna routing and switching 100 - 105

Comments

Presentation Transcript

slide 1:

ptg17246291

slide 2:

ptg17246291 In addition to the wealth of updated content this new edition includes a series of free hands-on exercises to help you master several real-world configuration and troubleshooting activities. These exercises can be performed on the CCENT /CCNA ICND1 100- 105 Network Simulator Lite software included for free on the DVD or companion web page that accompanies this book. This software which simulates the experience of working on actual Cisco routers and switches contains the following 24 free lab exercises covering all the topics in Part II the first hands-on configuration section of the book: 1. Configuring Hostnames 2. Configuring Local Usernames 3. Configuring Switch IP Settings 4. Interface Settings I 5. Interface Settings II 6. Interface Settings III 7. Interface Status I 8. Interface Status II 9. Interface Status III 10. Interface Status IV 11. Setting Switch Passwords 12. Switch CLI Configuration Process I 13. Switch CLI Configuration Process II 14. Switch CLI Exec Mode 15. Switch Forwarding I 16. Switch IP Address 17. Switch IP Connectivity I 18. Switch Security I 19. Switch Security II 20. Switch Security III 21. Switch Security IV 22. Switch Security Configuration Scenario 23. Switch Interfaces and Forwarding Configuration Scenario 24. Port Security Troubleshooting Scenario If you are interested in exploring more hands-on labs and practicing configuration and troubleshooting with more router and switch commands see the special 50 discount offer in the coupon code included in the sleeve in the back of this book. Windows system requirements minimum: n Windows 10 32/64 bit Windows 8.1 32/64 bit or Windows 7 32/64 bit n 1 gigahertz GHz or faster 32-bit x86 or 64-bit x64 processor n 1 GB RAM 32-bit or 2 GB RAM 64-bit n 16 GB available hard disk space 32-bit or 20 GB 64-bit n DirectX 9 graphics device with WDDM 1.0 or higher driver n Adobe Acrobat Reader version 8 and above Mac system requirements minimum n OS X 10.11 10.10 10.9 or 10.8 n Intel core Duo 1.83 GHz n 512 MB RAM 1 GB recommended n 1.5 GB hard disk space n 32-bit color depth at 1024x768 resolution n Adobe Acrobat Reader version 8 and above on New CCENTCCNA Simulators See CD sleeve for offer details Save 50

slide 3:

ptg17246291 Cisco Press 800 East 96th Street Indianapolis IN 46240 USA CCENT/ CCNA ICND1 100-105 Official Cert Guide WENDELL ODOM CCIE No. 1624

slide 4:

ptg17246291 ii CCENT/CCNA ICND1 100-105 Official Cert Guide CCENT/CCNA ICND1 100-105 Official Cert Guide Wendell Odom Copyright© 2016 Cisco Systems Inc. Published by: Cisco Press 800 East 96th Street Indianapolis IN 46240 USA All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means electronic or mechanical including photocopying recording or by any information storage and retrieval system without written permission from the publisher except for the inclusion of brief quotations in a review. Printed in the United States of America First Printing May 2016 Library of Congress Control Number: 2016933699 ISBN-13: 978-1-58720-580-4 ISBN-10: 1-58720-580-7 Warning and Disclaimer This book is designed to provide information about the Cisco ICND1 100-105 exam for CCENT certification. Every effort has been made to make this book as complete and as accurate as possible but no warranty or fitness is implied. The information is provided on an “as is” basis. The authors Cisco Press and Cisco Systems Inc. shall have neither liability nor responsibility to any person or entity with respect to any loss or dam- ages arising from the information contained in this book or from the use of the discs or programs that may accompany it. The opinions expressed in this book belong to the author and are not necessarily those of Cisco Systems Inc. Trademark Acknowledgments All terms mentioned in this book that are known to be trademarks or service marks have been appro- priately capitalized. Cisco Press or Cisco Systems Inc. cannot attest to the accuracy of this informa- tion. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Special Sales For information about buying this title in bulk quantities or for special sales opportunities which may include electronic versions custom cover designs and content particular to your business train- ing goals marketing focus or branding interests please contact our corporate sales department at corpsalespearsoned.com or 800 382-3419. For government sales inquiries please contact governmentsalespearsoned.com. For questions about sales outside the U.S. please contact intlcspearson.com.

slide 5:

ptg17246291 iii Feedback Information At Cisco Press our goal is to create in-depth technical books of the highest quality and value. Each book is crafted with care and precision undergoing rigorous development that involves the unique expertise of members from the professional technical community. Readers’ feedback is a natural continuation of this process. If you have any comments regarding how we could improve the quality of this book or otherwise alter it to better suit your needs you can contact us through email at feedbackciscopress.com. Please make sure to include the book title and ISBN in your message. We greatly appreciate your assistance. Publisher Paul Boger Associate Publisher Dave Dusthimer Business Operation Jan Cornelssen Manager Cisco Press Executive Editor Brett Bartow Managing Editor Sandra Schroeder Senior Development Christopher Cleveland Editor Senior Project Editor Tonya Simpson Copy Editors Keith Cline Chuck Hutchinson Technical Editors Aubrey Adams Elan Beer Editorial Assistant Vanessa Evans Cover Designer Mark Shirar Composition Studio Galou Senior Indexer Erika Millen Proofreaders Kathy Ruiz Paula Lowell

slide 6:

ptg17246291 iv CCENT/CCNA ICND1 100-105 Official Cert Guide About the Author Wendell Odom CCIE No. 1624 Emeritus has been in the networking industry since 1981. He has worked as a network engineer consultant systems engineer instructor and course developer he currently works writing and creating certification study tools. This book is his 27th edition of some product for Pearson and he is the author of all editions of the CCNA RS and CCENT Cert Guides from Cisco Press. He has written books about topics from networking basics certification guides throughout the years for CCENT CCNA RS CCNA DC CCNP ROUTE CCNP QoS and CCIE RS. He helped develop the popular Pearson Network Simulator. He maintains study tools links to his blogs and other resources at www.certskills.com. About the Technical Reviewers Aubrey Adams is a Cisco Networking Academy instructor in Perth Western Australia. With a background in telecommunications design Aubrey has qualifications in elec- tronic engineering and management graduate diplomas in computing and education and associated industry certifications. He has taught across a broad range of both relat- ed vocational and education training areas and university courses. Since 2007 Aubrey has technically reviewed several Pearson Education and Cisco Press publications including video simulation and online products. Elan Beer CCIE No. 1837 is a senior consultant and Cisco instructor specializing in data center architecture and multiprotocol network design. For the past 27 years Elan has designed networks and trained thousands of industry experts in data center archi- tecture routing and switching. Elan has been instrumental in large-scale professional service efforts designing and troubleshooting internetworks performing data center and network audits and assisting clients with their short- and long-term design objec- tives. Elan has a global perspective of network architectures via his international clien- tele. Elan has used his expertise to design and troubleshoot data centers and internet- works in Malaysia North America Europe Australia Africa China and the Middle East. Most recently Elan has been focused on data center design configuration and troubleshooting as well as service provider technologies. In 1993 Elan was among the first to obtain the Cisco Certified System Instructor CCSI certification and in 1996 he was among the first to attain the Cisco System highest technical certification the Cisco Certified Internetworking Expert. Since then Elan has been involved in numer- ous large-scale data center and telecommunications networking projects worldwide.

slide 7:

ptg17246291 v Dedications For Hannah Grace Odom my wonderful daughter: Tomato softball equiangular equilateral quadrilaterals being Jesus’s hands and feet wasabi smart brain and a bigger heart movies while other kids are at school Underdog stories math homework—hooray singing scat. Love you precious girl.

slide 8:

ptg17246291 vi CCENT/CCNA ICND1 100-105 Official Cert Guide Acknowledgments Brett Bartow again served as executive editor on the book. We’ve worked together on probably 20+ titles now. Besides the usual wisdom and good decision making to guide the project he was the driving force behind adding all the new apps to the DVD/web. As always a pleasure to work with and an important part of deciding what the entire Official Cert Guide series direction should be. As part of writing these books we work in concert with Cisco. A special thanks goes out to various people on the Cisco team who work with Pearson to create Cisco Press books. In particular Greg Cote Joe Stralo and Phil Vancil were a great help while we worked on these titles. Chris Cleveland did the development editing for the very first Cisco Press exam certi- fication guide way back in 1998 and he’s been involved with the series ever since. It’s always great to work with Chris even though I’m jealous of his office setup. This book has more moving parts than most and Chris’s part of the work happened on a challeng- ing timeline. Thanks Chris for the many late-night hours working through the different elements and especially for keeping us on track with the new features. As for technical editors ho hum Elan Beer did his usual amazing job. It is truly abnormal to find one person who can do all aspects of technical editing in the same pass with excellence. From finding small technical errors to noticing phrasing that might mis- lead to suggesting where an extra thought or two rounds out a topic Elan does it all. Fantastic job as usual thanks Elan. Aubrey Adams tech edited the book his first time tech editing one of my books and he also provided some excellent feedback. Aubrey’s experience teaching the material was a big help in particular because he knows of the common mistakes that students make when learning these same topics. Diligent objective useful comments all around thanks Aubrey Welcome and thanks to a new team member Lisa Matthews new at least in terms of someone I interact with during the writing process. Lisa handled all the practice app development: taking various appendixes learning some subnetting fun huh Lisa and building apps to make the practice experience more interactive. Thanks for guiding us through the process Lisa I love the magic wand that is production. Presto word docs with gobs of queries and comments feed into the machine and out pops these beautiful books. Thanks to Sandra Schroeder Tonya Simpson Mandie Frank for jumping into the fray to keep the sched- ule moving and all the production team for making the magic happen. From fixing all my grammar crummy word choices passive-voice sentences and then pulling the design and layout together they do it all thanks for putting it all together and making it look easy. And Tonya once again getting the “opportunity” to manage two books with many elements at the same timeline once again the juggling act continues and done well. Thanks for managing the whole production process again. Mike Tanamachi illustrator and mind reader did a great job on the figures again. I use a different process with the figures than most authors with Mike drawing new figures as soon as I outline a new section or chapter. It means more edits when I change my mind

slide 9:

ptg17246291 vii and lots of mind reading of what W endell really wanted versus what I drew poorly on my Wacom tablet. Mike came through again with some beautiful finished products. And a thanks goes out to Laura Robbins for working on helping make sure all the figures follow our color standards—standards she helped develop over several other editions of other books. I could not have made the timeline for this book without Chris Burns of Certskills Professional. Chris owns the mind map process now owns big parts of the lab develop- ment process for the associated labs added to my blogs does various tasks related to specific chapters and then catches anything I need to toss over my shoulder so I can focus on the books. Chris you are the man Sean Wilkins played the largest role he’s played so far with one of my books. A long- time co-collaborator with Pearson’s CCNA Simulator Sean did a lot of technology work behind the scenes. No way the books are out on time without Sean’s efforts thanks for the great job Sean A special thanks you to you readers who write in with suggestions and possible errors and especially those of you who post online at the Cisco Learning Network. Without question the comments I receive directly and overhear by participating at CLN made this edition a better book. Thanks to my wonderful wife Kris who helps make this sometimes challenging work lifestyle a breeze. I love walking this journey with you doll. Thanks to my daughter Hannah see dedication. And thanks to Jesus Christ Lord of everything in my life.

slide 10:

ptg17246291 viii CCENT/CCNA ICND1 100-105 Official Cert Guide Contents at a Glance Introduction xxxiv Your Study Plan 2 Part I: Networking Fundamentals 13 Chapter 1 Introduction to TCP/IP Networking 14 Chapter 2 Fundamentals of Ethernet LANs 38 Chapter 3 Fundamentals of WANs 60 Chapter 4 Fundamentals of IPv4 Addressing and Routing 78 Chapter 5 Fundamentals of TCP/IP Transport and Applications 102 Part I Review 120 Part II: Implementing Basic Ethernet LANs 125 Chapter 6 Using the Command-Line Interface 126 Chapter 7 Analyzing Ethernet LAN Switching 146 Chapter 8 Configuring Basic Switch Management 166 Chapter 9 Configuring Switch Interfaces 190 Part II Review 212 Part III: Ethernet LANs: Design VLANs and Troubleshooting 217 Chapter 10 Analyzing Ethernet LAN Designs 218 Chapter 11 Implementing Ethernet Virtual LANs 242 Chapter 12 Troubleshooting Ethernet LANs 270 Part III Review 298 Part IV: IP Version 4 Addressing and Subnetting 301 Chapter 13 Perspectives on IPv4 Subnetting 302 Chapter 14 Analyzing Classful IPv4 Networks 326 Chapter 15 Analyzing Subnet Masks 340 Chapter 16 Analyzing Existing Subnets 356 Part IV Review 378

slide 11:

ptg17246291 ix Part V: Implementing IPv4 383 Chapter 17 Operating Cisco Routers 384 Chapter 18 Configuring IPv4 Addresses and Static Routes 402 Chapter 19 Learning IPv4 Routes with RIPv2 434 Chapter 20 DHCP and IP Networking on Hosts 470 Part V Review 498 Part VI: IPv4 Design and Troubleshooting 503 Chapter 21 Subnet Design 504 Chapter 22 Variable-Length Subnet Masks 528 Chapter 23 IPv4 Troubleshooting Tools 542 Chapter 24 Troubleshooting IPv4 Routing 564 Part VI Review 586 Part VII: IPv4 Services: ACLs and NAT 591 Chapter 25 Basic IPv4 Access Control Lists 592 Chapter 26 Advanced IPv4 Access Control Lists 614 Chapter 27 Network Address Translation 642 Part VII Review 666 Part VIII: IP Version 6 671 Chapter 28 Fundamentals of IP Version 6 672 Chapter 29 IPv6 Addressing and Subnetting 688 Chapter 30 Implementing IPv6 Addressing on Routers 704 Chapter 31 Implementing IPv6 Addressing on Hosts 728 Chapter 32 Implementing IPv6 Routing 750 Part VIII Review 772 Part IX: Network Device Management 777 Chapter 33 Device Management Protocols 778 Chapter 34 Device Security Features 802

slide 12:

ptg17246291 x CCENT/CCNA ICND1 100-105 Official Cert Guide Chapter 35 Managing IOS Files 820 Chapter 36 IOS License Management 848 Part IX Review 864 Part X: Final Review 867 Chapter 37 Final Review 868 Part XI: Appendixes 887 Appendix A Numeric Reference Tables 889 Appendix B CCENT/CCNA ICND1 100-105 Exam Updates 895 Glossary 897 Index 928 DVD Appendixes Appendix C Answers to the “Do I Know This Already” Quizzes Appendix D Practice for Chapter 14: Analyzing Classful IPv4 Networks Appendix E Practice for Chapter 15: Analyzing Subnet Masks Appendix F Practice for Chapter 16: Analyzing Existing Subnets Appendix G Practice for Chapter 21: Subnet Design Appendix H Practice for Chapter 22: Variable-Length Subnet Masks Appendix I Practice for Chapter 25: Basic IPv4 Access Control Lists Appendix J Practice for Chapter 28: Fundamentals of IP Version 6 Appendix K Practice for Chapter 30: Implementing IPv6 Addressing on Routers Appendix L Mind Map Solutions Appendix M Study Planner Appendix N Classless Inter-domain Routing Appendix O Route Summarization Appendix P Implementing Point-to-Point WANs Appendix Q Topics from Previous Editions Appendix R Exam Topics Cross Reference

slide 13:

ptg17246291 xi Contents Introduction xxxiv Your Study Plan 2 Part I Networking Fundamentals 13 Chapter 1 Introduction to TCP/IP Networking 14 “Do I Know This Already” Quiz 14 Foundation Topics 17 Perspectives on Networking 17 TCP/IP Networking Model 18 History Leading to TCP/IP 19 Overview of the TCP/IP Networking Model 20 TCP/IP Application Layer 22 HTTP Overview 22 HTTP Protocol Mechanisms 22 TCP/IP Transport Layer 23 TCP Error Recovery Basics 23 Same-Layer and Adjacent-Layer Interactions 24 TCP/IP Network Layer 25 Internet Protocol and the Postal Service 25 Internet Protocol Addressing Basics 27 IP Routing Basics 27 TCP/IP Link Layer Data Link Plus Physical 28 TCP/IP Model and Terminology 30 Comparing the Original and Modern TCP/IP Models 30 Data Encapsulation Terminology 30 Names of TCP/IP Messages 31 OSI Networking Model 32 Comparing OSI and TCP/IP 32 Describing Protocols by Referencing the OSI Layers 33 OSI Layers and Their Functions 33 OSI Layering Concepts and Benefits 35 OSI Encapsulation Terminology 35 Chapter 2 Fundamentals of Ethernet LANs 38 “Do I Know This Already” Quiz 38 Foundation Topics 40 An Overview of LANs 40 Typical SOHO LANs 41 Typical Enterprise LANs 42 The Variety of Ethernet Physical Layer Standards 43 Consistent Behavior over All Links Using the Ethernet Data Link Layer 44

slide 14:

ptg17246291 xii CCENT/CCNA ICND1 100-105 Official Cert Guide Building Physical Ethernet Networks with UTP 45 Transmitting Data Using Twisted Pairs 45 Breaking Down a UTP Ethernet Link 46 UTP Cabling Pinouts for 10BASE-T and 100BASE-T 48 Straight-Through Cable Pinout 48 Choosing the Right Cable Pinouts 50 UTP Cabling Pinouts for 1000BASE-T 51 Sending Data in Ethernet Networks 51 Ethernet Data-Link Protocols 51 Ethernet Addressing 52 Identifying Network Layer Protocols with the Ethernet Type Field 54 Error Detection with FCS 55 Sending Ethernet Frames with Switches and Hubs 55 Sending in Modern Ethernet LANs Using Full Duplex 55 Using Half Duplex with LAN Hubs 56 Chapter 3 Fundamentals of WANs 60 “Do I Know This Already” Quiz 60 Foundation Topics 62 Leased-Line WANs 62 Positioning Leased Lines with LANs and Routers 62 Physical Details of Leased Lines 63 Leased-Line Cabling 64 Building a WAN Link in a Lab 66 Data-Link Details of Leased Lines 66 HDLC Basics 67 How Routers Use a WAN Data Link 68 Ethernet as a WAN Technology 69 Ethernet WANs that Create a Layer 2 Service 70 How Routers Route IP Packets Using Ethernet Emulation 71 Accessing the Internet 72 The Internet as a Large WAN 72 Internet Access WAN Links 73 Digital Subscriber Line 74 Cable Internet 76 Chapter 4 Fundamentals of IPv4 Addressing and Routing 78 “Do I Know This Already” Quiz 78 Foundation Topics 81 Overview of Network Layer Functions 81 Network Layer Routing Forwarding Logic 81 Host Forwarding Logic: Send the Packet to the Default Router 82 R1 and R2’s Logic: Routing Data Across the Network 83 R3’s Logic: Delivering Data to the End Destination 83

slide 15:

ptg17246291 xiii How Network Layer Routing Uses LANs and WANs 83 IP Addressing and How Addressing Helps IP Routing 84 Routing Protocols 85 IPv4 Addressing 86 Rules for IP Addresses 86 Rules for Grouping IP Addresses 87 Class A B and C IP Networks 88 The Actual Class A B and C IP Networks 90 IP Subnetting 91 IPv4 Routing 93 IPv4 Host Routing 93 Router Forwarding Decisions and the IP Routing Table 94 A Summary of Router Forwarding Logic 94 A Detailed Routing Example 94 IPv4 Routing Protocols 96 Other Network Layer Features 98 Using Names and the Domain Name System 98 The Address Resolution Protocol 99 ICMP Echo and the ping Command 100 Chapter 5 Fundamentals of TCP/IP Transport and Applications 102 “Do I Know This Already” Quiz 102 Foundation Topics 104 TCP/IP Layer 4 Protocols: TCP and UDP 104 Transmission Control Protocol 105 Multiplexing Using TCP Port Numbers 106 Popular TCP/IP Applications 108 Connection Establishment and Termination 110 Error Recovery and Reliability 111 Flow Control Using Windowing 112 User Datagram Protocol 113 TCP/IP Applications 114 Uniform Resource Identifiers 114 Finding the Web Server Using DNS 115 Transferring Files with HTTP 117 How the Receiving Host Identifies the Correct Receiving Application 118 Part I Review 120 Part II Implementing Basic Ethernet LANs 125 Chapter 6 Using the Command-Line Interface 126 “Do I Know This Already” Quiz 126 Foundation Topics 128

slide 16:

ptg17246291 xiv CCENT/CCNA ICND1 100-105 Official Cert Guide Accessing the Cisco Catalyst Switch CLI 128 Cisco Catalyst Switches 128 Accessing the Cisco IOS CLI 129 Cabling the Console Connection 130 Accessing the CLI with Telnet and SSH 133 User and Enable Privileged Modes 133 Password Security for CLI Access from the Console 135 CLI Help Features 136 The debug and show Commands 137 Configuring Cisco IOS Software 138 Configuration Submodes and Contexts 139 Storing Switch Configuration Files 141 Copying and Erasing Configuration Files 143 Chapter 7 Analyzing Ethernet LAN Switching 146 “Do I Know This Already” Quiz 146 Foundation Topics 148 LAN Switching Concepts 148 Overview of Switching Logic 149 Forwarding Known Unicast Frames 150 Learning MAC Addresses 153 Flooding Unknown Unicast and Broadcast Frames 154 Avoiding Loops Using Spanning Tree Protocol 154 LAN Switching Summary 155 Verifying and Analyzing Ethernet Switching 156 Demonstrating MAC Learning 156 Switch Interfaces 158 Finding Entries in the MAC Address Table 159 Managing the MAC Address Table Aging Clearing 161 MAC Address Tables with Multiple Switches 162 Chapter 8 Configuring Basic Switch Management 166 “Do I Know This Already” Quiz 166 Foundation Topics 168 Securing the Switch CLI 168 Securing User Mode and Privileged Mode with Simple Passwords 169 Securing User Mode Access with Local Usernames and Passwords 173 Securing User Mode Access with External Authentication Servers 175 Securing Remote Access with Secure Shell 176 Enabling IPv4 for Remote Access 179 Host and Switch IP Settings 179 Configuring IPv4 on a Switch 181

slide 17:

ptg17246291 xv Configuring a Switch to Learn Its IP Address with DHCP 182 Verifying IPv4 on a Switch 183 Miscellaneous Settings Useful in Lab 184 History Buffer Commands 184 The logging synchronous exec-timeout and no ip domain-lookup Commands 184 Chapter 9 Configuring Switch Interfaces 190 “Do I Know This Already” Quiz 190 Foundation Topics 192 Configuring Switch Interfaces 192 Configuring Speed Duplex and Description 193 Configuring Multiple Interfaces with the interface range Command 195 Administratively Controlling Interface State with shutdown 195 Removing Configuration with the no Command 197 Autonegotiation 198 Autonegotiation Under Working Conditions 198 Autonegotiation Results When Only One Node Uses Autonegotiation 200 Autonegotiation and LAN Hubs 201 Port Security 202 Configuring Port Security 203 Verifying Port Security 205 Port Security Violation Actions 207 Port Security MAC Addresses as Static and Secure but Not Dynamic 207 Part II Review 212 Part III Ethernet LANs: Design VLANs and Troubleshooting 217 Chapter 10 Analyzing Ethernet LAN Designs 218 “Do I Know This Already” Quiz 218 Foundation Topics 220 Analyzing Collision Domains and Broadcast Domains 220 Ethernet Collision Domains 220 10BASE-T with Hub 220 Ethernet Transparent Bridges 221 Ethernet Switches and Collision Domains 222 The Impact of Collisions on LAN Design 223 Ethernet Broadcast Domains 224 Virtual LANs 225 The Impact of Broadcast Domains on LAN Design 226 Analyzing Campus LAN Topologies 227 Two-Tier Campus Design Collapsed Core 227

slide 18:

ptg17246291 xvi CCENT/CCNA ICND1 100-105 Official Cert Guide The Two-Tier Campus Design 227 Topology Terminology Seen Within a Two-Tier Design 228 Three-Tier Campus Design Core 230 Topology Design Terminology 232 Analyzing LAN Physical Standard Choices 233 Ethernet Standards 234 Choosing the Right Ethernet Standard for Each Link 235 Wireless LANs Combined with Wired Ethernet 236 Home Office Wireless LANs 236 Enterprise Wireless LANs and Wireless LAN Controllers 238 Chapter 11 Implementing Ethernet Virtual LANs 242 “Do I Know This Already” Quiz 242 Foundation Topics 244 Virtual LAN Concepts 244 Creating Multiswitch VLANs Using Trunking 246 VLAN Tagging Concepts 246 The 802.1Q and ISL VLAN Trunking Protocols 248 Forwarding Data Between VLANs 249 Routing Packets Between VLANs with a Router 249 Routing Packets with a Layer 3 Switch 251 VLAN and VLAN Trunking Configuration and Verification 252 Creating VLANs and Assigning Access VLANs to an Interface 252 VLAN Configuration Example 1: Full VLAN Configuration 253 VLAN Configuration Example 2: Shorter VLAN Configuration 256 VLAN Trunking Protocol 257 VLAN Trunking Configuration 258 Implementing Interfaces Connected to Phones 262 Data and Voice VLAN Concepts 262 Data and Voice VLAN Configuration and Verification 264 Summary: IP Telephony Ports on Switches 266 Chapter 12 Troubleshooting Ethernet LANs 270 “Do I Know This Already” Quiz 271 Foundation Topics 274 Perspectives on Applying Troubleshooting Methodologies 274 Troubleshooting on the Exams 275 A Deeper Look at Problem Isolation 275 Troubleshooting as Covered in This Book 277 Analyzing Switch Interface Status and Statistics 278 Interface Status Codes and Reasons for Nonworking States 278 Interface Speed and Duplex Issues 279 Common Layer 1 Problems on Working Interfaces 282

slide 19:

ptg17246291 xvii Predicting Where Switches Will Forward Frames 284 Predicting the Contents of the MAC Address Table 284 Analyzing the Forwarding Path 286 Analyzing Port Security Operations on an Interface 287 Troubleshooting Shutdown Mode and Err-disabled Recovery 288 Troubleshooting Restrict and Protect Modes 289 Analyzing VLANs and VLAN Trunks 292 Ensuring That the Right Access Interfaces Are in the Right VLANs 292 Access VLANs Not Being Defined 293 Access VLANs Being Disabled 294 Mismatched Trunking Operational States 294 Part III Review 298 Part IV IP Version 4 Addressing and Subnetting 301 Chapter 13 Perspectives on IPv4 Subnetting 302 “Do I Know This Already” Quiz 302 Foundation Topics 304 Introduction to Subnetting 304 Subnetting Defined Through a Simple Example 305 Operational View Versus Design View of Subnetting 306 Analyze Subnetting and Addressing Needs 306 Rules About Which Hosts Are in Which Subnet 306 Determining the Number of Subnets 308 Determining the Number of Hosts per Subnet 309 One Size Subnet Fits All—Or Not 310 Defining the Size of a Subnet 310 One-Size Subnet Fits All 311 Multiple Subnet Sizes Variable-Length Subnet Masks 312 This Book: One-Size Subnet Fits All Mostly 312 Make Design Choices 313 Choose a Classful Network 313 Public IP Networks 313 Growth Exhausts the Public IP Address Space 314 Private IP Networks 315 Choosing an IP Network During the Design Phase 316 Choose the Mask 316 Classful IP Networks Before Subnetting 316 Borrowing Host Bits to Create Subnet Bits 317 Choosing Enough Subnet and Host Bits 318 Example Design: 172.16.0.0 200 Subnets 200 Hosts 319 Masks and Mask Formats 319 Build a List of All Subnets 320

slide 20:

ptg17246291 xviii CCENT/CCNA ICND1 100-105 Official Cert Guide Plan the Implementation 321 Assigning Subnets to Different Locations 322 Choose Static and Dynamic Ranges per Subnet 323 Chapter 14 Analyzing Classful IPv4 Networks 326 “Do I Know This Already” Quiz 326 Foundation Topics 328 Classful Network Concepts 328 IPv4 Network Classes and Related Facts 328 The Number and Size of the Class A B and C Networks 329 Address Formats 330 Default Masks 331 Number of Hosts per Network 331 Deriving the Network ID and Related Numbers 332 Unusual Network IDs and Network Broadcast Addresses 334 Practice with Classful Networks 334 Practice Deriving Key Facts Based on an IP Address 335 Practice Remembering the Details of Address Classes 335 Additional Practice for This Chapter’s Processes 337 Answers to Earlier Practice Problems 337 Chapter 15 Analyzing Subnet Masks 340 “Do I Know This Already” Quiz 340 Foundation Topics 342 Subnet Mask Conversion 342 Three Mask Formats 342 Converting Between Binary and Prefix Masks 343 Converting Between Binary and DDN Masks 344 Converting Between Prefix and DDN Masks 346 Practice Converting Subnet Masks 346 Identifying Subnet Design Choices Using Masks 347 Masks Divide the Subnet’s Addresses into Two Parts 348 Masks and Class Divide Addresses into Three Parts 349 Classless and Classful Addressing 350 Calculations Based on the IPv4 Address Format 350 Practice Analyzing Subnet Masks 352 Additional Practice for This Chapter’s Processes 354 Answers to Earlier Practice Problems 354 Chapter 16 Analyzing Existing Subnets 356 “Do I Know This Already” Quiz 356

slide 21:

ptg17246291 xix Foundation Topics 358 Defining a Subnet 358 An Example with Network 172.16.0.0 and Four Subnets 358 Subnet ID Concepts 360 Subnet Broadcast Address 361 Range of Usable Addresses 361 Analyzing Existing Subnets: Binary 362 Finding the Subnet ID: Binary 362 Finding the Subnet Broadcast Address: Binary 364 Binary Practice Problems 364 Shortcut for the Binary Process 366 Brief Note About Boolean Math 367 Finding the Range of Addresses 367 Analyzing Existing Subnets: Decimal 368 Analysis with Easy Masks 368 Predictability in the Interesting Octet 369 Finding the Subnet ID: Difficult Masks 370 Resident Subnet Example 1 370 Resident Subnet Example 2 371 Resident Subnet Practice Problems 372 Finding the Subnet Broadcast Address: Difficult Masks 372 Subnet Broadcast Example 1 372 Subnet Broadcast Example 2 373 Subnet Broadcast Address Practice Problems 374 Practice Analyzing Existing Subnets 374 A Choice: Memorize or Calculate 374 Additional Practice for This Chapter’s Processes 375 Answers to Earlier Practice Problems 376 Part IV Review 378 Part V Implementing IPv4 383 Chapter 17 Operating Cisco Routers 384 “Do I Know This Already” Quiz 384 Foundation Topics 386 Installing Cisco Routers 386 Installing Enterprise Routers 386 Cisco Integrated Services Routers 387 Physical Installation 388 Installing Internet Access Routers 389 Enabling IPv4 Support on Cisco Router Interfaces 390 Accessing the Router CLI 390

slide 22:

ptg17246291 xx CCENT/CCNA ICND1 100-105 Official Cert Guide Router Interfaces 391 Interface Status Codes 393 Router Interface IP Addresses 394 Bandwidth and Clock Rate on Serial Interfaces 396 Router Auxiliary Port 398 Chapter 18 Configuring IPv4 Addresses and Static Routes 402 “Do I Know This Already” Quiz 403 Foundation Topics 405 IP Routing 405 IPv4 Routing Process Reference 405 An Example of IP Routing 408 Host Forwards the IP Packet to the Default Router Gateway 409 Routing Step 1: Decide Whether to Process the Incoming Frame 409 Routing Step 2: De-encapsulation of the IP Packet 410 Routing Step 3: Choosing Where to Forward the Packet 410 Routing Step 4: Encapsulating the Packet in a New Frame 411 Routing Step 5: Transmitting the Frame 412 Configuring IP Addresses and Connected Routes 412 Connected Routes and the ip address Command 413 The ARP Table on a Cisco Router 415 Routing Between Subnets on VLANs 415 Configuring Routing to VLANs Using 802.1Q on Routers 416 Configuring Routing to VLANs Using a Layer 3 Switch 420 Configuring Static Routes 422 Static Route Configuration 422 Static Host Routes 424 Static Routes with No Competing Routes 425 Static Routes with Competing Routes 425 Static Default Routes 427 Troubleshooting Static Routes 428 Troubleshooting Incorrect Static Routes that Appear in the IP Routing Table 429 The Static Route Does Not Appear in the IP Routing Table 429 The Correct Static Route Appears but Works Poorly 429 Chapter 19 Learning IPv4 Routes with RIPv2 434 “Do I Know This Already” Quiz 435 Foundation Topics 437 RIP and Routing Protocol Concepts 437 History of Interior Gateway Protocols 437 Comparing IGPs 438 Distance Vector Basics 439

slide 23:

ptg17246291 xxi The Concept of a Distance and a Vector 439 Full Update Messages and Split Horizon 440 Split Horizon 441 Route Poisoning 441 Summarizing RIPv2 Features 442 Core RIPv2 Configuration and Verification 443 Configuring Core RIPv2 Features 443 Understanding the RIP network Command 444 RIP Configuration Example with Many IP Networks 445 RIP Configuration Example with One IP Network 446 RIPv2 Verification 447 Examining RIP Routes in the IP Routing Table 447 Comparing Routing Sources with Administrative Distance 449 Revealing RIP Configuration with the show ip protocols Command 450 Examining the Best RIP Routes Using RIP Database 451 Optional RIPv2 Configuration and Verification 452 Controlling RIP Updates with the passive-interface Command 452 Supporting Multiple Equal-Cost Routes with Maximum Paths 453 Understanding Autosummarization and Discontiguous Classful Networks 454 Verifying Optional RIP Features 456 RIPv2 Default Routes 458 Learning Default Routes Using Static Routes and RIPv2 458 Learning a Default Route Using DHCP 460 Troubleshooting RIPv2 461 Symptoms with Missing and Incorrect network Commands 463 Issues Related to Passive Interfaces 464 Issues Related to auto-summary 465 RIP Issues Caused by Other Router Features 466 Summary of RIP Troubleshooting Issues 466 Chapter 20 DHCP and IP Networking on Hosts 470 “Do I Know This Already” Quiz 471 Foundation Topics 473 Implementing and Troubleshooting DHCP 473 DHCP Concepts 473 Supporting DHCP for Remote Subnets with DHCP Relay 475 Information Stored at the DHCP Server 476 DHCP Server Configuration on Routers 478 IOS DHCP Server Verification 480 Troubleshooting DHCP Services 481 DHCP Relay Agent Configuration Mistakes and Symptoms 481

slide 24:

ptg17246291 xxii CCENT/CCNA ICND1 100-105 Official Cert Guide IOS DHCP Server Configuration Mistakes and Symptoms 482 IP Connectivity from DHCP Relay Agent to DHCP Server 484 LAN Connectivity Between the DHCP Client and Relay Agent 484 Summary of DHCP Troubleshooting 485 Detecting Conflicts with Offered Versus Used Addresses 485 Verifying Host IPv4 Settings 486 IP Address and Mask Configuration 487 Name Resolution with DNS 488 Default Routers 489 IPv4 Address Types 490 Review of Unicast Class A B and C IP Addresses 491 IP Broadcast Addresses 491 IPv4 Multicast Addresses Class D Addresses 492 Comparing and Contrasting IP Address Types 494 Part V Review 498 Part VI IPv4 Design and Troubleshooting 503 Chapter 21 Subnet Design 504 “Do I Know This Already” Quiz 504 Foundation Topics 506 Choosing the Masks to Meet Requirements 506 Review: Choosing the Minimum Number of Subnet and Host Bits 507 No Masks Meet Requirements 508 One Mask Meets Requirements 509 Multiple Masks Meet Requirements 510 Finding All the Masks: Concepts 510 Finding All the Masks: Math 511 Choosing the Best Mask 512 The Formal Process 512 Practice Choosing Subnet Masks 513 Practice Problems for Choosing a Subnet Mask 513 Finding All Subnet IDs 513 First Subnet ID: The Zero Subnet 514 Finding the Pattern Using the Magic Number 515 A Formal Process with Less Than 8 Subnet Bits 515 Example 1: Network 172.16.0.0 Mask 255.255.240.0 517 Example 2: Network 192.168.1.0 Mask 255.255.255.224 518 Finding All Subnets with Exactly 8 Subnet Bits 519 Finding All Subnets with More Than 8 Subnet Bits 520 Process with 9–16 Subnet Bits 520 Process with 17 or More Subnet Bits 522

slide 25:

ptg17246291 xxiii Practice Finding All Subnet IDs 523 Practice Problems for Finding All Subnet IDs 523 Additional Practice for This Chapter’s Processes 524 Answers to Earlier Practice Problems 524 Chapter 22 Variable-Length Subnet Masks 528 “Do I Know This Already” Quiz 528 Foundation Topics 530 VLSM Concepts and Configuration 530 Classless and Classful Routing Protocols 530 VLSM Configuration and Verification 531 Finding VLSM Overlaps 532 Designing Subnetting Plans with VLSM 533 An Example of Finding a VLSM Overlap 534 Practice Finding VLSM Overlaps 536 Adding a New Subnet to an Existing VLSM Design 536 An Example of Adding a New VLSM Subnet 537 Additional Practice for This Chapter’s Processes 539 Answers to Earlier Practice Problems 539 Chapter 23 IPv4 Troubleshooting Tools 542 “Do I Know This Already” Quiz 543 Foundation Topics 543 Problem Isolation Using the ping Command 543 Ping Command Basics 543 Strategies and Results When Testing with the ping Command 544 Testing Longer Routes from Near the Source of the Problem 545 Using Extended Ping to Test the Reverse Route 547 Testing LAN Neighbors with Standard Ping 549 Testing LAN Neighbors with Extended Ping 550 Testing WAN Neighbors with Standard Ping 551 Using Ping with Names and with IP Addresses 552 Problem Isolation Using the traceroute Command 553 traceroute Basics 553 How the traceroute Command Works 554 Standard and Extended traceroute 556 Using traceroute to Isolate the Problem to Two Routers 557

slide 26:

ptg17246291 xxiv CCENT/CCNA ICND1 100-105 Official Cert Guide Telnet and SSH 559 Common Reasons to Use the IOS Telnet and SSH Client 559 IOS Telnet and SSH Examples 560 Chapter 24 Troubleshooting IPv4 Routing 564 “Do I Know This Already” Quiz 565 Foundation Topics 565 Problems Between the Host and the Default Router 565 Root Causes Based on a Host’s IPv4 Settings 566 Ensure IPv4 Settings Correctly Match 566 Mismatched Masks Impact Route to Reach Subnet 567 Typical Root Causes of DNS Problems 569 Wrong Default Router IP Address Setting 570 Root Causes Based on the Default Router’s Configuration 570 DHCP Issues 571 Router LAN Interface and LAN Issues 573 Problems with Routing Packets Between Routers 574 IP Forwarding by Matching the Most Specific Route 575 Using show ip route and Subnet Math to Find the Best Route 575 Using show ip route address to Find the Best Route 577 show ip route Reference 577 Routing Problems Caused by Incorrect Addressing Plans 579 Recognizing When VLSM Is Used or Not 579 Overlaps When Not Using VLSM 579 Overlaps When Using VLSM 581 Configuring Overlapping VLSM Subnets 582 Pointers to Related Troubleshooting Topics 583 Router WAN Interface Status 583 Filtering Packets with Access Lists 584 Part VI Review 586 Part VII IPv4 Services: ACLs and NAT 591 Chapter 25 Basic IPv4 Access Control Lists 592 “Do I Know This Already” Quiz 592 Foundation Topics 594 IPv4 Access Control List Basics 594 ACL Location and Direction 594 Matching Packets 595 Taking Action When a Match Occurs 596 Types of IP ACLs 596 Standard Numbered IPv4 ACLs 597 List Logic with IP ACLs 598 Matching Logic and Command Syntax 599

slide 27:

ptg17246291 xxv Matching the Exact IP Address 599 Matching a Subset of the Address with Wildcards 600 Binary Wildcard Masks 601 Finding the Right Wildcard Mask to Match a Subnet 602 Matching Any/All Addresses 602 Implementing Standard IP ACLs 602 Standard Numbered ACL Example 1 603 Standard Numbered ACL Example 2 604 Troubleshooting and Verification Tips 606 Practice Applying Standard IP ACLs 607 Practice Building access-list Commands 608 Reverse Engineering from ACL to Address Range 608 Additional Practice for This Chapter’s Processes 611 Answers to Earlier Practice Problems 612 Chapter 26 Advanced IPv4 Access Control Lists 614 “Do I Know This Already” Quiz 615 Foundation Topics 616 Extended Numbered IP Access Control Lists 616 Matching the Protocol Source IP and Destination IP 617 Matching TCP and UDP Port Numbers 618 Extended IP ACL Configuration 621 Extended IP Access Lists: Example 1 622 Extended IP Access Lists: Example 2 623 Practice Building access-list Commands 624 Named ACLs and ACL Editing 625 Named IP Access Lists 625 Editing ACLs Using Sequence Numbers 627 Numbered ACL Configuration Versus Named ACL Configuration 629 ACL Implementation Considerations 630 Troubleshooting with IPv4 ACLs 631 Analyzing ACL Behavior in a Network 631 ACL Troubleshooting Commands 633 Example Issue: Reversed Source/Destination IP Addresses 634 Steps 3D and 3E: Common Syntax Mistakes 635 Example Issue: Inbound ACL Filters Routing Protocol Packets 635 ACL Interactions with Router-Generated Packets 637 Local ACLs and a Ping from a Router 637 Router Self-Ping of a Serial Interface IPv4 Address 637 Router Self-Ping of an Ethernet Interface IPv4 Address 638 Answers to Earlier Practice Problems 641

slide 28:

ptg17246291 xxvi CCENT/CCNA ICND1 100-105 Official Cert Guide Chapter 27 Network Address Translation 642 “Do I Know This Already” Quiz 642 Foundation Topics 645 Perspectives on IPv4 Address Scalability 645 CIDR 645 Private Addressing 646 Network Address Translation Concepts 647 Static NAT 648 Dynamic NAT 650 Overloading NAT with Port Address Translation 652 NAT Configuration and Troubleshooting 653 Static NAT Configuration 653 Dynamic NAT Configuration 655 Dynamic NAT Verification 657 NAT Overload PAT Configuration 660 NAT Troubleshooting 662 Part VII Review 666 Part VIII IP Version 6 671 Chapter 28 Fundamentals of IP Version 6 672 “Do I Know This Already” Quiz 672 Foundation Topics 674 Introduction to IPv6 674 The Historical Reasons for IPv6 674 The IPv6 Protocols 676 IPv6 Routing 677 IPv6 Routing Protocols 679 IPv6 Addressing Formats and Conventions 680 Representing Full Unabbreviated IPv6 Addresses 680 Abbreviating and Expanding IPv6 Addresses 681 Representing the Prefix Length of an Address 683 Calculating the IPv6 Prefix Subnet ID 683 Finding the IPv6 Prefix 683 Working with More-Difficult IPv6 Prefix Lengths 685 Additional Practice for This Chapter’s Processes 686 Answers to Earlier Practice Problems 687 Chapter 29 IPv6 Addressing and Subnetting 688 “Do I Know This Already” Quiz 688 Foundation Topics 690 Global Unicast Addressing Concepts 690 A Brief Review of Public and Private IPv4 Addresses 690

slide 29:

ptg17246291 xxvii Review of Public IPv4 Addressing Concepts 690 Review of Private IPv4 Addressing Concepts 692 Public and Private IPv6 Addresses 692 The IPv6 Global Routing Prefix 693 Address Ranges for Global Unicast Addresses 695 IPv6 Subnetting Using Global Unicast Addresses 696 Deciding Where IPv6 Subnets Are Needed 696 The Mechanics of Subnetting IPv6 Global Unicast Addresses 696 Listing the IPv6 Subnet Identifier 698 List All IPv6 Subnets 699 Assign Subnets to the Internetwork Topology 699 Assigning Addresses to Hosts in a Subnet 700 Unique Local Unicast Addresses 701 Subnetting with Unique Local IPv6 Addresses 701 The Need for Globally Unique Local Addresses 702 Chapter 30 Implementing IPv6 Addressing on Routers 704 “Do I Know This Already” Quiz 705 Foundation Topics 706 Implementing Unicast IPv6 Addresses on Routers 706 Static Unicast Address Configuration 707 Configuring the Full 128-Bit Address 707 Enabling IPv6 Routing 708 Verifying the IPv6 Address Configuration 709 Generating a Unique Interface ID Using Modified EUI-64 711 Dynamic Unicast Address Configuration 715 Special Addresses Used by Routers 715 Link-Local Addresses 716 Link-Local Address Concepts 716 Creating Link-Local Addresses on Routers 717 Routing IPv6 with Only Link-Local Addresses on an Interface 718 IPv6 Multicast Addresses 719 Local Scope Multicast Addresses 719 Solicited-Node Multicast Addresses 720 Anycast Addresses 722 Miscellaneous IPv6 Addresses 723 IPv6 Addressing Configuration Summary 723 Additional Practice for This Chapter’s Processes 725 Answers to Earlier Practice Problems 726 Chapter 31 Implementing IPv6 Addressing on Hosts 728 “Do I Know This Already” Quiz 728

slide 30:

ptg17246291 xxviii CCENT/CCNA ICND1 100-105 Official Cert Guide Foundation Topics 730 The Neighbor Discovery Protocol 730 Discovering Routers with NDP RS and RA 731 Discovering Addressing Info for SLAAC with NDP RS and RA 732 Discovering Neighbor Link Addresses with NDP NS and NA 733 Discovering Duplicate Addresses Using NDP NS and NA 734 NDP Summary 735 Dynamic Configuration of Host IPv6 Settings 735 Dynamic Configuration Using Stateful DHCP and NDP 736 Differences Between DHCPv6 and DHCPv4 736 DHCPv6 Relay Agents 737 Using Stateless Address Auto Configuration 739 Building an IPv6 Address Using SLAAC 739 Combining SLAAC with NDP and Stateless DHCP 740 Troubleshooting IPv6 Addressing 741 Verifying Host IPv6 Connectivity from Hosts 741 Verifying Host Connectivity from Nearby Routers 744 Chapter 32 Implementing IPv6 Routing 750 “Do I Know This Already” Quiz 750 Foundation Topics 752 Connected and Local IPv6 Routes 752 Rules for Connected and Local Routes 753 Example of Connected IPv6 Routes 753 Examples of Local IPv6 Routes 755 Static IPv6 Routes 756 Static Routes Using the Outgoing Interface 756 Static Routes Using Next-Hop IPv6 Address 758 Example Static Route with a Global Unicast Next-Hop Address 758 Example Static Route with a Link-Local Next-Hop Address 759 Static Default Routes 760 Static IPv6 Host Routes 761 Floating Static IPv6 Routes 762 Default Routes with SLAAC on Router Interfaces 763 Troubleshooting Static IPv6 Routes 765 Troubleshooting Incorrect Static Routes That Appear in the IPv6 Routing Table 765 The Static Route Does Not Appear in the IPv6 Routing Table 767 Part VIII Review 772 Part IX Network Device Management 777 Chapter 33 Device Management Protocols 778 “Do I Know This Already” Quiz 779 Foundation Topics 780

slide 31:

ptg17246291 xxix System Message Logging Syslog 780 Sending Messages in Real Time to Current Users 780 Storing Log Messages for Later Review 781 Log Message Format 782 Log Message Severity Levels 783 Configuring and Verifying System Logging 784 The debug Command and Log Messages 786 Network Time Protocol NTP 787 Setting the Time and Timezone 788 Implementing NTP Clients Servers and Client/Server Mode 789 NTP Using a Loopback Interface for Better Availability 791 Analyzing Topology Using CDP and LLDP 793 Examining Information Learned by CDP 793 Configuring and Verifying CDP Itself 796 Implementing Link Layer Discovery Protocol 797 Chapter 34 Device Security Features 802 “Do I Know This Already” Quiz 802 Foundation Topics 804 Securing IOS Passwords 804 Encrypting Older IOS Passwords with service password-encryption 805 Encoding the Enable Passwords with Hashes 806 Interactions Between Enable Password and Enable Secret 806 Making the Enable Secret Truly Secret with a Hash 807 Improved Hashes for Cisco’s Enable Secret 808 Hiding the Passwords for Local Usernames 810 Cisco Device Hardening 810 Configuring Login Banners 810 Securing Unused Switch Interfaces 812 Controlling Telnet and SSH Access with ACLs 813 Firewalls 814 Typical Location and Uses of Firewalls 814 Security Zones 815 Chapter 35 Managing IOS Files 820 “Do I Know This Already” Quiz 820 Foundation Topics 822 Managing Cisco IOS Images and Upgrades 822 The IOS File System 822 Upgrading IOS Images 824 Copying a New IOS Image to a Local IOS File System Using TFTP 825 Verifying IOS Code Integrity with MD5 827

slide 32:

ptg17246291 xxx CCENT/CCNA ICND1 100-105 Official Cert Guide Copying Images with FTP 828 Copying Images with SCP 829 The Cisco IOS Software Boot Sequence 830 The Configuration Register 831 How a Router Chooses Which OS to Load 831 Verifying the IOS Image Using the show version Command 833 Password Recovery 835 The General Ideas Behind Cisco Password Recovery/Reset 836 A Specific Password Reset Example 837 Managing Configuration Files 839 Copying and Erasing Configuration Files 839 Traditional Configuration Backup and Restore with the copy Command 840 Alternatives for Configuration Backup and Restore 841 Erasing Configuration Files 843 Initial Configuration Setup Mode 843 Chapter 36 IOS License Management 848 “Do I Know This Already” Quiz 848 Foundation Topics 850 IOS Packaging 850 IOS Images per Model Series and per Software Version/Release 850 Original Packaging: One IOS Image per Feature Set Combination 851 New IOS Packaging: One Universal Image with All Feature Sets 851 IOS Software Activation with Universal Images 852 The Future: Cisco ONE Licensing 854 Managing Software Activation with Cisco License Manager 854 Manually Activating Software Using Licenses 855 Example of Manually Activating a License 857 Showing the Current License Status 857 Adding a Permanent Technology Package License 859 Right-to-Use Licenses 861 Part IX Review 864 Part X Final Review 867 Chapter 37 Final Review 868 Advice About the Exam Event 868 Learn the Question Types Using the Cisco Certification Exam Tutorial 868 Think About Your Time Budget Versus Number of Questions 869 A Suggested Time-Check Method 870 Miscellaneous Pre-Exam Suggestions 870 Exam-Day Advice 871

slide 33:

ptg17246291 xxxi Reserve the Hour After the Exam in Case You Fail 871 Exam Review 872 Practice Subnetting and Other Math-Related Skills 873 Take Practice Exams 874 Practicing Taking the ICND1 Exam 875 Advice on How to Answer Exam Questions 876 Taking Other Practice Exams 877 Find Knowledge Gaps Through Question Review 877 Practice Hands-On CLI Skills 879 Review Mind Maps from Part Review 880 Do Labs 880 Assess Whether You Are Ready to Pass and the Fallacy of Exam Scores 881 Study Suggestions After Failing to Pass 882 Other Study Tasks 883 Final Thoughts 884 Part XI Appendixes 887 Appendix A Numeric Reference Tables 889 Appendix B CCENT/CCNA ICND1 100-105 Exam Updates 895 Glossary 897 Index 928 DVD Appendixes Appendix C Answers to the “Do I Know This Already” Quizzes Appendix D Practice for Chapter 14: Analyzing Classful IPv4 Networks Appendix E Practice for Chapter 15: Analyzing Subnet Masks Appendix F Practice for Chapter 16: Analyzing Existing Subnets Appendix G Practice for Chapter 21: Subnet Design Appendix H Practice for Chapter 22: Variable-Length Subnet Masks Appendix I Practice for Chapter 25: Basic IPv4 Access Control Lists Appendix J Practice for Chapter 28: Fundamentals of IP Version 6 Appendix K Practice for Chapter 30: Implementing IPv6 Addressing on Routers Appendix L Mind Map Solutions Appendix M Study Planner Appendix N Classless Inter-domain Routing Appendix O Route Summarization Appendix P Implementing Point-to-Point WANs Appendix Q Topics from Previous Editions Appendix R Exam Topics Cross Reference

slide 34:

ptg17246291 xxxii CCENT/CCNA ICND1 100-105 Official Cert Guide Reader Services To access additional content for this book simply register your product. To start the registration process go to www.ciscopress.com/register and log in or create an account. Enter the product ISBN 9781587205804 and click Submit. After the process is complete you will find any available bonus content under Registered Products. Be sure to check the box that you would like to hear from us to receive exclusive dis- counts on future editions of this product.

slide 35:

ptg17246291 xxxiii Icons Used in This Book Printer PC Laptop Server Phone IP Phone Router Switch Frame Relay Switch Cable Modem Access Point ASA DSLAM CSU/DSU Hub PIX Firewall Bridge Network Cloud Ethernet Connection Virtual Circuit Serial Line Ethernet WAN WAN Switch Layer 3 Switch Wireless Command Syntax Conventions The conventions used to present command syntax in this book are the same conven- tions used in the IOS Command Reference. The Command Reference describes these conventions as follows: ■ Boldface indicates commands and keywords that are entered literally as shown. In actual configuration examples and output not general command syntax boldface indicates commands that are manually input by the user such as a show command. ■ Italic indicates arguments for which you supply actual values. ■ Vertical bars | separate alternative mutually exclusive elements. ■ Square brackets indicate an optional element. ■ Braces indicate a required choice. ■ Braces within brackets indicate a required choice within an optional element.

slide 36:

ptg17246291 Introduction About the Exams Congratulations If you’re reading far enough to look at this book’s Introduction you’ve probably already decided to go for your Cisco certification. If you want to succeed as a technical person in the networking industry at all you need to know Cisco. Cisco has a ridiculously high market share in the router and switch marketplace with more than 80 percent market share in some markets. In many geographies and markets around the world networking equals Cisco. If you want to be taken seriously as a network engineer Cisco certification makes perfect sense. The Exams to Achieve CCENT and CCNA RS Cisco announced changes to the CCENT and CCNA Routing and Switching certifications and the related 100-105 ICND1 200-105 ICND2 and 200-125 CCNA exams early in the year 2016. Most everyone new to Cisco certifications begins with either CCENT or CCNA Routing and Switching CCNA RS. However the paths to certification are not quite obvi- ous at first. The CCENT certification requires a single step: pass the ICND1 exam. Simple enough. Cisco gives you two options to achieve CCNA RS certification as shown in Figure I-1: pass both the ICND1 and ICND2 exams or just pass the CCNA exam. Both paths cover the same exam topics but the two-exam path does so spread over two exams rather than one. You also pick up the CCENT certification by going through the two-exam path but you do not when working through the single-exam option. 100-105 ICND1 200-105 ICND2 200-125 CCNA CCENT CCNA Routing and Switching CCNA RS Figure I-1 Cisco Entry-Level Certifications and Exams Note that Cisco has begun referencing some exams with a version number on some of their web pages. If that form holds true the exams in Figure I-1 will likely be called version 3 or v3 for short. Historically the 200-125 CCNA RS exam is the seventh separate version of the exam which warrants a different exam number dating back to 1998. To make sure you reference the correct exam when looking for information using forums and registering for the test just make sure to use the correct exam number as shown in the figure. Types of Questions on the Exams The ICND1 ICND2 and CCNA exams all follow the same general format. At the test- ing center you sit in a quiet room with a PC. Before the exam timer begins you have a chance to do a few other tasks on the PC for instance you can take a sample quiz just to get accustomed to the PC and the testing engine. Anyone who has user-level skills in

slide 37:

ptg17246291 Introduction xxxv getting around a PC should have no problems with the testing environment. The question types are ■ Multiple-choice single-answer ■ Multiple-choice multiple-answer ■ Testlet one scenario with multiple multi-choice questions ■ Drag-and-drop ■ Simulated lab sim ■ Simlet Before taking the test learn the exam user interface by using the Cisco Exam Tutorial. To find the Cisco Certification Exam Tutorial search for “exam tutorial” at www.cisco.com. This tool walks through each type of question Cisco may ask on the exam. Although the first four types of questions in the list should be somewhat familiar from other tests in school the last two are more common to IT tests and Cisco exams in particu- lar. Both use a network simulator to ask questions so that you control and use simulated Cisco devices. In particular: Sim questions: You see a network topology a lab scenario and can access the devices. Your job is to fix a problem with the configuration. Simlet questions: This style combines sim and testlet question formats. Like a sim ques- tion you see a network topology a lab scenario and can access the devices. However like a testlet you also see multiple multiple-choice questions. Instead of changing/fixing the configuration you answer questions about the current state of the network. These two question styles with the simulator give Cisco the ability to test your configura- tion skills with sim questions and your verification and troubleshooting skills with simlet questions. What’s on the CCNA Exams—And What’s in the Book Ever since I was in grade school whenever the teacher announced that we were having a test soon someone would always ask “What’s on the test” Even in college people would try to get more information about what would be on the exams. At heart the goal is to know what to study hard what to study a little and what to not study at all. You can find out more about what’s on the exam from two primary sources: this book and from the Cisco website. The Cisco Published Exam Topics First Cisco tells the world the specific topics on each of their exams. Cisco wants the pub- lic to know both the variety of topics and an idea about the kinds of knowledge and skills required for each topic for every Cisco certification exam. Just go to www.cisco.com/go/ certifications look for the CCENT and CCNA Routing and Switching pages and navigate until you see the exam topics in Appendix R “Exam Topic Cross Reference.” This PDF appendix lists two cross references: one with a list of the exam topics and the chapters that include something about each topic as well as the reverse: a list of chapters with the exam topics included in each chapter.

slide 38:

ptg17246291 xxxvi CCENT/CCNA ICND1 100-105 Official Cert Guide Cisco does more than just list the topic for example IPv4 addressing but they also list the depth to which you must master the topic. The primary exam topics each list one or more verbs that describe the skill level required. For example consider the following exam topic which describes one of the most important topics in both CCENT and CCNA RS: Configure verify and troubleshoot IPv4 addressing and subnetting Note that this one exam topic has three verbs configure verify and troubleshoot. So you should be able to not only configure IPv4 addresses and subnets but you should under- stand them well enough to verify that the configuration works and to troubleshoot prob- lems when it is not working. And if to do that you need to understand concepts and you need to have other knowledge those details are implied. The exam questions will attempt to assess whether you can configure verify and troubleshoot. Note that the list of exam topics provides a certain level of depth. For example the ICND1 100-105 exam topic list has 41 primary exam topics topics with verbs plus additional sub- topics that further define that technology area. You should take the time to not only read the exam topics but read the short material above the exam topics as listed at the Cisco web page for each certification and exam. Look for notices about the use of unscored items and the fact that Cisco intends the exam topics to be a set of general guidelines for the exams. This Book: About the Exam Topics This book provides a complete study system for the Cisco published exam topics for the ICND1 100-105 exam. All the topics in this book either directly relate to some ICND1 exam topic or provide more basic background knowledge for some exam topic. The scope of the book is based on the exam topics. For those of you thinking more specifically about the CCNA RS certification and the CCNA 200-125 single-exam path to CCNA this book covers about one-half of the CCNA exam topics. The ICND1 book and ICND1 100-105 exam topics covers about half of the topics listed for the CCNA 200-125 exam and the ICND2 book and the ICND2 200-105 exam topics cover the other half. In short for content CCNA ICND1 + ICND2. Book Features This book and the similar CCNA Routing and Switching ICND2 200-105 Official Cert Guide go beyond what you would find in a simple technology book. These books give you a study system designed to help you not only learn facts but also to develop the skills need to pass the exams. To do that in the technology chapters of the book about three-quarters of the chapter is about the technology and about one-quarter is for the related study features. The “Foundation Topics” section of each chapter contains rich content to explain the topics on the exam and to show many examples. This section makes extensive use of figures with lists and tables for comparisons. It also highlights the most important topics in each chapter as key topics so you know what to master first in your study. Most of the book’s features tie in some way to the need to study beyond simply reading the “Foundation Topics” section of each chapter. The rest of this section works through these book features. And because the book organizes your study by chapter and then by part a part contains multiple chapters and then a final review at the end of the book this Introduction discusses the book features introduced by chapter part and for final review.

slide 39:

ptg17246291 Introduction xxxvii Chapter Features and How to Use Each Chapter Each chapter of this book is a self-contained short course about one small topic area orga- nized for reading and study as follows: “Do I Know This Already” quizzes: Each chapter begins with a prechapter quiz. Foundation Topics: This is the heading for the core content section of the chapter. Chapter Review: This section includes a list of study tasks useful to help you remember concepts connect ideas and practice skills-based content in the chapter. Figure I-2 shows how each chapter uses these three key elements. You start with the DIKTA quiz. You can use the score to determine whether you already know a lot or not so much and determine how to approach reading the Foundation Topics that is the technology content in the chapter. When finished use the chapter review tasks to start working on mastering your memory of the facts and skills with configuration verification and trouble- shooting. Take Quiz 1 In-Chapter or... 2 Companion Website 3 DVD High Score Skim Foundation Topics Low Score Read Foundation Topics Foundation Topics Chapter Review DIKTA Quiz Figure I-2 Three Primary Tasks for a First Pass Through Each Chapter In addition to these three main chapter features each “Chapter Review” section uses a vari- ety of other book features including the following: ■ Review Key Topics: Inside the “Foundation Topics” section the Key Topic icon appears next to the most important items for the purpose of later review and mastery. While all content matters some is of course more important to learn or needs more review to master so these items are noted as key topics. The chapter review lists the key topics in a table scan the chapter for these items to review them. ■ Complete Tables from Memory: Instead of just rereading an important table of informa- tion some tables have been marked as memory tables. These tables exist in the Memory Table app that is available on the DVD and from the companion website. The app shows the table with some content removed and then reveals the completed table so you can work on memorizing the content. ■ Key Terms You Should Know: You do not need to be able to write a formal definition of all terms from scratch. However you do need to understand each term well enough to understand exam questions and answers. The chapter review lists the key terminology from the chapter. Make sure you have a good understanding of each term and use the DVD Glossary to cross-check your own mental definitions. ■ Labs: Many exam topics use verbs list “configure” “verify” and “troubleshoot” all these refer to skills you should practice at the user interface CLI of a router or switch. The chapter review refers you to these other tools. The Introduction’s upcoming section titled “About Building Hands-On Skills” discusses your options.

slide 40:

ptg17246291 xxxviii CCENT/CCNA ICND1 100-105 Official Cert Guide ■ Command References: Some book chapters cover a large amount of router and switch commands. The chapter review includes reference tables for the command used in that chapter along with an explanation. Use these tables for reference but also use them for study—just cover one column of the table and see how much you can remember and complete mentally. ■ Review DIKTA Questions: Although you have already seen the DIKTA questions from the chapters in a part re-answering those questions can prove a useful way to review facts. The part review suggests that you repeat the DIKTA questions but using the Pearson IT Certification Practice Test PCPT exam software that comes with the book for extra practice in answering multiple choice questions on a computer. ■ Subnetting and Other Process Exercises: Many chapters in the ICND1 book ask you to perform various tasks that use math or use a particular process. The chapter review asks you to do additional practice problems as found in DVD-only PDF appendixes. Part Features and How to Use Part Review The book organizes the chapters into parts. Each part contains a number of related chapters. Figure I-3 lists the titles of the parts and the chapters in those parts by chapter number. Ethernet LANs: Design VLANs and Troubleshooting 10-12 Implementing Basic Ethernet LANs 6-9 Network Device Management 33-36 IP Version 6 28-32 IPv4 Addressing and Subnetting 13-16 Implementing IPv4 17-20 IPv4 Design and Troubleshooting 21-24 IPv4 Services: ACLs and NAT 25-27 2 9 3 4 5 6 7 8 1 Network Fundamentals 1-5 Figure I-3 The Book Parts by Title and Chapter Numbers in Each Part Each book part ends with a “Part Review” section that contains a list of activities for study and review much like the “Chapter Review” section at the end of each chapter. However because the part review takes place after completing a number of chapters the part review includes some tasks meant to help pull the ideas together from this larger body of work. The following list explains the types of tasks added to part review beyond the types men- tioned for chapter review: ■ Answer Part Review Questions: The books comes with exam software and databases on questions. One database holds questions written specifically for part review. These ques- tions tend to connect multiple ideas together to help you think about topics from mul- tiple chapters and to build the skills needed for the more challenging analysis questions on the exams. ■ Mind Maps: Mind maps are graphical organizing tools that many people find useful when learning and processing how concepts fit together. The process of creating mind maps helps you build mental connections. The part review elements make use of mind maps in several ways: to connect concepts and the related configuration commands to connect show commands and the related networking concepts and even to connect ter- minology. For more information about mind maps see the section “About Mind Maps.”

slide 41:

ptg17246291 Introduction xxxix ■ Labs: The “Part Review” section will direct you to the kinds of lab exercises you should do with your chosen lab product labs that would be more appropriate for this stage of study and review. Check out the section “About Building Hands-On Skills” for informa- tion about lab options. In addition to these tasks many “Part Review” sections have you perform other tasks with book features mentioned in the “Chapter Review” section: repeating DIKTA quiz questions reviewing key topics and doing more lab exercises. Final Review The “Final Review” chapter at the end of this book lists a series of preparation tasks that you can best use for your final preparation before taking the exam. The “Final Review” chapter focuses on a three-part approach to helping you pass: practicing your skills prac- ticing answering exam questions and uncovering your weak spots. To that end the “Final Review” chapter uses the same familiar book features discussed for the chapter review and part review elements along with a much larger set of practice questions. Other Features In addition to the features in each of the core chapters this book as a whole has additional study resources including the following: ■ DVD-based practice exam: The companion DVD contains the powerful Pearson IT Certification Practice Test PCPT exam engine. You can take simulated ICND1 exams with the DVD and activation code included in this book. You can take simulated ICND2 and CCNA RS exams with the DVD in the CCNA Routing and Switching ICND2 200-105 Official Cert Guide. ■ CCENT ICND1 100-105 Network Simulator Lite: This lite version of the best-selling CCNA Network Simulator from Pearson provides you with a means right now to expe- rience the Cisco command-line interface CLI. No need to go buy real gear or buy a full simulator to start learning the CLI. Just install it from the DVD in the back of this book. ■ eBook: If you are interested in obtaining an eBook version of this title we have included a special offer on a coupon card inserted in the DVD sleeve in the back of the book. This offer enables you to purchase the CCENT/CCNA ICND1 100-105 Official Cert Guide Premium Edition eBook and Practice Test at a 70 percent discount off the list price. In addition to three versions of the eBook PDF for reading on your computer EPUB for reading on your tablet mobile device or Nook or other eReader and Mobi the native Kindle version you also receive additional practice test questions and enhanced practice test features. ■ Subnetting videos: The companion DVD contains a series of videos that show you how to calculate various facts about IP addressing and subnetting in particular using the shortcuts described in this book. ■ Subnetting practice: The companion DVD contains five appendixes D–H with a set of subnetting practice problems and answers. This is a great resource to practice building subnetting skills. You can also do these same practice problems with applications that you can access from the DVD or the companion web site.

slide 42:

ptg17246291 xl CCENT/CCNA ICND1 100-105 Official Cert Guide ■ Other practice: The companion DVD contains four other appendixes I–K that each contain other practice problems related to a particular chapter from the book. Use these for more practice on the particulars with some of the math- and process-oriented activi- ties in the chapters. You can also do these same practice problems with applications that you can access from the DVD or the companion website. ■ Mentoring videos: The DVD included with this book includes four other instructional videos about the following topics: switch basics CLI navigation router configuration and VLANs. ■ Companion website: The website www.ciscopress.com/title/9781587205804 posts up- to-the-minute materials that further clarify complex exam topics. Check this site regu- larly for new and updated postings written by the author that provide further insight into the more troublesome topics on the exam. ■ PearsonITCertification.com: The website www.pearsonitcertification.com is a great resource for all things IT-certification related. Check out the great CCNA articles vid- eos blogs and other certification preparation tools from the industry’s best authors and trainers. ■ CCNA Simulator: If you are looking for more hands-on practice you might want to consider purchasing the CCNA Network Simulator. You can purchase a copy of this software from Pearson at http://pearsonitcertification.com/networksimulator or other retail outlets. To help you with your studies I have created a mapping guide that maps each of the labs in the simulator to the specific sections in these CCNA cert guides. You can get this mapping guide for free on the Extras tab of the companion website. ■ Author’s website and blogs: The author maintains a website that hosts tools and links useful when studying for CCENT and CCNA. The site lists information to help you build your own lab study pages that correspond to each chapter of this book and the ICND1 book and links to the author’s CCENT Skills blog and CCNA Skills blog. Start at www.certskills.com look to blog.certskills.com for a page about the blogs in particu- lar with links to the pages with the labs related to this book. A Big New Feature: Review Applications One of the single biggest additions to this edition of the book is the addition of study apps for many of the chapter review activities. In the past all chapter review activities use the book chapter or the chapter plus a DVD-only appendix. Readers tell us they find that con- tent useful but the content is static. This book and the CCNA Routing and Switching ICND2 200-105 Official Cert Guide are the first Cisco Press Cert Guides with extensive interactive applications. Basically most every activity that can be done at chapter review can now be done with an application. The applications can be found both on the DVD that comes with the book and on the book’s companion website. The advantages of using these apps are as follows: ■ Easier to use: Instead of having to print out copies of the appendixes and do the work on paper these new apps provide you with an easy to use interactive experience that you can easily run over and over. ■ Convenient: When you have a spare 5–10 minutes go to the book’s website and review content from one of your recently finished chapters.

slide 43:

ptg17246291 Introduction xli ■ Untethered from Book/DVD: Because these apps are available on the book’s companion web page in addition to the DVD you can access your review activities from anywhere—no need to have the book or DVD with you. ■ Good for tactile learners: Sometimes looking at a static page after reading a chapter lets your mind wander. Tactile learners may do better by at least typing answers into an app or clicking inside an app to navigate to help keep you focused on the activity. Our in-depth reader surveys show that readers who use the chapter review tools like them but that not everyone uses the “Chapter Review” sections consistently. So we want to increase the number of people using the review tools and make them both more useful and more interesting. Table I-1 summarizes these new applications and the traditional book fea- tures that cover the same content. Table I-1 Book Features with Both Traditional and App Options Feature Traditional App Key Topic Table with list flip pages to find Key Topics Table app Config Checklist Just one of many types of key topics Config Checklist app Memory Table Two static PDF appendixes one with sparse tables for you to complete one with completed tables Memory Table app Key Terms Listed in each “Chapter Review” section with the Glossary in the back of the book Glossary Flash Cards app Subnetting Practice Appendixes D–H with practice problems and answers A variety of apps one per problem type Other Practice Appendixes I–K with practice problems and answers A variety of apps one per problem type How to Get the Electronic Elements of This Book Traditionally all chapter review activities use the book chapter plus appendixes with the appendixes often being located on the DVD. But most of that content is static: useful but static. If you buy the print book and have a DVD drive you have all the content on the DVD. Just spin the DVD and use the disk menu that should automatically start to explore all content. If you buy the print book but do not have a DVD drive you can get the DVD files by reg- istering your book on the Cisco Press website. To do so simply go to www.ciscopress.com/ register and enter the ISBN of the print book: 9781587205804. After you have registered your book go to your account page and click the Registered Products tab. From there click the Access Bonus Content link to get access to the book’s companion website. If you buy the Premium Edition eBook and Practice Test from Cisco Press your book will automatically be registered on your account page. Simply go to your account page click the Registered Products tab and select Access Bonus Content to access the book’s companion website.

slide 44:

ptg17246291 xlii CCENT/CCNA ICND1 100-105 Official Cert Guide If you buy the eBook from some other bookseller the very last page of your eBook file will contain instructions for how to register the book and access the companion website. The steps are the same as noted earlier for those who buy the print book but do not have a DVD drive. Book Organization Chapters and Appendixes This book contains 36 core chapters Chapters 1 through 36 with Chapter 37 as the “Final Review” chapter. Each core chapter covers a subset of the topics on the ICND1 exam. The core chapters are organized into sections. The core chapters cover the following topics: ■ Part I: Networking Fundamentals ■ Chapter 1 “Introduction to TCP/IP Networking” introduces the central ideas and terms used by TCP/IP and contrasts the TCP/IP networking model with the OSI model. ■ Chapter 2 “Fundamentals of Ethernet LANs” introduces the concepts and terms used when building Ethernet LANs. ■ Chapter 3 “Fundamentals of W ANs” covers the concepts and terms used for the data link layer for W ANs including HDLC. ■ Chapter 4 “Fundamentals of IPv4 Addressing and Routing”: IP is the main network layer protocol for TCP/IP . This chapter introduces the basics of IPv4 including IPv4 addressing and routing. ■ Chapter 5 “Fundamentals of TCP/IP Transport and Applications”: This chapter completes most of the detailed discussion of the upper two layers of the TCP/IP model transport and application focusing on TCP and applications. ■ Part II: Implementing Basic Ethernet LANs ■ Chapter 6 “Using the Command-Line Interface” explains how to access the text- based user interface of Cisco Catalyst LAN switches. ■ Chapter 7 “ Analyzing Ethernet LAN Switching” shows how to use the Cisco CLI to verify the current status of an Ethernet LAN and how it switches Ethernet frames. ■ Chapter 8 “Confi guring Basic Switch Management” explains how to confi gure Cisco switches for basic management features such as remote access using T elnet and SSH. ■ Chapter 9 “Confi guring Switch Interfaces” shows how to confi gure a variety of switch features that apply to interfaces including duplex/speed and port security. ■ Part III: Ethernet LANs: Design VLANs and Troubleshooting ■ Chapter 10 “Analyzing Ethernet LAN Designs” examines various ways to design Ethernet LANs discussing the pros and cons and explains common design terminology. ■ Chapter 11 “Implementing Ethernet Virtual LANs”: This chapter explains the concepts and confi guration surrounding virtual LANs including VLAN trunking. ■ Chapter 12 “Troubleshooting Ethernet LANs” focuses on how to tell whether the switch is doing what it is supposed to be doing mainly through the use of show commands.

slide 45:

ptg17246291 Introduction xliii ■ Part IV: IP Version 4 Addressing and Subnetting ■ Chapter 13 “Perspectives on IPv4 Subnetting” walks you through the entire concept of subnetting from starting with a Class A B or C network to a completed subnetting design as implemented in an enterprise IPv4 network. ■ Chapter 14 “ Analyzing Classful IPv4 Networks”: IPv4 addresses originally fell into several classes with unicast IP addresses being in Class A B and C. This chapter explores all things related to address classes and the IP network concept created by those classes. ■ Chapter 15 “ Analyzing Subnet Masks” shows how an engineer can analyze the key facts about a subnetting design based on the subnet mask. This chapter shows how to look at the mask and IP network to determine the size of each subnet and the number of subnets. ■ Chapter 16 “ Analyzing Existing Subnets”: Most troubleshooting of IP connectivity problems starts with an IP address and mask. This chapter shows how to take those two facts and fi nd key facts about the IP subnet in which that host resides. ■ Part V: Implementing IPv4 ■ Chapter 17 “Operating Cisco Routers” is like Chapter 8 focusing on basic device management but it focuses on routers instead of switches. ■ Chapter 18 “Confi guring IPv4 Addresses and Static Routes” discusses how to add IPv4 address confi guration to router interfaces and how to confi gure static IPv4 routes. ■ Chapter 19 “Learning IPv4 Routes with RIPv2” explains how routers work together to fi nd all the best routes to each subnet using a routing protocol. This chapter also shows how to confi gure the RIPv2 routing protocol for use with IPv4. ■ Chapter 20 “DHCP and IP Networking on Hosts” discusses how hosts can be con- fi gured with their IPv4 settings and how they can learn those settings with DHCP . ■ Part VI: IPv4 Design and Troubleshooting ■ Chapter 21 “Subnet Design” takes a design approach to subnetting. This chapter begins with a classful IPv4 network and asks why a particular mask might be chosen and if chosen what subnet IDs exist. ■ Chapter 22 “Variable-Length Subnet Masks” moves away from the assumption of one subnet mask per network to multiple subnet masks per network—which makes subnetting math and processes much more challenging. This chapter explains those challenges. ■ Chapter 23 “IPv4 Troubleshooting Tools” focuses on how to use two key trouble- shooting tools to fi nd routing problems: the ping and traceroute commands. ■ Chapter 24 “Troubleshooting IPv4 Routing” looks at the most common IPv4 prob- lems and how to fi nd the root causes of those problems when troubleshooting. ■ Part VII: IPv4 Services: ACLs and NAT ■ Chapter 25 “Basic IPv4 Access Control Lists”: This chapter examines how standard IP ACLs can fi lter packets based on the source IP address so that a router will not forward the packet.

slide 46:

ptg17246291 xliv CCENT/CCNA ICND1 100-105 Official Cert Guide ■ Chapter 26 “ Advanced IPv4 Access Control Lists”: This chapter examines both named and numbered ACLs and both standard and extended IP ACLs. ■ Chapter 27 “Network Address Translation” works through the complete concept confi guration verifi cation and troubleshooting sequence for the router NAT feature including how it helps conserve public IPv4 addresses. ■ Part VIII: IP Version 6 ■ Chapter 28 “Fundamentals of IP Version 6” discusses the most basic concepts of IP version 6 focusing on the rules for writing and interpreting IPv6 addresses. ■ Chapter 29 “IPv6 Addressing and Subnetting” works through the two branches of unicast IPv6 addresses—global unicast addresses and unique local addresses—that act somewhat like IPv4 public and private addresses respectively. ■ Chapter 30 “Implementing IPv6 Addressing on Routers” shows how to confi gure IPv6 routing and addresses on routers while discussing a variety of special IPv6 addresses. ■ Chapter 31 “Implementing IPv6 Addressing on Hosts” mirrors Chapter 20’s discus- sions of IPv4 on hosts while adding details of how IPv6 uses Stateless Address Auto Confi guration SLAAC. ■ Chapter 32 “Implementing IPv6 Routing” shows how to add static routes to an IPv6 router’s routing table. ■ Part IX: Network Device Management ■ Chapter 33 “Device Management Protocols” discusses the concepts and confi gura- tion of some common network management tools: syslog NTP CDP and LLDP . ■ Chapter 34 “Device Security Features” takes the discussion of device passwords a step deeper and examines how to better secure devices through device hardening. ■ Chapter 35 “Managing IOS Files” explains the IOS fi le system focusing on key fi les like the IOS and confi guration fi les. The chapter shows how to upgrade IOS and to backup/restore the confi guration fi le. ■ Chapter 36 “IOS License Management” discusses the Cisco per-device license man- agement practices through the use of PAK licensing. ■ Part X: Final Review ■ Chapter 37 “Final Review” suggests a plan for fi nal preparation after you have fi n- ished the core parts of the book. ■ Part XI: Appendixes In Print ■ Appendix A “Numeric Reference Tables” lists several tables of numeric information including a binary-to-decimal conversion table and a list of powers of 2. ■ Appendix B “CCENT/CCNA ICND1 100-105 Exam Updates” is a place for the au- thor to add book content mid-edition. Always check online for the latest PDF version of this appendix the appendix lists download instructions. ■ The Glossary contains defi nitions for all the terms listed in the “Key Terms Y ou Should Know” sections at the conclusion of Chapters 1 through 36.

slide 47:

ptg17246291 Introduction xlv ■ Part XII: DVD Appendixes The following appendixes are available in digital format on the DVD that accompanies this book: ■ Appendix C “ Answers to the ‘Do I Know This Already’ Quizzes” includes the explanations to all the questions from Chapters 1 through 36. ■ Appendix D “Practice for Chapter 14: Analyzing Classful IPv4 Networks” ■ Appendix E “Practice for Chapter 15: Analyzing Subnet Masks” ■ Appendix F “Practice for Chapter 16: Analyzing Existing Subnets” ■ Appendix G “Practice for Chapter 21: Subnet Design” ■ Appendix H “Practice for Chapter 22: Variable-Length Subnet Masks” ■ Appendix I “Practice for Chapter 25: Basic IPv4 Access Control Lists” ■ Appendix J “Practice for Chapter 28: Fundamentals of IP Version 6” ■ Appendix K “Practice for Chapter 30: Implementing IPv6 Addressing on Routers” ■ Appendix L “Mind Map Solutions” shows an image of sample answers for all the part-ending mind map exercises. ■ Appendix M “Study Planner” is a spreadsheet with major study milestones where you can track your progress through your study. ■ Appendix N “Classless Inter-domain Routing” is an extra chapter for anyone inter- ested in reading more about the concepts terminology and math related to CIDR. ■ Appendix O “Route Summarization” is a copy of a chapter that was in the previous edition of this book but was removed for this edition. It is included here for anyone who has interest and for instructors who may need the chapter for their existing course. ■ Appendix P “Implementing Point-to-Point W ANs” is a copy of the ICND2 book’s chapter about serial W ANs. In a lab environment you may want to use serial W AN links and you may not have a copy of the ICND2 book. I included this chapter for reference if you need a little more depth about serial links. ■ Appendix Q “Topics from Previous Editions” is a collection of information about topics that have appeared on previous versions of the CCNA exams. While no longer within this exam’s topics the concepts are still of interest to someone with the CCENT or CCNA certifi cation. ■ Appendix R “Exam Topics Cross Reference” provides some tables to help you fi nd where each exam objectives is covered in the book. Reference Information This short section contains a few topics available for reference elsewhere in the book. You may read these when you first use the book but you may also skip these topics and refer back to them later. In particular make sure to note the final page of this introduction which lists several contact details including how to get in touch with Cisco Press. Install the Pearson IT Certification Practice Test Engine and Questions This book like many other Cisco Press books includes the rights to use the Pearson IT Certification Practice Test PCPT software along with rights to use some exam ques- tions related to this book. PCPT allows has many options including the option to answer

slide 48:

ptg17246291 xlvi CCENT/CCNA ICND1 100-105 Official Cert Guide questions in study mode so you can see the answers and explanations for each question as you go along or to take a simulated exam that mimics real exam conditions or to view questions in flash card mode where all the answers are stripped out challenging you to answer questions from memory. You should install PCPT so it is ready to use even for the earliest chapters. This book’s Part Review sections ask you specifically to use PCPT and you can even take the DIKTA chap- ter pre-quizzes using PCPT. NOTE The right to use the exams associated with this book is based on an activation code. For those with a print book the code is in the DVD sleeve at the back of the book. For those who purchase the Premium Edition eBook and Practice Test directly from the Cisco Press website the code will be populated on your account page after purchase. For those who purchase a Kindle edition the access code will be supplied directly from Amazon. Note that if you purchase an eBook version from any other source the practice test is not included as other vendors are not able to vend the required unique access code. Do not lose the activation code. NOTE Also on this same piece of paper on the opposite side from the exam activation code you will find a one-time-use coupon code that gives you 70 percent off the purchase of the CCENT/CCNA ICND1 100-105 Official Cert Guide Premium Edition eBook and Practice Test. PCPT Exam Databases with This Book This book includes an activation code that allows you to load a set of practice questions. The questions come in different exams or exam databases. When you install the PCPT soft- ware and type in the activation code the PCPT software downloads the latest version of all these exam databases. And with the ICND1 book alone you get four different “exams” or four different sets of questions as listed in Figure I-4. ICND1 Exam 1 ICND1 Exam 2 DIKTA “Book” Part Review Figure I-4 PCPT Exams/Exam Databases and When to Use Them You can choose to use any of these exam databases at any time both in study mode and practice exam mode. However many people find it best to save some of the exams until exam review time after you have finished reading the entire book. Figure I-4 begins to sug- gest a plan spelled out here: ■ During part review use PCPT to review the DIKTA questions for that part using study mode. ■ During part review use the questions built specifically for part review the part review questions for that part of the book using study mode. ■ Save the remaining exams to use with the “Final Review” chapter at the end of the book.

slide 49:

ptg17246291 Introduction xlvii The two modes inside PCPT give you better options for study versus practicing a timed exam event. In study mode you can see the answers immediately so you can study the topics more easily. Also you can choose a subset of the questions in an exam database for instance you can view questions from only the chapters in one part of the book. PCPT practice mode lets you practice an exam event somewhat like the actual exam. It gives you a preset number of questions from all chapters with a timed event. Practice exam mode also gives you a score for that timed event. How to View Only DIKTA Questions by Chapter or Part Most chapters begin with a “Do I Know This Already” DIKTA quiz. You can take the quiz to start a chapter take it again during chapter review for more practice and the “Part Review” sections even suggest that you repeat the questions from all chapters in that part. You can use the DIKTA quiz as printed in the book or use the PCPT software. The book lists the questions with the letter answers on the page following the quiz. Appendix C on the DVD lists the answers along with an explanation you might want to keep that PDF handy. Using PCPT for these questions has some advantages. It gives you a little more practice in how to read questions from testing software. Also the explanations to the questions are conveniently located in the PCPT software. To view these DIKTA questions inside the PCPT software you need to select Book Questions which is the way PCPT references questions found inside the printed book. Then you have to deselect all chapters with a single click and then select one or more chapters as follows: Step 1. Start the PCPT software. Step 2. From the main home menu select the item for this product with a name like CCENT/CCNA ICND1 100-105 Official Cert Guide and click Open Exam. Step 3. The top of the next window that appears should list some exams check the ICND1 Book Questions box and uncheck the other boxes. This selects the “book” questions that is the DIKTA questions from the beginning of each chapter. Step 4. On this same window click at the bottom of the screen to deselect all objec- tives chapters. Then select the box beside each chapter in the part of the book you are reviewing. Step 5. Select any other options on the right side of the window. Step 6. Click Start to start reviewing the questions. How to View Part Review Questions The exam databases you get with this book include a database of questions created solely for study during the part review process. DIKTA questions focus more on facts to help you determine whether you know the facts contained within the chapter. The part review ques- tions instead focus more on application of those facts to typical real scenarios and look more like real exam questions.

slide 50:

ptg17246291 xlviii CCENT/CCNA ICND1 100-105 Official Cert Guide To view these questions follow the same process as you did with DIKTA/book questions but select the Part Review database rather than the book database. PCPT has a clear name for this database: Part Review Questions. About Mind Maps Mind maps are a type of visual organization tool that you can use for many purposes. For instance you can use mind maps as an alternative way to take notes. You can also use mind maps to improve how your brain organizes concepts. Mind maps improve your brain’s connections and relationships between ideas. When you spend time thinking about an area of study and organize your ideas into a mind map you strength- en existing mental connections and create new connections all into your own frame of reference. In short mind maps help you internalize what you learn. Each mind map begins with a blank piece of paper or blank window in a mind mapping application. You then add a large central idea with branches that move out in any direction. The branches contain smaller concepts ideas commands pictures whatever idea needs to be represented. Any concepts that can be grouped should be put near each other. As need be you can create deeper and deeper branches although for this book’s purposes most mind maps will not go beyond a couple of levels. NOTE Many books have been written about mind maps but Tony Buzan often gets credit for formalizing and popularizing mind maps. You can learn more about mind maps at his website www.thinkbuzan.com. For example Figure I-5 shows a sample mind map that begins to output some of the IPv6 content from Part VIII of the ICND1 book. You might create this kind of mind map when reviewing IPv6 addressing concepts starting with the big topic of “IPv6 addressing” and then writing down random terms and ideas. As you start to organize them mentally you draw lines connecting the ideas reorganize them and eventually reach the point where you believe the organization of ideas makes sense to you. Figure I-5 Sample Mind Map Mind maps may be the least popular but most effective study tool suggested in this book. I personally find a huge improvement in learning new areas of study when I mind map I hope you will make the effort to try these tools and see if they work well for you too.

slide 51:

ptg17246291 Introduction xlix Finally for mind mapping tools you can just draw them on a blank piece of paper or find and download a mind map application. I have used Mind Node Pro on a Mac and we build the sample mind maps with XMIND which has free versions for Windows Linux and OS X. About Building Hands-On Skills You need skills in using Cisco routers and switches specifically the Cisco command-line interface CLI. The Cisco CLI is a text-based command-and-response user interface you type a command and the device a router or switch displays messages in response. To answer sim and simlet questions on the exams you need to know a lot of commands and you need to be able to navigate to the right place in the CLI to use those commands. This next section walks through the options of what is included in the book with a brief description of lab options outside the book. Config Lab Exercises Some router and switch features require multiple configuration commands. Part of the skill you need to learn is to remember which configuration commands work together which ones are required and which ones are optional. So the challenge level goes beyond just picking the right parameters on one command. You have to choose which commands to use in which combination typically on multiple devices. And getting good at that kind of task requires practice. The Config Labs feature introduced as a new feature in this edition of the book helps provide that practice. Each lab presents a sample lab topology with some requirements and you have to decide what to configure on each device. The answer then shows a sample configuration. You job is to create the configuration and then check your answer versus the supplied answer. Also for the first time this edition places the content not only outside the book but also onto the author’s blog site. To reach my blog sites for ICND1 content or for ICND2 con- tent two different blogs you can start at my blog launch site blog.certskills.com and click from there. blog.certskills.com/ccent/ Wendell’s CCENT ICND1: In the menus navigate to Hands On… Config Lab blog.certskills.com/ccna/ Wendell’s CCNA ICND2: In the menus navigate to Hands On… Config Lab Both blogs are geared toward helping you pass the exams so feel free to look around. Note that the Config Lab posts should show an image like this in the summary: Figure I-6 Config Lab Logo in the Author’s Blogs

slide 52:

ptg17246291 l CCENT/CCNA ICND1 100-105 Official Cert Guide These Config Labs have several benefits including the following: Untethered and responsive: Do them from anywhere from any web browser from your phone or tablet untethered from the book or DVD. Designed for idle moments: Each lab is designed as a 5- to 10-minute exercise if all you are doing is typing in a text editor or writing your answer on paper. Two outcomes both good: Practice getting better and faster with basic configuration or if you get lost you have discovered a topic that you can now go back and reread to complete your knowledge. Either way you are a step closer to being ready for the exam Blog format: Allows easy adds and changes by me and easy comments by you. Self-assessment: As part of final review you should be able to do all the Config Labs without help and with confidence. Note that the blog organizes these Config Lab posts by book chapter so you can easily use these at both chapter review and part review. See the “Your Study Plan” element that fol- lows the Introduction for more details about those review sections. A Quick Start with Pearson Network Simulator Lite The decision of how to get hands-on skills can be a little scary at first. The good news: You have a free and simple first step to experience the CLI: Install and use the Pearson NetSim Lite that comes with this book. This book comes with a lite version of the best-selling CCNA Network Simulator from Pearson which provides you with a means right now to experience the Cisco CLI. No need to go buy real gear or buy a full simulator to start learning the CLI. Just install it from the DVD in the back of this book. The labs with this latest version of NetSim Lite includes labs associated with Part II of this book. Part I includes concepts only with Part II being the first part with commands. So make sure and use the NetSim Lite to learn the basics of the CLI to get a good start. Of course one reason that NetSim Lite comes on the DVD is that the publisher hopes you will buy the full product. However even if you do not use the full product you can still learn from the labs that come with NetSim Lite while deciding about what options to pursue. NOTE The ICND1 and ICND2 books each contain a different version of the Sim Lite product each with labs that match the book content. If you bought both books make sure you install both Sim Lite products. The Pearson Network Simulator The Config Labs and the Pearson Network Simulator Lite both fill specific needs and they both come with the book. However you need more than those two tools. The single best option for lab work to do along with this book is the paid version of the Pearson Network Simulator. This simulator product simulates Cisco routers and switches so that you can learn for the CCENT and CCNA RS certifications. But more importantly it focuses on learning for the exam by providing a large number of useful lab exercises. Reader surveys tell us that those people who use the Simulator along with the book love the learning process and rave about how the book and Simulator work well together.

slide 53:

ptg17246291 Introduction li Of course you need to make a decision for yourself and consider all the options. Thankfully you can get a great idea of how the full Simulator product works by using the Pearson Network Simulator Lite product include with the book. Both have the same base code and same user interface and the same types of labs. Try the Lite version and check out the full product. There is a full product for CCENT only and another for CCNA RS which includes all the labs in the CCENT product plus others for the ICND2 parts of the content. Note that the Simulator and the books work on a different release schedule. For a time in 2016 the Simulator will be the Simulator created for the previous versions of the exams ICND1 100-101 ICND2 200-101 and CCNA 200-120. That product includes approxi- mately 80 percent of the CLI topics in the ICND1 100-105 and 200-105 books. So during that time the Simulator is still very useful. On a practical note when you want to do labs when reading a chapter or doing part review the Simulator organizes the labs to match the book. Just look for “Sort by Chapter” tab in the Simulator’s user interface. However during the months in 2016 for which the Simulator is the older edition listing the older exams in the title you will need to refer to a PDF that lists those labs versus this book’s organization. You can find that PDF on the book product page under the Downloads tab here: www.ciscopress.com/title/9781587205804. More Lab Options If you decide against using the full Pearson Network Simulator you still need hands-on experience. You should plan to use some lab environment to practice as much CLI as possible. First you can use real Cisco routers and switches. You can buy them new or used or bor- row them at work. You can rent them for a fee. If you have the right mix of gear you could even do the Config Lab exercises from my blog on that gear or try and re-create examples from the book. Cisco offers a virtualization product that lets you run router and switch operating system OS images in a virtual environment. This tool the Virtual Internet Routing Lab VIRL http://virl.cisco.com lets you create a lab topology start the topology and connect to real router and switch OS images. Check out http://virl.cisco.com for more information. You can even rent virtual Cisco router and switch lab pods from Cisco in an offering called Cisco Learning Labs www.cisco.com/go/learninglabs. All these previously mentioned options cost some money but the next two are generally free to the user but with a different catch for each. First GNS3 works somewhat like VIRL creating a virtual environment running real Cisco IOS. However GNS3 is not a Cisco prod- uct and cannot provide you with the IOS images for legal reasons. Cisco also makes a simulator that works very well as a learning tool: Cisco Packet Tracer. However Cisco intends Packet Tracer for use by people currently enrolled in Cisco Networking Academy courses and not for the general public. So if you are part of a Cisco Academy definitely use Packet Tracer. This book does not tell you what option to use but you should plan on getting some hands- on practice somehow. The important thing to know is that most people need to practice using the Cisco CLI to be ready to pass these exams.

slide 54:

ptg17246291 lii CCENT/CCNA ICND1 100-105 Official Cert Guide For More Information If you have any comments about the book submit them via www.ciscopress.com. Just go to the website select Contact Us and type your message. Cisco might make changes that affect the CCNA certification from time to time. You should always check www.cisco.com/go/ccna and www.cisco.com/go/ccent for the latest details. The CCENT/CCNA ICND1 100-105 Official Cert Guide helps you attain CCENT and CCNA Routing and Switching certification. This is the CCNA ICND1 certification book from the only Cisco-authorized publisher. We at Cisco Press believe that this book certainly can help you achieve CCNA certification but the real work is up to you I trust that your time will be well spent.

slide 55:

ptg17246291 This page intentionally left blank

slide 56:

ptg17246291 Your Study Plan You just got this book. You have probably already read or quickly skimmed the Introduction. You are probably now wondering whether to start reading here or skip ahead to Chapter 1 “Introduction to TCP/IP Networking.” Stop to read this section about how to create your own study plan for the exams you plan to take ICND1 100-105 ICND2 200-105 and/or CCNA 200-125. Your study will go much better if you take time maybe 15 minutes to think about a few key points about how to study before starting on this journey. That is what this section will help you do. A Brief Perspective on Cisco Certification Exams Cisco sets the bar pretty high for passing the ICND1 ICND2 and CCNA RS exams. Most anyone can study and pass these exams but it takes more than just a quick read through the book and the cash to pay for the exam. The challenge of these exams comes from many angles. Each of these exams covers a lot of concepts and many commands specific to Cisco devices. Beyond knowledge these Cisco exams also require deep skills. You must be able to analyze and predict what really happens in a network. You must be able to configure Cisco devices to work correctly in those net- works. And you must be ready to troubleshoot problems when the network does not work correctly. The more challenging questions on these exams work a lot like a jigsaw puzzle but with four out of every five puzzle pieces not even in the room. To solve the puzzle you have to mentally re-create the missing pieces. To do that you must know each networking concept and remember how the concepts work together. For instance the ICND1 exam includes many troubleshooting topics. A simple question might ask you why a host cannot communicate with some server. The question would sup- ply some of the information like some pieces of the jigsaw puzzle as represented with the white pieces in Figure 1. You have to apply your knowledge of IPv4 routing IP addressing and Ethernet LAN switching to the scenario in the question to come up with some of the other pieces of the puzzle. For a given question some pieces of the puzzle may remain a mystery but with enough of the puzzle filled in you should be able to answer the question. And some pieces will just remain unknown for a given question. These skills require that you prepare by doing more than just reading and memorizing what you read. Of course you need to read many pages in this book to learn many individual facts and how these facts relate to each other. But a big part of this book lists exercises beyond reading exercises that help you build the skills to solve these networking puzzles.

slide 57:

ptg17246291 Predict Configuration: RIPv2 on Routers Given: Output of show mac address-table Given: Router Topology Drawing Calculate: IPv4 subnet IDs Predict Output: show ip route Predict Output: show ip arp Figure 1 Filling In Puzzle Pieces with Your Analysis Skills Five Study Plan Steps These exams are challenging but many people pass them every day. So what do you need to do to be ready to pass beyond reading and remembering all the facts You need to develop skills. You need to mentally link each idea with other related ideas. Doing that requires additional work. To help you along the way the next few pages give you five key planning steps to take so that you can more effectively build those skills and make those connections before you dive into this exciting but challenging world of learning network- ing on Cisco gear. Step 1: Think in Terms of Parts and Chapters The first step in your study plan is to get the right mindset about the size and nature of the task you have set out to accomplish. This is a large book. So you cannot think about the book as one huge task or you might get discouraged. Besides you never sit down to read 900 pages in one study session. So break the task down into smaller tasks. The good news here is that the book is designed with obvious breakpoints and built-in extensive review activities. In short the book is more of a study system than a book. So the first step in your study plan is to visualize the book not as one large book but as 9 parts. Then within each part visualize an average of 4 chapters. Your study plan has you working through the chapters in each part and then reviewing the material in that part before moving on as shown in Figure 2.

slide 58:

ptg17246291 4 CCENT/CCNA ICND1 100-105 Official Cert Guide Chapter 3 Review Final Review Practice Exams Do Labs Review Concepts Practice Subnetting . . . Chapter 4 Review Chapter 1 Review Chapter 2 Review Chapter 5 Review P A R T R E V I E W Chapter 8 Review Chapter 9 Review Chapter 6 Review Chapter 7 Review P A R T R E V I E W Chapter 12 Review Chapter 10 Review Chapter 11 Review P A R T R E V I E W Chapter 15 Review Chapter 16 Review Chapter 13 Review Chapter 14 Review P A R T R E V I E W Chapter 19 Review Chapter 20 Review Chapter 17 Review Chapter 18 Review P A R T R E V I E W Part I Part II Part III Part V Part IV Chapter 23 Review Chapter 24 Review Chapter 21 Review Chapter 22 Review P A R T R E V I E W Chapter 27 Review Chapter 25 Review Chapter 26 Review P A R T R E V I E W Chapter 30 Review Chapter 31 Review Chapter 28 Review Chapter 29 Review P A R T R E V I E W Chapter 35 Review Chapter 36 Review Chapter 33 Review Chapter 34 Review Part VI Part VII Part VIII Part IV P A R T R E V I E W Chapter 32 Review Figure 2 9 Parts with an Average of 4 Chapters Each with Part Reviews Now your plan has the following: 1 large task: Read and master all content in the book. 9 medium tasks/book: Read and master a part. 4 small tasks/part: Read and master a chapter. Step 2: Build Your Study Habits Around the Chapter For your second step possibly the most important step approach each chapter with the same process: read it and then study the chapter before moving on. Each chapter follows the same design with three parts as shown in Figure 3. The chapter pre-quiz called a DIKTA quiz or Do I Know This Already quiz helps you decide how much time to spend reading versus skimming the core of the chapter called the Foundation Topics. The Chapter Review section then gives you instructions about how to study and review what you just read. Take Quiz 1 In-Chapter or... 2 Companion Website 3 DVD High Score Skim Foundation Topics Low Score Read Foundation Topics Foundation Topics Chapter Review DIKTA Quiz Figure 3 Suggested Approach to Each Chapter The book has no long chapters on purpose. They average just over 20 pages for the Foundation Topics. By keeping the size reasonable you can complete all of a chapter in one or two short study sessions. Go into each study session that begins a new chapter thinking that you have a chance to complete the chapter or at least make a great start on it. And if you do not have enough time look for the major headings inside the chapter—each chapter

slide 59:

ptg17246291 Your Study Plan 5 has two to three major headings and those make a great place to stop reading when you need to wait to complete the reading in the next study sessions. The Chapter Review tasks are very important to your exam-day success. Doing these tasks after you’ve read the chapter really does help you get ready. Do not put off using these tasks until later The chapter-ending review tasks help you with the first phase of deepening your knowledge and skills of the key topics remembering terms and linking the concepts together in your brain so that you can remember how it all fits together. The following list describes most of the activities you will find in the “Chapter Review” sections: ■ Review key topics ■ Review key terms ■ Repeat the DIKTA questions ■ Review memory tables ■ Re-create config checklists ■ Review command tables ■ Do lab exercises ■ Do subnetting exercises Check out the upcoming section titled “Find Review Activities on the Web and DVD” later in this planning section for more details. Step 3: Use Book Parts for Major Milestones Studies show that to master a concept and/or skill you should plan to go through multiple study sessions to review the concept and to practice the skill. The “Chapter Review” section at the end of each chapter is the first such review while the Part Review at the end of each part acts as that second review. Plan time to do the Part Review task at the end of each part using the Part Review elements found at the end of each Part. You should expect to spend about as much time on one Part Review as you would on one entire chapter or maybe a little more for some parts. So in terms of planning your time think of the Part Review itself as another chapter. Figure 4 lists the names of the parts in this book with some color coding. Note that Parts II and III are related Ethernet and Parts IV through VII are also related IP version 4. Each part ends with a Part Review section of 2 to 4 pages with notes about what tools and activi- ties to use. Ethernet LANs: Design VLANs and Troubleshooting 10-12 Implementing Basic Ethernet LANs 6-9 Network Device Management 33-36 IP Version 6 28-32 IPv4 Addressing and Subnetting 13-16 Implementing IPv4 17-20 IPv4 Design and Troubleshooting 21-24 IPv4 Services: ACLs and NAT 25-27 2 9 3 4 5 6 7 8 1 Network Fundamentals 1-5 Figure 4 Parts as Major Milestones

slide 60:

ptg17246291 6 CCENT/CCNA ICND1 100-105 Official Cert Guide Chapter Review and Part Review differ in some ways. Chapter Review tasks tend to provide a lot of context so you can focus on mentally adding a specific piece of knowledge or practicing a specific skill. Part Review activities instead remove a lot of the context more like real life and the real exams. Removing that context means that you have to exercise your own knowledge and skills. The result: You uncover your weaknesses. The better you become at uncovering weaknesses and then learning what you are missing in that area the better prepared you will be for the exam. The Part Review sections use the following kinds of tools in additional to some of the same tools used for Chapter Review: ■ Mind maps ■ Part Review questions with PCPT ■ Labs Also consider setting a goal date for finishing each part of the book and a reward as well. Plan a break some family time some time out exercising eating some good food whatever helps you get refreshed and motivated for the next part. Step 4: Use the Final Review Chapter to Refine Skills and Uncover Weaknesses Your fourth step has one overall task: Follow the details outlined in Chapter 37 “Final Review” at the end of this book for what to do between finishing the book and taking the exam. The “Final Review” chapter has two major goals. First it helps you further develop the analytical skills you need to answer the more complicated questions on the exam. Many questions require that you connect ideas about concepts configuration verification and troubleshooting. The closer you get to taking the exam the less reading you should do and the more you should do other learning activities this chapter’s tasks give you activities to further develop these skills. The tasks in the “Final Review” chapter also help you uncover your weak areas. This final element gives you repetition with high-challenge exam questions uncovering any gaps in your knowledge. Many of the questions are purposefully designed to test your knowledge of the most common mistakes and misconceptions helping you avoid some of the common pitfalls people experience with the actual exam. Step 5: Set Goals and Track Your Progress Your fifth study plan step spans the entire timeline of your study effort. Before you start reading the book and doing the rest of these study tasks take the time to make a plan set some goals and be ready to track your progress. While making lists of tasks may or may not appeal to you depending on your personality goal setting can help everyone studying for these exams. And to do the goal setting you need to know what tasks you plan to do. NOTE If you read this and decide that you want to try to do better with goal setting beyond your exam study check out a blog series I wrote about planning your networking career here: http://blog.certskills.com/ccna/tag/development-plan/.

slide 61:

ptg17246291 Your Study Plan 7 As for the list of tasks to do when studying you do not have to use a detailed task list. You could list every single task in every chapter-ending Chapter Review section every task in the Part Reviews and every task in the “Final Review” chapter. However listing the major tasks can be enough. You should track at least two tasks for each typical chapter: reading the “Foundation Topics” section and doing the Chapter Review at the end of the chapter. And of course do not forget to list tasks for Part Reviews and Final Review. Table 1 shows a sample for Part I of this book. Table 1 Sample Excerpt from a Planning T able Element Task Goal Date First Date Completed Second Date Completed Optional Chapter 1 Read Foundation Topics Chapter 1 Do Chapter Review tasks Chapter 2 Read Foundation Topics Chapter 2 Do Chapter Review tasks Chapter 3 Read Foundation Topics Chapter 3 Do Chapter Review tasks Part I Review Do Part Review activities NOTE Appendix M “Study Planner” on the DVD that comes with this book contains a complete planning checklist like Table 1 for the tasks in this book. This spreadsheet allows you to update and save the file to note your goal dates and the tasks you have completed. Use your goal dates as a way to manage your study and not as a way to get discouraged if you miss a date. Pick reasonable dates that you can meet. When setting your goals think about how fast you read and the length of each chapter’s “Foundation Topics” section as listed in the table of contents. Then when you finish a task sooner than planned move up the next few goal dates. If you miss a few dates do not start skipping the tasks listed at the ends of the chapters Instead think about what is impacting your schedule—real life commitment and so on— and either adjust your goals or work a little harder on your study. Things to Do Before Starting the First Chapter Now that you understand the big ideas behind a good study plan for the book take a few more minutes for a few overhead actions that will help. Before leaving this section look at some other tasks you should do either now or around the time you are reading the first few chapters to help make a good start in the book. Find Review Activities on the Web and DVD The earlier editions of the book have used review activities that relied on the chapter plus PDF appendixes found on the DVD. Some activities also rely on the PCPT testing software.

slide 62:

ptg17246291 8 CCENT/CCNA ICND1 100-105 Official Cert Guide This edition is the first Cisco Press certification guide to offer a large set of apps to use instead of the traditional study features. The Introduction’s section titled “A Big New Feature: Review Applications” detailed some of the reasons. I encourage you to go ahead and access the book’s companion website to find the review apps and explore. Also spin the DVD and find the review apps there. Both methods orga- nize the review activities by chapter and by part. Note that this book includes the traditional methods of review as well with instructions in the book and matching PDF appendixes in some cases. For instance all the subnetting exercises can be done in an app but those same exercises exist in DVD-only appendixes— you choose which works better for you. Should I Plan to Use the Two-Exam Path or One-Exam Path You do not have to make this choice today but you can be mulling the decision while you study. To get a CCNA Routing and Switching certification you choose either a one-exam or two- exam path. Which should you use The following is my opinion but it’s based on chatter and opinions from readers from many years. You can consider the one-exam path if ■ You already know about half the topics well through prior experience or study. ■ You have already proven that you are excellent at learning through self-study. Otherwise in my opinion you would be better off taking the two-exam path. First there is no cost savings for most people with the one-exam path. Check the exam prices in your coun- try for ICND1 ICND2 and CCNA and then make some comparisons. Assume you pass the tests on the first try: traditionally the cost is identical for both the ICND1 + ICND2 path and the CCNA path. Or assume that you fail each exam once: again the costs are identical. Next consider the number of topics. From a content perspective CCNA ICND1 + ICND2. So both paths require learning the same content. Next which would you rather have done in school: take a final exam over a single semes- ter’s material or a final exam covering the whole year It is just harder to prepare for an exam that covers more material so the two-exam path gain has an advantage. Finally the most compelling reason for the two-exam path is that you probably have no experience with Cisco exams yet. I hope you have a chance to pass many Cisco exams dur- ing your career. The two-exam path gets you to that first exam attempt sooner and the exam experience teaches you things about the exam and yourself that no study tool can teach you. Thankfully you do not have to decide now. In fact you can study the entire ICND1 book and all the while ponder whether to use the one-exam or two-exam path to CCNA RS. At that point you can make a better decision about which path works better for you. Study Options for Those Taking the 200-125 CCNA Exam Studying for the two-exam path has an obvious approach: just use the ICND1 book for the ICND1 exam and the ICND2 book for the ICND2 exam. Simple enough.

slide 63:

ptg17246291 Your Study Plan 9 If you do plan to take the 200-125 CCNA RS exam you have a couple of study options. First to be clear: The 200-125 CCNA exam covers the topics in the combined ICND1 and ICND2 books. So using both the ICND1 and ICND2 books covers everything for the 200-125 CCNA RS exam. The only question is when to read each part of the two books. You have two reasonable options when going with the one-exam option: ■ Complete all the ICND1 book then move on to the ICND2 book. ■ Move back and forth between the ICND1 and ICND2 books by part based on topics as shown in Figure 5. The first option is pretty obvious but the second one is less obvious. Figure 5 shows a study plan in which you complete the Ethernet parts in the ICND1 then the Ethernet part in ICND2. Similarly you complete the IPv4 parts in ICND1 then ICND2 and then the IPv6 part in both books and then the final part in both books. ICND1 ICND2 IV: IP Version 4 Addressing and Subnetting V: Implementing IPV4 VI: IPv4 Design and Troubleshooting VII: IPv4 Services: ACLs and NAT VIII: IP Version 6 IX: Network Device Management I: Networking Fundamentals II: Implementing Basic Ethernet LANs III: Ethernet: Design VLANs Troubleshooting I: Ethernet LANs II: IPv4 Routing Protocols III: Wide Area Networks IV: IPv4 Services: ACLs and QoS V: IPv4 Routing and Troubleshooting VI: IP Version 6 VII: Miscellaneous 1 6 2 4 3 5 7 Figure 5 Alternate Reading Plan for CCNA: Moving Between Books by Part Personally I am a fan of completing the ICND1 book completely and then moving on to the ICND2 book. However for those of you with a large amount of experience already this alternate reading plan may work well.

slide 64:

ptg17246291 10 CCENT/CCNA ICND1 100-105 Official Cert Guide Other Small Tasks Before Getting Started You need to do a few overhead tasks to install software find some PDFs and so on. You can do these tasks now or do them in your spare moments when you need a study break during the first few chapters of the book. But do these early. That way if you do stumble upon an installation problem you have time to work through it before you need a particular tool. Register for free at the Cisco Learning Network CLN http://learningnetwork.cisco.com and join the CCENT/CCNA RS study group. This group allows you to both lurk and par- ticipate in discussions about topics related to the ICND1 exam ICND2 exam and CCNA RS exam. Register for free join the groups and set up an email filter to redirect the messages to a separate folder. Even if you do not spend time reading all the posts yet later when you have time to read you can browse through the posts to find interesting topics or just search the posts from the CLN website. Explore the electronic elements of this book as detailed in the Introduction’s section titled “How to Get the Electronic Elements of This Book.” That includes the installation of the PCPT and Sim Lite software. Also find my blog site as listed in the Introduction and bookmark the pages that list the config labs to have those handy for later study. The URL is http://blog.certskills.com/ccent/category/hands-on/config-lab. Getting Started: Now Now dive in to your first of many short manageable tasks: reading the relatively short Chapter 1. Enjoy

slide 65:

ptg17246291 This page intentionally left blank

slide 66:

ptg17246291 This first part of the book introduces the most important topics in TCP/IP networking. Chapter 1 provides a broad look at TCP/IP introducing the common terms big concepts and major protocols for TCP/IP. Chapters 2 through 5 each look more deeply at a single portion of TCP/IP as follows: Chapter 2 focuses on links between nearby devices local-area networks or LANs. Chapter 3 focuses on links between far-away devices wide-area networks or WANs. Chapter 4 focuses on the rules of IP routing which pulls the LAN and WAN links of Chapters 2 and 3 together by forwarding data all the way from one user device to another. Chapter 5 focuses on what happens on the endpoint devices in the network with how they transmit data and how the applications interface to the network. Of these chapters note that this book explores the topics from Chapter 2 LANs and Chapter 4 IP routing in much more detail.

slide 67:

ptg17246291 Part I Networking Fundamentals Chapter 1: Introduction to TCP/IP Networking Chapter 2: Fundamentals of Ethernet LANs Chapter 3: Fundamentals of WANs Chapter 4: Fundamentals of IPv4 Addressing and Routing Chapter 5: Fundamentals of TCP/IP Transport and Applications Part I Review

slide 68:

ptg17246291 CHAPTER 1 Introduction to TCP/IP Networking This chapter covers the following exam topics: 1.0 Network Fundamentals 1.1 Compare and contrast OSI and TCP/IP models 1.2 Compare and contrast TCP and UDP protocols Welcome to the first chapter in your study for CCENT and CCNA This chapter begins Part I which focuses on the basics of networking. Because networks require all the devices to follow the rules this part starts with a discussion of networking models which gives you a big-picture view of the networking rules. You can think of a networking model as you think of a set of architectural plans for build- ing a house. A lot of different people work on building your house such as framers elec- tricians bricklayers painters and so on. The blueprint helps ensure that all the different pieces of the house work together as a whole. Similarly the people who make networking products and the people who use those products to build their own computer networks follow a particular networking model. That networking model defines rules about how each part of the network should work as well as how the parts should work together so that the entire network functions correctly. The CCNA exams include detailed coverage of one networking model: Transmission Control Protocol/Internet Protocol TCP/IP. TCP/IP is the most pervasively used network- ing model in the history of networking. You can find support for TCP/IP on practically every computer operating system OS in existence today from mobile phones to main- frame computers. Every network built using Cisco products today supports TCP/IP. And not surprisingly the CCNA Routing and Switching exams focus heavily on TCP/IP. The exams also compare TCP/IP to a second networking model called the Open Systems Interconnection OSI reference model. Historically OSI was the first large effort to cre- ate a vendor-neutral networking model. Because of that timing many of the terms used in networking today come from the OSI model so this chapter’s section on OSI discusses OSI and the related terminology . “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 69:

ptg17246291 Table 1-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Perspectives on Networking None TCP/IP Networking Model 1–6 OSI Networking Model 7–8 1. Which of the following protocols are examples of TCP/IP transport layer protocols Choose two answers. a. Ethernet b. HTTP c. IP d. UDP e. SMTP f. TCP 2. Which of the following protocols are examples of TCP/IP data link layer protocols Choose two answers. a. Ethernet b. HTTP c. IP d. UDP e. SMTP f. TCP g. PPP 3. The process of HTTP asking TCP to send some data and making sure that it is received correctly is an example of what a. Same-layer interaction b. Adjacent-layer interaction c. OSI model d. All of these answers are correct.

slide 70:

ptg17246291 16 CCENT/CCNA ICND1 100-105 Official Cert Guide 4. The process of TCP on one computer marking a TCP segment as segment 1 and the receiving computer then acknowledging the receipt of TCP segment 1 is an example of what a. Data encapsulation b. Same-layer interaction c. Adjacent-layer interaction d. OSI model e. All of these answers are correct. 5. The process of a web server adding a TCP header to the contents of a web page fol- lowed by adding an IP header and then adding a data link header and trailer is an example of what a. Data encapsulation b. Same-layer interaction c. OSI model d. All of these answers are correct. 6. Which of the following terms is used specifically to identify the entity created when encapsulating data inside data link layer headers and trailers a. Data b. Chunk c. Segment d. Frame e. Packet 7. Which OSI layer defines the functions of logical network-wide addressing and routing a. Layer 1 b. Layer 2 c. Layer 3 d. Layer 4 e. Layer 5 6 or 7 8. Which OSI layer defines the standards for cabling and connectors a. Layer 1 b. Layer 2 c. Layer 3 d. Layer 4 e. Layer 5 6 or 7

slide 71:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 17 1 Foundation Topics This chapter introduces some of the most basic ideas about computer networking while also defining the structure of two networking models: TCP/IP and OSI. The chapter begins with a brief introduction of how most people view a network which hopefully connects with where you are to start your CCNA journey. The middle of this chapter introduces net- working by explaining some of the key features of TCP/IP. The chapter closes with some additional concepts and terminology related to the OSI model. Perspectives on Networking So you are new to networking. Like many people your perspective about networks might be that of a user of the network as opposed to the network engineer who builds networks. For some your view of networking might be based on how you use the Internet from home using a high-speed Internet connection like digital subscriber line DSL or cable TV as shown in Figure 1-1. The Internet Ethernet Cable CATV Cable Wireless DSL Figure 1-1 End-User Perspective on High-Speed Internet Connections The top part of the figure shows a typical high-speed cable Internet user. The PC connects to a cable modem using an Ethernet cable. The cable modem then connects to a cable TV CATV outlet in the wall using a round coaxial cable—the same kind of cable used to con- nect your TV to the CATV wall outlet. Because cable Internet services provide service con- tinuously the user can just sit down at the PC and start sending email browsing websites making Internet phone calls and using other tools and applications. The lower part of the figure uses two different technologies. First the tablet computer uses wireless technology that goes by the name wireless local-area network wireless LAN or Wi-Fi instead of using an Ethernet cable. In this example the router uses a different tech- nology DSL to communicate with the Internet. Both home-based networks and networks built for use by a company make use of similar networking technologies. The Information Technology IT world refers to a network cre- ated by one corporation or enterprise for the purpose of allowing its employees to com- municate as an enterprise network. The smaller networks at home when used for business purposes often go by the name small office/home office SOHO networks. Answers to the “Do I Know This Already” quiz: 1 D and F 2 A and G 3 B 4 B 5 A 6 D 7 C 8 A

slide 72:

ptg17246291 18 CCENT/CCNA ICND1 100-105 Official Cert Guide Users of enterprise networks have some idea about the enterprise network at their company or school. People realize that they use a network for many tasks. PC users might realize that their PC connects through an Ethernet cable to a matching wall outlet as shown at the top of Figure 1-2. Those same users might use wireless LANs with their laptop when going to a meeting in the conference room as well. Figure 1-2 shows these two end-user perspectives on an enterprise network . Enterprise Network Ethernet Cable Wireless SW1 Figure 1-2 Example Representation of an Enterprise Network NOTE In networking diagrams a cloud represents a part of a network whose details are not important to the purpose of the diagram. In this case Figure 1-2 ignores the details of how to create an enterprise network. Some users might not even have a concept of the network at all. Instead these users just enjoy the functions of the network—the ability to post messages to social media sites make phone calls search for information on the Internet listen to music and download countless apps to their phones—without caring about how it works or how their favorite device con- nects to the network. Regardless of how much you already know about how networks work this book and the related certifications help you learn how networks do their job. That job is simply this: mov- ing data from one device to another. The rest of this chapter and the rest of this first part of the book reveals the basics of how to build both SOHO and enterprise networks so that they can deliver data between two devices. In the building business much work happens before you nail the first boards together. The process starts with some planning an understanding of how to build a house and some architectural blueprints of how to build that specific house. Similarly the journey toward building any computer network does not begin by installing devices and cables but instead by looking at the architectural plans for those modern networks: the TCP/IP model. TCP/IP Networking Model A networking model sometimes also called either a networking architecture or network- ing blueprint refers to a comprehensive set of documents. Individually each document describes one small function required for a network collectively these documents define everything that should happen for a computer network to work. Some documents define a protocol which is a set of logical rules that devices must follow to communicate. Other documents define some physical requirements for networking. For example a document could define the voltage and current levels used on a particular cable when transmitting data.

slide 73:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 19 1 You can think of a networking model as you think of an architectural blueprint for build- ing a house. Sure you can build a house without the blueprint. However the blueprint can ensure that the house has the right foundation and structure so that it will not fall down and it has the correct hidden spaces to accommodate the plumbing electrical gas and so on. Also the many different people that build the house using the blueprint—such as fram- ers electricians bricklayers painters and so on—know that if they follow the blueprint their part of the work should not cause problems for the other workers. Similarly you could build your own network—write your own software build your own networking cards and so on—to create a network. However it is much easier to simply buy and use products that already conform to some well-known networking model or blueprint. Because the networking product vendors build their products with some networking model in mind their products should work well together. History Leading to TCP/IP Today the world of computer networking uses one networking model: TCP/IP. However the world has not always been so simple. Once upon a time networking protocols didn’t exist including TCP/IP. Vendors created the first networking protocols these protocols supported only that vendor’s computers. For example IBM published its Systems Network Architecture SNA networking model in 1974. Other vendors also created their own propri- etary networking models. As a result if your company bought computers from three ven- dors network engineers often had to create three different networks based on the network- ing models created by each company and then somehow connect those networks making the combined networks much more complex. The left side of Figure 1-3 shows the general idea of what a company’s enterprise network might have looked like back in the 1980s before TCP/IP became common in enterprise internetworks. IBM DEC 1980s IBM DEC TCP/IP Other Vendor Other Vendor 1990s TCP/IP 2000s Figure 1-3 Historical Progression: Proprietary Models to the Open TCP/IP Model Although vendor-defined proprietary networking models often worked well having an open vendor-neutral networking model would aid competition and reduce complexity. The International Organization for Standardization ISO took on the task to create such a model starting as early as the late 1970s beginning work on what would become known as the Open Systems Interconnection OSI networking model. ISO had a noble goal for the OSI model: to

slide 74:

ptg17246291 20 CCENT/CCNA ICND1 100-105 Official Cert Guide standardize data networking protocols to allow communication among all computers across the entire planet. ISO worked toward this ambitious and noble goal with participants from most of the technologically developed nations on Earth participating in the process. A second less-formal effort to create an open vendor-neutral public networking model sprouted forth from a U.S. Department of Defense DoD contract. Researchers at various universities volunteered to help further develop the protocols surrounding the original DoD work. These efforts resulted in a competing open networking model called TCP/IP. During the 1990s companies began adding OSI TCP/IP or both to their enterprise net- works. However by the end of the 1990s TCP/IP had become the common choice and OSI fell away. The center part of Figure 1-3 shows the general idea behind enterprise networks in that decade—still with networks built upon multiple networking models but including TCP/IP. Here in the twenty-first century TCP/IP dominates. Proprietary networking models still exist but they have mostly been discarded in favor of TCP/IP. The OSI model whose development suffered in part because of a slower formal standardization process as com- pared with TCP/IP never succeeded in the marketplace. And TCP/IP the networking model originally created almost entirely by a bunch of volunteers has become the most prolific network model ever as shown on the right side of Figure 1-3. In this chapter you will read about some of the basics of TCP/IP. Although you will learn some interesting facts about TCP/IP the true goal of this chapter is to help you understand what a networking model or networking architecture really is and how it works. Also in this chapter you will learn about some of the jargon used with OSI. Will any of you ever work on a computer that is using the full OSI protocols instead of TCP/IP Probably not. However you will often use terms relating to OSI. Overview of the TCP/IP Networking Model The TCP/IP model both defines and references a large collection of protocols that allow computers to communicate. To define a protocol TCP/IP uses docume nts c all e d R e qu e sts For Comments RFC. Y ou can find these RFCs using any online search engine. The TCP/IP model also avoids repeating work already done by some other standards body or vendor con- sortium by simply referring to standards or protocols created by those groups. For example the Institute of Electrical and Electronic Engineers IEEE defines Ethernet LANs the TCP/IP model does not define Ethernet in RFCs but refers to IEEE Ethernet as an option. An easy comparison can be made between telephones and computers that use TCP/IP. You go to the store and buy a phone from one of a dozen different vendors. When you get home and plug in the phone to the same cable in which your old phone was connected the new phone works. The phone vendors know the standards for phones in their country and build their phones to match those standards. Similarly when you buy a new computer today it implements the TCP/IP model to the point that you can usually take the computer out of the box plug in all the right cables turn it on and it connects to the network. You can use a web browser to connect to your favorite website. How Well the OS on the computer implements parts of the TCP/IP model. The Ethernet card or wireless LAN card built in to the computer implements some LAN standards referenced by the TCP/IP model. In short the vendors that created the hard- ware and software implemented TCP/IP.

slide 75:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 21 1 To help people understand a networking model each model breaks the functions into a small number of categories called layers. Each layer includes protocols and standards that relate to that category of functions. TCP/IP actually has two alternative models as shown in Figure 1-4. TCP/IP Original Link Application Transport Internet TCP/IP Updated Application Transport Network Data Link Physical Figure 1-4 Two TCP/IP Networking Models The model on the left shows the original TCP/IP model listed in RFC 1122 which breaks TCP/IP into four layers. The top two layers focus more on the applications that need to send and receive data. The bottom layer focuses on how to transmit bits over each indi- vidual link with the Internet layer focusing on delivering data over the entire path from the original sending computer to the final destination computer. The TCP/IP model on the right shows the more common terms and layers used when people talk about TCP/IP today. It expands the original model’s link layer into two separate layers: data link and physical similar to the lower two layers of the OSI model. Also many people commonly use the word “Network” instead of “Internet” for one layer. NOTE The original TCP/IP model’s link layer has also been referred to as the network access and network interface layer. Many of you will have already heard of several TCP/IP protocols like the examples listed in Table 1-2. Most of the protocols and standards in this table will be explained in more detail as you work through this book. Following the table this section takes a closer look at the layers of the TCP/IP model . Table 1-2 TCP/IP Architectural Model and Example Protocols TCP/IP Architecture Layer Example Protocols Application HTTP POP3 SMTP Transport TCP UDP Internet IP Link Ethernet Point-to-Point Protocol PPP T1

slide 76:

ptg17246291 22 CCENT/CCNA ICND1 100-105 Official Cert Guide TCP/IP Application Layer TCP/IP application layer protocols provide services to the application software running on a computer. The application layer does not define the application itself but it defines services that applications need. For example application protocol HTTP defines how web browsers can pull the contents of a web page from a web server. In short the application layer pro- vides an interface between software running on a computer and the network itself. Arguably the most popular TCP/IP application today is the web browser. Many major software vendors either have already changed or are changing their application software to support access from a web browser. And thankfully using a web browser is easy: You start a web browser on your computer and select a website by typing the name of the website and the web page appears. HTTP Overview What really happens to allow that web page to appear on your web browser Imagine that Bob opens his browser. His browser has been configured to automatically ask for web server Larry’s default web page or home page. The general logic looks like Figure 1-5. Web Server - Larry Web Browser - Bob Give me your web page Here is the file home.htm 1 2 Figure 1-5 Basic Application Logic to Get a Web Page So what really happened Bob’s initial request actually asks Larry to send his home page back to Bob. Larry’s web server software has been configured to know that the default web page is contained in a file called home.htm. Bob receives the file from Larry and displays the contents of the file in Bob’s web browser window. HTTP Protocol Mechanisms Taking a closer look this example shows how applications on each endpoint computer— specifically the web browser application and web server application—use a TCP/IP applica- tion layer protocol. To make the request for a web page and return the contents of the web page the applications use the Hypertext Transfer Protocol HTTP. HTTP did not exist until Tim Berners-Lee created the first web browser and web server in the early 1990s. Berners-Lee gave HTTP functionality to ask for the contents of web pages specifically by giving the web browser the ability to request files from the server and giv- ing the server a way to return the content of those files. The overall logic matches what was shown in Figure 1-5 Figure 1-6 shows the same idea but with details specific to HTTP. NOTE The full version of most web addresses—also called Uniform Resource Locators URL or Universal Resource Identifiers URI—begins with the letters http which means that HTTP is used to transfer the web pages.

slide 77:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 23 1 Web Server Larry Web Browser Bob 1 HTTP Header GET home.htm 2 HTTP Header OK Data home.htm Data More of file home.htm 3 Figure 1-6 HTTP GET Request HTTP Reply and One Data-Only Message To get the web page from Larry at Step 1 Bob sends a message with an HTTP header. Generally protocols use headers as a place to put information used by that protocol. This HTTP header includes the request to “get” a file. The request typically contains the name of the file home.htm in this case or if no filename is mentioned the web server assumes that Bob wants the default web page. Step 2 in Figure 1-6 shows the response from web server Larry. The message begins with an HTTP header with a return code 200 which means something as simple as “OK” returned in the header. HTTP also defines other return codes so that the server can tell the browser whether the request worked. Here is another example: If you ever looked for a web page that was not found and then received an HTTP 404 “not found” error you received an HTTP return code of 404. The second message also includes the first part of the requested file. Step 3 in Figure 1-6 shows another message from web server Larry to web browser Bob but this time without an HTTP header. HTTP transfers the data by sending multiple messages each with a part of the file. Rather than wasting space by sending repeated HTTP headers that list the same information these additional messages simply omit the header. TCP/IP Transport Layer Although many TCP/IP application layer protocols exist the TCP/IP transport layer includes a smaller number of protocols. The two most commonly used transport layer pro- tocols are the Transmission Control Protocol TCP and the User Datagram Protocol UDP. Transport layer protocols provide services to the application layer protocols that reside one layer higher in the TCP/IP model. How does a transport layer protocol provide a service to a higher-layer protocol This section introduces that general concept by focusing on a single service provided by TCP: error recovery. Later chapters examine the transport layer in more detail and discuss more functions of the transport layer. TCP Error Recovery Basics To appreciate what the transport layer protocols do you must think about the layer above the transport layer the application layer. Why W ell each layer provides a service to the layer above it like the error-recovery service provided to application layer protocols by TCP . For example in Figure 1-5 Bob and Larry used HTTP to transfer the home page from web server Larry to Bob’s web browser. But what would have happened if Bob’s HTTP GET request had been lost in transit through the TCP/IP network Or what would have happened if Larry’s response which included the contents of the home page had been lost W ell as you might expect in either case the page would not have shown up in Bob’s browser.

slide 78:

ptg17246291 24 CCENT/CCNA ICND1 100-105 Official Cert Guide TCP/IP needs a mechanism to guarantee delivery of data across a network. Because many application layer protocols probably want a way to guarantee delivery of data across a net- work the creators of TCP included an error-recovery feature. To recover from errors TCP uses the concept of acknowledgments. Figure 1-7 outlines the basic idea behind how TCP notices lost data and asks the sender to try again . Web Server Larry Web Browser Bob 1 SEQ 1 TCP OK HTTP Web Page Data 2 SEQ 2 TCP More Web Page Data Lost SEQ 3 TCP Rest of Web Page Data 3 4 Send 2 Next TCP Figure 1-7 TCP Error-Recovery Services as Provided to HTTP Figure 1-7 shows web server Larry sending a web page to web browser Bob using three separate messages. Note that this figure shows the same HTTP headers as Figure 1-6 but it also shows a TCP header. The TCP header shows a sequence number SEQ with each message. In this example the network has a problem and the network fails to deliver the TCP message called a segment with sequence number 2. When Bob receives messages with sequence numbers 1 and 3 but does not receive a message with sequence number 2 Bob realizes that message 2 was lost. That realization by Bob’s TCP logic causes Bob to send a TCP segment back to Larry asking Larry to send message 2 again. Same-Layer and Adjacent-Layer Interactions The example in Figure 1-7 also demonstrates a function called adjacent-layer interaction which refers to the concepts of how adjacent layers in a networking model on the same computer work together. In this example the higher-layer protocol HTTP wants error recovery and the higher layer uses the next lower-layer protocol TCP to perform the service of error recovery the lower layer provides a service to the layer above it. Figure 1-7 also shows an example of a similar function called same-layer interaction. When a particular layer on one computer wants to communicate with the same layer on another computer the two computers use headers to hold the information that they want to communicate. For example in Figure 1-7 Larry set the sequence numbers to 1 2 and 3 so that Bob could notice when some of the data did not arrive. Larry’s TCP process cre- ated that TCP header with the sequence number Bob’s TCP process received and reacted to the TCP segments. Table 1-3 summarizes the key points about how adjacent layers work together on a single computer and how one layer on one computer works with the same networking layer on another computer.

slide 79:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 25 1 Table 1-3 Summary: Same-Layer and Adjacent-Layer Interactions Concept Description S am e-la y e r int e ra c t i o n on different computers The two computers use a protocol an agreed-to set of rules to communicate with the same layer on another computer. The protocol defined by each layer uses a header that is transmitted between the computers to communicate what each computer wants to do. Header information added by a layer of the sending computer is processed by the same layer of the receiving computer. A dja ce nt - la y e r interaction on the same computer On a single computer one layer provides a service to a higher layer. The software or hardware that implements the higher layer requests that the next lower layer perform the needed function. TCP/IP Network Layer The application layer includes many protocols. The transport layer includes fewer proto- cols most notably TCP and UDP. The TCP/IP network layer includes a small number of protocols but only one major protocol: the Internet Protocol IP . In fact the name TCP/IP is simply the names of the two most common protocols TCP and IP separated by a /. IP provides several features most importantly addressing and routing. This section begins by comparing IP’s addressing and routing with another commonly known system that uses addressing and routing: the postal service. Following that this section introduc- es IP addressing and routing. More details follow in Chapter 4 “Fundamentals of IPv4 Addressing and Routing.” Internet Protocol and the Postal Service Imagine that you just wrote two letters: one to a friend on the other side of the country and one to a friend on the other side of town. You addressed the envelopes and put on the stamps so both are ready to give to the postal service. Is there much difference in how you treat each letter Not really. Typically you would just put them in the same mailbox and expect the postal service to deliver both letters. The postal service however must think about each letter separately and then make a decision of where to send each letter so that it is delivered. For the letter sent across town the people in the local post office probably just need to put the letter on another truck. For the letter that needs to go across the country the postal service sends the letter to another post office then another and so on until the letter gets delivered across the country. At each post office the postal service must process the letter and choose where to send it next. To make it all work the postal service has regular routes for small trucks large trucks planes boats and so on to move letters between postal service sites. The service must be able to receive and forward the letters and it must make good decisions about where to send each letter next as shown in Figure 1-8 .

slide 80:

ptg17246291 26 CCENT/CCNA ICND1 100-105 Official Cert Guide Local Postal Service California Figure 1-8 Postal Service Forwarding Routing Letters Still thinking about the postal service consider the difference between the person sending the letter and the work that the postal service does. The person sending the letters expects that the postal service will deliver the letter most of the time. However the person send- ing the letter does not need to know the details of exactly what path the letters take. In contrast the postal service does not create the letter but it accepts the letter from the cus- tomer. Then the postal service must know the details about addresses and postal codes that group addresses into larger groups and it must have the ability to deliver the letters. The TCP/IP application and transport layers act like the person sending letters through the postal service. These upper layers work the same way regardless of whether the endpoint host computers are on the same LAN or are separated by the entire Internet. To send a mes- sage these upper layers ask the layer below them the network layer to deliver the message. The lower layers of the TCP/IP model act more like the postal service to deliver those mes- sages to the correct destinations. To do so these lower layers must understand the underly- ing physical network because they must choose how to best deliver the data from one host to another. So what does this all matter to networking Well the network layer of the TCP/IP net- working model primarily defined by the Internet Protocol IP works much like the postal service. IP defines that each host computer should have a different IP address just as the postal service defines addressing that allows unique addresses for each house apartment and business. Similarly IP defines the process of routing so that devices called routers can work like the post office forwarding packets of data so that they are delivered to the cor- rect destinations. Just as the postal service created the necessary infrastructure to deliver letters—post offices sorting machines trucks planes and personnel—the network layer defines the details of how a network infrastructure should be created so that the network can deliver data to all computers in the network. NOTE TCP/IP defines two versions of IP: IP version 4 IPv4 and IP version 6 IPv6. The world still mostly uses IPv4 so this introductory part of the book uses IPv4 for all refer- ences to IP. Later in this book Part VIII “IP Version 6” discusses this newer version of the IP protocol.

slide 81:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 27 1 Internet Protocol Addressing Basics IP defines addresses for several important reasons. First each device that uses TCP/IP— each TCP/IP host—needs a unique address so that it can be identified in the network. IP also defines how to group addresses together just like the postal system groups addresses based on postal codes like ZIP codes in the United States. To understand the basics examine Figure 1-9 which shows the familiar web server Larry and web browser Bob but now instead of ignoring the network between these two com- puters part of the network infrastructure is included. Addresses: 1.__.__.__ Addresses: 3.__.__.__ Addresses: 2.__.__.__ Larry 1.1.1.1 3.3.3.3 Bob 2.2.2.2 R1 R3 R2 Archie Figure 1-9 Simple TCP/IP Network: Three Routers with IP Addresses Grouped First note that Figure 1-9 shows some sample IP addresses. Each IP address has four num- bers separated by periods. In this case Larry uses IP address 1.1.1.1 and Bob uses 2.2.2.2. This style of number is called a dotted-decimal notation DDN. Figure 1-9 also shows three groups of addresses. In this example all IP addresses that begin with 1 must be on the upper left as shown in shorthand in the figure as 1. . . . All addresses that begin with 2 must be on the right as shown in shorthand as 2. . . . Finally all IP addresses that begin with 3 must be at the bottom of the figure. In addition Figure 1-9 introduces icons that represent IP routers. Routers are networking devices that connect the parts of the TCP/IP network together for the purpose of routing forwarding IP packets to the correct destination. Routers do the equivalent of the work done by each post office site: They receive IP packets on various physical interfaces make decisions based on the IP address included with the packet and then physically forward the packet out some other network interface. IP Routing Basics The TCP/IP network layer using the IP protocol provides a service of forwarding IP pack- ets from one device to another. Any device with an IP address can connect to the TCP/IP network and send packets. This section shows a basic IP routing example for perspective. NOTE The term IP host refers to any device regardless of size or power that has an IP address and connects to any TCP/IP network.

slide 82:

ptg17246291 28 CCENT/CCNA ICND1 100-105 Official Cert Guide Figure 1-10 repeats the familiar case in which web server Larry wants to send part of a web page to Bob but now with details related to IP. On the lower left note that server Larry has the familiar application data HTTP header and TCP header ready to send. In addition the message now contains an IP header. The IP header includes a source IP address of Larry’s IP address 1.1.1.1 and a destination IP address of Bob’s IP address 2.2.2.2. Addresses: 2._____ Larry 1.1.1.1 1 2 3 To 2._____ Send to R2 To 2._____ Send Locally Always to R1 Bob 2.2.2.2 IP TCP HTTP Source 1.1.1.1 Destination 2.2.2.2 R1 R3 R2 Figure 1-10 Basic Routing Example Step 1 on the left of Figure 1-10 begins with Larry being ready to send an IP packet. Larry’s IP process chooses to send the packet to some router—a nearby router on the same LAN—with the expectation that the router will know how to forward the packet. This logic is much like you or me sending all our letters by putting them in a nearby mailbox. Larry doesn’t need to know anything more about the topology or the other routers. At Step 2 Router R1 receives the IP packet and R1’s IP process makes a decision. R1 looks at the destination address 2.2.2.2 compares that address to its known IP routes and chooses to forward the packet to Router R2. This process of forwarding the IP packet is called IP routing or simply routing. At Step 3 Router R2 repeats the same kind of logic used by Router R1. R2’s IP process will compare the packet’s destination IP address 2.2.2.2 to R2’s known IP routes and make a choice to forward the packet to the right on to Bob. You will learn IP to more depth than any other protocol while preparing for CCENT and CCNA. Practically half the chapters in this book discuss some feature that relates to addressing IP routing and how routers perform routing. TCP/IP Link Layer Data Link Plus Physical The TCP/IP model’s original link layer defines the protocols and hardware required to deliver data across some physical network. The term link refers to the physical connections or links between two devices and the protocols used to control those links. Just like every layer in any networking model the TCP/IP link layer provides services to the layer above it in the model. When a host’s or router’s IP process chooses to send an IP packet to another router or host that host or router then uses link-layer details to send that packet to the next host/router.

slide 83:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 29 1 Because each layer provides a service to the layer above it take a moment to think about the IP logic related to Figure 1-10. In that example host Larry’s IP logic chooses to send the IP packet to a nearby router R1 with no mention of the underlying Ethernet. The Ethernet network which implements link-layer protocols must then be used to deliver that packet from host Larry over to router R1. Figure 1-11 shows four steps of what occurs at the link layer to allow Larry to send the IP packet to R1. NOTE Figure 1-11 depicts the Ethernet as a series of lines. Networking diagrams often use this convention when drawing Ethernet LANs in cases where the actual LAN cabling and LAN devices are not important to some discussion as is the case here. The LAN would have cables and devices like LAN switches which are not shown in this figure. Larry 1.1.1.1 Ethernet IP Packet Eth. IP Packet Encapsulate 1 2 Transmit 3 IP Packet 4 De-encapsulate Receive R1 Header Trailer Ethernet IP Packet Eth. Header Trailer Figure 1-11 Larry Using Ethernet to Forward an IP Packet to Router R1 Figure 1-11 shows four steps. The first two occur on Larry and the last two occur on Router R1 as follows: Step 1. Larry encapsulates the IP packet between an Ethernet header and Ethernet trailer creating an Ethernet frame. Step 2. Larry physically transmits the bits of this Ethernet frame using electricity flow- ing over the Ethernet cabling. Step 3. Router R1 physically receives the electrical signal over a cable and re-creates the same bits by interpreting the meaning of the electrical signals. Step 4. Router R1 de-encapsulates the IP packet from the Ethernet frame by removing and discarding the Ethernet header and trailer. By the end of this process the link-layer processes on Larry and R1 have worked together to deliver the packet from Larry to Router R1. NOTE Protocols define both headers and trailers for the same general reason but headers exist at the beginning of the message and trailers exist at the end. The link layer includes a large number of protocols and standards. For example the link layer includes all the variations of Ethernet protocols along with several other LAN stan- dards that were more popular in decades past. The link layer includes wide-area network

slide 84:

ptg17246291 30 CCENT/CCNA ICND1 100-105 Official Cert Guide WAN standards for different physical media which differ significantly compared to LAN standards because of the longer distances involved in transmitting the data. This layer also includes the popular WAN standards that add headers and trailers as shown generally in Figure 1-11—protocols such as the Point-to-Point Protocol PPP and Frame Relay. Chapter 2 “Fundamentals of Ethernet LANs” and Chapter 3 “Fundamentals of WANs” further develop these topics for LANs and WANs respectively. In short the TCP/IP link layer includes two distinct functions: functions related to the physical transmission of the data plus the protocols and rules that control the use of the physical media. The five-layer TCP/IP model simply splits out the link layer into two layers data link and physical to match this logic. TCP/IP Model and Terminology Before completing this introduction to the TCP/IP model this section examines a few remaining details of the model and some related terminology. Comparing the Original and Modern TCP/IP Models The original TCP/IP model defined a single layer—the link layer—below the Internet layer. The functions defined in the original link layer can be broken into two major categories: functions related directly to the physical transmission of data and those only indirectly related to the physical transmission of data. For example in the four steps shown in Figure 1-11 Steps 2 and 3 were specific to sending the data but Steps 1 and 4—encapsulation and de-encapsulation—were only indirectly related. This division will become clearer as you read about additional details of each protocol and standard. Today most documents use a more modern version of the TCP/IP model as shown in Figure 1-12. Comparing the two the upper layers are identical except a name change from Internet to Network. The lower layers differ in that the single link layer in the original model is split into two layers to match the division of physical transmission details from the other functions. Figure 1-12 shows the two versions of the TCP/IP model again with emphasis on these distinctions. TCP/IP Original Link Application Transport Internet TCP/IP Updated Application Transport Network Data Link Physical Encapsulation Addressing Bit Transmission Figure 1-12 Link Versus Data Link and Physical Layers Data Encapsulation Terminology As you can see from the explanations of how HTTP TCP IP and Ethernet do their jobs each layer adds its own header and for data-link protocols also a trailer to the data sup- plied by the higher layer. The term encapsulation refers to the process of putting headers and sometimes trailers around some data.

slide 85:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 31 1 Many of the examples in this chapter show the encapsulation process. For example web server Larry encapsulated the contents of the home page inside an HTTP header in Figure 1-6. The TCP layer encapsulated the HTTP headers and data inside a TCP header in Figure 1-7. IP encapsulated the TCP headers and the data inside an IP header in Figure 1-10. Finally the Ethernet link layer encapsulated the IP packets inside both a header and a trailer in Figure 1-11. The process by which a TCP/IP host sends data can be viewed as a five-step process. The first four steps relate to the encapsulation performed by the four TCP/IP layers and the last step is the actual physical transmission of the data by the host. In fact if you use the five-layer TCP/IP model one step corresponds to the role of each layer. The steps are sum- marized in the following list: Step 1. Create and encapsulate the application data with any required application layer headers. For example the HTTP OK message can be returned in an HTTP header followed by part of the contents of a web page. Step 2. Encapsulate the data supplied by the application layer inside a transport layer header. For end-user applications a TCP or UDP header is typically used. Step 3. Encapsulate the data supplied by the transport layer inside a network layer IP header. IP defines the IP addresses that uniquely identify each computer. Step 4. Encapsulate the data supplied by the network layer inside a data link layer header and trailer. This layer uses both a header and a trailer. Step 5. Transmit the bits. The physical layer encodes a signal onto the medium to transmit the frame. The numbers in Figure 1-13 correspond to the five steps in this list graphically showing the same concepts. Note that because the application layer often does not need to add a header the figure does not show a specific application layer header. Application Transport Network Data Link Physical Data Link IP Data Link Data Data TCP Data IP TCP Transmit Bits 1 2 3 4 5 1 2 3 4 5 4 TCP Data Figure 1-13 Five Steps of Data Encapsulation: TCP/IP Names of TCP/IP Messages Finally take particular care to remember the terms segment packet a n d frame and the meaning of each. Each term refers to the headers and possibly trailers defined by a

slide 86:

ptg17246291 32 CCENT/CCNA ICND1 100-105 Official Cert Guide particular layer and the data encapsulated following that header. Each term however refers to a different layer: segment for the transport layer packet for the network layer and frame for the link layer. Figure 1-14 shows each layer along with the associated term. TCP Data IP Data LH Data LT Segment Packet Frame Figure 1-14 Perspectives on Encapsulation and “Data” The letters LH and LT stand for link header and link trailer respectively and refer to the data link layer header and trailer. Figure 1-14 also shows the encapsulated data as simply “data.” When focusing on the work done by a particular layer the encapsulated data typically is unimportant. For example an IP packet can indeed have a TCP header after the IP header an HTTP header after the TCP head- er and data for a web page after the HTTP header. However when discussing IP you probably just care about the IP header so everything after the IP header is just called data. So when drawing IP packets everything after the IP header is typically shown simply as data. OSI Networking Model At one point in the history of the OSI model many people thought that OSI would win the battle of the networking models discussed earlier. If that had occurred instead of running TCP/IP on every computer in the world those computers would be running with OSI. However OSI did not win that battle. In fact OSI no longer exists as a networking model that could be used instead of TCP/IP although some of the original protocols referenced by the OSI model still exist. So why is OSI even in this book Terminology. During those years in which many people thought the OSI model would become commonplace in the world of networking mostly in the late 1980s and early 1990s many vendors and protocol documents started using termi- nology from the OSI model. That terminology remains today. So while you will never need to work with a computer that uses OSI to understand modern networking terminology you need to understand something about OSI. Comparing OSI and TCP/IP The OSI model has many similarities to the TCP/IP model from a basic conceptual perspec- tive. It has seven layers and each layer defines a set of typical networking functions. As with TCP/IP the OSI layers each refer to multiple protocols and standards that implement the functions specified by each layer. In other cases just as for TCP/IP the OSI committees did not create new protocols or standards but instead referenced other protocols that were already defined. For example the IEEE defines Ethernet standards so the OSI commit- tees did not waste time specifying a new type of Ethernet it simply referred to the IEEE Ethernet standards. Today the OSI model can be used as a standard of comparison to other networking models. Figure 1-15 compares the seven-layer OSI model with both the four-layer and five-layer TCP/IP models.

slide 87:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 33 1 Link Application Transport Internet TCP/IP TCP/IP OSI Application Transport Network Data Link Physical 5 - 7 4 3 2 1 Transport Session Presentation Application Network Data Link Physical 4 5 6 7 3 2 1 Figure 1-15 OSI Model Compared to the Two TCP/IP Models Next this section examines two ways in which we still use OSI terminology today: to describe other protocols and to describe the encapsulation process. Along the way the text briefly examines each layer of the OSI model. Describing Protocols by Referencing the OSI Layers Even today networking documents often describe TCP/IP protocols and standards by ref- erencing OSI layers both by layer number and layer name. For example a common descrip- tion of a LAN switch is “Layer 2 switch” with “Layer 2” referring to OSI layer 2. Because OSI did have a well-defined set of functions associated with each of its seven layers if you know those functions you can understand what people mean when they refer to a product or function by its OSI layer. For another example TCP/IP’s original Internet layer as implemented mainly by IP equates most directly to the OSI network layer. So most people say that IP is a network layer pro- tocol or a Layer 3 protocol using OSI terminology and numbers for the layer. Of course if you numbered the TCP/IP model starting at the bottom IP would be either Layer 2 or 3 depending on what version of the TCP/IP model you care to use. However even though IP is a TCP/IP protocol everyone uses the OSI model layer names and numbers when describ- ing IP or any other protocol for that matter. The claim that a particular TCP/IP layer is similar to a particular OSI layer is a general comparison but not a detailed comparison. The comparison is a little like comparing a car to a truck: Both can get you from point A to point B but they have many specific differences like the truck having a truck bed in which to carry cargo. Similarly both the OSI and TCP/IP network layers define logical addressing and routing. However the addresses have a different size and the routing logic even works differently. So the com- parison of OSI layers to other protocol models is a general comparison of major goals and not a comparison of the specific methods. OSI Layers and Their Functions Today because most people happen to be much more familiar with TCP/IP functions than with OSI functions one of the best ways to learn about the function of different OSI lay- ers is to think about the functions in the TCP/IP model and to correlate those with the OSI model. For the purposes of learning you can think of five of the OSI layers as doing the same kinds of things as the matching five layers in the TCP/IP model. For example the application layer of each model defines protocols to be used directly by the applications and the physical layer of each defines the electro-mechanical details of communicating over physical connections. Table 1-4 briefly describes each OSI layer.

slide 88:

ptg17246291 34 CCENT/CCNA ICND1 100-105 Official Cert Guide Table 1-4 OSI Reference Model Layer Descriptions Layer Functional Description 7 Application layer. Provides an interface from the application to the network by supplying a protocol with actions meaningful to the application for example “get web page object.” 6 Presentation layer. This layer negotiates data formats such as ASCII text or image types like JPEG. 5 Session layer. This layer provides methods to group multiple bidirectional messages into a workflow for easier management and easier backout of work that happened if the entire workflow fails. 4 Transport layer. In function much like TCP/IP’s transport layer. This layer focuses on data delivery between the two endpoint hosts for example error recovery. 3 Network layer. Like the TCP/IP network Internet layer this layer defines logical addressing routing forwarding and the routing protocols used to learn routes. 2 Data link layer. Like the TCP/IP data link layer this layer defines the protocols for delivering data over a particular single type of physical network for example the Ethernet data link protocols. 1 Physical layer. This layer defines the physical characteristics of the transmission medium including connectors pins use of pins electrical currents encoding light modulation and so on. Table 1-5 lists a sampling of the devices and protocols and their comparable OSI layers. Note that many network devices must actually understand the protocols at multiple OSI layers so the layer listed in Table 1-5 actually refers to the highest layer that the device normally thinks about when performing its core work. For example routers need to think about Layer 3 concepts but they must also support features at both Layers 1 and 2. Table 1-5 OSI Reference Model: Device and Protocol Examples Layer Name Protocols and Specifications Devices Application presentation session Layers 5–7 Telnet HTTP FTP SMTP POP3 VoIP SNMP Hosts firewalls Transport Layer 4 TCP UDP Hosts firewalls Network Layer 3 IP Router Data link Layer 2 Ethernet IEEE 802.3 HDLC LAN switch wireless access point cable modem DSL modem Physical Layer 1 RJ-45 Ethernet IEEE 802.3 LAN hub LAN repeater cables Besides remembering the basics of the features of each OSI layer as in Table 1-4 and some protocol and device example at each layer as in Table 1-5 you should also memo- rize the names of the layers. You can simply memorize them but some people like to use a mnemonic phrase to make memorization easier. In the following three phrases the first

slide 89:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 35 1 letter of each word is the same as the first letter of an OSI layer name in the order specified in parentheses: ■ All People Seem To Need Data Processing Layers 7 to 1 ■ Please Do Not Take Sausage Pizzas Away Layers 1 to 7 ■ Pew Dead Ninja Turtles Smell Particularly Awful Layers 1 to 7 OSI Layering Concepts and Benefits While networking models use layers to help humans categorize and understand the many functions in a network networking models use layers for many reasons. For example con- sider another postal service analogy. A person writing a letter does not have to think about how the postal service will deliver a letter across the country. The postal worker in the middle of the country does not have to worry about the contents of the letter. Likewise networking models that divide functions into different layers enable one software package or hardware device to implement functions from one layer and assume that other software/ hardware will perform the functions defined by the other layers. The following list summarizes the benefits of layered protocol specifications: ■ Less complex: Compared to not using a layered model network models break the con- cepts into smaller parts. ■ Standard interfaces: The standard interface definitions between each layer allow mul- tiple vendors to create products that fill a particular role with all the benefits of open competition. ■ Easier to learn: Humans can more easily discuss and learn about the many details of a protocol specification. ■ Easier to develop: Reduced complexity allows easier program changes and faster prod- uct development. ■ Multivendor interoperability: Creating products to meet the same networking standards means that computers and networking gear from multiple vendors can work in the same network. ■ Modular engineering: One vendor can write software that implements higher layers—for example a web browser—and another vendor can write software that implements the lower layers—for example Microsoft’s built-in TCP/IP software in its operating systems. OSI Encapsulation Terminology Like TCP/IP each OSI layer asks for services from the next lower layer. To provide the ser- vices each layer makes use of a header and possibly a trailer. The lower layer encapsulates the higher layer’s data behind a header. OSI uses a more generic term to refer to messages rather than frame packet and segment. OSI uses the term protocol data unit PDU. A PDU represents the bits that include the headers and trailers for that layer as well as the encapsulated data. For example an IP pack- et as shown in Figure 1-14 using OSI terminology is a PDU more specifically a Layer 3 PDU abbreviated L3PDU because IP is a Layer 3 protocol. OSI simply refers to the Layer x PDU LxPDU with x referring to the number of the layer being discussed as shown in Figure 1-16.

slide 90:

ptg17246291 36 CCENT/CCNA ICND1 100-105 Official Cert Guide LH - Layer Header LT - Layer Trailer L7H Data L6H Data L5H Data L4H Data L3H Data L2H Data L2T L7PDU L6PDU L5PDU L4PDU L3PDU L2PDU Figure 1-16 OSI Encapsulation and Protocol Data Units Chapter Review The “Your Study Plan” element just before Chapter 1 discusses how you should study and practice the content and skills for each chapter before moving on to the next chapter. That element introduces the tools used here at the end of each chapter. If you haven’t already done so take a few minutes to read that section. Then come back here and do the useful work of reviewing the chapter to help lock into memory what you just read. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Table 1-6 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 1-6 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT

slide 91:

ptg17246291 Chapter 1: Introduction to TCP/IP Networking 37 1 Review All the Key Topics Table 1-7 Key T opics for Chapter 1 Key Topic Elements Description Page Number Table 1-3 Provides definitions of same-layer and adjacent-layer interaction 25 Figure 1-10 Shows the general concept of IP routing 28 Figure 1-11 Depicts the data link services provided to IP for the purpose of delivering IP packets from host to host 29 Figure 1-13 Five steps to encapsulate data on the sending host 31 Figure 1-14 Shows the meaning of the terms segment packet and frame 32 Figure 1-15 Compares the OSI and TCP/IP network models 33 List Lists the benefits of using a layered networking model 35 Figure 1-16 Terminology related to encapsulation 36 Key Terms You Should Know adjacent-layer interaction de-encapsulation encapsulation frame networking model pack- et protocol data unit PDU same-layer interaction segment

slide 92:

ptg17246291 CHAPTER 2 Fundamentals of Ethernet LANs This chapter covers the following exam topics: 1.0 Network Fundamentals 1.6 Select the appropriate cabling type based on implementation requirements 2.0 LAN Switching Technologies 2.1 Describe and verify switching concepts 2.1.a MAC learning and aging 2.1.b Frame switching 2.1.c Frame flooding 2.1.d MAC address table 2.2 Interpret Ethernet frame format Most enterprise computer networks can be separated into two general types of technology: local-area networks LAN and wide-area networks WAN. LANs typically connect nearby devices: devices in the same room in the same building or in a campus of buildings. In contrast WANs connect devices that are typically relatively far apart. Together LANs and WANs create a complete enterprise computer network working together to do the job of a computer network: delivering data from one device to another. Many types of LANs have existed over the years but today’s networks use two general types of LANs: Ethernet LANs and wireless LANs. Ethernet LANs happen to use cables for the links between nodes and because many types of cables use copper wires Ethernet LANs are often called wired LANs. In comparison wireless LANs do not use wires or cables instead using radio waves for the links between nodes. This chapter introduces Ethernet LANs with more detailed coverage in Parts II and III of this book. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 93:

ptg17246291 Table 2-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions An Overview of LANs 1–2 Building Physical Ethernet Networks 3–4 Sending Data in Ethernet Networks 5–8 1. In the LAN for a small office some user devices connect to the LAN using a cable while others connect using wireless technology and no cable. Which of the follow- ing is true regarding the use of Ethernet in this LAN a. Only the devices that use cables are using Ethernet. b. Only the devices that use wireless are using Ethernet. c. Both the devices using cables and those using wireless are using Ethernet. d. None of the devices are using Ethernet. 2. Which of the following Ethernet standards defines Gigabit Ethernet over UTP cabling a. 10GBASE-T b. 100BASE-T c. 1000BASE-T d. None of the other answers is correct. 3. Which of the following is true about Ethernet crossover cables for Fast Ethernet a. Pins 1 and 2 are reversed on the other end of the cable. b. Pins 1 and 2 on one end of the cable connect to pins 3 and 6 on the other end of the cable. c. Pins 1 and 2 on one end of the cable connect to pins 3 and 4 on the other end of the cable. d. The cable can be up to 1000 meters long to cross over between buildings. e. None of the other answers is correct. 4. Each answer lists two types of devices used in a 100BASE-T network. If these devices were connected with UTP Ethernet cables which pairs of devices would require a straight-through cable Choose three answers. a. PC and router b. PC and switch c. Hub and switch d. Router and hub e. Wireless access point Ethernet port and switch

slide 94:

ptg17246291 40 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. Which of the following is true about the CSMA/CD algorithm a. The algorithm never allows collisions to occur. b. Collisions can happen but the algorithm defines how the computers should notice a collision and how to recover. c. The algorithm works with only two devices on the same Ethernet. d. None of the other answers is correct. 6. Which of the following is true about the Ethernet FCS field a. Ethernet uses FCS for error recovery. b. It is 2 bytes long. c. It resides in the Ethernet trailer not the Ethernet header. d. It is used for encryption. 7. Which of the following are true about the format of Ethernet addresses Choose three answers. a. Each manufacturer puts a unique OUI code into the first 2 bytes of the address. b. Each manufacturer puts a unique OUI code into the first 3 bytes of the address. c. Each manufacturer puts a unique OUI code into the first half of the address. d. The part of the address that holds this manufacturer’s code is called the MAC. e. The part of the address that holds this manufacturer’s code is called the OUI. f. The part of the address that holds this manufacturer’s code has no specific name. 8. Which of the following terms describe Ethernet addresses that can be used to send one frame that is delivered to multiple devices on the LAN Choose two answers. a. Burned-in address b. Unicast address c. Broadcast address d. Multicast address Foundation Topics An Overview of LANs The term Ethernet refers to a family of LAN standards that together define the physical and data link layers of the world’s most popular wired LAN technology. The standards defined by the Institute of Electrical and Electronics Engineers IEEE define the cabling the con- nectors on the ends of the cables the protocol rules and everything else required to create an Ethernet LAN.

slide 95:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 41 2 Typical SOHO LANs To begin first think about a small office/home office SOHO LAN today specifically a LAN that uses only Ethernet LAN technology. First the LAN needs a device called an Ethernet LAN switch which provides many physical ports into which cables can be con- nected. An Ethernet uses Ethernet cables which is a general reference to any cable that conforms to any of several Ethernet standards. The LAN uses Ethernet cables to connect different Ethernet devices or nodes to one of the switch’s Ethernet ports. Figure 2-1 shows a drawing of a SOHO Ethernet LAN. The figure shows a single LAN switch five cables and five other Ethernet nodes: three PCs a printer and one network device called a router. The router connects the LAN to the WAN in this case to the Internet. F0/4 To Internet F0/3 F0/2 F0/1 Switch Router Figure 2-1 Typical Small Ethernet-Only SOHO LAN Although Figure 2-1 shows a simple Ethernet LAN many SOHO Ethernet LANs today combine the router and switch into a single device. Vendors sell consumer-grade integrated networking devices that work as a router and Ethernet switch as well as doing other func- tions. These devices typically have “router” on the packaging but many models also have four-port or eight-port Ethernet LAN switch ports built in to the device. Typical SOHO LANs today also support wireless LAN connections. Ethernet defines wired LAN technology only in other words Ethernet LANs use cables. However you can build one LAN that uses both Ethernet LAN technology as well as wireless LAN technology which is also defined by the IEEE. Wireless LANs defined by the IEEE using standards that begin with 802.11 use radio waves to send the bits from one node to the next. Most wireless LANs rely on yet another networking device: a wireless LAN access point AP. The AP acts somewhat like an Ethernet switch in that all the wireless LAN nodes com- municate with the Ethernet switch by sending and receiving data with the wireless AP. Of course as a wireless device the AP does not need Ethernet ports for cables other than for a single Ethernet link to connect the AP to the Ethernet LAN as shown in Figure 2-2. Answers to the “Do I Know This Already” quiz: 1 A 2 C 3 B 4 B D and E 5 B 6 C 7 B C and E 8 C and D

slide 96:

ptg17246291 42 CCENT/CCNA ICND1 100-105 Official Cert Guide F0/2 Tablets F0/1 Switch Access Point To Internet Router Figure 2-2 Typical Small Wired and Wireless SOHO LAN Note that this drawing shows the router Ethernet switch and wireless LAN access point as three separate devices so that you can better understand the different roles. However most SOHO networks today would use a single device often labeled as a “wireless router” that does all these functions. Typical Enterprise LANs Enterprise networks have similar needs compared to a SOHO network but on a much larger scale. For example enterprise Ethernet LANs begin with LAN switches installed in a wiring closet behind a locked door on each floor of a building. The electricians install the Ethernet cabling from that wiring closet to cubicles and conference rooms where devices might need to connect to the LAN. At the same time most enterprises also support wireless LANs in the same space to allow people to roam around and still work and to support a growing number of devices that do not have an Ethernet LAN interface. Figure 2-3 shows a conceptual view of a typical enterprise LAN in a three-story building. Each floor has an Ethernet LAN switch and a wireless LAN AP . To allow communication between floors each per-floor switch connects to one centralized distribution switch. For example PC3 can send data to PC2 but it would first flow through switch SW3 to the first floor to the dis- tribution switch SWD and then back up through switch SW2 on the second floor. PC3 Building 3rd Floor 2nd Floor 1st Floor To Rest of Enterprise Network SW3 PC2 SW2 PC1 SW1 SWD Figure 2-3 Single-Building Enterprise Wired and Wireless LAN

slide 97:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 43 2 The figure also shows the typical way to connect a LAN to a WAN using a router. LAN switches and wireless access points work to create the LAN itself. Routers connect to both the LAN and the WAN. To connect to the LAN the router simply uses an Ethernet LAN interface and an Ethernet cable as shown on the lower right of Figure 2-3. The rest of this chapter focuses on Ethernet in particular. The Variety of Ethernet Physical Layer Standards The term Ethernet refers to an entire family of standards. Some standards define the specif- ics of how to send data over a particular type of cabling and at a particular speed. Other standards define protocols or rules that the Ethernet nodes must follow to be a part of an Ethernet LAN. All these Ethernet standards come from the IEEE and include the number 802.3 as the beginning part of the standard name. Ethernet supports a large variety of options for physical Ethernet links given its long history over the last 40 or so years. Today Ethernet includes many standards for different kinds of optical and copper cabling and for speeds from 10 megabits per second Mbps up to 100 gigabits per second Gbps. The standards also differ as far as the types of cabling and the allowed length of the cabling. The most fundamental cabling choice has to do with the materials used inside the cable for the physical transmission of bits: either copper wires or glass fibers. The use of unshielded twisted-pair UTP cabling saves money compared to optical fibers with Ethernet nodes using the wires inside the cable to send data over electrical circuits. Fiber-optic cabling the more expensive alternative allows Ethernet nodes to send light over glass fibers in the center of the cable. Although more expensive optical cables typically allow longer cabling distances between nodes. To be ready to choose the products to purchase for a new Ethernet LAN a network engi- neer must know the names and features of the different Ethernet standards supported in Ethernet products. The IEEE defines Ethernet physical layer standards using a couple of naming conventions. The formal name begins with 802.3 followed by some suffix letters. The IEEE also uses more meaningful shortcut names that identify the speed as well as a clue about whether the cabling is UTP with a suffix that includes T or fiber with a suffix that includes X. Table 2-2 lists a few Ethernet physical layer standards. First the table lists enough names so that you get a sense of the IEEE naming conventions. It also lists the four most common standards that use UTP cabling because this book’s discussion of Ethernet focuses mainly on the UTP options. Table 2-2 Examples of Types of Ethernet Speed Common Name Informal IEEE Standard Name Formal IEEE Standard Name Cable Type Maximum Length 10 Mbps Ethernet 10BASE-T 802.3 Copper 100 m 100 Mbps Fast Ethernet 100BASE-T 802.3u Copper 100 m 1000 Mbps Gigabit Ethernet 1000BASE-LX 802.3z Fiber 5000 m 1000 Mbps Gigabit Ethernet 1000BASE-T 802.3ab Copper 100 m 10 Gb p s 10 Gig E th e r n e t 10GBASE-T 802 .3an Co p pe r 100 m

slide 98:

ptg17246291 44 CCENT/CCNA ICND1 100-105 Official Cert Guide NOTE Fiber-optic cabling contains long thin strands of fiberglass. The attached Ethernet nodes send light over the glass fiber in the cable encoding the bits as changes in the light. Consistent Behavior over All Links Using the Ethernet Data Link Layer Although Ethernet includes many physical layer standards Ethernet acts like a single LAN technology because it uses the same data link layer standard over all types of Ethernet physical links. That standard defines a common Ethernet header and trailer. As a reminder the header and trailer are bytes of overhead data that Ethernet uses to do its job of sending data over a LAN. No matter whether the data flows over a UTP cable or any kind of fiber cable and no matter the speed the data-link header and trailer use the same format. While the physical layer standards focus on sending bits over a cable the Ethernet data-link protocols focus on sending an Ethernet frame from source to destination Ethernet node. From a data-link perspective nodes build and forward frames. As first defined in Chapter 1 “Introduction to TCP/IP Networking” the term frame specifically refers to the header and trailer of a data-link protocol plus the data encapsulated inside that header and trailer. The various Ethernet nodes simply forward the frame over all the required links to deliver the frame to the correct destination. Figure 2-4 shows an example of the process. In this case PC1 sends an Ethernet frame to PC3. The frame travels over a UTP link to Ethernet switch SW1 then over fiber links to Ethernet switches SW2 and SW3 and finally over another UTP link to PC3. Note that the bits actually travel at four different speeds in this example: 10 Mbps 1 Gbps 10 Gbps and 100 Mbps respectively . 10 Mbps UTP 1 SW1 Eth Data Eth Eth Data Eth 1 1 Gbps UTP 1 Gbps Fiber 10 Gbps Fiber 200m 1km 2 SW2 100 Mbps UTP 3 SW3 4 2 3 Figure 2-4 Ethernet LAN Forwards a Data-Link Frame over Many Types of Links So what is an Ethernet LAN It is a combination of user devices LAN switches and dif- ferent kinds of cabling. Each link can use different types of cables at different speeds. However they all work together to deliver Ethernet frames from the one device on the LAN to some other device. The rest of this chapter takes these concepts a little deeper first looking at the details of building the physical Ethernet network followed by some discussion of the rules for forwarding frames through an Ethernet LAN .

slide 99:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 45 2 Building Physical Ethernet Networks with UTP For this second of three major sections of this chapter I focus on the individual physical links between any two Ethernet nodes. Before the Ethernet network as a whole can send Ethernet frames between user devices each node must be ready and able to send data over an individual physical link. This section looks at some of the particulars of how Ethernet sends data over these links. This section focuses on the three most commonly used Ethernet standards: 10BASE-T Ethernet 100BASE-T Fast Ethernet or FE and 1000BASE-T Gigabit Ethernet or GE. Specifically this section looks at the details of sending data in both directions over a UTP cable. It then examines the specific wiring of the UTP cables used for 10-Mbps 100-Mbps and 1000-Mbps Ethernet. Transmitting Data Using Twisted Pairs While it is true that Ethernet sends data over UTP cables the physical means to send the data uses electricity that flows over the wires inside the UTP cable. To better understand how Ethernet sends data using electricity break the idea down into two parts: how to create an electrical circuit and then how to make that electrical signal communicate 1s and 0s. First to create one electrical circuit Ethernet defines how to use the two wires inside a single twisted pair of wires as shown in Figure 2-5. The figure does not show a UTP cable between two nodes but instead shows two individual wires that are inside the UTP cable. An electrical circuit requires a complete loop so the two nodes using circuitry on their Ethernet ports connect the wires in one pair to complete a loop allowing electricity to flow. Node 1 Node 2 Transmitter Electrical Current One Wire in a Pair Receiver Other Wire Same Pair Figure 2-5 Creating One Electrical Circuit over One Pair to Send in One Direction To send data the two devices follow some rules called an encoding scheme. The idea works a lot like when two people talk using the same language: The speaker says some words in a particular language and the listener because she speaks the same language can understand the spoken words. With an encoding scheme the transmitting node changes the electrical signal over time while the other node the receiver using the same rules interprets those changes as either 0s or 1s. For example 10BASE-T uses an encoding scheme that encodes a binary 0 as a transition from higher voltage to lower voltage during the middle of a 1/10000000th-of-a-second interval. Note that in an actual UTP cable the wires will be twisted together instead of being parallel as shown in Figure 2-5. The twisting helps solve some important physical transmission issues. When electrical current passes over any wire it creates electromagnetic interference EMI

slide 100:

ptg17246291 46 CCENT/CCNA ICND1 100-105 Official Cert Guide that interferes with the electrical signals in nearby wires including the wires in the same cable. EMI between wire pairs in the same cable is called crosstalk. Twisting the wire pairs together helps cancel out most of the EMI so most networking physical links that use copper w ir e s u s e t w ist e d pair s. Breaking Down a UTP Ethernet Link The term Ethernet link refers to any physical cable between two Ethernet nodes. To learn about how a UTP Ethernet link works it helps to break down the physical link into those basic pieces as shown in Figure 2-6: the cable itself the connectors on the ends of the cable and the matching ports on the devices into which the connectors will be inserted. Node Node Cable with Wires Inside RJ-45 Connectors RJ-45 Port RJ-45 Port Figure 2-6 Basic Components of an Ethernet Link First think about the UTP cable itself. The cable holds some copper wires grouped as twisted pairs. The 10BASE-T and 100BASE-T standards require two pairs of wires while the 1000BASE-T standard requires four pairs. Each wire has a color-coded plastic coating with the wires in a pair having a color scheme. For example for the blue wire pair one wire’s coating is all blue while the other wire’s coating is blue-and-white striped. Many Ethernet UTP cables use an RJ-45 connector on both ends. The RJ-45 connector has eight physical locations into which the eight wires in the cable can be inserted called pin positions or simply pins. These pins create a place where the ends of the copper wires can touch the electronics inside the nodes at the end of the physical link so that electricity can flow. NOTE If available find a nearby Ethernet UTP cable and examine the connectors closely. Look for the pin positions and the colors of the wires in the connector. To complete the physical link the nodes each need an RJ-45 Ethernet port that matches the RJ-45 connectors on the cable so that the connectors on the ends of the cable can con- nect to each node. PCs often include this RJ-45 Ethernet port as part of a network interface card NIC which can be an expansion card on the PC or can be built in to the system itself. Switches typically have many RJ-45 ports because switches give user devices a place to con- nect to the Ethernet LAN. Figure 2-7 shows photos of the cables connectors and ports.

slide 101:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 47 2 RJ-45 Ports RJ-45 Connector Figure 2-7 RJ-45 Connectors and Ports Ethernet NIC © Mark Jansen LAN Cable © Mikko Pitkänen NOTE The RJ-45 connector is slightly wider but otherwise similar to the RJ-11 connec- tors commonly used for telephone cables in homes in North America. The figure shows a connector on the left and ports on the right. The left shows the eight pin positions in the end of the RJ-45 connector. The upper right shows an Ethernet NIC that is not yet installed in a computer. The lower-right part of the figure shows the side of a Cisco 2960 switch with multiple RJ-45 ports allowing multiple devices to easily connect to the Ethernet network. Finally while RJ-45 connectors with UTP cabling can be common Cisco LAN switches often support other types of connectors as well. When you buy one of the many models of Cisco switches you need to think about the mix and numbers of each type of physical ports you want on the switch. To give its customers flexibility as to the type of Ethernet links even after the customer has bought the switch Cisco switches include some physical ports whose port hardware the transceiver can be changed later after you purchase the switch. For example Figure 2-8 shows a photo of a Cisco switch with one of the swappable trans- ceivers. In this case the figure shows an enhanced small form-factor pluggable SFP+ trans- ceiver which runs at 10 Gbps just outside two SFP+ slots on a Cisco 3560CX switch. The SFP+ itself is the silver colored part below the switch with a black cable connected to it.

slide 102:

ptg17246291 48 CCENT/CCNA ICND1 100-105 Official Cert Guide Cable SFP+ Figure 2-8 10Gbps SFP+ with Cable Sitting Just Outside a Catalyst 3560CX Switch UTP Cabling Pinouts for 10BASE-T and 100BASE-T So far in this section you have learned about the equivalent of how to drive a truck on a 1000- acre ranch but you do not know the equivalent of the local traffic rules. If you worked the ranch you could drive the truck all over the ranch any place you wanted to go and the police would not mind. However as soon as you get on the public roads the police want you to behave and follow the rules. Similarly so far this chapter has discussed the general principles of how to send data but it has not yet detailed some important rules for Ethernet cabling: the rules of the road so that all the devices send data using the right wires inside the cable. This next topic discusses conventions for 10BASE-T and 100BASE-T together because they use UTP cabling in similar ways including the use of only two wire pairs. A short compari- son of the wiring for 1000BASE-T Gigabit Ethernet which uses four pairs follows. Straight-Through Cable Pinout 10BASE-T and 100BASE-T use two pairs of wires in a UTP cable one for each direction as shown in Figure 2-9. The figure shows four wires all of which sit inside a single UTP cable that connects a PC and a LAN switch. In this example the PC on the left transmits using the top pair and the switch on the right transmits using the bottom pair. PC Switch Receiver Data Flow One Twisted Pair Transmitter Transmitter Data Flow One Twisted Pair 11 22 33 66 Receiver Figure 2-9 Using One Pair for Each Transmission Direction with 10- and 100-Mbps Ethernet

slide 103:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 49 2 For correct transmission over the link the wires in the UTP cable must be connected to the correct pin positions in the RJ-45 connectors. For example in Figure 2-9 the transmitter on the PC on the left must know the pin positions of the two wires it should use to trans- mit. Those two wires must be connected to the correct pins in the RJ-45 connector on the switch so that the switch’s receiver logic can use the correct wires. To understand the wiring of the cable—which wires need to be in which pin positions on both ends of the cable—you need to first understand how the NICs and switches work. As a rule Ethernet NIC transmitters use the pair connected to pins 1 and 2 the NIC receivers use a pair of wires at pin positions 3 and 6. LAN switches knowing those facts about what Ethernet NICs do do the opposite: Their receivers use the wire pair at pins 1 and 2 and their transmitters use the wire pair at pins 3 and 6. To allow a PC NIC to communicate with a switch the UTP cable must also use a straight- through cable pinout. The term pinout refers to the wiring of which color wire is placed in each of the eight numbered pin positions in the RJ-45 connector. An Ethernet straight- through cable connects the wire at pin 1 on one end of the cable to pin 1 at the other end of the cable the wire at pin 2 needs to connect to pin 2 on the other end of the cable pin 3 on one end connects to pin 3 on the other and so on. Also it uses the wires in one wire pair at pins 1 and 2 and another pair at pins 3 and 6. Ports 12345678 12345678 12345678 12345678 Connectors Figure 2-10 10BASE-T and 100BASE-T Straight-Through Cable Pinout Figure 2-11 shows one final perspective on the straight-through cable pinout. In this case PC Larry connects to a LAN switch. Note that the figure again does not show the UTP cable but instead shows the wires that sit inside the cable to emphasize the idea of wire pairs and pins. Larry Switch 12 12 Straight-Through Cable NIC 36 36 Figure 2-11 Ethernet Straight-Through Cable Concept

slide 104:

ptg17246291 50 CCENT/CCNA ICND1 100-105 Official Cert Guide A straight-through cable works correctly when the nodes use opposite pairs for transmit- ting data. However when two like devices connect to an Ethernet link they both transmit on the same pins. In that case you then need another type of cabling pinout called a cross- over cable. The crossover cable pinout crosses the pair at the transmit pins on each device to the receive pins on the opposite device. While that previous sentence is true this concept is much clearer with a figure such as Figure 2-12. The figure shows what happens on a link between two switches. The two switches both transmit on the pair at pins 3 and 6 and they both receive on the pair at pins 1 and 2. So the cable must connect a pair at pins 3 and 6 on each side to pins 1 and 2 on the other side connecting to the other node’s receiver logic. The top of the figure shows the literal pinouts and the bo ttom half shows a conceptual diagram. RJ-45 Pins 6 3 2 1 6 3 2 1 12 12 36 36 RJ-45 Pins Figure 2-12 Crossover Ethernet Cable Choosing the Right Cable Pinouts For the exam you should be well prepared to choose which type of cable straight-through or crossover is needed in each part of the network. The key is to know whether a device acts like a PC NIC transmitting at pins 1 and 2 or like a switch transmitting at pins 3 and 6. Then just apply the following logic: Crossover cable: If the endpoints transmit on the same pin pair Straight-through cable: If the endpoints transmit on different pin pairs Table 2-3 lists the devices and the pin pairs they use assuming that they use 10BASE-T and 100BASE-T. Table 2-3 10BASE-T and 100BASE-T Pin Pairs Used Transmits on Pins 12 Transmits on Pins 36 PC NICs Hubs Routers Switches Wireless access point Ethernet interface — For example Figure 2-13 shows a campus LAN in a single building. In this case several straight-through cables are used to connect PCs to switches. In addition the cables connect- ing the switches require crossover cables.

slide 105:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 51 2 Building 1 Straight- through Cables Building 2 Straight- through Cables Crossover Cables Switch 11 Switch 12 Switch 21 Switch 22 Figure 2-13 Typical Uses for Straight-Through and Crossover Ethernet Cables NOTE If you have some experience with installing LANs you might be thinking that you have used the wrong cable before straight-through or crossover but the cable worked. Cisco switches have a feature called auto-mdix that notices when the wrong cable is used and automatically changes its logic to make the link work. However for the exams be ready to identify whether the correct cable is shown in the figures. UTP Cabling Pinouts for 1000BASE-T 1000BASE-T Gigabit Ethernet differs from 10BASE-T and 100BASE-T as far as the cabling and pinouts. First 1000BASE-T requires four wire pairs. Second it uses more advanced electronics that allow both ends to transmit and receive simultaneously on each wire pair. However the wiring pinouts for 1000BASE-T work almost identically to the earlier stan- dards adding details for the additional two pairs. The straight-through cable connects each pin with the same numbered pin on the other side but it does so for all eight pins—pin 1 to pin 1 pin 2 to pin 2 up through pin 8. It keeps one pair at pins 1 and 2 and another at pins 3 and 6 just like in the earlier wiring. It adds a pair at pins 4 and 5 and the final pair at pins 7 and 8 refer to Figure 2-10. The Gigabit Ethernet crossover cable crosses the same two-wire pairs as the crossover cable for the other types of Ethernet the pairs at pins 12 and 36. It also crosses the two new pairs as well the pair at pins 45 with the pair at pins 7 8. Sending Data in Ethernet Networks Although physical layer standards vary quite a bit other parts of the Ethernet standards work the same way regardless of the type of physical Ethernet link. Next this final major section of this chapter looks at several protocols and rules that Ethernet uses regardless of the type of link. In particular this section examines the details of the Ethernet data link layer protocol plus how Ethernet nodes switches and hubs forward Ethernet frames through an Ethernet LAN. Ethernet Data-Link Protocols One of the most significant strengths of the Ethernet family of protocols is that these pro- tocols use the same data-link standard. In fact the core parts of the data-link standard date back to the original Ethernet standards.

slide 106:

ptg17246291 52 CCENT/CCNA ICND1 100-105 Official Cert Guide The Ethernet data-link protocol defines the Ethernet frame: an Ethernet header at the front the encapsulated data in the middle and an Ethernet trailer at the end. Ethernet actually defines a few alternate formats for the header with the frame format shown in Figure 2-14 being commonly used today. Preamble 7 SFD 1 Destination Header Trailer Bytes 6 Source 6 Type 2 Data and Pad 46 – 1500 FCS 4 Figure 2-14 Commonly Used Ethernet Frame Format While all the fields in the frame matter some matter more to the topics discussed in this book. Table 2-4 lists the fields in the header and trailer and a brief description for reference with the upcoming pages including more detail about a few of these fields. Table 2-4 IEEE 802.3 Ethernet Header and Trailer Fields Field Bytes Description Preamble 7 Synchronization. Start Frame Delimiter SFD 1 Signifies that the next byte begins the Destination MAC Address field. Destination MAC Address 6 Identifies the intended recipient of this frame. Source MAC Address 6 Identifies the sender of this frame. Type 2 Defines the type of protocol listed inside the frame today most likely identifies IP version 4 IPv4 or IP version 6 IPv6. Data and Pad 46– 1500 Holds data from a higher layer typically an L3PDU usually an IPv4 or IPv6 packet. The sender adds padding to meet the minimum length requirement for this field 46 bytes. Frame Check Sequence FCS 4 Provides a method for the receiving NIC to determine whether the frame experienced transmission errors. The IEEE 802.3 specifi cation limits the data portion of the 802.3 frame to a minimum of 46 and a maximum of 1500 bytes. The term maximum transmission unit MTU defi nes the maximum Layer 3 packet that can be sent over a medium. Because the Layer 3 packet rests inside the data portion of an Ethernet frame 1500 bytes is the largest IP MTU allowed over an Ethernet . Ethernet Addressing The source and destination Ethernet address fields play a huge role in how Ethernet LANs work. The general idea for each is relatively simple: The sending node puts its own address in the source address field and the intended Ethernet destination device’s address in the des- tination address field. The sender transmits the frame expecting that the Ethernet LAN as a whole will deliver the frame to that correct destination. Ethernet addresses also called Media Access Control MAC addresses are 6-byte-long 48-bit- long binary numbers. For convenience most computers list MAC addresses as 12-digit hexa- decimal numbers. Cisco devices typically add some periods to the number for easier readabil- ity as well for example a Cisco switch might list a MAC address as 0000.0C12.3456.

slide 107:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 53 2 Most MAC addresses represent a single NIC or other Ethernet port so these addresses are often called a unicast Ethernet address. The term unicast is simply a formal way to refer to the fact that the address represents one interface to the Ethernet LAN. This term also con- trasts with two other types of Ethernet addresses broadcast and multicast which will be defined later in this section. The entire idea of sending data to a destination unicast MAC address works well but it works only if all the unicast MAC addresses are unique. If two NICs tried to use the same MAC address there could be confusion. The problem would be like the confusion caused to the postal service if you and I both tried to use the same mailing address—would the postal service deliver mail to your house or mine If two PCs on the same Ethernet tried to use the same MAC address to which PC should frames sent to that MAC address be delivered Ethernet solves this problem using an administrative process so that at the time of manufacture all Ethernet devices are assigned a universally unique MAC address. Before a manufacturer can build Ethernet products it must ask the IEEE to assign the manu- facturer a universally unique 3-byte code called the organizationally unique identifier OUI. The manufacturer agrees to give all NICs and other Ethernet products a MAC address that begins with its assigned 3-byte OUI. The manufacturer also assigns a unique value for the last 3 bytes a number that manufacturer has never used with that OUI. As a result the MAC address of every device in the universe is unique. NOTE The IEEE also calls these universal MAC addresses global MAC addresses. Figure 2-15 shows the structure of the unicast MAC address with the OUI. 24 Bits 24 Bits 6 Hex Digits 6 Hex Digits 00 60 2F 3A 07 BC Organizationally Unique Identifier OUI Vendor Assigned NIC Cards Interfaces Size in bits Size in hex digits Example Figure 2-15 Structure of Unicast Ethernet Addresses Ethernet addresses go by many names: LAN address Ethernet address hardware address burned-in address physical address universal address or MAC address. For example the term burned-in address BIA refers to the idea that a permanent MAC address has been encoded burned into the ROM chip on the NIC. As another example the IEEE uses the term universal address to emphasize the fact that the address assigned to a NIC by a manu- facturer should be unique among all MAC addresses in the universe. In addition to unicast addresses Ethernet also uses group addresses. Group addresses iden- tify more than one LAN interface card. A frame sent to a group address might be delivered to a small set of devices on the LAN or even to all devices on the LAN. In fact the IEEE defines two general categories of group addresses for Ethernet:

slide 108:

ptg17246291 54 CCENT/CCNA ICND1 100-105 Official Cert Guide Broadcast address: Frames sent to this address should be delivered to all devices on the Ethernet LAN. It has a value of FFFF.FFFF.FFFF. Multicast addresses: Frames sent to a multicast Ethernet address will be copied and for- warded to a subset of the devices on the LAN that volunteers to receive frames sent to a specific multicast address. Table 2-5 summarizes most of the details about MAC addresses. Table 2-5 LAN MAC Address T erminology and Features LAN Addressing Term or Feature Description MAC Media Access Control. 802.3 Ethernet defines the MAC sublayer of IEEE Ethernet. Ethernet address NIC address LAN address Other names often used instead of MAC address. These terms describe the 6-byte address of the LAN interface card. Burned-in address The 6-byte address assigned by the vendor making the card. Unicast address A term for a MAC address that represents a single LAN interface. Broadcast address An address that means “all devices that reside on this LAN right now.” Multicast address On Ethernet a multicast address implies some subset of all devices c ur r e ntly o n th e E th e r n e t L AN. Identifying Network Layer Protocols with the Ethernet Type Field While the Ethernet header’s address fields play an important and more obvious role in Ethernet LANs the Ethernet Type field plays a much less obvious role. The Ethernet Type field or EtherType sits in the Ethernet data link layer header but its purpose is to directly help the network processing on routers and hosts. Basically the Type field identifies the type of network layer Layer 3 packet that sits inside the Ethernet frame. First think about what sits inside the data part of the Ethernet frame shown earlier in Figure 2-14. Typically it holds the network layer packet created by the network layer protocol on some device in the network. Over the years those protocols have included IBM Systems Network Architecture SNA Novell NetWare Digital Equipment Corporation’s DECnet and Apple Computer’s AppleTalk. Today the most common network layer protocols are both from TCP/IP: IP version 4 IPv4 and IP version 6 IPv6. The original host has a place to insert a value a hexadecimal number to identify the type of packet encapsulated inside the Ethernet frame. However what number should the sender put in the header to identify an IPv4 packet as the type Or an IPv6 packet As it turns out the IEEE manages a list of EtherType values so that every network layer protocol that needs a unique EtherType value can have a number. The sender just has to know the list. Anyone can view the list just go to www.ieee.org and search for EtherType. For example a host can send one Ethernet frame with an IPv4 packet and the next Ethernet frame with an IPv6 packet. Each frame would have a different Ethernet Type field value using the values reserved by the IEEE as shown in Figure 2-16.

slide 109:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 55 2 Eth Header IPv4 Type 0800 Eth Trailer Eth Header IPv6 Type 86DD Eth Trailer R1 SW1 Figure 2-16 Use of Ethernet Type Field Error Detection with FCS Ethernet also defines a way for nodes to find out whether a frame’s bits changed while crossing over an Ethernet link. Usually the bits could change because of some kind of elec- trical interference or a bad NIC. Ethernet like most data-link protocols uses a field in the data-link trailer for the purpose of error detection. The Ethernet Frame Check Sequence FCS field in the Ethernet trailer—the only field in the Ethernet trailer—gives the receiving node a way to compare results with the sender to discover whether errors occurred in the frame. The sender applies a complex math formula to the frame before sending it storing the result of the formula in the FCS field. The receiv- er applies the same math formula to the received frame. The receiver then compares its own results with the sender’s results. If the results are the same the frame did not change other- wise an error occurred and the receiver discards the frame. Note that error detection does not also mean error recovery. Ethernet defines that the errored frame should be discarded but Ethernet does not attempt to recover the lost frame. Other protocols notably TCP recover the lost data by noticing that it is lost and sending the data again. Sending Ethernet Frames with Switches and Hubs Ethernet LANs behave slightly differently depending on whether the LAN has mostly mod- ern devices in particular LAN switches instead of some older LAN devices called LAN hubs. Basically the use of more modern switches allows the use of full-duplex logic which is much faster and simpler than half-duplex logic which is required when using hubs. The final topic in this chapter looks at these basic differences. Sending in Modern Ethernet LANs Using Full Duplex Modern Ethernet LANs use a variety of Ethernet physical standards but with standard Ethernet frames that can flow over any of these types of physical links. Each individual link can run at a different speed but each link allows the attached nodes to send the bits in the frame to the next node. They must work together to deliver the data from the sending Ethernet node to the destination node. The process is relatively simple on purpose the simplicity lets each device send a large number of frames per second. Figure 2-17 shows an example in which PC1 sends an Ethernet frame to PC2.

slide 110:

ptg17246291 56 CCENT/CCNA ICND1 100-105 Official Cert Guide Full 1000Base-T G0/1 Source PC1 Dest PC2 10BASE-T Full 2 1 3 Data Eth Eth 4 Data Eth Eth 100BASE-T Full F0/2 1 2 SW2 SW1 Figure 2-17 Example of Sending Data in a Modern Ethernet LAN Following the steps in the figure: 1. PC1 builds and sends the original Ethernet frame using its own MAC address as the source address and PC2’s MAC address as the destination address. 2. Switch SW1 receives and forwards the Ethernet frame out its G0/1 interface short for Gigabit interface 0/1 to SW2. 3. Switch SW2 receives and forwards the Ethernet frame out its F0/2 interface short for Fast Ethernet interface 0/2 to PC2. 4. PC2 receives the frame recognizes the destination MAC address as its own and pro- cesses the frame. The Ethernet network in Figure 2-17 uses full duplex on each link but the concept might be difficult to see. Full-duplex means that that the NIC or switch port has no half-duplex restrictions. So to understand full duplex you need to understand half duplex as follows: Half duplex: The device must wait to send if it is currently receiving a frame in other words it cannot send and receive at the same time. Full duplex: The device does not have to wait before sending it can send and receive at the same time. So with all PCs and LAN switches and no LAN hubs all the nodes can use full duplex. All nodes can send and receive on their port at the same instant in time. For example in Figure 2-17 PC1 and PC2 could send frames to each other simultaneously in both directions without any half-duplex restrictions. Using Half Duplex with LAN Hubs To understand the need for half-duplex logic in some cases you have to understand a little about an older type of networking device called a LAN hub. When the IEEE first introduced 10BASE-T in 1990 the Ethernet did not yet include LAN switches. Instead of switches vendors created LAN hubs. The LAN hub provided a number of RJ-45 ports as a place to connect links to PCs just like a LAN switch but it used different rules for forward- ing data.

slide 111:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 57 2 LAN hubs forward data using physical layer standards and are therefore considered to be Layer 1 devices. When an electrical signal comes in one hub port the hub repeats that elec- trical signal out all other ports except the incoming port. By doing so the data reaches all the rest of the nodes connected to the hub so the data hopefully reaches the correct desti- nation. The hub has no concept of Ethernet frames of addresses and so on. The downside of using LAN hubs is that if two or more devices transmitted a signal at the same instant the electrical signal collides and becomes garbled. The hub repeats all received electrical signals even if it receives multiple signals at the same time. For example Figure 2-18 shows the idea with PCs Archie and Bob sending an electrical signal at the same instant of time at Steps 1A and 1B and the hub repeating both electrical signals out toward Larry on the left Step 2. Larry Archie Bob Hub 1 Collision 1B 1A 2 Figure 2-18 Collision Occurring Because of LAN Hub Behavior NOTE For completeness note that the hub floods each frame out all other ports except the incoming port. So Archie’s frame goes to both Larry and Bob Bob’s frame goes to Larry and Archie. If you replace the hub in Figure 2-18 with a LAN switch the switch prevents the collision on the left. The switch operates as a Layer 2 device meaning that it looks at the data-link header and trailer. A switch would look at the MAC addresses and even if the switch need- ed to forward both frames to Larry on the left the switch would send one frame and queue the other frame until the first frame was finished. Now back to the issue created by the hub’s logic: collisions. To prevent these collisions the Ethernet nodes must use half-duplex logic instead of full-duplex logic. A problem occurs only when two or more devices send at the same time half-duplex logic tells the nodes that if someone else is sending wait before sending. For example back in Figure 2-18 imagine that Archie began sending his frame early enough so that Bob received the first bits of that frame before Bob tried to send his own frame. Bob at Step 1B would notice that he was receiving a frame from someone else and using half-duplex logic would simply wait to send the frame listed at Step 1B. Nodes that use half-duplex logic actually use a relatively well-known algorithm called car- rier sense multiple access with collision detection CSMA/CD. The algorithm takes care of the obvious cases but also the cases caused by unfortunate timing. For example two nodes could check for an incoming frame at the exact same instant both realize that no other node is sending and both send their frames at the exact same instant causing a collision. CSMA/CD covers these cases as well as follows: Step 1. A device with a frame to send listens until the Ethernet is not busy. Step 2. When the Ethernet is not busy the sender begins sending the frame.

slide 112:

ptg17246291 58 CCENT/CCNA ICND1 100-105 Official Cert Guide Step 3. The sender listens while sending to discover whether a collision occurs colli- sions might be caused by many reasons including unfortunate timing. If a colli- sion occurs all currently sending nodes do the following: A. They send a jamming signal that tells all nodes that a collision happened. B. They independently choose a random time to wait before trying again to avoid unfortunate timing. C. The next attempt starts again at Step 1. Although most modern LANs do not often use hubs and therefore do not need to use half duplex enough old hubs still exist in enterprise networks so that you need to be ready to understand duplex issues. Each NIC and switch port has a duplex setting. For all links between PCs and switches or between switches use full duplex. However for any link connected to a LAN hub the connected LAN switch and NIC port should use half-duplex. Note that the hub itself does not use half-duplex logic instead just repeating incoming sig- nals out every other port. Figure 2-19 shows an example with full-duplex links on the left and a single LAN hub on the right. The hub then requires SW2’s F0/2 interface to use half-duplex logic along with the PCs connected to the hub. Full Full Full Full Half Full Half Full A B C F0/2 SW2 SW1 Hub Figure 2-19 Full and Half Duplex in an Ethernet LAN Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment for more details. Table 2-6 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 2-6 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Review memory tables Book DVD/website

slide 113:

ptg17246291 Chapter 2: Fundamentals of Ethernet LANs 59 2 Review All the Key Topics Table 2-7 Key T opics for Chapter 2 Key Topic Element Description Page Number Figure 2-3 Drawing of a typical wired and wireless enterprise LAN 42 Table 2-2 Several types of Ethernet LANs and some details about each 43 Figure 2-9 Conceptual drawing of transmitting in one direction each over two different electrical circuits between two Ethernet nodes 48 Figure 2-10 10- and 100-Mbps Ethernet straight-through cable pinouts 49 Figure 2-12 10- and 100-Mbps Ethernet crossover cable pinouts 50 Table 2-3 List of devices that transmit on wire pair 12 and pair 36 50 Figure 2-13 Typical uses for straight-through and crossover Ethernet cables 51 Figure 2-15 Format of Ethernet MAC addresses 53 List Definitions of half duplex and full duplex 56 Figure 2-19 Examples of which interfaces use full duplex and which interfaces use half duplex 58 Key Terms You Should Know Ethernet IEEE wired LAN wireless LAN Ethernet frame 10BASE-T 100BASE-T 1000BASE-T Fast Ethernet Gigabit Ethernet Ethernet link RJ-45 Ethernet port net- work interface card NIC straight-through cable crossover cable Ethernet address MAC address unicast address broadcast address Frame Check Sequence

slide 114:

ptg17246291 CHAPTER 3 Fundamentals of WANs This chapter covers the following exam topics: 1.0 Network Fundamentals 1.1 Compare and contrast OSI and TCP/IP models 1.6 Select the appropriate cabling type based on implementation requirements 3.0 Routing Technologies 3.1 Describe the routing concepts 3.1.c Frame rewrite Most Layer 1 and 2 networking technology falls into one of two primary categories: wide- area networks WAN and local area networks LAN. Because both WANs and LANs match OSI Layers 1 and 2 they have many similarities: Both define cabling details transmission speeds encoding and how to send data over physical links as well as data-link frames and forwarding logic. Of course WANs and LANs have many differences as well most notably the distances between nodes and the business model for paying for the network. First in terms of the dis- tance the terms local and wide give us a small hint: LANs typically include nearby devices whereas WANs connect devices that can be far apart potentially hundreds or thousands of miles apart. The other big difference between the two is this: You pay for and own LANs but you lease WANs. With LANs you buy the cables and LAN switches and install them in spaces you control. WANs physically pass through other people’s property and you do not have the right to put your cables and devices there. So a few companies like a telephone company or cable company install and own their own devices and cables creating their own net- works and lease the right to send data over their networks. This chapter introduces WANs in three major sections. The first introduces leased line WANs a type of WAN link that has been part of enterprise networks since the 1960s. The second part shows how Ethernet can be used to create WAN services by taking advantage of the longer cable length possibilities of modern fiber-optic Ethernet standards. The last part of the chapter takes a survey of common WAN technology used to access the Internet. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 115:

ptg17246291 Table 3-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Leased Line W ANs 1–3 Ethernet as a W AN Technology 4 Accessing the Internet 5–6 1. In the cabling for a leased line which of the following typically connects to a four- wire line provided by a telco a. Router serial interface without internal CSU/DSU b. CSU/DSU c. Router serial interface with internal transceiver d. Switch serial interface 2. Which of the following is an accurate speed at which a leased line can operate in the United States a. 100 Mbps b. 100 Kbps c. 256 Kbps d. 6.4 Mbps 3. Which of the following fields in the HDLC header used by Cisco routers does Cisco add beyond the ISO standard HDLC a. Flag b. Type c. Address d. FCS 4. Two routers R1 and R2 connect using an Ethernet over MPLS service. The service provides point-to-point service between these two routers only as a Layer 2 Ethernet service. Which of the following are the most likely to be true about this WAN Choose two answers. a. R1 will connect to a physical Ethernet link with the other end of the cable con- nected to R2. b. R1 will connect to a physical Ethernet link with the other end of the cable con- nected to a device at the WAN service provider point of presence. c. R1 will forward data-link frames to R2 using an HDLC header/trailer. d. R1 will forward data-link frames to R2 using an Ethernet header/trailer.

slide 116:

ptg17246291 62 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. Which of the following Internet access technologies used to connect a site to an ISP offers asymmetric speeds Choose two answers. a. Leased lines b. DSL c. Cable Internet d. BGP 6. Fred has just added DSL service at his home with a separate DSL modem and consumer-grade router with four Ethernet ports. Fred wants to use the same old phone he was using before the installation of DSL. Which is most likely true about the phone cabling and phone used with his new DSL installation a. He uses the old phone cabled to one of the router/switch device’s Ethernet ports. b. He uses the old phone cabled to the DSL modem’s ports. c. He uses the old phone cabled to an existing telephone port and not to any new device. d. The old phone must be replaced with a digital phone. Foundation Topics Leased-Line WANs Imagine that you are the primary network engineer for an enterprise TCP/IP internetwork. Y our company is building a new building at a site 100 miles away from your corporate head- quarters. Y ou will of course install a LAN throughout the new building but you also need to connect that new remote LAN to the rest of the existing enterprise TCP/IP network. To connect the new building’s LAN to the rest of the existing corporate network you need some kind of a WAN. At a minimum that WAN must be able to send data from the remote LAN back to the rest of the existing network and vice versa. Leased line WANs do exactly that forwarding data between two routers. From a basic point of view a leased line WAN works a lot like an Ethernet crossover cable connecting two routers but with few distance limitations. Each router can send at any time full duplex over the leased line for tens hundreds or even thousands of miles. This section begins by giving some perspective about where leased lines fit with LANs and routers because one main goal for a WAN is to move data between LANs. The rest of this first section explains the physical details about leased lines followed with information about data-link protocols . Positioning Leased Lines with LANs and Routers The vast majority of end-user devices in an enterprise or small office/home office SOHO network connect directly into a LAN. Many PCs use an Ethernet network interface card NIC that connects to a switch. More and more devices use 802.11 wireless LANs with some devices like phones and tablets supporting only wireless LAN connections.

slide 117:

ptg17246291 Chapter 3: Fundamentals of WANs 63 3 Now think about a typical company that has many different locations. From a human resources perspective it might have lots of employees that work at many locations. From a facilities perspective the company might have a few large sites with hundreds or even thousands of individual branch offices stores or other small locations. However from a networking perspective think of each site as being one or more LANs that need to com- municate with each other and to communicate those LANs need to be connected to each other using a WAN. To connect LANs using a WAN the internetwork uses a router connected to each LAN with a WAN link between the routers. First the enterprise’s network engineer would order some kind of WAN link. A router at each site connects to both the WAN link and the LAN as shown in Figure 3-1. Note that a crooked line between the routers is the common way to represent a leased line when the drawing does not need to show any of the physical details of the line. PC1 LAN WAN LAN PC2 R1 R2 Figure 3-1 Small Enterprise Network with One Leased Line The world of WAN technologies includes many different options in addition to the leased line shown in the figure. WAN technology includes a large number of options for physical links as well as the data-link protocols that control those links. By comparison the wired LAN world basically has one major option today—Ethernet—because Ethernet won the wired LAN battle in the marketplace back in the 1980s and 1990s. Physical Details of Leased Lines The leased line service delivers bits in both directions at a predetermined speed using full- duplex logic. In fact conceptually it acts as if you had a full-duplex crossover Ethernet link between two routers as shown in Figure 3-2. The leased line uses two pairs of wires one pair for each direction of sending data which allows full-duplex operation. Building 1 1000 Miles Building 2 R2 R1 SW11 SW12 SW21 SW22 Figure 3-2 Conceptual View of the Leased-Line Service Answers to the “Do I Know This Already” quiz: 1 B 2 C 3 B 4 B and D 5 B and C 6 C

slide 118:

ptg17246291 64 CCENT/CCNA ICND1 100-105 Official Cert Guide Of course leased lines have many differences compared to an Ethernet crossover cable. To create such possibly long links or circuits a leased line does not actually exist as a single long cable between the two sites. Instead the telco installs a large network of cables and specialized switching devices to create its own computer network. The telco network cre- ates a service that acts like a crossover cable between two points but the physical reality is hidden from the customer. Leased lines come with their own set of terminology as well. First the term leased line refers to the fact that the company using the leased line does not own the line but instead pays a monthly lease fee to use it. However many people today use the generic term ser- vice provider to refer to a company that provides any form of WAN connectivity includ- ing Internet services. Given their long history leased lines have had many names. Table 3-2 lists some of those names mainly so that in a networking job you have a chance to translate from the terms each person uses with a basic description as to the meaning of the name. Table 3-2 Different Names for a Leased Line Name Meaning or Reference Leased circuit Circuit Th e w o r ds line and circuit are often used as synonyms in telco terminology circuit makes reference to the electrical circuit between the two endpoints. Serial link Serial line The words link and line are also often used as synonyms. Serial in this case refers to the fact that the bits flow serially and that routers use serial interfaces. Point-to-point link Point-to-point line Refers to the fact that the topology stretches between two points and two points only. Some older leased lines allowed more than two devices. T1 A specific type of leased line that transmits data at 1.544 megabits per second 1.544 Mbps. W AN link Link Both these terms are very general with no reference to any specific technology. Private line Refers to the fact that the data sent over the line cannot be copied by other telco customers so the data is private. Leased-Line Cabling To create a leased line some physical path must exist between the two routers on the ends of the link. The physical cabling must leave the buildings where each router sits. However the telco does not simply install one cable between the two buildings. Instead it uses what is typically a large and complex network that creates the appearance of a cable between the two routers. Figure 3-3 gives a little insight into the cabling that could exist inside the telco for a short leased line. Telcos put their equipment in buildings called central offices CO. The telco installs cables from the CO to most every other building in the city expecting to sell ser- vices to the people in those buildings one day. The telco would then configure its switches to use some of the capacity on each cable to send data in both directions creating the equivalent of a crossover cable between the two routers.

slide 119:

ptg17246291 Chapter 3: Fundamentals of WANs 65 3 Customer Site1 Underground Telco CO1 Telco CO2 Customer Site2 R1 R2 Switch-2 Switch-1 Figure 3-3 Possible Cabling Inside a Telco for a Short Leased Line Although what happens inside the telco is completely hidden from the telco customer enterprise engineers do need to know about the parts of the link that exist inside the cus- tomer’s building at the router . First each site has customer premises equipment CPE which includes the router serial interface card and CSU/DSU. Each router uses a serial interface card that acts somewhat like an Ethernet NIC sending and receiving data over the physical link. The physical link requires a function called a channel service unit/data service unit CSU/DSU. The CSU/DSU can either be integrated into the serial interface card in the router or sit outside the router as an external device. Figure 3-4 shows the CPE devices along with the cabling. CSU CSU TELCO CPE CPE Short Cables Usually Less Than 50 Feet Long Cables Can Be Several Miles Long R1 R2 Figure 3-4 Point-to-Point Leased Line: Components and Terminology The cabling includes a short serial cable only if an external CSU/DSU is used plus the cable installed by the telco for the leased line itself. The serial cable connects the router serial interface to the external CSU/DSU. Many cable options exist the cable just needs to match the connector of the serial interface on one end and the CSU/DSU on the other end. The four-wire cable from the telco plugs in to the CSU/DSU typically using an RJ-48 connector that has the same size and shape as an RJ-45 connector as shown in Figure 2-7 in Chapter 2 “Fundamentals of Ethernet LANs”. Telcos offer a wide variety of speeds for leased lines. However you cannot pick the exact speed you want instead you must pick from a long list of predefined speeds. Slower-speed links run at multiples of 64 kbps kilobits per second while faster links run at multiples of about 1.5 Mbps megabits per second.

slide 120:

ptg17246291 66 CCENT/CCNA ICND1 100-105 Official Cert Guide Building a WAN Link in a Lab On a practical note to prepare for the CCENT and CCNA Routing and Switching exams you can choose to buy some used router and switch hardware for hands-on practice. If you do you can create the equivalent of a leased line without a real leased line from a telco and without CSU/DSUs just using a cabling trick. This short topic tells you enough information to create a WAN link in your home lab. First the serial cables normally used between a router and an external CSU/DSU are called data terminal equipment DTE cables. To create a physical WAN link in a lab you need two serial cables: one serial DTE cable plus a similar but slightly different matching data communications equipment DCE cable. The DCE cable has a female connector while the DTE cable has a male connector which allows the two cables to be attached directly. The DCE cable also does the equivalent task of an Ethernet crossover cable by swapping the transmit and receive wire pairs as shown in Figure 3-5. Serial Cable Serial Cable DTE DCE clock rate Command Goes Here Tx Rx Tx Rx Tx Rx Tx Rx DTE Cable DCE Cable Router 2 Router 1 Figure 3-5 Serial Cabling Uses a DTE Cable and a DCE Cable The figure shows the cable details at the top with the wiring details inside the cable at the bottom. In particular at the bottom of the figure note that the DCE cable swaps the transmit and receive pairs whereas the DTE serial cable does not acting as a straight- through cable. Finally to make the link work the router with the DCE cable installed must do one func- tion normally done by the CSU/DSU. The CSU/DSU normally provides a function called clocking in which it tells the router exactly when to send each bit through signaling over the serial cable. A router serial interface can provide clocking and the more recent router software versions automatically supply clocking when the router senses a DCE cable is plugged into the serial port. Regardless of whether a router has an older or newer soft- ware version you will want to know how to configure serial clocking using the clock rate command. The section “Bandwidth and Clock Rate on Serial Interfaces” in Chapter 17 “Operating Cisco Routers” shows a sample configuration. Data-Link Details of Leased Lines A leased line provides a Layer 1 service. In other words it promises to deliver bits between the devices connected to the leased line. However the leased line itself does not define a data link layer protocol to be used on the leased line.

slide 121:

ptg17246291 Chapter 3: Fundamentals of WANs 67 3 Because leased lines define only the Layer 1 transmission service many companies and stan- dards organizations have created data-link protocols to control and use leased lines. Today the two most popular data link layer protocols used for leased lines between two routers are High-Level Data Link Control HDLC and Point-to-Point Protocol PPP. This next topic takes a brief look at HDLC just to show one example plus a few comments about how routers use WAN data-link protocols. HDLC Basics All data-link protocols perform a similar role: to control the correct delivery of data over a physical link of a particular type. For example the Ethernet data-link protocol uses a desti- nation address field to identify the correct device that should receive the data and an FCS field that allows the receiving device to determine whether the data arrived correctly. HDLC provides similar functions. HDLC has less work to do because of the simple point-to-point topology of a point-to- point leased line. When one router sends an HDLC frame it can go only one place: to the other end of the link. So while HDLC has an address field the destination is implied. The idea is sort of like when I have lunch with my friend Gary and only Gary. I do not need to start every sentence with “Hey Gary”—he knows I am talking to him. NOTE In case you wonder why HDLC has an address field at all in years past the telcos offered multidrop circuits. These circuits included more than two devices so there was more than one possible destination requiring an address field to identify the correct destination. HDLC has other fields and functions similar to Ethernet as well. Table 3-3 lists the HDLC fields with the similar Ethernet header/trailer field just for the sake of learning HDLC based on something you have already learned about Ethernet . Table 3-3 Comparing HDLC Header Fields to Ethernet HDLC Field Ethernet Equivalent Description Flag Preamble SFD Lists a recognizable bit pattern so that the receiving nodes realize that a new frame is arriving. Address Destination Address Identifies the destination device. Control N/A Mostly used for purposes no longer in use today for links between routers. Type Type Identifies the type of Layer 3 packet encapsulated inside the frame. FCS FCS A field used by the error detection process. It is the only trailer field in this table. HDLC exists today as a standard of the International Organization for Standardization ISO the same organization that brought us the OSI model. However ISO standard HDLC does not have a Type field and routers need to know the type of packet inside the frame. So Cisco routers use a Cisco-proprietary variation of HDLC that adds a Type field as shown in Figure 3-6.

slide 122:

ptg17246291 68 CCENT/CCNA ICND1 100-105 Official Cert Guide Proprietary Cisco HDLC Adds Type Field Bytes 11 1 2 Variable 2 Flag Address Control Data FCS Type Figure 3-6 HDLC Framing How Routers Use a WAN Data Link Today most leased lines connect to routers and routers focus on delivering packets to a destination host. However routers physically connect to both LANs and WANs with those LANs and WANs requiring that data be sent inside data-link frames. So now that you know a little about HDLC it helps to think about how routers use the HDLC protocol when send- ing data. First the TCP/IP network layer focuses on forwarding IP packets from the sending host to the destination host. The underlying LANs and WANs just act as a way to move the packets to the next router or end-user device. Figure 3-7 shows that network layer perspective. PC2 PC1 WAN LAN LAN 1 2 3 Final Destination PC2 Send to R1 Next Final Destination PC2 Send to R2 Next Final Destination PC2 Send to PC2 Next To PC2 To PC2 To PC2 R1 R2 Figure 3-7 IP Routing Logic over LANs and WANs Following the steps in the figure for a packet sent by PC1 to PC2’s IP address: 1. PC1’s network layer IP logic tells it to send the packet to a nearby router R1. 2. Router R1’s network layer logic tells it to forward route the packet out the leased line to Router R2 next. 3. Router R2’s network layer logic tells it to forward route the packet out the LAN link to PC2 next. While Figure 3-7 shows the network layer logic the PCs and routers must rely on the LANs and WANs in the figure to actually move the bits in the packet. Figure 3-8 shows the same figure with the same packet but this time showing some of the data link layer logic used by the hosts and routers. Basically three separate data link layer steps encapsulate the packet inside a data-link frame over three hops through the internetwork: from PC1 to R1 from R1 to R2 and from R2 to PC2.

slide 123:

ptg17246291 Chapter 3: Fundamentals of WANs 69 3 PC1 LAN1 HDLC LAN2 PC2 R1 R2 802.3 802.3 IP Packet 1 2 3 Header Trailer HDLC HDLC IP Packet Header Trailer 802.3 802.3 IP Packet Header Trailer Figure 3-8 General Concept of Routers De-encapsulating and Re-encapsulating IP Packets Following the steps in the figure again for a packet sent by PC1 to PC2’s IP address: 1. To send the IP packet to Router R1 next PC1 encapsulates the IP packet in an Ethernet frame that has the destination MAC address of R1. 2. Router R1 de-encapsulates removes the IP packet from the Ethernet frame encapsu- lates the packet into an HDLC frame using an HDLC header and trailer and forwards the HDLC frame to Router R2 next. 3. Router R2 de-encapsulates removes the IP packet from the HDLC frame encapsu- lates the packet into an Ethernet frame that has the destination MAC address of PC2 and forwards the Ethernet frame to PC2. In summary a leased line with HDLC creates a WAN link between two routers so that they can forward packets for the devices on the attached LANs. The leased line itself provides the physical means to transmit the bits in both directions. The HDLC frames provide the means to encapsulate the network layer packet correctly so that it crosses the link between routers. Leased lines have many benefits that have led to their relatively long life in the WAN mar- ketplace. These lines are simple for the customer are widely available are of high quality and are private. However they do have some negatives as well compared to newer WAN technologies including a higher cost and typically longer lead times to get the service installed. The next section looks at an alternative WAN technology used in some examples in this book: Ethernet. Ethernet as a WAN Technology For the first several decades of the existence of Ethernet Ethernet was only appropriate for LANs. The restrictions on cable lengths and devices might allow a LAN that stretched a kilometer or two to support a campus LAN but that was the limit. As time passed the IEEE improved Ethernet standards in ways that made Ethernet a reason- able WAN technology. For example the 1000BASE-LX standard uses single-mode fiber cabling with support for a 5-km cable length the 1000BASE-ZX standard supports an even longer 70-km cable length. As time went by and as the IEEE improved cabling distances for fiber Ethernet links Ethernet became a reasonable WAN technology. Today in this second decade of the twenty-first century many WAN service providers SP offer WAN services that take advantage of Ethernet. SPs offer a wide variety of these Ethernet WAN services with many different names. But all of them use a similar model with Ethernet used between the customer site and the SP’s network as shown in Figure 3-9.

slide 124:

ptg17246291 70 CCENT/CCNA ICND1 100-105 Official Cert Guide Fiber Ethernet Access Link Ethernet WAN Service R1 R2 SP1 SP2 Service Provider PoP Service Provider PoP Customer Site Customer Site Fiber Ethernet Access Link CPE CPE Figure 3-9 Fiber Ethernet Link to Connect a CPE Router to a Service Provider’s WAN The model shown in Figure 3-9 has many of the same ideas of how a telco creates a leased line as shown earlier in Figure 3-3 but now with Ethernet links and devices. The customer connects to an Ethernet link using a router interface. The fiber Ethernet link leaves the customer building and connects to some nearby SP location called a point of presence PoP. Instead of a telco switch as shown in Figure 3-3 the SP uses an Ethernet switch. Inside the SP’s network the SP uses any technology that it wants to create the specific Ethernet WAN services. Ethernet WANs that Create a Layer 2 Service The WAN services implied by Figure 3-9 include a broad number of services with a lot of complex networking concepts needed to understand those services. Yet we sit here at the third chapter of what is probably your first Cisco certification book so clearly getting into depth on these WAN services makes little sense. So this book focuses on one specific Ethernet WAN service that can be easily understood if you understand how Ethernet LANs work. NOTE For perspective about the broad world of the service provider network shown in Figure 3-9 look for more information about the Cisco CCNA CCNP and CCIE Service Provider certifications. See www.cisco.com/go/certifications for more details. The one Ethernet WAN service goes by two names: Ethernet emulation and Ethernet over MPLS EoMPLS. Ethernet emulation is a general term meaning that the service acts like one Ethernet link. EoMPLS refers to Multiprotocol Label Switching MPLS which is one technology that can be used inside the SP’s cloud. This book will refer to this specific ser- vice either as Ethernet emulation or EoMPLS. The type of EoMPLS service discussed in this book gives the customer an Ethernet link between two sites. In other words the EoMPLS service provides ■ A point-to-point connection between two customer devices ■ Behavior as if a fiber Ethernet link existed between the two devices So if you can imagine two routers with a single Ethernet link between the two routers you understand what this particular EoMPLS service does.

slide 125:

ptg17246291 Chapter 3: Fundamentals of WANs 71 3 Figure 3-10 shows the idea. In this case the two routers R1 and R2 connect with an EoMPLS service instead of a serial link. The routers use Ethernet interfaces and they can send data in both directions at the same time. Physically each router actually connects to some SP PoP as shown earlier in Figure 3-9 but logically the two routers can send Ethernet frames to each other over the link. PC1 Ethernet LAN EoMPLS WAN Ethernet LAN PC2 R1 R2 Fiber Optic Ethernet Link G0/0 G0/1 Figure 3-10 EoMPLS Acting Like a Simple Ethernet Link Between Two Routers How Routers Route IP Packets Using Ethernet Emulation WANs by their very nature give IP routers a way to forward IP packets from a LAN at one site over the WAN and to another LAN at another site. Routing over an EoMPLS WAN link still uses the WAN like a WAN as a way to forward IP packets from one site to anoth- er. However the WAN link happens to use the same Ethernet protocols as the Ethernet LAN links at each site. The EoMPLS link uses Ethernet for both Layer 1 and Layer 2 functions. That means the link uses the same familiar Ethernet header and trailer as shown in the middle of Figure 3-11. PC1 LAN1 EoMPLS WAN LAN2 PC2 R1 R2 1 2 3 G0/0 G0/1 Source R1 G0/1 MAC Destination R2 G0/0 MAC 802.3 802.3 IP Packet Header Trailer 802.3 802.3 IP Packet Header Trailer 802.3 802.3 IP Packet Header Trailer Figure 3-11 Routing over an EoMPLS Link NOTE This book shows EoMPLS connections as a familiar single black line like other Ethernet links but with a small cloud overlaid to note that this particular Ethernet link is through an Ethernet WAN service. The figure shows the same three routing steps as shown with the serial link in the earlier Figure 3-8. In this case all three routing steps use the same Ethernet 802.3 protocol. However note that each frame’s data-link header and trailer are different. Each router dis- cards the old data-link header/trailer and adds a new set as described in these steps. Focus mainly on Step 2 because compared to the similar example shown in Figure 3-8 Steps 1 and 3 are unchanged:

slide 126:

ptg17246291 72 CCENT/CCNA ICND1 100-105 Official Cert Guide 1. To send the IP packet to Router R1 next PC1 encapsulates the IP packet in an Ethernet frame that has the destination MAC address of R1. 2. Router R1 de-encapsulates removes the IP packet from the Ethernet frame and encapsulates the packet into a new Ethernet frame with a new Ethernet header and trailer. The destination MAC address is R2’s G0/0 MAC address and the source MAC address is R1’s G0/1 MAC address. R1 forwards this frame over the EoMPLS service to R2 next. 3. Router R2 de-encapsulates removes the IP packet from the Ethernet frame encapsu- lates the packet into an Ethernet frame that has the destination MAC address of PC2 and forwards the Ethernet frame to PC2. Accessing the Internet Many people begin their CCENT and CCNA Routing and Switching study never having heard of leased lines but many people have heard of two other WAN technologies used to gain access to the Internet: digital subscriber line DSL and cable. These two WAN tech- nologies do not replace leased lines in all cases but they do play an important role in the specific case of creating a WAN connection between a home or office and the Internet. This last major section of the chapter begins by introducing the basic networking concepts behind the Internet followed by some specifics of how DSL and cable provide a way to send data to/from the Internet. The Internet as a Large WAN The Internet is an amazing cultural phenomenon. Most of us use it every day. We post mes- sages on social media sites we search for information using a search engine like Google and we send emails. We use apps on our phones to pull down information like weather reports maps and movie reviews. We use the Internet to purchase physical products and to buy and download digital products like music and videos. The Internet has created completely new things to do and changed the old ways of living life compared to a generation ago. However if you instead focus on the networking technology that creates the Internet the Internet is simply one huge TCP/IP network. In fact the name “Internet” comes from the core network layer protocol: Internet Protocol. The Internet includes many LANs and because the Internet spans the globe it of course needs W AN links to connect different sites. As a network of networks the Internet is actually owned by countless companies and people. The Internet includes most every enterprise TCP/IP network and a huge number of home-based networks as well as a huge number of individuals from their phones and other wireless devices as shown in Figure 3-12. The middle of the Internet called the Internet core exists as LANs and WANs owned and operated by Internet service providers ISP. Figure 3-12 shows the Internet core as a cloud because network diagrams show a cloud when hiding the details of a part of the network. ISPs cooperate to create a mesh of links between each other in the Internet core so that no matter through which ISP a particular company or person connects some path exists to every device.

slide 127:

ptg17246291 Chapter 3: Fundamentals of WANs 73 3 Enterprise 1 Home 1 Home 2 Home 3 Phone 1 Enterprise 3 Enterprise 2 Internet Core Phone 2 Phone 3 Figure 3-12 Internet with Enterprise Home and Phone Subscribers Figure 3-13 shows a slightly different version of Figure 3-12 in this case showing the con- cept of the Internet core: ISP networks that connect to both their customers as well as each other so that IP packets can flow from every customer of every ISP to every other cus- tomer of every other ISP. Phone 1 Phone 2 Phone 3 Enterprise 1 Home 1 Home 2 Home 3 Enterprise 3 Enterprise 2 Mobile Phone Company ISP 2 ISP 3 Internet Core ISP 1 Figure 3-13 Internet Core with Multiple ISPs and Telcos Internet Access WAN Links The Internet also happens to use a huge number of WAN links. All of those lines connect- ing an enterprise or home to one of the ISPs in Figure 3-13 represent some kind of WAN link that uses a cable while the phones create their WAN link using wireless technology. These links usually go by the name Internet access link.

slide 128:

ptg17246291 74 CCENT/CCNA ICND1 100-105 Official Cert Guide Historically businesses tend to use one set of W AN technologies as Internet access links while home-based consumers use others. Businesses often use leased lines connecting a rout- er at the business to a router at the ISP . The top of Figure 3-14 shows just such an example. WAN WAN IP Enterprise TCP/IP Network Leased Line WAN WAN IP SOHO TCP/IP Network DSL WAN WAN IP SOHO TCP/IP Network ISP Cable Figure 3-14 Three Examples of Internet Access Links Consumers often use technologies like DSL and cable for Internet access links. These tech- nologies use cabling that is already installed in most homes making these services somewhat inexpensive for home users. DSL uses the analog phone lines that are already installed in homes while cable Internet uses the cable TV CATV cable. NOTE While DSL and cable are popular with consumers many businesses use these technologies for Internet access. All three of the Internet access technologies in Figure 3-14 happen to use a pair of routers: one at the customer side of the WAN link and one at the ISP side. The routers will continue to think about network layer logic of sending IP packets to their destination by forward- ing the packets to the next router. However the physical and data link layer details on the WAN link differ as compared to leased lines. The next few pages examine both DSL and cable Internet to show some of those differences. Digital Subscriber Line Digital subscriber line DSL creates a relatively short miles long not tens of miles high- speed link WAN between a telco customer and an ISP. To do so it uses the same single-pair telephone line used for a typical home phone line. DSL as a technology does not try to replace leased lines which run between any two sites for potentially very long distances. DSL instead just provides a short physical link from a home to the telco’s network allowing access to the Internet. First to get an idea about the cabling think about typical home tele- phone service in the United States before adding DSL service. Each home has one phone line that runs from a nearby telco CO to the home. As shown on the left side of Figure 3-15 the telephone wiring splits out and terminates at several wall plates often with RJ-11 ports that are a slightly skinnier cousin of the RJ-45 connector.

slide 129:

ptg17246291 Chapter 3: Fundamentals of WANs 75 3 Home Telco CO Splitter Telephone Line Voice Switch PSTN Figure 3-15 Typical Voice Cabling Concepts in the United States Next think about the telephone line and the equipment at the CO. Sometime in the past the telco installed all the telephone lines from its local CO to each neighborhood apart- ment and so on. At the CO each line connects to a port on a telco switch. This switch sup- ports the ability to set up voice calls take them down and forward the voice through the worldwide voice network called the public switched telephone network or PSTN. To add DSL service at the home in Figure 3-15 two changes need to be made. First you need to add DSL-capable devices at the home. Second the telco has to add DSL equipment at the CO. Together the DSL equipment at each side of the local telephone line can send data while still supporting the same voice traffic. The left side of Figure 3-16 shows the changes. A new DSL modem now connects to a spare phone outlet. The DSL modem follows the DSL physical and data link layer standards to send data to/from the telco. The home now has a small LAN implemented with a consumer-grade router which often includes an Ethernet switch and possibly a wireless LAN access point. Note that the telephones may now also need a short extra cable with a filter in it installed at the wall jack to filter out the sounds of the higher electrical freq uenc ie s u s e d f or DSL. Voice Switch PSTN Phone Cable DSL Modem Home Telco CO DSLAM Ethernet Cable Internet Telephone Line Figure 3-16 Wiring and Devices for a Home DSL Link

slide 130:

ptg17246291 76 CCENT/CCNA ICND1 100-105 Official Cert Guide The home-based router on the left must be able to send data to/from the Internet. To make that happen the telco CO uses a product called a DSL access multiplexer DSLAM. The DSLAM splits out the data over to the router on the lower right which completes the con- nection to the Internet. The DSLAM also splits out the voice signals over to the voice switch on the upper right. DSL gives telcos a useful high-speed Internet service to offer their customers. Telcos have had other offerings that happen to use the same telephone line for data but these options ran much slower than DSL. DSL supports asymmetric speeds meaning that the transmission speed from the ISP toward the home downstream is much faster than the transmissions toward the ISP upstream. Asymmetric speeds work better for consumer Internet access from the home because clicking a web page sends only a few hundred bytes upstream into the Internet but can trigger many megabytes of data to be delivered downstream to the home. Cable Internet Cable Internet creates an Internet access service which when viewed generally rather than specifically has many similarities to DSL. Like DSL cable Internet takes full advantage of existing cabling using the existing cable TV CATV cable to send data. Like DSL cable Internet uses asymmetric speeds sending data faster downstream than upstream which works better than symmetric speeds for most consumer locations. And like DSL cable Internet does not attempt to replace long leased lines between any two sites instead focus- ing on the short WAN links from a customer to an ISP. Cable Internet also uses the same basic in-home cabling concepts as does DSL. Figure 3-17 shows a figure based on the earlier DSL Figure 3-16 but with the DSL details replaced with cable Internet details. The telephone line has been replaced with coaxial cable from the CATV company and the DSL modem has been replaced by a cable modem. Otherwise the details in the home follow the same overall plan. CATV Cable Cable Modem Home Cable Co Ethernet Cable Internet Figure 3-17 Wiring and Devices for a Home Cable Internet Link On the CATV company side of the cable Internet service the CATV company has to split out the data and video as shown on the right side of the figure. Data flows to the lower right through a router while video comes in from video dishes for distribution out to the TVs in people’s homes.

slide 131:

ptg17246291 Chapter 3: Fundamentals of WANs 77 3 Cable Internet service and DSL directly compete for consumer and small-business Internet access. Generally speaking while both offer high speeds cable Internet typically runs at faster speeds than DSL with DSL providers keeping their prices a little lower to compete. Both support asymmetric speeds and both provide an “always on” service in that you can communicate with the Internet without the need to first take some action to start the Internet connection. Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment section titled “Step 2: Build Your Study Habits Around the Chapter” for more details. Table 3-4 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 3-4 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Review memory tables Book DVD/website Review All the Key Topics Table 3-5 Key T opics for Chapter 3 Key Topic Element Description Page Number Figure 3-4 Typical cabling diagram of CPE for a leased line 65 Figure 3-10 Ethernet over MPLS—physical connections 71 Figure 3-14 Common Internet access links 74 Figure 3-16 Typical DSL cabling at home 75 Figure 3-17 Typical cable Internet cabling at home 76 Key Terms You Should Know leased line wide-area network WAN telco serial interface HDLC DSL cable Internet Ethernet over MPLS

slide 132:

ptg17246291 CHAPTER 4 Fundamentals of IPv4 Addressing and Routing This chapter covers the following exam topics: 3.0 Routing Technologies 3.1 Describe the routing concepts 3.1.a Packet handling along the path through a network 3.1.b Forwarding decision based on route lookup 3.1.c Frame rewrite The TCP/IP network layer Layer 3 defines how to deliver IP packets over the entire trip from the original device that creates the packet to the device that needs to receive the packet. That process requires cooperation among several different jobs and concepts on a number of devices. This chapter begins with an overview of all these cooperating functions and then it dives into more detail about each area as follows: IP routing: The process of hosts and routers forwarding IP packets Layer 3 protocol data units PDU while relying on the underlying LANs and WANs to forward the bits. IP addressing: Addresses used to identify a packet’s source and destination host comput- er. Addressing rules also organize addresses into groups which greatly assists the routing process. IP routing protocol: A protocol that aids routers by dynamically learning about the IP address groups so that a router knows where to route IP packets so that they go to the right destination host. Other utilities: The network layer also relies on other utilities. For TCP/IP these utilities include Domain Name System DNS Address Resolution Protocol ARP and ping. Note that all these functions have variations both for the well-established IP version 4 IPv4 and for the emerging newer IP version 6 IPv6. This chapter focuses on IPv4 and the related protocols. Part VIII of this book looks at the same kinds of functions for IPv6. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 133:

ptg17246291 Table 4-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Overview of Network Layer Functions 1 IPv4 Addressing 2–4 IPv4 Routing 5–7 IPv4 Routing Protocols 8 Network Layer Utilities 9 1. Which of the following are functions of OSI Layer 3 protocols Choose two answers. a. Logical addressing b. Physical addressing c. Path selection d. Arbitration e. Error recovery 2. Which of the following is a valid Class C IP address that can be assigned to a host a. 1.1.1.1 b. 200.1.1.1 c. 128.128.128.128 d. 224.1.1.1 3. What is the assignable range of values for the first octet for Class A IP networks a. 0 to 127 b. 0 to 126 c. 1 to 127 d. 1 to 126 e. 128 to 191 f. 128 to 192 4. PC1 and PC2 are on two different Ethernet LANs that are separated by an IP router. PC1’s IP address is 10.1.1.1 and no subnetting is used. Which of the following addresses could be used for PC2 Choose two answers. a. 10.1.1.2 b. 10.2.2.2 c. 10.200.200.1 d. 9.1.1.1 e. 225.1.1.1 f. 1.1.1.1

slide 134:

ptg17246291 80 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. Imagine a network with two routers that are connected with a point-to-point HDLC serial link. Each router has an Ethernet with PC1 sharing the Ethernet with Router1 and PC2 sharing the Ethernet with Router2. When PC1 sends data to PC2 which of the following is true a. Router1 strips the Ethernet header and trailer off the frame received from PC1 never to be used again. b. Router1 encapsulates the Ethernet frame inside an HDLC header and sends the frame to Router2 which extracts the Ethernet frame for forwarding to PC2. c. Router1 strips the Ethernet header and trailer off the frame received from PC1 which is exactly re-created by Router2 before forwarding data to PC2. d. Router1 removes the Ethernet IP and TCP headers and rebuilds the appropriate headers before forwarding the packet to Router2. 6. Which of the following does a router normally use when making a decision about routing TCP/IP packets a. Destination MAC address b. Source MAC address c. Destination IP address d. Source IP address e. Destination MAC and IP addresses 7. Which of the following are true about a LAN-connected TCP/IP host and its IP rout- ing forwarding choices Choose two answers. a. The host always sends packets to its default gateway. b. The host sends packets to its default gateway if the destination IP address is in a different class of IP network than the host. c. The host sends packets to its default gateway if the destination IP address is in a different subnet than the host. d. The host sends packets to its default gateway if the destination IP address is in the same subnet as the host. 8. Which of the following are functions of a routing protocol Choose two answers. a. Advertising known routes to neighboring routers b. Learning routes for subnets directly connected to the router c. Learning routes and putting those routes into the routing table for routes adver- tised to the router by its neighboring routers d. Forwarding IP packets based on a packet’s destination IP address 9. A company implements a TCP/IP network with PC1 sitting on an Ethernet LAN. Which of the following protocols and features requires PC1 to learn information from some other server device a. ARP b. ping c. DNS d. None of these answers is correct.

slide 135:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 81 4 Foundation Topics Overview of Network Layer Functions Many protocol models have existed over the years but today the TCP/IP model dominates. And at the network layer of TCP/IP two options exist for the main protocol around which all other network layer functions revolve: IP version 4 IPv4 and IP version 6 IPv6. Both IPv4 and IPv6 define the same kinds of network layer functions but with different details. This chapter introduces these network layer functions for IPv4 leaving the IPv6 details until Part VIII of this book. NOTE All references to IP in this chapter refer to the older and more established IPv4. IP focuses on the job of routing data in the form of IP packets from the source host to the destination host. IP does not concern itself with the physical transmission of data instead relying on the lower TCP/IP layers to do the physical transmission of the data. Instead IP concerns itself with the logical details rather than physical details of delivering data. In par- ticular the network layer specifies how packets travel end to end over a TCP/IP network even when the packet crosses many different types of LAN and WAN links. This first section of the chapter begins a broad discussion of the TCP/IP network layer by looking at IP routing and addressing. The two topics work together because IP routing relies on the structure and meaning of IP addresses and IP addressing was designed with IP routing in mind. Following that this overview section looks at routing protocols which let routers learn the information they need to know to do routing correctly. Network Layer Routing Forwarding Logic Routers and end-user computers called hosts in a TCP/IP network work together to per- form IP routing. The host operating system OS has TCP/IP software including the soft- ware that implements the network layer. Hosts use that software to choose where to send IP packets often to a nearby router. Those routers make choices of where to send the IP packet next. Together the hosts and routers deliver the IP packet to the correct destination as shown in the example in Figure 4-1. Answers to the “Do I Know This Already” quiz: 1 A and C 2 B 3 D 4 D and F 5 A 6 C 7 B and C 8 A and C 9 C

slide 136:

ptg17246291 82 CCENT/CCNA ICND1 100-105 Official Cert Guide IP Packet Destination Is in Another Group Send to Nearby Router My Route Says: Send to R2 My Route Says: Send to R3 My Route Says: Send Directly to PC2 IP Packet IP Packet IP Packet R1 R2 R3 10.1.1.1 PC1 168.1.1.1 PC2 EoMPLS Serial Figure 4-1 Routing Logic: PC1 Sending an IP Packet to PC2 The IP packet created by PC1 goes from the top of the figure all the way to PC2 at the bottom of the figure. The next few pages discuss the network layer routing logic used by each device along the path. NOTE The term path selection is sometimes used to refer to the routing process shown in Figure 4-1. At other times it refers to routing protocols specifically how routing protocols select the best route among the competing routes to the same destination. Host Forwarding Logic: Send the Packet to the Default Router In this example PC1 does some basic analysis and then chooses to send the IP packet to the router so that the router will forward the packet. PC1 analyzes the destination address and realizes that PC2’s address 168.1.1.1 is not on the same LAN as PC1. So PC1’s logic tells it to send the packet to a device whose job it is to know where to route data: a nearby router on the same LAN called PC1’s default router. To send the IP packet to the default router the sender sends a data-link frame across the medium to the nearby router this frame includes the packet in the data portion of the frame. That frame uses data link layer Layer 2 addressing in the data-link header to ensure that the nearby router receives the frame.

slide 137:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 83 4 NOTE The default router is also referred to as the default gateway. R1 and R2’s Logic: Routing Data Across the Network All routers use the same general process to route the packet. Each router keeps an IP rout- ing table. This table lists IP address groupings called IP networks and IP subnets. When a router receives a packet it compares the packet’s destination IP address to the entries in the routing table and makes a match. This matching entry also lists directions that tell the router where to forward the packet next. In Figure 4-1 R1 would have matched the destination address 168.1.1.1 to a routing table entry which in turn told R1 to send the packet to R2 next. Similarly R2 would have matched a routing table entry that told R2 to send the packet over an Ethernet over MPLS EoMPLS link to R3 next. The routing concept works a little like driving down the freeway when approaching a big interchange. You look up and see signs for nearby towns telling you which exits to take to go to each town. Similarly the router looks at the IP routing table the equivalent of the road signs and directs each packet over the correct next LAN or WAN link the equivalent of a road. R3’s Logic: Delivering Data to the End Destination The final router in the path R3 uses almost the same logic as R1 and R2 but with one minor difference. R3 needs to forward the packet directly to PC2 not to some other router. On the surface that difference seems insignificant. In the next section when you read about how the network layer uses LANs and WANs the significance of the difference will become obvious. How Network Layer Routing Uses LANs and WANs While the network layer routing logic ignores the physical transmission details the bits still have to be transmitted. To do that work the network layer logic in a host or router must hand off the packet to the data link layer protocols which in turn ask the physical layer to actually send the data. And as was described in Chapter 2 “Fundamentals of Ethernet LANs” the data link layer adds the appropriate header and trailer to the packet creating a frame before sending the frames over each physical network. The routing process forwards the network layer packet from end to end through the net- work while each data-link frame only takes a smaller part of the trip. Each successive data link layer frame moves the packet to the next device that thinks about network layer logic. In short the network layer thinks about the bigger view of the goal like “Send this packet to the specified next device...” while the data link layer thinks about the specifics like “Encapsulate the packet in a data-link frame and transmit it.” Figure 4-2 points out the key encapsulation logic on each device using the same examples as shown in Figure 4-1.

slide 138:

ptg17246291 84 CCENT/CCNA ICND1 100-105 Official Cert Guide EoMPLS 10.1.1.1 Eth Encapsulate IP Packet in Ethernet Extract IP Packet and Encapsulate in HDLC Extract IP Packet and Encapsulate in Ethernet Extract IP Packet and Encapsulate in New Ethernet HDLC Eth Eth Eth HDLC Eth Eth IP Packet IP Packet IP Packet IP Packet R1 R2 R3 PC1 168.1.1.1 PC2 Serial HDLC Figure 4-2 Network Layer and Data Link Layer Encapsulation Because the routers build new data-link headers and trailers and because the new headers contain data-link addresses the PCs and routers must have some way to decide what data- link addresses to use. An example of how the router determines which data-link address to use is the IP Address Resolution Protocol ARP. ARP dynamically learns the data-link address of an IP host connected to a LAN. For example at the last step at the bottom of Figure 4-2 Router R3 would use ARP once to learn PC2’s MAC address before sending any packets to PC2. Routing as covered so far has two main concepts: ■ The process of routing forwards Layer 3 packets also called Layer 3 protocol data units L3 PDU based on the destination Layer 3 address in the packet. ■ The routing process uses the data link layer to encapsulate the Layer 3 packets into Layer 2 frames for transmission across each successive data link. IP Addressing and How Addressing Helps IP Routing IP defines network layer addresses that identify any host or router interface that connects to a TCP/IP network. The idea basically works like a postal address: Any interface that expects to receive IP packets needs an IP address just like you need a postal address before receiving mail from the postal service. TCP/IP groups IP addresses together so that IP addresses used on the same physical network are part of the same group. IP calls these address groups an IP network or an IP subnet. Using that same postal service analogy each IP network and IP subnet works like a postal code or in the United States a ZIP code. All nearby postal addresses are in the same postal code ZIP code while all nearby IP addresses must be in the same IP net- work or IP subnet.

slide 139:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 85 4 NOTE IP defines the word network to mean a very specific concept. To avoid confusion when writing about IP addressing this book and others often avoids using the term net- work for other uses. In particular this book uses the term internetwork to refer more gen- erally to a network made up of routers switches cables and other equipment. IP defines specific rules about which IP address should be in the same IP network or IP sub- net. Numerically the addresses in the same group have the same value in the first part of the addresses. For example Figures 4-1 and 4-2 could have used the following conventions: ■ Hosts on the top Ethernet: Addresses start with 10 ■ Hosts on the R1-R2 serial link: Addresses start with 168.10 ■ Hosts on the R2-R3 EoMPLS link: Addresses start with 168.11 ■ Hosts on the bottom Ethernet: Addresses start with 168.1 It’s similar to the USPS ZIP code system and how it requires local governments to assign addresses to new buildings. It would be ridiculous to have two houses next door to each other whose addresses had different ZIP codes. Similarly it would be silly to have people who live on opposite sides of the country to have addresses with the same ZIP code. Similarly to make routing more efficient network layer protocols group addresses both by their location and by the actual address values. A router can list one routing table entry for each IP network or subnet instead of one entry for every single IP address. The routing process also makes use of the IPv4 header as shown in Figure 4-3. The header lists a 32-bit source IP address as well as a 32-bit destination IP address. The header of course has other fields a few of which matter for other discussions in this book. The book will refer to this figure as needed but otherwise be aware of the 20-byte IP header and the existence of the source and destination IP address fields. Version Length DS Field Packet Length Identification Fragment Offset Flags Time to Live Protocol Header Checksum Source IP Address Destination IP Address 4 Bytes Figure 4-3 IPv4 Header Organized as Four Bytes Wide for a Total of 20 Bytes Routing Protocols For routing logic to work on both hosts and routers each needs to know something about the TCP/IP internetwork. Hosts need to know the IP address of their default router so that hosts can send packets to remote destinations. Routers however need to know routes so that routers know how to forward packets to each and every IP network and IP subnet. Although a network engineer could configure type all the required routes on every router most network engineers instead simply enable a routing protocol on all routers. If you

slide 140:

ptg17246291 86 CCENT/CCNA ICND1 100-105 Official Cert Guide enable the same routing protocol on all the routers in a TCP/IP internetwork with the cor- rect settings the routers will send routing protocol messages to each other. As a result all the routers will learn routes for all the IP networks and subnets in the TCP/IP internetwork. Figure 4-4 shows an example using the same diagram as in Figures 4-1 and 4-2. In this case IP network 168.1.0.0 which consists of all addresses that begin with 168.1 sits on the Ethernet at the bottom of the figure. R3 knowing this fact sends a routing protocol mes- sage to R2 Step 1. R2 learns a route for network 168.1.0.0 as a result as shown on the left. At Step 2 R2 turns around and sends a routing protocol message to R1 so that R1 now has a route for that same IP network 168.1.0.0. Subnet Interface Next Hop 168.1.0.0 Serial0 R2 R1 Routing Table Subnet Interface Next Hop 168.1.0.0 F0/0 R3 R2 Routing Table F0 S0 F0/0 1 2 R1 R2 R3 Network 168.1.0.0 Figure 4-4 Example of How Routing Protocols Advertise About Networks and Subnets This concludes the overview of how the TCP/IP network layer works. The rest of this chapter re-examines the key components in more depth. IPv4 Addressing IPv4 addressing may be the single most important topic for the CCENT and CCNA Routing and Switching exams. By the time you have finished reading this book you should be com- fortable and confident in your understanding of IP addresses their formats the grouping concepts how to subdivide groups into subnets how to interpret the documentation for existing networks’ IP addressing and so on. Simply put you had better know addressing and subnetting This section introduces IP addressing and subnetting and also covers the concepts behind the structure of an IP address including how it relates to IP routing. In Parts III and V of this book you will read more about the concepts and math behind IPv4 addressing and subnetting. Rules for IP Addresses If a device wants to communicate using TCP/IP it needs an IP address. When the device has an IP address and the appropriate software and hardware it can send and receive IP packets. Any device that has at least one interface with an IP address can send and receive IP packets and is called an IP host.

slide 141:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 87 4 IP addresses consist of a 32-bit number usually written in dotted-decimal notation DDN. The “decimal” part of the term comes from the fact that each byte 8 bits of the 32-bit IP address is shown as its decimal equivalent. The four resulting decimal numbers are writ- ten in sequence with “dots” or decimal points separating the numbers—hence the name dotted-decimal. For example 168.1.1.1 is an IP address written in dotted-decimal form the actual binary version is 10101000 00000001 00000001 00000001. You almost never need to write down the binary version but you can use the conversion chart in Appendix A “Numeric Reference Tables” to easily convert from DDN to binary or vice versa. Each DDN has four decimal octets separated by periods. The term octet is just a vendor- neutral term for byte. Because each octet represents an 8-bit binary number the range of decimal numbers in each octet is between 0 and 255 inclusive. For example the IP address of 168.1.1.1 has a first octet of 168 the second octet of 1 and so on. Finally note that each network interface uses a unique IP address. Most people tend to think that their computer has an IP address but actually their computer’s network card has an IP address. For example if your laptop has both an Ethernet network interface card NIC and a wireless NIC with both working at the same time both will have an IP address. Similarly routers which typically have many network interfaces that forward IP packets have an IP address for each interface . Rules for Grouping IP Addresses The original specifications for TCP/IP grouped IP addresses into sets of consecutive addresses called IP networks. The addresses in a single IP network have the same numeric value in the first part of all addresses in the network. Figure 4-5 shows a simple internet- work that has three separate IP networks. Network 8.0.0.0 R1 R2 PC1 PC2 PC3 All Begin with 8 Network 130.4.0.0 All Begin with 130.4 Network 199.1.1.0 All Begin with 199.1.1 8.1.1.1 8.1.1.2 ... Figure 4-5 Sample TCP/IP Internetwork Using IPv4 Network Numbers The figure lists a network identifier network ID for each network as well as a text descrip- tion of the DDN values in each network. For example the hosts in the Ethernet LAN on the far left use IP addresses that begin with a first octet of 8 the network ID happens to be 8.0.0.0. As another example the serial link between R1 and R2 consists of only two inter- faces—a serial interface on each router—and uses an IP address that begins with the three octets 199.1.1. Figure 4-5 also provides a good figure with which to discuss two important facts about how IPv4 groups IP addresses: ■ All IP addresses in the same group must not be separated from each other by a router. ■ IP addresses separated from each other by a router must be in different groups.

slide 142:

ptg17246291 88 CCENT/CCNA ICND1 100-105 Official Cert Guide Take the first of the two rules and look at hosts A and B on the left. Hosts A and B are in the same IP network and have IP addresses that begin with 8. Per the first rule hosts A and B cannot be separated from each other by a router and they are indeed not separated from each other by a router. Next take the second of the two rules and add host C to the discussion. Host C is separated from host A by at least one router so host C cannot be in the same IP network as host A. Host C’s address cannot begin with 8. NOTE This example assumes the use of IP networks only and no subnets simply because the discussion has not yet dealt with the details of subnetting. As mentioned earlier in this chapter IP address grouping behaves similarly to ZIP codes. Everyone in my ZIP code lives in a little town in Ohio. If some addresses in my ZIP code were in California some mail might be delivered to the wrong local post office because the postal service delivers the letters based on the postal ZIP codes. The post system relies on all addresses in one postal code being near to each other. Likewise IP routing relies on all addresses in one IP network or IP subnet being in the same location specifically on a single instance of a LAN or WAN data link. Otherwise the rout- ers might deliver IP packets to the wrong locations. For any TCP/IP internetwork each LAN and WAN link will use either an IP network or an IP subnet. Next this chapter looks more closely at the concepts behind IP networks fol- lowed by IP subnets. Class A B and C IP Networks The IPv4 address space includes all possible combinations of numbers for a 32-bit IPv4 address. Literally 232 different values exist with a 32-bit number for more than 4 bil- lion different numbers. With DDN values these numbers include all combinations of the values 0 through 255 in all four octets: 0.0.0.0 0.0.0.1 0.0.0.2 and all the way up to 255.255.255.255. IP standards first subdivide the entire address space into classes as identified by the value of the first octet. Class A gets roughly half of the IPv4 address space with all DDN num- bers that begin with 1–126 as shown in Figure 4-6. Class B gets one-fourth of the address space with all DDN numbers that begin with 128–191 inclusive and Class C gets one- eighth of the address space with all numbers that begin with 192–223. Figure 4-6 also notes the purpose for the five address classes. Classes A B and C define unicast IP addresses meaning that the address identifies a single host interface. Class D defines multicast addresses used to send one packet to multiple hosts. Class E originally defined experimental addresses. Class E addresses are no longer defined as experimental and are simply reserved for future use. IPv4 standards also subdivide the Class A B and C unicast classes into predefined IP net- works. Each IP network makes up a subset of the DDN values inside the class.

slide 143:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 89 4 Class E Class D Reserved Formerly Experimental Multicast Class C Class B Class A Reserved Reserved 0 1–126 127 192–223 224–239 240–255 128–191 1/16 1/16 Unicast Unicast Unicast 1/8 1/4 1/2 Figure 4-6 Division of the Entire IPv4 Address Space by Class IPv4 uses three classes of unicast addresses so that the IP networks in each class can be different sizes and therefore meet different needs. Class A networks each support a very large number of IP addresses more than 16 million host addresses per IP network. However because each Class A network is so large Class A holds only 126 Class A net- works. Class B defines IP networks that have 65534 addresses per network but with space for more than 16000 such networks. Class C defines much smaller IP networks with 254 addresses each as shown in Figure 4-7. Concept Number of Networks Hosts per Network A 16777214 B 65534 C 254 126 16384 2097152 Figure 4-7 Size of Network and Host Parts of Class A B and C Addresses

slide 144:

ptg17246291 90 CCENT/CCNA ICND1 100-105 Official Cert Guide Figure 4-7 shows a visual perspective as well as the literal numbers for all the Class A B and C IPv4 networks in the entire world. The figure shows clouds for IP networks. It of course does not show one cloud for every possible network but shows the general idea with a small number of large clouds for Class A and a large number of small clouds for C l a s s C . The Actual Class A B and C IP Networks Figure 4-7 shows the number of Class A B and C IP networks in the entire world. Eventually you need to actually pick and use some of these IP networks to build a working TCP/IP internetwork so you need to be able to answer the question: What are the specific IP networks First you must be able to identify each network briefly using a network identifier network ID. The network ID is just one reserved DDN value per network that identifies the IP net- work. The network ID cannot be used by a host as an IP address. For example Table 4-2 shows the network IDs that match the earlier Figure 4- 5. Table 4-2 Network IDs Used in Figure 4-5 Concept Class Network ID All addresses that begin with 8 A 8.0.0.0 All addresses that begin with 130.4 B 130.4.0.0 All addresses that begin with 199.1.1 C 199.1.1.0 NOTE Many people use the term network ID but others use the terms network number and network address. Be ready to use all three terms. So what are the actual Class A B and C IP networks and what are their network IDs First consider the Class A networks. Per Figure 4-7 only 126 Class A networks exist. As it turns out they consist of all addresses that begin with 1 all addresses that begin with 2 all addresses that begin with 3 and so on up through the 126th such network of “all addresses that begin with 126.” Table 4-3 lists a few of these networks. Table 4-3 Sampling of IPv4 Class A Networks Concept Class Network ID All addresses that begin with 8 A 8.0.0.0 All addresses that begin with 13 A 13.0.0.0 All addresses that begin with 24 A 24.0.0.0 All addresses that begin with 125 A 125.0.0.0 All addresses that begin with 126 A 126.0.0.0 Class B networks have a first octet value between 128 and 191 inclusive but in a single Class B network the addresses have the same value in the first two octets. For example Figure 4-5 uses Class B network 130.4.0.0. The DDN value 130.4.0.0 must be in Class B because the first octet is between 128 and 191 inclusive. However the first two octets define the addresses in a single Class B network. Table 4-4 lists some sample IPv4 Class B networks.

slide 145:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 91 4 Table 4-4 Sampling of IPv4 Class B Networks Concept Class Network ID All addresses that begin with 128.1 B 128.1.0.0 All addresses that begin with 172.20 B 172.20.0.0 All addresses that begin with 191.191 B 191.191.0.0 All addresses that begin with 150.1 B 150.1.0.0 Class C networks can also be easily identified with a first octet value between 192 and 223 inclusive. With Class C networks and addresses the first three octets define the group with addresses in one Class C network having the same value in the first three octets. Table 4-5 shows some samples. Table 4-5 Sampling of IPv4 Class C Networks Concept Class Network ID All addresses that begin with 199.1.1 C 199.1.1.0 All addresses that begin with 200.1.200 C 200.1.200.0 All addresses that begin with 223.1.10 C 223.1.10.0 All addresses that begin with 209.209.1 C 209.209.1.0 Listing all the Class A B and C networks would of course take too much space. For study review Table 4-6 summarizes the first octet values that identify the class and summarizes the range of Class A B and C network numbers available in the entire IPv4 address space. Table 4-6 All Possible Valid Network Numbers Class First Octet Range Valid Network Numbers A 1 to 126 1.0.0.0 to 126.0.0.0 B 128 to 191 128.0.0.0 to 191.255.0.0 C 192 to 223 192.0.0.0 to 223.255.255.0 NOTE The term classful IP network refers to any Class A B or C network because it is defined by Class A B and C rules. IP Subnetting Like IP addressing IP subnetting is also one of the most important topics for the CCENT and CCNA RS certifications. You need to know how subnetting works and how to “do the math” to figure out issues when subnetting is in use both in real life and on the exam. Parts IV and VI of this book cover the details of subnetting concepts motivation and math but you should have a basic understanding of the concepts while reading the Ethernet top- ics between here and Part IV. Subnetting defines methods of further subdividing the IPv4 address space into groups that are smaller than a single IP network. IP subnetting defines a flexible way for anyone to take a single Class A B or C IP network and further subdivide it into even smaller groups of con- secutive IP addresses. In fact the name subnet is just shorthand for subdivided network.

slide 146:

ptg17246291 92 CCENT/CCNA ICND1 100-105 Official Cert Guide Then in each location where you used to use an entire Class A B or C network you can use a smaller subnet wasting fewer IP addresses. To make it clear how an internetwork can use both classful IPv4 networks as well as sub- nets of classful IPv4 networks the next two figures show the same internetwork one with classful networks only and one with subnets only. Figure 4-8 shows the first such example which uses five Class B networks with no subnetting. Network 150.1.0.0 Network 150.4.0.0 Network 150.2.0.0 Network 150.5.0.0 Network 150.3.0.0 Core B1 B2 Figure 4-8 Example That Uses Five Class B Networks The design in Figure 4-8 requires five groups of IP addresses each of which is a Class B network in this example. Specifically the three LANs each use a single Class B network and the two serial links each use a Class B network. Figure 4-8 wastes many IP addresses because each Class B network has 2 16 – 2 host addresses—far more than you will ever need for each LAN and WAN link. For example the Ethernet on the left uses an entire Class B network which supports 65534 IP addresses that begin with 150.1. However a single LAN seldom grows past a few hundred devices so many of the IP addresses in Class B network 150.1.0.0 would be wasted. Even more waste occurs on the point-to-point serial links which need only two IP addresses. Figure 4-9 illustrates a more common design today one that uses basic subnetting. As in the previous figure this figure needs five groups of addresses. However in this case the figure uses five subnets of Class B network 150.9.0.0. Network 150.9.1.0 Network 150.9.4.0 Network 150.9.2.0 Network 150.9.5.0 Network 150.9.3.0 Core B1 B2 Figure 4-9 Using Subnets for the Same Design as the Previous Figure Subnetting allows the network engineer for the TCP/IP internetwork to choose to use a longer part of the addresses that must have the same value. Subnetting allows quite a bit of flexibility but Figure 4-9 shows one of the simplest forms of subnetting. In this

slide 147:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 93 4 case each subnet includes the addresses that begin with the same value in the first three octets as follows: ■ One group of the 254 addresses that begin with 150.9.1 ■ One group of the 254 addresses that begin with 150.9.2 ■ One group of the 254 addresses that begin with 150.9.3 ■ One group of the 254 addresses that begin with 150.9.4 ■ One group of the 254 addresses that begin with 150.9.5 As a result of using subnetting the network engineer has saved many IP addresses. First only a small part of Class B network 150.9.0.0 has been used so far. Each subnet has 254 addresses which should be plenty of addresses for each LAN and more than enough for the WAN links. In summary you now know some of the details of IP addressing with a focus on how it relates to routing. Each host and router interface will have an IP address. However the IP addresses will not be randomly chosen but will instead be grouped together to aid the routing process. The groups of addresses can be an entire Class A B or C network number or it can be a subnet. IPv4 Routing In the first section of this chapter “Overview of Network Layer Functions” you read about the basics of IPv4 routing using a network with three routers and two PCs. Armed with more knowledge of IP addressing you now can take a closer look at the process of routing IP. This section begins with the simple two-part routing logic on the originating host and then moves on to discuss how routers choose where to route or forward packets to the final destination. IPv4 Host Routing Hosts actually use some simple routing logic when choosing where to send a packet. If you assume that the design uses subnets which is typical this two-step logic is as follows: Step 1. If the destination IP address is in the same IP subnet as I am send the packet directly to that destination host. Step 2. Otherwise send the packet to my default gateway also known as a default router. This router has an interface on the same subnet as the host. For example consider Figure 4-10 and focus on the Ethernet LAN on the left. When PC1 sends an IP packet to PC11 150.9.1.11 PC1 first considers some match related to subnetting. PC1 concludes that PC11’s IP address is in the same subnet as PC1 so PC1 ignores its default router Core 150.9.1.1 sending the packet directly to PC11 as shown in Step 1 of the figure. 150.9.1.10 150.9.4.10 150.9.1.1 150.9.1.11 Core B1 1 2 PC1 PC11 PC2 Figure 4-10 Host Routing: Forwarding to a Host on the Same Subnet

slide 148:

ptg17246291 94 CCENT/CCNA ICND1 100-105 Official Cert Guide Alternatively when PC1 sends a packet to PC2 150.9.4.10 PC1 does the same kind of subnetting math and realizes that PC2 is not on the same subnet as PC1. So PC1 forwards the packet Step 2 to its default gateway 150.9.1.1 which then routes the packet to PC2. Router Forwarding Decisions and the IP Routing Table Earlier in this chapter Figure 4-1 shows the network layer concepts of routing while Figure 4-2 shows the data-link encapsulation logic related to routing. This next topic dives a little deeper into that same process using an example with three routers forward- ing routing one packet. But before looking at the example the text first summarizes how a router thinks about forwarding a packet. A Summary of Router Forwarding Logic First when a router receives a data-link frame addressed to that router’s data-link address the router needs to think about processing the contents of the frame. When such a frame arrives the router uses the following logic on the data-link frame: Step 1. Use the data-link Frame Check Sequence FCS field to ensure that the frame had no errors if errors occurred discard the frame. Step 2. Assuming that the frame was not discarded at Step 1 discard the old data-link header and trailer leaving the IP packet. Step 3. Compare the IP packet’s destination IP address to the routing table and find the route that best matches the destination address. This route identifies the outgoing interface of the router and possibly the next-hop router IP address. Step 4. Encapsulate the IP packet inside a new data-link header and trailer appropriate for the outgoing interface and forward the frame. With these steps each router forwards the packet to the next location inside a data-link frame. With each router repeating this process the packet reaches its final destination. While the router does all the steps in the list Step 3 is the main routing or forwarding step. The packet has a destination IP address in the header whereas the routing table lists slightly different numbers typically a list of networks and subnets. To match a routing table entry the router thinks like this: Network numbers and subnet numbers represent a group of addresses that begin with the same prefix. Think about those numbers as groups of addresses. In which of the groups does this packet’s destination address reside The next example shows specific examples of matching the routing table. A Detailed Routing Example The routing example uses Figure 4-11. In this example all routers happen to use the Open Shortest Path First OSPF routing protocol and all routers know routes for all subnets. In particular PC2 at the bottom sits in subnet 150.150.4.0 which consists of all addresses that begin with 150.150.4. In the example PC1 sends an IP packet to 150.150.4.10 PC2’s IP address.

slide 149:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 95 4 150.150.1.4 S0 E0 150.150.2.7 Eth HDLC Eth Eth IP Packet IP Packet IP Packet IP Packet R1 R2 R3 Subnet 150.150.4.0 A B C D Subnet Interface Next Hop 150.150.4.0 Serial0 150.150.2.7 R1 Routing Table Subnet Interface Next Hop 150.150.4.0 FastEth0/0 150.150.3.1 R2 Routing Table Subnet Interface Next Hop 150.150.4.0 Ethernet0 N/A R3 Routing Table 150.150.1.10 PC1 150.150.4.10 PC2 150.150.3.1 F0/0 Figure 4-11 Simple Routing Example with IP Subnets NOTE Note that the routers all know in this case that “subnet 150.150.4.0” means “all addresses that begin with 150.150.4.” The following list explains the forwarding logic at each step in the figure. Note that the text refers to Steps 1 2 3 and 4 of the routing logic shown in the previous section. Step A. PC1 sends the packet to its default router. PC1 first builds the IP packet with a destination address of PC2’s IP address 150.150.4.10. PC1 needs to send the packet to R1 PC1’s default router because the destination address is on a different subnet. PC1 places the IP packet into an Ethernet frame with a destination Ethernet address of R1’s Ethernet address. PC1 sends the frame on to the Ethernet. Note that the figure omits the data-link trailers. Step B. R1 processes the incoming frame and forwards the packet to R2. Because the incoming Ethernet frame has a destination MAC of R1’s Ethernet MAC R1 cop- ies the frame off the Ethernet for processing. R1 checks the frame’s FCS and no errors have occurred Step 1. R1 then discards the Ethernet header and trailer Step 2. Next R1 compares the packet’s destination address 150.150.4.10 to the routing table and finds the entry for subnet 150.150.4.0—which includes addresses 150.150.4.0 through 150.150.4.255 Step 3. Because the destination address is in this group R1 forwards the packet out interface Serial0 to next- hop Router R2 150.150.2.7 after encapsulating the packet in a High-Level Data Link Control HDLC frame Step 4. Step C. R2 processes the incoming frame and forwards the packet to R3. R2 repeats the same general process as R1 when R2 receives the HDLC frame. R2 checks

slide 150:

ptg17246291 96 CCENT/CCNA ICND1 100-105 Official Cert Guide the FCS field and finds that no errors occurred Step 1. R2 then discards the HDLC header and trailer Step 2. Next R2 finds its route for subnet 150.150.4.0—which includes the address range 150.150.4.0–150.150.4.255— and realizes that the packet’s destination address 150.150.4.10 matches that route Step 3. Finally R2 sends the packet out interface Fast Ethernet 0/0 to next-hop router 150.150.3.1 R3 after encapsulating the packet in an Ethernet header Step 4. Step D. R3 processes the incoming frame and forwards the packet to PC2. Like R1 and R2 R3 checks the FCS discards the old data-link header and trailer and matches its own route for subnet 150.150.4.0. R3’s routing table entry for 150.150.4.0 shows that the outgoing interface is R3’s Ethernet interface but there is no next-hop router because R3 is connected directly to subnet 150.150.4.0. All R3 has to do is encapsulate the packet inside a new Ethernet header and trailer with a destination Ethernet address of PC2’s MAC address and forward the frame. IPv4 Routing Protocols The routing forwarding process depends heavily on having an accurate and up-to-date IP routing table on each router. This section takes another look at routing protocols consider- ing the goals of a routing protocol the methods routing protocols use to teach and learn routes and an example. First consider the goals of a routing protocol regardless of how the routing protocol works: ■ To dynamically learn and fill the routing table with a route to each subnet in the internetwork. ■ If more than one route to a subnet is available to place the best route in the routing table. ■ To notice when routes in the table are no longer valid and to remove them from the routing table. ■ If a route is removed from the routing table and another route through another neigh- boring router is available to add the route to the routing table. Many people view this goal and the preceding one as a single goal. ■ To work quickly when adding new routes or replacing lost routes. The time between losing the route and finding a working replacement route is called convergence time. ■ To prevent routing loops. Routing protocols all use some similar ideas to allow routers to learn routing information from each other. Of course each routing protocol works differently otherwise you would not need more than one routing protocol. However many routing protocols use the same general steps for learning routes: Step 1. Each router independent of the routing protocol adds a route to its routing table for each subnet directly connected to the router. Step 2. Each router’s routing protocol tells its neighbors about the routes in its routing table including the directly connected routes and routes learned from other routers.

slide 151:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 97 4 Step 3. After learning a new route from a neighbor the router’s routing protocol adds a route to its IP routing table with the next-hop router of that route typically being the neighbor from which the route was learned. For example Figure 4-12 shows the same sample network as in Figure 4-11 but now with a focus on how the three routers each learned about subnet 150.150.4.0. Note that routing protocols do more work than is implied in the figure this figure just focuses on how the routers learn about subnet 150.150.4.0. Subnet Interface Next Hop 150.150.4.0 Serial0 150.150.2.7 R1 Routing Table Subnet Interface Next Hop 150.150.4.0 FastEth0/0 150.150.3.1 R2 Routing Table E0 S0 150.150.2.7 150.150.3.1 150.150.4.10 F0/0 C A E F D Subnet Interface Next Hop 150.150.4.0 Ethernet0 N/A R2 Routing Table B R2 R3 PC1 PC2 PC11 R1 Subnet 150.150.4.0 Figure 4-12 Router R1 Learning About Subnet 150.150.4.0 Follow items A through F shown in the figure to see how each router learns its route to 150.150.4.0. All references to Steps 1 2 and 3 refer to the list just before Figure 4-12. Step A. Subnet 150.150.4.0 exists as a subnet at the bottom of the figure connected to Router R3. Step B. R3 adds a connected route for 150.150.4.0 to its IP routing table Step 1 this happens without help from the routing protocol. Step C. R3 sends a routing protocol message called a routing update to R2 causing R2 to learn about subnet 150.150.4.0 Step 2. Step D. R2 adds a route for subnet 150.150.4.0 to its routing table Step 3. Step E. R2 sends a similar routing update to R1 causing R1 to learn about subnet 150.150.4.0 Step 2. Step F. R1 adds a route for subnet 150.150.4.0 to its routing table Step 3. The route lists R1’s own Serial0 as the outgoing interface and R2 as the next-hop router IP address 150.150.2.7.

slide 152:

ptg17246291 98 CCENT/CCNA ICND1 100-105 Official Cert Guide Chapter 19 “Learning IPv4 Routes with RIPv2” covers routing protocols in more detail. Next the final major section of this chapter introduces several additional functions related to how the network layer forwards packets from source to destination through an internetwork. Other Network Layer Features The TCP/IP network layer defines many functions beyond the function defined by the IPv4 protocol. Sure IPv4 plays a huge role in networking today defining IP addressing and IP routing. However other protocols and standards defined in other Requests For Comments RFC play an important role for network layer functions as well. For exam- ple routing protocols like Open Shortest Path First OSPF exist as separate protocols defined in separate RFCs. This last short section of the chapter introduces three other network layer features that should be helpful to you when reading through the rest of this book. These last three topics just help fill in a few holes helping to give you some perspective and helping you make sense of later discussions as well. The three topics are ■ Domain Name System DNS ■ Address Resolution Protocol ARP ■ Ping Using Names and the Domain Name System Can you imagine a world in which every time you used an application you had to think about the other computer and refer to it by IP address Instead of using easy names like google.com or facebook.com you would have to remember and type IP addresses like 74.125.225.5. Certainly that would not be user friendly and could drive some people away from using computers at all. Thankfully TCP/IP defines a way to use hostnames to identify other computers. The user either never thinks about the other computer or refers to the other computer by name. Then protocols dynamically discover all the necessary information to allow communica- tions based on that name. For example when you open a web browser and type in the hostname www.google.com your computer does not send an IP packet with destination IP address www.google.com it sends an IP packet to an IP address used by the web server for Google. TCP/IP needs a way to let a computer find the IP address used by the listed hostname and that method uses the Domain Name System DNS. Enterprises use the DNS process to resolve names into the matching IP address as shown in the example in Figure 4-13. In this case PC11 on the left needs to connect to a server named Server1. At some point the user either types in the name Server1 or some applica- tion on PC11 refers to that server by name. At Step 1 PC11 sends a DNS message—a DNS query—to the DNS server. At Step 2 the DNS server sends back a DNS reply that lists Server1’s IP address. At Step 3 PC11 can now send an IP packet to destination address 10.1.2.3 the address used by Server1.

slide 153:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 99 4 11 DNS Server PC11 1 2 3 Server1 10.1.2.3 Server2 10.1.2.6 IP Address of Server1 Name Server1 Server2 Address 10.1.2.3 10.1.2.6 TCP/IP Network Server1 10.1.2.3 DNS Server Name Database IP Figure 4-13 Basic DNS Name Resolution Request Note that the example in Figure 4-13 shows a cloud for the TCP/IP network because the details of the network including routers do not matter to the name resolution process. Routers treat the DNS messages just like any other IP packet routing them based on the destination IP address. For example at Step 1 in the figure the DNS query will list the DNS server’s IP address as the destination address which any routers will use to forward the packet. Finally DNS defines much more than just a few messages. DNS defines protocols as well as standards for the text names used throughout the world and a worldwide set of dis- tributed DNS servers. The domain names that people use every day when web browsing which look like www.example.com follow the DNS naming standards. Also no single DNS server knows all the names and matching IP addresses but the information is dis- tributed across many DNS servers. So the DNS servers of the world work together for- warding queries to each other until the server that knows the answer supplies the desired I P a d d r e s s i n f o r m a t i o n . The Address Resolution Protocol IP routing logic requires that hosts and routers encapsulate IP packets inside data link layer frames. In fact Figure 4-11 shows how every router de-encapsulates each IP packet and encapsulates the IP packet inside a new data-link frame. On Ethernet LANs whenever a host or router needs to encapsulate an IP packet in a new Ethernet frame the host or router knows all the important facts to build that header— except for the destination MAC address. The host knows the IP address of the next device either another host IP address or the default router IP address. A router knows the IP route used for forwarding the IP packet which lists the next router’s IP address. However the hosts and routers do not know those neighboring devices’ MAC addresses beforehand. TCP/IP defines the Address Resolution Protocol ARP as the method by which any host or router on a LAN can dynamically learn the MAC address of another IP host or router on the same LAN. ARP defines a protocol that includes the ARP Request which is a mes- sage that asks the simple request “if this is your IP address please reply with your MAC address.” ARP also defines the ARP Reply message which indeed lists both the original IP address and the matching MAC address. Figure 4-14 shows an example that uses the same router and host from the bottom part of the earlier Figure 4-11. The figure shows the ARP Request on the left as a LAN broadcast so all hosts receive the frame. On the right at Step 2 host PC2 sends back an ARP Reply identifying PC2’s MAC address. The text beside each message shows the contents inside the ARP message itself which lets PC2 learn R3’s IP address and matching MAC address and R3 learn PC2’s IP address and matching MAC address.

slide 154:

ptg17246291 100 CCENT/CCNA ICND1 100-105 Official Cert Guide 150.150.4.10 0200.2222.2222 PC2 R3 ARP Reply ARP Request Target IP 150.150.4.10 Target MAC Sender IP 150.150.4.10 Sender MAC 0200.2222.2222 1 2 Ethernet Broadcast Ethernet Unicast to R3 Figure 4-14 Sample ARP Process Note that hosts remember the ARP results keeping the information in their ARP cache or ARP table. A host or router only needs to use ARP occasionally to build the ARP cache the first time. Each time a host or router needs to send a packet encapsulated in an Ethernet frame it first checks its ARP cache for the correct IP address and matching MAC address. Hosts and routers will let ARP cache entries time out to clean up the table so occasional ARP Requests can be seen. NOTE You can see the contents of the ARP cache on most PC operating systems by using the arp -a command from a command prompt. ICMP Echo and the ping Command After you have implemented a TCP/IP internetwork you need a way to test basic IP con- nectivity without relying on any applications to be working. The primary tool for testing basic network connectivity is the ping command. Ping Packet Internet Groper uses the Internet Control Message Protocol ICMP sending a message called an ICMP echo request to another IP address. The computer with that IP address should reply with an ICMP echo reply. If that works you successfully have tested the IP network. In other words you know that the network can deliver a packet from one host to the other and back. ICMP does not rely on any application so it really just tests basic IP connectivity—Layers 1 2 and 3 of the OSI model. Figure 4-15 outlines the basic process. Hannah ping Jessie Jessie Eth IP ICMP Echo Request Eth IP ICMP Echo Reply Figure 4-15 Sample Network ping Command Note that while the ping command uses ICMP ICMP does much more. ICMP defines many messages that devices can use to help manage and control the IP network. Chapter 20 “DHCP and IP Networking on Hosts” gives you more information about and examples of ping and ICMP.

slide 155:

ptg17246291 Chapter 4: Fundamentals of IPv4 Addressing and Routing 101 4 Chapter Review The “Your Study Plan” element just before Chapter 1 discusses how you should study and practice the content and skills for each chapter before moving on to the next chapter. That element introduces the tools used here at the end of each chapter. If you haven’t already done so take a few minutes to read that section. Then come back here and do the useful work of reviewing the chapter to help lock into memory what you just read. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Table 4-7 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 4-7 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Review memory table Book DVD/website Review All the Key Topics Table 4-8 Key T opics for Chapter 4 Key Topic Element Description Page Number List Two statements about how IP expects IP addresses to be grouped into networks or subnets 87 Figure 4-6 Breakdown of IPv4 address space 89 Figure 4-7 Sizes of Class A B and C networks 89 Table 4-6 List of the three types of unicast IP networks and the size of the network and host parts of each type of network 91 Figure 4-9 Conceptual view of how subnetting works 92 List Two-step process of how hosts route forward packets 93 List Four-step process of how routers route forward packets 94 List Goals of IP routing protocols 96 Figure 4-13 Example that shows the purpose and process of DNS name resolution 99 Figure 4-14 Example of the purpose and process of ARP 100 Key Terms You Should Know default router default gateway routing table IP network IP subnet IP packet routing protocol dotted-decimal notation DDN IPv4 address unicast IP address subnetting hostname DNS ARP ping

slide 156:

ptg17246291 CHAPTER 5 Fundamentals of TCP/IP Transport and Applications This chapter covers the following exam topics: 1.0 Network Fundamentals 1.2 Compare and contrast TCP and UDP protocols 4.0 Infrastructure Services 4.1 Describe DNS lookup operation The CCENT and CCNA Routing and Switching exams focus mostly on functions at the lower layers of TCP/IP which define how IP networks can send IP packets from host to host using LANs and WANs. This chapter explains the basics of a few topics that receive less attention on the exams: the TCP/IP transport layer and the TCP/IP application layer. The functions of these higher layers play a big role in real TCP/IP networks so it helps to have some basic understanding before moving into the rest of the book where you go deeper into LANs and IP routing. This chapter begins by examining the functions of two transport layer protocols: Transmission Control Protocol TCP and User Datagram Protocol UDP. The second major section of the chapter examines the TCP/IP application layer including some discussion of how Domain Name System DNS name resolution works. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 5-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions TCP/IP Layer 4 Protocols: TCP and UDP 1–4 TCP/IP Applications 5–6

slide 157:

ptg17246291 1. Which of the following header fields identify which TCP/IP application gets data received by the computer Choose two answers. a. Ethernet Type b. SNAP Protocol Type c. IP Protocol d. TCP Port Number e. UDP Port Number 2. Which of the following are typical functions of TCP Choose four answers. a. Flow control windowing b. Error recovery c. Multiplexing using port numbers d. Routing e. Encryption f. Ordered data transfer 3. Which of the following functions is performed by both TCP and UDP a. Windowing b. Error recovery c. Multiplexing using port numbers d. Routing e. Encryption f. Ordered data transfer 4. What do you call data that includes the Layer 4 protocol header and data given to Layer 4 by the upper layers not including any headers and trailers from Layers 1 to 3 Choose two answers. a. L3PDU b. Chunk c. Segment d. Packet e. Frame f. L4PDU 5. In the URI http://www.certskills.com/ICND1 which part identifies the web server a. http b. www.certskills.com c. certskills.com d. http://www.certskills.com e. The file name.html includes the hostname.

slide 158:

ptg17246291 104 CCENT/CCNA ICND1 100-105 Official Cert Guide 6. Fred opens a web browser and connects to the www.certskills.com website. Which of the following are typically true about what happens between Fred’s web browser and the web server Choose two answers. a. Messages flowing toward the server use UDP destination port 80. b. Messages flowing from the server typically use RTP. c. Messages flowing to the client typically use a source TCP port number of 80. d. Messages flowing to the server typically use TCP. Foundation Topics TCP/IP Layer 4 Protocols: TCP and UDP The OSI transport layer Layer 4 defines several functions the most important of which are error recovery and flow control. Likewise the TCP/IP transport layer protocols also imple- ment these same types of features. Note that both the OSI model and the TCP/IP model call this layer the transport layer. But as usual when referring to the TCP/IP model the layer name and number are based on OSI so any TCP/IP transport layer protocols are con- sidered Layer 4 protocols. The key difference between TCP and UDP is that TCP provides a wide variety of services to applications whereas UDP does not. For example routers discard packets for many rea- sons including bit errors congestion and instances in which no correct routes are known. As you have read already most data-link protocols notice errors a process called error detection but then discard frames that have errors. TCP provides retransmission error recovery and helps to avoid congestion flow control whereas UDP does not. As a result many application protocols choose to use TCP. However do not let UDP’s lack of services make you think that UDP is worse than TCP. By providing fewer services UDP needs fewer bytes in its header compared to TCP resulting in fewer bytes of overhead in the network. UDP software does not slow down data transfer in cases where TCP can purposefully slow down. Also some applications notably today Voice over IP VoIP and video over IP do not need error recovery so they use UDP. So UDP also has an important place in TCP/IP networks today. Table 5-2 lists the main features supported by TCP/UDP. Note that only the first item listed in the table is supported by UDP whereas all items in the table are supported by TCP. Table 5-2 TCP/IP Transport Layer Features Function Description Multiplexing using ports Function that allows receiving hosts to choose the correct application for which the data is destined based on the port number Error recovery reliability Process of numbering and acknowledging data with Sequence and Acknowledgment header fields Flow control using windowing Process that uses window sizes to protect buffer space and routing devices from being overloaded with traffic

slide 159:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 105 5 Function Description Connection establishment and termination Process used to initialize port numbers and Sequence and Acknowledgment fields Ordered data transfer and data segmentation Continuous stream of bytes from an upper-layer process that is “segmented” for transmission and delivered to upper-layer processes at the receiving device with the bytes in the same order Next this section describes the features of TCP followed by a brief comparison to UDP. Transmission Control Protocol Each TCP/IP application typically chooses to use either TCP or UDP based on the applica- tion’s requirements. For example TCP provides error recovery but to do so it consumes more bandwidth and uses more processing cycles. UDP does not perform error recovery but it takes less bandwidth and uses fewer processing cycles. Regardless of which of these two TCP/IP transport layer protocols the application chooses to use you should understand the basics of how each of these transport layer protocols works. TCP as defined in Request For Comments RFC 793 accomplishes the functions listed in Table 5-2 through mechanisms at the endpoint computers. TCP relies on IP for end-to-end delivery of the data including routing issues. In other words TCP performs only part of the functions necessary to deliver the data between applications. Also the role that it plays is directed toward providing services for the applications that sit at the endpoint computers. Regardless of whether two computers are on the same Ethernet or are separated by the entire Internet TCP performs its functions the same way. Figure 5-1 shows the fields in the TCP header. Although you don’t need to memorize the names of the fields or their locations the rest of this section refers to several of the fields so the entire header is included here for reference . 4 Bytes Offset Sequence Number Destination Port Source Port Reserved Flag Bits Window Checksum Urgent Acknowledgement Number Figure 5-1 TCP Header Fields Answers to the “Do I Know This Already” quiz: 1 D E 2 A B C F 3 C 4 C F 5 B 6 C D

slide 160:

ptg17246291 106 CCENT/CCNA ICND1 100-105 Official Cert Guide The message created by TCP that begins with the TCP header followed by any applica- tion data is called a TCP segment. Alternatively the more generic term Layer 4 PDU or L4PDU can also be used. Multiplexing Using TCP Port Numbers TCP and UDP both use a concept called multiplexing. Therefore this section begins with an explanation of multiplexing with TCP and UDP. Afterward the unique features of TCP are explored. Multiplexing by TCP and UDP involves the process of how a computer thinks when receiv- ing data. The computer might be running many applications such as a web browser an email package or an Internet VoIP application for example Skype. TCP and UDP multi- plexing tells the receiving computer to which application to give the received data. Some examples will help make the need for multiplexing obvious. The sample network con- sists of two PCs labeled Hannah and Jessie. Hannah uses an application that she wrote to send advertisements that appear on Jessie’s screen. The application sends a new ad to Jessie every 10 seconds. Hannah uses a second application a wire-transfer application to send Jessie some money. Finally Hannah uses a web browser to access the web server that runs on Jessie’s PC. The ad application and wire-transfer application are imaginary just for this example. The web application works just like it would in real life. Figure 5-2 shows the sample network with Jessie running three applications: ■ A UDP-based advertisement application ■ A TCP-based wire-transfer application ■ A TCP web server application Hannah Web Server Ad Application Wire Application Jessie Eth UDP Eth IP Ad Data Eth TCP Eth IP Wire Transfer Data Eth TCP Eth IP Web Page Data I received three packets from the same source MAC and IP. Which of my Applications gets the data in each Figure 5-2 Hannah Sending Packets to Jessie with Three Applications Jessie needs to know which application to give the data to but all three packets are from the same Ethernet and IP address. You might think that Jessie could look at whether the packet contains a UDP or TCP header but as you see in the figure two applications wire transfer and web are using TCP.

slide 161:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 107 5 TCP and UDP solve this problem by using a port number field in the TCP or UDP header respectively. Each of Hannah’s TCP and UDP segments uses a different destination port number so that Jessie knows which application to give the data to. Figure 5-3 shows an example. Hannah Port 80 Web Server Port 800 Ad Server Port 9876 Wire Application Jessie Eth UDP Eth IP Ad Data Eth TCP Eth IP Wire Transfer Data Eth TCP Eth IP Web Page Data Destination Port 80 UDP or TCP Destination Port to Identify the Application Destination Port 800 Destination Port 9876 Figure 5-3 Hannah Sending Packets to Jessie with Three Applications Using Port Numbers to Multiplex Multiplexing relies on a concept called a socket. A socket consists of three things: ■ An IP address ■ A transport protocol ■ A port number So for a web server application on Jessie the socket would be 10.1.1.2 TCP port 80 because by default web servers use the well-known port 80. When Hannah’s web browser connects to the web server Hannah uses a socket as well—possibly one like this: 10.1.1.1 TCP 1030. Why 1030 Well Hannah just needs a port number that is unique on Hannah so Hannah sees that port 1030 is available and uses it. In fact hosts typically allocate dynamic port numbers starting at 1024 because the ports below 1024 are reserved for well- known applications. In Figure 5-3 Hannah and Jessie use three applications at the same time—hence three socket connections are open. Because a socket on a single computer should be unique a connection between two sockets should identify a unique connection between two comput- ers. This uniqueness means that you can use multiple applications at the same time talking to applications running on the same or different computers. Multiplexing based on sockets ensures that the data is delivered to the correct applications. Figure 5-4 shows the three socket connections between Hannah and Jessie.

slide 162:

ptg17246291 108 CCENT/CCNA ICND1 100-105 Official Cert Guide Hannah Jessie Ad Application Port 1025 Wire Application Port 1028 Web Browser Port 1030 UDP TCP IP Address 10.1.1.1 Ad Application Port 800 Wire Application Port 9876 Web Server Port 80 UDP TCP IP Address 10.1.1.2 10.1.1.1 TCP 1030 10.1.1.2 TCP 80 10.1.1.1 TCP 1028 10.1.1.2 TCP 9876 10.1.1.1 UDP 1025 10.1.1.2 UDP 800 Figure 5-4 Connections Between Sockets Port numbers are a vital part of the socket concept. Well-known port numbers are used by servers other port numbers are used by clients. Applications that provide a service such as FTP Telnet and web servers open a socket using a well-known port and listen for con- nection requests. Because these connection requests from clients are required to include both the source and destination port numbers the port numbers used by the servers must be well-known. Therefore each service uses a specific well-known port number. The well- known ports are listed at www.iana.org/assignments/service-names-port-numbers/service- names-port-numbers.txt . On client machines where the requests originate any locally unused port number can be allocated. The result is that each client on the same host uses a different port number but a server uses the same port number for all connections. For example 100 web browsers on the same host computer could each connect to a web server but the web server with 100 clients connected to it would have only one socket and therefore only one port number port 80 in this case. The server can tell which packets are sent from which of the 100 cli- ents by looking at the source port of received TCP segments. The server can send data to the correct web client browser by sending data to that same port number listed as a desti- nation port. The combination of source and destination sockets allows all participating hosts to distinguish between the data’s source and destination. Although the example explains the concept using 100 TCP connections the same port-numbering concept applies to UDP ses- sions in the same way. NOTE You can find all RFCs online at www.rfc-editor.org/rfc/rfcxxxx.txt where xxxx is the number of the RFC. If you do not know the number of the RFC you can try searching by topic at www.rfc-editor.org. Popular TCP/IP Applications Throughout your preparation for the CCNA Routing and Switching exams you will come across a variety of TCP/IP applications. You should at least be aware of some of the appli- cations that can be used to help manage and control a network.

slide 163:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 109 5 The W orld Wide W eb WWW application exists through web browsers accessing the con- tent available on web servers. Although it is often thought of as an end-user application you can actually use WWW to manage a router or switch. Y ou enable a web server function in the router or switch and use a browser to access the router or switch. The Domain Name System DNS allows users to use names to refer to computers with DNS being used to find the corresponding IP addresses. DNS also uses a client/server model with DNS servers being controlled by networking personnel and DNS client functions being part of most any device that uses TCP/IP today. The client simply asks the DNS server to supply the IP address that corresponds to a given name. S imp l e N e t w o rk Management Protocol SNMP is an application layer protocol used specifi- cally for network device management. For example Cisco supplies a large variety of network management products many of them in the Cisco Prime network management software product family. They can be used to query compile store and display information about a network’s operation. To query the network devices Cisco Prime software mainly uses SNMP protocols. Traditionally to move files to and from a router or switch Cisco used Trivial File Transfer Protocol TFTP . TFTP defines a protocol for basic file transfer—hence the word trivial. Alternatively routers and switches can use File Transfer Protocol FTP which is a much more functional protocol to transfer files. Both work well for moving files into and out of Cisco devices. FTP allows many more features making it a good choice for the general end-user population. TFTP client and server applications are very simple making them good tools as embedded parts of networking devices. Some of these applications use TCP and some use UDP. For example Simple Mail Transfer Protocol SMTP and Post Office Protocol version 3 POP3 both used for transferring mail require guaranteed delivery so they use TCP. Regardless of which transport layer protocol is used applications use a well-known port number so that clients know which port to attempt to connect to. Table 5-3 lists several popular applications and their well-known port numbers. Table 5-3 Popular Applications and Their Well-Known Port Numbers Port Number Protocol Application 20 TCP FTP data 21 TCP FTP control 22 TCP SSH 23 TCP Telnet 25 TCP SMTP 53 UDP TCP 1 DNS 67 UDP DHCP Server 68 UDP DHCP Client 69 UDP TFTP 80 T CP HT TP WWW 110 TCP POP3 161 UDP SNMP

slide 164:

ptg17246291 110 CCENT/CCNA ICND1 100-105 Official Cert Guide Port Number Protocol Application 443 TCP SSL 514 UDP Syslog 1 DNS uses both UDP and TCP in different instances. It uses port 53 for both TCP and UDP . Connection Establishment and Termination TCP connection establishment occurs before any of the other TCP features can begin their work. Connection establishment refers to the process of initializing Sequence and Acknowledgment fields and agreeing on the port numbers used. Figure 5-5 shows an exam- ple of connection establishment flow. SYN DPORT80 SPORT1027 Web Browser Web Server SYN ACK DPORT1027 SPORT80 ACK DPORT80 SPORT1027 Port 1027 Port 80 Figure 5-5 TCP Connection Establishment This three-way connection establishment flow also called a three-way handshake must complete before data transfer can begin. The connection exists between the two sockets although the TCP header has no single socket field. Of the three parts of a socket the IP addresses are implied based on the source and destination IP addresses in the IP header. TCP is implied because a TCP header is in use as specified by the protocol field value in the IP header. Therefore the only parts of the socket that need to be encoded in the TCP header are the port numbers. TCP signals connection establishment using 2 bits inside the flag fields of the TCP header. Call- ed th e SYN and ACK flags these bits have a particularly interesting meaning. SYN means “syn- chronize the sequence numbers” which is one necessary component in initialization for TCP . Figure 5-6 shows TCP connection termination. This four-way termination sequence is straightforward and uses an additional flag called the FIN bit. FIN is short for “finished” as you might guess. One interesting note: Before the device on the right sends the third TCP segment in the sequence it notifies the application that the connection is coming down. It then waits on an acknowledgment from the application before sending the third segment in the figure. Just in case the application takes some time to reply the PC on the right sends the second flow in the figure acknowledging that the other PC wants to take down the connec- tion. Otherwise the PC on the left might resend the first segment repeatedly. PC ACK FIN PC ACK ACK ACK FIN Figure 5-6 TCP Connection Termination

slide 165:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 111 5 TCP establishes and terminates connections between the endpoints whereas UDP does not. Many protocols operate under these same concepts so the terms connection-oriented and connectionless are used to refer to the general idea of each. More formally these terms can be defined as follows : ■ Connection-oriented protocol: A protocol that requires an exchange of messages before data transfer begins or that has a required pre-established correlation between two endpoints. ■ Connectionless protocol: A protocol that does not require an exchange of messages and that does not require a pre-established correlation between two endpoints. Error Recovery and Reliability TCP provides for reliable data transfer which is also called reliability or error recovery depending on what document you read. To accomplish reliability TCP numbers data bytes using the Sequence and Acknowledgment fields in the TCP header. TCP achieves reliability in both directions using the Sequence Number field of one direction combined with the Acknowledgment field in the opposite direction. Figure 5-7 shows an example of how the TCP sequence and acknowledgment fields allow the PC to send 3000 bytes of data to the server with the server acknowledging receipt of the data. The TCP segments in the figure occur in order from top to bottom. For simplic- ity’s sake all messages happen to have 1000 bytes of data in the data portion of the TCP segment. The first Sequence number is a nice round number 1000 again for simplicity’s sake. The top of the figure shows three segments with each sequence number being 1000 more than the previous identifying the first of the 1000 bytes in the message. That is in this example the first segment holds bytes 1000–1999 the second holds bytes 2000–2999 and the third holds bytes 3000–3999. 1000 Bytes of Data Sequence 1000 1000 Bytes of Data Sequence 2000 1000 Bytes of Data Sequence 3000 No Data Acknowledgment 4000 Got All 3000 Bytes. Send ACK 1 Web Browser Web Server Figure 5-7 TCP Acknowledgment Without Errors The fourth TCP segment in the figure—the only one flowing back from the server to the web browser—acknowledges the receipt of all three segments. How The acknowledgment value of 4000 means “I received all data with sequence numbers up through one less than 4000 so I am ready to receive your byte 4000 next.” Note that this convention of acknowl- edging by listing the next expected byte rather than the number of the last byte received is called forward acknowledgment. This first example does not recover from any errors however it simply shows the basics of how the sending host uses the sequence number field to identify the data with the receiv- ing host using forward acknowledgments to acknowledge the data. The more interesting discussion revolves around how to use these same tools to do error recovery. TCP uses the sequence and acknowledgment fields so that the receiving host can notice lost data ask the sending host to resend and then acknowledge that the re-sent data arrived.

slide 166:

ptg17246291 112 CCENT/CCNA ICND1 100-105 Official Cert Guide Many variations exist for how TCP does error recovery. Figure 5-8 shows just one such example with similar details compared to the previous figure. The web browser again sends three TCP segments again 1000 bytes each again with easy-to-remember sequence num- bers. However in this example the second TCP segment fails to cross the network. I Received 1000 – 1999. I Received 3000 – 3999. Ask for 2000 Next 1 He Lost Segment with SEQ 2000. Resend it 2 I Received 2000 – 2999. Already Have 3000 – 3999. Ask for 4000 Next 3 1000 Bytes of Data Sequence 1000 1000 Bytes of Data Sequence 2000 1000 Bytes of Data Sequence 3000 Web Browser Web Server No Data Acknowledgment 2000 1000 Bytes of Data Sequence 2000 No Data Acknowledgment 4000 Figure 5-8 TCP Acknowledgment with Errors The figure points out three sets of ideas behind how the two hosts think. First on the right the server realizes that it did not receive all the data. The two received TCP segments con- tain bytes numbered 1000–1999 and 3000–3999. Clearly the server did not receive the bytes numbered in between. The server then decides to acknowledge all the data up to the lost data—that is to send back a segment with the acknowledgment field equal to 2000. The receipt of an acknowledgment that does not acknowledge all the data sent so far tells the sending host to resend the data. The PC on the left may wait a few moments to make sure no other acknowledgments arrive using a timer called the retransmission timer but will soon decide that the server means “I really do need 2000 next—resend it.” The PC on the left does so as shown in the fifth of the six TCP segments in the figure. Finally note that the server can acknowledge not only the re-sent data but any earlier data that had been received correctly. In this case the server received the re-sent second TCP seg- ment the data with sequence numbers 2000–2999 but the server had already received the third TCP segment the data numbered 3000–3999. The server’s next acknowledgment field acknowledges the data in both those segments with an acknowledgment field of 4000. Flow Control Using Windowing TCP implements flow control by using a window concept that is applied to the amount of data that can be outstanding and awaiting acknowledgment at any one point in time. The window concept lets the receiving host tell the sender how much data it can receive right now giving the receiving host a way to make the sending host slow down or speed up. The receiver can slide the window size up and down—called a sliding window or dynamic win- dow—to change how much data the sending host can send. The sliding window mechanism makes much more sense with an example. The example shown in Figure 5-9 uses the same basic rules as the examples in the previous few figures.

slide 167:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 113 5 In this case none of the TCP segments have errors and the discussion begins one TCP seg- ment earlier than in the previous two figures. ACK1000 Window3000 SEQ1000 SEQ2000 SEQ3000 ACK4000 Window4000 Send an ACK 4000 Grant a New Window: 4000 3 I Received a New Window: 3000 1 I Must Wait for an ACK 2 I got an ACK I also got a Larger Window: 4000 4 Web Browser Web Server Figure 5-9 TCP Windowing Begin with the first segment sent by the server to the PC. The Acknowledgment field should be familiar by now: it tells the PC that the server expects a segment with sequence number 1000 next. The new field the window field is set to 3000. Because the segment flows to the PC this value tells the PC that the PC can send no more than 3000 bytes over this connection before receiving an acknowledgment. So as shown on the left the PC real- izes it can send only 3000 bytes and it stops sending waiting on an acknowledgment after sending three 1000-byte TCP segments. Continuing the example the server not only acknowledges receiving the data without any loss but the server decides to slide the window size a little higher. Note that second message flowing right-to-left in the figure this time with a window of 4000. Once the PC receives this TCP segment the PC realizes it can send another 4000 bytes a slightly larger window than the previous value. Note that while the last few figures show examples for the purpose of explaining how the mechanisms work the examples might give you the impression that TCP makes the hosts sit there and wait for acknowledgments a lot. TCP does not want to make the sending host have to wait to send data. For instance if an acknowledgment is received before the win- dow is exhausted a new window begins and the sender continues sending data until the current w indow is exhausted. Often times in a network that has few problems few lost segments and little congestion the TCP windows stay relatively large with hosts seldom waiting to send. User Datagram Protocol UDP provides a service for applications to exchange messages. Unlike TCP UDP is connec- tionless and provides no reliability no windowing no reordering of the received data and no segmentation of large chunks of data into the right size for transmission. However UDP provides some functions of TCP such as data transfer and multiplexing using port numbers and it does so with fewer bytes of overhead and less processing required than TCP.

slide 168:

ptg17246291 114 CCENT/CCNA ICND1 100-105 Official Cert Guide UDP data transfer differs from TCP data transfer in that no reordering or recovery is accomplished. Applications that use UDP are tolerant of the lost data or they have some application mechanism to recover lost data. For example VoIP uses UDP because if a voice packet is lost by the time the loss could be noticed and the packet retransmitted too much delay would have occurred and the voice would be unintelligible. Also DNS requests use UDP because the user will retry an operation if the DNS resolution fails. As another exam- ple the Network File System NFS a remote file system application performs recovery with application layer code so UDP features are acceptable to NFS. Figure 5-10 shows the UDP header format. Most importantly note that the header includes source and destination port fields for the same purpose as TCP. However the UDP has only 8 bytes in comparison to the 20-byte TCP header shown in Figure 5-1. UDP needs a shorter header than TCP simply because UDP has less work to do. 4 Bytes Destination Port Source Port Length Checksum Figure 5-10 UDP Header TCP/IP Applications The whole goal of building an enterprise network or connecting a small home or office net- work to the Internet is to use applications such as web browsing text messaging email file downloads voice and video. This section examines one particular application—web brows- ing using Hypertext Transfer Protocol HTTP. The World Wide Web WWW consists of all the Internet-connected web servers in the world plus all Internet-connected hosts with web browsers. Web servers which consist of web server software running on a computer store information in the form of web pages that might be useful to different people. A web browser which is software installed on an end user’s computer provides the means to connect to a web server and display the web pages stored on the web server. NOTE Although most people use the term web browser or simply browser web brows- ers are also called web clients because they obtain a service from a web server. For this process to work several specific application layer functions must occur. The user must somehow identify the server the specific web page and the protocol used to get the data from the server. The client must find the server’s IP address based on the server’s name typically using DNS. The client must request the web page which actually consists of multiple separate files and the server must send the files to the web browser. Finally for electronic commerce e-commerce applications the transfer of data particularly sensitive financial data needs to be secure. The following sections address each of these functions. Uniform Resource Identifiers For a browser to display a web page the browser must identify the server that has the web page plus other information that identifies the particular web page. Most web servers have many web pages. For example if you use a web browser to browse www.cisco.com and you

slide 169:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 115 5 click around that web page you’ll see another web page. Click again and you’ll see another web page. In each case the clicking action identifies the server’s IP address as well as the specific web page with the details mostly hidden from you. These clickable items on a web page which in turn bring you to another web page are called links. The browser user can identify a web page when you click something on a web page or when you enter a Uniform Resource Identifier URI in the browser’s address area. Both options— clicking a link and typing a URI—refer to a URI because when you click a link on a web page that link actually refers to a URI. NOTE Most browsers support some way to view the hidden URI referenced by a link. In several browsers hover the mouse pointer over a link right-click and select Properties. The pop-up window should display the URI to which the browser would be directed if you clicked that link. In common speech many people use the terms web address or the similar related term Universal Resource Locator URL instead of URI but URI is indeed the correct formal term. In fact URL had been more commonly used than URI for more than a few years. However the IETF the group that defines TCP/IP along with the W3C consortium W3.org a consortium that develops web standards has made a concerted effort to standardize the use of URI as the general term. See RFC 7595 for some commentary to that effect. From a practical perspective the URIs used to connect to a web server include three key components as noted in Figure 5-11. The figure shows the formal names of the URI fields. More importantly to this discussion note that the text before the :// identifies the protocol used to connect to the server the text between the // and / identifies the server by name and the text after the / identifies the web page. Formal: URI Scheme http://www.certskills.com/blog Example: Web Authority Path Protocol Web Page Figure 5-11 Structure of a URI Used to Retrieve a Web Page In this case the protocol is Hypertext Transfer Protocol HTTP the hostname is www. certskills.com and the name of the web page is blog. Finding the Web Server Using DNS As mentioned in Chapter 4 “Fundamentals of IPv4 Addressing and Routing” a host can use DNS to discover the IP address that corresponds to a particular hostname. URIs typically list the name of the server—a name that can be used to dynamically learn the IP address used by that same server. The web browser cannot send an IP packet to a destination name but it can send a packet to a destination IP address. So before the browser can send a pack- et to the web server the browser typically needs to resolve the name inside the URI to that name’s corresponding IP address.

slide 170:

ptg17246291 116 CCENT/CCNA ICND1 100-105 Official Cert Guide To pull together several concepts Figure 5-12 shows the DNS process as initiated by a web browser as well as some other related information. From a basic perspective the user enters the URI in this case http://www.cisco.com/go/learningnetwork resolves the www.cisco. com name into the correct IP address and starts sending packets to the web server. IP Header UDP Header DNS Request DNS Server 192.31.7.1 www.cisco.com Web Server 198.133.219.25 Client 64.100.1.1 2 1 Source 64.100.1.1 Dest. 192.31.7.1 What is IP address of www.cisco.com Source 1030 Dest. Port 53 IP Header UDP Header DNS Request 3 Source 192.31.7.1 Dest. 64.100.1.1 IP address is 198.133.219.25 Source 53 Dest. 1030 Name Resolution Request IP Header TCP Header 4 Source 64.100.1.1 Dest. 198.133.219.25 Source 1035 Dest. Port 80 SYN TCP Connection Setup Name Resolution Reply The human typed this URI: http://www.cisco.com/go/learningnetwork Figure 5-12 DNS Resolution and Requesting a Web Page The steps shown in the figure are as follows: 1. The user enters the URI http://www.cisco.com/go/learningnetwork into the brows- er’s address area. 2. The client sends a DNS request to the DNS server. Typically the client learns the DNS server’s IP address through DHCP. Note that the DNS request uses a UDP head- er with a destination port of the DNS well-known port of 53. See Table 5-3 earlier in this chapter for a list of popular well-known ports. 3. The DNS server sends a reply listing IP address 198.133.219.25 as www.cisco.com’s IP address. Note also that the reply shows a destination IP address of 64.100.1.1 the client’s IP address. It also shows a UDP header with source port 53 the source port is 53 because the data is sourced or sent by the DNS server. 4. The client begins the process of establishing a new TCP connection to the web server. Note that the destination IP address is the just-learned IP address of the web server. The packet includes a TCP header because HTTP uses TCP. Also note that the desti- nation TCP port is 80 the well-known port for HTTP. Finally the SYN bit is shown as a reminder that the TCP connection establishment process begins with a TCP seg- ment with the SYN bit turned on binary 1.

slide 171:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 117 5 At this point in the process the web browser is almost finished setting up a TCP connection to the web server. The next section picks up the story at that point examining how the web browser then gets the files that comprise the desired web page. Transferring Files with HTTP After a web client browser has created a TCP connection to a web server the client can begin requesting the web page from the server. Most often the protocol used to transfer the web page is HTTP. The HTTP application layer protocol defined in RFC 7230 defines how files can be transferred between two computers. HTTP was specifically created for the purpose of transferring files between web servers and web clients. HTTP defines several commands and responses with the most frequently used being the HTTP GET request . To get a file from a web server the client sends an HTTP GET request to the server listing the filename. If the server decides to send the file the server sends an HTTP GET response with a return code of 200 meaning OK along with the file’s contents. NOTE Many return codes exist for HTTP requests. For example when the server does not have the requested file it issues a return code of 404 which means “file not found.” Most web browsers do not show the specific numeric HTTP return codes instead displaying a response such as “page not found” in reaction to receiving a return code of 404. Web pages typically consist of multiple files called objects. Most web pages contain text as well as several graphical images animated advertisements and possibly voice or video. Each of these components is stored as a different object file on the web server. To get them all the web browser gets the first file. This file can and typically does include references to other URIs so the browser then also requests the other objects. Figure 5-13 shows the gen- eral idea with the browser getting the first file and then two others. HTTP GET /go/ccna HTTP GET /graphics/logo1.gif HTTP GET /graphics/ad1.gif HTTP OK data: /go/ccna data: logo1.gif HTTP OK data: ad1.gif HTTP OK Web Browser Client www.cisco.com User Typed: http://www.cisco.com/go/ccna Figure 5-13 Multiple HTTP Get Requests/Responses In this case after the web browser gets the first file—the one called “/go/ccna” in the URI—the browser reads and interprets that file. Besides containing parts of the web page the file refers to two other files so the browser issues two additional HTTP get requests. Note that even though it isn’t shown in the figure all these commands flow over one or

slide 172:

ptg17246291 118 CCENT/CCNA ICND1 100-105 Official Cert Guide possibly more TCP connection between the client and the server. This means that TCP would provide error recovery ensuring that the data was delivered. How the Receiving Host Identifies the Correct Receiving Application This chapter closes with a discussion that pulls several concepts together from several chap- ters in Part I of this book. The concept revolves around the process by which a host when receiving any message over any network can decide which of its many application programs should process the received data. As an example consider host A shown on the left side of Figure 5-14. The host happens to have three different web browser windows open each using a unique TCP port. Host A also has an email client and a chat window open both of which use TCP. Both the email and chat applications use a unique TCP port number on host A as well 1027 and 1028 as shown in the figure. Eth. IP TCP Dest Port HTTP + Data A Browser: Browser: Browser: Email: Chat: TCP port 1024 TCP port 1025 TCP port 1026 TCP port 1027 TCP port 1028 Web Server Figure 5-14 Dilemma: How Host A Chooses the App That Should Receive This Data This chapter has shown several examples of how Transport layer protocols use the destina- tion port number field in the TCP or UDP header to identify the receiving application. For instance if the destination TCP port value in Figure 5-15 is 1024 host A will know that the data is meant for the first of the three web browser windows. Before a receiving host can even examine the TCP or UDP header and find the destination port field it must first process the outer headers in the message. If the incoming message is an Ethernet frame that encapsulates an IPv4 packet the headers look like the details in Figure 5-15. Web Server Ethernet Type IPv4 Protocol TCP Dest Port 1024 6 0x0800 HTTP and Data Figure 5-15 Three Key Fields with Which to Identify the Next Header The receiving host needs to look at multiple fields one per header to identify the next header or field in the received message. For instance host A uses an Ethernet NIC to con- nect to the network so the received message is an Ethernet frame. As first shown back in Figure 2-16 in Chapter 2 “Fundamentals of Ethernet LANs” the Ethernet Type field identi- fies the type of header that follows the Ethernet header—in this case with a value of hex 0800 an IPv4 header.

slide 173:

ptg17246291 Chapter 5: Fundamentals of TCP/IP Transport and Applications 119 5 The IPv4 header has a similar field called the IP Protocol field. The IPv4 Protocol field has a standard list of values that identify the next header with decimal 6 used for TCP and deci- mal 17 used for UDP. In this case the value of 6 identifies the TCP header that follows the IPv4 header. Once the receiving host realizes a TCP header exists it can process the destina- tion port field to determine which local application process should receive the data. Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment section titled “Step 2: Build Your Study Habits Around the Chapter” for more details. Table 5-4 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 5-4 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Review memory tables Book DVD/website Review All the Key Topics Table 5-5 Key T opics for Chapter 5 Key Topic Element Description Page Number Table 5-2 Functions of TCP and UDP 104 Table 5-3 W ell-known TCP and UDP port numbers 109 Figure 5-5 Example of TCP connection establishment 110 List Definitions of connection-oriented and connectionless 111 Figure 5-15 Header fields that identify the next header 118 Key Terms You Should Know connection establishment error detection error recovery flow control forward acknowl- edgment HTTP ordered data transfer port segment sliding windows URI web server

slide 174:

ptg17246291 Keep track of your part review progress with the checklist shown in Table P1-1. Details on each task follow the table. Table P1-1 Part I Review Checklist Activity 1st Date Completed 2nd Date Completed Repeat All DIKTA Questions Answer Part Review Questions Review Key Topics Create Terminology Mind Maps Repeat All DIKTA Questions For this task answer the “Do I Know This Already” questions again for the chapters in this part of the book using the PCPT software. Refer to the Introduction to this book section “How to View Only DIKTA Questions by Chapter or Part” for help with how to make the PCPT software show you DIKTA questions for this part only. Answer Part Review Questions For this task answer the Part Review questions for this part of the book using the PCPT software. Refer to the Introduction to this book section “How to View Part Review Questions” for help with how to make the PCPT software show you Part Review Part I Review

slide 175:

ptg17246291 questions for this part only. Note that if you use the questions but then even want more get the Premium Edition of the book as detailed in the Introduction in the section “Other Features” under the item labeled “eBook.” Review Key Topics Browse back through the chapters and look for the Key Topic icons. If you do not remem- ber some details take the time to reread those topics or use the Key Topics applications found on the companion website and the DVD. Create Terminology Mind Maps The first part of this book introduces a large amount of terminology. The sheer number of terms can be overwhelming. But more and more while you work through each new chapter you will become more comfortable with the terms. And the better you can remember the core meaning of a term the easier your reading will be going forward. For your first mind map exercise in this book without looking back at the chapters or your notes you will create six mind maps. The mind maps will each list a number in the center 1 through 6 to match the numbers shown in Figure P1-1. Your job is as follows: ■ Think of every term that you can remember from Part I of the book. ■ Think of each of the six mind maps as being about the item next to the number in Figure P1-1. For example number 1 is about the user PC number 2 is about an Ethernet cable that connects PC1 to a switch and so on. ■ Add each term that you can recall to all mind maps to which it applies. For example leased line would apply to mind map number 5. ■ If a term seems to apply to multiple places add it to all those mind maps. ■ After you have written every term you can remember into one of the mind maps review the Key Terms lists at the end of Chapters 1 through 5. Add any terms you forgot to your mind maps. Core B1 1 2 3 4 5 6 Figure P1-1 Sample Network to Use with Mind Map Exercise The goal of these minds maps is to help you recall the terms with enough meaning to associ- ate the terms with the right part of a simple network design. On your first review of Part I do not be concerned if you cannot fully explain each term because you will learn many of these terms more fully just by reading the rest of the book. NOTE For more information on mind mapping refer to the Introduction in the section “About Mind Maps.”

slide 176:

ptg17246291 122 CCENT/CCNA ICND1 100-105 Official Cert Guide Create the mind maps in Table P1-2 on paper using any mind-mapping software or even any drawing application. If you use an application note the filename and location where you saved the file for later reference. Sample answers are listed in DVD Appendix L “Mind Map Solutions.” Table P1-2 Configuration Mind Maps for Part I Review Map Description Where You Saved It 1 Client PC 2 Ethernet link 3 LAN switch 4 Router 5 Leased line 6 Server

slide 177:

ptg17246291 This page intentionally left blank

slide 178:

ptg17246291 Part I provided a broad look at the fundamentals of all parts of networking. Parts II and III now drill into depth about the details of Ethernet which was introduced back in Chapter 2 “Fundamentals of Ethernet LANs.” Part II begins that journey by discussing the basics of building a small Ethernet LAN with Cisco Catalyst switches. The journey begins by showing how to access the user interface of a Cisco switch so that you can see evidence of what the switch is doing and to configure the switch to act in the ways you want it to act. At this point you should start using what- ever lab practice option you chose in the “Your Study Plan” section that preceded Chapter 1 “Introduction to TCP/IP Networking.” And if you have not yet finalized your plan for how to practice your hands-on skills now is the time. When you complete Chapter 6 and see how to get into the command-line interface CLI of a switch the next three chapters step through some important foundations of how to implement LANs—foundations used by every company that builds LANs with Cisco gear. Chapter 7 takes a close look at Ethernet switching—that is the logic used by a switch—and how to know what a particular switch is doing. Chapter 8 shows the ways to configure a switch for remote access with Telnet and Secure Shell SSH along with a variety of other useful commands that will help you when you work with any real lab gear simulator or any other practice tools. Chapter 9 the final chapter in Part II shows how to configure switch interfaces for several important features: port security and the inter-related features of speed duplex and autonegotiation.

slide 179:

ptg17246291 Part II Implementing Basic Ethernet LANs Chapter 6: Using the Command-Line Interface Chapter 7: Analyzing Ethernet LAN Switching Chapter 8: Configuring Basic Switch Management Chapter 9: Configuring Switch Interfaces Part II Review

slide 180:

ptg17246291 CHAPTER 6 Using the Command-Line Interface This chapter covers the following exam topics: 1.0 Network Fundamentals 1.6 Select the appropriate cabling type based on implementation requirements NOTE This chapter primarily explains foundational skills required before you can explore the roughly 20 exam topics that use the verbs configure verify and troubleshoot. To create an Ethernet LAN a network engineer starts by planning. They consider the requirements create a design buy the switches contract to install cables and configure the switches to use the right features. The CCENT and CCNA Routing and Switching exams focus on skills like understanding how LANs work configuring different switch features verifying that those features work correctly and finding the root cause of the problem when a feature is not working cor- rectly. The first skill you need to learn before doing all the configuration verification and troubleshooting tasks is to learn how to access and use the user interface of the switch called the command-line interface CLI. This chapter begins that process by showing the basics of how to access the switch’s CLI. These skills include how to access the CLI and how to issue verification commands to check on the status of the LAN. This chapter also includes the processes of how to configure the switch and how to save that configuration. Note that this chapter focuses on processes that provide a foundation for most every exam topic that includes the verbs configure verify and troubleshoot. Chapter 7 “Analyzing Ethernet LAN Switching” Chapter 8 “Configuring Basic Switch Management” and Chapter 9 “Configuring Switch Interfaces” then examine particular commands you can use to verify and configure different switch features. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 181:

ptg17246291 Table 6-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Accessing the Cisco Catalyst Switch CLI 1–3 Configuring Cisco IOS Software 4–6 1. In what modes can you type the command show mac address-table and expect to get a response with MAC table entries Choose two answers. a. User mode b. Enable mode c. Global configuration mode d. Interface configuration mode 2. In which of the following modes of the CLI could you type the command reload and expect the switch to reboot a. User mode b. Enable mode c. Global configuration mode d. Interface configuration mode 3. Which of the following is a difference between Telnet and SSH as supported by a Cisco switch a. SSH encrypts the passwords used at login but not other traffic Telnet encrypts nothing. b. SSH encrypts all data exchange including login passwords Telnet encrypts nothing. c. Telnet is used from Microsoft operating systems and SSH is used from UNIX and Linux operating systems. d. Telnet encrypts only password exchanges SSH encrypts all data exchanges. 4. What type of switch memory is used to store the configuration used by the switch when it is up and working a. RAM b. ROM c. Flash d. NVRAM e. Bubble

slide 182:

ptg17246291 128 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. What command copies the configuration from RAM into NVRAM a. copy running-config tftp b. copy tftp running-config c. copy running-config start-up-config d. copy start-up-config running-config e. copy startup-config running-config f. copy running-config startup-config 6. A switch user is currently in console line configuration mode. Which of the following would place the user in enable mode Choose two answers. a. Using the exit command once b. Using the end command once c. Pressing the Ctrl+Z key sequence once d. Using the quit command Foundation Topics Accessing the Cisco Catalyst Switch CLI Cisco uses the concept of a command-line interface CLI with its router products and most of its Catalyst LAN switch products. The CLI is a text-based interface in which the user typically a network engineer enters a text command and presses Enter. Pressing Enter sends the command to the switch which tells the device to do something. The switch does what the command says and in some cases the switch replies with some messages stating the results of the command. Cisco Catalyst switches also support other methods to both monitor and configure a switch. For example a switch can provide a web interface so that an engineer can open a web browser to connect to a web server running in the switch. Switches also can be controlled and operated using network management software. This book discusses only Cisco Catalyst enterprise-class switches and in particular how to use the Cisco CLI to monitor and control these switches. This first major section of the chapter first examines these Catalyst switches in more detail and then explains how a net- work engineer can get access to the CLI to issue commands. Cisco Catalyst Switches Within the Cisco Catalyst brand of LAN switches Cisco produces a wide variety of switch series or families. Each switch series includes several specific models of switches that have similar features similar price-versus-performance trade-offs and similar internal components. For example at the time this book was published the Cisco 2960-X series of switches was a current switch model series. Cisco positions the 2960-X series family of switches as full-featured low-cost wiring closet switches for enterprises. That means that you would expect to use 2960-X switches as access switches in a typical campus LAN design. Chapter 10 “Analyzing Ethernet LAN Designs” discusses campus LAN design and the roles of various switches.

slide 183:

ptg17246291 Chapter 6: Using the Command-Line Interface 129 6 Figure 6-1 shows a photo of 10 different models from the 2960-X switch model series from Cisco. Each switch series includes several models with a mix of features. For example some of the switches have 48 RJ-45 unshielded twisted-pair UTP 10/100/1000 ports meaning that these ports can autonegotiate the use of 10BASE-T 10 Mbps 100BASE-T 100 Mbps or 1000BASE-T 1 Gbps Ethernet. Figure 6-1 Cisco 2960-X Catalyst Switch Series Cisco refers to a switch’s physical connectors as either interfaces or ports with an interface type and interface number. The interface type as used in commands on the switch is either Ethernet Fast Ethernet Gigabit Ethernet and so on for faster speeds. For Ethernet inter- faces that support running at multiple speeds the permanent name for the interface refers to the fastest supported speed. For example a 10/100/1000 interface that is an interface that runs at 10 Mbps 100 Mbps or 1000 Mbps would be called Gigabit Ethernet no mat- ter what speed is currently in use. To uniquely number each different interface some Catalyst switches use a two-digit interface number x/y while others have a three-digit number x/y/z. For instance two 10/100/1000 ports on many older Cisco Catalyst switches would be called Gigabit Ethernet 0/0 and Gigabit Ethernet 0/1 while on the newer 2960-X series two interfaces would be Gigabit Ethernet 1/0/1 and Gigabit Ethernet 1/0/2 for example. Accessing the Cisco IOS CLI Like any other piece of computer hardware Cisco switches need some kind of operating system software. Cisco calls this OS the Internetwork Operating System IOS. Cisco IOS Software for Catalyst switches implements and controls logic and functions per- formed by a Cisco switch. Besides controlling the switch’s performance and behavior Cisco IOS also defines an interface for humans called the CLI. The Cisco IOS CLI allows the user to use a terminal emulation program which accepts text entered by the user. When the user presses Enter the terminal emulator sends that text to the switch. The switch processes the text as if it is a command does what the command says and sends text back to the terminal emulator. The switch CLI can be accessed through three popular methods—the console Telnet and Secure Shell SSH. Two of these methods Telnet and SSH use the IP network in which the switch resides to reach the switch. The console is a physical port built specifically to allow access to the CLI. Figure 6-2 depicts the options. Answers to the “Do I Know This Already” quiz: 1 A B 2 B 3 B 4 A 5 F 6 B C

slide 184:

ptg17246291 130 CCENT/CCNA ICND1 100-105 Official Cert Guide Console User Mode Interface 2960 Switch Telnet and SSH Short Console Cable RJ-45 or USB Serial or USB TCP/IP Network Figure 6-2 CLI Access Options Console access requires both a physical connection between a PC or other user device and the switch’s console port as well as some software on the PC. Telnet and SSH require software on the user’s device but they rely on the existing TCP/IP network to transmit data. The next few pages detail how to connect the console and set up the software for each method to access the CLI . Cabling the Console Connection The physical console connection both old and new uses three main components: the physi- cal console port on the switch a physical serial port on the PC and a cable that works with the console and serial ports. However the physical cabling details have changed slowly over time mainly because of advances and changes with serial interfaces on PC hardware. For this next topic the text looks at three cases: newer connectors on both the PC and the switch older connectors on both and a third case with the newer USB connector on the PC but with an older connector on the switch. More modern PC and switch hardware use a familiar standard USB cable for the console connection. Cisco has been including USB ports as console ports in newer routers and switches as well. All you have to do is look at the switch to make sure you have the cor- rect style of USB cable end to match the USB console port. In the simplest form you can use any USB port on the PC with a USB cable connected to the USB console port on the switch or router as shown on the far right side of Figure 6-3. 1 RJ-45 Console Serial Port Rollover Cable SW1 2 RJ-45 Console USB Port USB Converter USB Cable Rollover Cable SW2 3 USB Console USB Port USB Cable SW3 SW1 SW2 SW3 Figure 6-3 Console Connection to a Switch

slide 185:

ptg17246291 Chapter 6: Using the Command-Line Interface 131 6 Older console connections use a PC serial port that pre-dates USB a UTP cable and an RJ-45 console port on the switch as shown on the left side of Figure 6-3. The PC serial port typically has a D-shell connector roughly rectangular with nine pins often called a DB-9. The console port looks like any Ethernet RJ-45 port but is typically colored in blue and with the word “console” beside it on the switch. The cabling for this older-style console connection can be simple or require some effort depending on what cable you use. You can use the purpose-built console cable that ships with new Cisco switches and routers and not think about the details. However you can make your own cable with a standard serial cable with a connector that matches the PC a standard RJ-45 to DB-9 converter plug and a UTP cable. However the UTP cable does not use the same pinouts as Ethernet instead the cable uses rollover cable pinouts rather than any of the standard Ethernet cabling pinouts. The rollover pinout uses eight wires rolling the wire at pin 1 to pin 8 pin 2 to pin 7 pin 3 to pin 6 and so on. As it turns out USB ports became common on PCs before Cisco began commonly using USB for its console ports. So you also have to be ready to use a PC that has only a USB port and not an old serial port but a router or switch that has the older RJ-45 console port and no USB console port. The center of Figure 6-3 shows that case. To connect such a PC to a router or switch console you need a USB converter that converts from the older console cable to a USB connector and a rollover UTP cable as shown in the middle of Figure 6-3. NOTE When using the USB options you typically also need to install a software driver so that your PC’s OS knows that the device on the other end of the USB connection is the console of a Cisco device. Also you can easily find photos of these cables and components online with searches like “cisco console cable” “cisco usb console cable” or “console cable converter.” The newer 2960-X series for instance supports both the older RJ-45 console port and a USB console port. Figure 6-4 points to the two console ports you would use only one or the other. Note that the USB console port uses a mini-B port rather than the more com- monly seen rectangular standard USB port. USB Console Mini-B RJ-45 Console Figure 6-4 A Part of a 2960-X Switch with Console Ports Shown

slide 186:

ptg17246291 132 CCENT/CCNA ICND1 100-105 Official Cert Guide After the PC is physically connected to the console port a terminal emulator software package must be installed and configured on the PC. The terminal emulator software treats all data as text. It accepts the text typed by the user and sends it over the console connec- tion to the switch. Similarly any bits coming into the PC over the console connection are displayed as text for the user to read. The emulator must be configured to use the PC’s serial port to match the settings on the switch’s console port settings. The default console port settings on a switch are as follows. Note that the last three parameters are referred to collectively as 8N1: ■ 9600 bits/second ■ No hardware flow control ■ 8-bit ASCII ■ No parity bits ■ 1 stop bit Figure 6-5 shows one such terminal emulator. The image shows the window created by the emulator software in the background with some output of a show command. The fore- ground in the upper left shows a settings window that lists the default console settings as listed just before this paragraph. Figure 6-5 Terminal Settings for Console Access

slide 187:

ptg17246291 Chapter 6: Using the Command-Line Interface 133 6 Accessing the CLI with Telnet and SSH For many years terminal emulator applications have supported far more than the ability to communicate over a serial port to a local device like a switch’s console. Terminal emulators support a variety of TCP/IP applications as well including Telnet and SSH. Telnet and SSH both allow the user to connect to another device’s CLI but instead of connecting through a console cable to the console port the traffic flows over the same IP network that the net- working devices are helping to create. Telnet uses the concept of a Telnet client the terminal application and a Telnet server the switch in this case. A Telnet client the device that sits in front of the user accepts keyboard input and sends those commands to the Telnet server. The Telnet server accepts the text interprets the text as a command and replies back. Telnet is a TCP-based appli- cation layer protocol that uses well-known port 23. Cisco Catalyst switches enable a Telnet server by default but switches need a few more configuration settings before you can successfully use Telnet to connect to a switch. Chapter 8 covers switch configuration to support Telnet and SSH in detail. Using Telnet in a lab today makes sense but Telnet poses a significant security risk in pro- duction networks. Telnet sends all data including any username and password for login to the switch as clear-text data. SSH gives us a much better option. Think of SSH as the much more secure Telnet cousin. Outwardly you still open a terminal emulator connect to the switch’s IP address and see the switch CLI no matter whether you use Telnet or SSH. The differences exist behind the scenes: SSH encrypts the contents of all messages including the passwords avoiding the possibility of someone capturing packets in the network and stealing the password to network devices. Like Telnet SSH uses TCP just using well-known port 22 instead of Telnet’s 23. User and Enable Privileged Modes All three CLI access methods covered so far console Telnet and SSH place the user in an area of the CLI called user EXEC mode. User EXEC mode sometimes also called user mode allows the user to look around but not break anything. The “EXEC mode” part of the name refers to the fact that in this mode when you enter a command the switch executes the command and then displays messages that describe the command’s results. NOTE If you have not used the CLI before you might want to experiment with the CLI from the Sim Lite product or view the video about CLI basics. You can find these resources on the DVD and on the companion website as mentioned in the introduction. Cisco IOS supports a more powerful EXEC mode called enable mode also known as privi- leged mode or privileged EXEC mode. Enable mode gets its name from the enable com- mand which moves the user from user mode to enable mode as shown in Figure 6-6. The other name for this mode privileged mode refers to the fact that powerful or privileged commands can be executed there. For example you can use the reload command which tells the switch to reinitialize or reboot Cisco IOS only from enable mode.

slide 188:

ptg17246291 134 CCENT/CCNA ICND1 100-105 Official Cert Guide User Mode Console Telnet SSH Enable Command Disable Command Enable Mode Privileged Mode Figure 6-6 User and Privileged Modes NOTE If the command prompt lists the hostname followed by a the user is in user mode if it is the hostname followed by the the user is in enable mode. Example 6-1 demonstrates the differences between user and enable modes. The example shows the output that you could see in a terminal emulator window for instance when con- necting from the console. In this case the user sits at the user mode prompt “Certskills1” and tries the reload command. The reload command tells the switch to reinitialize or reboot Cisco IOS so IOS allows this powerful command to be used only from enable mode. IOS rejects the reload command when used in user mode. Then the user moves to enable mode—also called privileged mode—using the enable EXEC command. At that point IOS accepts the reload command now that the user is in enable mode. Example 6-1 Example of Privileged Mode Commands Being Rejected in User Mode Press RETURN to get started. User Access Verification Password: Certskills1 Certskills1 reload Translating "reload" Unknown command or computer name or unable to find computer address Certskills1 enable Password: Certskills1 Certskills1 reload Proceed with reload confirm y 00:08:42: SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.

slide 189:

ptg17246291 Chapter 6: Using the Command-Line Interface 135 6 NOTE The commands that can be used in either user EXEC mode or enable EXEC mode are called EXEC commands. This example is the first instance of this book showing you the output from the CLI so it is worth noting a few conventions. The bold text represents what the user typed and the non- bold text is what the switch sent back to the terminal emulator. Also the typed passwords do not show up on the screen for security purposes. Finally note that this switch has been preconfigured with a hostname of Certskills1 so the command prompt on the left shows that hostname on each line. Password Security for CLI Access from the Console A Cisco switch with default settings remains relatively secure when locked inside a wir- ing closet because by default a switch allows console access only. By default the console requires no password at all and no password to reach enable mode for users that happened to connect from the console. The reason is that if you have access to the physical con- sole port of the switch you already have pretty much complete control over the switch. You could literally get out your screwdriver and walk off with it or you could unplug the power or follow well-published procedures to go through password recovery to break into the CLI and then configure anything you want to configure. However many people go ahead and set up simple password protection for console users. Simple passwords can be configured at two points in the login process from the console: when the user connects from the console and when any user moves to enable mode using the enable EXEC command. You may have noticed that back in Example 6-1 the user saw a password prompt at both points. Example 6-2 shows the additional configuration commands that were configured prior to collecting the output in Example 6-1. The output holds an excerpt from the EXEC com- mand show running-config which lists the current configuration in the switch. Example 6-2 Nondefault Basic Configuration Certskills1 show running-config Output has been formatted to show only the parts relevant to this discussion hostname Certskills1 enable secret love line console 0 login password faith The rest of the output has been omitted Certskills1 Working from top to bottom note that the first configuration command listed by the show running-config command sets the switch’s hostname to Certskills1. You might have noticed that the command prompts in Example 6-1 all began with Certskills1 and that’s why the command prompt begins with the hostname of the switch.

slide 190:

ptg17246291 136 CCENT/CCNA ICND1 100-105 Official Cert Guide Next note that the lines with a in them are comment lines both in the text of this book and in the real switch CLI. The enable secret love configuration command defines the password that all users must use to reach enable mode. So no matter whether a user connects from the console Telnet or SSH they would use password love when prompted for a password after typing the enable EXEC command. Finally the last three lines configure the console password. The first line line console 0 is the command that identifies the console basically meaning “these next commands apply to the console only.” The login command tells IOS to perform simple password checking at the console. Remember by default the switch does not ask for a password for console users. Finally the password faith command defines the password the console user must type when prompted. This example just scratches the surface of the kinds of security configuration you might choose to configure on a switch but it does give you enough detail to configure switches in your lab and get started which is the reason I put these details in this first chapter of Part II. Note that Chapter 8 shows the configuration steps to add support for Telnet and SSH including password security and Chapter 34 “Device Security Features” shows a d di t i o na l s e c uri t y c o nf i gur a t i o n as we l l . CLI Help Features If you printed the Cisco IOS Command Reference documents you would end up with a stack of paper several feet tall. No one should expect to memorize all the commands—and no one does. You can use several very easy convenient tools to help remember commands and save time typing. As you progress through your Cisco certifications the exams will cover progressively more commands. However you should know the methods of getting command help. Table 6-2 summarizes command-recall help options available at the CLI. Note that in the first column command represents any command. Likewise parm represents a command’s parameter. For example the third row lists command which means that commands such as show and copy would list help for the show and copy commands respectively. Table 6-2 Cisco IOS Software Command Help What You Enter What Help You Get Help for all commands available in this mode. command With a space between the command and the the switch lists text to describe all the first parameter options for the command. com A list of commands that start with com. command parm Lists all parameters beginning with the parameter typed so far. Notice that there is no space between parm and the . command parmTab Pressing the Tab key causes IOS to spell out the rest of the word assuming that you have typed enough of the word so there is only one option that begins with that string of characters. command parm1 If a space is inserted before the question mark the CLI lists all the next parameters and gives a brief explanation of each.

slide 191:

ptg17246291 Chapter 6: Using the Command-Line Interface 137 6 When you enter the the Cisco IOS CLI reacts immediately that is you don’t need to press the Enter key or any other keys. The device running Cisco IOS also redisplays what you entered before the to save you some keystrokes. If you press Enter immediately after the Cisco IOS tries to execute the command with only the parameters you have entered so far. The information supplied by using help depends on the CLI mode. For example when is entered in user mode the commands allowed in user mode are displayed but com- mands available only in enable mode not in user mode are not displayed. Also help is available in configuration mode which is the mode used to configure the switch. In fact configuration mode has many different subconfiguration modes as explained in the section “Configuration Submodes and Contexts” later in this chapter. So you can get help for the commands available in each configuration submode as well. Note that this might be a good time to use the free NetSim Lite product on the DVD—open any lab use the question mark and try some commands. Cisco IOS stores the commands that you enter in a history buffer storing ten commands by default. The CLI allows you to move backward and forward in the historical list of com- mands and then edit the command before reissuing it. These key sequences can help you use the CLI more quickly on the exams. Table 6-3 lists the commands used to manipulate previously entered commands . Table 6-3 Key Sequences for Command Edit and Recall Keyboard Command What Happens Up arrow or Ctrl+P This displays the most recently used command. If you press it again the next most recent command appears until the history buffer is exhausted. The P stands for previous. Down arrow or Ctrl+N If you have gone too far back into the history buffer these keys take you forward to the more recently entered commands. The N stands for next. Left arrow or Ctrl+B This moves the cursor backward in the currently displayed command without deleting characters. The B stands for back. Right arrow or Ctrl+F This moves the cursor forward in the currently displayed command without deleting characters. The F stands for forward. Backspace This moves the cursor backward in the currently displayed co mman d d e l e t ing chara c t e r s . The debug and show Commands By far the single most popular Cisco IOS command is the show command. The show command has a large variety of options and with those options you can find the status of almost every feature of Cisco IOS. Essentially the show command lists the currently known facts about the switch’s operational status. The only work the switch does in reac- tion to show commands is to find the current status and list the information in messages sent to the user. For example consider the output from the show mac address-table dynamic command listed in Example 6-3. This show command issued from user mode lists the table the switch uses to make forwarding decisions. A switch’s MAC address table basically lists the data a switch uses to do its primary job.

slide 192:

ptg17246291 138 CCENT/CCNA ICND1 100-105 Official Cert Guide Example 6-3 Nondefault Basic Configuration Certskills1 show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 31 0200.1111.1111 DYNAMIC Gi0/1 31 0200.3333.3333 DYNAMIC Fa0/3 31 1833.9d7b.0e9a DYNAMIC Gi0/1 10 1833.9d7b.0e9a DYNAMIC Gi0/1 10 30f7.0d29.8561 DYNAMIC Gi0/1 1 1833.9d7b.0e9a DYNAMIC Gi0/1 12 1833.9d7b.0e9a DYNAMIC Gi0/1 Total Mac Addresses for this criterion: 7 Certskills1 The debug command also tells the user details about the operation of the switch. However while the show command lists status information at one instant of time—more like a pho- tograph—the debug command acts more like a live video camera feed. Once you issue a debug command IOS remembers issuing messages that any switch user can choose to see. The console sees these messages by default. Most of the commands used throughout this book to verify operation of switches and routers are show commands. Configuring Cisco IOS Software You will want to configure every switch in an Enterprise network even though the switches will forward traffic even with default configuration. This section covers the basic configu- ration processes including the concept of a configuration file and the locations in which the configuration files can be stored. Although this section focuses on the configuration process and not on the configuration commands themselves you should know all the com- mands covered in this chapter for the exams in addition to the configuration processes. Configuration mode is another mode for the Cisco CLI similar to user mode and privileged mode. User mode lets you issue non-disruptive commands and displays some information. Privileged mode supports a superset of commands compared to user mode including com- mands that might disrupt switch operations. However none of the commands in user or privileged mode changes the switch’s configuration. Configuration mode accepts configura- tion commands —commands that tell the switch the details of what to do and how to do it. Figure 6-7 illustrates the relationships among configuration mode user EXEC mode and privileged EXEC mode . configure terminal end or Ctl-Z Configuration Mode User Mode enable disable Enable Mode Figure 6-7 CLI Configuration Mode Versus EXEC Modes

slide 193:

ptg17246291 Chapter 6: Using the Command-Line Interface 139 6 Commands entered in configuration mode update the active configuration file. These changes to the configuration occur immediately each time you press the Enter key at the end of a command. Be careful when you enter a configuration command Configuration Submodes and Contexts Configuration mode itself contains a multitude of commands. To help organize the configu- ration IOS groups some kinds of configuration commands together. To do that when using configuration mode you move from the initial mode—global configuration mode—into subcommand modes. Context-setting commands move you from one configuration sub- command mode or context to another. These context-setting commands tell the switch the topic about which you will enter the next few configuration commands. More importantly the context tells the switch the topic you care about right now so when you use the to get help the switch gives you help about that topic only. NOTE Context-setting is not a Cisco term. It is just a description used here to help make sense of configuration mode. The best way to learn about configuration submodes is to use them but first take a look at these upcoming examples. For instance the interface command is one of the most com- monly used context-setting configuration commands. For example the CLI user could enter interface configuration mode by entering the interface FastEthernet 0/1 configuration command. Asking for help in interface configuration mode displays only commands that are useful when configuring Ethernet interfaces. Commands used in this context are called sub- commands—or in this specific case interface subcommands. When you begin practicing with the CLI with real equipment the navigation between modes can become natural. For now consider Example 6-4 which shows the following : ■ Movement from enable mode to global configuration mode by using the configure terminal EXEC command ■ Using a hostname Fred global configuration command to configure the switch’s name ■ Movement from global configuration mode to console line configuration mode using the line console 0 command ■ Setting the console’s simple password to hope using the password hope line subcom- mand ■ Movement from console configuration mode to interface configuration mode using the interface type number command ■ Setting the speed to 100 Mbps for interface Fa0/1 using the speed 100 interface sub- command ■ Movement from interface configuration mode back to global configuration mode using the exit command Example 6-4 Navigating Between Different Configuration Modes Switch configure terminal Switchconfig hostname Fred Fredconfig line console 0 Fredconfig-line password hope Fredconfig-line interface FastEthernet 0/1

slide 194:

ptg17246291 140 CCENT/CCNA ICND1 100-105 Official Cert Guide Fredconfig-if speed 100 Fredconfig-if exit Fredconfig The text inside parentheses in the command prompt identifies the configuration mode. For example the first command prompt after you enter configuration mode lists config meaning global configuration mode. After the line console 0 command the text expands to config-line meaning line configuration mode. Each time the command prompt changes within config mode you have moved to another configuration mode. Table 6-4 shows the most common command prompts in configuration mode the names of those modes and the context-setting commands used to reach those modes. Table 6-4 Common Switch Configuration Modes Prompt Name of Mode Context-Setting Commands to Reach This Mode hostnameconfig Global None—first mode after configure terminal hostnameconfig-line Line line console 0 line vty 0 15 hostnameconfig-if Interface interface type number hostnamevlan VLAN vlan number You should practice until you become comfortable moving between the different configu- ration modes back to enable mode and then back into the configuration modes. However you can learn these skills just doing labs about the topics in later chapters of the book. For now Figure 6-8 shows most of the navigation between global configuration mode and the four configuration submodes listed in Table 6-4. interface type/number End or Ctl-Z exit Interface Mode configure terminal End or Ctl-Z Enable Mode Global Config Mode vlan x exit VLAN Mode line console 0 exit Console Line Mode line vty 0 15 exit VTY Line Mode Figure 6-8 Navigation In and Out of Switch Configuration Modes

slide 195:

ptg17246291 Chapter 6: Using the Command-Line Interface 141 6 NOTE You can also move directly from one configuration submode to another without first using the exit command to move back to global configuration mode. Just use the com- mands listed in bold in the center of the figure. You really should stop and try navigating around these configuration modes. If you have not yet decided on a lab strategy spin the DVD in the back of the book and install the Pearson Sim Lite software. It includes the simulator and a couple of lab exercises. Start any lab ignore the instructions and just get into configuration mode and move around between the configuration modes shown in Figure 6-8. No set rules exist for what commands are global commands or subcommands. Generally however when multiple instances of a parameter can be set in a single switch the command used to set the parameter is likely a configuration subcommand. Items that are set once for the entire switch are likely global commands. For example the hostname command is a global command because there is only one hostname per switch. Conversely the speed command is an interface subcommand that applies to each switch interface that can run at different speeds so it is a subcommand applying to the particular interface under which it is configured. Storing Switch Configuration Files When you configure a switch it needs to use the configuration. It also needs to be able to retain the configuration in case the switch loses power. Cisco switches contain random-access memory RAM to store data while Cisco IOS is using it but RAM loses its contents when the switch loses power or is reloaded. To store information that must be retained when the switch loses power or is reloaded Cisco switches use several types of more permanent memory none of which has any moving parts. By avoiding components with moving parts such as traditional disk drives switches can maintain better uptime and availability. The following list details the four main types of memory found in Cisco switches as well as the most common use of each type: ■ RAM: Sometimes called DRAM for dynamic random-access memory RAM is used by the switch just as it is used by any other computer: for working storage. The running active configuration file is stored here. ■ Flash memory: Either a chip inside the switch or a removable memory card flash mem- ory stores fully functional Cisco IOS images and is the default location where the switch gets its Cisco IOS at boot time. Flash memory also can be used to store any other files including backup copies of configuration files. ■ ROM: Read-only memory ROM stores a bootstrap or boothelper program that is loaded when the switch first powers on. This bootstrap program then finds the full Cisco IOS image and manages the process of loading Cisco IOS into RAM at which point Cisco IOS takes over operation of the switch. ■ NVRAM: Nonvolatile RAM NVRAM stores the initial or startup configuration file that is used when the switch is first powered on and when the switch is reloaded. Figure 6-9 summarizes this same information in a briefer and more convenient form for memorization and study.

slide 196:

ptg17246291 142 CCENT/CCNA ICND1 100-105 Official Cert Guide RAM Working Memory and Running Configuration Flash Cisco IOS Software ROM Bootstrap Program NVRAM Startup Configuration Figure 6-9 Cisco Switch Memory Types Cisco IOS stores the collection of configuration commands in a configuration file. In fact switches use multiple configuration files—one file for the initial configuration used when powering on and another configuration file for the active currently used running configu- ration as stored in RAM. Table 6-5 lists the names of these two files their purpose and their storage location . Table 6-5 Names and Purposes of the Two Main Cisco IOS Configuration Files Configuration Filename Purpose Where It Is Stored startup-config Stores the initial configuration used anytime the switch reloads Cisco IOS. NVRAM running-config Stores the currently used configuration commands. This file changes dynamically when someone enters commands in configuration mode. RAM Essentially when you use configuration mode you change only the running-config file. This means that the configuration example earlier in this chapter Example 6-4 updates only the running-config file. However if the switch lost power right after that example all that configuration would be lost. If you want to keep that configuration you have to copy the running-config file into NVRAM overwriting the old startup-config file. Example 6-5 demonstrates that commands used in configuration mode change only the run- ning configuration in RAM. The example shows the following concepts and steps: Step 1. The example begins with both the running and startup-config having the same hostname per the hostname hannah command. Step 2. The hostname is changed in configuration mode using the hostname jessie command. Step 3. The show running-config and show startup-config commands show the fact that the hostnames are now different with the hostname jessie command found only in the running-config. Example 6-5 How Configuration Mode Commands Change the Running-Config File Not the Startup-Config File Step 1 next two commands hannah show running-config lines omitted hostname hannah rest of lines omitted

slide 197:

ptg17246291 Chapter 6: Using the Command-Line Interface 143 6 hannah show startup-config lines omitted hostname hannah rest of lines omitted Step 2 next. Notice that the command prompt changes immediately after the hostname command. hannah configure terminal hannahconfig hostname jessie jessieconfig exit Step 3 next two commands jessie show running-config lines omitted – just showing the part with the hostname command hostname jessie jessie show startup-config lines omitted – just showing the part with the hostname command hostname hannah Copying and Erasing Configuration Files The configuration process updates the running-config file which is lost if the router loses power or is reloaded. Clearly IOS needs to provide us a way to copy the running config- uration so that it will not be lost so it will be used the next time the switch reloads or powers on. For instance Example 6-5 ended with a different running configuration with the hostname jessie command versus the startup configuration. In short the EXEC command copy running-config startup-config backs up the running- config to the startup-config file. This command overwrites the current startup-config file with what is currently in the running-configuration file. In addition in lab you may want to just get rid of all existing configuration and start over with a clean configuration. To do that you can erase the startup-config file using three dif- ferent commands: write erase erase startup-config erase nvram: Once the startup-config file is erased you can reload or power off/on the switch and it will boot with the now-empty startup configuration. Note that Cisco IOS does not have a command that erases the contents of the running- config file. To clear out the running-config file simply erase the startup-config file and t h e n reload the switch and the running-config will be empty at the end of the process. NOTE Cisco uses the term reload to refer to what most PC operating systems call reboot- ing or restarting. In each case it is a re-initialization of the software. The reload EXEC com- mand causes a switch to reload.

slide 198:

ptg17246291 144 CCENT/CCNA ICND1 100-105 Official Cert Guide Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment section titled “Step 2: Build Your Study Habits Around the Chapter” for more details. Table 6-6 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 6-6 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Review memory tables Book DVD/website Review command tables Book Review All the Key Topics Table 6-7 Key T opics for Chapter 6 Key Topic Element Description Page Number Figure 6-2 Three methods to access a switch CLI 130 Figure 6-3 Cabling options for a console connection 130 List A Cisco switch’s default console port settings 132 Figure 6-7 Navigation between user enable and global config modes 138 Table 6-4 A list of configuration mode prompts the name of the configuration mode and the command used to reach each mode 140 Figure 6-8 Configuration mode context-setting commands 140 Table 6-5 The names and purposes of the two configuration files in a switch or router 142 Key Terms You Should Know command-line interface CLI Telnet Secure Shell SSH enable mode user mode configu- ration mode startup-config file running-config file Command References Tables 6-8 and 6-9 list configuration and verification commands used in this chapter respec- tively. As an easy review exercise cover the left column in a table read the right column and try to recall the command without looking. Then repeat the exercise covering the right column and try to recall what the command does.

slide 199:

ptg17246291 Chapter 6: Using the Command-Line Interface 145 6 Table 6-8 Chapter 6 Configuration Commands Command Mode and Purpose line conso l e 0 Global command that changes the context to console configuration mode. l ogi n Line console and vty configuration mode. Tells IOS to prompt for a password no username. password pass-value Line console and vty configuration mode. Sets the password required on that line for login if the login command with no other parameters is also configured. int er f a ce type port-number Global command that changes the context to interface mode— for example interface FastEthernet 0/1. hostname name Global command that sets this switch’s hostname which is also used as the first part of the switch’s command prompt. ex it Moves back to the next higher mode in configuration mode. end Exits configuration mode and goes back to enable mode from any of the configuration submodes. Ctrl+Z This is not a command but rather a two-key combination pressing the Ctrl key and the letter Z that together do the same thing as the end command. Table 6-9 Chapter 6 EXEC Command Reference Command Purpose no d e bu g a l l und e bu g a l l Enable mode EXEC command to disable all currently enabled debugs. r eloa d Enable mode EXEC command that reboots the switch or router. co py r unning- conf ig startup-config Enable mode EXEC command that saves the active config replacing the startup-config file used when the switch initializes. co py st ar t up - conf ig running-config Enable mode EXEC command that merges the startup-config file with the currently active config file in RAM. sh ow r unning- conf ig Lists the contents of the running-config file. w r it e er ase er ase st ar t up - conf ig er ase n v r am: These enable mode EXEC commands erase the startup-config file. quit EXEC command that disconnects the user from the CLI session. sh ow st ar t up - conf ig Lists the contents of the startup-config initial config file. ena ble Moves the user from user mode to enable privileged mode and prompts for a password if one is configured. di s a ble Moves the user from enable mode to user mode. conf ig ur e t er mina l Enable mode command that moves the user into configuration mode.

slide 200:

ptg17246291 CHAPTER 7 Analyzing Ethernet LAN Switching This chapter covers the following exam topics: 2.0 LAN Switching Technologies 2.1 Describe and verify switching concepts 2.1.a MAC learning and aging 2.1.b Frame switching 2.1.c Frame flooding 2.1.d MAC address table When you buy a Cisco Catalyst Ethernet switch the switch is ready to work. All you have to do is take it out of the box power on the switch by connecting the power cable to the switch and a power outlet and connect hosts to the switch using the correct unshielded twisted-pair UTP cables. You do not have to configure anything else you do not have to connect to the console and login or do anything: the switch just starts for- warding Ethernet frames. In Part II of this book you will learn how to build configure and verify the operation of Ethernet LANs. In Chapter 6 “Using the Command-Line Interface” you learned some skills so you know how to connect to a switch’s CLI move around in the CLI issue commands and configure the switch. The next step—this chapter—takes a short but important step in that journey by explaining the logic a switch uses when forwarding Ethernet frames. This chapter has two major sections. The first reviews the concepts behind LAN switch- ing which were first introduced back in Chapter 2 “Fundamentals of Ethernet LANs.” The second section of this chapter then uses IOS show commands to verify that Cisco switches actually learned the MAC addresses built its MAC address table and forwarded frames. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 7-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions LAN Switching Concepts 1–4 Verifying and Analyzing Ethernet Switching 5–6

slide 201:

ptg17246291 1. Which of the following statements describes part of the process of how a switch decides to forward a frame destined for a known unicast MAC address a. It compares the unicast destination address to the bridging or MAC address table. b. It compares the unicast source address to the bridging or MAC address table. c. It forwards the frame out all interfaces in the same VLAN except for the incom- ing interface. d. It compares the destination IP address to the destination MAC address. e. It compares the frame’s incoming interface to the source MAC entry in the MAC address table. 2. Which of the following statements describes part of the process of how a LAN switch decides to forward a frame destined for a broadcast MAC address a. It compares the unicast destination address to the bridging or MAC address table. b. It compares the unicast source address to the bridging or MAC address table. c. It forwards the frame out all interfaces in the same VLAN except for the incom- ing interface. d. It compares the destination IP address to the destination MAC address. e. It compares the frame’s incoming interface to the source MAC entry in the MAC address table. 3. Which of the following statements best describes what a switch does with a frame destined for an unknown unicast address a. It forwards out all interfaces in the same VLAN except for the incoming interface. b. It forwards the frame out the one interface identified by the matching entry in the MAC address table. c. It compares the destination IP address to the destination MAC address. d. It compares the frame’s incoming interface to the source MAC entry in the MAC address table. 4. Which of the following comparisons does a switch make when deciding whether a new MAC address should be added to its MAC address table a. It compares the unicast destination address to the bridging or MAC address table. b. It compares the unicast source address to the bridging or MAC address table. c. It compares the VLAN ID to the bridging or MAC address table. d. It compares the destination IP address’s ARP cache entry to the bridging or MAC address table.

slide 202:

ptg17246291 148 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. A Cisco Catalyst switch has 24 10/100 ports numbered 0/1 through 0/24. Ten PCs connect to the ten lowest numbered port with those PCs working and sending data over the network. The other ports are not connected to any device. Which of the fol- lowing answers lists facts displayed by the show interfaces status command a. Port Ethernet 0/1 is in a connected state. b. Port Fast Ethernet 0/11 is in a connected state. c. Port Fast Ethernet 0/5 is in a connected state. d. Port Ethernet 0/15 is in a notconnected state. 6. Consider the following output from a Cisco Catalyst switch: SW1 show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 02AA.AAAA.AAAA DYNAMIC Gi0/1 1 02BB.BBBB.BBBB DYNAMIC Gi0/2 1 02CC.CCCC.CCCC DYNAMIC Gi0/3 Total Mac Addresses for this criterion: 3 Which of the following answers are true about this switch a. The output proves that port Gi0/2 connects directly to a device that uses address 02BB.BBBB.BBBB. b. The switch has learned three MAC addresses since the switch powered on. c. The three listed MAC addresses were learned based on the destination MAC address of frames forwarded by the switch. d. 02CC.CCCC.CCCC was learned from the source MAC address of a frame that entered port Gi0/3. Foundation Topics LAN Switching Concepts A modern Ethernet LAN connects user devices as well as servers into some switches with the switches then connecting to each other sometimes in a design like Figure 7-1. Part of the LAN called a campus LAN supports the end user population as shown on the left of the figure. End user devices connect to LAN switches which in turn connect to other switches so that a path exists to the rest of the network. The campus LAN switches sit in wiring clos- ets close to the end users. On the right the servers used to provide information to the users also connects to the LAN. Those servers and switches often sit in a closed room called a data center with connections to the campus LAN to support traffic to/from the users.

slide 203:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 149 7 Campus LAN Data Center LAN Figure 7-1 Campus LAN and Data Center LAN Conceptual Drawing To forward traffic from a user device to a server and back each switch performs the same kind of logic independently from each other. The first half of this chapter examines the logic: how a switch chooses to forward an Ethernet frame when the switch chooses to not forward the frame and so on. Overview of Switching Logic Ultimately the role of a LAN switch is to forward Ethernet frames. LANs exist as a set of user devices servers and other devices that connect to switches with the switches con- nected to each other. The LAN switch has one primary job: to forward frames to the correct destination MAC address. And to achieve that goal switches use logic—logic based on the source and destination MAC address in each frame’s Ethernet header. Answers to the “Do I Know This Already” quiz: 1 A 2 C 3 A 4 B 5 C 6 D

slide 204:

ptg17246291 150 CCENT/CCNA ICND1 100-105 Official Cert Guide LAN switches receive Ethernet frames and then make a switching decision: either forward the frame out some other ports or ignore the frame. To accomplish this primary mission switches perform three actions: 1. Deciding when to forward a frame or when to filter not forward a frame based on the destination MAC address 2. Preparing to forward frames by learning MAC addresses by examining the source MAC address of each frame received by the switch 3. Preparing to forward only one copy of the frame to the destination by creating a Layer 2 loop-free environment with other switches by using Spanning Tree Protocol STP The first action is the switch’s primary job whereas the other two items are overhead functions. NOTE Throughout this book’s discussion of LAN switches the terms switch port and switch interface are synonymous. Although Chapter 2’s section titled “Ethernet Data-Link Protocols” already discussed the frame format this discussion of Ethernet switching is pretty important so reviewing the Ethernet frame at this point might be helpful. Figure 7-2 shows one popular format for an Ethernet frame. Basically a switch would take the frame shown in the figure make a deci- sion of where to forward the frame and send the frame out that other interface. Header Trailer Destination 6 Type 2 Data and Pad 46 –1500 FCS 4 SFD 1 Source 6 Preamble 7 Figure 7-2 IEEE 802.3 Ethernet Frame One Variation Most of the upcoming discussions and figures about Ethernet switching focuses on the use of the destination and source MAC address fields in the header. All Ethernet frames have both a destination and source MAC address. Both are 6-bytes long represented as 12 hex digits in the book and are a key part of the switching logic discussed in this section. Refer back to Chapter 2’s discussion of the header in detail for more info on the rest of the Ethernet frame. NOTE The companion DVD and website include a video that explains the basics of Ethernet switching. Now on to the details of how Ethernet switching works Forwarding Known Unicast Frames To decide whether to forward a frame a switch uses a dynamically built table that lists MAC addresses and outgoing interfaces. Switches compare the frame’s destination MAC address to this table to decide whether the switch should forward a frame or simply ignore it. For exam- ple consider the simple network shown in Figure 7-3 with Fred sending a frame to Barney.

slide 205:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 151 7 F0/4 F0/3 Fred Barney 0200.2222.2222 F0/2 F0/1 Wilma 0200.3333.3333 Betty 0200.4444.4444 Dest 0200.2222.2222 1 Frame Came in F0/1 2 Destined for 0200.2222.2222… 3 Forward Out F0/2 4 Filter Do Not Send on F0/3 F0/4 MAC Address F0/1 F0/2 F0/3 F0/4 0200.1111.1111 0200.2222.2222 0200.3333.3333 0200.4444.4444 Output MAC Address Table 1 3 4 2 Figure 7-3 Sample Switch Forwarding and Filtering Decision In this figure Fred sends a frame with destination address 0200.2222.2222 Barney’s MAC address. The switch compares the destination MAC address 0200.2222.2222 to the MAC address table matching the bold table entry. That matched table entry tells the switch to forward the frame out port F0/2 and only port F0/2. NOTE A switch’s MAC address table is also called the switching table or bridging table or even the Content-Addressable Memory CAM table in reference to the type of physi- cal memory used to store the table. A switch’s MAC address table lists the location of each MAC relative to that one switch. In LANs with multiple switches each switch makes an independent forwarding decision based on its own MAC address table. Together they forward the frame so that it eventually arrives at the destination. For example Figure 7-4 shows the first switching decision in a case in which Fred sends a frame to Wilma with destination MAC 0200.3333.3333. The topology has changed versus the previous figure this time with two switches and Fred and Wilma connected to two different switches. Figure 7-3 shows the first switch’s logic in reaction to Fred sending the original frame. Basically the switch receives the frame in port F0/1 finds the destination MAC 0200.3333.3333 in the MAC address table sees the outgoing port of G0/1 so SW1 forwards the frame out its G0/1 port .

slide 206:

ptg17246291 152 CCENT/CCNA ICND1 100-105 Official Cert Guide F0/2 Fred Barney 0200.2222.2222 F0/1 Dest 0200.2222.2222 G0/1 F0/4 F0/3 Wilma 0200.3333.3333 Betty 0200.4444.4444 MAC Address F0/1 F0/2 G0/1 G0/1 0200.1111.1111 0200.2222.2222 0200.3333.3333 0200.4444.4444 Output SW1 Address Table MAC Address G0/2 G0/2 F0/3 F0/4 0200.1111.1111 0200.2222.2222 0200.3333.3333 0200.4444.4444 Output SW2 Address Table G0/2 1 Frame Entered F0/1... 2 Destined for 0200.3333.3333… 3 MAC table entry lists G0/1… 4 Forward out G0/1 1 2 3 SW1 SW2 Figure 7-4 Forwarding Decision with Two Switches: First Switch That same frame next arrives at switch SW2 entering SW2’s G0/2 interface. As shown in Figure 7-5 SW2 uses the same logic steps but using SW2’s table. The MAC table lists the forwarding instructions for that switch only. In this case switch SW2 forwards the frame out its F0/3 port based on SW2’s MAC address table. F0/2 Fred Barney 0200.2222.2222 F0/1 Dest 0200.3333.3333 G0/1 F0/4 F0/3 Wilma 0200.3333.3333 Betty 0200.4444.4444 MAC Address F0/1 F0/2 G0/1 G0/1 0200.1111.1111 0200.2222.2222 0200.3333.3333 0200.4444.4444 Output SW1 Address Table MAC Address G0/2 G0/2 F0/3 F0/4 0200.1111.1111 0200.2222.2222 0200.3333.3333 0200.4444.4444 Output SW2 Address Table G0/2 1 Frame Entered G0/2... 2 Destined for 0200.3333.3333… 3 MAC table entry lists F0/3… 4 Forward out F0/3 1 4 2 3 SW1 SW2 Figure 7-5 Forwarding Decision with Two Switches: Second Switch NOTE The forwarding choice by a switch was formerly called a forward-versus-filter decision because the switch also chooses to not forward to filter frames not sending the frame out some ports.

slide 207:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 153 7 The examples so far use switches that happen to have a MAC table with all the MAC addresses listed. As a result the destination MAC address in the frame is known to the switch. The frames are called known unicast frames or simply known unicasts because the destination address is a unicast address and the destination is known. As shown in these examples switches forward known unicast frames out one port: the port as listed in the MAC table entry for that MAC address. Learning MAC Addresses Thankfully the networking staff does not have to type in all those MAC table entries. Instead the switches do their second main function: to learn the MAC addresses and inter- faces to put into its address table. With a complete MAC address table the switch can make accurate forwarding and filtering decisions as just discussed. Switches build the address table by listening to incoming frames and examining the source MAC address in the frame. If a frame enters the switch and the source MAC address is not in the MAC address table the switch creates an entry in the table. That table entry lists the interface from which the frame arrived. Switch learning logic is that simple. Figure 7-6 depicts the same single-switch topology network as Figure 7-3 but before the switch has built any address table entries. The figure shows the first two frames sent in this network—first a frame from Fred addressed to Barney and then Barney’s response addressed to Fred. F0/4 F0/3 Barney 0200.2222.2222 F0/2 F0/1 Wilma 0200.3333.3333 Betty 0200.4444.4444 1 1 2 F0/1 F0/2 2 Address: Output 0200.1111.1111 0200.2222.2222 Address Table: After Frame 2 Barney to Fred Address Table: Before Either Frame Is Sent F0/1 Address: Output 0200.1111.1111 Address Table: After Frame 1 Fred to Barney Fred 0200.1111.1111 Empty Address: Output Empty Figure 7-6 Switch Learning: Empty Table and Adding Two Entries Figure 7-6 depicts the MAC learning process only and ignores the forwarding process and therefore ignores the destination MAC addresses. Focus on the learning process and how the MAC table grows at each step as shown on the right side of the figure. The switch begins with an empty MAC table as shown in the upper right part of the figure. Then Fred sends his first frame labeled “1” to Barney so the switch adds an entry for 0200.1111.1111 Fred’s MAC address associated with interface F0/1. Why F0/1 The frame sent by Fred entered the switch’s F0/1 port. SW1’s logic runs some- thing like this: “The source is MAC 0200.1111.1111 the frame entered F0/1 so from my perspective 0200.1111.1111 must be reachable out my port F0/1.” Continuing the example when Barney replies in Step 2 the switch adds a second entry this one for 0200.2222.2222 Barney’s MAC address along with interface F0/2. Why F0/2 The

slide 208:

ptg17246291 154 CCENT/CCNA ICND1 100-105 Official Cert Guide frame Barney sent entered the switch’s F0/2 interface. Learning always occurs by looking at the source MAC address in the frame and adds the incoming interface as the associated port. Flooding Unknown Unicast and Broadcast Frames Now again turn your attention to the forwarding process using the topology in Figure 7-5. What do you suppose the switch does with Fred’s first frame the one that occurred when there were no entries in the MAC address table As it turns out when there is no matching entry in the table switches forward the frame out all interfaces except the incoming inter- face using a process called flooding. And the frame whose destination address is unknown to the switch is called an unknown unicast frame or simply an unknown unicast. Switches flood unknown unicast frames. Flooding means that the switch forwards copies of the frame out all ports except the port on which the frame was received. The idea is simple: if you do not know where to send it send it everywhere to deliver the frame. And by the way that device will likely then send a reply—and then the switch can learn that device’s MAC address and forward future frames out one port as a known unicast frame. Switches also flood LAN broadcast frames frames destined to the Ethernet broadcast address of FFFF.FFFF.FFFF because this process helps deliver a copy of the frame to all devices in the LAN. For example Figure 7-7 shows the same first frame sent by Fred when the switch’s MAC table is empty. At step 1 Fred sends the frame. At step 2 the switch sends a copy of the frame out all three of the other interfaces. F0/4 F0/3 Barney 0200.2222.2222 F0/2 F0/1 Wilma 0200.3333.3333 Betty 0200.4444.4444 1 2 2 Fred 0200.1111.1111 2 Address Table: Before Frame Is Sent Empty Address: Output Empty Figure 7-7 Switch Flooding: Unknown Unicast Arrives Floods out Other Ports Avoiding Loops Using Spanning Tree Protocol The third primary feature of LAN switches is loop prevention as implemented by Spanning Tree Protocol STP. Without STP any flooded frames would loop for an indefinite period of time in Ethernet networks with physically redundant links. To prevent looping frames STP blocks some ports from forwarding frames so that only one active path exists between any pair of LAN segments. The result of STP is good: Frames do not loop infinitely which makes the LAN usable. However STP has negative features as well including the fact that it takes some work to balance traffic across the redundant alternate links. A simple example makes the need for STP more obvious. Remember switches flood unknown unicast frames and broadcast frames. Figure 7-8 shows an unknown unicast frame

slide 209:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 155 7 sent by Larry to Bob which loops forever because the network has redundancy but no STP. Note that the figure shows one direction of the looping frame only just to reduce clutter but a copy of the frame would also loop the other direction as well. Bob Powered Off Archie Larry Frame Starts Here Figure 7-8 Network with Redundant Links but Without STP: The Frame Loops Forever The flooding of this frame would cause the frame to rotate around the three switches because none of the switches list Bob’s MAC address in their address tables each switch floods the frame. And while the flooding process is a good mechanism for forwarding unknown unicasts and broadcasts the continual flooding of traffic frames as in the figure can completely congest the LAN to the point of making it unusable. A topology like Figure 7-8 with redundant links is good but we need to prevent the bad effect of those looping frames. To avoid Layer 2 loops all switches need to use STP. STP causes each interface on a switch to settle into either a blocking state or a forwarding state. Blocking means that the interface cannot forward or receive data frames while forwarding means that the interface can send and receive data frames. If a correct subset of the interfac- es is blocked only a single currently active logical path exists between each pair of LANs. NOTE STP behaves identically for a transparent bridge and a switch. Therefore the terms bridge switch and bridging device all are used interchangeably when discussing STP. The Cisco CCNA Routing and Switching ICND2 200-105 Official Cert Guide book cov- ers the details of how STP prevents loops. LAN Switching Summary Switches use Layer 2 logic examining the Ethernet data-link header to choose how to pro- cess frames. In particular switches make decisions to forward and filter frames learn MAC addresses and use STP to avoid loops as follows: Step 1. Switches forward frames based on the destination MAC address: A. If the destination MAC address is a broadcast multicast or unknown desti- nation unicast a unicast not listed in the MAC table the switch floods the frame. B. If the destination MAC address is a known unicast address a unicast address found in the MAC table: i. If the outgoing interface listed in the MAC address table is different from the interface in which the frame was received the switch for- wards the frame out the outgoing interface.

slide 210:

ptg17246291 156 CCENT/CCNA ICND1 100-105 Official Cert Guide ii. If the outgoing interface is the same as the interface in which the frame was received the switch filters the frame meaning that the switch simply ignores the frame and does not forward it. Step 2. Switches use the following logic to learn MAC address table entries: A. For each received frame examine the source MAC address and note the interface from which the frame was received. B. If it is not already in the table add the MAC address and interface it was learned on. Step 3. Switches use STP to prevent loops by causing some interfaces to block mean- ing that they do not send or receive frames. Verifying and Analyzing Ethernet Switching A Cisco Catalyst switch comes from the factory ready to switch frames. All you have to do is connect the power cable plug in the Ethernet cables and the switch starts switching incoming frames. Connect multiple switches together and they are ready to forward frames between the switches as well. And the big reason behind this default behavior has to do with the default settings on the switches. Cisco Catalyst switches come ready to get busy switching frames because of settings like these: ■ The interfaces are enabled by default ready to start working once a cable is connected. ■ All interfaces are assigned to VLAN 1. ■ 10/100 and 10/100/1000 interfaces use autonegotiation by default. ■ The MAC learning forwarding flooding logic all works by default. ■ STP is enabled by default. This second section of the chapter examines how switches will work with these default set- tings showing how to verify the Ethernet learning and forwarding process. Demonstrating MAC Learning To see a switches MAC address table use the show mac address-table command. With no additional parameters this command lists all known MAC addresses in the MAC table including some overhead static MAC addresses that you can ignore. To see all the dynamical- ly learned MAC addresses only instead use the show mac address-table dynamic command. The examples in this chapter use almost no configuration as if you just unboxed the switch when you first purchased it. For the examples the switches have no configuration other than the hostname command to set a meaningful hostname. Note that to do this in lab all I did was ■ Use the erase startup-config EXEC command to erase the startup-config file ■ Use the delete vlan.dat EXEC command to delete the VLAN configuration details ■ Use the reload EXEC command to reload the switch thereby using the empty startup- config with no VLAN information configured ■ Configure the hostname SW1 command to set the switch hostname

slide 211:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 157 7 Once done the switch starts forwarding and learning MAC address as demonstrated in Example 7-1. Example 7-1 show mac address-table dynamic for Figure 7-7 SW1 show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0200.1111.1111 DYNAMIC Fa0/1 1 0200.2222.2222 DYNAMIC Fa0/2 1 0200.3333.3333 DYNAMIC Fa0/3 1 0200.4444.4444 DYNAMIC Fa0/4 Total Mac Addresses for this criterion: 4 SW1 First focus on two columns of the table: the Mac Address and Ports columns of the table. The values should look familiar: they match the earlier single-switch example as repeated here as Figure 7-9. Note the four MAC addresses listed along with their matching ports as shown in the figure. F0/4 F0/3 Barney 0200.2222.2222 F0/2 F0/1 Wilma 0200.3333.3333 Betty 0200.4444.4444 Fred 0200.1111.1111 Figure 7-9 Single Switch Topology Used in Verification Section Next look at the Type field in the header. The column tells us whether the MAC address was learned by the switch as described earlier in this chapter. You can also statically pre- define MAC table entries using a couple of different features including port security and those would appear as Static in the Type column. Finally the VLAN column of the output gives us a chance to briefly discuss how VLANs impact switching logic. LAN switches forward Ethernet frames inside a VLAN. What that means is if a frame enters via a port in VLAN 1 then the switch will forward or flood that frame out other ports in VLAN 1 only and not out any ports that happen to be assigned to another VLAN. Chapter 11 “Implementing Ethernet Virtual LANs” looks at all the details of how switches forward frames when using VLANs.

slide 212:

ptg17246291 158 CCENT/CCNA ICND1 100-105 Official Cert Guide Switch Interfaces The first example assumes that you installed the switch and cabling correctly and that the switch interfaces work. Once you do the installation and connect to the Console you can easily check the status of those interfaces with the show interfaces status command as shown in Example 7-2. Example 7-2 show interfaces status on Switch SW1 SW1 show interfaces status Port Name Status Vlan Duplex Speed Type Fa0/1 connected 1 a-full a-100 10/100BaseTX Fa0/2 connected 1 a-full a-100 10/100BaseTX Fa0/3 connected 1 a-full a-100 10/100BaseTX Fa0/4 connected 1 a-full a-100 10/100BaseTX Fa0/5 notconnect 1 auto auto 10/100BaseTX Fa0/6 notconnect 1 auto auto 10/100BaseTX Fa0/7 notconnect 1 auto auto 10/100BaseTX Fa0/8 notconnect 1 auto auto 10/100BaseTX Fa0/9 notconnect 1 auto auto 10/100BaseTX Fa0/10 notconnect 1 auto auto 10/100BaseTX Fa0/11 notconnect 1 auto auto 10/100BaseTX Fa0/12 notconnect 1 auto auto 10/100BaseTX Fa0/13 notconnect 1 auto auto 10/100BaseTX Fa0/14 notconnect 1 auto auto 10/100BaseTX Fa0/15 notconnect 1 auto auto 10/100BaseTX Fa0/16 notconnect 1 auto auto 10/100BaseTX Fa0/17 notconnect 1 auto auto 10/100BaseTX Fa0/18 notconnect 1 auto auto 10/100BaseTX Fa0/19 notconnect 1 auto auto 10/100BaseTX Fa0/20 notconnect 1 auto auto 10/100BaseTX Fa0/21 notconnect 1 auto auto 10/100BaseTX Fa0/22 notconnect 1 auto auto 10/100BaseTX Fa0/23 notconnect 1 auto auto 10/100BaseTX Fa0/24 notconnect 1 auto auto 10/100BaseTX Gi0/1 notconnect 1 auto auto 10/100/1000BaseTX Gi0/2 notconnect 1 auto auto 10/100/1000BaseTX SW1 Focus on the port column for a moment. As a reminder Cisco Catalyst switches name their ports based on the fastest specification supported so in this case the switch has 24 interfaces named Fast Ethernet and two named Gigabit Ethernet. Many commands abbreviate those terms this time as Fa for Fast Ethernet and Gi for Gigabit Ethernet. The example happens to come from a Cisco Catalyst switch that has 24 10/100 ports and two 10/100/1000 ports. The Status column of course tells us the status or state of the port. In this case the lab switch had cables and devices connected to ports F0/1–F0/4 only with no other cables connected. As a result those first four ports have a state of connected meaning that the

slide 213:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 159 7 ports have a cable and are functional. The notconnect state means that the port is not yet functioning. It may mean that there is no cable installed but other problems may exist as well. The section “Analyzing Switch Interface Status and Statistics” in Chapter 12 “Troubleshooting Ethernet LANs” works through the details of what causes a switch inter- face to fail. NOTE You can see the status for a single interface in a couple of ways. For instance for F0/1 the command show interfaces f0/1 status lists the status in a single line of output as in Example 7-2. The show interfaces f0/1 command without the status keyword displays a detailed set of messages about the interface. The show interfaces command has a large number of options. One particular option the counters option lists statistics about incoming and outgoing frames on the interfaces. In particular it lists the number of unicast multicast and broadcast frames both the in and out direction and a total byte count for those frames. Example 7-3 shows an example again for interface F0/1 . Example 7-3 show interfaces f0/1 counters on Switch SW1 SW1 show interfaces f0/1 counters Port InOctets InUcastPkts InMcastPkts InBcastPkts Fa0/1 1223303 10264 107 18 Port OutOctets OutUcastPkts OutMcastPkts OutBcastPkts Fa0/1 3235055 13886 22940 437 Finding Entries in the MAC Address Table With a single switch and only four hosts connected to them you can just read the details of the MAC address table and find the information you want to see. However in real net- works with lots of interconnected hosts and switches just reading the output to find one MAC address can be hard to do. You might have hundreds of entries—page after page of output—with each MAC address looking like a random string of hex characters. The MAC addresses used in the examples in this book are configured to make it easier to learn. Thankfully Cisco IOS supplies several more options on the show mac address-table com- mand to make it easier to find individual entries. First if you know the MAC address you can search for it—just type in the MAC address at the end of the command as shown in Example 7-4. All you have to do is include the address keyword followed by the actual MAC address. If the address exists the output lists the address. Note that the output lists the exact same information in the exact same format but it lists only the line for the match- ing MAC address. Example 7-4 show mac address-table dynamic with the address Keyword SW1 show mac address-table dynamic address 0200.1111.1111 Mac Address Table -------------------------------------------

slide 214:

ptg17246291 160 CCENT/CCNA ICND1 100-105 Official Cert Guide Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0200.1111.1111 DYNAMIC Fa0/1 Total Mac Addresses for this criterion: 1 While useful often times the engineer troubleshooting a problem does not know the MAC addresses of the devices connected to the network. Instead the engineer has a topology diagram knowing which switch ports connect to other switches and which connect to end- point devices. Sometimes you might be troubleshooting while looking at a network topology diagram and want to look at all the MAC addresses learned off a particular port. IOS supplies that option with the show mac address-table dynamic interface command. Example 7-5 shows one example for switch SW1’s F0/1 interface. Example 7-5 show mac address-table dynamic with the interface Keyword SW1 show mac address-table dynamic interface fastEthernet 0/1 Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0200.1111.1111 DYNAMIC Fa0/1 Total Mac Addresses for this criterion: 1 Finally you may also want to find the MAC address table entries for one VLAN. You guessed it—you can add the vlan parameter followed by the VLAN number. Example 7-6 shows two such examples from the same switch SW1 from Figure 7-7—one for VLAN 1 where all four devices reside and one for a non-existent VLAN 2. Example 7-6 The show mac address-table vlan command SW1 show mac address-table dynamic vlan 1 Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0200.1111.1111 DYNAMIC Fa0/1 1 0200.2222.2222 DYNAMIC Fa0/2 1 0200.3333.3333 DYNAMIC Fa0/3 1 0200.4444.4444 DYNAMIC Fa0/4 Total Mac Addresses for this criterion: 4 SW1 SW1 show mac address-table dynamic vlan 2 Mac Address Table -------------------------------------------

slide 215:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 161 7 Vlan Mac Address Type Ports ---- ----------- -------- ----- SW1 Managing the MAC Address Table Aging Clearing This chapter closes with a few comments about how switches manage their MAC address tables. Switches do learn MAC addresses but those MAC addresses do not remain in the table indefinitely. The switch will remove the entries due to age due to the table filling and you can remove entries using a command. First for aging out MAC table entries switches remove entries that have not been used for a defined number of seconds default of 300 seconds on many switches. To do that switches look at every incoming frame every source MAC address and does something related to learning. If it is a new MAC address the switch adds the correct entry to the table of course. However if that entry already exists the switch still does something: it resets the inactivity timer back to 0 for that entry. Each entry’s timer counts upward over time to mea- sure how long the entry has been in the table. The switch times out removes any entries whose timer reaches the defined aging time. Example 7-7 shows the aging timer setting for the entire switch. The aging time can be con- figured to a different time globally and per-vlan. Example 7-7 The MAC Address Default Aging Timer Displayed SW1 show mac address-table aging-time Global Aging Time: 300 Vlan Aging Time ---- ---------- SW1 SW1 show mac address-table count Mac Entries for Vlan 1: --------------------------- Dynamic Address Count : 4 Static Address Count : 0 Total Mac Addresses : 4 Total Mac Address Space Available: 7299 Each switch also removes the oldest table entries even if they are younger than the aging time setting if the table fills. The MAC address table uses content-addressable memory CAM a physical memory that has great table lookup capabilities. However the size of the table depends on the size of the CAM in a particular model of switch. When a switch tries to add a new table entry and finds the table full the switch times out removes the oldest table entry to make space. For perspective the end of Example 7-7 lists the size of a Cisco Catalyst switch’s MAC table at about 8000 entries—the same four existing entries from the earlier examples with space for 7299 more.

slide 216:

ptg17246291 162 CCENT/CCNA ICND1 100-105 Official Cert Guide Finally you can remove the dynamic entries from the MAC address table with the clear mac address-table dynamic command. Note that the show commands in this chapter can be executed from user and enable mode but the clear command happens to be a privileged mode command. MAC Address Tables with Multiple Switches Finally to complete the discussion it helps to think about an example with multiple switch- es just to emphasize how MAC learning forwarding and flooding happens independently on each LAN switch. Consider the topology in Figure 7-10 and pay close attention to the port numbers. The ports were purposefully chosen so that neither switch used any of the same ports for this example. That is switch SW2 does have a port F0/1 and F0/2 but I did not plug any devic- es into those ports when making this example. Also note that all ports are in VLAN 1 and as with the other examples in this chapter all default configuration is used other than the hostname on the switches. F0/2 Fred 0200.1111.1111 Barney 0200.2222.2222 F0/1 G0/1 F0/4 F0/3 Wilma 0200.3333.3333 Betty 0200.4444.4444 G0/2 SW1 SW2 Figure 7-10 Two-Switch Topology Example Think about a case in which both switches learn all four MAC addresses. For instance that would happen if the hosts on the left communicate with the hosts on the right. SW1’s MAC address table would list SW1’s own port numbers F0/1 F0/2 and G0/1 because SW1 uses that information to decide where SW1 should forward frames. Similarly SW2’s MAC table lists SW2’s port numbers F0/3 F0/4 G0/2 in this example. Example 7-8 shows the MAC address tables on both switches for that scenario . Example 7-8 The MAC Address Table on Two Switches SW1 show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0200.1111.1111 DYNAMIC Fa0/1 1 0200.2222.2222 DYNAMIC Fa0/2 1 0200.3333.3333 DYNAMIC Gi0/1 1 0200.4444.4444 DYNAMIC Gi0/1

slide 217:

ptg17246291 Chapter 7: Analyzing Ethernet LAN Switching 163 7 Total Mac Addresses for this criterion: 4 The next output is from switch SW2 SW2 show mac address-table dynamic 1 0200.1111.1111 DYNAMIC Gi0/2 1 0200.2222.2222 DYNAMIC Gi0/2 1 0200.3333.3333 DYNAMIC Fa0/3 1 0200.4444.4444 DYNAMIC Fa0/4 Total Mac Addresses for this criterion: 4 Chapter Review The “Your Study Plan” element just before Chapter 1 “Introduction to TCP/IP Networking” discusses how you should study and practice the content and skills for each chapter before moving on to the next chapter. That element introduces the tools used here at the end of each chapter. If you haven’t already done so take a few minutes to read that section. Then come back here and do the useful work of reviewing the chapter to help lock into memory what you just read. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Table 7-2 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 7-2 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Do labs Book Sim Lite blog Review command tables Book Review All the Key Topics Table 7-3 Key T opics for Chapter 7 Key Topic Element Description Page Number List Three main functions of a LAN switch 150 Figure 7-3 Process to forward a known unicast frame 151 Figure 7-5 Process to forward a known unicast second switch 152 Figure 7-6 Process to learn MAC addresses 153 List Summary of switch forwarding logic 155 Example 7-1 The show mac address-table dynamic command 157

slide 218:

ptg17246291 164 CCENT/CCNA ICND1 100-105 Official Cert Guide Do Labs The Sim Lite software is a version of Pearson’s full simulator learning product with a subset of the labs included with this book for free. The subnet of labs all relate to this part. Take the time to try some of the labs. As always also check the author’s blog site pages for configuration exercises Config Labs at http://blog.certskills.com/ccent/. Key Terms You Should Know broadcast frame known unicast frame Spanning Tree Protocol STP unknown unicast frame MAC address table forward flood Command References Table 7-4 lists the verification commands used in this chapter there were no configuration commands mentioned in this chapter. As an easy review exercise cover the left column read the right and try to recall the command without looking. Then repeat the exercise covering the right column and try to recall what the command does. Table 7-4 Chapter 7 EXEC Command Reference Command Mode/Purpose/Description sh ow ma c a d dr ess- t a b l e Shows all MAC table entries of all types sh ow ma c a d dr ess- t a b l e dynamic Shows all dynamically learned MAC table entries sh ow ma c a d dr ess- t a b l e dynamic vlan vlan-id Shows all dynamically learned MAC table entries in that VLAN sh ow ma c a d dr ess- t a b l e dynamic address MAC-address Shows the dynamically learned MAC table entries with that MAC address sh ow ma c a d dr ess- t a b l e dynamic interface interface-id Shows all dynamically learned MAC table entries associated with that interface show mac address-table count Shows the number of entries in the MAC table and the total number of remaining empty slots in the MAC table sh ow ma c a d dr ess- t a b l e aging-time Shows the global and per-VLAN aging timeout for inactive MAC table entries cl e ar ma c a d dr ess- t a b l e dynamic Empties the MAC table of all dynamic entries sh ow int er f a ces st at us Lists one line per interface on the switch with basic status and operating information for each

slide 219:

ptg17246291 This page intentionally left blank

slide 220:

ptg17246291 CHAPTER 8 Configuring Basic Switch Management This chapter covers the following exam topics: 5.0 Infrastructure Management 5.4 Configure verify and troubleshoot basic device hardening 5.4.a Local authentication 5.4.b Secure password 5.4.c Access to device 5.4.c.2 Telnet/SSH The work related to what a networking device does can be broken into three broad catego- ries. The first and most obvious called the data plane is the work a switch does to forward frames generated by the devices connected to the switch. In other words the data plane is the main purpose of the switch. Second the control plane refers to the configuration and processes that control and change the choices made by the switch’s data plane. The network engineer can control which interfaces are enabled and disabled which ports run at which speeds how Spanning Tree blocks some ports to prevent loops and so on. The third category the management plane is the topic of this chapter. The management plane deals with managing the device itself rather than controlling what the device is doing. In particular this chapter looks at the most basic management features that can be config- ured in a Cisco switch. The first section of the chapter works through the configuration of different kinds of login security. The second section shows how to configure IPv4 settings on a switch so it can be remotely managed. The last short section then explains a few prac- tical matters that can make your life in lab a little easier. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 8-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Securing the Switch CLI 1–3 Enabling IP for Remote Access 4–5 Miscellaneous Settings Useful in Lab 6

slide 221:

ptg17246291 1. Imagine that you have configured the enable secret command followed by the enable password command from the console. You log out of the switch and log back in at the console. Which command defines the password that you had to enter to access privileged mode a. enable password b. enable secret c. Neither d. The password command if it is configured 2. An engineer wants to set up simple password protection with no usernames for some switches in a lab for the purpose of keeping curious co-workers from logging into the lab switches from their desktop PCs. Which of the following commands would be a useful part of that configuration a. A login vty mode subcommand b. A password password console subcommand c. A login local vty subcommand d. A transport input ssh vty subcommand 3. An engineer had formerly configured a Cisco 2960 switch to allow Telnet access so that the switch expected a password of mypassword from the Telnet user. The engi- neer then changed the configuration to support Secure Shell. Which of the following commands could have been part of the new configuration Choose two answers. a. A username name secret password vty mode subcommand b. A username name secret password global configuration command c. A login local vty mode subcommand d. A transport input ssh global configuration command 4. An engineer’s desktop PC connects to a switch at the main site. A router at the main site connects to each branch office through a serial link with one small router and switch at each branch. Which of the following commands must be configured on the branch office switches in the listed configuration mode to allow the engineer to tel- net to the branch office switches Choose three answers. a. The ip address command in interface configuration mode b. The ip address command in global configuration mode c. The ip default-gateway command in VLAN configuration mode d. The ip default-gateway command in global configuration mode e. The password command in console line configuration mode f. The password command in vty line configuration mode

slide 222:

ptg17246291 168 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. A Layer 2 switch configuration places all its physical ports into VLAN 2. The IP addressing plan shows that address 172.16.2.250 with mask 255.255.255.0 is reserved for use by this new LAN switch and that 172.16.2.254 is already configured on the router connected to that same VLAN. The switch needs to support SSH con- nections into the switch from any subnet in the network. Which of the following commands are part of the required configuration in this case Choose two answers. a. The ip address 172.16.2.250 255.255.255.0 command in interface vlan 1 configuration mode. b. The ip address 172.16.2.250 255.255.255.0 command in interface vlan 2 con- figuration mode. c. The ip default-gateway 172.16.2.254 command in global configuration mode. d. The switch cannot support SSH because all its ports connect to VLAN 2 and the IP address must be configured on interface VLAN 1. 6. Which of the following line subcommands tells a switch to wait until a show com- mand’s output has completed before displaying log messages on the screen a. logging synchronous b. no ip domain-lookup c. exec-timeout 0 0 d. history size 15 Foundation Topics Securing the Switch CLI By default a Cisco Catalyst switch allows anyone to connect to the console port access user mode and then move on to enable and configuration modes without any kind of secu- rity. That default makes sense given that if you can get to the console port of the switch you already have control over the switch physically. However everyone needs to operate switches remotely and the first step in that process is to secure the switch so that only the appropriate users can access the switch command-line interface CLI. This first topic in the chapter examines how to configure login security for a Cisco Catalyst switch. Securing the CLI includes protecting access to enable mode because from enable mode an attacker could reload the switch or change the configuration. Protecting user mode is also important because attackers can see the status of the switch learn about the network and find new ways to attack the network. Note that all remote access and management protocols require that the switch IP configura- tion be completed and working. A switch’s IPv4 configuration has nothing to do with how a Layer 2 switch forwards Ethernet frames as discussed in Chapter 7 “Analyzing Ethernet LAN Switching” but to Telnet and Secure Shell SSH to a switch the switch needs to be configured with an IP address. This chapter also shows how to configure a switch’s IPv4 set- tings in the upcoming section “Enabling IPv4 for Remote Access.”

slide 223:

ptg17246291 Chapter 8: Configuring Basic Switch Management 169 8 In particular this section covers the following login security topics: ■ Securing user mode and privileged mode with simple passwords ■ Securing user mode access with local usernames ■ Securing user mode access with external authentication servers ■ Securing remote access with Secure Shell SSH Securing User Mode and Privileged Mode with Simple Passwords Although the default switch configuration allows a console user to move into user mode and then privileged mode with no passwords required unsurprisingly the default settings prevent Telnet and SSH users from even accessing user mode. And while the defaults work well to prevent unwanted access when you first install the switch you need to add some configuration to then be able to sit at your desk and log in to all the switches in the LAN. In addition of course you should not allow just anyone to log in and change the configura- tion so some type of secure login should be used. The first option most people learn to secure access to user mode one best used in a lab rather than in production is a simple shared password. This method uses a password only— with no username—with one password for console users and a different password for Telnet users. Console users must supply the console password as configured in console line configuration mode. Telnet users must supply the Telnet password also called the vty password so called because the configuration sits in vty line configuration mode. Figure 8-1 summarizes these options for using shared passwords from the perspective of the user log- ging into the switch. User Mode Enable Mode Console Password Enable Password vty Password 1 2 Figure 8-1 Simple Password Security Concepts NOTE This section refers to several passwords as shared passwords. These passwords are shared in the sense that when a new worker comes to the company others must tell them share what the password is. In other words each user does not have a unique username/ password to use but rather all the appropriate staff knows the passwords. In addition Cisco switches protect enable mode also called privileged mode with yet another shared password called the enable password. From the perspective of the network engineer connecting to the CLI of the switch once in user mode the user types the enable EXEC command. This command prompts the user for this enable password if the user types the correct password IOS moves the user to enable mode. Answers to the “Do I Know This Already” quiz: 1 B 2 A 3 B C 4 A D F 5 B C 6 A

slide 224:

ptg17246291 170 CCENT/CCNA ICND1 100-105 Official Cert Guide Example 8-1 shows an example of the user experience of logging into a switch from the console when the shared console password and the enable password have both been set. Note that before this example began the user started their terminal emulator physically connected their laptop to the console cable and then pressed the return key to make the switch respond as shown at the top of the example. Example 8-1 Configuring Basic Passwords and a Hostname User now presses enter now to start the process. This line of text does not appear. User Access Verification Password: hope Switch enable Password: love Switch Note that the example shows the password text as if typed hope and love along with the enable command that moves the user from user mode to enable mode. In reality the switch hides the passwords when typed to prevent someone from reading over your shoulder to see the password. To configure the shared passwords for the console Telnet and for enable mode you need to configure several commands. However the parameters of the commands can be pretty intuitive. Figure 8-2 shows the configuration of all three of these passwords. User Mode switch Enable Mode switch Console line console 0 login password hope line vty 0 15 login password love enable secret faith Telnet vty Figure 8-2 Simple Password Security Configuration The configuration for these three passwords does not require a lot of work. First the con- sole and vty password configuration sets the password based on the context: console mode for the console line con 0 and vty line configuration mode for the Telnet password line vty 0 15. Then inside console mode and vty mode respectively the two commands in each mode are login: Tells IOS to enable the use of a simple shared password with no username on this line console or vty so that the switch asks the user for a password password password-value: Defines the actual password used on the console or vty

slide 225:

ptg17246291 Chapter 8: Configuring Basic Switch Management 171 8 The configured enable password shown on the right side of the figure applies to all users no matter whether they connect to user mode via the console Telnet or otherwise. The command to configure the enable password is a global configuration command: enable secret password-value. NOTE Older IOS versions used the command enable password password-value to set the enable password and that command still exists in IOS. However the enable secret command is much more secure. In real networks use enable secret. Chapter 34 “Device Security Features” explains more about the security levels of various password mechanisms including a comparison of the enable secret and enable password commands. To help you follow the process and for easier study later use the configuration checklist before the example. The configuration checklist collects the required and optional steps to configure a feature as described in this book. The configuration checklist for shared pass- words for the console Telnet and enable passwords is Step 1. Configure the enable password with the enable secret password-value com- mand. Step 2. Configure the console password: A. Use the line con 0 command to enter console configuration mode. B. Use the login subcommand to enable console password security using a simple password. C. Use the password password-value subcommand to set the value of the console password. Step 3. Configure the Telnet vty password: A. Use the line vty 0 15 command to enter vty configuration mode for all 16 vty lines numbered 0 through 15. B. Use the login subcommand to enable password security for vty sessions using a simple password. C. Use the password password-value subcommand to set the value of the vty password. Example 8-2 shows the configuration process as noted in the configuration checklist along with setting the enable secret password. Note that the lines which begin with a are com- ment lines they are there to guide you through the configuration. Example 8-2 Configuring Basic Passwords Enter global configuration mode set the enable password and also set the hostname just because it makes sense to do so Switch configure terminal Switchconfig enable secret faith At Step 2 in the checklist enter console configuration mode set the password value to "hope" and enable simple passwords for the console. Config Checklist

slide 226:

ptg17246291 172 CCENT/CCNA ICND1 100-105 Official Cert Guide The exit command moves the user back to global config mode. Switchconfig line console 0 Switchconfig-line password hope Switchconfig-line login Switchconfig-line exit The next few lines do basically the same configuration except it is for the vty lines. Telnet users will use "love" to login. Switchconfig line vty 0 15 Switchconfig-line password love Switchconfig-line login Switchconfig-line end Switch Example 8-3 shows the resulting configuration in the switch per the show running-config command. The gray lines highlight the new configuration. Note that many unrelated lines of output have been deleted from the output to keep focused on the password configuration. Example 8-3 Resulting Running-Config File Subset Per Example 8-2 Configuration Switch show running-config Building configuration... Current configuration : 1333 bytes version 12.2 enable secret 5 1YXRN11zOe1Lb0Lv/nHyTquobd. interface FastEthernet0/1 interface FastEthernet0/2 Several lines have been omitted here - in particular lines for FastEthernet interfaces 0/3 through 0/23. interface FastEthernet0/24 interface GigabitEthernet0/1 interface GigabitEthernet0/2 line con 0 password hope

slide 227:

ptg17246291 Chapter 8: Configuring Basic Switch Management 173 8 login line vty 0 4 password love login line vty 5 15 password love login NOTE For historical reasons the output of the show running-config command in the last six lines of Example 8-3 separates the first five vty lines 0 through 4 from the rest 5 through 15. Securing User Mode Access with Local Usernames and Passwords Cisco switches support two other login security methods that both use per-user username/ password pairs instead of a shared password with no username. One method referred to as local usernames and passwords configures the username/password pairs locally—that is in the switch’s configuration. Switches support this local username/password option for the console for Telnet and even for SSH but do not replace the enable password used to reach enable mode. The configuration to migrate from using the simple shared passwords to instead use local usernames/passwords requires only some small configuration changes as shown in Figure 8-3. User Mode switch Console Telnet vty line console 0 login local password hope line vty 0 15 login local password love username wendell secret odom username chris secret youdda Figure 8-3 Configuring Switches to Use Local Username Login Authentication Working through the configuration in the figure first the switch of course needs to know the list of username/password pairs. To create these repeatedly use the username name secret password global configuration command. Then to enable this different type of console or Telnet security simply enable this login security method with the login local line. Basically this command means “use the local list of usernames for login.” You can also use the no password command without even typing in the password to clean up any

slide 228:

ptg17246291 174 CCENT/CCNA ICND1 100-105 Official Cert Guide remaining password subcommands from console or vty mode because these commands are not needed when using local usernames and passwords. The following checklist details the commands to configure local username login mainly as a method for easier study and review: Step 1. Use the username name secret password global configuration command to add one or more username/password pairs on the local switch. Step 2. Configure the console to use locally configured username/password pairs: A. Use the line con 0 command to enter console configuration mode. B. Use the login local subcommand to enable the console to prompt for both username and password checked versus the list of local usernames/pass- words. C. Optional Use the no password subcommand to remove any existing simple shared passwords just for good housekeeping of the configuration file. Step 3. Configure Telnet vty to use locally configured username/password pairs. A. Use the line vty 0 15 command to enter vty configuration mode for all 16 vty lines numbered 0 through 15. B. Use the login local subcommand to enable the switch to prompt for both username and password for all inbound Telnet users checked versus the list of local usernames/passwords. C. Optional Use the no password subcommand to remove any existing sim- ple shared passwords just for good housekeeping of the configuration file. When a Telnet user connects to the switch configured as shown in Figure 8-3 the user will be prompted first for a username and then for a password as shown in Example 8-4. The username/password pair must be from the list of local usernames or the login is rejected. Example 8-4 Telnet Login Process After Applying Configuration in Figure 8-3 SW2 telnet 10.9.9.19 Trying 10.9.9.19 ... Open User Access Verification Username: wendell Password: SW1 enable Password: SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z. SW1configZ SW1 Mar 1 02:00:56.229: SYS-5-CONFIG_I: Configured from console by wendell on vty0 10.9.9.19 Config Checklist

slide 229:

ptg17246291 Chapter 8: Configuring Basic Switch Management 175 8 NOTE Example 8-4 does not show the password value as having been typed because Cisco switches do not display the typed password for security reasons. NOTE The username secret command has an older less-secure cousin the username password command. Chapter 34 explains more about the security levels of various password mechanisms. Today use the more secure username secret c o m m a nd . Securing User Mode Access with External Authentication Servers The end of Example 8-4 points out one of the many security improvements when requir- ing each user to log in with their own username. The end of the example shows the user entering configuration mode configure terminal and then immediately leaving end. Note that when a user exits configuration mode the switch generates a log message. If the user logged in with a username the log message identifies that username note the “wendell” in the log message. However using a username/password configured directly on the switch causes some admin- istrative headaches. For instance every switch and router needs the configuration for all users who might need to log in to the devices. Then when any changes need to happen like an occasional change to the passwords for good security practices the configuration of all devices must be changed. A better option would be to use tools like those used for many other IT login functions. Those tools allow for a central place to securely store all username/password pairs with tools to make the user change their passwords regularly tools to revoke users when they leave their current jobs and so on. Cisco switches allow exactly that option using an external server called an authentication authorization and accounting AAA server . These servers hold the usernames/passwords. Typically these servers allow users to do self service and forced maintenance to their pass- words. Many production networks use AAA servers for their switches and routers today. The underlying login process requires some additional work on the part of the switch for each user login but once set up the username/password administration is much less. When using a AAA server for authentication the switch or router simply sends a message to the AAA server asking whether the username and password are allowed and the AAA server replies. Figure 8-4 shows an example with the user first supplying his username/password the switch asking the AAA server and the server replying to the switch stating that the user- name/password is valid. A S1 Login: wendell/odom 1 Login: wendell/odom 2 Command Prompt 4 Approved AAA 3 SW1 RADIUS or TACACS+ Telnet or SSH Figure 8-4 Basic Authentication Process with an External AAA Server

slide 230:

ptg17246291 176 CCENT/CCNA ICND1 100-105 Official Cert Guide While the figure shows the general idea note that the information flows with a couple of different protocols. On the left the connection between the user and the switch or router uses Telnet or SSH. On the right the switch and AAA server typically use either the RADIUS or TACACS+ protocol both of which encrypt the passwords as they traverse t he ne t w o r k . Securing Remote Access with Secure Shell So far this chapter has focused on the console and on Telnet mostly ignoring SSH. Telnet has one serious disadvantage: all data in the Telnet session flows as clear text including the password exchanges. So anyone that can capture the messages between the user and the switch in what is called a man-in-the-middle attack can see the passwords. SSH encrypts all data transmitted between the SSH client and server protecting the data and passwords. SSH can use the same local login authentication method as Telnet with the locally config- ured username and password. SSH cannot rely on a password only. So the configuration to support local usernames for Telnet as shown previously in Figure 8-3 also enables local username authentication for incoming SSH connections. Figure 8-5 shows one example configuration of what is required to support SSH. The figure repeats the local username configuration as shown earlier in Figure 8-3 as used for Telnet. Figure 8-5 shows three additional commands required to complete the configuration of SSH on the switch. username wendell secret odom username chris secret youdda line vty 0 15 login local hostname sw1 ip domain-name example.com Next Command Uses FQDN “sw1.example.com” crypto key generate rsa SSH-Specific Configuration Local Username Configuration Like Telnet User Mode sw1 SSH Figure 8-5 Adding SSH Configuration to Local Username Configuration IOS uses the three SSH-specific configuration commands in the figure to create the SSH encryption keys. The SSH server uses the fully qualified domain name FQDN of the switch as input to create that key. The term FQDN combines the hostname of a host and its domain name in this case the hostname and domain name of the switch. Figure 8-5 begins by setting both values just in case they are not already configured. Then the third com- mand the crypto key generate rsa command generates the SSH encryption keys. The configuration in Figure 8-5 relies on two default settings that the figure therefore con- veniently ignored. IOS runs an SSH server by default. In addition IOS allows SSH connec- tions into the vty lines by default.

slide 231:

ptg17246291 Chapter 8: Configuring Basic Switch Management 177 8 Seeing the configuration happen in configuration mode step by step can be particularly helpful with SSH configuration. Note in particular that in this example the crypto key com- mand prompts the user for the key modulus you could also add the parameters modulus modulus-value to the end of the crypto key command to add this setting on the command. Example 8-5 shows the commands in Figure 8-5 being configured with the encryption key as the final step. Example 8-5 SSH Configuration Process to Match Figure 8-5 SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z. Step 1 next. The hostname is already set but it is repeated just to be obvious about the steps. SW1config hostname SW1 SW1config ip domain-name example.com SW1config crypto key generate rsa The name for the keys will be: SW1.example.com Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus 512: 1024 Generating 1024 bit RSA keys keys will be non-exportable... OK elapsed time was 4 seconds SW1config Optionally set the SSH version to version 2 only - preferred SW1config ip ssh version 2 Next configure the vty lines for local username support just like with Telnet SW1config line vty 0 15 SW1config-line login local SW1config-line exit Define the local usernames just like with Telnet SW1config username wendell password odom SW1config username chris password youdaman SW1config Z SW1 E arl ier I ment ione d that one useful default was that the switch defaults to support both SSH and Telnet on the vty lines. However because Telnet is a security risk you could disable

slide 232:

ptg17246291 178 CCENT/CCNA ICND1 100-105 Official Cert Guide Telnet to enforce a tighter security policy. For that matter you can disable SSH support and allow Telnet on the vty lines as well. To control which protocols a switch supports on its vty lines use the transport input all | none | telnet | ssh vty subcommand in vty mode with the following options: transport input all or transport input telnet ssh: Support both Telnet and SSH transport input none: Support neither transport input telnet: Support only Telnet transport input ssh: Support only SSH To complete this section about SSH the following configuration checklist details the steps for one method to configure a Cisco switch to support SSH using local usernames. SSH support in IOS can be configured in several ways this checklist shows one simple way to configure it. The process shown here ends with a comment to configure local username support on vty lines as was discussed earlier in the section titled “Securing User Mode Access with Local Usernames and Passwords.” Step 1. Configure the switch to generate a matched public and private key pair to use for encryption: A. If not already configured use the hostname name in global configuration mode to configure a hostname for this switch. B. If not already configured use the ip domain-name name in global configu- ration mode to configure a domain name for the switch completing the switch’s FQDN. C. Use the crypto key generate rsa command in global configuration mode or the crypto key generate rsa modulus modulus-value command to avoid being prompted for the key modulus to generate the keys. Use at least a 768-bit key to support SSH version 2. Step 2. Optional Use the ip ssh version 2 command in global configuration mode to override the default of supporting both versions 1 and 2 so that only SSHv2 connections are allowed. Step 3. Optional If not already configured with the setting you want configure the vty lines to accept SSH and whether to also allow Telnet: A. Use the transport input ssh command in vty line configuration mode to allow SSH only. B. Use the transport input all command default or transport input telnet ssh command in vty line configuration mode to allow both SSH and Telnet. Step 4. Use various commands in vty line configuration mode to configure local user- name login authentication as discussed earlier in this chapter. NOTE Cisco routers default to transport input none so that you must add the transport input line subcommand to enable Telnet and/or SSH into a router. Config Checklist

slide 233:

ptg17246291 Chapter 8: Configuring Basic Switch Management 179 8 Two key commands give some information about the status of SSH on the switch. First t h e show ip ssh command lists status information about the SSH server itself. The show ssh command then lists information about each SSH client currently connected into the switch. Example 8-6 shows samples of each with user Wendell currently connected to the switch. Example 8-6 Displaying SSH Status SW1 show ip ssh SSH Enabled - version 2.0 Authentication timeout: 120 secs Authentication retries: 3 SW1 show ssh Connection Version Mode Encryption Hmac State Username 0 2.0 IN aes128-cbc hmac-sha1 Session started wendell 0 2.0 OUT aes128-cbc hmac-sha1 Session started wendell No SSHv1 server connections running. Enabling IPv4 for Remote Access To allow Telnet or SSH access to the switch and to allow other IP-based management protocols for example Simple Network Management Protocol or SNMP to function as intended the switch needs an IP address as well as a few other related settings. The IP address has nothing to do with how switches forward Ethernet frames it simply exists to support overhead management traffic. This next topic begins by explaining the IPv4 settings needed on a switch followed by the configuration. Note that although switches can be configured with IPv6 addresses with commands similar to those shown in this chapter this chapter focuses solely on IPv4. All references to IP in this chapter imply IPv4. Host and Switch IP Settings A switch needs the same kind of IP settings as a PC with a single Ethernet interface. For perspective a PC has a CPU with the operating system running on the CPU. It has an Ethernet network interface card NIC. The OS configuration includes an IP address asso- ciated with the NIC either configured or learned dynamically with DHCP. A switch uses the same ideas except that the switch needs to use a virtual NIC inside the switch. Like a PC a switch has a real CPU running an OS called IOS. The switch obviously has lots of Ethernet ports but instead of assigning its management IP address to any of those ports the switch then uses a NIC-like concept called a switched virtual interface SVI or more commonly a VLAN interface that acts like the switch’s own NIC. Then the settings on the switch look something like a host with the switch con- figuration assigning IP settings like an IP address to this VLAN interface as shown in Figure 8-6.

slide 234:

ptg17246291 180 CCENT/CCNA ICND1 100-105 Official Cert Guide VLAN 1 Subnet 192.168.1.0 Interface VLAN 1 Shaded Area is Inside the Switch interface vlan 1 ip address 192.168.1.8 255.255.255.0 Host Concept Inside Switch Other Real Hosts Outside Switch Figure 8-6 Switch Virtual Interface SVI Concept Inside a Switch By using interface VLAN 1 for the IP configuration the switch can then send and receive frames on any of the ports in VLAN 1. In a Cisco switch by default all ports are assigned to VLAN 1. In most networks switches configure many VLANs so the network engineer has a choice of where to configure the IP address. That is the management IP address does not have to be configured on the VLAN 1 interface as configured with the interface vlan 1 command seen in Figure 8-6. A Layer 2 Cisco LAN switch often uses a single VLAN interface at a time although multiple VLAN interfaces can be configured. The switch only needs one IP address for management purposes. But you can configure VLAN interfaces and assign them IP addresses for any working VLAN. For example Figure 8-7 shows a Layer 2 switch with some physical ports in two different VLANs VLANs 1 and 2. The figure also shows the subnets used on those VLANs. The net- work engineer could choose to create a VLAN 1 interface a VLAN 2 interface or both. In most cases the engineer plans which VLAN to use when managing a group of switches and creates a VLAN interface for that VLAN only. VLAN 1 Subnet 192.168.1.0 VLAN 2 Subnet 192.168.2.0 Interface VLAN 2 Interface VLAN 1 Which VLAN Should I Use for Management Shaded Area is Inside the Switch Figure 8-7 Choosing One VLAN on Which to Configure a Switch IP Address Note that you should not try to use a VLAN interface for which there are no physical ports assigned to the same VLAN. If you do the VLAN interface will not reach an up/up state and the switch will not have the physical ability to communicate outside the switch.

slide 235:

ptg17246291 Chapter 8: Configuring Basic Switch Management 181 8 NOTE Some Cisco switches can be configured to act as either a Layer 2 switch or a Layer 3 switch. When acting as a Layer 2 switch a switch forwards Ethernet frames as discussed in depth in Chapter 7 “Analyzing Ethernet LAN Switching.” Alternatively a switch can also act as a multilayer switch or Layer 3 switch which means the switch can do both Layer 2 switching and Layer 3 IP routing of IP packets using the Layer 3 logic normally used by routers. This chapter assumes all switches are Layer 2 switches. Chapter 11 “Implementing Ethernet Virtual LANs” further defines the differences between these types of operation for LAN switches. Configuring the IP address and mask on one VLAN interface allows the switch to send and receive IP packets with other hosts in a subnet that exists on that VLAN however the switch cannot communicate outside the local subnet without another configuration setting called the default gateway. The reason a switch needs a default gateway setting is the same reason that hosts need the same setting—because of how hosts think when sending IP pack- ets. Specifically: ■ To send IP packets to hosts in the same subnet send them directly ■ To send IP packets to hosts in a different subnet send them to the local router that is the default gateway Figure 8-8 shows the ideas. In this case the switch on the right will use IP address 192.168.1.200 as configured on interface VLAN 1. However to communicate with host A on the far left of the figure the switch must use Router R1 the default gateway to forward IP packets to host A. To make that work the switch needs to configure a default gateway setting pointing to Router R1’s IP address 192.168.1.1 in this case. Note that the switch and router both use the same mask 255.255.255.0 which puts the addresses in the same s u b ne t . VLAN 1 Subnet 192.168.1.0 Interface VLAN 1 Shaded Area is Inside the Switch R1 Other IPv4 Subnets A 192.168.1.1 192.168.1.200 Default Gateway Figure 8-8 The Need for a Default Gateway Configuring IPv4 on a Switch A switch configures its IPv4 address and mask on this special NIC-like VLAN interface. The following steps list the commands used to configure IPv4 on a switch assuming that the IP address is configured to be in VLAN 1 with Example 8-7 that follows showing an example configuration.

slide 236:

ptg17246291 182 CCENT/CCNA ICND1 100-105 Official Cert Guide Step 1. Use the interface vlan 1 command in global configuration mode to enter interface VLAN 1 configuration mode. Step 2. Use the ip address ip-address mask command in interface configuration mode to assign an IP address and mask. Step 3. Use the no shutdown command in interface configuration mode to enable the VLAN 1 interface if it is not already enabled. Step 4. Add the ip default-gateway ip-address command in global configuration mode to configure the default gateway. Step 5. Optional Add the ip name-server ip-address1 ip-address2 … command in global configuration mode to configure the switch to use Domain Name System DNS to resolve names into their matching IP address. Example 8-7 Switch Static IP Address Configuration Emma configure terminal Emmaconfig interface vlan 1 Emmaconfig-if ip address 192.168.1.200 255.255.255.0 Emmaconfig-if no shutdown 00:25:07: LINK-3-UPDOWN: Interface Vlan1 changed state to up 00:25:08: LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1 changed state to up Emmaconfig-if exit Emmaconfig ip default-gateway 192.168.1.1 On a side note this example shows a particularly important and common command: the no shutdown command. To administratively enable an interface on a switch use the no shutdown interface subcommand to disable an interface use the shutdown interface subcommand. This command can be used on the physical Ethernet interfaces that the switch uses to switch Ethernet messages in addition to the VLAN interface shown here in this example. Also pause long enough to look at the messages that appear just below the no shutdown command in Example 8-7 . Those messages are syslog messages generated by the switch stat- ing that the switch did indeed enable the interface. Switches and routers generate syslog messages in response to a variety of events and by default those messages appear at the con- sole. Chapter 33 “Device Management Protocols” discusses syslog messages in more detail. Configuring a Switch to Learn Its IP Address with DHCP The switch can also use Dynamic Host Configuration Protocol DHCP to dynamically learn its IPv4 settings. Basically all you have to do is tell the switch to use DHCP on the interface and enable the interface. Assuming that DHCP works in this network the switch will learn all its settings. The following list details the steps again assuming the use of interface VLAN 1 with Example 8-8 that follows showing an example: Step 1. Enter VLAN 1 configuration mode using the interface vlan 1 global configura- tion command and enable the interface using the no shutdown command as necessary. Step 2. Assign an IP address and mask using the ip address dhcp interface subcommand. Config Checklist

slide 237:

ptg17246291 Chapter 8: Configuring Basic Switch Management 183 8 Example 8-8 Switch Dynamic IP Address Configuration with DHCP Emma configure terminal Enter configuration commands one per line. End with CNTL/Z. Emmaconfig interface vlan 1 Emmaconfig-if ip address dhcp Emmaconfig-if no shutdown Emmaconfig-if Z Emma 00:38:20: LINK-3-UPDOWN: Interface Vlan1 changed state to up 00:38:21: LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1 changed state to up Verifying IPv4 on a Switch The switch IPv4 configuration can be checked in several places. First you can always look at the current configuration using the show running-config command. Second you can look at the IP address and mask information using the show interfaces vlan x command which shows detailed status information about the VLAN interface in VLAN x. Finally if using DHCP use the show dhcp lease command to see the temporarily leased IP address and other parameters. Note that the switch does not store the DHCP-learned IP configura- tion in the running-config file. Example 8-9 shows sample output from these commands to match the configuration in Example 8-8. Example 8-9 Verifying DHCP-Learned Information on a Switch Emma show dhcp lease Temp IP addr: 192.168.1.101 for peer on Interface: Vlan1 Temp sub net mask: 255.255.255.0 DHCP Lease server: 192.168.1.1 state: 3 Bound DHCP transaction id: 1966 Lease: 86400 secs Renewal: 43200 secs Rebind: 75600 secs Temp default-gateway addr: 192.168.1.1 Next timer fires after: 11:59:45 Retry count: 0 Client-ID: cisco-0019.e86a.6fc0-Vl1 Hostname: Emma Emma show interfaces vlan 1 Vlan1 is up line protocol is up Hardware is EtherSVI address is 0019.e86a.6fc0 bia 0019.e86a.6fc0 Internet address is 192.168.1.101/24 MTU 1500 bytes BW 1000000 Kbit DLY 10 usec reliability 255/255 txload 1/255 rxload 1/255 lines omitted for brevity Emma show ip default-gateway 192.168.1.1 The output of the show interfaces vlan 1 command lists two very important details related to switch IP addressing. First this show command lists the interface status of the VLAN 1 interface—in this case “up and up.” If the VLAN 1 interface is not up the switch cannot use its IP address to send and receive management traffic. Notably if you forget to issue

slide 238:

ptg17246291 184 CCENT/CCNA ICND1 100-105 Official Cert Guide the no shutdown command the VLAN 1 interface remains in its default shutdown state and is listed as “administratively down” in the show command output. Second note that the output lists the interface’s IP address on the third line. If you statically configure the IP address as in Example 8-7 the IP address will always be listed however if you use DHCP and DHCP fails the show interfaces vlan x command will not list an IP address here. When DHCP works you can see the IP address with the show interfaces vlan 1 command but that output does not remind you whether the address is either statically configured or DHCP leased. So it does take a little extra effort to make sure you know whether the address is statically configured or DHCP-learned on the VLAN interface. Miscellaneous Settings Useful in Lab This last short section of the chapter touches on a couple of commands that can help you be a little more productive when practicing in a lab. History Buffer Commands When you enter commands from the CLI the switch saves the last several commands in the history buffer. Then as mentioned in Chapter 6 “Using the Command-Line Interface” you can use the up-arrow key or press Ctrl+P to move back in the history buffer to retrieve a command you entered a few commands ago. This feature makes it very easy and fast to use a set of commands repeatedly. Table 8-2 lists some of the key commands related to the his- tory buffer. Table 8-2 Commands Related to the History Buffer Command Description sh ow hist or y An EXEC command that lists the commands currently held in the history buffer. t er mina l hist or y size x From EXEC mode this command allows a single user to set just for this one login session the size of his or her history buffer. hist or y size x A configuration command that from console or vty line configuration mode sets the default number of commands saved in the history buffer for the users of the console or vty lines respectively. The logging synchronous exec-timeout and no ip domain-lookup Commands These next three configuration commands have little in common other than the fact that they can be useful settings to reduce your frustration when using the console of a switch or router. The console automatically receives copies of all unsolicited syslog messages on a switch. The idea is that if the switch needs to tell the network administrator some important and possibly urgent information the administrator might be at the console and might notice the message. Unfortunately IOS by default displays these syslog messages on the console’s screen at any time—including right in the middle of a command you are entering or in the middle of the output of a show command. Having a bunch of text show up unexpectedly can be a bit annoying.

slide 239:

ptg17246291 Chapter 8: Configuring Basic Switch Management 185 8 You could simply disable the feature that sends these messages to the console and then re-enable the feature later using the no logging console a n d logging console global commands. For example when working from the console if you want to temporarily not be bothered by log messages you can disable the display of these messages with the no logging console global configuration command and then when finished enable them again. However IOS supplies a reasonable compromise telling the switch to display syslog mes- sages only at more convenient times such as at the end of output from a show command. To do so just configure the logging synchronous console line subcommand which basi- cally tells IOS to synchronize the syslog message display with the messages requested using show commands. Another way to improve the user experience at the console is to control timeouts of the login session from the console or when using Telnet or SSH. By default the switch auto- matically disconnects console and vty Telnet and SSH users after 5 minutes of inactivity. The exec-timeout minutes seconds line subcommand enables you to set the length of that inactivity timer. In lab but not in production you might want to use the special value of 0 minutes and 0 seconds meaning “never time out.” Finally IOS has an interesting combination of features that can make you wait for a min- ute or so when you mistype a command. First IOS tries to use DNS name resolution on IP hostnames—a generally useful feature. If you mistype a command however IOS thinks you want to Telnet to a host by that name. With all default settings in the switch the switch tries to resolve the hostname cannot find a DNS server and takes about a minute to time- out and give you control of the CLI again. To avoid this problem configure the no ip domain-lookup global configuration command which disables IOS’s attempt to resolve the hostname into an IP address. Example 8-10 collects all these commands into a single example as a template for some good settings to add in a lab switch to make you more productive. Example 8-10 Commands Often Used in Lab to Increase Productivity no ip domain-lookup line console 0 exec-timeout 0 0 logging synchronous history size 20 line vty 0 15 exec-timeout 0 0 logging synchronous history size 20

slide 240:

ptg17246291 186 CCENT/CCNA ICND1 100-105 Official Cert Guide Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment section titled “Step 2: Build Your Study Habits Around the Chapter” for more details. Table 8-3 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 8-3 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Review config checklists Book DVD/website Do labs Sim Lite blog Review command tables Book Review All the Key Topics Table 8-4 Key T opics for Chapter 8 Key Topic Element Description Page Number Example 8-2 Example of configuring password login security no usernames 171 Figure 8-5 SSH configuration commands with related username login security 176 Key Terms You Should Know Telnet Secure Shell SSH local username AAA AAA server enable mode default gate- way VLAN interface history buffer DNS name resolution log message Do Labs The Sim Lite software is a version of Pearson’s full simulator learning product with a subset of the labs included with this book for free. The subnet of labs all relate to this part. Take the time to try some of the labs. As always also check the author’s blog site pages for con- figuration exercises Config Labs at http://blog.certskills.com/ccent/. Command References Tables 8-5 8-6 8-7 and 8-8 list configuration and verification commands used in this chap- ter. As an easy review exercise cover the left column in a table read the right column and try to recall the command without looking. Then repeat the exercise covering the right col- umn and try to recall what the command does.

slide 241:

ptg17246291 Chapter 8: Configuring Basic Switch Management 187 8 Table 8-5 Login Security Commands Command Mode/Purpose/Description line conso l e 0 Changes the context to console configuration mode. line v t y 1st-vty last-vty Changes the context to vty configuration mode for the range of vty lines listed in the command. l ogi n Console and vty configuration mode. Tells IOS to prompt for a password. passw or d pass-value Console and vty configuration mode. Lists the password required if the login command with no other parameters is configured. l o g in l oc a l Console and vty configuration mode. Tells IOS to prompt for a username and password to be checked against locally configured username global configuration commands on this switch or router. user name name secret pass-value Global command. Defines one of possibly multiple usernames and associated passwords used for user authentication. Used when the login local line configuration command has been used. crypto key generate rsa modulus 360..2048 Global command. Creates and stores in a hidden location in flash memory the keys required by SSH. t r anspor t in put telnet | ssh | all | none vty line configuration mode. Defines whether Telnet/SSH access is allowed into this switch. Both values can be configured on one command to allow both Telnet and SSH access the default. Table 8-6 Switch IPv4 Configuration Command Mode/Purpose/Description int er f a ce vlan number Changes the context to VLAN interface mode. For VLAN 1 allows the configuration of the switch’s IP address. ip a d dr ess ip-address subnet-mask VLAN interface mode. Statically configures the switch’s IP address and mask. ip a d dr ess d h cp VLAN interface mode. Configures the switch as a DHCP client to discover its IPv4 address mask and default gateway. ip d ef a ult - g at eway address Global command. Configures the switch’s default gateway IPv4 address. Not required if the switch uses DHCP . ip name-ser v er server-ip-1 server-ip-2 … Global command. Configures the IPv4 addresses of DNS servers so any commands when logged in to the switch will use the DNS for name resolution.

slide 242:

ptg17246291 188 CCENT/CCNA ICND1 100-105 Official Cert Guide Table 8-7 Other Switch Configuration Command Mode/Purpose/Description h ost name name Global command. Sets this switch’s hostname which is also used as the first part of the switch’s command prompt. ena b l e sec r et pass-value Global command. Sets this switch’s password that is required for any user to reach enable mode. hist or y size length Line config mode. Defines the number of commands held in the history buffer for later recall for users of those lines. l o g g ing sy nchr onous Console or vty mode. Tells IOS to send log messages to the user at natural break points between commands rather than in the middle of a line of output. no l o g g ing conso l e Global command that disables or enables the display of log messages to the console. e x ec- t imeout minutes seconds Console or vty mode. Sets the inactivity timeout so that after the defined period of no action IOS closes the current user login session. Table 8-8 Chapter 8 EXEC Command Reference Command Purpose sh ow r unning- conf ig Lists the currently used configuration show running-config | begin line vty Pipes sends the command output to the begin command which only lists output beginning with the first line that contains the text “line vty” sh ow d h cp l e ase Lists any information the switch acquires as a DHCP client. This includes IP address subnet mask and default gateway information show crypto key mypubkey rsa Lists the public and shared key created for use with SSH using the crypto key generate rsa global configuration command sh ow ip ssh Lists status information for the SSH server including the SSH version sh ow ssh Lists status information for current SSH connections into and out of the local switch sh ow int er f a ces vlan number Lists the interface status the switch’s IPv4 address and mask and much more sh ow ip d ef a ult - g at eway Lists the switch’s setting for its IPv4 default gateway t er mina l hist or y size x Changes the length of the history buffer for the current user only only for the current login to the switch sh ow hist or y Lists the commands in the current history buffer

slide 243:

ptg17246291 This page intentionally left blank

slide 244:

ptg17246291 CHAPTER 9 Configuring Switch Interfaces This chapter covers the following exam topics: 2.0 LAN Switching Technologies 2.3 Troubleshoot interface and cable issues collisions errors duplex speed 2.7 Configure verify and troubleshoot port security 2.7.a Static 2.7.b Dynamic 2.7.c Sticky 2.7.d Max MAC addresses 2.7.e Violation actions 2.7.f Err-disable recovery This chapter completes Part II of the book. So far in this part you have learned the skills to navigate the command-line interface CLI and use commands that configure and verify switch features. You learned about the primary purpose of a switch—forwarding Ethernet frames—and learned how to see that process in action by looking at the switch MAC address table. After learning about the switch data plane in Chapter 7 “Analyzing Ethernet LAN Switching” you learned a few management plane features in Chapter 8 “Configuring Basic Switch Management” like how to configure the switch to support Telnet and Secure Shell SSH by configuring IP address and login security. In this final chapter of Part II you pick up tools that loosely fit in the switch control plane. First this chapter shows how you can configure and change the operation of switch inter- faces: how to change the speed duplex or even disable the interface. The second half then shows how to add a security feature called port security which monitors the source MAC address of incoming frames deciding which frames are allowed and which cause a security violation. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 245:

ptg17246291 Table 9-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Configuring Switch Interfaces 1–3 Port Security 4–6 1. Which of the following describes a way to disable IEEE standard autonegotiation on a 10/100 port on a Cisco switch a. Configure the negotiate disable interface subcommand b. Configure the no negotiate interface subcommand c. Configure the speed 100 interface subcommand d. Configure the duplex half interface subcommand e. Configure the duplex full interface subcommand f. Configure the speed 100 and duplex full interface subcommands 2. In which of the following modes of the CLI could you configure the duplex setting for interface Fast Ethernet 0/5 a. User mode b. Enable mode c. Global configuration mode d. VLAN mode e. Interface configuration mode 3. A Cisco Catalyst switch connects with its Gigabit0/1 port to an end user’s PC. The end user thinking the user is helping manually sets the PC’s OS to use a speed of 1000 Mbps and to use full duplex and disables the use of autonegotiation. The switch’s G0/1 port has default settings for speed and duplex. What speed and duplex settings will the switch decide to use Choose two answers. a. Full duplex b. Half duplex c. 10 Mbps d. 1000 Mbps 4. Which of the following is required when configuring port security with sticky learning a. Setting the maximum number of allowed MAC addresses on the interface with the switchport port-security maximum interface subcommand. b. Enabling port security with the switchport port-security interface subcommand. c. Defining the specific allowed MAC addresses using the switchport port-security mac-address interface subcommand. d. All the other answers list required commands.

slide 246:

ptg17246291 192 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. A switch’s port Gi0/1 has been correctly enabled with port security. The configura- tion sets the violation mode to restrict. A frame that violates the port security policy enters the interface followed by a frame that does not. Which of the following answers correctly describe what happens in this scenario Choose two answers. a. The switch puts the interface into an err-disabled state when the first frame arrives. b. The switch generates syslog messages about the violating traffic for the first frame. c. The switch increments the violation counter for Gi0/1 by 1. d. The switch discards both the first and second frame. 6. A Cisco Catalyst switch connects to what should be individual user PCs. Each port has the same port security configuration configured as follows: interface range gigabitethernet 0/1 - 24 switchport mode access switchport port-security switchport port-security mac-address sticky Which of the following answers describe the result of the port security configuration created with these commands Choose two answers. a. Prevents unknown devices with unknown MAC addresses from sending data through the switch ports. b. If a user connects a switch to the cable prevents multiple devices from sending data through the port. c. Will allow any one device to connect to each port and will save that device’s MAC address into the startup-config. d. Will allow any one device to connect to each port but will not save that device’s MAC address into the startup-config. Foundation Topics Configuring Switch Interfaces IOS uses the term interface to refer to physical ports used to forward data to and from other devices. Each interface can be configured with several settings each of which might differ from interface to interface. IOS uses interface subcommands to configure these set- tings. Each of these settings may be different from one interface to the next so you would first identify the specific interface and then configure the specific setting. This section begins with a discussion of three relatively basic per-interface settings: the port speed duplex and a text description. Following that the text takes a short look at a pair of the most common interface subcommands: the shutdown and no shutdown commands which administratively disable and enable the interface respectively. This section ends with a discussion about autonegotiation concepts which in turn dictates what settings a switch chooses to use when using autonegotiation.

slide 247:

ptg17246291 Chapter 9: Configuring Switch Interfaces 193 9 Configuring Speed Duplex and Description Switch interfaces that support multiple speeds 10/100 and 10/100/1000 interfaces by default will autonegotiate what speed to use. However you can configure the speed and duplex settings with the duplex auto | full | half and speed auto | 10 | 100 | 1000 inter- face subcommands. Simple enough. Most of the time using autonegotiation makes good sense so when you set the duplex and speed you typically have a good reason to do so. For instance maybe you want to set the speed to the fastest possible on links between switches just to avoid the chance that auto- negotiation chooses a slower speed. The description text interface subcommand lets you add a text description to the interface. For instance if you have good reason to configure the speed and duplex on a port maybe add a description that says why you did. Example 9-1 shows how to configure duplex and speed as well as the description command which is simply a text description that can be configured by the administrator. Example 9-1 Configuring speed duplex and description on Switch Emma Emma configure terminal Enter configuration commands one per line. End with CNTL/Z. Emmaconfig interface FastEthernet 0/1 Emmaconfig-if duplex full Emmaconfig-if speed 100 Emmaconfig-if description Printer on 3rd floor Preset to 100/full is connected here Emmaconfig-if exit Emmaconfig interface range FastEthernet 0/11 - 20 Emmaconfig-if-range description end-users connect here Emmaconfig-if-range Z Emma First focus on the mechanics of moving around in configuration mode again by looking closely at the command prompts. The various interface commands move the user from global mode into interface configuration mode for a specific interface. For instance the example configures the duplex speed and description commands all just after the interface FastEthernet 0/1 command which means that all three of those configuration settings apply to interface Fa0/1 and not to the other interfaces. The show interfaces status command lists much of the detail configured in Example 9-1 even with only one line of output per interface. Example 9-2 shows an example just after the configuration in Example 9-1 was added to the switch. Answers to the “Do I Know This Already” quiz: 1 F 2 E 3 A D 4 B 5 B C 6 B D

slide 248:

ptg17246291 194 CCENT/CCNA ICND1 100-105 Official Cert Guide Example 9-2 Displaying Interface Status Emma show interfaces status Port Name Status Vlan Duplex Speed Type Fa0/1 Printer on 3rd floo notconnect 1 full 100 10/100BaseTX Fa0/2 notconnect 1 auto auto 10/100BaseTX Fa0/3 notconnect 1 auto auto 10/100BaseTX Fa0/4 connected 1 a-full a-100 10/100BaseTX Fa0/5 notconnect 1 auto auto 10/100BaseTX Fa0/6 connected 1 a-full a-100 10/100BaseTX Fa0/7 notconnect 1 auto auto 10/100BaseTX Fa0/8 notconnect 1 auto auto 10/100BaseTX Fa0/9 notconnect 1 auto auto 10/100BaseTX Fa0/10 notconnect 1 auto auto 10/100BaseTX Fa0/11 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/12 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/13 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/14 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/15 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/16 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/17 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/18 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/19 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/20 end-users connect notconnect 1 auto auto 10/100BaseTX Fa0/21 notconnect 1 auto auto 10/100BaseTX Fa0/22 notconnect 1 auto auto 10/100BaseTX Fa0/23 notconnect 1 auto auto 10/100BaseTX Fa0/24 notconnect 1 auto auto 10/100BaseTX Gi0/1 notconnect 1 auto auto 10/100/1000BaseTX Gi0/2 notconnect 1 auto auto 10/100/1000BaseTX Working through the output in the example: FastEthernet 0/1 Fa0/1: This output lists the first few characters of the configured description. It also lists the configured speed of 100 and duplex full per the speed and duplex commands in Example 9-1. However it also states that Fa0/1 has a status of not- connect meaning that the interface is not currently working. That switch port did not have a cable connected when collecting this example on purpose. FastEthernet 0/2 Fa0/2: Example 9-1 did not configure this port at all. This port had all default configuration. Note that the “auto” text under the speed and duplex heading means that this port will attempt to autonegotiate both settings when the port comes up. However this port also does not have a cable connected again on purpose for comparison. FastEthernet 0/4 Fa0/4: Like Fa0/2 this port has all default configuration but was cabled to another working device to give yet another contrasting example. This device completed the autonegotiation process so instead of “auto” under the speed and duplex headings the output lists the negotiated speed and duplex a-full and a-100. Note that the text includes the a- t o m ean that th e list e d s pee d an d dup l e x valu e s w e r e aut o n e g ot iat e d.

slide 249:

ptg17246291 Chapter 9: Configuring Switch Interfaces 195 9 Configuring Multiple Interfaces with the interface range Command The bottom of the configuration in Example 9-1 shows a way to shorten your configuration work when making the same setting on multiple consecutive interfaces. To do so use the interface range command. In the example the interface range FastEthernet 0/11 - 20 com- mand tells IOS that the next subcommands apply to interfaces Fa0/11 through Fa0/20. Y ou can define a range as long as all interfaces are the same type and are numbered consecutively. NOTE This book spells out all parameters fully to avoid confusion. However most every- one abbreviates what they type in the CLI to the shortest unique abbreviation. For instance the configuration commands int f0/1 and int ran f0/11 - 20 would also be acceptable. IOS does not actually put the interface range command into the configuration. Instead it acts as if you had typed the subcommand under every single interface in the specified range. Example 9-3 shows an excerpt from the show running-config command listing the configuration of interfaces F0/11–12 from the configuration in Example 9-1. The example shows the same description command on both interfaces to save space the example did not bother to show all 10 interfaces that have the same description text. Example 9-3 How IOS Expands the Subcommands Typed After interface range Emma show running-config Lines omitted for brevity interface FastEthernet0/11 description end-users connect here interface FastEthernet0/12 description end-users connect here Lines omitted for brevity Administratively Controlling Interface State with shutdown As you might imagine network engineers need a way to bring down an interface without having to travel to the switch and remove a cable. In short we need to be able to decide which ports should be enabled and which should be disabled. In an odd turn of phrase Cisco uses two interface subcommands to configure the idea of administratively enabling and disabling an interface: the shutdown command to disable and th e no shutdown command to enable. While the no shutdown command might seem like an odd command to enable an interface at first you will use this command a lot in lab and it will become second nature. Most people in fact use the abbreviations shut and no shut. Example 9-4 shows an example of disabling an interface using the shutdown interface sub- command. In this case switch SW1 has a working interface F0/1. The user connects at the console and disables the interface. IOS generates a log message each time an interface fails or recovers and log messages appear at the console as shown in the example. Example 9-4 Administratively Disabling an Interface with shutdown SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z.

slide 250:

ptg17246291 196 CCENT/CCNA ICND1 100-105 Official Cert Guide SW1config interface fastEthernet 0/1 SW1config-if shutdown SW1config-if Mar 2 03:02:19.701: LINK-5-CHANGED: Interface FastEthernet0/1 changed state to administratively down Mar 2 03:02:20.708: LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1 changed state to down To bring the interface back up again all you have to do is follow the same process but use the no shutdown command instead. Before leaving the simple but oddly named shutdown/no shutdown commands take a look at two important show commands that list the status of a shutdown interface. The s how i n te r f a c e s s t a t u s command lists one line of output per interface and when shut down lists the interface status as “disabled.” That makes logical sense to most people. T h e show interfaces command without the status keyword lists many lines of output per interface giving a much more detailed picture of interface status and statistics. With that command the interface status comes in two parts with one part using the phrase “administratively down” matching the highlighted log message in Example 9-4. Example 9-5 shows an example of each of these commands. Note that both examples also use the F0/1 parameter short for Fast Ethernet0/1 which limits the output to the messages about F0/1 only. Also note that F0/1 is still shut down at this point. Example 9-5 The Different Status Information About Shutdown in Two Different show Commands SW1 show interfaces f0/1 status Port Name Status Vlan Duplex Speed Type Fa0/1 disabled 1 auto auto 10/100BaseTX SW1 show interfaces f0/1 FastEthernet0/1 is administratively down line protocol is down disabled Hardware is Fast Ethernet address is 1833.9d7b.0e81 bia 1833.9d7b.0e81 MTU 1500 bytes BW 10000 Kbit/sec DLY 1000 usec reliability 255/255 txload 1/255 rxload 1/255 Encapsulation ARPA loopback not set Keepalive set 10 sec Auto-duplex Auto-speed media type is 10/100BaseTX input flow-control is off output flow-control is unsupported ARP type: ARPA ARP Timeout 04:00:00 Last input never output 00:00:36 output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 size/max/drops/flushes Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 size/max 5 minute input rate 0 bits/sec 0 packets/sec 5 minute output rate 0 bits/sec 0 packets/sec

slide 251:

ptg17246291 Chapter 9: Configuring Switch Interfaces 197 9 164 packets input 13267 bytes 0 no buffer Received 164 broadcasts 163 multicasts 0 runts 0 giants 0 throttles 0 input errors 0 CRC 0 frame 0 overrun 0 ignored 0 watchdog 163 multicast 0 pause input 0 input packets with dribble condition detected 66700 packets output 5012302 bytes 0 underruns 0 output errors 0 collisions 1 interface resets 0 unknown protocol drops 0 babbles 0 late collision 0 deferred 0 lost carrier 0 no carrier 0 pause output 0 output buffer failures 0 output buffers swapped out Removing Configuration with the no Command One purpose for the specific commands shown in Part II of the book is to teach you about that command. In some cases the commands are not the end goal and the text is attempt- ing to teach you something about how the CLI works. This next short topic is more about the process than about the commands. With some IOS configuration commands but not all you can revert to the default set- ting by issuing a no version of the command. What does that mean Let me give you a few examples: ■ If you earlier had configured speed 100 on an interface the no speed command on that same interface reverts to the default speed setting which happens to be speed auto. ■ Same idea with the duplex command: an earlier configuration of duplex half or duplex full followed by no duplex on the same interface reverts the configuration back to the default of duplex auto. ■ If you had configured a description command with some text to go back to the default state of having no description command at all for that interface use the no description command. Example 9-6 shows the process. In this case switch SW1’s F0/2 port has been configured with speed 100 duplex half description link to 2901-2 and shutdown. You can see evidence of all four settings in the command that begins the example. This command lists the running-config but only the part for that one interface. The example then shows the no versions of those commands and closes with a confirmation that all the commands have reverted to default. Example 9-6 Removing Various Configuration Settings Using the no Command SW1 show running-config interface f0/2 Building configuration... Current configuration : 95 bytes interface FastEthernet0/2 description link to 2901-2

slide 252:

ptg17246291 198 CCENT/CCNA ICND1 100-105 Official Cert Guide shutdown speed 100 duplex half end SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z. SW1config interface fastEthernet 0/2 SW1config-if no speed SW1config-if no duplex SW1config-if no description SW1config-if no shutdown SW1config-if Z SW1 SW1 show running-config interface f0/2 Building configuration... Current configuration : 33 bytes interface FastEthernet0/2 end SW1 NOTE The show running-config and show startup-config commands typically do not dis- play default configuration settings so the absence of commands listed under interface F0/2 at the end of the example means that those commands now use default values. Autonegotiation For any 10/100 or 10/100/1000 interfaces—that is interfaces that can run at different speeds—Cisco Catalyst switches default to a setting of duplex auto and speed auto. As a result those interfaces attempt to automatically determine the speed and duplex setting to use. Alternatively you can configure most devices switch interfaces included to use a spe- cific speed and/or duplex. In practice using autonegotiation is easy: just leave the speed and duplex at the default set- ting and let the switch port negotiate what settings to use on each port. However problems can occur due to unfortunate combinations of configuration. Therefore this next topic walks through more detail about the concepts behind autonegotiation so you know better how to interpret the meaning of the switch show commands and when to choose to use a particular configuration setting. Autonegotiation Under Working Conditions Ethernet devices on the ends of a link must use the same standard or they cannot correctly send data. For example a NIC cannot use 100BASE-T which uses a two-pair UTP cable with a 100-Mbps speed while the switch port on the other end of the link uses 1000BASE-T. Even if you used a cable that works with Gigabit Ethernet the link would not work with one end trying to send at 100 Mbps while the other tried to receive the data at 1000 Mbps.

slide 253:

ptg17246291 Chapter 9: Configuring Switch Interfaces 199 9 Upgrading to new and faster Ethernet standards becomes a problem because both ends have to use the same standard. For example if you replace an old PC with a new one the old one might have been using 100BASE-T while the new one uses 1000BASE-T. The switch port on the other end of the link needs to now use 1000BASE-T so you upgrade the switch. If that switch had ports that would use only 1000BASE-T you would need to upgrade all the other PCs connected to the switch. So having both PC network interface cards NIC and switch ports that support multiple standards/speeds makes it much easier to migrate to the next better standard. The IEEE autonegotiation protocol helps makes it much easier to operate a LAN when NICs and switch ports support multiple speeds. IEEE autonegotiation IEEE standard 802.3u defines a protocol that lets the two UTP-based Ethernet nodes on a link negotiate so that they each choose to use the same speed and duplex settings. The protocol messages flow outside the normal Ethernet electrical frequencies as out-of-band signals over the UTP cable. Basically each node states what it can do and then each node picks the best options that both nodes support: the fastest speed and the best duplex setting with full duplex being better than half duplex. NOTE Autonegotiation relies on the fact that the IEEE uses the same wiring pinouts for 10BASE-T and 100BASE-T and that 1000BASE-T simply adds to those pinouts adding two pairs. Many networks use autonegotiation every day particularly between user devices and the access layer LAN switches as shown in Figure 9-1. The company installed four-pair cabling of the right quality to support 1000BASE-T to be ready to support Gigabit Ethernet. As a result the wiring supports 10-Mbps 100-Mbps and 1000-Mbps Ethernet options. Both nodes on each link send autonegotiation messages to each other. The switch in this case has all 10/100/1000 ports while the PC NICs support different options. Autonegotiation Enabled Autonegotiation Enabled 10/100/1000 Ports 123 10 10/100 Result: 10 Full Result: 100 Full Result: 1000 Full 10/100/1000 10/100/1000 10/100/1000 10/100/1000 Figure 9-1 IEEE Autonegotiation Results with Both Nodes Working Correctly

slide 254:

ptg17246291 200 CCENT/CCNA ICND1 100-105 Official Cert Guide The following list breaks down the logic one PC at a time: PC1: The switch port claims it can go as fast as 1000 Mbps but PC1’s NIC claims a top speed of 10 Mbps. Both the PC and switch choose the best speed both support 10 Mbps and the best duplex full. PC2: PC2 claims a best speed of 100 Mbps which means it can use 10BASE-T or 100BASE-T. The switch port and NIC negotiate to use the best speed of 100 Mbps and full duplex. PC3: It uses a 10/100/1000 NIC supporting all three speeds and standards so both the NIC and switch port choose 1000 Mbps and full duplex. Autonegotiation Results When Only One Node Uses Autonegotiation Figure 9-1 shows the IEEE autonegotiation results when both nodes use the process. However most Ethernet devices can disable autonegotiation so it is just as important to know what happens when a node tries to use autonegotiation but the node gets no response. Disabling autonegotiation is not always a bad idea. For instance many network engineers disable autonegotiation on links between switches and simply configure the desired speed and duplex on both switches. However mistakes can happen when one device on an Ethernet predefines speed and duplex and disables autonegotiation while the device on the other end attempts autonegotiation. In that case the link might not work at all or it might just work poorly. NOTE Configuring both the speed and duplex on a Cisco switch interface disables autonegotiation. IEEE autonegotiation defines some rules defaults that nodes should use as defaults when autonegotiation fails—that is when a node tries to use autonegotiation but hears nothing from the device. The rules: ■ Speed: Use your slowest supported speed often 10 Mbps. ■ Duplex: If your speed 10 or 100 use half duplex otherwise use full duplex. Cisco switches can make a better choice than that base IEEE logic because Cisco switches can actually sense the speed used by other nodes even without IEEE autonegotiation. As a result Cisco switches use this slightly different logic to choose the speed when autonegotia- tion fails: ■ Speed: Sense the speed without using autonegotiation but if that fails use the IEEE default slowest supported speed often 10 Mbps. ■ Duplex: Use the IEEE defaults: If speed 10 or 100 use half duplex otherwise use full duplex. Figure 9-2 shows three examples in which three users change their NIC settings and disable autonegotiation while the switch with all 10/100/1000 ports attempts autonegotiation. That is the switch ports all default to speed auto and duplex auto. The top of the figure shows the configured settings on each PC NIC with the choices made by the switch listed next to each switch port.

slide 255:

ptg17246291 Chapter 9: Configuring Switch Interfaces 201 9 Manual Settings Autonegotiation Disabled Autonegotiation Enabled 10/100/1000 Ports 123 10/100 10/100/1000 Settings: 100 Full Settings: 1000 Full Settings: 10 Half Result: 100 Half F0/1 F0/2 F0/3 Result: 1000 Full Result: 10 Half 10/100 Figure 9-2 IEEE Autonegotiation Results with Autonegotiation Disabled on One Side Reviewing each link left to right: ■ PC1: The switch receives no autonegotiation messages so it senses the electrical signal to learn that PC1 is sending data at 100 Mbps. The switch uses the IEEE default duplex based on the 100 Mbps speed half duplex. ■ PC2: The switch uses the same steps and logic as with the link to PC1 except that the switch chooses to use full duplex because the speed is 1000 Mbps. ■ PC3: The user picks poorly choosing the slower speed 10 Mbps and the worse duplex setting half. However the Cisco switch senses the speed without using IEEE autonego- tiation and then uses the IEEE duplex default for 10-Mbps links half duplex. PC1 shows a classic and unfortunately common end result: a duplex mismatch. The two nodes PC1 and SW1’s port F0/1 both use 100 Mbps so they can send data. However PC1 using full duplex does not attempt to use carrier sense multiple access with colli- sion detection CSMA/CD logic and sends frames at any time. Switch port F0/1 with half duplex does use CSMA/CD. As a result switch port F0/1 will believe collisions occur on the link even if none physically occur. The switch port will stop transmitting back off resend frames and so on. As a result the link is up but it performs poorly. Autonegotiation and LAN Hubs LAN hubs also impact how autonegotiation works. Basically hubs do not react to autone- gotiation messages and they do not forward the messages. As a result devices connected to a hub must use the IEEE rules for choosing default settings which often results in the devices using 10 Mbps and half duplex. Figure 9-3 shows an example of a small Ethernet LAN that uses a 20-year-old 10BASE-T hub. In this LAN all devices and switch ports are 10/100/1000 ports. The hub supports only 10BASE-T.

slide 256:

ptg17246291 202 CCENT/CCNA ICND1 100-105 Official Cert Guide 1000 Full Result: 10 Half 1000 Full Result: 10 Half Result: 10 Half SW1 Hub 1 1 2 3 4 Figure 9-3 IEEE Autonegotiation with a LAN Hub Note that the devices on the right need to use half duplex because the hub requires the use of the CSMA/CD algorithm to avoid collisions. Port Security If the network engineer knows what devices should be cabled and connected to particular interfaces on a switch the engineer can use port security to restrict that interface so that only the expected devices can use it. This reduces exposure to attacks in which the attacker connects a laptop to some unused switch port. When that inappropriate device attempts to send frames to the switch interface the switch can take different actions ranging from sim- ply issuing informational messages to effectively shutting down the interface. Port security identifies devices based on the source MAC address of Ethernet frames the devices send. For example in Figure 9-4 PC1 sends a frame with PC1’s MAC address as the source address. SW1’s F0/1 interface can be configured with port security and if so SW1 would examine PC1’s MAC address and decide whether PC1 was allowed to send frames into port F0/1. F0/1 G0/1 G0/2 F0/2 Source PC1 MAC 1 2 SW1 Frame Source PC2 MAC Frame SW2 Figure 9-4 Source MAC Addresses in Frames as They Enter a Switch Port security also has no restrictions on whether the frame came from a local device or was forwarded through other switches. For example switch SW1 could use port security on its G0/1 interface checking the source MAC address of the frame from PC2 when forwarded up to SW1 from SW2. Port security has several flexible options but all operate with the same core concepts. First switches enable port security per port with different settings available per port. Each port has a maximum number of allowed MAC addresses meaning that for all frames entering that port only that number of different source MAC addresses can be used in different incoming frames before port security thinks a violation has occurred. When a frame with a new source MAC address arrives pushing the number of MAC addresses past the allowed

slide 257:

ptg17246291 Chapter 9: Configuring Switch Interfaces 203 9 maximum a port security violation occurs. At that point the switch takes action—by default discarding all future incoming traffic on that port. The following list summarizes these ideas common to all variations of port security: ■ Define a maximum number of source MAC addresses allowed for all frames coming in the interface. ■ Watch all incoming frames and keep a list of all source MAC addresses plus a counter of the number of different source MAC addresses. ■ When adding a new source MAC address to the list if the number of MAC addresses pushes past the configured maximum a port security violation has occurred. The switch takes action the default action is to shut down the interface. Those rules define the basics but port security allows other options as well including let- ting you configure the specific MAC addresses allowed to send frames in an interface. For example in Figure 9-4 switch SW1 connects through interface F0/1 to PC1 so the port security configuration could list PC1’s MAC address as the specific allowed MAC address. But predefining MAC addresses for port security is optional: You can predefine all MAC addresses none or a subset of the MAC addresses. You might like the idea of predefining the MAC addresses for port security but finding the MAC address of each device can be a bother. Port security provides an easy way to discover the MAC addresses used off each port using a feature called sticky secure MAC addresses. With this feature port security learns the MAC addresses off each port and stores them in the port security configuration in the running-config file. This feature helps reduce the big effort of finding out the MAC address of each device. As you can see port security has a lot of detailed options. The next few sections walk you through these options to pull the ideas together. Configuring Port Security Port security configuration involves several steps. First you need to disable the negotiation of a feature that is not discussed until Chapter 11 “Implementing Ethernet Virtual LANs” whether the port is an access or trunk port. For now accept that port security requires a port to be configured to either be an access port or a trunking port. The rest of the com- mands enable port security set the maximum allowed MAC addresses per port and config- ure the actual MAC addresses as detailed in this list: Step 1. Make the switch interface either a static access or trunk interface using the switchport mode access or the switchport mode trunk interface subcom- mands respectively. Step 2. Enable port security using the switchport port-security interface subcom- mand. Step 3. Optional Override the default maximum number of allowed MAC address- es associated with the interface 1 by using the switchport port-security maximum number interface subcommand. Step 4. Optional Override the default action to take upon a security violation shutdown using the switchport port-security violation protect | restrict | shutdown interface subcommand. Config Checklist

slide 258:

ptg17246291 204 CCENT/CCNA ICND1 100-105 Official Cert Guide Step 5. Optional Predefine any allowed source MAC addresses for this interface using the switchport port-security mac-address mac-address command. Use the command multiple times to define more than one MAC address. Step 6. Optional Tell the switch to “sticky learn” dynamically learned MAC addresses with the switchport port-security mac-address sticky interface subcommand. Figure 9-5 and Example 9-7 show four examples of port security. Three ports operate as access ports while port F0/4 connected to another switch operates as a trunk. Note that port security allows either a trunk or an access port but requires that the port be statically set as one or the other. Fa0/4 Fa0/3 Maximum 8 Dynamic Company Comptroller Fa0/2 Sticky Server 2 0200.2222.2222 Fa0/1 Static Server 1 0200.1111.1111 SW2 Figure 9-5 Port Security Configuration Example Example 9-7 Variations on Port Security Configuration SW1 show running-config Lines omitted for brevity interface FastEthernet0/1 switchport mode access switchport port-security switchport port-security mac-address 0200.1111.1111 interface FastEthernet0/2 switchport mode access switchport port-security switchport port-security mac-address sticky interface FastEthernet0/3 switchport mode access switchport port-security interface FastEthernet0/4 switchport mode trunk switchport port-security switchport port-security maximum 8

slide 259:

ptg17246291 Chapter 9: Configuring Switch Interfaces 205 9 First scan the configuration for all four interfaces in Example 9-7 focusing on the first two interface subcommands. Note that the first three interfaces in the example use the same first two interface subcommands matching the first two configuration steps noted before Figure 9-5. The switchport port-security command enables port security with all defaults with the switchport mode access command meeting the requirement to configure the port as either an access or trunk port. The final port F0/4 has a similar configuration except that it has been configured as a trunk rather than as an access port. Next scan all four interfaces again and note that the configuration differs on each inter- face after those first two interface subcommands. Each interface simply shows a different example for perspective. The first interface FastEthernet 0/1 adds one optional port security subcommand: switchport port-security mac-address 0200.1111.1111 which defines a specific source MAC address. With the default maximum source address setting of 1 only frames with source MAC 0200.1111.1111 will be allowed in this port. When a frame with a source other than 0200.1111.1111 enters F0/1 the switch will take the default violation action and disable the interface. As a second example FastEthernet 0/2 uses the same logic as FastEthernet 0/1 except that it uses the sticky learning feature. For port F0/2 the configuration the switchport port-security mac-address sticky command which tells the switch to dynamically learn source MAC addresses and add port-security commands to the running-config. The end of upcoming Example 9-8 shows the running-config file that lists the sticky-learned MAC address in this case. NOTE Port security does not save the configuration of the sticky addresses so use the copy running-config startup-config command if desired. The other two interfaces do not predefine MAC addresses nor do they sticky-learn the MAC addresses. The only difference between these two interfaces’ port security configura- tion is that FastEthernet 0/4 supports eight MAC addresses because it connects to another switch and should receive frames with multiple source MAC addresses. Interface F0/3 uses the default maximum of one MAC address. Verifying Port Security Example 9-8 lists the output of two examples of the show port-security interface com- mand. This command lists the configuration settings for port security on an interface plus it lists several important facts about the current operation of port security including informa- tion about any security violations. The two commands in the example show interfaces F0/1 and F0/2 based on Example 9-7’s configuration. Example 9-8 Using Port Security to Define Correct MAC Addresses of Particular Interfaces SW1 show port-security interface fastEthernet 0/1 Port Security : Enabled Port Status : Secure-shutdown Violation Mode : Shutdown Aging Time : 0 mins

slide 260:

ptg17246291 206 CCENT/CCNA ICND1 100-105 Official Cert Guide Aging Type : Absolute SecureStatic Address Aging : Disabled Maximum MAC Addresses : 1 Total MAC Addresses : 1 Configured MAC Addresses : 1 Sticky MAC Addresses : 0 Last Source Address:Vlan : 0013.197b.5004:1 Security Violation Count : 1 SW1 show port-security interface fastEthernet 0/2 Port Security : Enabled Port Status : Secure-up Violation Mode : Shutdown Aging Time : 0 mins Aging Type : Absolute SecureStatic Address Aging : Disabled Maximum MAC Addresses : 1 Total MAC Addresses : 1 Configured MAC Addresses : 1 Sticky MAC Addresses : 1 Last Source Address:Vlan : 0200.2222.2222:1 Security Violation Count : 0 SW1 show running-config interface f0/2 Building configuration... Current configuration : 188 bytes interface FastEthernet0/2 switchport mode access switchport port-security switchport port-security mac-address sticky switchport port-security mac-address sticky 0200.2222.2222 The first two commands in Example 9-8 confirm that a security violation has occurred on FastEthernet 0/1 but no violations have occurred on FastEthernet 0/2. The show port- security interface fastethernet 0/1 command shows that the interface is in a secure- shutdown state which means that the interface has been disabled because of port security. In this case another device connected to port F0/1 sending a frame with a source MAC address other than 0200.1111.1111 is causing a violation. However port Fa0/2 which used sticky learning simply learned the MAC address used by Server 2. The bottom of Example 9-8 as compared to the configuration in Example 9-7 shows the changes in the running-config because of sticky learning with the switchport port-security mac-address sticky 0200.2222.2222 interface subcommand.

slide 261:

ptg17246291 Chapter 9: Configuring Switch Interfaces 207 9 Port Security Violation Actions Finally the switch can be configured to use one of three actions when a violation occurs. All three options cause the switch to discard the offending frame but some of the options make the switch take additional actions. The actions include the sending of syslog messages to the console sending SNMP trap messages to the network management station and dis- abling the interface. Table 9-2 lists the options of the switchport port-security violation protect | restrict | shutdown command and their meanings. Table 9-2 Actions When Port Security Violation Occurs Option on the switchport port-security violation Command Protect Restrict Shutdown Discards offending traffic Yes Yes Yes Sends log and SNMP messages No Y es Y es Increments the violation counter for each violating incoming frame No Yes Yes Disables the interface by putting it in an err-disabled state discarding all traffic No No Y es shutdown is the default setting. Note that the shutdown option does not actually add the shutdown subcommand to the interface configuration. Instead IOS puts the interface in an error disabled err-disabled state which makes the switch stop all inbound and outbound frames. To recover from this state someone must manually disable the interface with the shutdown interface command and then enable the interface with the no shutdown command. Port Security MAC Addresses as Static and Secure but Not Dynamic To complete this chapter take a moment to think about Chapter 7’s discussions about switching along with all those examples of output from the show mac address-table dynamic EXEC command. Once a switch port has been configured with port security the switch no longer considers MAC addresses associated with that port as being dynamic entries as listed with the show mac address-table dynamic EXEC command. Even if the MAC addresses are dynamically learned once port security has been enabled you need to use one of these options to see the MAC table entries associated with ports using port security: ■ show mac address-table secure: Lists MAC addresses associated with ports that use port security ■ show mac address-table static: Lists MAC addresses associated with ports that use port security as well as any other statically defined MAC addresses Example 9-9 proves the point. It shows two commands about interface F0/2 from the port security example shown in Figure 9-5 and Example 9-7 . In that example port security was configured on F0/2 with sticky learning so from a literal sense the switch learned a MAC address off that port 0200.2222.2222. However the show mac address-table dynamic com- mand does not list the address and port because IOS considers that MAC table entry to be a static entry. The show mac address-table secure command does list the address and port.

slide 262:

ptg17246291 208 CCENT/CCNA ICND1 100-105 Official Cert Guide Example 9-9 Using the secure Keyword to See MAC Table Entries When Using Port Security SW1 show mac address-table secure interface F0/2 Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0200.2222.2222 STATIC Fa0/2 Total Mac Addresses for this criterion: 1 SW1 show mac address-table dynamic interface f0/2 Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- SW1 Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment section titled “Step 2: Build Your Study Habits Around the Chapter” for more details. Table 9-3 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 9-3 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Repeat DIKTA questions Book PCPT Review memory tables Book DVD/website Review config checklists Book DVD/website Do labs Sim Lite blog Review command tables Book

slide 263:

ptg17246291 Chapter 9: Configuring Switch Interfaces 209 9 Review All the Key Topics Table 9-4 Key T opics for Chapter 9 Key Topic Element Description Page Number Example 9-1 Example of configuring speed duplex and description 193 Example 9-4 Example of disabling an interface using the shutdown command 195 List Key decision rules for autonegotiation on Cisco switches when the other device does not participate 200 List Summary of port security concepts 203 Table 9-2 Port security actions and the results of each action 207 Key Terms You Should Know port security autonegotiation full duplex half-duplex 10/100 10/100/1000 Do Labs The Sim Lite software is a version of Pearson’s full simulator learning product with a subset of the labs included with this book for free. The subnet of labs all relate to this part. Take the time to try some of the labs. As always also check the author’s blog site pages for con- figuration exercises Config Labs at http://blog.certskills.com/ccent/. Command References Tables 9-5 9-6 and 9-7 list configuration and verification commands used in this chapter. As an easy review exercise cover the left column in a table read the right column and try to recall the command without looking. Then repeat the exercise covering the right column and try to recall what the command does. Table 9-5 Switch Interface Configuration Command Mode/Purpose/Description int er f a ce type port-number Changes context to interface mode. The type is typically Fast Ethernet or Gigabit Ethernet. The possible port numbers vary depending on the model of switch—for example Fa0/1 Fa0/2 and so on. int er f a ce r ange type port-number - end-port-number Changes the context to interface mode for a range of consecutively numbered interfaces. The subcommands that follow then apply to all interfaces in the range. sh ut d ow n | no shutdown Interface mode. Disables or enables the interface respectively. speed 10 | 100 | 1000 | auto Interface mode. Manually sets the speed to the listed speed or with the auto setting automatically negotiates the speed. dup l e x auto | full | half Interface mode. Manually sets the duplex to half or full or to autonegotiate the duplex setting.

slide 264:

ptg17246291 210 CCENT/CCNA ICND1 100-105 Official Cert Guide Command Mode/Purpose/Description d esc r ipt i on text Interface mode. Lists any information text that the engineer wants to track for the interface such as the expected device on the other end of the cable. no dup l e x no speed no d esc r ipt i on Reverts to the default setting for each interface subcommand of speed auto duplex auto and the absence of a description command. Table 9-6 Port Security Configuration Command Mode/Purpose/Description switchport mode access | trunk Interface configuration mode command that tells the switch to always be an access port or always be a trunk port sw it ch por t por t -sec ur it y mac-address mac-address Interface configuration mode command that statically adds a specific MAC address as an allowed MAC address on the interface sw it ch por t por t -sec ur it y ma c- a d dr ess sticky Interface subcommand that tells the switch to learn MAC addresses on the interface and add them to the configuration for the interface as secure MAC addresses sw it ch por t por t -sec ur it y max imum value Interface subcommand that sets the maximum number of static secure MAC addresses that can be assigned to a single interface sw it ch por t por t -sec ur it y v i o lat i on protect | restrict | shutdown Interface subcommand that tells the switch what to do if an inappropriate MAC address tries to access the network through a secure switch port Table 9-7 Chapter 9 EXEC Command Reference Command Purpose sh ow r unning- conf ig Lists the currently used configuration show running-config | interface type number Displays the running-configuration excerpt of the listed interface and its subcommands only show mac address-table dynamic interface type number Lists the dynamically learned entries in the switch’s address forwarding table show mac address-table secure interface type number Lists MAC addresses defined or learned on ports configured with port security show mac address-table static interface type number Lists static MAC addresses and MAC addresses learned or defined with port security

slide 265:

ptg17246291 Chapter 9: Configuring Switch Interfaces 211 9 Command Purpose sh ow int er f a ces interface type number status Lists one output line per interface or for only the listed interface if included noting the description operating state and settings for duplex and speed on each interface show interfaces interface type number Lists detailed status and statistical information about all interfaces or the listed interface only sh ow por t -sec ur it y interface type number Lists an interface’s port security configuration settings and security operational status sh ow por t -sec ur it y Lists one line per interface that summarizes the port security settings for any interface on which it is enabled

slide 266:

ptg17246291 Keep track of your part review progress with the checklist shown in Table P2-1. Details on each task follow the table. Table P2-1 Part II Part Review Checklist Activity 1st Date Completed 2nd Date Completed Repeat All DIKTA Questions Answer Part Review Questions Review Key Topics Create Terminology Mind Maps Create Command Mind Maps by Category Do Labs Repeat All DIKTA Questions For this task answer the “Do I Know This Already” questions again for the chapters in this part of the book using the PCPT software. Answer Part Review Questions For this task answer the Part Review questions for this part of the book using the PCPT software. Refer to the Introduction to this book in the section “How to View Part Review Questions” for more details. Part II Review

slide 267:

ptg17246291 Review Key Topics Review all key topics in all chapters in this part either by browsing the chapters or by using the Key Topics application on the DVD or companion website. Create Terminology Mind Maps Similar to the exercise you did in the Part I review without looking back at the chapters or your notes create a mind map with all the terminology you can recall from Part II of the book. Your job is as follows: ■ Think of every term that you can remember from Part II of the book. ■ Organize the terms into two divisions: Ethernet terms and CLI terms. Do not include CLI commands just terms for example enable mode. ■ After you have written every term you can remember into one of the mind maps review the Key Terms list at the end of Chapters 6 through 9. Add any terms you for- got to your mind maps. Create Command Mind Maps by Category Part II of this book introduced a large number of both configuration and EXEC commands. The sheer number of commands can be a bit overwhelming so it helps to practice the pro- cess of remembering which commands exist and which ones work together for a particular feature. This mind map exercise focuses on that task. Create one mind map for each of the categories of commands in this list: Securing the console and Telnet with passwords securing the console and Telnet with local usernames SSH switch IPv4 support switch forwarding port security other switch admin other interface subcommands For each category think of all configuration commands and all EXEC commands mostly show commands. For each category group the configuration commands separately from the EXEC commands. Figure P2-1 shows a sample for IPv4 commands on a switch. Figure P2-1 Sample Mind Map from the Switch IPv4 Support Branch

slide 268:

ptg17246291 214 CCENT/CCNA ICND1 100-105 Official Cert Guide NOTE For more information on mind mapping refer to the Introduction in the section “About Mind Maps.” Finally keep the following important points in mind when working on this project: ■ Most of the learning with this exercise happens when you do it. Reading some other mind map or just rereading command tables does not work as well for helping you remember for yourself. ■ Do this activity without notes and without looking at the book. ■ After you finish review it and compare it against the command summary tables at the ends of the chapters and note which commands you had originally forgotten. ■ Do not worry about every last parameter or the exact syntax just write down the first few words of the command. ■ For later study make a note about which commands you feel you truly understand and which ones about which you feel less confident. ■ Repeat this exercise when you have 10 spare minutes as a way to see what you remember again without your notes. Appendix L “Mind Map Solutions” lists a sample mind map answer. Labs This is the first book part with switch commands. If you have not done so make your choices about what lab tools you intend to use and experiment with the commands in these chapters. Re-create examples in the chapters and try all the show commands the show commands are very important for answering SimLet questions: Sim Lite: You can use the Pearson Network Simulator Lite included with this book to do some labs and get used to the CLI. All the labs in the ICND1 Sim Lite product are about topics in this part of the book so make sure and work through those labs to start learning about the CLI. Pearson Network Simulator: If you use the full Pearson ICND1 or CCNA simulator focus more on the configuration scenario and troubleshooting scenario labs associated with the topics in this part of the book. These types of labs include a larger set of topics and work well as Part Review activities. See the Introduction for some details about how to find which labs are about topics in this part of the book. Config Labs: In your idle moments review and repeat any of the Config Labs for this book part in the author’s blog launch from blog.certskills.com/ccent and navigate to the Hands-on Config labs.

slide 269:

ptg17246291 This page intentionally left blank

slide 270:

ptg17246291 Part III of this book builds on the basics of implementing Ethernet in Part II by taking the concepts configuration and troubleshooting another step or two deeper. Now that you know the basics of how to build a small Ethernet LAN with Cisco switches Part III begins by looking at typical Ethernet LAN designs. Understanding how a small LAN with one or two switches works is a great place to start but understanding why an experi- enced network engineer might build a larger LAN a particular way helps you understand how LANs work in real networks. VLANs are one of the most powerful design tools for a network designer. VLANs also have a huge impact on how a switch works which then impacts how you verify and troubleshoot the operation of a campus LAN. The second chapter in this part of the book shows the details of VLAN operation along with VLAN trunking. The final chapter in this part of the book ends the chapters that focus on Ethernet. The Ethernet troubleshooting chapter of course discusses many details of how to troubleshoot an Ethernet LAN after you have implemented it. From a learning perspective it also serves as a great review of many of the topics in Parts II and III of the book.

slide 271:

ptg17246291 Part III Ethernet LANs: Design VLANs and Troubleshooting Chapter 10: Analyzing Ethernet LAN Designs Chapter 11: Implementing Ethernet Virtual LANs Chapter 12: Troubleshooting Ethernet LANs Part III Review

slide 272:

ptg17246291 CHAPTER 10 Analyzing Ethernet LAN Designs This chapter covers the following exam topics: 1.0 Network Fundamentals 1.3 Describe the impact of infrastructure components in an enterprise network 1.3.b Access points 1.3.c Wireless controllers 1.4 Compare and contrast collapsed core and three-tier architectures 1.5 Compare and contrast network topologies 1.5.a Star 1.5.b Mesh 1.5.c Hybrid 1.6 Select the appropriate cabling type based on implementation requirements 2.0 LAN Switching Technologies 2.3 Troubleshoot interface and cable issues collisions errors duplex speed Ethernet defines what happens on each Ethernet link but the more interesting and more detailed work happens on the devices connected to those links: the network interface cards NIC inside devices and the LAN switches. This chapter takes the Ethernet LAN basics introduced in Chapter 2 “Fundamentals of Ethernet LANs” and dives deeply into many aspects of a modern Ethernet LAN while focusing on the primary device used to create these LANs: LAN switches. This chapter breaks down the discussion of Ethernet and LAN switching into two sections. The first major section looks at the logic used by LAN switches when forwarding Ethernet frames along with the related terminology. The second section considers design and imple- mentation issues as if you were building a new Ethernet LAN in a building or campus. This second section considers design issues including using switches for different purposes when to choose different types of Ethernet links and how to take advantage of Ethernet autonegotiation. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 273:

ptg17246291 Table 10-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Analyzing Collision Domains and Broadcast Domains 1–2 Analyzing Campus LAN Topologies 3–5 Analyzing LAN Physical Standard Choices 6 1. Which of the following devices would be in the same collision domain as PC1 a. PC2 which is separated from PC1 by an Ethernet hub b. PC3 which is separated from PC1 by a transparent bridge c. PC4 which is separated from PC1 by an Ethernet switch d. PC5 which is separated from PC1 by a router 2. Which of the following devices would be in the same broadcast domain as PC1 Choose three answers. a. PC2 which is separated from PC1 by an Ethernet hub b. PC3 which is separated from PC1 by a transparent bridge c. PC4 which is separated from PC1 by an Ethernet switch d. PC5 which is separated from PC1 by a router 3. In a two-tier campus LAN design which of the following are typically true of the topology design Choose two answers. a. The design uses a full mesh of links between access and distribution switches b. The design uses a partial mesh of links between access and distribution switches c. The design uses a partial mesh of links between the distribution and core switches d. The end user and server devices connect directly to access layer switches 4. In a three-tier campus LAN design which of the following are typically true of the topology design Choose two answers. a. The design uses a partial mesh of links between access and distribution switches b. The design uses a full mesh of links between access and distribution switches c. The design uses a partial mesh of links between the distribution and core switches d. The end user and server devices connect directly to distribution layer switches 5. Which one answer gives the strongest match between one part of a typical three-tier design with the idea behind the listed generic topology design term a. The access layer looks like a partial mesh. b. The distribution layer looks like a full mesh. c. The distribution layer looks like a hybrid design. d. The access layer looks like a star design.

slide 274:

ptg17246291 220 CCENT/CCNA ICND1 100-105 Official Cert Guide 6. Which of the following Ethernet standards support a maximum cable length of longer than 100 meters Choose two answers. a. 100BASE-T b. 1000BASE-SX c. 1000BASE-T d. 1000BASE-LX Foundation Topics Analyzing Collision Domains and Broadcast Domains Ethernet devices and the logic they use have a big impact on why engineers design modern LANs in a certain way. Some of the terms used to describe key design features come from far back in the history of Ethernet and because of their age the meaning of each term may or may not be so obvious to someone learning Ethernet today. This first section of the chapter looks at two of these older terms in particular: collision domain and broadcast domain. And to understand these terms and apply them to modern Ethernet LANs this sec- tion needs to work back through the history of Ethernet a bit to put some perspective on the meaning behind these terms. Ethernet Collision Domains The term collision domain comes from the far back history of Ethernet LANs. To be hon- est sometimes people new to Ethernet can get a little confused about what this term really means in the context of a modern Ethernet LAN in part because modern Ethernet LANs done properly can completely prevent collisions. So to fully understand collision domains we must first start with a bit of Ethernet history. This next section of the chapter looks at a few of the historical Ethernet devices for the purpose of defining a collision domain and then closing with some comments about how the term applies in a modern Ethernet LAN that uses switches. 10BASE-T with Hub 10BASE-T introduced in 1990 significantly changed the design of Ethernet LANs more like the designs seen today. 10BASE-T introduced the cabling model similar to today’s Ethernet LANs with each device connecting to a centralized device using an unshielded twisted-pair UTP cable. However 10BASE-T did not originally use LAN switches instead the early 10BASE-T networks used a device called an Ethernet hub. The technology required to build even a basic LAN switch was not yet available at that time. Although both a hub and a switch use the same cabling star topology an Ethernet hub does not forward traffic like a switch. Ethernet hubs use physical layer processing to forward data. A hub does not interpret the incoming electrical signal as an Ethernet frame look at the source and destination MAC address and so on. Basically a hub acts like a repeater just with lots of ports. When a repeater receives an incoming electrical signal it immediately forwards a regenerated signal out all the other ports except the incoming port. Physically the hub just sends out a cleaner version of the same incoming electrical signal as shown in Figure 10-1 with Larry’s signal being repeated out the two ports on the right.

slide 275:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 221 10 Larry Archie Bob Hub 1 2 2 Figure 10-1 10BASE-T with a Hub: The Hub Repeats Out All Other Ports Because of the physical layer operation used by the hub the devices attached to the net- work must use carrier sense multiple access with collision detection CSMA/CD to take turns as introduced at the end of Chapter 2. Note that the hub itself does not use CSMA/ CD logic the hub always receives an electrical signal and starts repeating a regenerated sig- nal out all other ports with no thought of CSMA/CD. So although a hub’s logic works well to make sure all devices get a copy of the original frame that same logic causes frames to collide. Figure 10-2 demonstrates that effect when the two devices on the right side of the figure send a frame at the same time and the hub physically transmits both electrical signals out the port to the left toward Larry. Larry Archie Bob Hub 1 Collision 1B 1A 2 Figure 10-2 Hub Operation Causing a Collision Because a hub makes no attempt to prevent collisions the devices connected to it all sit within the same collision domain. A collision domain is the set of NICs and device ports for which if they sent a frame at the same time the frames would collide. In Figures 10-1 and 10-2 all three PCs are in the same collision domain as well as the hub. Summarizing the key points about hubs: ■ The hub acts a multiport repeater blindly regenerating and repeating any incoming elec- trical signal out all other ports even ignoring CSMA/CD rules. ■ When two or more devices send at the same time the hub’s actions cause an electrical collision making both signals corrupt. ■ The connected devices must take turns by using carrier sense multiple access with colli- sion detection CSMA/CD logic so the devices share the bandwidth. ■ Hubs create a physical star topology. Ethernet Transparent Bridges From a design perspective the introduction of 10BASE-T was a great improvement over the earlier types of Ethernet. It reduced cabling costs and cable installation costs and improved the availability percentages of the network. But sitting here today thinking of a LAN in which all devices basically have to wait their turn may seem like a performance issue and it was. If Ethernet could be improved to allow multiple devices to send at the same time with- out causing a collision Ethernet performance could be improved. Answers to the “Do I Know This Already” quiz: 1 A 2 A B C 3 B D 4 A C 5 D 6 B D

slide 276:

ptg17246291 222 CCENT/CCNA ICND1 100-105 Official Cert Guide The first method to allow multiple devices to send at the same time was Ethernet transpar- ent bridges. Ethernet transparent bridges or simply bridges made these improvements: ■ Bridges sat between hubs and divided the network into multiple collision domains. ■ Bridges increase the capacity of the entire Ethernet because each collision domain is basically a separate instance of CSMA/CD so each collision domain can have one sender at a time. Figure 10-3 shows the effect of building a LAN with two hubs each separated by a bridge. The resulting two collision domains each support at most 10 Mbps of traffic each com- pared to at most 10 Mbps if a single hub were used. 1 Collision Domain Sharing 10 Mbps Bridge Fred Barney Wilma Betty Hub Hub 1 Collision Domain Sharing 10 Mbps Figure 10-3 Bridge Creates Two Collision Domains and Two Shared Ethernets Bridges create multiple collision domains as a side effect of their forwarding logic. A bridge makes forwarding decisions just like a modern LAN switch in fact bridges were the prede- cessors of the modern LAN switch. Like switches bridges hold Ethernet frames in memory waiting to send out the outgoing interface based on CSMA/CD rules. In other cases the bridge does not even need to forward the frame. For instance if Fred sends a frame destined to Barney’s MAC address then the bridge would never forward frames from the left to the right. Ethernet Switches and Collision Domains LAN switches perform the same basic core functions as bridges but at much faster speeds and with many enhanced features. Like bridges switches segment a LAN into separate col- lision domains each with its own capacity. And if the network does not have a hub each single link in a modern LAN is considered its own collision domain even if no collisions can actually occur in that case. For example Figure 10-4 shows a simple LAN with a switch and four PCs. The switch creates four collision domains with the ability to send at 100 Mbps in this case on each of the four links. And with no hubs each link can run at full duplex doubling the capac- i t y o f e a c h l i n k .

slide 277:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 223 10 F0/4 F0/3 Fred Barney F0/2 F0/1 Wilma Betty Full Duplex Full Duplex Full Duplex Full Duplex 100 Mbps 100 Mbps 100 Mbps 100 Mbps Four Possible Collision Domains Figure 10-4 Switch Creates Four Collision Domains and Four Ethernet Segments Now take a step back for a moment and think about some facts about modern Ethernet LANs. Today you build Ethernet LANs with Ethernet switches not with Ethernet hubs or bridges. The switches connect to each other. And every single link is a separate colli- sion domain. As strange as it sounds each of those collision domains in a modern LAN may also never have a collision. Any link that uses full duplex—that is both devices on the link use full duplex—does not have collisions. In fact running with full duplex is basically this idea: No collisions can occur between a switch and a single device so we can turn off CSMA/CD by running full duplex . NOTE The routers in a network design also create separate collision domains because frames entering or exiting one router LAN interface do not collide with frames on another of the router’s LAN interfaces. The Impact of Collisions on LAN Design So what is the useful takeaway from this discussion about collision domains A long time ago collisions were normal in Ethernet so analyzing an Ethernet design to determine where the collision domains were was useful. On the other end of the spectrum a modern campus LAN that uses only switches and no hubs or transparent bridges and full duplex on all links has no collisions at all. So does the collision domain term still matter today And do we need to think about collisions even still today In a word the term collision domain still matters and collisions still matter in that network engineers need to be ready to understand and troubleshoot exceptions. Whenever a port that could use full duplex therefore avoiding collisions happens to use half duplex—by incorrect configuration by the result of autonegotiation or any other reason—collisions can now occur. In those cases engineers need to be able identify the collision domain. Summarizing the key points about collision domains: ■ LAN switches place each separate interface into a separate collision domain. ■ LAN bridges which use the same logic as switches placed each interface into a separate collision domain. ■ Routers place each LAN interface into a separate collision domain. The term collision domain does not apply to WAN interfaces. ■ LAN hubs do not place each interface into a separate collision domain.

slide 278:

ptg17246291 224 CCENT/CCNA ICND1 100-105 Official Cert Guide ■ A modern LAN with all LAN switches and routers with full duplex on each link would not have collisions at all. ■ In a modern LAN with all switches and routers even though full duplex removes colli- sions think of each Ethernet link as a separate collision domain when the need to trou- bleshoot arises. Figure 10-5 shows an example with a design that includes hubs bridges switches and routers—a design that you would not use today but it makes a good backdrop to remind us about which devices create separate collision domains. Hub 1 Hub Bridge Router Switch 2 3 4 Five Collision Domains Figure 10-5 Example of a Hub Not Creating Multiple Collision Domains While Others Do Ethernet Broadcast Domains Take any Ethernet LAN and pick any device. Then think of that device sending an Ethernet broadcast. An Ethernet broadcast domain is the set of devices to which that broadcast is delivered. To begin think about a modern LAN for a moment and where a broadcast frame flows. Imagine that all the switches still used the switch default to put each interface into VLAN 1. As a result a broadcast sent by any one device would be flooded to all devices connected to all switches except for the device that sent the original frame. For instance in Figure 10-6 under the assumption that all ports are still assigned to VLAN 1 a broadcast would flow to all the devices shown in the figure. 10/100/1000 10/100/1000 ..... 10/100/1000 10/100/1000 A40 D1 A2 A39 D1 A1 One VLAN Figure 10-6 A Single Large Broadcast Domain Of all the common networking devices discussed in this book only a router does not for- ward a LAN broadcast. Hubs of course forward broadcasts because hubs do not even think about the electrical signal as an Ethernet frame. Bridges and switches use the same forward- ing logic flooding LAN broadcasts. Routers as a side effect of their routing logic do not forward Ethernet broadcast frames so they separate a network into separate broadcast domains. Figure 10-7 collects those thoughts into a single example.

slide 279:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 225 10 Hub 1 Hub Bridge Router Switch 2 3 4 Two Broadcast Domains Figure 10-7 Broadcast Domains Separated by a Router By definition broadcasts sent by a device in one broadcast domain are not forwarded to devices in another broadcast domain. In this example there are two broadcast domains. The router does not forward a LAN broadcast sent by a PC on the left to the network segment on the right. Virtual LANs Routers create multiple broadcast domains mostly as a side effect of how IP routing works. While a network designer might set about to use more router interfaces for the purpose of making a larger number of smaller broadcast domains that plan quickly consumes router interfaces. But a better tool exists one that is integrated into LAN switches and consumes no additional ports: virtual LANs VLAN. By far VLANs give the network designer the best tool for designing the right number of broadcast domains of the right size with the right devices in each. To appreciate how VLANs do that you must first think about one specific definition of what a LAN is: A LAN consists of all devices in the same broadcast domain. With VLANs a switch configuration places each port into a specific VLAN. The switches create multiple broadcast domains by putting some interfaces into one VLAN and other interfaces into other VLANs. The switch forwarding logic does not forward frames from a port in one VLAN out a port into another VLAN—so the switch separates the LAN into separate broadcast domains. Instead routers must forward packets between the VLANs by using routing logic. So instead of all ports on a switch forming a single broadcast domain the switch separates them into many based on configuration. For perspective think about how you would create two different broadcast domains with switches if the switches had no concept of VLANs. Without any knowledge of VLANs a switch would receive a frame on one port and flood it out all the rest of its ports. Therefore to make two broadcast domains two switches would be used—one for each broadcast domain as shown in Figure 10-8. Dino Fred Wilma Betty SW1 SW2 Left Broadcast Domain Right Broadcast Domain Figure 10-8 Sample Network with Two Broadcast Domains and No VLANs

slide 280:

ptg17246291 226 CCENT/CCNA ICND1 100-105 Official Cert Guide Alternatively with a switch that understands VLANs you can create multiple broad- cast domains using a single switch. All you do is put some ports in one VLAN and some in the other. The Cisco Catalyst switch interface subcommand to do so is s w i tc hp o r t access vlan 2 for instance to place a port into VLAN 2. Figure 10-9 shows the same two broadcast domains as in Figure 10-8 now implemented as two different VLANs on a s i n gl e s w i t c h. Dino Fred Wilma Betty SW1 VLAN 2 VLAN 1 Left Broadcast Domain Right Broadcast Domain Figure 10-9 Sample Network with Two VLANs Using One Switch This section briefly introduces the concept of VLANs but Chapter 11 “Implementing Ethernet Virtual LANs” discusses VLANs in more depth including the details of how to configure VLANs in campus LANs. The Impact of Broadcast Domains on LAN Design Modern LAN designs try to avoid collisions because collisions make performance worse. There is no benefit to keeping collisions in the network. However a LAN design cannot remove broadcasts because broadcast frames play an important role in many protocols. So when thinking about broadcast domains the choices are more about tradeoffs rather than designing to remove broadcasts. For just one perspective just think about the size of a broadcast domain—that is the num- ber of devices in the same broadcast domain. A small number of large broadcast domains can lead to poor performance for the devices in that broadcast domain. However moving in the opposite direction to making a large number of broadcast domains each with just a few devices leads to other problems. Consider the idea of a too-large broadcast domain for a moment. When a host receives a broadcast the host must process the received frame. All hosts need to send some broad- casts to function properly so when a broadcast arrives the NIC must interrupt the com- puter’s CPU to give the incoming message to the CPU. The CPU must spend time think- ing about the received broadcast frame. For example IP Address Resolution Protocol ARP messages are LAN broadcasts as mentioned in Chapter 4 “Fundamentals of IPv4 Addressing and Routing.” So broadcasts happen which is good but broadcasts do require all the hosts to spend time processing each broadcast frame. The more devices in the same broadcast domain the more unnecessary interruptions of each device’s CPU. This section of the book does not try to give a sweeping review of all VLAN design trad- eoffs. Instead you can see that the size of a VLAN should be considered but many other factors come in to play as well. How big are the VLANs How are the devices grouped Do VLANs span across all switches or just a few Is there any apparent consistency to the VLAN design or is it somewhat haphazard Answering these questions helps reveal what the designer was thinking as well as what the realities of operating a network may have required.

slide 281:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 227 10 NOTE If you would like more detail about Cisco recommendations about what to put in what VLAN which impacts the size of VLANs read the most recent Cisco document “Campus LAN validated design” by searching on that phrase at Cisco.com. Summarizing the main points about broadcast domains: ■ Broadcasts exists so be ready to analyze a design to define each broadcast domain that is each set of devices whose broadcasts reach the other devices in that domain. ■ VLANs by definition are broadcast domains created though configuration. ■ Routers because they do not forward LAN broadcasts create separate broadcast domains off their separate Ethernet interfaces. Analyzing Campus LAN Topologies The term campus LAN refers to the LAN created to support the devices in a building or in multiple buildings in somewhat close proximity to one another. For example a company might lease office space in several buildings in the same office park. The network engineers can then build a campus LAN that includes switches in each building plus Ethernet links between the switches in the buildings to create a larger campus LAN. When planning and designing a campus LAN the engineers must consider the types of Ethernet available and the cabling lengths supported by each type. The engineers also need to choose the speeds required for each Ethernet segment. In addition some thought needs to be given to the idea that some switches should be used to connect directly to end-user devices whereas other switches might need to simply connect to a large number of these end-user switches. Finally most projects require that the engineer consider the type of equipment that is already installed and whether an increase in speed on some segments is worth the cost of buying new equipment. This second of three major sections of the chapter discusses the topology of a campus LAN design. Network designers do not just plug in devices to any port and connect switches to each other in an arbitrary way like you might do with a few devices on the same table in a lab. Instead there are known better ways to design the topology of a campus LAN and this section introduces some of the key points and terms. The last major section of the chapter then looks at how to choose which Ethernet standard to use for each link in that campus LAN design and why you might choose one versus another. Two-Tier Campus Design Collapsed Core To sift through all the requirements for a campus LAN and then have a reasonable conver- sation about it with peers most Cisco-oriented LAN designs use some common terminol- ogy to refer to the design. For this book’s purposes you should be aware of some of the key campus LAN design terminology. The Two-Tier Campus Design Figure 10-10 shows a typical design of a large campus LAN with the terminology included in the figure. This LAN has around 1000 PCs connected to switches that support around 25 ports each. Explanations of the terminology follow the figure.

slide 282:

ptg17246291 228 CCENT/CCNA ICND1 100-105 Official Cert Guide 10/100/1000 10/100/1000 ..... 10/100/1000 10/100/1000 2 Distribution Switches 40 Access Switches Distribution Layer Access Layer 2 x 10 GbE GigE GigE Uplinks A40 D1 A2 A39 D1 A1 R1 R2 To WAN Figure 10-10 Campus LAN with Design Terminology Listed Cisco uses three terms to describe the role of each switch in a campus design: access dis- tribution and core. The roles differ based on whether the switch forwards traffic from user devices and the rest of the LAN access or whether the switch forwards traffic between other LAN switches distribution and core. Access switches connect directly to end users providing user device access to the LAN. Access switches normally send traffic to and from the end-user devices to which they are connected and sit at the edge of the LAN. Distribution switches provide a path through which the access switches can forward traffic to each other. By design each of the access switches connects to at least one distribution switch typically to two distribution switches for redundancy. The distribution switches provide the service of forwarding traffic to other parts of the LAN. Note that most designs use at least two uplinks to two different distribution switches as shown in Figure 10-10 for redundancy. The figure shows a two-tier design with the tiers being the access tier or layer and the dis- tribution tier or layer. A two-tier design solves two major design needs: ■ Provides a place to connect end-user devices the access layer with access switches ■ Connects the switches with a reasonable number of cables and switch ports by connect- ing all 40 access switches to two distribution switches Topology Terminology Seen Within a Two-Tier Design The exam topics happen to list a couple of terms about LAN and WAN topology and design so this is a good place to pause to discuss those terms for a moment.

slide 283:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 229 10 First consider these more formal definitions of four topology terms: Star: A design in which one central device connects to several others so that if you drew the links out in all directions the design would look like a star with light shining in all directions. Full mesh: For any set of network nodes a design that connects a link between each pair of nodes. Partial mesh: For any set of network nodes a design that connects a link between some pairs of nodes but not all. In other words a mesh that is not a full mesh. Hybrid: A design that combines topology design concepts into a larger typically more complex design. Armed with those formal definitions note that the two-tier design is indeed a hybrid design that uses both a star topology at the access layer and a partial mesh at the distribution layer. To see why consider Figure 10-11. It redraws a typical access layer switch but instead of putting the PCs all below the switch it spreads them around the switch. Then on the right a similar version of the same drawing shows why the term star might be used—the topology looks a little like a child’s drawing of a star. Figure 10-11 The Star Topology Design Concept in Networking The distribution layer creates a partial mesh. If you view the access and distribution switch- es as nodes in a design some nodes have a link between them and some do not. Just refer to Figure 10-10 and note that by design none of the access layer switches connect to each other. Finally a design could use a full mesh. However for a variety of reasons beyond the scope of the design discussion here a campus design typically does not need to use the number of links and ports required by a full mesh design. However just to make the point first con- sider how many links and switch ports would be required for a single link between nodes in a full mesh with six nodes as shown in Figure 10-12.

slide 284:

ptg17246291 230 CCENT/CCNA ICND1 100-105 Official Cert Guide D1 D2 D6 D3 D5 D4 Figure 10-12 Using a Full Mesh at the Distribution Layer 6 Switches 15 Links Even with only six switches a full mesh would consume 15 links and 30 switch ports—two per link. Now think about a full mesh at the distribution layer for a design like Figure 10-10 with 40 access switches and two distribution switches. Rather than drawing it and counting it the number of links is calculated with this old math formula from high school: NN – 1 / 2 or in this case 42 41 / 2 861 links and 1722 switch ports consumed among all switches. For comparison’s sake the partial mesh design of Figure 10-10 with a pair of links from each access switch to each distribution switch requires only 160 links and a total of 320 ports among all switches. Three-Tier Campus Design Core The two-tier design of Figure 10-10 with a partial mesh of links at the distribution layer happens to be the most common campus LAN design. It also goes by two common names: a two-tier design for obvious reasons and a collapsed core for less obvious reasons. The term collapsed core refers to the fact that the two-tier design does not have a third tier the core tier. This next topic examines a three-tier design that does have a core for perspective. Imagine your campus has just two or three buildings. Each building has a two-tier design inside the building with a pair of distribution switches in each building and access switches spread around the building as needed. How would you connect the LANs in each build- ing Well with just a few buildings it makes sense to simply cable the distribution switches together as shown in Figure 10-13.

slide 285:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 231 10 A11 A12 A13 A14 D11 D12 D21 D22 A21 A22 A23 A24 D31 D32 A31 A32 A33 A34 Building 1 Building 2 Building 3 Figure 10-13 Two-Tier Building Design No Core Three Buildings The design in Figure 10-13 works well and many companies use this design. Sometimes the center of the network uses a full mesh sometimes a partial mesh depending on the avail- ability of cables between the buildings. However a design with a third tier a core tier saves on switch ports and on cables in larger designs. And note that with the links between buildings the cables run outside are often more expensive to install are almost always fiber cabling with more expensive switch ports so conserving the number of cables used between buildings can help reduce costs. A three-tier core design unsurprisingly at this point adds a few more switches core switch- es which provide one function: to connect the distribution switches. Figure 10-14 shows the migration of the Figure 10-13 collapsed core that is a design without a core to a three- tier core design.

slide 286:

ptg17246291 232 CCENT/CCNA ICND1 100-105 Official Cert Guide A11 A12 A13 A14 A21 A22 A23 A24 A31 A32 A33 A34 Building 1 Building 2 Building 3 D11 D12 D21 Core1 D22 Core2 D31 D32 Figure 10-14 Three-Tier Building Design Core Design Three Buildings NOTE The core switches sit in the middle of the figure. In the physical world they often sit in the same room as one of the distribution switches rather than in some purpose-built room in the middle of the office park. The figure focuses more on the topology rather than the physical location. By using a core design with a partial mesh of links in the core you still provide connectivity to all parts of the LAN and to the routers that send packets over the WAN just with fewer links between buildings. The following list summarizes the terms that describe the roles of campus switches: ■ Access: Provides a connection point access for end-user devices. Does not forward frames between two other access switches under normal circumstances. ■ Distribution: Provides an aggregation point for access switches providing connectivity to the rest of the devices in the LAN forwarding frames between switches but not con- necting directly to end-user devices. ■ Core: Aggregates distribution switches in very large campus LANs providing very high forwarding rates for the larger volume of traffic due to the size of the network. Topology Design Terminology The ICND1 and CCNA exam topics specifically mention several network design terms related to topology. This next topic summarizes those key terms to connect the terms to the matching ideas.

slide 287:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 233 10 First consider Figure 10-15 which shows a few of the terms. First on the left drawings often show access switches with a series of cables parallel to each other. However an access switch and its access links is often called a star topology. Why Look at the redrawn access switch in the center of the figure with the cables radiating out from the center. It does not look like a real star but it looks a little like a child’s drawing of a star hence the term star topology. Access Switch Access Switch: Star A1 A2 D1 D2 Uplinks: Partial Mesh SW1 SW1 Figure 10-15 LAN Design Terminology The right side of the figure repeats a typical two-tier design focusing on the mesh of links between the access and distribution switches. Any group of nodes that connect with more links than a star topology is typically called a mesh. In this case the mesh is a partial mesh because not all nodes have a direct link between each other. A design that connects all nodes with a link would be a full mesh. Real networks make use of these topology ideas but often a network combines the ideas together. For instance the right side of Figure 10-14 combines the star topology of the access layer with the partial mesh of the distribution layer. So you might hear these designs that combine concepts called a hybrid design. Analyzing LAN Physical Standard Choices When you look at the design of a network designed by someone else you can look at all the different types of cabling used the different types of switch ports and the Ethernet standards used in each case. Then ask yourself: Why did they choose a particular type of Ethernet link for each link in the network Asking that question and investigating the answer starts to reveal much about building the physical campus LAN. The IEEE has done an amazing job developing Ethernet standards that give network design- ers many options. Two themes in particular have helped Ethernet grow over the long term: ■ The IEEE has developed many additional 802.3 standards for different types of cabling different cable lengths and for faster speeds. ■ All the physical standards rely on the same consistent data-link details with the same standard frame formats. That means that one Ethernet LAN can use many types of physi- cal links to meet distance budget and cabling needs. For example think about the access layer of the generic design drawings but now think about cabling and Ethernet standards. In practice access layer switches sit in a locked wiring closet somewhere on the same floor as the end user devices. Electricians have installed unshielded twisted-pair UTP cabling used at the access layer running from that wiring closet to each wall plate at each office cubicle or any place where an Ethernet device might need to connect to the LAN. The type and quality of the cabling installed

slide 288:

ptg17246291 234 CCENT/CCNA ICND1 100-105 Official Cert Guide between the wiring closet and each Ethernet outlet dictate what Ethernet standards can be supported. Certainly whoever designed the LAN at the time the cabling was installed thought about what type of cabling was needed to support the types of Ethernet physical standards that were going to be used in that LAN. Ethernet Standards Over time the IEEE has continued to develop and release new Ethernet standards for new faster speeds and to support new and different cabling types and cable lengths. Figure 10-16 shows some insight into Ethernet speed improvements over the years. The early standards up through the early 1990s ran at 10 Mbps with steadily improving cabling and topologies. Then with the introduction of Fast Ethernet 100 Mbps in 1995 the IEEE began ramping up the speeds steadily over the next few decades continuing even until today. 2010 100 Gig E 100G 40 Gig E 40G 2005 10 Gig E 10G 2000 Gigabit Ethernet 1G 1995 Fast Ethernet 100M 1990 Ethernet 10Base-T 10M 1985 Thinnet IEEE 10M 1980 Thicknet DIX 10M Figure 10-16 Ethernet Standards Timeline NOTE Often the IEEE first introduces support for the next higher speed using some forms of fiber optic cabling and later sometimes many years later the IEEE completes the work to develop standards to support the same speed on UTP cabling. Figure 10-16 shows the earliest standards for each speed no matter what cabling. When the IEEE introduces support for a new type of cabling or a faster speed they create a new standard as part of 802.3. These new standards have a few letters behind the name. So when speaking of the standards sometimes you might refer to the standard name with letters. For instance the IEEE standardized Gigabit Ethernet support using inexpensive UTP cabling in standard 802.3ab. However more often engineers refer to that same stan- dard as 1000BASE-T or simply Gigabit Ethernet. Table 10-2 lists some of the IEEE 802.3 physical layer standards and related names for perspective. Table 10-2 IEEE Physical Layer Standards Original IEEE Standard Shorthand Name Informal Names Speed Typical Cabling 802.3i 10BASE-T Ethernet 10 Mbps UTP 802.3u 100BASE-T Fast Ethernet 100 Mbps UTP 802.3z 1000BASE-X Gigabit Ethernet GigE 1000 Mbps 1 Gbps Fiber 802.3ab 1000BASE-T Gigabit Ethernet GigE 1000 Mbps 1 Gbps UTP 802.3ae 10GBASE-X 10 GigE 10 Gbps Fiber 802.3an 10GBASE-T 10 GigE 10 Gbps UTP 802.3ba 40GBASE-X 40 GigE 40 Gbps Fiber 802 .3ba 100GBASE- X 100 GigE 100 Gb p s F ibe r

slide 289:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 235 10 Choosing the Right Ethernet Standard for Each Link When designing an Ethernet LAN you can and should think about the topology with an access layer a distribution layer and possibly a core layer. But thinking about the topology does not tell you which specific standards to follow for each link. Ultimately you need to pick which Ethernet standard to use for each link based on the following kinds of facts about each physical standard: ■ The speed ■ The maximum distance allowed between devices when using that standard/cabling ■ The cost of the cabling and switch hardware ■ The availability of that type of cabling already installed at your facilities Consider the three most common types of Ethernet today 10BASE-T 100BASE-T and 1000BASE-T. They all have the same 100-meter UTP cable length restriction. They all use UTP cabling. However not all UTP cabling meets the same quality standard and as it turns out the faster the Ethernet standard the higher the required cable quality category needed to support that standard. As a result some buildings might have better cabling that supports speeds up through Gigabit Ethernet whereas some buildings may support only Fast Ethernet. The Telecommunications Industry Association TIA tiaonline.org defines Ethernet cabling quality standards. Each Ethernet UTP standard lists a TIA cabling quality called a category as the minimum category that the standard supports. For example 10BASE-T allows for Category 3 CAT3 cabling or better. 100BASE-T requires higher-quality CAT5 cabling and 1000BASE-T requires even higher-quality CAT5e cabling. The TIA standards follow a gen- eral “higher number is better cabling” in their numbering. For instance if an older facility had only CAT5 cabling installed between the wiring closets and each cubicle the engineers would have to consider upgrading the cabling to fully support Gigabit Ethernet. Table 10-3 lists the more common types of Ethernet and their cable types and length limitations. Table 10-3 Ethernet Types Media and Segment Lengths Per IEEE Ethernet Type Media Maximum Segment Length 10BASE-T TIA CAT3 or better 2 pairs 100 m 328 feet 100BASE-T TIA CAT5 UTP or better 2 pairs 100 m 328 feet 1000BASE-T TIA CAT5e UTP or better 4 pairs 100 m 328 feet 10GBASE-T TIA CAT6a UTP or better 4 pairs 100 m 328 feet 10GBASE-T 1 TIA CAT6 UTP or better 4 pairs 38–55 m 127–180 feet 1000BASE-SX Multimode fiber 550 m 1800 feet 1000BASE-LX Multimode fiber 550 m 1800 feet 1000BASE-LX 9-micron single -mode fiber 5 km 3.1 miles 1 The option for 10GBASE-T with slightly less quality CAT6 cabling but at shorter distances is an attempt to support 10Gig Ethernet for some installations with CAT6 installed cabling. Ethernet defines standards for using fiber optic cables as well. Fiber optic cables include ultrathin strands of glass through which light can pass. To send bits the switches can alter- nate between sending brighter and dimmer light to encode 0s and 1s on the cable.

slide 290:

ptg17246291 236 CCENT/CCNA ICND1 100-105 Official Cert Guide Generally comparing optical cabling versus UTP cabling Ethernet standards two obvious points stand out. Optical standards allow much longer cabling while generally costing more for the cable and the switch hardware components. Optical cables experience much less inter- ference from outside sources compared to copper cables which allows for longer distances. When considering optical Ethernet links many standards exist but with two general catego- ries. Comparing the two the cheaper options generally support distances into the hundreds of meters using less expensive light-emitting diodes LED to transmit data. Other optical standards support much longer distances into multiple kilometers using more expensive cabling and using lasers to transmit the data. The trade-off is basic: For a given link how long does the cable need to run what standards support that distance and which is the least expensive to meet that need In reality most engineers remember only the general facts from tables like Table 10-3: 100 meters for UTP about 500 meters for multimode fiber and about 5000 meters for some single mode fiber Ethernet standards. When it is time to get serious about designing the details of each link the engineer must get into the details calculating the length of each cable based on its path through the building and so on. Wireless LANs Combined with Wired Ethernet Modern campus LANs include a large variety of wireless devices that connect to the access layer of the LAN. As it turns out Cisco organizes wireless LANs into a separate certification track—CCNA CCNP and CCIE Wireless—so the CCNA RS track has traditionally had only a little wireless LAN coverage. The current version of the exams are no different with this one exam CCNA RS topic mentioning wireless LANs: Describe the impact of infrastructure components in an enterprise network: Access points and wireless controllers Do not let that small mention of wireless technology make you think that wireless is less important than Ethernet. In fact there may be more wireless devices than wired at the access layer of today’s enterprise networks. Both are important Cisco just happens to keep the educational material for wireless in a separate certification track. This last topic in the chapter examines that one exam topic that mentions two wireless terms. Home Office Wireless LANs First the IEEE defines both Ethernet LANs and Wireless LANs. In case it was not obvi- ous yet all Ethernet standards use cables—that is Ethernet defines wired LANs. The IEEE 802.11 working group defines Wireless LANs also called Wi-Fi per a trademarked term from the Wi-Fi Alliance wi-fi.org a consortium that helps to encourage wireless LAN development in the marketplace. Most of you have used Wi-Fi and may use it daily. Some of you may have set it up at home with a basic setup as shown in Figure 10-17 . In a home you probably used a single consumer device called a wireless router. One side of the device connects to the Internet while the other side connects to the devices in the home. In the home the devices can connect either with Wi-Fi or with a wired Ethernet cable.

slide 291:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 237 10 UTP CATV Cable SOHO R1 ISP/Internet Figure 10-17 A Typical Home Wired and Wireless LAN While the figure shows the hardware as a single router icon internally that one wireless router acts like three separate devices you would find in an enterprise campus: ■ An Ethernet switch for the wired Ethernet connections ■ A wireless access point AP to communicate with the wireless devices and forward the frames to/from the wired network ■ A router to route IP packets to/from the LAN and WAN Internet interfaces Figure 10-18 repeats the previous figure breaking out the internal components as if they were separate physical devices just to make the point that a single consumer wireless router acts like several different devices. CATV Cable Cable Modem UTP UTP UTP SOHO R1 ISP/Internet Figure 10-18 A Representation of the Functions Inside a Consumer Wireless Routing Product In a small office/home office SOHO wireless LAN the wireless AP acts autonomously doing all the work required to create and control the wireless LAN WLAN. In most enter- prise WLANs the AP does not act autonomously. In other words the autonomous AP communicates with the various wireless devices using 802.11 protocols and radio waves. It uses Ethernet protocols on the wired side. It converts between the differences in header formats between 802.11 and 802.3 frames before forwarding to/from 802.3 Ethernet and 802.11 wireless frames. Beyond those basic forwarding actions the autonomous AP must perform a variety of con- trol and management functions. The AP authenticates new devices defines the name of the WLAN called a service set ID or SSID and other details.

slide 292:

ptg17246291 238 CCENT/CCNA ICND1 100-105 Official Cert Guide Enterprise Wireless LANs and Wireless LAN Controllers If you connect to your WLAN at home from your tablet phone or laptop and then walk down the street with that same device you expect to lose your Wi-Fi connection at some point. You do not expect to somehow automatically connect to a neighbor’s Wi-Fi net- work particularly if they did the right thing and set up security functions on their AP to prevent others from accessing their home Wi-Fi network. The neighborhood does not cre- ate one WLAN supported by the devices in all the houses and apartments instead it has lots of little autonomous WLANs. However in an enterprise the opposite needs to happen. We want people to be able to roam around the building and office campus and keep connected to the Wi-Fi network. This requires many APs which work together rather than autonomously to create one wire- less LAN. First think about the number of APs an enterprise might need. Each AP can cover only a certain amount of space depending on a large number of conditions and the wireless stan- dard. The size varies but the distances sit in the 100 to 200 feet range. At the same time you might have the opposite problem you may just need lots of APs in a small space just to add capacity to the WLAN. Much of the time spent designing WLANs revolves around deciding how many APs to place in each space and of what types to handle the traffic. NOTE If you have not paid attention before start looking around the ceilings of any new buildings you enter even retail stores and look for their wireless APs. Each AP must then connect to the wired LAN because most of the destinations that wire- less users need to communicate with sit in the wired part of the network. In fact the APs typically sit close to where users sit for obvious reasons so the APs connect to the same access switches as the end users as shown in Figure 10-19. A1 A2 A3 A4 D1 D2 1 2 Figure 10-19 Campus LAN Multiple Lightweight APs with Roaming

slide 293:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 239 10 Now imagine that is you at the bottom of the figure. Y our smartphone has Wi-Fi enabled so that when you walk into work your phone automatically connects to the company WLAN. Y ou roam around all day going to meetings lunch and so on. All day long you stay connect- ed to the company WLAN but your phone connects to and uses many different APs. Supporting roaming and other enterprise WLAN features by using autonomous APs can be difficult at best. You could imagine that if you had a dozen APs per floor you might have hundreds of APs in a campus—all of which need to know about that one WLAN. The solution: remove all the control and management features from the APs and put them in one centralized place called a Wireless Controller or Wireless LAN Controller WLC. The APs no longer act autonomously but instead act as lightweight APs LWAPs just for- warding data between the wireless LAN and the WLC. All the logic to deal with roaming defining WLANs SSIDs authentication and so on happens in the centralized WLC rather than on each AP. Summarizing: Wireless LAN controller: Controls and manages all AP functions for example roaming defining WLANs authentication Lightweight AP LWAP: Forwards data between the wired and wireless LAN and specifically forwarding data through the WLC using a protocol like Control And Provisioning of Wireless Access Points CAPWAP With the WLC and LWAP design the combined LWAPs and WLC can create one big wireless network rather than creating a multitude of disjointed wireless networks. The key to making it all work is that all wireless traffic flows through the WLC as shown in Figure 10-20. The LWAPs commonly use a protocol called CAPWAP by the way. 1 2 A1 A2 A3 A4 D1 D2 WLC Figure 10-20 Campus LAN Multiple Lightweight APs with Roaming By forwarding all the traffic through the WLC the WLC can make the right decisions across the enterprise. For example you might create a marketing WLAN an engineer- ing WLAN and so on and all the APs know about and support those multiple different WLANs. Users that connect to the engineering WLAN should use the same authentication rules regardless of which AP they use—and the WLC makes that possible. Or consider

slide 294:

ptg17246291 240 CCENT/CCNA ICND1 100-105 Official Cert Guide roaming for a moment. If at one instant a packet arrives for your phone and you are associ- ated with AP1 and when the next packet arrives over the wired network you are now con- nected to AP4 how could that packet be delivered through the network Well it always goes to the WLC and because the WLC keeps in contact with the APs and knows that your phone just roamed to another AP the WLC knows where to forward the packet. Chapter Review The “Your Study Plan” element just before Chapter 1 “Introduction to TCP/IP Networking” discusses how you should study and practice the content and skills for each chapter before moving on to the next chapter. That element introduces the tools used here at the end of each chapter. If you haven’t already done so take a few minutes to read that section. Then come back here and do the useful work of reviewing the chapter to help lock into memory what you just read. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Table 10-4 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 10-4 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book app Review key terms Book app Answer DIKTA questions Book PCPT Review memory tables Book app Review All the Key Topics Table 10-5 Key T opics for Chapter 10 Key Topic Element Description Page Number Figure 10-1 Effect of LAN hub repeating electrical signals 221 List Key points about hubs 221 Figure 10-4 Switches create separate collision domains 223 List Summary of points about collision domains 223 Figure 10-5 Collision domains example 224 Figure 10-7 Broadcast domain example 225 List Summary of points about broadcast domains 227 Figure 10-10 Campus LAN design terms 228 List Mesh topology terms 229 Figure 10-11 Star topology 229 Figure 10-13 A two-tier collapsed core LAN topology 231

slide 295:

ptg17246291 Chapter 10: Analyzing Ethernet LAN Designs 241 10 Key Topic Element Description Page Number Figure 10-14 A three-tier core LAN topology 232 List Two key comparisons about Ethernet technology 233 Figure 10-20 The wireless LAN controller and lightweight access point terms in the context of a network diagram 239 Key Terms You Should Know autonegotiation broadcast domain broadcast frame collision domain flooding virtual LAN access point wireless LAN controller star topology full mesh partial mesh hub transparent bridge collapsed core design core design access layer distribution layer core layer

slide 296:

ptg17246291 CHAPTER 11 Implementing Ethernet Virtual LANs This chapter covers the following exam topics: 2.0 LAN Switching Technologies 2.1 Describe and verify switching concepts 2.1.a MAC learning and aging 2.1.b Frame switching 2.1.c Frame flooding 2.1.d MAC address table 2.4 Configure verify and troubleshoot VLANs normal range spanning multiple switches 2.4.a Access ports data and voice 2.4.b Default VLAN 2.5 Configure verify and troubleshoot inter-switch connectivity 2.5.a Trunk ports 2.5.b 802.1Q 2.5.c Native VLAN At their heart Ethernet switches receive Ethernet frames make decisions and then forward switch those Ethernet frames. That core logic revolves around MAC addresses the inter- face in which the frame arrives and the interfaces out which the switch forwards the frame. Several switch features have some impact on an individual switch’s decisions about where to forward frames but of all the topics in this book virtual LANs VLAN easily have the big- gest impact on those choices. This chapter examines the concepts and configuration of VLANs. The first major section of the chapter explains the core concepts. These concepts include how VLANs work on a sin- gle switch how to use VLAN trunking to create VLANs that span across multiple switches and how to forward traffic between VLANs using a router. The second major section shows how to configure VLANs and VLAN trunks: how to statically assign interfaces to a VLAN. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software.

slide 297:

ptg17246291 Table 11-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Virtual LAN Concepts 1–3 VLAN and VLAN Trunking Configuration and Verification 4–6 1. In a LAN which of the following terms best equates to the term VLAN a. Collision domain b. Broadcast domain c. Subnet d. Single switch e. Trunk 2. Imagine a switch with three configured VLANs. How many IP subnets are required assuming that all hosts in all VLANs want to use TCP/IP a. 0 b. 1 c. 2 d. 3 e. You cannot tell from the information provided. 3. Switch SW1 sends a frame to switch SW2 using 802.1Q trunking. Which of the answers describes how SW1 changes or adds to the Ethernet frame before forwarding the frame to SW2 a. Inserts a 4-byte header and does change the MAC addresses b. Inserts a 4-byte header and does not change the MAC addresses c. Encapsulates the original frame behind an entirely new Ethernet header d. None of the other answers are correct 4. Imagine that you are told that switch 1 is configured with the dynamic auto param- eter for trunking on its Fa0/5 interface which is connected to switch 2. You have to configure switch 2. Which of the following settings for trunking could allow trunking to work Choose two answers. a. on b. dynamic auto c. dynamic desirable d. access e. None of the other answers are correct.

slide 298:

ptg17246291 244 CCENT/CCNA ICND1 100-105 Official Cert Guide 5. A switch has just arrived from Cisco. The switch has never been configured with any VLANs but VTP has been disabled. An engineer gets into configuration mode and issues the vlan 22 command followed by the name Hannahs-VLAN command. Which of the following are true Choose two answers. a. VLAN 22 is listed in the output of the show vlan brief command. b. VLAN 22 is listed in the output of the show running-config command. c. VLAN 22 is not created by this process. d. VLAN 22 does not exist in that switch until at least one interface is assigned to that VLAN. 6. Which of the following commands identify switch interfaces as being trunking inter- faces: interfaces that currently operate as VLAN trunks Choose two answers. a. show interfaces b. show interfaces switchport c. show interfaces trunk d. show trunks Foundation Topics Virtual LAN Concepts Before understanding VLANs you must first have a specific understanding of the definition of a LAN. For example from one perspective a LAN includes all the user devices servers switches routers cables and wireless access points in one location. However an alternative narrower definition of a LAN can help in understanding the concept of a virtual LAN: A LAN includes all devices in the same broadcast domain. A broadcast domain includes the set of all LAN-connected devices so that when any of the devices sends a broadcast frame all the other devices get a copy of the frame. So from one perspective you can think of a LAN and a broadcast domain as being basically the same thing. Without VLANs a switch considers all its interfaces to be in the same broadcast domain. That is for one switch when a broadcast frame entered one switch port the switch for- warded that broadcast frame out all other ports. With that logic to create two different LAN broadcast domains you had to buy two different Ethernet LAN switches as shown in Figure 11-1. Dino Fred Wilma Betty SW1 SW2 Subnet 2 Subnet 1 Broadcast Domain 2 Broadcast Domain 1 Figure 11-1 Creating Two Broadcast Domains with Two Physical Switches and No VLANs

slide 299:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 245 11 With support for VLANs a single switch can accomplish the same goals of the design in Figure 11-1—to create two broadcast domains—with a single switch. With VLANs a switch can configure some interfaces into one broadcast domain and some into another creating multiple broadcast domains. These individual broadcast domains created by the switch are called virtual LANs VLAN. For example in Figure 11-2 the single switch creates two VLANs treating the ports in each VLAN as being completely separate. The switch would never forward a frame sent by Dino in VLAN 1 over to either Wilma or Betty in VLAN 2. Fred Dino Betty Wilma Broadcast Domain 2 VLAN 2 Broadcast Domain 1 VLAN 1 SW1 Subnet 2 Subnet 1 Figure 11-2 Creating Two Broadcast Domains Using One Switch and VLANs Designing campus LANs to use more VLANs each with a smaller number of devices often helps improve the LAN in many ways. For example a broadcast sent by one host in a VLAN will be received and processed by all the other hosts in the VLAN—but not by hosts in a different VLAN. Limiting the number of hosts that receive a single broadcast frame reduces the number of hosts that waste effort processing unneeded broadcasts. It also reduces security risks because fewer hosts see frames sent by any one host. These are just a few reasons for separating hosts into different VLANs. The following list summarizes the most common reasons for choosing to create smaller broadcast domains VLANs: ■ To reduce CPU overhead on each device by reducing the number of devices that receive each broadcast frame ■ To reduce security risks by reducing the number of hosts that receive copies of frames that the switches flood broadcasts multicasts and unknown unicasts ■ To improve security for hosts that send sensitive data by keeping those hosts on a sepa- rate VLAN ■ To create more flexible designs that group users by department or by groups that work together instead of by physical location ■ To solve problems more quickly because the failure domain for many problems is the same set of devices as those in the same broadcast domain ■ To reduce the workload for the Spanning Tree Protocol STP by limiting a VLAN to a single access switch This chapter does not examine all the reasons for VLANs in more depth. However know that most enterprise networks use VLANs quite a bit. The rest of this chapter looks closely Answers to the “Do I Know This Already” quiz: 1 B 2 D 3 B 4 A C 5 A B 6 B C

slide 300:

ptg17246291 246 CCENT/CCNA ICND1 100-105 Official Cert Guide at the mechanics of how VLANs work across multiple Cisco switches including the required configuration. To that end the next section examines VLAN trunking a feature required when installing a VLAN that exists on more than one LAN switch. Creating Multiswitch VLANs Using Trunking Configuring VLANs on a single switch requires only a little effort: Y ou simply configure each port to tell it the VLAN number to which the port belongs. With multiple switches you have to consider additional concepts about how to forward traffic between the switches. When using VLANs in networks that have multiple interconnected switches the switches need to use VLAN trunking on the links between the switches. VLAN trunking causes the switches to use a process called VLAN tagging by which the sending switch adds another header to the frame before sending it over the trunk. This extra trunking header i n c l u d e s a VLAN identifier VLAN ID field so that the sending switch can associate the frame with a particular VLAN ID and the receiving switch can then know in what VLAN each frame belongs. Figure 11-3 shows an example that demonstrates VLANs that exist on multiple switches but it does not use trunking. First the design uses two VLANs: VLAN 10 and VLAN 20. Each switch has two ports assigned to each VLAN so each VLAN exists in both switches. To forward traffic in VLAN 10 between the two switches the design includes a link between switches with that link fully inside VLAN 10. Likewise to support VLAN 20 traf- fic between switches the design uses a second link between switches with that link inside VLAN 20. VLAN 20 VLAN 10 Link is in VLAN 10 Link is in VLAN 20 SW1 11 12 21 22 SW2 13 14 23 24 Figure 11-3 Multiswitch VLAN Without VLAN Trunking The design in Figure 11-3 functions perfectly. For example PC11 in VLAN 10 can send a frame to PC14. The frame flows into SW1 over the top link the one that is in VLAN 10 and over to SW2. The design shown in Figure 11-3 works but it simply does not scale very well. It requires one physical link between switches to support every VLAN. If a design needed 10 or 20 VLANs you would need 10 or 20 links between switches and you would use 10 or 20 switch ports on each switch for those links. VLAN Tagging Concepts VLAN trunking creates one link between switches that supports as many VLANs as you need. As a VLAN trunk the switches treat the link as if it were a part of all the VLANs. At

slide 301:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 247 11 the same time the trunk keeps the VLAN traffic separate so frames in VLAN 10 would not go to devices in VLAN 20 and vice versa because each frame is identified by VLAN num- ber as it crosses the trunk. Figure 11-4 shows the idea with a single physical link between the two switches. VLAN 20 VLAN 10 SW1 SW2 20 10 20 10 20 Figure 11-4 Multiswitch VLAN with Trunking The use of trunking allows switches to pass frames from multiple VLANs over a single phys- ical connection by adding a small header to the Ethernet frame. For example Figure 11-5 shows PC11 sending a broadcast frame on interface Fa0/1 at Step 1. To flood the frame switch SW1 needs to forward the broadcast frame to switch SW2. However SW1 needs to let SW2 know that the frame is part of VLAN 10 so that after the frame is received SW2 will flood the frame only into VLAN 10 and not into VLAN 20. So as shown at Step 2 before sending the frame SW1 adds a VLAN header to the original Ethernet frame with the VLAN header listing a VLAN ID of 10 in this case. 20 10 20 10 20 VLAN 10 VLAN 20 13 0/1 0/2 G0/2 G0/1 0/3 0/4 14 23 24 VLAN 10 VLAN 20 11 0/1 0/3 0/4 21 22 3 3 Ethernet 1 Ethernet 2 VLAN 10 Ethernet SW1 SW2 Figure 11-5 VLAN Trunking Between Two Switches When SW2 receives the frame it understands that the frame is in VLAN 10. SW2 then removes the VLAN header forwarding the original frame out its interfaces in VLAN 10 Step 3.

slide 302:

ptg17246291 248 CCENT/CCNA ICND1 100-105 Official Cert Guide For another example consider the case when PC21 in VLAN 20 sends a broadcast. SW1 sends the broadcast out port Fa0/4 because that port is in VLAN 20 and out Gi0/1 because it is a trunk meaning that it supports multiple different VLANs. SW1 adds a trunking header to the frame listing a VLAN ID of 20. SW2 strips off the trunking header after determining that the frame is part of VLAN 20 so SW2 knows to forward the frame out only ports Fa0/3 and Fa0/4 because they are in VLAN 20 and not out ports Fa0/1 and Fa0/2 because they are in VLAN 10. The 802.1Q and ISL VLAN Trunking Protocols Cisco has supported two different trunking protocols over the years: Inter-Switch Link ISL and IEEE 802.1Q. Cisco created the ISL long before 802.1Q in part because the IEEE had not yet defined a VLAN trunking standard. Y ears later the IEEE completed work on the 802.1Q standard which defines a different way to do trunking. Today 802.1Q has become the more popular trunking protocol with Cisco not even supporting ISL in some of its newer models of LAN switches including the 2960 switches used in the examples in this book. While both ISL and 802.1Q tag each frame with the VLAN ID the details differ. 802.1Q inserts an extra 4-byte 802.1Q VLAN header into the original frame’s Ethernet header as shown at the top of Figure 11-6. As for the fields in the 802.1Q header only the 12-bit VLAN ID field inside the 802.1Q header matters for topics discussed in this book. This 12-bit field supports a theoretical maximum of 2 12 4096 VLANs but in practice it sup- ports a maximum of 4094. Both 802.1Q and ISL use 12 bits to tag the VLAN ID with two reserved values 0 and 4095. 802.1Q Dest. Address Source Address Type Data FCS Tag Type Priority Flag VLAN ID 12 Bits Figure 11-6 802.1Q Trunking Cisco switches break the range of VLAN IDs 1–4094 into two ranges: the normal range and the extended range. All switches can use normal-range VLANs with values from 1 to 1005. Only some switches can use extended-range VLANs with VLAN IDs from 1006 to 4094. The rules for which switches can use extended-range VLANs depend on the con- figuration of the VLAN Trunking Protocol VTP which is discussed briefly in the section “VLAN Trunking Configuration” later in this chapter. 802.1Q also defines one special VLAN ID on each trunk as the native VLAN defaulting to use VLAN 1. By definition 802.1Q simply does not add an 802.1Q header to frames in the native VLAN. When the switch on the other side of the trunk receives a frame that does not have an 802.1Q header the receiving switch knows that the frame is part of the native VLAN. Note that because of this behavior both switches must agree on which VLAN is the native VLAN. The 802.1Q native VLAN provides some interesting functions mainly to support connec- tions to devices that do not understand trunking. For example a Cisco switch could be

slide 303:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 249 11 cabled to a switch that does not understand 802.1Q trunking. The Cisco switch could send frames in the native VLAN—meaning that the frame has no trunking header—so that the other switch would understand the frame. The native VLAN concept gives switches the capability of at least passing traffic in one VLAN the native VLAN which can allow some basic functions like reachability to telnet into a switch. Forwarding Data Between VLANs If you create a campus LAN that contains many VLANs you typically still need all devices to be able to send data to all other devices. This next topic discusses some concepts about how to route data between those VLANs. First it helps to know a few terms about some categories of LAN switches. All the Ethernet switch functions described in this book so far use the details and logic defined by OSI Layer 2 protocols. For example Chapter 7 “Analyzing Ethernet LAN Switching” discussed how LAN switches receive Ethernet frames a Layer 2 concept look at the destination Ethernet MAC address a Layer 2 address and forward the Ethernet frame out some other interface. This chapter has already discussed the concept of VLANs as broadcast domains which is yet another Layer 2 concept. While some LAN switches work just as described so far in this book some LAN switches have even more functions. LAN switches that forward data based on Layer 2 logic as dis- cussed so far in this book often go by the name Layer 2 switch. However some other switches can do some functions like a router using additional logic defined by Layer 3 pro- tocols. These switches go by the name multilayer switch or Layer 3 switch. This section first discusses how to forward data between VLANs when using Layer 2 switches and ends with a brief discussion of how to use Layer 3 switches. Routing Packets Between VLANs with a Router When including VLANs in a campus LAN design the devices in a VLAN need to be in the same subnet. Following the same design logic devices in different VLANs need to be in dif- ferent subnets. For example in Figure 11-7 the two PCs on the left sit in VLAN 10 in sub- net 10. The two PCs on the right sit in a different VLAN 20 with a different subnet 20. Wilma Betty Dino VLAN 20 Subnet 20 VLAN 10 Subnet 10 Fred Figure 11-7 Layer 2 Switch Does Not Route Between the VLANs NOTE The figure refers to subnets somewhat generally like “subnet 10” just so the sub- net numbers do not distract. Also note that the subnet numbers do not have to be the same number as the VLAN numbers. Figure 11-7 shows the switch as if it were two switches broken in two to emphasize the point that Layer 2 switches will not forward data between two VLANs. When configured with some ports in VLAN 10 and others in VLAN 20 the switch acts like two separate switches in which it will forward traffic. In fact one goal of VLANs is to separate traffic in one VLAN from another preventing frames in one VLAN from leaking over to other

slide 304:

ptg17246291 250 CCENT/CCNA ICND1 100-105 Official Cert Guide VLANs. For example when Dino in VLAN 10 sends any Ethernet frame if SW1 is a Layer 2 switch that switch will not forward the frame to the PCs on the right in VLAN 20. The network as a whole needs to support traffic flowing into and out of each VLAN even though the Layer 2 switch does not forward frames outside a VLAN. The job of forwarding data into and out of a VLAN falls to routers. Instead of switching Layer 2 Ethernet frames between the two VLANs the network must route Layer 3 packets between the two subnets. That previous paragraph has some very specific wording related to Layers 2 and 3 so take a moment to reread and reconsider it for a moment. The Layer 2 logic does not let the Layer 2 switch forward the Layer 2 protocol data unit L2PDU the Ethernet frame between VLANs. However routers can route Layer 3 PDUs L3PDU packets between subnets as their normal job in life. For example Figure 11-8 shows a router that can route packets between subnets 10 and 20. The figure shows the same Layer 2 switch as shown in Figure 11-7 with the same perspec- tive of the switch being split into parts with two different VLANs and with the same PCs in the same VLANs and subnets. Now Router R1 has one LAN physical interface connected to the switch and assigned to VLAN 10 and a second physical interface connected to the switch and assigned to VLAN 20. With an interface connected to each subnet the Layer 2 switch can keep doing its job—forwarding frames inside a VLAN while the router can do its job—routing IP packets between the subnets. Wilma Betty Dino F0/0 F0/1 VLAN 20 Subnet 20 VLAN 10 Subnet 10 Fred R1 Figure 11-8 Routing Between Two VLANs on Two Physical Interfaces The figure shows an IP packet being routed from Fred which sits in one VLAN/subnet to Betty which sits in the other. The Layer 2 switch forwards two different Layer 2 Ethernet frames: one in VLAN 10 from Fred to R1’s F0/0 interface and the other in VLAN 20 from R1’s F0/1 interface to Betty. From a Layer 3 perspective Fred sends the IP packet to its default router R1 and R1 routes the packet out another interface F0/1 into another sub- net where Betty resides. While the design shown in Figure 11-8 works it uses too many physical interfaces one per VLAN. A much less expensive and much preferred option uses a VLAN trunk between the switch and router requiring only one physical link between the router and switch while supporting all VLANs. Trunking can work between any two devices that choose to support it: between two switches between a router and a switch or even between server hardware and a switch.

slide 305:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 251 11 Figure 11-9 shows the same design idea as Figure 11-8 with the same packet being sent from Fred to Betty except now R1 uses VLAN trunking instead of a separate link for each VLAN. Fred F0/0 Dino Betty Wilma VLAN 20 Subnet 20 VLAN 10 Subnet 10 SW1 R1 1 2 Figure 11-9 Routing Between Two VLANs Using a Trunk on the Router NOTE Because the router has a single physical link connected to the LAN switch this design is sometimes called a router-on-a-stick. As a brief aside about terminology many people describe the concept in Figures 11-8 and 11-9 as “routing packets between VLANs.” Y ou can use that phrase and people know what you mean. However note that this phrase is not literally true because it refers to routing packets a Layer 3 concept and VLANs a Layer 2 concept. It just takes fewer words to say something like “routing between VLANs” rather than the literally true but long “routing Layer 3 packets between Layer 3 subnets with those subnets each mapping to a Layer 2 VLAN.” Routing Packets with a Layer 3 Switch Routing packets using a physical router even with the VLAN trunk in the router-on-a-stick model shown in Figure 11-9 still has one significant problem: performance. The physical link puts an upper limit on how many bits can be routed and less expensive routers tend to be less powerful and might not be able to route a large enough number of packets per sec- ond pps to keep up with the traffic volumes. The ultimate solution moves the routing functions inside the LAN switch hardware. Vendors long ago started combining the hardware and software features of their Layer 2 LAN switches plus their Layer 3 routers creating products called Layer 3 switches also known as multilayer switches. Layer 3 switches can be configured to act only as a Layer 2 switch or they can be configured to do both Layer 2 switching as well as Layer 3 routing. Today many medium- to large-sized enterprise campus LANs use Layer 3 switches to route packets between subnets VLANs in a campus. In concept a Layer 3 switch works a lot like the original two devices on which the Layer 3 switch is based: a Layer 2 LAN switch and a Layer 3 router. In fact if you take the concepts and packet flow shown in Figure 11-8 with a separate Layer 2 switch and Layer 3 router and then imagine all those features happening inside one device you have the general idea of what a Layer 3 switch does. Figure 11-10 shows that exact concept repeating many details of Figure 11-8 but with an overlay that shows the one Layer 3 switch doing the Layer 2 switch functions and the separate Layer 3 routing function.

slide 306:

ptg17246291 252 CCENT/CCNA ICND1 100-105 Official Cert Guide Fred Interface VLAN 10 Interface VLAN 20 Layer 3 Switch Dino Betty Wilma Layer 2 Switch Layer 3 Router All Functions in Middle Box VLAN 20 Subnet 20 VLAN 10 Subnet 10 Figure 11-10 Multilayer Switch: Layer 2 Switching with Layer 3 Routing in One Device This chapter introduces the core concepts of routing IP packets between VLANs or more accurately between the subnets on the VLANs. Chapter 18 “Configuring IPv4 Addresses and Static Routes” shows how to configure designs that use an external router with router- on-a-stick. This chapter now turns its attention to configuration and verification tasks for VLANs and VLAN trunks. VLAN and VLAN Trunking Configuration and Verification Cisco switches do not require any configuration to work. You can purchase Cisco switches install devices with the correct cabling turn on the switches and they work. You would never need to configure the switch and it would work fine even if you interconnected switches until you needed more than one VLAN. But if you want to use VLANs—and most enterprise networks do—you need to add some configuration. This chapter separates the VLAN configuration details into two major sections. The first section looks at how to configure access interfaces which are switch interfaces that do not use VLAN trunking. The second part shows how to configure interfaces that do use VLAN trunking. Creating VLANs and Assigning Access VLANs to an Interface This section shows how to create a VLAN give the VLAN a name and assign interfaces to a VLAN. To focus on these basic details this section shows examples using a single switch so VLAN trunking is not needed. For a Cisco switch to forward frames in a particular VLAN the switch must be configured to believe that the VLAN exists. In addition the switch must have nontrunking interfaces called access interfaces assigned to the VLAN and/or trunks that support the VLAN. The configuration steps for access interfaces are as follows with the trunk configuration shown later in the section “VLAN Trunking Configuration”:

slide 307:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 253 11 Step 1. To configure a new VLAN follow these steps: A. From configuration mode use the vlan vlan-id command in global con- figuration mode to create the VLAN and to move the user into VLAN con- figuration mode. B. Optional Use the name name command in VLAN configuration mode to list a name for the VLAN. If not configured the VLAN name is VLANZZZZ where ZZZZ is the four-digit decimal VLAN ID. Step 2. For each access interface each interface that does not trunk but instead belongs to a single VLAN follow these steps: A. Use the interface type number command in global configuration mode to move into interface configuration mode for each desired interface. B. Use the switchport access vlan id-number command in interface configu- ration mode to specify the VLAN number associated with that interface. C. Optional Use the switchport mode access command in interface configu- ration mode to make this port always operate in access mode that is to not trunk. While the list might look a little daunting the process on a single switch is actually pretty simple. For example if you want to put the switch’s ports in three VLANs—11 12 and 13—you just add three vlan commands: vlan 11 vlan 12 and vlan 13. Then for each inter- face add a switchport access vlan 11 or 12 or 13 command to assign that interface to the proper VLAN. NOTE The term default VLAN as shown in the exam topics refers to the default setting on the switchport access vlan vlan-id command and that default is VLAN ID 1. In other words by default each port is assigned to access VLAN 1. VLAN Configuration Example 1: Full VLAN Configuration Example 11-1 shows the configuration process of adding a new VLAN and assigning access interfaces to that VLAN. Figure 11-11 shows the network used in the example with one LAN switch SW1 and two hosts in each of three VLANs 1 2 and 3. The example shows the details of the two-step process for VLAN 2 and the interfaces in VLAN 2 with the con- figuration of VLAN 3 deferred until the next example. Fa0/15 Fa0/16 VLAN 3 Fa0/12 Fa0/11 VLAN 1 VLAN 2 Fa0/13 Fa0/14 SW1 Figure 11-11 Network with One Switch and Three VLANs Config Checklist

slide 308:

ptg17246291 254 CCENT/CCNA ICND1 100-105 Official Cert Guide Example 11-1 Configuring VLANs and Assigning VLANs to Interfaces SW1 show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1 Fa0/2 Fa0/3 Fa0/4 Fa0/5 Fa0/6 Fa0/7 Fa0/8 Fa0/9 Fa0/10 Fa0/11 Fa0/12 Fa0/13 Fa0/14 Fa0/15 Fa0/16 Fa0/17 Fa0/18 Fa0/19 Fa0/20 Fa0/21 Fa0/22 Fa0/23 Fa0/24 Gi0/1 Gi0/2 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup Above VLANs 2 and 3 do not yet exist. Below VLAN 2 is added with name Freds-vlan with two interfaces assigned to VLAN 2. SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z. SW1config vlan 2 SW1config-vlan name Freds-vlan SW1config-vlan exit SW1config interface range fastethernet 0/13 - 14 SW1config-if switchport access vlan 2 SW1config-if switchport mode access SW1config-if end Below the show running-config command lists the interface subcommands on interfaces Fa0/13 and Fa0/14. SW1 show running-config Many lines omitted for brevity Early in the output: vlan 2 name Freds-vlan more lines omitted for brevity interface FastEthernet0/13 switchport access vlan 2 switchport mode access interface FastEthernet0/14 switchport access vlan 2 switchport mode access

slide 309:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 255 11 SW1 show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1 Fa0/2 Fa0/3 Fa0/4 Fa0/5 Fa0/6 Fa0/7 Fa0/8 Fa0/9 Fa0/10 Fa0/11 Fa0/12 Fa0/15 Fa0/16 Fa0/17 Fa0/18 Fa0/19 Fa0/20 Fa0/21 Fa0/22 Fa0/23 Fa0/24 Gi0/1 Gi0/2 2 Freds-vlan active Fa0/13 Fa0/14 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup SW1 show vlan id 2 VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 2 Freds-vlan active Fa0/13 Fa0/14 VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 2 enet 100010 1500 - - - - - 0 0 Remote SPAN VLAN ---------------- Disabled Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------ The example begins with the show vlan brief command confirming the default settings of five nondeletable VLANs with all interfaces assigned to VLAN 1. VLAN 1 cannot be deleted but can be used. VLANs 1002–1005 cannot be deleted and cannot be used as access VLANs today. In particular note that this 2960 switch has 24 Fast Ethernet ports Fa0/1–Fa0/24 and two Gigabit Ethernet ports Gi0/1 and Gi0/2 all of which are listed as being in VLAN 1 per that first command’s output. Next the example shows the process of creating VLAN 2 and assigning interfaces Fa0/13 and Fa0/14 to VLAN 2. Note in particular that the example uses the interface range com- mand which causes the switchport access vlan 2 interface subcommand to be applied to both interfaces in the range as confirmed in the show running-config command output at the end of the example. After the configuration has been added to list the new VLAN the example repeats the show vlan brief command. Note that this command lists VLAN 2 name Freds-vlan and the interfaces assigned to that VLAN Fa0/13 and Fa0/14. The show vlan id 2 command that follows then confirms that ports Fa0/13 and Fa0/14 are assigned to VLAN 2.

slide 310:

ptg17246291 256 CCENT/CCNA ICND1 100-105 Official Cert Guide The example surrounding Figure 11-11 uses six switch ports all of which need to operate as access ports. That is each port should not use trunking but instead should be assigned to a single VLAN as assigned by the switchport access vlan vlan-id command. However as configured in Example 11-1 these interfaces could negotiate to later become trunk ports because the switch defaults to allow the port to negotiate trunking and decide whether to act as an access interface or as a trunk interface. For ports that should always act as access ports add the optional interface subcommand switchport mode access. This command tells the switch to only allow the interface to be an access interface. The upcoming section “VLAN Trunking Configuration” discusses more details about the commands that allow a port to negotiate whether it should use trunking. NOTE The book includes a video that works through a different VLAN configuration example as well. You can find the video on the DVD and on the companion website. VLAN Configuration Example 2: Shorter VLAN Configuration Example 11-1 shows several of the optional configuration commands with a side effect of being a bit longer than is required. Example 11-2 shows a much briefer alternative configu- ration picking up the story where Example 11-1 ended and showing the addition of VLAN 3 as shown in Figure 11-11. Note that SW1 does not know about VLAN 3 at the beginning of this example. Example 11-2 Shorter VLAN Configuration Example VLAN 3 SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z. SW1config interface range Fastethernet 0/15 - 16 SW1config-if-range switchport access vlan 3 Access VLAN does not exist. Creating vlan 3 SW1config-if-range Z SW1 show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1 Fa0/2 Fa0/3 Fa0/4 Fa0/5 Fa0/6 Fa0/7 Fa0/8 Fa0/9 Fa0/10 Fa0/11 Fa0/12 Fa0/17 Fa0/18 Fa0/19 Fa0/20 Fa0/21 Fa0/22 Fa0/23 Fa0/24 Gi0/1 Gi0/2 2 Freds-vlan active Fa0/13 Fa0/14 3 VLAN0003 active Fa0/15 Fa0/16 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup

slide 311:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 257 11 Example 11-2 shows how a switch can dynamically create a VLAN—the equivalent of the vlan vlan-id global config command—when the switchport access vlan interface sub- command refers to a currently unconfigured VLAN. This example begins with SW1 not knowing about VLAN 3. When the switchport access vlan 3 interface subcommand was used the switch realized that VLAN 3 did not exist and as noted in the shaded message in the example the switch created VLAN 3 using a default name VLAN0003. No other steps are required to create the VLAN. At the end of the process VLAN 3 exists in the switch and interfaces Fa0/15 and Fa0/16 are in VLAN 3 as noted in the shaded part of t h e show vlan brief c o m m a n d o u t pu t . VLAN Trunking Protocol Before showing more configuration examples you also need to know something about a Cisco protocol and tool called the VLAN Trunking Protocol VTP. VTP is a Cisco propri- etary tool on Cisco switches that advertises each VLAN configured in one switch with the vlan number command so that all the other switches in the campus learn about that VLAN. However for various reasons many enterprises choose not to use VTP. This book does not discuss VTP as an end to itself. However VTP has some small impact on how every Cisco Catalyst switch works even if you do not try to use VTP. This brief section introduces enough details of VTP so that you can see these small differences in VTP that cannot be avoided. This book attempts to ignore VTP as much as is possible. To that end all examples in this book use switches that have either been set to use VTP transparent mode with the vtp mode transparent global command or to disable it with the vtp mode off global com- mand. Both options allow the administrator to configure both standard- and extended- range VLANs and the switch lists the vlan commands in the running-config file. Finally on a practical note if you happen to do lab exercises with real switches or with simulators and you see unusual results with VLANs check the VTP status with the show vtp status command. If your switch uses VTP server or client mode you will find: ■ The server switches can configure VLANs in the standard range only 1–1005. ■ The client switches cannot configure VLANs. ■ Both servers and clients may be learning new VLANs from other switches and seeing their VLANs deleted by other switches because of VTP. ■ The show running-config command does not list any vlan commands. If possible in lab switch to VTP transparent mode and ignore VTP for your switch con- figuration practice until you are ready to focus on how VTP works when studying for the ICND2 exam topics. NOTE Do not change VTP settings on any switch that also connects to the production network until you know how VTP works and you talk with experienced colleagues. If the switch you configure connects to other switches which in turn connect to switches used in the production LAN you could accidentally change the VLAN configuration in other switches with serious impact to the operation of the network. Be careful and never experi- ment with VTP settings on a switch unless it and the other switches connected to it have absolutely no physical links connected to the production LAN.

slide 312:

ptg17246291 258 CCENT/CCNA ICND1 100-105 Official Cert Guide VLAN Trunking Configuration Trunking configuration between two Cisco switches can be very simple if you just statically configure trunking. For example if two Cisco 2960 switches connect to each other they support only 802.1Q and not ISL. You could literally add one interface subcommand for the switch interface on each side of the link switchport mode trunk and you would create a VLAN trunk that supported all the VLANs known to each switch. However trunking configuration on Cisco switches includes many more options including several options for dynamically negotiating various trunking settings. The configuration can either predefine different settings or tell the switch to negotiate the settings as follows: ■ The type of trunking: IEEE 802.1Q ISL or negotiate which one to use ■ The administrative mode: Whether to always trunk always not trunk or negotiate First consider the type of trunking. Cisco switches that support ISL and 802.1Q can negoti- ate which type to use using the Dynamic Trunking Protocol DTP. If both switches support both protocols they use ISL otherwise they use the protocol that both support. Today many Cisco switches do not support the older ISL trunking protocol. Switches that support both types of trunking use the switchport trunk encapsulation dot1q | isl | negotiate inter- face subcommand to either configure the type or allow DTP to negotiate the type. DTP can also negotiate whether the two devices on the link agree to trunk at all as guided by the local switch port’s administrative mode. The administrative mode refers to the configuration setting for whether trunking should be used. Each interface also has an operational mode which refers to what is currently happening on the interface and might have been chosen by DTP’s negotiation with the other device. Cisco switches use t h e switchport mode interface subcommand to define the administrative trunking mode a s l i s te d i n T a b l e 1 1 - 2 . Table 11-2 Trunking Administrative Mode Options with the switchport mode Command Command Option Description access Always act as an access nontrunk port trunk Always act as a trunk port dynamic desirable Initiates negotiation messages and responds to negotiation messages to dynamically choose whether to start using trunking dynamic auto Passively waits to receive trunk negotiation messages at which point the switch will respond and negotiate whether to use trunking For example consider the two switches shown in Figure 11-12. This figure shows an expansion of the network of Figure 11-11 with a trunk to a new switch SW2 and with parts of VLANs 1 and 3 on ports attached to SW2. The two switches use a Gigabit Ethernet link for the trunk. In this case the trunk does not dynamically form by default because both 2960 switches default to an administrative mode of dynamic auto meaning that neither switch initiates the trunk negotiation process. By changing one switch to use dynamic desirable mode which does initiate the negotiation the switches negotiate to use trunking specifically 802.1Q because the 2960s support only 802.1Q.

slide 313:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 259 11 Fa0/15 Fa0/16 VLAN 3 Fa0/12 Fa0/11 VLAN 1 VLAN 2 Fa0/13 Fa0/14 SW1 Fa0/23 Fa0/24 Fa0/22 Fa0/21 SW2 Gi0/1 Trunk Gi0/2 Figure 11-12 Network with Two Switches and Three VLANs Example 11-3 begins by showing the two switches in Figure 11-12 with the default configu- ration so that the two switches do not trunk. Example 11-3 Initial Default State: Not Trunking Between SW1 and SW2 SW1 show interfaces gigabit 0/1 switchport Name: Gi0/1 Switchport: Enabled Administrative Mode: dynamic auto Operational Mode: static access Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: On Access Mode VLAN: 1 default Trunking Native Mode VLAN: 1 default Administrative Native VLAN tagging: enabled Voice VLAN: none Access Mode VLAN: 1 default Trunking Native Mode VLAN: 1 default Administrative Native VLAN tagging: enabled Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vlan mapping: none Administrative private-vlan trunk native VLAN: none Administrative private-vlan trunk Native VLAN tagging: enabled Administrative private-vlan trunk encapsulation: dot1q Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk private VLANs: none

slide 314:

ptg17246291 260 CCENT/CCNA ICND1 100-105 Official Cert Guide Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL Protected: false Unknown unicast blocked: disabled Unknown multicast blocked: disabled Appliance trust: none Note that the next command results in a single empty line of output. SW1 show interfaces trunk SW1 First focus on the highlighted items from the output of the show interfaces switchport command at the beginning of Example 11-3. The output lists the default administrative mode setting of dynamic auto. Because SW2 also defaults to dynamic auto the command lists SW1’s operational status as “access” meaning that it is not trunking. “Dynamic auto” tells both switches to sit there and wait on the other switch to start the negotiations. The third shaded line points out the only supported type of trunking 802.1Q on this 2960 switch. On a switch that supports both ISL and 802.1Q this value would by default list “negotiate” to mean that the type of encapsulation is negotiated. Finally the operational trunking type is listed as “native” which is a reference to the 802.1Q native VLAN. The end of the example shows the output of the show interfaces trunk command but with no output. This command lists information about all interfaces that currently operationally trunk that is it lists interfaces that currently use VLAN trunking. With no interfaces listed this command also confirms that the link between switches is not trunking. Next consider Example 11-4 which shows the new configuration that enables trunking. In this case SW1 is configured with the switchport mode dynamic desirable command which asks the switch to both negotiate as well as to begin the negotiation process rather than waiting on the other device. As soon as the command is issued log messages appear show- ing that the interface goes down and then back up again which happens when the interface transitions from access mode to trunk mode. Example 11-4 SW1 Changes from Dynamic Auto to Dynamic Desirable SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z. SW1config interface gigabit 0/1 SW1config-if switchport mode dynamic desirable SW1config-if Z SW1 LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1 changed state to down LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1 changed state to up

slide 315:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 261 11 SW1 show interfaces gigabit 0/1 switchport Name: Gi0/1 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 default Trunking Native Mode VLAN: 1 default lines omitted for brevity The next command formerly listed a single empty line of output now it lists information about the 1 operational trunk. SW1 show interfaces trunk Port Mode Encapsulation Status Native vlan Gi0/1 desirable 802.1q trunking 1 Port Vlans allowed on trunk Gi0/1 1-4094 Port Vlans allowed and active in management domain Gi0/1 1-3 Port Vlans in spanning tree forwarding state and not pruned Gi0/1 1-3 SW1 show vlan id 2 VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 2 Freds-vlan active Fa0/13 Fa0/14 G0/1 VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 2 enet 100010 1500 - - - - - 0 0 Remote SPAN VLAN ---------------- Disabled Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------ To verify whether trunking is working now the middle of Example 11-4 lists the show interfaces switchport command. Note that the command still lists the administrative

slide 316:

ptg17246291 262 CCENT/CCNA ICND1 100-105 Official Cert Guide settings which denote the configured values along with the operational settings which list what the switch is currently doing. In this case SW1 now claims to be in an opera- tional mode of trunk with an operational trunking encapsulation of dot1Q. The end of the example shows the output of the show interfaces trunk command which now lists G0/1 confirming that G0/1 is now operationally trunking. The next section dis- cusses the meaning of the output of this command. For the exams you should be ready to interpret the output of the show interfaces switchport command realize the administrative mode implied by the output and know whether the link should operationally trunk based on those settings. Table 11-3 lists the combinations of the trunking administrative modes and the expected operational mode trunk or access resulting from the configured settings. The table lists the administrative mode used on one end of the link on the left and the administrative mode on the switch on the other end of the link across the top of the table. Table 11-3 Expected Trunking Operational Mode Based on the Configured Administrative Modes Administrative Mode Access Dynamic Auto Trunk Dynamic Desirable access Access Access Do Not Use 1 Access dynamic auto Access Access Trunk Trunk trunk Do Not Use 1 Trunk Trunk Trunk dynamic desirable Access Trunk Trunk Trunk 1 When two switches configure a mode of “access” on one end and “trunk” on the other problems occur. Avoid this combination. Finally before leaving the discussion of configuring trunks Cisco recommends disabling trunk negotiation on most ports for better security. The majority of switch ports on most switches will be used to connect to users. As a matter of habit you can disable DTP nego- tiations altogether using the switchport nonegotiate interface subcommand. Implementing Interfaces Connected to Phones This next topic is a strange topic at least in the context of access links and trunk links. In the world of IP telephony telephones use Ethernet ports to connect to an Ethernet network so they can use IP to send and receive voice traffic sent via IP packets. To make that work the switch’s Ethernet port acts like an access port—but at the same time the port acts like a trunk in some ways. This last topic of the chapter works through those main concepts. Data and Voice VLAN Concepts Before IP telephony a PC could sit on the same desk as a phone. The phone happened to use UTP cabling with that phone connected to some voice device often called a voice switch or a private branch exchange PBX. The PC of course connected using a unshielded twisted-pair UTP cable to the usual LAN switch that sat in the wiring closet— sometimes in the same wiring closet as the voice switch. Figure 11-13 shows the idea.

slide 317:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 263 11 Telephone UTP Ethernet UTP Voice Switch Closet Ethernet Switch Figure 11-13 Before IP Telephony: PC and Phone One Cable Each Connect to Two Different Devices The term IP telephony refers to the branch of networking in which the telephones use IP packets to send and receive voice as represented by the bits in the data portion of the IP packet. The phones connect to the network like most other end-user devices using either Ethernet or Wi-Fi. These new IP phones did not connect via cable directly to a voice switch instead connecting to the IP network using an Ethernet cable and an Ethernet port built in to the phone. The phones then communicated over the IP network with software that replaced the call setup and other functions of the PBX. The current products from Cisco that perform this IP telephony control function are called Cisco Unified Communication Manager. The migration from using the already-installed telephone cabling to these new IP phones that needed UTP cables that supported Ethernet caused some problems in some offices. In particular: ■ The older non-IP phones used a category of UTP cabling that often did not support 100-Mbps or 1000-Mbps Ethernet. ■ Most offices had a single UTP cable running from the wiring closet to each desk but now two devices the PC and the new IP phone both needed a cable from the desktop to the wiring closet. ■ Installing a new cable to every desk would be expensive plus you would need more switch ports. To solve this problem Cisco embedded small three-port switches into each phone. IP telephones have included a small LAN switch on the underside of the phone since the earliest IP telephone products. Figure 11-14 shows the basic cabling with the wiring closet cable connecting to one physical port on the embedded switch the PC connecting with a short patch cable to the other physical port and the phone’s internal CPU connecting to an internal switch port. Ethernet UTP Wiring Closet Ethernet Switch PC Phone Patch Cable IP Embedded Switch Figure 11-14 Cabling with an IP Phone a Single Cable and an Integrated Switch

slide 318:

ptg17246291 264 CCENT/CCNA ICND1 100-105 Official Cert Guide Sites that use IP telephony which includes most every company today now have two devic- es off each access port. In addition Cisco best practices for IP telephony design tell us to put the phones in one VLAN and the PCs in a different VLAN. To make that happen the switch port acts a little like an access link for the PC’s traffic and a little like a trunk for the phone’s traffic. The configuration defines two VLANs on that port as follows: Data VLAN: Same idea and configuration as the access VLAN on an access port but defined as the VLAN on that link for forwarding the traffic for the device connected to the phone on the desk typically the user’s PC. Voice VLAN: The VLAN defined on the link for forwarding the phone’s traffic. Traffic in this VLAN is typically tagged with an 802.1Q header. Figure 11-15 illustrates this design with two VLANs on access ports that support IP telephones. VLAN 11 VLAN 10 IP IP IP IP Voice VLAN Data VLAN Figure 11-15 A LAN Design with Data in VLAN 10 and Phones in VLAN 11 Data and Voice VLAN Configuration and Verification Configuring a switch port to support IP phones once you know the planned voice and data VLAN IDs is easy. Making sense of the show commands once it is configured can be a challenge. The port acts like an access port in many ways. However with most configuration options the voice frames flow with an 802.1Q header so that the link supports frames in both VLANs on the link. But that makes for some different show command output. Example 11-5 shows an example. In this case all four switch ports F0/1–F0/4 begin with default configuration. The configuration adds the new data and voice VLANs. The example then configures all four ports as access ports and defines the access VLAN which is also called the data VLAN when discussing IP telephony. Finally the configuration includes the switchport voice vlan 11 command which defines the voice VLAN used on the port. The example matches Figure 11-15 using ports F0/1–F0/4. Example 11-5 Configuring the Voice and Data VLAN on Ports Connected to Phones SW1 configure terminal Enter configuration commands one per line. End with CNTL/Z. SW1config vlan 10 SW1config-vlan vlan 11

slide 319:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 265 11 SW1config-vlan interface range FastEthernet0/1 - 4 SW1config-if switchport mode access SW1config-if switchport access vlan 10 SW1config-if switchport voice vlan 11 SW1config-ifZ SW1 NOTE CDP which is discussed in Chapter 33 “Device Management Protocols” must be enabled on an interface for a voice access port to work with Cisco IP Phones. CDP is enabled by default so its configuration is not shown here. The following list details the configuration steps for easier review and study: Step 1. Use the vlan vlan-id command in global configuration mode to create the data and voice VLANs if they do not already exist on the switch. Step 2. Configure the data VLAN like an access VLAN as usual: A. Use the interface type number command global configuration mode to move into interface configuration mode. B. Use the switchport access vlan id-number command in interface configu- ration mode to define the data VLAN. C. Use the switchport mode access command in interface configuration mode to make this port always operate in access mode that is to not trunk. Step 3. Use the switchport voice vlan id-number command in interface configuration mode to set the voice VLAN ID. Verifying the status of a switch port configured like Example 11-5 shows some different output compared to the pure access port and pure trunk port configurations seen earlier in this chapter. For example the show interfaces switchport command shows details about the operation of an interface including many details about access ports. Example 11-6 shows those details for port F0/4 after the configuration in Example 11-5 was added. Example 11-6 Verifying the Data VLAN Access VLAN and Voice VLAN SW1 show interfaces FastEthernet 0/4 switchport Name: Fa0/4 Switchport: Enabled Administrative Mode: static access Operational Mode: static access Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: Off Access Mode VLAN: 10 VLAN0010 Trunking Native Mode VLAN: 1 default Administrative Native VLAN tagging: enabled Voice VLAN: 11 VLAN0011 The rest of the output is omitted for brevity Config Checklist

slide 320:

ptg17246291 266 CCENT/CCNA ICND1 100-105 Official Cert Guide Working through the first three highlighted lines in the output all those details should look familiar for any access port. The switchport mode access configuration command statically configures the administrative mode to be an access port so the port of course operates as an access port. Also as shown in the third highlighted line the switchport access vlan 10 configuration command defined the access mode VLAN as highlighted here. The fourth highlighted line shows the one small new piece of information: the voice VLAN ID as set with the switchport voice vlan 11 command in this case. This small line of out- put is the only piece of information in the output that differs from the earlier access port examples in this chapter. These ports act more like access ports than trunk ports. In fact the show interfaces type number switchport command boldly proclaims “Operational Mode: static access.” However one other show command reveals just a little more about the underlying opera- tion with 802.1Q tagging for the voice frames. As mentioned earlier the show interfaces trunk command—that is the command that does not include a specific interface in the middle of the command—lists the operational trunks on a switch. With IP telephony ports the ports do not show up in the list of trunks either— providing evidence that these links are not treated as trunks. Example 11-7 shows just such an example. However the show interfaces trunk command with the interface listed in the middle of the command as is also shown in Example 11-7 does list some additional information. Note that in this case the show interfaces F0/4 trunk command lists the status as not-trunking but with VLANs 10 and 11 allowed on the trunk. Normally on an access port only the access VLAN is listed in the “VLANs allowed on the trunk” list in the output of this command. Example 11-7 Allowed VLAN List and the List of Active VLANs SW1 show interfaces trunk SW1 show interfaces F0/4 trunk Port Mode Encapsulation Status Native vlan Fa0/4 off 802.1q not-trunking 1 Port Vlans allowed on trunk Fa0/4 10-11 Port Vlans allowed and active in management domain Fa0/4 10-11 Port Vlans in spanning tree forwarding state and not pruned Fa0/4 10-11 Summary: IP Telephony Ports on Switches It might seem like this short topic about IP telephony and switch configuration includes a lot of small twists and turns and trivia and it does. The most important items to remember are as follows:

slide 321:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 267 11 ■ Configure these ports like a normal access port to begin: Configure it as a static access port and assign it an access VLAN. ■ Add one more command to define the voice VLAN switchport voice vlan vlan-id. ■ Look for the mention of the voice VLAN ID but no other new facts in the output of the show interfaces type number switchport command. ■ Look for both the voice and data access VLAN IDs in the output of the show interfaces type number trunk command. ■ Do not expect to see the port listed in the list of operational trunks as listed by the show interfaces trunk command . Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment section titled “Step 2: Build Your Study Habits Around the Chapter” for more details. Table 11-4 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 11-4 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Answer DIKTA questions Book PCPT Do labs Blog Review memory tables DVD/website Review config checklists Book DVD/website Review command tables Book Review All the Key Topics Table 11-5 Key T opics for Chapter 11 Key Topic Element Description Page Number Figure 11-2 Basic VLAN concept 245 List Reasons for using VLANs 245 Figure 11-5 Diagram of VLAN trunking 247 Figure 11-6 802.1Q header 248 Figure 11-9 Routing between VLANs with router-on-a-stick 251 Figure 11-10 Routing between VLANs with Layer 3 switch 252

slide 322:

ptg17246291 268 CCENT/CCNA ICND1 100-105 Official Cert Guide Key Topic Element Description Page Number Table 11-2 Options of the switchport mode command 258 Table 11-3 Expected trunking results based on the configuration of the switchport mode command 262 List Definitions of data VLAN and voice VLAN 264 List Summary of data and voice VLAN concepts configuration and verification 267 Key Terms You Should Know 802.1Q trunk trunking administrative mode trunking operational mode VLAN VTP VTP transparent mode Layer 3 switch access interface trunk interface data VLAN voice VLAN Command References Tables 11-6 and 11-7 list configuration and verification commands used in this chapter respectively. As an easy review exercise cover the left column in a table read the right col- umn and try to recall the command without looking. Then repeat the exercise covering the right column and try to recall what the command does. Table 11-6 Chapter 11 Configuration Command Reference Command Description vlan vlan-id Global config command that both creates the VLAN and puts the CLI into VLAN configuration mode name vlan-name VLAN subcommand that names the VLAN no sh ut d ow n VLAN mode subcommand that enables no shutdown or disables shutdown the VLAN no shutdown vlan vlan-id Global config command that has the same effect as the no shutdown VLAN mode subcommands v t p mod e server | client | transparent | off Global config command that defines the VTP mode sw it ch por t mod e access | dynamic auto | desirable | trunk Interface subcommand that configures the trunking administrative mode on the interface sw it ch por t a ccess vlan vlan-id Interface subcommand that statically configures the interface into that one VLAN sw it ch por t t r un k encapsulation dot1q | isl | negotiate Interface subcommand that defines which type of trunking to use assuming that trunking is configured or negotiated sw it ch por t t r un k native vlan vlan-id Interface subcommand that defines the native VLAN for a trunk port sw it ch por t none got iat e Interface subcommand that disables the negotiation of VLAN trunking

slide 323:

ptg17246291 Chapter 11: Implementing Ethernet Virtual LANs 269 11 Command Description sw it ch por t v oi ce vlan vlan-id Interface subcommand that defines the voice VLAN on a port meaning that the switch uses 802.1Q tagging for frames in this VLAN switchport trunk allowed vlan add | all | except | remove vlan-list Interface subcommand that defines the list of allowed VLANs Table 11-7 Chapter 11 EXEC Command Reference Command Description sh ow int er f a ces interface-id switchport Lists information about any interface regarding administrative settings and operational state sh ow int er f a ces interface-id trunk Lists information about all operational trunks but no other interfaces including the list of VLANs that can be forwarded over the trunk sh ow vlan brief | id vlan-id | name vlan-name | summary Lists information about the VLAN show vlan vlan Displays VLAN information sh ow v t p st at us Lists VTP configuration and status information

slide 324:

ptg17246291 CHAPTER 12 Troubleshooting Ethernet LANs This chapter covers the following exam topics: 1.0 Network Fundamentals 1.7 Apply troubleshooting methodologies to resolve problems 1.7.a Perform fault isolation and document 1.7.b Resolve or escalate 1.7.c Verify and monitor resolution 2.0 LAN Switching Technologies 2.1 Describe and verify switching concepts 2.1.a MAC learning and aging 2.1.b Frame switching 2.1.c Frame flooding 2.1.d MAC address table 2.3 Troubleshoot interface and cable issues collisions errors duplex speed 2.4 Configure verify and troubleshoot VLANs normal range spanning multiple switches 2.4.a Access ports data and voice 2.4.b Default VLAN 2.5 Configure verify and troubleshoot inter-switch connectivity 2.5.a Trunk ports 2.5.b 802.1Q 2.5.c Native VLAN 2.7 Configure verify and troubleshoot port security 2.7.a Static 2.7.b Dynamic 2.7.c Sticky 2.7.d Max MAC addresses 2.7.e Violation actions 2.7.f Err-disable recovery

slide 325:

ptg17246291 This chapter focuses on the processes of verification and troubleshooting. Verification refers to the process of confirming whether a network is working as designed. Trouble- shooting refers to the follow-on process that occurs when the network is not working as designed by trying to determine the real reason why the network is not working correctly so that it can be fixed. Sometimes when people take their first Cisco exam they are surprised at the number of verification and troubleshooting questions. Each of these questions requires you to apply networking knowledge to unique problems rather than just being ready to answer questions about lists of facts that you’ve memorized. You need to have skills beyond simply remem- bering a lot of facts. To help you prepare to answer troubleshooting questions this book as well as the ICND2 book devotes different book elements to troubleshooting. These book elements do not just list the configuration and they do not just list example output from different show commands. Instead these elements discuss how to use different commands to verify what should be happening and if not how to find the root cause of the problem. This chapter discusses a wide number of topics many of which have already been discussed in Part II and the preceding chapters in Part III of the ICND1 book. First this chapter begins with some perspectives on troubleshooting networking problems because it is the first book element that focuses on troubleshooting and because there is one exam topic that mentions the troubleshooting process and methods. At that point this chapter looks at four key technical topics that matter to verifying and troubleshooting Ethernet LANs as follows: ■ Analyzing switch interfaces and cabling ■ Predicting where switches will forward frames ■ Troubleshooting port security ■ Analyzing VLANs and VLAN trunks “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 12-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Perspectives on Applying Troubleshooting Methodologies 1 Analyzing Switch Interface Status and Statistics 2–4 Predicting Where Switches Will Forward Frames 5–6 Analyzing Port Security Operations on an Interface 7 Analyzing VLANs and VLAN Trunks 8

slide 326:

ptg17246291 272 CCENT/CCNA ICND1 100-105 Official Cert Guide 1. Which answers describe a good practice in applying good troubleshooting method- ologies Choose two answers. a. Perform problem isolation as fast as possible including not slowing down to document your findings. b. The last step in a good troubleshooting process should be to take action to resolve the root cause of the problem. c. The last step in a good troubleshooting process should include monitoring the status to ensure that the problem is indeed solved and does not recur. d. Each worker should know and use the escalation process when they cannot resolve a particular problem. 2. The output of the show interfaces status command on a 2960 switch shows interface Fa0/1 in a “disabled” state. Which of the following is true about interface Fa0/1 Choose three answers. a. The interface is configured with the shutdown command. b. The show interfaces fa0/1 command will list the interface with two status codes of administratively down and line protocol down. c. The show interfaces fa0/1 command will list the interface with two status codes of up and down. d. The interface cannot currently be used to forward frames. e. The interface can currently be used to forward frames. 3. Switch SW1 uses its Gigabit 0/1 interface to connect to switch SW2’s Gigabit 0/2 interface. SW2’s Gi0/2 interface is configured with the speed 1000 and duplex full commands. SW1 uses all defaults for interface configuration commands on its Gi0/1 interface. Which of the following are true about the link after it comes up Choose two answers. a. The link works at 1000 Mbps 1 Gbps. b. SW1 attempts to run at 10 Mbps because SW2 has effectively disabled IEEE standard autonegotiation. c. The link runs at 1 Gbps but SW1 uses half-duplex and SW2 uses full duplex. d. Both switches use full duplex. 4. In the following line taken from a show interfaces fa0/1 command which of the fol- lowing are true about the interface Choose two answers. Full-duplex 100Mbps media type is 10/100BaseTX a. The speed was definitely configured with the speed 100 interface subcommand. b. The speed might have been configured with the speed 100 interface subcommand. c. The duplex was definitely configured with the duplex full interface subcommand. d. The duplex might have been configured with the duplex full interface subcommand.

slide 327:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 273 12 5. Which of the following commands list the MAC address table entries for MAC addresses configured by port security Choose two answers. a. show mac address-table dynamic b. show mac address-table c. show mac address-table static d. show mac address-table port-security 6. On a Cisco Catalyst switch you issue a show mac address-table command. Which of the following answers list information you would likely see in most lines of output Choose two answers. a. A MAC address b. An IP address c. A VLAN ID d. Type broadcast multicast or unicast 7. The show port-security interface f0/1 command lists a port status of secure-down. Which one of the following answers must be true about this interface at this time a. The show interface status command lists the interface status as connected. b. The show interface status command lists the interface status as err-disabled. c. The show port-security interface command could list a mode of shutdown or restrict but not protect. d. The show port-security interface command could list a violation counter value of 10. 8. The show interfaces g0/1 switchport command on SW1 shows the trunking status on a link connected to switch SW2. Based on the output which of the following must be true on SW2’s port connected to this link SW1 show interfaces gigabit0/1 switchport Name: Gi0/1 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk a. The operational state per show interfaces switchport must be “trunk.” b. The administrative state per show interfaces switchport must be “trunk.” c. SW2 must use the switchport mode trunk configuration command on G0/2 or the link will not use trunking. d. SW2 can use the switchport mode dynamic auto configuration command as one option to make the link use trunking.

slide 328:

ptg17246291 274 CCENT/CCNA ICND1 100-105 Official Cert Guide Foundation Topics Perspectives on Applying Troubleshooting Methodologies This first section of the chapter takes a brief diversion for one particular big idea: what troubleshooting processes could be used to resolve networking problems Most of the CCENT and CCNA Routing and Switching exam topics list the word “troubleshoot” along with some technology mostly with some feature that you configure on a switch or router. One exam topic makes mention of the troubleshooting process. This first section examines the troubleshooting process as an end to itself. The first important perspective on the troubleshooting process is this: you can troubleshoot using any process or method that you want. However all good methods have the same char- acteristics that result in faster resolution of the problem and a better chance of avoiding that same problem in the future. The one exam topic that mentions troubleshooting methods uses some pretty common ter- minology found in troubleshooting methods both inside IT and in other industries as well. The ideas make good common sense. From the exam topics: Step 1. Problem isolation and documentation: Problem isolation refers to the pro- cess of taking what you know about a possible issue confirming that there is a problem and determining which devices and cables could be part of the problem and which ones are not part of the problem. This step also works best when the person troubleshooting the problem documents what they find typi- cally in a problem tracking system. Step 2. Resolve or escalate: Problem isolation should eventually uncover the root cause of the problem—that is the cause which if fixed will resolve the prob- lem. In short resolving the problem means finding the root cause of the prob- lem and fixing that problem. Of course what do you do if you cannot find the root cause or fix resolve that root cause once found Escalate the problem. Most companies have a defined escalation process with different levels of technical support and management support depending on whether the next step requires more technical expertise or management decision making. Step 3. Verify or monitor: You hear of a problem you isolate the problem document it determine a possible root cause and you try to resolve it. Now you need to verify that it really worked. In some cases that may mean that you just do a few show commands. In other cases you may need to keep an eye on it over a period of time especially when you do not know what caused the root prob- lem in the first place. Like most real-life processes the real troubleshooting process is seldom as neat as the three troubleshooting steps listed here. You move between them you attempt to resolve the problem it may or may not work you work through the process over and over get help from the escalation team as needed and so on. But following these kinds of steps can help Answers to the “Do I Know This Already” quiz: 1 C D 2 A B D 3 A D 4 B D 5 B C 6 A C 7 B 8 D

slide 329:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 275 12 you resolve problems more consistently more quickly especially when the team must get involved in troubleshooting a problem Troubleshooting on the Exams The exams ask you questions that not only assess your knowledge but they assess your troubleshooting skills. To do that the exam does not require you to follow any particular troubleshooting methods. On the exam you should focus on isolating the root cause of the problem after which you will either a fix the problem or b answer a multichoice question about the symptoms and the root cause of the problem. The exam uses two question types as the primary means to test troubleshooting skills. Sim questions begin with a broken configuration your job is to find the configuration problem and answer the question by fixing or completing the configuration. These are straightfor- ward configuration troubleshooting questions and you can recognize them on the exam when the exam tells you to answer the question by changing the configuration. Simlet questions also give you a simulator where you access the command-line interface CLI. However instead of changing the configuration these questions require you to verify the current operation of the network and then answer multichoice questions about the cur- rent operation. These questions make you do the same kinds of commands you would use when doing problem isolation and documentation and then assess what you found by ask- ing you several multichoice questions. At some point whether you stop now or sometime when you have 10 to 15 spare minutes take the time to search Cisco.com for “exam tutorial.” Cisco’s exam tutorial shows all the question types including Sim and Simlet types and you can take over the user interface to get a better sense for how to navigate in the same user interface you will see on exam day. A Deeper Look at Problem Isolation On the exam you may do 5–10 show commands in a Simlet question before finding all the answers to all the multichoice questions within that one Simlet question. So it sometimes helps to go through problem isolation like what you would do in a real network. In some questions it may be obvious that the problem will be something to do with the switches or VLANs but in others you may have to do extra problem isolation work to even determine whether the problem is a WAN or LAN or routing problem and which part of the network has the problem. For example consider the following problem based on the network in Figure 12-1. PC1 and PC2 supposedly sit in the same VLAN 10. At one time the ping 10.1.1.2 command on PC1 worked now it does not. 1 2 10.1.1.1 0200.1111.1111 VLAN10 10.1.1.2 0200.2222.2222 F0/1 G0/1 SW1 G0/2 F0/2 SW2 Figure 12-1 Network with a Ping Problem

slide 330:

ptg17246291 276 CCENT/CCNA ICND1 100-105 Official Cert Guide NOTE This book covers two IP troubleshooting tools—ping and traceroute—in depth in Chapter 23 “IPv4 Troubleshooting Tools.” For now know that the ping command sends messages inside IPv4 packets that flow from one device to the other and back to test whether the IP network can deliver packets in both directions. So how do you attack this problem If you doubt whether the figure is even correct you could look at show command output to confirm the network topology. After it is con- firmed you could predict its normal working behavior based on your knowledge of LAN switching. As a result you could predict where a frame sent by PC1 to PC2 should flow. To isolate the problem you could look in the switch MAC tables to confirm the interfaces out which the frame should be forwarded possibly then finding that the interface connected to PC2 has failed. This first problem showed a relatively small network with only two networking devices two Layer 2 switches. As a result you would probably guess that the exam question focused on either interface issues or VLAN issues or something you read in Part II and the previous chapters of Part III of this book. Other Simlet questions might instead begin with a larger network but they might still require you to do problem isolation about the Ethernet topics in Parts II and III. However that problem isolation might need to start with Layer 3 just to decide where to begin look- ing for other problems. For example the user of PC1 in Figure 12-2 can usually connect to the web server on the right by entering www.example.com in PC1’s web browser. However that web-browsing attempt fails right now. The user calls the help desk and the problem is assigned to a net- work engineer to solve. 1 2 3 6 5 4 Example.com Web Server SW1 SW2 SW3 R1 R2 PC1 Figure 12-2 Layer 3 Problem Isolation To begin the analysis the network engineer can begin with the first tasks that would have to happen for a successful web-browsing session to occur. For example the engineer would try to confirm that PC1 can resolve the hostname www.example.com to the correct IP address used by the server on the right. At that point the Layer 3 IP problem isolation pro- cess can proceed to determine which of the six routing steps shown in the figure has failed. The routing steps shown in Figure 12-2 are as follows: Step 1. PC1 sends the packet to its default gateway R1 because the destination IP address of the web server is in a different subnet. Step 2. R1 forwards the packet to R2 based on R1’s routing table. Step 3. R2 forwards the packet to the web server based on R2’s routing table.

slide 331:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 277 12 Step 4. The web server sends a packet back toward PC1 based on the web server’s default gateway setting R2. Step 5. R2 forwards the packet destined for PC1 by forwarding the packet to R1 according to R2’s routing table. Step 6. R1 forwards the packet to PC1 based on R1’s routing table. Many engineers break down network problems as in this list analyzing the Layer 3 path through the network hop by hop in both directions. This process helps you take the first attempt at problem isolation. When the analysis shows which hop in the layer path fails you can then look further at those details. And if in this case the Layer 3 problem isolation process discovers that Step 1 3 4 or 6 fails the root cause might be related to Ethernet or other Layer 2 issues. For example imagine that the Layer 3 analysis determined that PC1 cannot even send a packet to its default gateway R1 meaning that Step 1 in Figure 12-2 fails. To further isolate the problem and find the root causes the engineer would need to determine the following: ■ The MAC address of PC1 and of R1’s LAN interface ■ The switch interfaces used on SW1 and SW2 ■ The interface status of each switch interface ■ The VLANs that should be used ■ The expected forwarding behavior of a frame sent by PC1 to R1 as the destination MAC address By gathering and analyzing these facts the engineer can most likely isolate the problem’s root cause and fix it. Troubleshooting as Covered in This Book All the exams related to CCENT and CCNA Routing and Switching include a variety of troubleshooting topics. In the current version of the ICND1 and ICND2 exam topics Cisco lists around 30 specific major exam topics that include the word “troubleshoot.” As a result this book has three complete chapters devoted to troubleshooting plus other smaller trou- bleshooting topics spread throughout different chapters. Plus every concept configuration and verification topic helps you learn the background information required to troubleshoot that feature. The rest of this chapter examines troubleshooting related to Ethernet LANs with four major topics. All of the topics discuss familiar concepts with familiar configuration and verifica- tion commands. However in earlier configuration and verification discussions of these top- ics the point was to show how to configure correctly and how to verify correct operation. In this case the text takes a troubleshooting approach looking for typical problems and how to isolate network problems by paying even more attention to the verification details. The topics include the following: ■ Examining interface status and statistics: Interfaces must be in a working state before a switch will forward frames on the interface. You must determine whether an interface is working as well as determine the potential root causes for a failed switch interface.

slide 332:

ptg17246291 278 CCENT/CCNA ICND1 100-105 Official Cert Guide ■ Analyzing where switches will forward frames: You must know how to analyze a switch’s MAC address table and how to then predict how a switch will forward a particu- lar frame. ■ Analyzing port security: Port security can disable an interface if a violation occurs—but it can also filter frames while leaving the interface up. This section examines how to know what behavior will happen when a violation occurs and how to know if it is hap- pening right now or not. ■ Analyzing VLANs and VLAN trunking: Keeping a Layer 2 switch focus this last section looks at what can go wrong with VLANs and VLAN trunks. Analyzing Switch Interface Status and Statistics This section makes the transition from the process focus of the previous section to the first of four technology-focused sections of this chapter. That process begins with finding out whether each switch interface works and if working whether any statistics reveal any additional problems. Unsurprisingly Cisco switches do not use interfaces at all unless the interface is first considered to be in a functional or working state. In addition the switch interface might be in a working state but intermittent problems might still be occurring. This section begins by looking at the Cisco switch interface status codes and what they mean so that you can know whether an interface is working. The rest of this section then looks at those more unusual cases in which the interface is working but not working well as revealed by different interface status codes and statistics. Interface Status Codes and Reasons for Nonworking States Cisco switches actually use two different sets of interface status codes—one set of two codes words that use the same conventions as do router interface status codes and anoth- er set with a single code word. Both sets of status codes can determine whether an inter- face is working. The switch show interfaces and show interfaces description commands list the two-code status named the line status and protocol status. The line status generally refers to whether Layer 1 is working with protocol status generally referring to whether Layer 2 is working. NOTE This book refers to these two status codes in shorthand by just listing the two codes with a slash between them such as up/up. The single-code interface status corresponds to different combinations of the traditional two-code interface status codes and can be easily correlated to those codes. For example the show interfaces status command lists a connected state for working interfaces with the same meaning as the up/up state seen with the show interfaces and show interfaces description commands. Table 12-2 lists the code combinations and some root causes that could have caused a particular interface status.

slide 333:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 279 12 Table 12-2 LAN Switch Interface Status Codes Line Status Protocol Status Interface Status Typical Root Cause administratively down down disabled The shutdown command is configured on the interface. down down notconnect No cable bad cable wrong cable pinouts speed mismatch neighboring device is a powered off b shutdown or c error disabled. up down notconnect Not expected on LAN switch physical interfaces. down down err-disabled err-disabled Port security has disabled the interface. up up connected The interface is working. Examining the notconnect state for a moment note that this state has many causes that have been mentioned through this book. For example using incorrect cabling pinouts instead of the correct pinouts explained in Chapter 2 “Fundamentals of Ethernet LANs” causes a problem. However one topic can be particularly difficult to troubleshoot—the possibility for both speed and duplex mismatches as explained in the next section. As you can see in the table having a bad cable is just one of many reasons for the down/down state or notconnect per the show interfaces status command. Some examples of the root causes of cabling problems include the following: ■ The installation of any equipment that uses electricity even non-IT equipment can inter- fere with the transmission on the cabling and make the link fail. ■ The cable could be damaged for example if it lies under carpet. If the user’s chair keeps squashing the cable eventually the electrical signal can degrade. ■ Although optical cables do not suffer from electromagnetic interference EMI some- one can try to be helpful and move a fiber-optic cable out of the way—bending it too much. A bend into too tight a shape can prevent the cable from transmitting bits called macrobending. For the other interface states listed in Table 12-2 only the up/up connected state needs more discussion. An interface can be in a working state and it might really be working— or it might be working in a degraded state. The next few topics discuss how to examine an up/up connected interface to find out whether it is working well or having problems. Interface Speed and Duplex Issues Many unshielded twisted-pair UTP-based Ethernet interfaces support multiple speeds either full or half duplex and support IEEE standard autonegotiation as discussed in Chapter 9 “Configuring Switch Interfaces” in the section “Autonegotiation”. These same interfaces can also be configured to use a specific speed using the speed 10 | 100 | 1000 interface subcommand and a specific duplex using the duplex half | full interface subcom- mand. With both configured a switch or router disables the IEEE-standard autonegotiation process on that interface.

slide 334:

ptg17246291 280 CCENT/CCNA ICND1 100-105 Official Cert Guide The show interfaces and show interfaces status commands list both the actual speed and duplex settings on an interface as demonstrated in Example 12-1. Example 12-1 Displaying Speed and Duplex Settings on Switch Interfaces SW1 show interfaces status Port Name Status Vlan Duplex Speed Type Fa0/1 notconnect 1 auto auto 10/100BaseTX Fa0/2 notconnect 1 auto auto 10/100BaseTX Fa0/3 notconnect 1 auto auto 10/100BaseTX Fa0/4 connected 1 a-full a-100 10/100BaseTX Fa0/5 connected 1 a-full a-100 10/100BaseTX Fa0/6 notconnect 1 auto auto 10/100BaseTX Fa0/7 notconnect 1 auto auto 10/100BaseTX Fa0/8 notconnect 1 auto auto 10/100BaseTX Fa0/9 notconnect 1 auto auto 10/100BaseTX Fa0/10 notconnect 1 auto auto 10/100BaseTX Fa0/11 connected 1 a-full 10 10/100BaseTX Fa0/12 connected 1 half 100 10/100BaseTX Fa0/13 connected 1 a-full a-100 10/100BaseTX Fa0/14 disabled 1 auto auto 10/100BaseTX Lines omitted for brevity SW1 show interfaces fa0/13 FastEthernet0/13 is up line protocol is up connected Hardware is Fast Ethernet address is 0019.e86a.6f8d bia 0019.e86a.6f8d MTU 1500 bytes BW 100000 Kbit DLY 100 usec reliability 255/255 txload 1/255 rxload 1/255 Encapsulation ARPA loopback not set Keepalive set 10 sec Full-duplex 100Mbps media type is 10/100BaseTX input flow-control is off output flow-control is unsupported ARP type: ARPA ARP Timeout 04:00:00 Last input 00:00:05 output 00:00:00 output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 size/max/drops/flushes Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 size/max 5 minute input rate 0 bits/sec 0 packets/sec 5 minute output rate 0 bits/sec 0 packets/sec 85022 packets input 10008976 bytes 0 no buffer Received 284 broadcasts 0 multicast 0 runts 0 giants 0 throttles 0 input errors 0 CRC 0 frame 0 overrun 0 ignored 0 watchdog 281 multicast 0 pause input

slide 335:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 281 12 0 input packets with dribble condition detected 95226 packets output 10849674 bytes 0 underruns 0 output errors 0 collisions 1 interface resets 0 unknown protocol drops 0 babbles 0 late collision 0 deferred 0 lost carrier 0 no carrier 0 PAUSE output 0 output buffer failures 0 output buffers swapped out Although both commands in the example can be useful only the show interfaces status command implies how the switch determined the speed and duplex settings. The com- mand output lists autonegotiated settings with a prefix of a-. For example a-full means full duplex as autonegotiated whereas full means full duplex but as manually configured. The example shades the command output that implies that the switch’s Fa0/12 interface’s speed and duplex were not found through autonegotiation but Fa0/13 did use autonegotiation. Note that the show interfaces fa0/13 command without the status option simply lists the speed and duplex for interface Fast Ethernet 0/13 with nothing implying that the values were learned through autonegotiation. When the IEEE autonegotiation process works on both devices both devices agree to the fastest speed supported by both devices. In addition the devices use full duplex if it is sup- ported by both devices or half duplex if it is not. However when one device has disabled autonegotiation and the other device uses autonegotiation the device using autonegotia- tion chooses the default duplex setting based on the current speed. The defaults are as fol- lows: ■ If the speed is not known through any means use 10 Mbps half duplex. ■ If the switch successfully senses the speed without IEEE autonegotiation by just looking at the signal on the cable: ■ If the speed is 10 or 100 Mbps default to use half duplex. ■ If the speed is 1000 Mbps default to use full duplex. NOTE Ethernet interfaces using speeds faster than 1 Gbps always use full duplex. While autonegotiation works well these defaults allow for the possibility of a difficult-to- troubleshoot problem called a duplex mismatch. The “Autonegotiation” section in Chapter 9 explains how both devices could use the same speed so the devices would consider the link to be up but one side would use half-duplex and the other side would use full duplex. The next example shows a specific case that causes a duplex mismatch. In Figure 12-3 imagine that SW2’s Gi0/2 interface was configured with the speed 100 and duplex full commands these settings are not recommended on a Gigabit-capable interface by the way. On Cisco switches configuring both the speed and duplex commands disables IEEE auto- negotiation on that port. If SW1’s Gi0/1 interface tries to use autonegotiation SW1 would also use a speed of 100 Mbps but default to use half duplex. Example 12-2 shows the results of this specific case on SW1.

slide 336:

ptg17246291 282 CCENT/CCNA ICND1 100-105 Official Cert Guide 0200.1111.1111 0200.0101.0101 Fa0/11 Fa0/1 Gi0/1 Fa0/10 Gi0/2 SW1 SW2 R1 PC1 speed 100 duplex full Autonegotiation Fails Autonegotiation Is Disabled Figure 12-3 Conditions to Create a Duplex Mismatch Between SW1 and SW2 Example 12-2 Confirming Duplex Mismatch on Switch SW1 SW1 show interfaces gi0/1 status Port Name Status Vlan Duplex Speed Type Gi0/1 connected trunk a-half a-100 10/100/1000BaseTX First focusing on the command output the command confirms SW1’s speed and duplex. It also lists a prefix of a- in the output implying autonegotiation. Even with SW1 using auto- negotiation defaults the command still notes the values as being learned through autonego- tiation. Finding a duplex mismatch can be much more difficult than finding a speed mismatch because if the duplex settings do not match on the ends of an Ethernet segment the switch interface will still be in a connected up/up state. In this case the interface works but it might work poorly with poor performance and with symptoms of intermittent prob- lems. The reason is that the device using half-duplex uses carrier sense multiple access col- lision detect CSMA/CD logic waiting to send when receiving a frame believing collisions occur when they physically do not—and actually stopping sending a frame because the switch thinks a collision occurred. With enough traffic load the interface could be in a con- nect state but it’s extremely inefficient for passing traffic. To identify duplex mismatch problems check the duplex setting on each end of the link and watch for increment ing co llis i o n an d lat e co llis i o n co unt e r s as e x p lain e d in th e n e x t s e c t i o n. Common Layer 1 Problems on Working Interfaces When the interface reaches the connect up/up state the switch considers the interface to be working. The switch of course tries to use the interface and at the same time the switch keeps various interface counters. These interface counters can help identify problems that can occur even though the interface is in a connect state. This section explains some of the related concepts and a few of the most common problems. Whenever the physical transmission has problems the receiving device might receive a frame whose bits have changed values. These frames do not pass the error detection logic as implemented in the FCS field in the Ethernet trailer as covered in Chapter 2. The receiving device discards the frame and counts it as some kind of input error. Cisco switches list this error as a CRC error as highlighted in Example 12-3. Cyclic redundancy check CRC is a term related to how the frame check sequence FCS math detects an error.

slide 337:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 283 12 Example 12-3 Interface Counters for Layer 1 Problems SW1 show interfaces fa0/13 lines omitted for brevity Received 284 broadcasts 0 multicast 0 runts 0 giants 0 throttles 0 input errors 0 CRC 0 frame 0 overrun 0 ignored 0 watchdog 281 multicast 0 pause input 0 input packets with dribble condition detected 95226 packets output 10849674 bytes 0 underruns 0 output errors 0 collisions 1 interface resets 0 unknown protocol drops 0 babbles 0 late collision 0 deferred 0 lost carrier 0 no carrier 0 PAUSE output 0 output buffer failures 0 output buffers swapped out The number of input errors and the number of CRC errors are just a few of the counters in the output of the show interfaces command. The challenge is to decide which counters you need to think about which ones show that a problem is happening and which ones are normal and of no concern. The example highlights several of the counters as examples so that you can start to under- stand which ones point to problems and which ones are just counting normal events that are not problems. The following list shows a short description of each highlighted counter in the order shown in the example: Runts: Frames that did not meet the minimum frame size requirement 64 bytes including the 18-byte destination MAC source MAC type and FCS. Can be caused by collisions. Giants: Frames that exceed the maximum frame size requirement 1518 bytes including the 18-byte destination MAC source MAC type and FCS. Input Errors: A total of many counters including runts giants no buffer CRC frame overrun and ignored counts. CRC: Received frames that did not pass the FCS math can be caused by collisions. Frame: Received frames that have an illegal format for example ending with a partial byte can be caused by collisions. Packets Output: Total number of packets frames forwarded out the interface. Output Errors: Total number of packets frames that the switch port tried to transmit but for which some problem occurred. Collisions: Counter of all collisions that occur when the interface is transmitting a frame. Late Collisions: The subset of all collisions that happen after the 64th byte of the frame has been transmitted. In a properly working Ethernet LAN collisions should occur with- in the first 64 bytes late collisions today often point to a duplex mismatch. Note that many of these counters occur as part of the CSMA/CD process used when half duplex is enabled. Collisions occur as a normal part of the half-duplex logic imposed by CSMA/CD so a switch interface with an increasing collisions counter might not even have a problem. However one problem called late collisions points to the classic duplex mismatch problem.

slide 338:

ptg17246291 284 CCENT/CCNA ICND1 100-105 Official Cert Guide If a LAN design follows cabling guidelines all collisions should occur by the end of the 64th byte of any frame. When a switch has already sent 64 bytes of a frame and the switch receives a frame on that same interface the switch senses a collision. In this case the colli- sion is a late collision and the switch increments the late collision counter in addition to the usual CSMA/CD actions to send a jam signal wait a random time and try again. With a duplex mismatch like the mismatch between SW1 and SW2 in Figure 12-3 the half- duplex interface will likely see the late collisions counter increment. Why The half-duplex interface sends a frame SW1 but the full duplex neighbor SW2 sends at any time even after the 64th byte of the frame sent by the half-duplex switch. So just keep repeating the show interfaces command and if you see the late collisions counter incrementing on a half- duplex interface you might have a duplex mismatch problem. A working interface in an up/up state can still suffer from issues related to the physical cabling as well. The cabling problems might not be bad enough to cause a complete failure but the transmission failures result in some frames failing to pass successfully over the cable. For example excessive interference on the cable can cause the various input error counters to keep growing larger especially the CRC counter. In particular if the CRC errors grow but the collisions counters do not the problem might simply be interference on the cable. The switch counts each collided frame as one form of input error as well. Predicting Where Switches Will Forward Frames This section begins the fourth of five major sections in this chapter. This section looks at a key part of the troubleshooting process for Ethernet LANs: predicting where frames should go in the LAN so that you can compare what should happen versus what is actually happen- ing in a LAN. Predicting the Contents of the MAC Address Table As explained in Chapter 7 “Analyzing Ethernet LAN Switching” switches learn MAC addresses and then use the entries in the MAC address table to make a forwarding/filtering decision for each frame. To know exactly how a particular switch will forward an Ethernet frame you need to examine the MAC address table on a Cisco switch. The more formal troubleshooting process begins with a mental process where you predict where frames should flow in the LAN. As an exercise review Figure 12-4 and try to create a MAC address table on paper for each switch. Include the MAC addresses for both PCs as well as the Gi0/1 MAC address for R1. Assume that all three are assigned to VLAN 10. Then predict which interfaces would be used to forward a frame sent by Fred Barney and R1 to every other device. Gi0/1 Gi0/2 Fa0/12 Fa0/9 Fa0/13 Gi0/1 0200.5555.5555 SW1 SW2 R1 Barney 0200.2222.2222 Fred 0200.1111.1111 Figure 12-4 Sample Network Used in Switch MAC Learning Examples

slide 339:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 285 12 The MAC table entries you predict in this case define where you think frames will flow. Even though this sample network in Figure 12-4 shows only one physical path through the Ethernet LAN the exercise should be worthwhile because it forces you to correlate what you’d expect to see in the MAC address table with how the switches forward frames. Figure 12-5 shows the resulting MAC table entries for PCs Fred and Barney as well as for Router R1. Gi0/1 Gi0/2 Barney 0200.2222.2222 Fa0/12 Fa0/9 Fa0/13 Gi0/1 0200.5555.5555 SW1 SW2 R1 0200.1111.1111 0200.2222.2222 0200.5555.5555 Address VLAN 10 10 10 Fa0/9 Fa0/12 Gi0/1 Interface 0200.1111.1111 0200.2222.2222 0200.5555.5555 Address VLAN 10 10 10 Gi0/2 Gi0/2 Fa0/13 Interface SW1 MAC Table SW2 MAC Table Fred 0200.1111.1111 Figure 12-5 Predictions for MAC Table Entries on SW1 and SW2 While Figure 12-5 shows the concepts Example 12-4 lists the same facts but in the form of the show mac address-table dynamic command on the switches. This command lists all dynamically learned MAC table entries on a switch for all VLANs. Example 12-4 Examining SW1 and SW2 Dynamic MAC Address Table Entries SW1 show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 10 0200.1111.1111 DYNAMIC Fa0/9 10 0200.2222.2222 DYNAMIC Fa0/12 10 0200.5555.5555 DYNAMIC Gi0/1 SW2 show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 10 0200.1111.1111 DYNAMIC Gi0/2 10 0200.2222.2222 DYNAMIC Gi0/2 10 0200.5555.5555 DYNAMIC Fa0/13

slide 340:

ptg17246291 286 CCENT/CCNA ICND1 100-105 Official Cert Guide When predicting the MAC address table entries you need to imagine a frame sent by a device to another device on the other side of the LAN and then determine which switch ports the frame would enter as it passes through the LAN. For example if Barney sends a frame to Router R1 the frame would enter SW1’s Fa0/12 interface so SW1 has a MAC table entry that lists Barney’s 0200.2222.2222 MAC address with Fa0/12. SW1 would for- ward Barney’s frame to SW2 arriving on SW2’s Gi0/2 interface so SW2’s MAC table lists Barney’s MAC address 0200.2222.2222 with interface Gi0/2 . After you predict the expected contents of the MAC address tables you can then examine what is actually happening on the switches as described in the next section. Analyzing the Forwarding Path Troubleshooting revolves around three big ideas: predicting what should happen determin- ing what is happening that is different than what should happen and figuring out why that different behavior is happening. This next section discusses how to look at what is actually happening in a VLAN based on those MAC address tables first using a summary of switch forwarding logic and then showing an example. The following list summarizes switch forwarding logic including the LAN switching features discussed in this book: Step 1. Process functions on the incoming interface if the interface is currently in an up/up connected state as follows: A. If configured apply port security logic to filter the frame as appropriate. B. If the port is an access port determine the interface’s access VLAN. C. If the port is a trunk determine the frame’s tagged VLAN. Step 2. Make a forwarding decision. Look for the frame’s destination MAC address in the MAC address table but only for entries in the VLAN identified in Step 1. If the destination MAC is… A. Found unicast forward the frame out the only interface listed in the matched address table entry. B. Not found unicast flood the frame out all other access ports except the incoming port in that same VLAN plus out trunks that have not restricted the VLAN from that trunk as discussed in Chapter 11 “Implementing Ethernet Virtual LANs” as related to the show interfaces trunk command. C. Broadcast flood the frame with the same rules as the previous step. For an example of this process consider a frame sent by Barney to its default gateway R1 0200.5555.5555. Using the steps just listed the following occurs: Step 1. Input interface processing: A. The port does not happen to have port security enabled. B. SW1 receives the frame on its Fa0/12 interface an access port in VLAN 10. Step 2. Make a forwarding decision: SW1 looks in its MAC address table for entries in VLAN 10: A. SW1 finds an entry known unicast for 0200.5555.5555 associated with VLAN 10 outgoing interface Gi0/1 so SW1 forwards the frame only out interface Gi0/1. This link is a VLAN trunk so SW1 adds a VLAN 10 tag to the 802.1Q trunking header.

slide 341:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 287 12 At this point the frame with source 0200.2222.2222 Barney and destination 0200.5555.5555 R1 is on its way to SW2. You can then apply the same logic for SW2 as follows: Step 1. Input interface processing: A. The port does not happen to have port security enabled. B. SW2 receives the frame on its Gi0/2 interface a trunk the frame lists a tag of VLAN 10. SW2 will remove the 802.1Q header as well. Step 2. Make a forwarding decision: SW2 looks for its MAC table for entries in VLAN 10: A. SW2 finds an entry known unicast for 0200.5555.5555 associated with VLAN 10 outgoing interface Fa0/13 so SW2 forwards the frame only out interface Fa0/13. At this point the frame should be on its way over the Ethernet cable between SW2 and R1. Analyzing Port Security Operations on an Interface Generally speaking any analysis of the forwarding process should consider any security features that might discard some frames or packets. For example both routers and switches can be configured with access control lists ACL that examine the packets and frames being sent or received on an interface with the router or switch discarding those packets/frames. This book does not include coverage of switch ACLs but the exams do cover a switch fea- ture called port security. As covered in the ICND1 book’s Chapter 9 “Configuring Switch Interfaces” the port security feature can be used to cause the switch to discard some frames sent into and out of an interface. Port security has three basic features with which it deter- mines which frames to filter: ■ Limit which specific MAC addresses can send and receive frames on a switch interface discarding frames to/from other MAC addresses ■ Limit the number of MAC addresses using the interface discarding frames to/from MAC addresses learned after the maximum limit is reached ■ A combination of the previous two points The first port security troubleshooting step should be to find which interfaces have port security enabled followed by a determination as to whether any violations are currently occurring. The trickiest part relates to the differences in what the IOS does in reaction to violations based on the switchport port-security violation violation-mode interface sub- command which tells the switch what to do when a violation occurs. The general process to find port security issues is as follows: Step 1. Identify all interfaces on which port security is enabled show running-config or show port-security. Step 2. Determine whether a security violation is currently occurring based in part on the violation mode of the interface’s port security configuration as follows: A. shutdown: The interface will be in an err-disabled state and the port secu- rity port status will be secure-down.

slide 342:

ptg17246291 288 CCENT/CCNA ICND1 100-105 Official Cert Guide B. restrict: The interface will be in a connected state the port security port status will be secure-up but the show port-security interface command will show an incrementing violations counter. C. protect: The interface will be in a connected state and the show port-security interface command will not show an incrementing violations counter. Step 3. In all cases compare the port security configuration to the diagram and to the Last Source Address field in the output of the show port-security interface command. Because IOS reacts so differently with shutdown mode as compared to restrict and protect modes the next few pages explain the differences—first for shutdown mode then for the other two modes. Troubleshooting Shutdown Mode and Err-disabled Recovery Troubleshooting Step 2A refers to the interface err-disabled error-disabled state. This state verifies that the interface has been configured to use port security that a violation has occurred and that no traffic is allowed on the interface at the present time. This interface state implies that the shutdown violation mode is used because it is the only one of the three port security modes that causes the interface to be disabled. To recover from an err-disabled state the interface must be shut down with the shutdown command and then enabled with the no shutdown command. Example 12-5 lists an exam- ple in which the interface is in an err-disabled state. Example 12-5 Using Port Security to Define Correct MAC Addresses of Particular Interfaces The first command lists all interfaces on which port security has been enabled and the violation mode under the heading "Security Action." SW1 show port-security Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action Count Count Count --------------------------------------------------------------------------- Fa0/13 1 1 1 Shutdown --------------------------------------------------------------------------- Total Addresses in System excluding one mac per port : 0 Max Addresses limit in System excluding one mac per port : 8192 The next command shows the err-disabled state implying a security violation. SW1 show interfaces Fa0/13 status Port Name Status Vlan Duplex Speed Type Fa0/13 err-disabled 1 auto auto 10/100BaseTX The next command’s output has shading for several of the most important facts. SW1 show port-security interface Fa0/13

slide 343:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 289 12 Port Security : Enabled Port Status : Secure-shutdown Violation Mode : Shutdown Aging Time : 0 mins Aging Type : Absolute SecureStatic Address Aging : Disabled Maximum MAC Addresses : 1 Total MAC Addresses : 1 Configured MAC Addresses : 1 Sticky MAC Addresses : 0 Last Source Address:Vlan : 0200.3333.3333:2 Security Violation Count : 1 The output of the show port-security interface command lists a couple of items helpful in the troubleshooting process. The port status of secure-shutdown means that the interface is disabled for all traffic as a result of a violation while in port security shutdown mode this state is not used by the protect and restrict modes. The port security port status of secure- shutdown also means that the interface state should be err-disabled. Note that in shutdown mode the violations counter at the bottom of the output does not keep incrementing. Basically once the first violating frame triggers IOS to move the port to an err-disabled state IOS ignores any other incoming frames not even counting them until the engineer uses the shutdown and no shutdown commands on the interface in succes- sion. Note that the process of recovering the interface also resets the violation counter back to 0. Finally note that the second-to-last line lists the source MAC address of the last frame received on the interface. This value can prove useful in identifying the MAC address of the device that caused the violation. Figure 12-6 summarizes these behaviors assuming the same scenario shown in the example. F0/13: Status: Err-disabled show port-security interface 10X Source: MAC1 Secure-Down Counter: 1 Syslog: 10 Msgs Last MAC: MAC1 Figure 12-6 Summary of Actions: Port Security Violation Mode Shutdown Troubleshooting Restrict and Protect Modes The restrict and protect violation modes take a much different approach to securing ports. These modes still discard offending traffic but the interface remains in a connected up/ up state and in a port security state of secure-up. As a result the port continues to forward good traffic and discard offending traffic.

slide 344:

ptg17246291 290 CCENT/CCNA ICND1 100-105 Official Cert Guide Having a port in a seemingly good state that also discards traffic can be a challenge when troubleshooting. Basically you have to know about this possible pitfall and then know how to tell when port security is discarding some traffic on a port even though the interface sta- tus looks good. The show port-security interface command reveals whether protect mode has discarded frames using the “last source address” item in the output. Example 12-6 shows a sample con- figuration and show command when using protect mode. In this case the port is configured to allow Fa0/13 to receive frames sent by 0200.1111.1111 only. Ten frames have arrived with a variety of source MAC addresses with the last frame’s source MAC address being 0200.3333.3333. Example 12-6 Port Security Using Protect Mode SW1 show running-config Lines omitted for brevity interface FastEthernet0/13 switchport mode access switchport port-security switchport port-security mac-address 0200.1111.1111 switchport port-security violation protect Lines omitted for brevity SW1 show port-security interface Fa0/13 Port Security : Enabled Port Status : Secure-up Violation Mode : Protect Aging Time : 0 mins Aging Type : Absolute SecureStatic Address Aging : Disabled Maximum MAC Addresses : 1 Total MAC Addresses : 1 Configured MAC Addresses : 1 Sticky MAC Addresses : 0 Last Source Address:Vlan : 0200.3333.3333:1 Security Violation Count : 0 In protect mode the show port-security interface command reveals practically nothing about whether the interfaces happen to be discarding traffic or not. For instance in this case this show command output was gathered after many frames had been sent by a PC with MAC address 0200.3333.3333 with all the frames being discarded by the switch because of port security. The command output shows the disallowed PC’s 0200.3333.3333 MAC address as the last source MAC address in a received frame. However if another frame with an allowed MAC address arrived in this case source MAC 0200.1111.1111 the next instance of the show command would list 0200.1111.1111 as the last source address. In particular note that the interface remains in a secure-up state and the violation counter does not increment.

slide 345:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 291 12 Figure 12-7 summarizes the key points about the operation of Port Security protect mode assuming a mix of frames with different source addresses. The figure emphasizes unpredict- ability of the last source MAC listed in the output and the fact that the counter does not increment and that no syslog messages are generated for violating frames. F0/13: Status: Connected show port-security interface 10x Source: Various Secure-Up Counter: 0 Syslog: NO Last MAC: Figure 12-7 Summary of Actions: Port Security Violation Mode Protect If this example had used violation mode restrict instead of protect the port status would have also remained in a secure-up state however IOS would show some indication of port security activity such as the incrementing violation counter as well as syslog messages. Example 12-7 shows an example of the violation counter and ends with an example port security syslog message. In this case 97 incoming frames so far violated the rules with the most recent frame having a source MAC address of 0200.3333.3333. Example 12-7 Port Security Using Violation Mode Restrict SW1 show port-security interface fa0/13 Port Security : Enabled Port Status : Secure-up Violation Mode : Restrict Aging Time : 0 mins Aging Type : Absolute SecureStatic Address Aging : Disabled Maximum MAC Addresses : 1 Total MAC Addresses : 1 Configured MAC Addresses : 1 Sticky MAC Addresses : 0 Last Source Address:Vlan : 0200.3333.3333:1 Security Violation Count : 97 The following log message also points to a port security issue. 01:46:58: PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred caused by MAC address 0200.3333.3333 on port FastEthernet0/13. Figure 12-8 summarizes the key points about the restrict mode for port security. In this case the figure matches the same scenario as the example again with 97 total violating frames arriving so far with the most recent being from source MAC MAC3.

slide 346:

ptg17246291 292 CCENT/CCNA ICND1 100-105 Official Cert Guide F0/13: Status: Connected show port-security interface 97X Source: MAC3 Secure-Up Counter: +97 Syslog: 97 Msgs Last MAC: MAC3 Figure 12-8 Summary of Actions: Port Security Violation Mode Restrict For the exams a port security violation might not be a problem it might be the exact func- tion intended. The question text might well explicitly state what port security should be doing. In these cases it can be quicker to just immediately look at the port security configu- ration. Then compare the configuration to the MAC addresses of the devices connected to the interface. The most likely problem on the exams is that the MAC addresses have been misconfigured or that the maximum number of MAC addresses has been set too low. Analyzing VLANs and VLAN Trunks A switch’s forwarding process as discussed earlier in the section “Analyzing the Forwarding Path” depends in part on VLANs and VLAN trunking. Before a switch can forward frames in a particular VLAN the switch must know about a VLAN and the VLAN must be active. And before a switch can forward a frame over a VLAN trunk the trunk must currently allow that VLAN to pass over the trunk. This final of the five major sections in this chap- ter focuses on VLAN and VLAN trunking issues specifically issues that impact the frame switching process. The four potential issues are as follows: Step 1. Identify all access interfaces and their assigned access VLANs and reassign into the correct VLANs as needed. Step 2. Determine whether the VLANs both exist configured or learned with VTP and are active on each switch. If not configure and activate the VLANs to resolve problems as needed. Step 3. Check the allowed VLAN lists on the switches on both ends of the trunk and ensure that the lists of allowed VLANs are the same. Step 4. Check for incorrect configuration settings that result in one switch operating as a trunk with the neighboring switch not operating as a trunk. Ensuring That the Right Access Interfaces Are in the Right VLANs To ensure that each access interface has been assigned to the correct VLAN engineers simply need to determine which switch interfaces are access interfaces instead of trunk interfaces determine the assigned access VLANs on each interface and compare the infor- mation to the documentation. The show commands listed in Table 12-3 can be particularly helpful in this process.

slide 347:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 293 12 Table 12-3 Commands That Can Find Access Ports and VLANs EXEC Command Description sh ow vlan br i ef sh ow vlan Lists each VLAN and all interfaces assigned to that VLAN but does not include operational trunks sh ow vlan i d num Lists both access and trunk ports in the VLAN sh ow int er f a ces type number switchport Identifies the interface’s access VLAN and voice VLAN plus the configured and operational mode access or trunk sh ow ma c a d dr ess- t a b l e Lists MAC table entries including the associated VLAN If possible start this step with the show vlan and show vlan brief commands because they list all the known VLANs and the access interfaces assigned to each VLAN. Be aware how- ever that these two commands do not list operational trunks. The output does list all other interfaces those not currently trunking no matter whether the interface is in a working or nonworking state. If the show vlan and show interface switchport commands are not available in a particular exam question the show mac address-table command can also help identify the access VLAN. This command lists the MAC address table with each entry including a MAC address interface and VLAN ID. If the exam question implies that a switch interface con- nects to a single device PC you should only see one MAC table entry that lists that par- ticular access interface the VLAN ID listed for that same entry identifies the access VLAN. You cannot make such assumptions for trunking interfaces. After you determine the access interfaces and associated VLANs if the interface is assigned to the wrong VLAN use the switchport access vlan vlan-id interface subcommand to assign the correct VLAN ID. Access VLANs Not Being Defined Switches do not forward frames for VLANs that are a not configured or b configured but disabled shut down. This section summarizes the best ways to confirm that a switch knows that a particular VLAN exists and if it exists determines the state of the VLAN. First on the issue of whether a VLAN is defined a VLAN can be defined to a switch in two ways: using the vlan number global configuration command or it can be learned from another switch using VTP. This book purposefully ignores VTP as much as possible so for this discussion consider that the only way for a switch to know about a VLAN is to have a vlan command configured on the local switch. Next the show vlan command always lists all VLANs known to the switch but the show running-config command does not. Switches configured as VTP servers and clients do not list the vlan commands in the running-config nor the startup-config file on these switches you must use the show vlan command. Switches configured to use VTP transparent mode or that disable VTP list the vlan configuration commands in the configuration files. Use the show vtp status command to learn the current VTP mode of a switch. After you determine that a VLAN does not exist the problem might be that the VLAN sim- ply needs to be defined. If so follow the VLAN configuration process as covered in detail in Chapter 11 .

slide 348:

ptg17246291 294 CCENT/CCNA ICND1 100-105 Official Cert Guide Access VLANs Being Disabled For any existing VLANs also verify whether the VLAN is active. The show vlan command should list one of two VLAN state values depending on the current state: either active or act/lshut. The second of these states means that the VLAN is shut down. Shutting down a VLAN disables the VLAN on that switch only so that the switch will not forward frames in that VLAN. Switch IOS gives you two similar configuration methods with which to disable shutdown and enable no shutdown a VLAN. Example 12-8 shows how first by using the global command no shutdown vlan number and then using the VLAN mode subcommand no shutdown. The example shows the global commands enabling and disabling VLANs 10 and 20 respectively and using VLAN subcommands to enable and disable VLANs 30 and 40 respectively. Example 12-8 Enabling and Disabling VLANs on a Switch SW2 show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1 Fa0/2 Fa0/3 Fa0/4 Fa0/5 Fa0/6 Fa0/7 Fa0/8 Fa0/9 Fa0/10 Fa0/11 Fa0/12 Fa0/14 Fa0/15 Fa0/16 Fa0/17 Fa0/18 Fa0/19 Fa0/20 Fa0/21 Fa0/22 Fa0/23 Fa0/24 Gi0/1 10 VLAN0010 act/lshut Fa0/13 20 VLAN0020 active 30 VLAN0030 act/lshut 40 VLAN0040 active SW2 configure terminal Enter configuration commands one per line. End with CNTL/Z. SW2config no shutdown vlan 10 SW2config shutdown vlan 20 SW2config vlan 30 SW2config-vlan no shutdown SW2config-vlan vlan 40 SW2config-vlan shutdown SW2config-vlan Mismatched Trunking Operational States Trunking can be configured correctly so that both switches forward frames for the same set of VLANs. However trunks can also be misconfigured with a couple of different results. In some cases both switches conclude that their interfaces do not trunk. In other cases one switch believes that its interface is correctly trunking while the other switch does not. The most common incorrect configuration—which results in both switches not trunking—is a configuration that uses the switchport mode dynamic auto command on both switches on

slide 349:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 295 12 the link. The word “auto” just makes us all want to think that the link would trunk automati- cally but this command is both automatic and passive. As a result both switches passively wait on the other device on the link to begin negotiations. With this particular incorrect configuration the show interfaces switchport command on both switches confirms both the administrative state auto as well as the fact that both switches operate as “static access” ports. Example 12-9 highlights those parts of the output from this command. Example 12-9 Operational Trunking State SW2 show interfaces gigabit0/2 switchport Name: Gi0/2 Switchport: Enabled Administrative Mode: dynamic auto Operational Mode: static access Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native lines omitted for brevity A different incorrect trunking configuration results in one switch with an operational state of “trunk” while the other switch has an operational state of “static access.” When this com- bination of events happens the interface works a little. The status on each end will be up/up or connected. Traffic in the native VLAN will actually cross the link successfully. However traffic in all the rest of the VLANs will not cross the link. Figure 12-9 shows the incorrect configuration along with which side trunks and which does not. The side that trunks SW1 in this case enables trunking always using the command switchport mode trunk. However this command does not disable DTP negotiations. To cause this particular problem SW1 also disables DTP negotiation using the switchport nonegotiate command. SW2’s configuration also helps create the problem by using a trunk- ing option that relies on DTP. Because SW1 has disabled DTP SW2’s DTP negotiations fail and SW2 does not trunk. Gi0/1 Gi0/2 switchport mode trunk switchport nonegotiate switchport mode dynamic desirable SW1 SW2 Frame has 802.1Q: Discard VLAN 10 Eth. Frame 2 1 Trunk Mode: On Trunk Mode: Access Figure 12-9 Mismatched Trunking Operational States In this case SW1 treats its G0/1 interface as a trunk and SW2 treats its G0/2 interface as an access port not a trunk. As shown in the figure at Step 1 SW1 could for example forward a frame in VLAN 10 Step 1. However SW2 would view any frame that arrives with an 802.1Q header as illegal because SW2 treats its G0/2 port as an access port. So SW2 dis- cards any 802.1Q frames received on that port.

slide 350:

ptg17246291 296 CCENT/CCNA ICND1 100-105 Official Cert Guide To deal with the possibility of this problem always check the trunk’s operational state on both sides of the trunk. The best commands to check trunking-related facts are show interfaces trunk and show interfaces switchport. NOTE Frankly in real life just avoid this kind of configuration. However the switches do not prevent you from making these types of mistakes so you need to be ready. Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment for more details. Table 12-4 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 12-4 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Answer DIKTA questions Book PCPT Review memory tables Book DVD/website Review command tables Book Review All the Key Topics Table 12-5 Key T opics for Chapter 12 Key Topic Element Description Page Number List Explanation of troubleshooting methodologies per exam topics 274 Table 12-2 Two types of interface state terms and their meanings 279 Example 12-1 Example that shows how to find the speed and duplex settings as well as whether they were learned through autonegotiation 280 List Defaults for IEEE autonegotiation 281 List Explanations of different error statistics on switch interfaces 283 List Summary of switch forwarding steps 286 List Port security troubleshooting checklist 287 List Potential issues to examine for VLANs and VLAN trunks 292 Table 12-3 Commands that identify access VLANs assigned to ports 293 Figure 12-9 How to poorly configure switches to reach a mismatched trunk operational state on the two ends of the trunk 295

slide 351:

ptg17246291 Chapter 12: Troubleshooting Ethernet LANs 297 12 Key Terms You Should Know up and up connected error disabled problem isolation root cause duplex mismatch resolve escalate Command References Tables 12-6 and 12-7 list configuration and verification commands used in this chapter respectively. As an easy review exercise cover the left column in a table read the right col- umn and try to recall the command without looking. Then repeat the exercise covering the right column and try to recall what the command does. Table 12-6 Commands for Catalyst Switch Configuration Command Description sh ut d ow n no sh ut d ow n Interface subcommands that administratively disable and enable an interface respectively sw it ch por t por t -sec ur it y violation protect | restrict | shutdown Interface subcommand that tells the switch what to do if an inappropriate MAC address tries to access the network through a secure switch port speed auto | 10 | 100 | 1000 Interface subcommand that manually sets the interface speed dup l e x auto | full | half Interface subcommand that manually sets the interface duplex Table 12-7 Chapter 12 EXEC Command Reference Command Description sh ow ma c a d dr ess- t a b l e dynamic | static address hw-addr interface interface-id vlan vlan-id Displays the MAC address table. The static option displays information about the restricted or static settings. sh ow por t -sec ur it y interface interface-id address Displays information about security options configured on an interface. sh ow int er f a ces type number Displays detailed information about interface status settings and counters. sh ow int er f a ces d esc r ipt i on Displays one line of information per interface with a two-item status similar to the show interfaces command status and includes any description that is configured on the interfaces. sh ow int er f a ces type number status Displays summary information about interface status and settings including actual speed and duplex a single-item status code and whether the interface was autonegotiated. sh ow int er f a ces type number switchport Displays a large variety of configuration settings and current operational status including VLAN trunking details access and voice VLAN and native VLAN. sh ow int er f a ces type number trunk Lists information about the currently operational trunks or just for the trunk listed in the command and the VLANs supported on those trunks. sh ow vlan br i ef sh ow vlan Lists each VLAN and all interfaces assigned to that VLAN but does not include trunks. sh ow vlan i d num Lists both access and trunk ports in the VLAN. sh ow v t p st at us Lists the current VTP status including the current mode.

slide 352:

ptg17246291 Keep track of your part review progress with the checklist shown in Table P3-1. Details on each task follow the table. Table P3-1 Part III Part Review Checklist Activity 1st Date Completed 2nd Date Completed Repeat All DIKTA Questions Answer Part Review Questions Review Key Topics Create Command Mind Maps by Category Do Labs Repeat All DIKTA Questions For this task answer the “Do I Know This Already” questions again for the chapters in this part of the book using the PCPT software. Answer Part Review Questions For this task answer the Part Review questions for this part of the book using the PCPT software. Part III Review

slide 353:

ptg17246291 Review Key Topics Review all key topics in all chapters in this part either by browsing the chapters or by using the Key Topics application on the DVD or companion website. Create Terminology Command and Troubleshooting Causes Mind Maps Part III of this book discusses the more advanced Ethernet concepts for this book but from many directions: design implementation and troubleshooting. These next three mind maps help you collect and organize your thoughts from each direction. Terminology: Start with a blank mind map and create a map that organizes all the terms you can recall from this part especially for Chapters 10 design and 11 VLANs and trunking. After you have added all the terms you can recall and organized which terms relate by connecting the terms into a hierarchy or other organization go back to the Key Terms list at the end of each chapter. Add any terms you forgot to list in your map to this mind map. Commands: Create a mind map that focuses on remembering the config and EXEC com- mands related to VLANs and trunking. Do not be worried about every single parameter on each command this exercise is more about remembering the commands available to you for each feature. Once you do what you can from memory go back and check your map against the Chapter 11 Command Reference tables at the end of the chapter and add to your map. Troubleshooting causes: Chapter 12 works through several issues that can cause prob- lems for interfaces port security and VLANs and VLAN trunks. Create one mind map with branches for each of these from memory with the usual goal of exercising your memory and building more connectors in your brain. Then skim the chapter and add to your map. Labs Depending on your chosen lab tool here are some suggestions for what to do in lab: Pearson Network Simulator: If you use the full Pearson ICND1 or CCNA simulator focus more on the configuration scenario and troubleshooting scenario labs associated with the topics in this part of the book. These types of labs include a larger set of topics and work well as Part Review activities. See the Introduction for some details about how to find which labs are about topics in this part of the book. Config Labs: In your idle moments review and repeat any of the Config Labs for this book part in the author’s blog launch from blog.certskills.com/ccent and navigate to the Hands-on Config labs. Other: If using other lab tools as a few suggestions: make sure and experiment heavily with VLAN configuration and VLAN trunking configuration. Also experiment with the combinations of port security settings detailed in Chapter 12 focusing on the output from the show port-security command. Finally spend some time changing interface set- tings like speed and duplex on a link between two switches to make sure that you under- stand which cases would result in a duplex mismatch.

slide 354:

ptg17246291 The book makes a big transition at this point. Part I gave you a broad introduction to net- working and Parts II and III went into some detail about the dominant LAN technology today: Ethernet. Part IV transitions from Ethernet to the network layer details that sit above Ethernet and WAN technology specifically IPv4. In fact the next four parts of the book discuss IPv4-specific features as shown in Figure P4-1. Figure P4-1 Roadmap of Book Parts So Far Ethernet addressing although important did not require planning. The network engineer needs to understand MAC addresses but MAC already exists on each Ethernet NIC and switches learn the Ethernet MAC addresses dynamically without even needing to be con- figured to do so. Conversely IP addressing requires planning along with a much deeper understanding of the internal structure of the addresses. As a result this book breaks down the addressing details into six separate chapters spread across Parts IV and VI. Part IV examines most of the basic details of IPv4 addressing and subnet ting mostly from the perspective of operating an IP network. Chapter 13 takes a grand tour of IPv4 address- ing as implemented inside a typical enterprise network. Chapters 14 15 and 16 look at some of the specific questions people must ask themselves when operating an IPv4 network. Note that Part VI also discusses other details related to IPv4 addressing with those chapters taking more of a design approach to IP addressing. Part I Fundamentals Fundamentals Ethernet Part II Basic Implementation Part III Design and Tshoot Part IV Address and Subnet IP Version 4 Part V Basic Implementation Part VI Design and Tshoot Part VII IPv4 Services

slide 355:

ptg17246291 Part IV IP Version 4 Addressing and Subnetting Chapter 13: Perspectives on IPv4 Subnetting Chapter 14: Analyzing Classful IPv4 Networks Chapter 15: Analyzing Subnet Masks Chapter 16: Analyzing Existing Subnets Part IV Review

slide 356:

ptg17246291 CHAPTER 13 Perspectives on IPv4 Subnetting This chapter covers the following exam topics: 1.0 Network Fundamentals 1.8 Configure verify and troubleshoot IPv4 addressing and subnetting 1.9 Compare and contrast IPv4 address types 1.9.a Unicast 1.10 Describe the need for private IPv4 addressing Most entry-level networking jobs require you to operate and troubleshoot a network using a preexisting IP addressing and subnetting plan. The CCENT and CCNA Routing and Switching exams assess your readiness to use preexisting IP addressing and subnetting infor- mation to perform typical operations tasks like monitoring the network reacting to pos- sible problems and troubleshooting those problems. However you also need to understand how networks are designed and why. The thought processes used when monitoring any network continually ask the question “Is the network working as designed” If a problem exists you must consider questions such as “What happens when the network works normally and what is different right now” Both ques- tions require you to understand the intended design of the network including details of the IP addressing and subnetting design. This chapter provides some perspectives and answers for the bigger issues in IPv4 address- ing. What addresses can be used so that they work properly What addresses should be used When told to use certain numbers what does that tell you about the choices made by some other network engineer How do these choices impact the practical job of configuring switches routers hosts and operating the network on a daily basis This chapter hopes to answer these questions while revealing details of how IPv4 addresses work. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 13-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Analyze Requirements 1–3 Make Design Choices 4–7

slide 357:

ptg17246291 1. Host A is a PC connected to switch SW1 and assigned to VLAN 1. Which of the fol- lowing are typically assigned an IP address in the same subnet as host A Choose two answers. a. The local router’s WAN interface b. The local router’s LAN interface c. All other hosts attached to the same switch d. Other hosts attached to the same switch and also in VLAN 1 2. Why does the formula for the number of hosts per subnet 2 H – 2 require the sub- traction of two hosts a. To reserve two addresses for redundant default gateways routers b. To reserve the two addresses required for DHCP operation c. To reserve addresses for the subnet ID and default gateway router d. To reserve addresses for the subnet broadcast address and subnet ID 3. A Class B network needs to be subnetted such that it supports 100 subnets and 100 hosts/subnet. Which of the following answers list a workable combination for the number of network subnet and host bits Choose two answers. a. Network 16 subnet 7 host 7 b. Network 16 subnet 8 host 8 c. Network 16 subnet 9 host 7 d. Network 8 subnet 7 host 17 4. Which of the following are private IP networks Choose two answers. a. 172.31.0.0 b. 172.32.0.0 c. 192.168.255.0 d. 192.1.168.0 e. 11.0.0.0 5. Which of the following are public IP networks Choose three answers. a. 9.0.0.0 b. 172.30.0.0 c. 192.168.255.0 d. 192.1.168.0 e. 1.0.0.0

slide 358:

ptg17246291 304 CCENT/CCNA ICND1 100-105 Official Cert Guide 6. Before Class B network 172.16.0.0 is subnetted by a network engineer what parts of the structure of the IP addresses in this network already exist with a specific size Choose two answers. a. Network b. Subnet c. Host d. Broadcast 7. A network engineer spends time thinking about the entire Class B network 172.16.0.0 and how to subnet that network. He then chooses how to subnet this Class B net- work and creates an addressing and subnetting plan on paper showing his choices. If you compare his thoughts about this network before subnetting the network to his thoughts about this network after mentally subnetting the network which of the fol- lowing occurred to the parts of the structure of addresses in this network a. The subnet part got smaller. b. The host part got smaller. c. The network part got smaller. d. The host part was removed. e. The network part was removed. Foundation Topics Introduction to Subnetting Say you just happened to be at the sandwich shop when they were selling the world’s lon- gest sandwich. You’re pretty hungry so you go for it. Now you have one sandwich but at over 2 kilometers long you realize it’s a bit more than you need for lunch all by yourself. To make the sandwich more useful and more portable you chop the sandwich into meal- size pieces and give the pieces to other folks around you who are also ready for lunch. Huh Well subnetting at least the main concept is similar to this sandwich story. You start with one network but it is just one large network. As a single large entity it might not be useful and it is probably far too large. To make it useful you chop it into smaller pieces called subnets and assign those subnets to be used in different parts of the enter- prise internetwork. This short section introduces IP subnetting. First it shows the general ideas behind a com- pleted subnet design that indeed chops or subnets one network into subnets. The rest of this section describes the many design steps that you would take to create just such a subnet design. By the end of this section you should have the right context to then read through the subnetting design steps introduced throughout the rest of this chapter . NOTE This chapter and in fact the rest of the chapters in this book up until Chapter 28 “Fundamentals of IP Version 6” focuses on IPv4 rather than IPv6. All references to IP refer to IPv4 unless otherwise stated.

slide 359:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 305 13 Subnetting Defined Through a Simple Example An IP network—in other words a Class A B or C network—is simply a set of consecutively numbered IP addresses that follows some preset rules. These Class A B and C rules first introduced back in section “Class A B and C IP Networks” of Chapter 4 “Fundamentals of IPv4 Addressing and Routing” define that for a given network all the addresses in the network have the same value in some of the octets of the addresses. For example Class B network 172.16.0.0 consists of all IP addresses that begin with 172.16: 172.16.0.0 172.16.0.1 172.16.0.2 and so on through 172.16.255.255. Another example: Class A network 10.0.0.0 includes all addresses that begin with 10. An IP subnet is simply a subset of a Class A B or C network. If fact the word subnet is a shortened version of the phrase subdivided network. For example one subnet of Class B network 172.16.0.0 could be the set of all IP addresses that begin with 172.16.1 and would include 172.16.1.0 172.16.1.1 172.16.1.2 and so on up through 172.16.1.255. Another subnet of that same Class B network could be all addresses that begin with 172.16.2. To give you a general idea Figure 13-1 shows some basic documentation from a completed subnet design that could be used when an engineer subnets Class B network 172.16.0.0. EoMPLS R1 R2 R3 172.16.2.___ 172.16.3.___ 172.16.5.___ 172.16.1.___ Class B 172.16.0.0 First 3 Octets are Equal Subnet Design: 172.16.4.___ Figure 13-1 Subnet Plan Document The design shows five subnets: one for each of the three LANs and one each for the two WAN links. The small text note shows the rationale used by the engineer for the subnets: Each subnet includes addresses that have the same value in the first three octets. For exam- ple for the LAN on the left the number shows 172.16.1.__ meaning “all addresses that begin with 172.16.1.” Also note that the design as shown does not use all the addresses in Class B network 172.16.0.0 so the engineer has left plenty of room for growth. Answers to the “Do I Know This Already” quiz: 1 B D 2 D 3 B C 4 A C 5 A D E 6 A C 7 B

slide 360:

ptg17246291 306 CCENT/CCNA ICND1 100-105 Official Cert Guide Operational View Versus Design View of Subnetting Most IT jobs require you to work with subnetting from an operational view. That is someone else before you got the job designed how IP addressing and subnetting would work for that particular enterprise network. You need to interpret what someone else has already chosen. To fully understand IP addressing and subnetting you need to think about subnetting from both a design and operational perspective. For example Figure 13-1 simply states that in all these subnets the first three octets must be equal. Why was that convention chosen What alternatives exist Would those alternatives be better for your internetwork today All these questions relate more to subnetting design rather than to operation. To help you see both perspectives some chapters in this part of the book focus more on design issues while others focus more on operations by interpreting some existing design. This current chapter happens to move through the entire design process for the purpose of introducing the bigger picture of IP subnetting. Following this chapter the next three chapters each take one topic from this chapter and examine it more closely either from an operational or design perspective. The remaining three main sections of this chapter examine each of the steps listed in Figure 13-2 in sequence . Plan Implementation • Subnets Locations • Static IP • DHCP Ranges Design Subnets • Choose Network • Choose 1 Mask • List All Subnets Analyze Needs • Subnets • Hosts/Subnet • 1 Size Subnet Figure 13-2 Subnet Planning Design and Implementation Tasks Analyze Subnetting and Addressing Needs This section discusses the meaning of four basic questions that can be used to analyze the addressing and subnetting needs for any new or changing enterprise network: 1. Which hosts should be grouped together into a subnet 2. How many subnets does this network require 3. How many host IP addresses does each subnet require 4. Will we use a single subnet size for simplicity or not Rules About Which Hosts Are in Which Subnet Every device that connects to an IP internetwork needs to have an IP address. These devices include computers used by end users servers mobile phones laptops IP phones tablets and networking devices like routers switches and firewalls. In short any device that uses IP to send and receive packets needs an IP address.

slide 361:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 307 13 NOTE When discussing IP addressing the term network has specific meaning: a Class A B or C IP network. To avoid confusion with that use of the term network this book uses the terms internetwork and enterprise network when referring to a collection of hosts routers switches and so on. The IP addresses must be assigned according to some basic rules and for good reasons. To make routing work efficiently IP addressing rules group addresses into groups called sub- nets. The rules are as follows: ■ Addresses in the same subnet are not separated by a router. ■ Addresses in different subnets are separated by at least one router. Figure 13-3 shows the general concept with hosts A and B in one subnet and host C in another. In particular note that hosts A and B are not separated from each other by any routers. However host C separated from A and B by at least one router must be in a dif- ferent subnet. A Second Subnet One Subnet A Third Subnet R1 R2 A B C Figure 13-3 PC A and B in One Subnet and PC C in a Different Subnet The idea that hosts on the same link must be in the same subnet is much like the postal code concept. All mailing addresses in the same town use the same postal code ZIP codes in the United States. Addresses in another town whether relatively nearby or on the other side of the country have a different postal code. The postal code gives the postal service a better ability to automatically sort the mail to deliver it to the right location. For the same general reasons hosts on the same LAN are in the same subnet and hosts in different LANs are in different subnets. Note that the point-to-point WAN link in the figure also needs a subnet. Figure 13-3 shows Router R1 connected to the LAN subnet on the left and to a WAN subnet on the right. Router R2 connects to that same WAN subnet. To do so both R1 and R2 will have IP addresses on their WAN interfaces and the addresses will be in the same subnet. An Ethernet over MPLS EoMPLS WAN link has the same IP addressing needs with each of the two routers having an IP address in the same subnet. The Ethernet LANs in Figure 13-3 also show a slightly different style of drawing using simple lines with no Ethernet switch. Drawings of Ethernet LANs when the details of the LAN switches do not matter simply show each device connected to the same line as shown in Figure 13-3. This kind of drawing mimics the original Ethernet cabling before switches and hubs existed.

slide 362:

ptg17246291 308 CCENT/CCNA ICND1 100-105 Official Cert Guide Finally because the routers’ main job is to forward packets from one subnet to another routers typically connect to multiple subnets. For example in this case Router R1 connects to one LAN subnet on the left and one WAN subnet on the right. To do so R1 will be con- figured with two different IP addresses one per interface. These addresses will be in differ- ent subnets because the interfaces connect the router to different subnets. Determining the Number of Subnets To determine the number of subnets required the engineer must think about the internet- work as documented and count the locations that need a subnet. To do so the engineer requires access to network diagrams VLAN configuration details and details about WAN links. For the types of links discussed in this book you should plan for one subnet for every ■ VLAN ■ Point-to-point serial link ■ Ethernet emulation WAN link EoMPLS NOTE WAN technologies like MPLS allow subnetting options other than one subnet per pair of routers on the WAN but this book only uses WAN technologies that have one sub- net for each point-to-point WAN connection between two routers. For example imagine that the network planner has only Figure 13-4 on which to base the subnet design. B1 B3 B2 Core Figure 13-4 Four-Site Internetwork with Small Central Site The number of subnets required cannot be fully predicted with only this figure. Certainly three subnets will be needed for the WAN links one per link. However each LAN switch can be configured with a single VLAN or with multiple VLANs. You can be certain that you need at least one subnet for the LAN at each site but you might need more. Next consider the more detailed version of the same figure shown in Figure 13-5. In this case the figure shows VLAN counts in addition to the same Layer 3 topology the routers and the links connected to the routers. It also shows that the central site has many more switches but the key fact on the left regardless of how many switches exist is that the central site has a total of 12 VLANs. Similarly the figure lists each branch as having two VLANs. Along with the same three WAN subnets this internetwork requires 21 subnets.

slide 363:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 309 13 2 VLANs 2 VLANs 2 VLANs 12 VLANs Legend: - Subnet B1 B3 B2 Core Figure 13-5 Four-Site Internetwork with Larger Central Site Finally in a real job you would consider the needs today as well as how much growth you expect in the internetwork over time. Any subnetting plan should include a reasonable esti- mate of the number of subnets you need to meet future needs. Determining the Number of Hosts per Subnet Determining the number of hosts per subnet requires knowing a few simple concepts and then doing a lot of research and questioning. Every device that connects to a subnet needs an IP address. For a totally new network you can look at business plans—numbers of people at the site devices on order and so on—to get some idea of the possible devices. When expanding an existing network to add new sites you can use existing sites as a point of comparison and then find out which sites will get bigger or smaller. And don’t forget to count the router interface IP address in each subnet and the switch IP address used to remotely manage the switch. Instead of gathering data for each and every site planners often just use a few typical sites for planning purposes. For example maybe you have some large sales offices and some small sales offices. You might dig in and learn a lot about only one large sales office and only one small sales office. Add that analysis to the fact that point-to-point links need a subnet with just two addresses plus any analysis of more one-of-a-kind subnets and you have enough information to plan the addressing and subnetting design. For example in Figure 13-6 the engineer has built a diagram that shows the number of hosts per LAN subnet in the largest branch B1. For the two other branches the engineer did not bother to dig to find out the number of required hosts. As long as the number of required IP addresses at sites B2 and B3 stays below the estimate of 50 based on larger site B1 the engineer can plan for 50 hosts in each branch LAN subnet and have plenty of addresses per subnet.

slide 364:

ptg17246291 310 CCENT/CCNA ICND1 100-105 Official Cert Guide Largest: 50 Hosts/Subnet Smaller Smaller B1 B3 B2 Core Figure 13-6 Large Branch B1 with 50 Hosts/Subnet One Size Subnet Fits All—Or Not The final choice in the initial planning step is to decide whether you will use a simpler design by using a one-size-subnet-fits-all philosophy. A subnet’s size or length is simply the number of usable IP addresses in the subnet. A subnetting design can either use one size subnet or varied sizes of subnets with pros and cons for each choice. Defining the Size of a Subnet Before you finish this book you will learn all the details of how to determine the size of the subnet. For now you just need to know a few specific facts about the size of sub- nets. Chapter 14 “Analyzing Classful IPv4 Networks” and Chapter 15 “Analyzing Subnet Masks” give you a progressively deeper knowledge of the details. The engineer assigns each subnet a subnet mask and that mask among other things defines the size of that subnet. The mask sets aside a number of host bits whose purpose is to num- ber different host IP addresses in that subnet. Because you can number 2 x things with x bits if the mask defines H host bits the subnet contains 2 H unique numeric values. However the subnet’s size is not 2 H . It’s 2 H – 2 because two numbers in each subnet are reserved for other purposes. Each subnet reserves the numerically lowest value for the sub- net number and the numerically highest value as the subnet broadcast address. As a result the number of usable IP addresses per subnet is 2 H – 2. NOTE The terms subnet number subnet ID and subnet address all refer to the number that represents or identifies a subnet. Figure 13-7 shows the general concept behind the three-part structure of an IP address focusing on the host part and the resulting subnet size.

slide 365:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 311 13 Network Subnet Host 32 Bits H 2 H - 2 Figure 13-7 Subnet Size Concepts One-Size Subnet Fits All To choose to use a single-size subnet in an enterprise network you must use the same mask for all subnets because the mask defines the size of the subnet. But which mask One requirement to consider when choosing that one mask is this: That one mask must pro- vide enough host IP addresses to support the largest subnet. To do so the number of host bits H defined by the mask must be large enough so that 2 H – 2 is larger than or equal to the number of host IP addresses required in the largest subnet. For example consider Figure 13-8. It shows the required number of hosts per LAN subnet. The figure ignores the subnets on the W AN links which require only two IP addresses each. The branch LAN subnets require only 50 host addresses but the main site LAN sub- net requires 200 host addresses. To accommodate the largest subnet you need at least 8 host bits. Seven host bits would not be enough because 2 7 – 2 126. Eight host bits would be enough because 2 8 – 2 254 which is more than enough to support 200 hosts in a subnet. Need: 200 Addresses Need: 50 Addresses Each 254 254 254 254 B1 B3 B2 Core Figure 13-8 Network Using One Subnet Size What’s the big advantage when using a single-size subnet Operational simplicity. In other words keeping it simple. Everyone on the IT staff who has to work with networking can get used to working with one mask—and one mask only. They will be able to answer all subnet- ting questions more easily because everyone gets used to doing subnetting math with that one mask.

slide 366:

ptg17246291 312 CCENT/CCNA ICND1 100-105 Official Cert Guide The big disadvantage for using a single-size subnet is that it wastes IP addresses. For exam- ple in Figure 13-8 all the branch LAN subnets support 254 addresses while the largest branch subnet needs only 50 addresses. The WAN subnets only need two IP addresses but each supports 254 addresses again wasting more IP addresses. The wasted IP addresses do not actually cause a problem in most cases however. Most organizations use private IP networks in their enterprise internetworks and a single Class A or Class B private network can supply plenty of IP addresses even with the waste. Multiple Subnet Sizes Variable-Length Subnet Masks To create multiple sizes of subnets in one Class A B or C network the engineer must cre- ate some subnets using one mask some with another and so on. Different masks mean dif- ferent numbers of host bits and a different number of hosts in some subnets based on the 2 H – 2 formula. For example consider the requirements listed earlier in Figure 13-8. It showed one LAN subnet on the left that needs 200 host addresses three branch subnets that need 50 address- es and three WAN links that need two addresses. To meet those needs but waste fewer IP addresses three subnet masks could be used creating subnets of three different sizes as shown in Figure 13-9. 254 Need: 200 Need: 50 Each 62 62 62 2 2 2 B1 B3 B2 Core Figure 13-9 Three Masks Three Subnet Sizes The smaller subnets now waste fewer IP addresses compared to the design shown earlier in Figure 13-8. The subnets on the right that need 50 IP addresses have subnets with 6 host bits for 2 6 – 2 62 available addresses per subnet. The WAN links use masks with 2 host bits for 2 2 – 2 2 available addresses per subnet. However some are still wasted because you cannot set the size of the subnet as some arbi- trary size. All subnets will be a size based on the 2 H – 2 formula with H being the number of host bits defined by the mask for each subnet. This Book: One-Size Subnet Fits All Mostly For the most part this book explains subnetting using designs that use a single mask creat- ing a single subnet size for all subnets. Why First it makes the process of learning subnet- ting easier. Second some types of analysis that you can do about a network—specifically calculating the number of subnets in the classful network—only make sense when a single mask is used.

slide 367:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 313 13 However you still need to be ready to work with variable-length subnet masks VLSM which is the practice of using different masks for different subnets in the same classful IP network. All of Chapter 22 “Variable-Length Subnet Masks” focuses on VLSM. However all the examples and discussion up until that chapter purposefully avoid VLSM just to keep the discussion simpler for the sake of learning to walk before you run. Make Design Choices Now that you know how to analyze the IP addressing and subnetting needs the next major step examines how to apply the rules of IP addressing and subnetting to those needs and make some choices. In other words now that you know how many subnets you need and how many host addresses you need in the largest subnet how do you create a useful sub- netting design that meets those requirements The short answer is that you need to do the three tasks shown on the right side of Figure 13-10. Design Subnets • Choose Network • Choose 1 Mask • List All Subnets Analyze Needs Subnets Hosts/Subnet 1 Size Subnet Figure 13-10 Input to the Design Phase and Design Questions to Answer Choose a Classful Network In the original design for what we know of today as the Internet companies used registered public classful IP networks when implementing TCP/IP inside the company. By the mid- 1990s an alternative became more popular: private IP networks. This section discusses the background behind these two choices because it impacts the choice of what IP network a company will then subnet and implement in its enterprise internetwork. Public IP Networks The original design of the Internet required that any company that connected to the Internet had to use a registered public IP network. To do so the company would complete some paperwork describing the enterprise’s internetwork and the number of hosts exist- ing plus plans for growth. After submitting the paperwork the company would receive an assignment of either a Class A B or C network. Public IP networks and the administrative processes surrounding them ensure that all the companies that connect to the Internet all use unique IP addresses. In particular after a pub- lic IP network is assigned to a company only that company should use the addresses in that network. That guarantee of uniqueness means that Internet routing can work well because there are no duplicate public IP addresses. For example consider the example shown in Figure 13-11. Company 1 has been assigned public Class A network 1.0.0.0 and company 2 has been assigned public Class A network 2.0.0.0. Per the original intent for public addressing in the Internet after these public net- work assignments have been made no other companies can use addresses in Class A net- works 1.0.0.0 or 2.0.0.0.

slide 368:

ptg17246291 314 CCENT/CCNA ICND1 100-105 Official Cert Guide Internet Company 1 Company 2 1.0.0.0 2.0.0.0 Figure 13-11 Two Companies with Unique Public IP Networks This original address assignment process ensured unique IP addresses across the entire plan- et. The idea is much like the fact that your telephone number should be unique in the uni- verse your postal mailing address should also be unique and your email address should also be unique. If someone calls you your phone rings but no one else’s phone rings. Similarly if company 1 is assigned Class A network 1.0.0.0 and it assigns address 1.1.1.1 to a particu- lar PC that address should be unique in the universe. A packet sent through the Internet to destination 1.1.1.1 should only arrive at this one PC inside company 1 instead of being delivered to some other host. Growth Exhausts the Public IP Address Space By the early 1990s the world was running out of public IP networks that could be assigned. During most of the 1990s the number of hosts newly connected to the Internet was grow- ing at a double-digit pace per month. Companies kept following the rules asking for public IP networks and it was clear that the current address-assignment scheme could not continue without some changes. Simply put the number of Class A B and C networks supported by the 32-bit address in IP version 4 IPv4 was not enough to support one public classful net- work per organization while also providing enough IP addresses in each company. NOTE The universe has run out of public IPv4 addresses in a couple of significant ways. IANA which assigns public IPv4 address blocks to the five Regional Internet Registries RIR around the globe assigned the last of the IPv4 address space in early 2011. By 2015 ARIN the RIR for North America exhausted its supply of IPv4 addresses so that compa- nies must return unused public IPv4 addresses to ARIN before they have more to assign to new companies. Try an online search for “ARIN depletion” to see pages about the current status of available IPv4 address space for just one RIR example. The Internet community worked hard during the 1990s to solve this problem coming up with several solutions including the following: ■ A new version of IP IPv6 with much larger addresses 128 bit ■ Assigning a subset of a public IP network to each company instead of an entire public IP network to reduce waste ■ Network Address Translation NAT which allows the use of private IP networks These three solutions matter to real networks today. However to stay focused on the topic of subnet design this chapter focuses on the third option and in particular the private IP networks that can be used by an enterprise when also using NAT. Be aware that Part VIII gives more detail about the first bullet point and Appendix N “Classless Inter-Domain Routing” discusses the middle bullet in the list and is optional reading for anyone inter- ested in the topic.

slide 369:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 315 13 Focusing on the third item in the bullet list NAT as detailed in Chapter 27 “Network Address Translation” allows multiple companies to use the exact same private IP network using the same IP addresses as other companies while still connecting to the Internet. For example Figure 13-12 shows the same two companies connecting to the Internet as in Figure 13-11 but now with both using the same private Class A network 10.0.0.0. Internet Company 1 Company 2 10.0.0.0 10.0.0.0 NAT NAT Figure 13-12 Reusing the Same Private Network 10.0.0.0 with NAT Both companies use the same classful IP network 10.0.0.0. Both companies can implement their subnet design internal to their respective enterprise internetworks without discussing their plans. The two companies can even use the exact same IP addresses inside network 10.0.0.0. And amazingly at the same time both companies can even communicate with each other through the Internet. The technology called Network Address Translation makes it possible for companies to reuse the same IP networks as shown in Figure 13-12. NAT does this by translating the IP addresses inside the packets as they go from the enterprise to the Internet using a small number of public IP addresses to support tens of thousands of private IP addresses. That one bit of information is not enough to understand how NAT works however to keep the focus on subnetting the book defers the discussion of how NAT works until Chapter 27. For now accept that most companies use NAT and therefore they can use private IP net- works for their internetworks. Private IP Networks Request For Comments RFC 1918 defines the set of private IP networks as listed in Table 13-2. By definition these private IP networks ■ Will never be assigned to an organization as a public IP network ■ Can be used by organizations that will use NAT when sending packets into the Internet ■ Can also be used by organizations that never need to send packets into the Internet So when using NAT—and almost every organization that connects to the Internet uses NAT—the company can simply pick one or more of the private IP networks from the list of reserved private IP network numbers. RFC 1918 defines the list which is summarized in Table 13-2. Table 13-2 RFC 1918 Private Address Space Class of Networks Private IP Networks Number of Networks A 10.0.0.0 1 B 172.16.0.0 through 172.31.0.0 16 C 192.168.0.0 through 192.168.255.0 256

slide 370:

ptg17246291 316 CCENT/CCNA ICND1 100-105 Official Cert Guide NOTE According to an informal survey I ran on my blog a few years back about half of the respondents said that their networks use private Class A network 10.0.0.0 as opposed to other private networks or public networks. Choosing an IP Network During the Design Phase Today some organizations use private IP networks along with NAT and some use public IP networks. Most new enterprise internetworks use private IP addresses throughout the net- work along with NAT as part of the connection to the Internet. Those organizations that already have registered public IP networks—often obtained before the addresses started running short in the early 1990s—can continue to use those public addresses throughout their enterprise networks. After the choice to use a private IP network has been made just pick one that has enough IP addresses. You can have a small internetwork and still choose to use private Class A net- work 10.0.0.0. It might seem wasteful to choose a Class A network that has over 16 million IP addresses especially if you only need a few hundred. However there’s no penalty or problem with using a private network that is too large for your current or future needs. For the purposes of this book most examples use private IP network numbers. For the design step to choose a network number just choose a private Class A B or C network from the list of RFC 1918 private networks. Regardless from a math and concept perspective the methods to subnet a public IP net- work versus a private IP network are the same. Choose the Mask If a design engineer followed the topics in this chapter so far in order he would know the following: ■ The number of subnets required ■ The number of hosts/subnet required ■ That a choice was made to use only one mask for all subnets so that all subnets are the same size same number of hosts/subnet ■ The classful IP network number that will be subnetted This section completes the design process at least the parts described in this chapter by discussing how to choose that one mask to use for all subnets. First this section examines default masks used when a network is not subnetted as a point of comparison. Next the concept of borrowing host bits to create subnet bits is explored. Finally this section ends with an example of how to create a subnet mask based on the analysis of the requirements. Classful IP Networks Before Subnetting Before an engineer subnets a classful network the network is a single group of addresses. In other words the engineer has not yet subdivided the network into many smaller subsets called subnets. When thinking about an unsubnetted classful network the addresses in a network have only two parts: the network part and host part. Comparing any two addresses in the classful network:

slide 371:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 317 13 ■ The addresses have the same value in the network part. ■ The addresses have different values in the host part. The actual sizes of the network and host part of the addresses in a network can be easily predicted as shown in Figure 13-13. N8 H24 N16 H16 N24 H8 A B C Figure 13-13 Format of Unsubnetted Class A B and C Networks In Figure 13-13 N and H represent the number of network and host bits respectively. Class rules define the number of network octets 1 2 or 3 for Classes A B and C respectively the figure shows these values as a number of bits. The number of host octets is 3 2 or 1 respectively. Continuing the analysis of classful network before subnetting the number of addresses in one classful IP network can be calculated with the same 2 H – 2 formula previously dis- cussed. In particular the size of an unsubnetted Class A B or C network is as follows: ■ Class A: 2 24 – 2 16777214 ■ Class B: 2 16 – 2 65534 ■ Class C: 2 8 – 2 254 Borrowing Host Bits to Create Subnet Bits To subnet a network the designer thinks about the network and host parts as shown in Figure 13-13 and then the engineer adds a third part in the middle: the subnet part. However the designer cannot change the size of the network part or the size of the entire address 32 bits. To create a subnet part of the address structure the engineer borrows bits from the host part. Figure 13-14 shows the general idea. N8 S__ H__ N16 N24 S__ H__ S__ H__ A B C N + S + H 32 A B C Figure 13-14 Concept of Borrowing Host Bits

slide 372:

ptg17246291 318 CCENT/CCNA ICND1 100-105 Official Cert Guide Figure 13-14 shows a rectangle that represents the subnet mask. N representing the number of network bits remains locked at 8 16 or 24 depending on the class. Conceptually the designer moves a dashed dividing line into the host field with subnet bits S between the network and host parts and the remaining host bits H on the right. The three parts must add up to 32 because IPv4 addresses consist of 32 bits. Choosing Enough Subnet and Host Bits Th e d e s ig n p r oce s s r e quir e s a choice of where to place the dashed line shown in Figure 13-14. But what is the right choice How many subnet and host bits should the designer choose The answers hinge on the requirements gathered in the early stages of the planning process: ■ Number of subnets required ■ Number of hosts/subnet The bits in the subnet part create a way to uniquely number the different subnets that the design engineer wants to create. With 1 subnet bit you can number 2 1 or 2 subnets. With 2 bits 2 2 or 4 subnets with 3 bits 2 3 or 8 subnets and so on. The number of subnet bits must be large enough to uniquely number all the subnets as determined during the planning process. At the same time the remaining number of host bits must also be large enough to number the host IP addresses in the largest subnet. Remember in this chapter we assume the use of a single mask for all subnets. This single mask must support both the required number of subnets and the required number of hosts in the largest subnet. Figure 13-15 shows the concept. NS H Need Y Hosts/Subnet: 2 H Need X Subnets: 2 S Figure 13-15 Borrowing Enough Subnet and Host Bits Figure 13-15 shows the idea of the designer choosing a number of subnet S and host H bits and then checking the math. 2 S must be more than the number of required subnets or the mask will not supply enough subnets in this IP network. Also 2 H – 2 must be more than the required number of hosts/subnet. NOTE The idea of calculating the number of subnets as 2 S applies only in cases where a single mask is used for all subnets of a single classful network as is being assumed in this chapter. To effectively design masks or to interpret masks that were chosen by someone else you need a good working memory of the powers of 2. Appendix A “Numeric Reference Tables” lists a table with powers of 2 up through 2 32 for your reference.

slide 373:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 319 13 Example Design: 172.16.0.0 200 Subnets 200 Hosts To help make sense of the theoretical discussion so far consider an example that focuses on the design choice for the subnet mask. In this case the planning and design choices so far tell us the following: ■ Use a single mask for all subnets. ■ Plan for 200 subnets. ■ Plan for 200 host IP addresses per subnet. ■ Use private Class B network 172.16.0.0. To choose the mask the designer asks this question: How many subnet S bits do I need to number 200 subnets From Table 13-3 you can see that S 7 is not large enough 2 7 128 but S 8 is enough 2 8 256. So you need at least 8 subnet bits. Next the designer asks a similar question based on the number of hosts per subnet: How many host H bits do I need to number 200 hosts per subnet The math is basically the same but the formula subtracts 2 when counting the number of hosts/subnet. From Table 13-3 you can see that H 7 is not large enough 2 7 – 2 126 but H 8 is enough 2 8 – 2 254. Only one possible mask meets all the requirements in this case. First the number of net- work bits N must be 16 because the design uses a Class B network. The requirements tell us that the mask needs at least 8 subnet bits and at least 8 host bits. The mask only has 32 bits in it Figure 13-16 shows the resulting mask. N 16 S 8 H 8 Excess: 56 2 S Subnets Need: 200 256 2 H - 2 Need: 200 Hosts/Subnet 254 Excess: 54 B Figure 13-16 Example Mask Choice N 16 S 8 H 8 Masks and Mask Formats Although engineers think about IP addresses in three parts when making design choices network subnet and host the subnet mask gives the engineer a way to communicate those design choices to all the devices in the subnet.

slide 374:

ptg17246291 320 CCENT/CCNA ICND1 100-105 Official Cert Guide The subnet mask is a 32-bit binary number with a number of binary 1s on the left and with binary 0s on the right. By definition the number of binary 0s equals the number of host bits in fact that is exactly how the mask communicates the idea of the size of the host part of the addresses in a subnet. The beginning bits in the mask equal binary 1 with those bit posi- tions representing the combined network and subnet parts of the addresses in the subnet. Because the network part always comes first then the subnet part and then the host part the subnet mask in binary form cannot have interleaved 1s and 0s. Each subnet mask has one unbroken string of binary 1s on the left with the rest of the bits as binary 0s. After the engineer chooses the classful network and the number of subnet and host bits in a subnet creating the binary subnet mask is easy. Just write down N 1s S 1s and then H 0s assuming that N S and H represent the number of network subnet and host bits. Figure 13-17 shows the mask based on the previous example which subnets a Class B network by creating 8 subnet bits leaving 8 host bits. 11111111 11111111 N 16 S 8 H 8 11111111 00000000 Figure 13-17 Creating the Subnet Mask—Binary—Class B Network In addition to the binary mask shown in Figure 13-17 masks can also be written in two other formats: the familiar dotted-decimal notation DDN seen in IP addresses and an even briefer prefix notation. Chapter 15 discusses these formats and how to convert between the different formats. Build a List of All Subnets This final task of the subnet design step determines the actual subnets that can be used based on all the earlier choices. The earlier design work determined the Class A B or C network to use and the one subnet mask to use that supplies enough subnets and enough host IP addresses per subnet. But what are those subnets How do you identify or describe a subnet This section answers these questions. A subnet consists of a group of consecutive numbers. Most of these numbers can be used as IP addresses by hosts. However each subnet reserves the first and last numbers in the group and these two numbers cannot be used as IP addresses. In particular each subnet contains the following : ■ Subnet number: Also called the subnet ID or subnet address this number identifies the subnet. It is the numerically smallest number in the subnet. It cannot be used as an IP address by a host. ■ Subnet broadcast: Also called the subnet broadcast address or directed broadcast address this is the last numerically highest number in the subnet. It also cannot be used as an IP address by a host. ■ IP addresses: All the numbers between the subnet ID and the subnet broadcast address can be used as a host IP address.

slide 375:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 321 13 For example consider the earlier case in which the design results were as follows: Network 172.16.0.0 Class B Mask 255.255.255.0 for all subnets With some math the facts about each subnet that exists in this Class B network can be cal- culated. In this case Table 13-3 shows the first ten such subnets. It then skips many subnets and shows the last two numerically largest subnets. Table 13-3 First T en Subnets Plus the Last Few from 172.16.0.0 255.255.255.0 Subnet Number IP Addresses Broadcast Address 172.16.0.0 172.16.0.1 – 172.16.0.254 172.16.0.255 172.16.1.0 172.16.1.1 – 172.16.1.254 172.16.1.255 172.16.2.0 172.16.2.1 – 172.16.2.254 172.16.2.255 172.16.3.0 172.16.3.1 – 172.16.3.254 172.16.3.255 172.16.4.0 172.16.4.1 – 172.16.4.254 172.16.4.255 172.16.5.0 172.16.5.1 – 172.16.5.254 172.16.5.255 172.16.6.0 172.16.6.1 – 172.16.6.254 172.16.6.255 172.16.7 .0 172.16.7 .1 – 172.16.7 .254 172.16.7 .255 172.16.8.0 172.16.8.1 – 172.16.8.254 172.16.8.255 172.16.9.0 172.16.9.1 – 172.16.9.254 172.16.9.255 Skipping many… 172.16.254.0 172.16.254.1 – 172.16.254.254 172.16.254.255 172.16.255.0 172.16.255.1 – 172.16.255.254 172.16.255.255 After you have the network number and the mask calculating the subnet IDs and other details for all subnets requires some math. In real life most people use subnet calculators or subnet-planning tools. For the CCENT and CCNA Routing and Switching exams you need to be ready to find this kind of information in this book Chapter 21 “Subnet Design” shows you how to find all the subnets of a given network. Plan the Implementation The next step planning the implementation is the last step before actually configuring the devices to create a subnet. The engineer first needs to choose where to use each subnet. For example at a branch office in a particular city which subnet from the subnet planning chart Table 13-3 should be used for each VLAN at that site Also for any interfaces that require static IP addresses which addresses should be used in each case Finally what range of IP addresses from inside each subnet should be configured in the DHCP server to be dynami- cally leased to hosts for use as their IP address Figure 13-18 summarizes the list of imple- mentation planning tasks.

slide 376:

ptg17246291 322 CCENT/CCNA ICND1 100-105 Official Cert Guide Plan Implementation • Subnets Locations • Static IP • DHCP Ranges Analyze Needs Subnets Hosts/Subnet 1 Size Subnet Design Subnets Choose Network Choose 1 Mask List All Subnets Figure 13-18 Facts Supplied to the Plan Implementation Step Assigning Subnets to Different Locations The job is simple: Look at your network diagram identify each location that needs a subnet and pick one from the table you made of all the possible subnets. Then track it so that you know which ones you use where using a spreadsheet or some other purpose-built subnet- planning tool. That’s it Figure 13-19 shows a sample of a completed design using Table 13-3 which happens to match the initial design sample shown way back in Figure 13-1. 172.16.2.0 /24 172.16.3.0 /24 172.16.5.0 /24 172.16.1.0 /24 172.16.4.0 /24 Class B 172.16.0.0 /24 255.255.255.0 Subnet Design Choices: R2 R3 R1 Figure 13-19 Example of Subnets Assigned to Different Locations Although this design could have used any five subnets from Table 13-3 in real networks engineers usually give more thought to some strategy for assigning subnets. For example you might assign all LAN subnets lower numbers and WAN subnets higher numbers. Or you might slice off large ranges of subnets for different divisions of the company. Or you might follow that same strategy but ignore organizational divisions in the company paying more attention to geographies. For example for a U.S.-based company with a smaller presence in both Europe and Asia you might plan to reserve ranges of subnets based on continent. This kind of choice is par- ticularly useful when later trying to use a feature called route summarization.

slide 377:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 323 13 NOTE Although not discussed in this book DVD Appendix O “Route Summarization” provides content about route summarization from an earlier edition of this book for those who are interested in further reading. Figure 13-20 shows the general benefit of placing addressing in the network for easier route summarization using the same subnets from Table 13-3 again. Europe North America Subnets 172.16.0.0 - 172.16.127.0 First Half of Network Subnets 172.16.128.0 - 172.16.191.0 Third Quarter of Network: Asia Subnets 172.16.192.0 - 172.16.255.0 Last Quarter of Network: Figure 13-20 Reserving 50 Percent of Subnets for North America and 25 Percent Each for Europe and Asia Choose Static and Dynamic Ranges per Subnet Devices receive their IP address and mask assignment in one of two ways: dynamically by using Dynamic Host Configuration Protocol DHCP or statically through configuration. For DHCP to work the network engineer must tell the DHCP server the subnets for which it must assign IP addresses. In addition that configuration limits the DHCP server to only a subset of the addresses in the subnet. For static addresses you simply configure the device to tell it what IP address and mask to use. To keep things as simple as possible most shops use a strategy to separate the static IP addresses on one end of each subnet and the DHCP-assigned dynamic addresses on the other. It does not really matter whether the static addresses sit on the low end of the range of addresses or the high end. For example imagine that the engineer decides that for the LAN subnets in Figure 13-19 the DHCP pool comes from the high end of the range namely addresses that end in .101 through .254. The address that ends in .255 is of course reserved. The engineer also assigns static addresses from the lower end with addresses ending in .1 through .100. Figure 13-21 shows the idea .

slide 378:

ptg17246291 324 CCENT/CCNA ICND1 100-105 Official Cert Guide .101 .102 172.16.2.___ .101 .102 172.16.3.___ 172.16.1.___ .1 .1 .1 .11 Notes: 1 - 100 101 - 254 Static: DHCP: R2 R3 R1 Figure 13-21 Static from the Low End and DHCP from the High End Figure 13-21 shows all three routers with statically assigned IP addresses that end in .1. The only other static IP address in the figure is assigned to the server on the left with address 172.16.1.11 abbreviated simply as .11 in the figure. On the right each LAN has two PCs that use DHCP to dynamically lease their IP addresses. DHCP servers often begin by leasing the addresses at the bottom of the range of addresses so in each LAN the hosts have leased addresses that end in .101 and .102 which are at the low end of the range chosen by design. Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment for more details. Table 13-4 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 13-4 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Answer DIKTA questions Book PCPT Review memory tables Book DVD/website

slide 379:

ptg17246291 Chapter 13: Perspectives on IPv4 Subnetting 325 13 Review All the Key Topics Table 13-5 Key T opics for Chapter 13 Key Topic Element Description Page Number List Key facts about subnets 307 List Rules about what places in a network topology need a subnet 308 Figure 13-7 Locations of the network subnet and host parts of an IPv4 address 311 List Features that extended the life of IPv4 314 Figure 13-13 Formats of Class A B and C addresses when not subnetted 317 Figure 13-14 Formats of Class A B and C addresses when subnetted 317 Figure 13-15 General logic when choosing the size of the subnet and host parts of addresses in a subnet 318 List Items that together define a subnet 320 Key Terms You Should Know subnet network classful IP network variable-length subnet masks VLSM network part subnet part host part public IP network private IP network subnet mask

slide 380:

ptg17246291 CHAPTER 14 Analyzing Classful IPv4 Networks This chapter covers the following exam topics: 1.0 Network Fundamentals 1.8 Configure verify and troubleshoot IPv4 addressing and subnetting 1.9 Compare and contrast IPv4 address types 1.9.a Unicast 1.9.b Broadcast When operating a network you often start investigating a problem based on an IP address and mask. Based on the IP address alone you should be able to determine several facts about the Class A B or C network in which the IP address resides. These facts can be useful when troubleshooting some networking problems. This chapter lists the key facts about classful IP networks and explains how to discover these facts. Following that this chapter lists some practice problems. Before moving to the next chapter you should practice until you can consistently determine all these facts quick- ly and confidently based on an IP address. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 14-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Classful Network Concepts 1–5

slide 381:

ptg17246291 1. Which of the following are not valid Class A network IDs Choose two answers. a. 1.0.0.0 b. 130.0.0.0 c. 127.0.0.0 d. 9.0.0.0 2. Which of the following are not valid Class B network IDs a. 130.0.0.0 b. 191.255.0.0 c. 128.0.0.0 d. 150.255.0.0 e. All are valid Class B network IDs. 3. Which of the following are true about IP address 172.16.99.45’s IP network Choose two answers. a. The network ID is 172.0.0.0. b. The network is a Class B network. c. The default mask for the network is 255.255.255.0. d. The number of host bits in the unsubnetted network is 16. 4. Which of the following are true about IP address 192.168.6.7’s IP network Choose two answers. a. The network ID is 192.168.6.0. b. The network is a Class B network. c. The default mask for the network is 255.255.255.0. d. The number of host bits in the unsubnetted network is 16. 5. Which of the following is a network broadcast address a. 10.1.255.255 b. 192.168.255.1 c. 224.1.1.255 d. 172.30.255.255

slide 382:

ptg17246291 328 CCENT/CCNA ICND1 100-105 Official Cert Guide Foundation Topics Classful Network Concepts Imagine that you have a job interview for your first IT job. As part of the interview you’re given an IPv4 address and mask: 10.4.5.99 255.255.255.0. What can you tell the inter- viewer about the classful network in this case the Class A network in which the IP address resides This section the first of two major sections in this chapter reviews the concepts of classful IP networks in other words Class A B and C networks. In particular this chapter exam- ines how to begin with a single IP address and then determine the following facts: ■ Class A B or C ■ Default mask ■ Number of network octets/bits ■ Number of host octets/bits ■ Number of host addresses in the network ■ Network ID ■ Network broadcast address ■ First and last usable address in the network IPv4 Network Classes and Related Facts IP version 4 IPv4 defines five address classes. Three of the classes Classes A B and C consist of unicast IP addresses. Unicast addresses identify a single host or interface so that the address uniquely identifies the device. Class D addresses serve as multicast addresses so that one packet sent to a Class D multicast IPv4 address can actually be delivered to multi- ple hosts. Finally Class E addresses were originally intended for experimentation but were changed to simply be reserved for future use . The class can be identified based on the value of the first octet of the address as shown in Table 14-2. Table 14-2 IPv4 Address Classes Based on First Octet Values Class First Octet Values Purpose A 1–126 Unicast large networks B 128–191 Unicast medium-sized networks C 192–223 Unicast small networks D 224–239 Multicast E 240–255 Reserved formerly experimental After you identify the class as either A B or C many other related facts can be derived just through memorization. Table 14-3 lists that information for reference and later study each of these concepts is described in this chapter. Answers to the “Do I Know This Already” quiz: 1 B C 2 E 3 B D 4 A C 5 D

slide 383:

ptg17246291 Chapter 14: Analyzing Classful IPv4 Networks 329 14 Table 14-3 Key Facts for Classes A B and C Class A Class B Class C First octet range 1 – 126 128 – 191 192 – 223 Valid network numbers 1.0.0.0 – 126.0.0.0 128.0.0.0 – 191.255.0.0 192.0.0.0 – 223.255.255.0 Total networks 2 7 – 2 126 2 14 16384 2 21 2097 152 Hosts per network 2 24 – 2 2 16 – 2 2 8 – 2 Octets bits in network part 1 8 2 16 3 24 Octets bits in host part 3 24 2 16 1 8 Default mask 255.0.0.0 255.255.0.0 255.255.255.0 At times some people today look back and wonder “Are there 128 class A networks with two reserved networks or are there truly only 126 class A networks” Frankly the differ- ence is unimportant and the wording is just two ways to state the same idea. The important fact to know is that Class A network 0.0.0.0 and network 127.0.0.0 are reserved. In fact they have been reserved since the creation of Class A networks as listed in RFC 791 pub- lished in 1981. Although it may be a bit of a tangent what is more interesting today is that over time other newer RFCs have also reserved small pieces of the Class A B and C address space. So tables like Table 14-3 with the count of the numbers of Class A B and C networks are a good place to get a sense of the size of the number however the number of reserved networks does change slightly over time albeit slowly based on these other reserved address ranges. NOTE If you are interested in seeing all the reserved IPv4 address ranges just do an Internet search on “IANA IPv4 special-purpose address registry.” The Number and Size of the Class A B and C Networks Table 14-3 lists the range of Class A B and C network numbers however some key points can be lost just referencing a table of information. This section examines the Class A B and C network numbers focusing on the more important points and the exceptions and unusual cases. First the number of networks from each class significantly differs. Only 126 Class A net- works exist: network 1.0.0.0 2.0.0.0 3.0.0.0 and so on up through network 126.0.0.0. However 16384 Class B networks exist with more than 2 million Class C networks. Next note that the size of networks from each class also significantly differs. Each Class A network is relatively large—over 16 million host IP addresses per network—so they were originally intended to be used by the largest companies and organizations. Class B networks are smaller with over 65000 hosts per network. Finally Class C networks intended for small organizations have 254 hosts in each network. Figure 14-1 summarizes those facts.

slide 384:

ptg17246291 330 CCENT/CCNA ICND1 100-105 Official Cert Guide Class Networks Hosts/Network A 126 16777214 B 16384 65534 C 2097152 254 Figure 14-1 Numbers and Sizes of Class A B and C Networks Address Formats In some cases an engineer might need to think about a Class A B or C network as if the network has not been subdivided through the subnetting process. In such a case the addresses in the classful network have a structure with two parts: the network part some- times called the prefix and the host part . Then comparing any two IP addresses in one network the following observations can be made: The addresses in the same network have the same values in the network part. The addresses in the same network have different values in the host part. For example in Class A network 10.0.0.0 by definition the network part consists of the first octet. As a result all addresses have an equal value in the network part namely a 10 in the first octet. If you then compare any two addresses in the network the addresses have a dif- ferent value in the last three octets the host octets. For example IP addresses 10.1.1.1 and 10.1.1.2 have the same value 10 in the network part but different values in the host part. Figure 14-2 shows the format and sizes in number of bits of the network and host parts of IP addresses in Class A B and C networks before any subnetting has been applied. Network 8 Host 24 A Network 24 Host 8 C Network 16 Host 16 B Figure 14-2 Sizes Bits of the Network and Host Parts of Unsubnetted Classful Networks

slide 385:

ptg17246291 Chapter 14: Analyzing Classful IPv4 Networks 331 14 Default Masks Although we humans can easily understand the concepts behind Figure 14-2 computers prefer numbers. To communicate those same ideas to computers each network class has an associated default mask that defines the size of the network and host parts of an unsub- netted Class A B and C network. To do so the mask lists binary 1s for the bits considered to be in the network part and binary 0s for the bits considered to be in the host part. For example Class A network 10.0.0.0 has a network part of the first single octet 8 bits and a host part of last three octets 24 bits. As a result the Class A default mask is 255.0.0.0 which in binary is 11111111 00000000 00000000 00000000 Figure 14-3 shows default masks for each network class both in binary and dotted-decimal format. B 11111111 11111111 00000000 00000000 255 255 00 ... Decimal Binary Concept Network 16 Host 16 A Network 8 Host 24 11111111 00000000 00000000 00000000 255 000 ... Decimal Binary Concept C 11111111 11111111 11111111 00000000 255 255 255 0 ... Decimal Binary Concept Network 24 Host 8 Figure 14-3 Default Masks for Classes A B and C NOTE Decimal 255 converts to the binary value 11111111. Decimal 0 converted to 8-bit binary is 00000000. See Appendix A “Numeric Reference Tables” for a conversion table. Number of Hosts per Network Calculating the number of hosts per network requires some basic binary math. First consid- er a case where you have a single binary digit. How many unique values are there There are of course two values: 0 and 1. With 2 bits you can make four combinations: 00 01 10 and 11. As it turns out the total combination of unique values you can make with N bits is 2 N . Host addresses—the IP addresses assigned to hosts—must be unique. The host bits exist for the purpose of giving each host a unique IP address by virtue of having a different value in the host part of the addresses. So with H host bits 2 H unique combinations exist.

slide 386:

ptg17246291 332 CCENT/CCNA ICND1 100-105 Official Cert Guide However the number of hosts in a network is not 2 H instead it is 2 H – 2. Each network reserves two numbers that would have otherwise been useful as host addresses but have instead been reserved for special use: one for the network ID and one for the network broadcast address. As a result the formula to calculate the number of host addresses per Class A B or C network is 2 H – 2 where H is the number of host bits. Deriving the Network ID and Related Numbers Each classful network has four key numbers that describe the network. You can derive these four numbers if you start with just one IP address in the network. The numbers are as follows: ■ Network number ■ First numerically lowest usable address ■ Last numerically highest usable address ■ Network broadcast address First consider both the network number and first usable IP address. The network number also called the network ID or network address identifies the network. By definition the network number is the numerically lowest number in the network. However to prevent any ambiguity the people that made up IP addressing added the restriction that the network number cannot be assigned as an IP address. So the lowest number in the network is the network ID. Then the first numerically lowest host IP address is one larger than the net- work number. Next consider the network broadcast address along with the last numerically highest usable IP address. The TCP/IP RFCs define a network broadcast address as a special address in each network. This broadcast address could be used as the destination address in a packet and the routers would forward a copy of that one packet to all hosts in that classful network. Numerically a network broadcast address is always the highest last number in the network. As a result the highest last number usable as an IP address is the address that is simply one less than the network broadcast address. Simply put if you can find the network number and network broadcast address finding the first and last usable IP addresses in the network is easy. For the exam you should be able to find all four values with ease the process is as follows: Step 1. Determine the class A B or C based on the first octet. Step 2. Mentally divide the network and host octets based on the class. Step 3. To find the network number change the IP address’s host octets to 0. Step 4. To find the first address add 1 to the fourth octet of the network ID. Step 5. To find the broadcast address change the network ID’s host octets to 255. Step 6. To find the last address subtract 1 from the fourth octet of the network broadcast address.

slide 387:

ptg17246291 Chapter 14: Analyzing Classful IPv4 Networks 333 14 The written process actually looks harder than it is. Figure 14-4 shows an example of the process using Class A IP address 10.17 .18.21 with the circled numbers matching the process. C B A Class 1 Network Host 2 Divide 3 Make Host0 10 . 0 . 0 . 0 10 . 0 . 0 . 1 4 Add 1 10 . 17 . 18 . 21 5 Make Host255 10 . 255 . 255 . 255 6 Subtract 1 10 . 255 . 255 . 254 +1 -1 Figure 14-4 Example of Deriving the Network ID and Other Values from 10.17.18.21 Figure 14-4 shows the identification of the class as Class A Step 1 and the number of net- work/host octets as 1 and 3 respectively. So to find the network ID at Step 3 the figure copies only the first octet setting the last three host octets to 0. At Step 4 just copy the network ID and add 1 to the fourth octet. Similarly to find the broadcast address at Step 5 copy the network octets but set the host octets to 255. Then at Step 6 subtract 1 from the fourth octet to find the last numerically highest usable IP address. Just to show an alternative example consider IP address 172.16.8.9. Figure 14-5 shows the process applied to this IP address. C A B Class 1 Network Host 2 Divide 3 Make Host0 172 . 16 . 0 . 0 172 . 16 . 0 . 1 4 Add 1 172 . 16 . 8 . 9 5 Make Host255 172 . 16 . 255 . 255 6 Subtract 1 172 . 16 . 255 . 254 +1 -1 Figure 14-5 Example Deriving the Network ID and Other Values from 172.16.8.9 Figure 14-5 shows the identification of the class as Class B Step 1 and the number of net- work/host octets as 2 and 2 respectively. So to find the network ID at Step 3 the figure copies only the first two octets setting the last two host octets to 0. Similarly Step 5 shows the same action but with the last two host octets being set to 255.

slide 388:

ptg17246291 334 CCENT/CCNA ICND1 100-105 Official Cert Guide Unusual Network IDs and Network Broadcast Addresses Some of the more unusual numbers in and around the range of Class A B and C network numbers can cause some confusion. This section lists some examples of numbers that make many people make the wrong assumptions about the meaning of the number. For Class A the first odd fact is that the range of values in the first octet omits the numbers 0 and 127. As it turns out what would be Class A network 0.0.0.0 was originally reserved for some broadcasting requirements so all addresses that begin with 0 in the first octet are reserved. What would be Class A network 127.0.0.0 is still reserved because of a special address used in software testing called the loopback address 127.0.0.1. For Class B and C some of the network numbers can look odd particularly if you fall into a habit of thinking that 0s at the end means the number is a network ID and 255s at the end means it’s a network broadcast address. First Class B network numbers range from 128.0.0.0 to 191.255.0.0 for a total of 2 14 networks. However even the very first lowest number Class B network number 128.0.0.0 looks a little like a Class A network number because it ends with three 0s. However the first octet is 128 making it a Class B network with a two- octet network part 128.0. For another Class B example the high end of the Class B range also might look strange at first glance 191.255.0.0 but this is indeed the numerically highest of the valid Class B net- work numbers. This network’s broadcast address 191.255.255.255 might look a little like a Class A broadcast address because of the three 255s at the end but it is indeed the broad- cast address of a Class B network. Similarly to Class B networks some of the valid Class C network numbers do look strange. For example Class C network 192.0.0.0 looks a little like a Class A network because of the last three octets being 0 but because it is a Class C network it consists of all addresses that begin with three octets equal to 192.0.0. Similarly Class C network 223.255.255.0 another valid Class C network consists of all addresses that begin with 223.255.255. Practice with Classful Networks As with all areas of IP addressing and subnetting you need to practice to be ready for the CCENT and CCNA Routing and Switching exams. You should practice some while read- ing this chapter to make sure that you understand the processes. At that point you can use your notes and this book as a reference with a goal of understanding the process. After that keep practicing this and all the other subnetting processes. Before you take the exam you should be able to always get the right answer and with speed. Table 14-4 summarizes the key concepts and suggestions for this two-phase approach. Table 14-4 Keep-Reading and T ake-Exam Goals for This Chapter’s T opics Time Frame After Reading This Chapter Before Taking the Exam Focus on… Learning how Being correct and fast Tools Allowed All Y our brain and a notepad Goal: Accuracy 90 correct 100 correct Goal: Speed Any speed 10 seconds

slide 389:

ptg17246291 Chapter 14: Analyzing Classful IPv4 Networks 335 14 Practice Deriving Key Facts Based on an IP Address Practice finding the various facts that can be derived from an IP address as discussed throughout this chapter. To do so complete Table 14-5. Table 14-5 Practice Problems: Find the Network ID and Network Broadcast IP Address Class 1 2 or 3 Network Octets 1 2 or 3 Host Octets Network ID Network Broadcast Address 1 1.1.1.1 2 128.1.6.5 3 200.1.2.3 4 192.192.1.1 5 126.5.4.3 6 200.1.9.8 7 192.0.0.1 8 191.255.1.47 9 223.223.0.1 The answers are listed in the section “Answers to Earlier Practice Problems” later in this chapter. Practice Remembering the Details of Address Classes Tables 14-2 and 14-3 shown earlier in this chapter summarized some key information about IPv4 address classes. Tables 14-6 and 14-7 show sparse versions of these same tables. To practice recalling those key facts particularly the range of values in the first octet that identifies the address class complete these tables. Then refer to Tables 14-2 and 14-3 to check your answers. Repeat this process until you can recall all the information in the tables. Table 14-6 Sparse Study T able Version of T able 14-2 Class First Octet Values Purpose A B C D E

slide 390:

ptg17246291 336 CCENT/CCNA ICND1 100-105 Official Cert Guide Table 14-7 Sparse Study T able Version of T able 14-3 Class A Class B Class C First octet range Valid network numbers Total networks Hosts per network Octets bits in network part Octets bits in host part Default mask Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment for more details. Table 14-8 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 14-8 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Answer DIKTA questions Book PCPT Review memory tables Book DVD/website Practice analyzing classful IPv4 networks DVD Appendix D website Review All the Key Topics Table 14-9 Key T opics for Chapter 14 Key Topic Elements Description Page Number Table 14-2 Address classes 328 Table 14-3 Key facts about Class A B and C networks 329 List Comparisons of network and host parts of addresses in the same classful network 330 Figure 14-3 Default masks 331 Paragraph Function to calculate the number of hosts per network 332 List Steps to find information about a classful network 332

slide 391:

ptg17246291 Chapter 14: Analyzing Classful IPv4 Networks 337 14 Key Terms You Should Know network classful IP network network number network ID network address network broadcast address network part host part default mask Additional Practice for This Chapter’s Processes For additional practice with analyzing classful networks you may do the same set of prac- tice problems using your choice of tools: Application: Use the Analyzing Classful IPv4 Networks application on the DVD or com- panion website. PDF: Alternatively practice the same problems using DVD Appendix D “Practice for Chapter 14: Analyzing Classful IPv4 Networks.” Answers to Earlier Practice Problems Table 14-5 shown earlier listed several practice problems. Table 14-10 lists the answers. Table 14-10 Practice Problems: Find the Network ID and Network Broadcast IP Address Class Network Octets Host Octets Network ID Network Broadcast 1 1.1.1.1 A 1 3 1.0.0.0 1.255.255.255 2 128.1.6.5 B 2 2 128.1.0.0 128.1.255.255 3 200.1.2.3 C 3 1 200.1.2.0 200.1.2.255 4 192.192.1.1 C 3 1 192.192.1.0 192.192.1.255 5 126.5.4.3 A 1 3 126.0.0.0 126.255.255.255 6 200.1.9.8 C 3 1 200.1.9.0 200.1.9.255 7 192.0.0.1 C 3 1 192.0.0.0 192.0.0.255 8 191.255.1.47 B 2 2 191.255.0.0 191.255.255.255 9 223.223.0.1 C 3 1 223.223.0.0 223.223.0.255 The class number of network octets and number of host octets all require you to look at the first octet of the IP address to determine the class. If a value is between 1 and 126 inclusive the address is a Class A address with one network and three host octets. If a value is between 128 and 191 inclusive the address is a Class B address with two network and two host octets. If a value is between 192 and 223 inclusive it is a Class C address with three network octets and one host octet. The last two columns can be found based on Table 14-3 specifically the number of network and host octets along with the IP address. To find the network ID copy the IP address but change the host octets to 0. Similarly to find the network broadcast address copy the IP address but change the host octets to 255. The last three problems can be confusing and were included on purpose so that you could see an example of these unusual cases as follows.

slide 392:

ptg17246291 338 CCENT/CCNA ICND1 100-105 Official Cert Guide Answers to Practice Problem 7 from Table 14-5 Consider IP address 192.0.0.1. First 192 is on the lower edge of the first octet range for Class C as such this address has three network and one host octet. To find the network ID copy the address but change the single host octet the fourth octet to 0 for a network ID of 192.0.0.0. It looks strange but it is indeed the network ID. The network broadcast address choice for problem 7 can also look strange. To find the broadcast address copy the IP address 192.0.0.1 but change the last octet the only host octet to 255 for a broadcast address of 192.0.0.255. In particular if you decide that the broadcast should be 192.255.255.255 you might have fallen into the trap of logic like “Change all 0s in the network ID to 255s” which is not the correct logic. Instead change all host octets in the IP address or network ID to 255s. Answers to Practice Problem 8 from Table 14-5 The first octet of problem 8 191.255.1.47 sits on the upper edge of the Class B range for the first octet 128–191. As such to find the network ID change the last two octets host octets to 0 for a network ID of 191.255.0.0. This value sometimes gives people problems because they are used to thinking that 255 somehow means the number is a broadcast address. The broadcast address found by changing the two host octets to 255 means that the broadcast address is 191.255.255.255. It looks more like a broadcast address for a Class A network but it is actually the broadcast address for Class B network 191.255.0.0. Answers to Practice Problem 9 from Table 14-5 Problem 9 with IP address 223.223.0.1 is near the high end of the Class C range. As a result only the last host octet is changed to 0 to form the network ID 223.223.0.0. It looks a little like a Class B network number at first glance because it ends in two octets of 0. However it is indeed a Class C network ID based on the value in the first octet.

slide 393:

ptg17246291 This page intentionally left blank

slide 394:

ptg17246291 CHAPTER 15 Analyzing Subnet Masks This chapter covers the following exam topics: 1.0 Network Fundamentals 1.8 Configure verify and troubleshoot IPv4 addressing and subnetting The subnet mask used in one or many subnets in an IP internetwork says a lot about the intent of the subnet design. First the mask divides addresses into two parts: prefix and host with the host part defining the size of the subnet. Then the class A B or C further divides the structure of addresses in a subnet breaking the prefix part into the network and subnet parts. The subnet part defines the number of subnets that could exist inside one classful IP network assuming that one mask is used throughout the classful network. The subnet mask holds the key to understanding several important subnetting design points. However to analyze a subnet mask you first need some basic math skills with masks. The math converts masks between the three different formats used to represent a mask: ■ Binary ■ Dotted-decimal notation DDN ■ Prefix also called classless interdomain routing CIDR This chapter has two major sections. The first focuses totally on the mask formats and the math used to convert between the three formats. The second section explains how to take an IP address and its subnet mask and analyze those values. In particular it shows how to determine the three-part format of the IPv4 address and describes the facts about the sub- netting design that are implied by the mask. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 15-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Subnet Mask Conversion 1–3 Defining the Format of IPv4 Addresses 4–7

slide 395:

ptg17246291 1. Which of the following answers lists the prefix CIDR format equivalent of 255.255.254.0 a. /19 b. /20 c. /23 d. /24 e. /25 2. Which of the following answers lists the prefix CIDR format equivalent of 255.255.255.240 a. /26 b. /28 c. /27 d. /30 e. /29 3. Which of the following answers lists the dotted-decimal notation DDN equivalent of /30 a. 255.255.255.192 b. 255.255.255.252 c. 255.255.255.240 d. 255.255.254.0 e. 255.255.255.0 4. Working at the help desk you receive a call and learn a user’s PC IP address and mask 10.55.66.77 mask 255.255.255.0. When thinking about this using classful logic you determine the number of network N subnet S and host H bits. Which of the follow- ing is true in this case a. N12 b. S12 c. H8 d. S8 e. N24 5. Working at the help desk you receive a call and learn a user’s PC IP address and mask 192.168.9.1/27. When thinking about this using classful logic you determine the number of network N subnet S and host H bits. Which of the following is true in this case a. N24 b. S24 c. H8 d. H7

slide 396:

ptg17246291 342 CCENT/CCNA ICND1 100-105 Official Cert Guide 6. Which of the following statements is true about classless IP addressing concepts a. Uses a 128-bit IP address b. Applies only for Class A and B networks c. Separates IP addresses into network subnet and host parts d. Ignores Class A B and C network rules 7. Which of the following masks when used as the only mask within a Class B network would supply enough subnet bits to support 100 subnets Choose two. a. /24 b. 255.255.255.252 c. /20 d. 255.255.252.0 Foundation Topics Subnet Mask Conversion This section describes how to convert between different formats for the subnet mask. You can then use these processes when you practice. If you already know how to convert from one format to the other go ahead and move to the section “Practice Converting Subnet Masks” later in this chapter. Three Mask Formats Subnet masks can be written as 32-bit binary numbers but not just any binary number. In particular the binary subnet mask must follow these rules: ■ The value must not interleave 1s and 0s. ■ If 1s exist they are on the left. ■ If 0s exist they are on the right. For example the following values would be illegal. The first is illegal because the value interleaves 0s and 1s and the second is illegal because it lists 0s on the left and 1s on the right: 10101010 01010101 11110000 00001111 00000000 00000000 00000000 11111111 The following two binary values meet the requirements in that they have all 1s on the left followed by all 0s with no interleaving of 1s and 0s: 11111111 00000000 00000000 00000000 11111111 11111111 11111111 00000000 Two alternative subnet mask formats exist so that we humans do not have to work with 32-bit binary numbers. One format dotted-decimal notation DDN converts each set of 8

slide 397:

ptg17246291 Chapter 15: Analyzing Subnet Masks 343 15 bits into the decimal equivalent. For example the two previous binary masks would convert to the following DDN subnet masks because binary 11111111 converts to decimal 255 and binary 00000000 converts to decimal 0: 255.0.0.0 255.255.255.0 Although the DDN format has been around since the beginning of IPv4 addressing the third mask format was added later in the early 1990s: the prefix format. This format takes advantage of the rule that the subnet mask starts with some number of 1s and then the rest of the digits are 0s. Prefix format lists a slash / followed by the number of binary 1s in the binary mask. Using the same two examples as earlier in this section the prefix format equivalent masks are as follows: /8 /24 Note that although the terms prefix or prefix mask can be used the terms CIDR mask or slash mask can also be used. This newer prefix style mask was created around the same time as the classless interdomain routing CIDR specification back in the early 1990s and the acronym CIDR grew to be used for anything related to CIDR including prefix-style masks. In addition the term slash mask is sometimes used because the value includes a slash mark /. You need to get comfortable working with masks in different formats. The rest of this sec- tion examines how to convert between the three formats. Converting Between Binary and Prefix Masks Converting between binary and prefix masks should be relatively intuitive after you know that the prefix value is simply the number of binary 1s in the binary mask. For the sake of completeness the processes to convert in each direction are Binary to prefix: Count the number of binary 1s in the binary mask and write the total in decimal after a /. Prefix to binary: Write P binary 1s where P is the prefix value followed by as many binary 0s as required to create a 32-bit number. Tables 15-2 and 15-3 show some examples. Table 15-2 Example Conversions: Binary to Prefix Binary Mask Logic Prefix Mask 11111111 11111111 11000000 00000000 Count 8 + 8 + 2 18 binary 1s /18 11111111 11111111 11111111 11110000 Count 8 + 8 + 8 + 4 28 binary 1s /28 11111111 11111000 00000000 00000000 Count 8 + 5 13 binary 1s /13 Answers to the “Do I Know This Already” quiz: 1 C 2 B 3 B 4 C 5 A 6 D 7 A B

slide 398:

ptg17246291 344 CCENT/CCNA ICND1 100-105 Official Cert Guide Table 15-3 Example C on v ersions : Pr efix t o Binar y Prefix Mask Logic Binary Mask /18 Write 18 1s then 14 0s total 32 11111111 11111111 11000000 00000000 /28 Write 28 1s then 4 0s total 32 11111111 11111111 11111111 11110000 /13 Write 13 1s then 19 0s total 32 11111111 11111000 00000000 00000000 Converting Between Binary and DDN Masks By definition a dotted-decimal number DDN used with IPv4 addressing contains four dec- imal numbers separated by dots. Each decimal number represents 8 bits. So a single DDN shows four decimal numbers that together represent some 32-bit binary number. Conversion from a DDN mask to the binary equivalent is relatively simple to describe but can be laborious to perform. First to do the conversion the process is as follows: For each octet perform a decimal-to-binary conversion. However depending on your comfort level with doing decimal-to-binary conversions that process can be difficult or time-consuming. If you want to think about masks in binary for the exam consider picking one of the following methods to do the conversion and practic- ing until you can do it quickly and accurately: ■ Do the decimal-binary conversions but practice your decimal-binary conversions to get fast. If you choose this path consider the Cisco Binary Game which you can find by searching its name at the Cisco Learning Network CLN http://learningnetwork.cisco.com. ■ Use the decimal-binary conversion chart in Appendix A “Numeric Reference Tables.” This lets you find the answer more quickly now but you cannot use the chart on exam day. ■ Memorize the nine possible decimal values that can be in a decimal mask and practice using a reference table with those values. The third method which is the method recommended in this book takes advantage of the fact that any and every DDN mask octet must be one of only nine values. Why Well remember how a binary mask cannot interleave 1s and 0s and the 0s must be on the right It turns out that only nine different 8-bit binary numbers conform to these rules. Table 15-4 lists the values along with other relevant information. Table 15-4 Nine Possible Values in One Octet of a Subnet Mask Binary Mask Octet Decimal Equivalent Number of Binary 1s 00000000 00 10000000 128 1 11000000 192 2 11100000 224 3 11110000 240 4 11111000 248 5

slide 399:

ptg17246291 Chapter 15: Analyzing Subnet Masks 345 15 Binary Mask Octet Decimal Equivalent Number of Binary 1s 11111100 252 6 11111110 254 7 11111111 255 8 Many subnetting processes can be done with or without binary math. Some of those pro- cesses—mask conversion included—use the information in Table 15-4. You should plan to memorize the information in the table. I recommend making a copy of the table to keep handy while you practice. You will likely memorize the contents of this table simply by practicing the conversion process enough to get both good and fast at the conversion. Using the table the conversion processes in each direction with binary and decimal masks are as follows: Binary to decimal: Organize the bits into four sets of eight. For each octet find the bi- nary value in the table and write down the corresponding decimal value. Decimal to binary: For each octet find the decimal value in the table and write down the corresponding 8-bit binary value. Tables 15-5 and 15-6 show some examples. Table 15-5 Conversion Example: Binary to Decimal Binary Mask Logic Decimal Mask 11111111 11111111 11000000 00000000 11111111 maps to 255 11000000 maps to 192 00000000 maps to 0 255.255.192.0 11111111 11111111 11111111 11110000 11111111 maps to 255 11110000 maps to 240 255.255.255.240 11111111 11111000 00000000 00000000 11111111 maps to 255 11111000 maps to 248 00000000 maps to 0 255.248.0.0 Table 15-6 C on v ersion Example s : D e cimal t o Binar y Decimal Mask Logic Binary Mask 255.255.192.0 255 maps to 11111111 192 maps to 11000000 0 maps to 00000000 11111111 11111111 11000000 00000000 255.255.255.240 255 maps to 11111111 240 maps to 11110000 11111111 11111111 11111111 11110000 255.248.0.0 255 maps to 11111111 248 maps to 11111000 0 maps to 00000000 11111111 11111000 00000000 00000000

slide 400:

ptg17246291 346 CCENT/CCNA ICND1 100-105 Official Cert Guide Converting Between Prefix and DDN Masks When learning the best way to convert between the prefix and decimal formats is to first convert to binary. For example to move from decimal to prefix first convert decimal to binary and then from binary to prefix. For the exams set a goal to master these conversions doing the math in your head. While learning you will likely want to use paper. To train yourself to do all this without writing it down instead of writing each octet of binary just write the number of binary 1s in that octet. Figure 15-1 shows an example with a prefix-to-decimal conversion. The left side shows the conversion to binary as an interim step. For comparison the right side shows the binary inter- im step in shorthand that just lists the number of binary 1s in each octet of the binary mask. /18 11111111 11111111 11000000 00000000 255 . 255 192 0 . . /18 882 0 255 . 255 192 0 . . + + + Figure 15-1 Conversion from Prefix to Decimal: Full Binary Versus Shorthand Similarly when converting from decimal to prefix mentally convert to binary along the way and as you improve just think of the binary as the number of 1s in each octet. Figure 15-2 shows an example of such a conversion. 11111111 11111000 00000000 00000000 255 . 248 0 0 . . /13 850 0 255 . 248 0 0 . . + + + /13 Figure 15-2 Conversion from Decimal to Prefix: Full Binary Versus Shorthand Note that Appendix A has a table that lists all 33 legal subnet masks with all three formats shown. Practice Converting Subnet Masks Before moving to the second half of this chapter and thinking about what these subnet masks mean first do some practice. Practice the processes discussed in this chapter until you get the right answer most of the time. Later before taking the exam practice more until you master the topics in this chapter and can move pretty fast as outlined in the right column of Table 15-7.

slide 401:

ptg17246291 Chapter 15: Analyzing Subnet Masks 347 15 Table 15-7 Keep-Reading and T ake-Exam Goals for This Chapter’s T opics Time Frame Before Moving to the Next Section Before Taking the Exam Focus On… Learning how Being correct and fast Tools Allowed All Y our brain and a notepad Goal: Accuracy 90 correct 100 correct Goal: Speed Any speed 10 seconds Table 15-8 lists eight practice problems. The table has three columns one for each mask format. Each row lists one mask in one format. Your job is to find the mask’s value in the other two formats for each row. Table 15-12 located in the section “Answers to Earlier Practice Problems” later in this chapter lists the answers. Table 15-8 Practice Problems: Find the Mask Values in the Other Two Formats Prefix Binary Mask Decimal 11111111 11111111 11000000 00000000 255.255.255.252 /25 /16 255.0.0.0 11111111 11111111 11111100 00000000 255.254.0.0 /27 Identifying Subnet Design Choices Using Masks Subnet masks have many purposes. In fact if ten experienced network engineers were inde- pendently asked “What is the purpose of a subnet mask” the engineers would likely give a variety of true answers. The subnet mask plays several roles. This chapter focuses on one particular use of a subnet mask: defining the prefix part of the IP addresses in a subnet. The prefix part must be the same value for all addresses in a sub- net. In fact a single subnet can be defined as all IPv4 addresses that have the same value in the prefix part of their IPv4 addresses. While the previous paragraph might sound a bit formal the idea is relatively basic as shown in Figure 15-3. The figure shows a network diagram focusing on two subnets: a subnet of all addresses that begin with 172.16.2 and another subnet made of all addresses that begin with 172.16.3. In this example the prefix—the part that has the same value in all the addresses in the subnet—is the first three octets.

slide 402:

ptg17246291 348 CCENT/CCNA ICND1 100-105 Official Cert Guide 172.16.2.101 172.16.2.102 Subnet 172.16.2.0/24 172.16.3.101 172.16.3.102 Subnet 172.16.3.0/24 172.16.5.0/24 172.16.4.0/24 172.16.1.0/24 R1 R2 R3 Figure 15-3 Simple Subnet Design with Mask /24 While people can sit around a conference table and talk about how a prefix is three octets long computers communicate that same concept using a subnet mask. In this case the sub- nets use a subnet mask of /24 which means that the prefix part of the addresses is 24 bits 3 octets long. This section explains more about how to use a subnet mask to understand this concept of a prefix part of an IPv4 address along with these other uses for a subnet mask. Note that this section discusses the first five items in the list. ■ Defines the size of the prefix combined network and subnet part of the addresses in a subnet ■ Defines the size of the host part of the addresses in the subnet ■ Can be used to calculate the number of hosts in the subnet ■ Provides a means for the network designer to communicate the design details—the num- ber of subnet and host bits—to the devices in the network ■ Under certain assumptions can be used to calculate the number of subnets in the entire classful network ■ Can be used in binary calculations of both the subnet ID and the subnet broadcast address Masks Divide the Subnet’s Addresses into Two Parts The subnet mask subdivides the IP addresses in a subnet into two parts: the prefix or sub- net part and the host part. The prefix part identifies the addresses that reside in the same subnet because all IP addresses in the same subnet have the same value in the prefix part of their addresses. The idea is much like the postal code ZIP codes in the United States in mailing addresses. All mailing addresses in the same town have the same postal code. Likewise all IP addresses in the same subnet have identical values in the prefix part of their addresses. The host part of an address identifies the host uniquely inside the subnet. If you compare any two IP addresses in the same subnet their host parts will differ even though the prefix parts of their addresses have the same value. To summarize these key comparisons:

slide 403:

ptg17246291 Chapter 15: Analyzing Subnet Masks 349 15 Prefix subnet part: Equal in all addresses in the same subnet. Host part: Different in all addresses in the same subnet. For example imagine a subnet that in concept includes all addresses whose first three octets are 10.1.1. So the following list shows several addresses in this subnet: 10.1.1.1 10.1.1.2 10.1.1.3 In this list the prefix or subnet part the first three octets of 10.1.1 are equal. The host part the last octet in bold is different. So the prefix or subnet part of the address identifies the group and the host part identifies the specific member of the group. The subnet mask defines the dividing line between the prefix and the host part. To do so the mask creates a conceptual line between the binary 1s in the binary mask and the binary 0s in the mask. In short if a mask has P binary 1s the prefix part is P bits long and the rest of the bits are host bits. Figure 15-4 shows the general concept. Prefix P Host H 32 Bits Mask 0s Mask 1s Figure 15-4 Prefix Subnet and Host Parts Defined by Masks 1s and 0s The next figure Figure 15-5 shows a specific example using mask 255.255.255.0. Mask 255.255.255.0 /24 has 24 binary 1s for a prefix length of 24 bits. P 24 H 8 8 0s 24 1s 11111111 11111111 00000000 11111111 Figure 15-5 Mask 255.255.255.0: P24 H8 Masks and Class Divide Addresses into Three Parts In addition to the two-part view of IPv4 addresses you can also think about IPv4 addresses as having three parts. To do so just apply Class A B and C rules to the address format to define the network part at the beginning of the address. This added logic divides the prefix into two parts: the network part and the subnet part. The class defines the length of the network part with the subnet part simply being the rest of the prefix. Figure 15-6 shows the idea. Network Host Size: 8 16 24 A B C Mask 0s Mask 1s Subnet Figure 15-6 Class Concepts Applied to Create Three Parts

slide 404:

ptg17246291 350 CCENT/CCNA ICND1 100-105 Official Cert Guide The combined network and subnet parts act like the prefix because all addresses in the same subnet must have identical values in the network and subnet parts. The size of the host part remains unchanged whether viewing the addresses as having two parts or three parts. To be complete Figure 15-7 shows the same example as in the previous section with the subnet of “all addresses that begin with 10.1.1.” In that example the subnet uses mask 255.255.255.0 and the addresses are all in Class A network 10.0.0.0. The class defines 8 net- work bits and the mask defines 24 prefix bits meaning that 24 – 8 16 subnet bits exist. The host part remains as 8 bits per the mask. N 8 H 8 8 0s 24 1s 11111111 11111111 00000000 11111111 S 24 - 8 16 Based on Class Figure 15-7 Subnet 10.1.1.0 Mask 255.255.255.0: N8 S16 H8 Classless and Classful Addressing The terms classless addressing and classful addressing refer to the two different ways to think about IPv4 addresses as described so far in this chapter. Classful addressing means that you think about Class A B and C rules so the prefix is separated into the network and subnet parts as shown in Figures 15-6 and 15-7. Classless addressing means that you ignore the Class A B and C rules and treat the prefix part as one part as shown in Figures 15-4 and 15-5. The following more formal definitions are listed for reference and study: Classless addressing: The concept that an IPv4 address has two parts—the prefix part plus the host part—as defined by the mask with no consideration of the class A B or C. Classful addressing: The concept that an IPv4 address has three parts—network subnet and host—as defined by the mask and Class A B and C rules. NOTE Unfortunately the networking world uses the terms classless and classful in a couple of different ways. In addition to the classless and classful addressing described here each routing protocol can be categorized as either a classless routing protocol or a class- ful routing protocol. In addition the terms classless routing and classful routing refer to some details of how Cisco routers forward route packets using the default route in some cases. As a result these terms can be easily confused and misused. So when you see the words classless and classful be careful to note the context: addressing routing or routing protocols. Calculations Based on the IPv4 Address Format After you know how to break an address down using both classless and classful addressing rules you can easily calculate a couple of important facts using some basic math formulas.

slide 405:

ptg17246291 Chapter 15: Analyzing Subnet Masks 351 15 First for any subnet after you know the number of host bits you can calculate the number of host IP addresses in the subnet. Next if you know the number of subnet bits using class- ful addressing concepts and you know that only one subnet mask is used throughout the network you can also calculate the number of subnets in the network. The formulas just require that you know the powers of 2: Hosts in the subnet: 2 H – 2 where H is the number of host bits. Subnets in the network: 2 S where S is the number of subnet bits. Only use this formula if only one mask is used throughout the network. NOTE The section “Choose the Mask” in Chapter 13 “Perspectives on IPv4 Subnetting” details many concepts related to masks including comments about this assumption of one mask throughout a single Class A B or C network. The sizes of the parts of IPv4 addresses can also be calculated. The math is basic but the concepts are important. Keeping in mind that IPv4 addresses are 32 bits long the two parts with classless addressing must add up to 32 P + H 32 and with classful addressing the three parts must add up to 32 N + S + H 32. Figure 15-8 shows the relationships. 32 /P N H S Class: A: N 8 B: N 16 C: N 24 Figure 15-8 Relationship Between /P N S and H You often begin with an IP address and mask both when answering questions on the CCENT and CCNA Routing and Switching exams and when examining problems that occur in real networks. Based on the information in this chapter and earlier chapters you should be able to find all the information in Figure 15-8 and then calculate the number of hosts/ subnet and the number of subnets in the network. For reference the following process spells out the steps: Step 1. Convert the mask to prefix format /P as needed. See the earlier section “Practice Converting Subnet Masks” for review. Step 2. Determine N based on the class. See Chapter 14 “Analyzing Classful IPv4 Networks” for review. Step 3. Calculate S P – N. Step 4. Calculate H 32 – P. Step 5. Calculate hosts/subnet: 2 H – 2. Step 6. Calculate number of subnet: 2 S .

slide 406:

ptg17246291 352 CCENT/CCNA ICND1 100-105 Official Cert Guide For example consider the case of IP address 8.1.4.5 with mask 255.255.0.0. Following the process: Step 1. 255.255.0.0 /16 so P16. Step 2. 8.1.4.5 is in the range 1–126 in the first octet so it is Class A so N8. Step 3. S P – N 16 – 8 8. Step 4. H 32 – P 32 – 16 16. Step 5. 2 16 – 2 65534 hosts/subnet. Step 6. 2 8 256 subnets. Figure 15-9 shows a visual analysis of the same problem. N 8 H 16 16 0s 16 1s 11111111 00000000 11111111 S 16 - 8 00000000 Figure 15-9 Visual Representation of Problem: 8.1.4.5 255.255.0.0 For another example consider address 200.1.1.1 mask 255.255.255.252. Following the process: Step 1. 255.255.255.252 /30 so P30. Step 2. 200.1.1.1 is in the range 192–223 in the first octet so it is Class C so N24. Step 3. S P – N 30 – 24 6. Step 4. H 32 – P 32 – 30 2. Step 5. 2 2 – 2 2 hosts/subnet Step 6. 2 6 64 subnets. This example uses a popular mask for serial links because serial links only require two host addresses and the mask supports only two host addresses. Practice Analyzing Subnet Masks As with the other subnetting math in this book using a two-phase approach may help. Take time now to practice until you feel like you understand the process. Then before the exam make sure you master the math. Table 15-9 summarizes the key concepts and suggestions for this two-phase approach. Table 15-9 Keep-Reading and T ake-Exam Goals for This Chapter’s T opics Time Frame Before Moving to the Next Chapter Before Taking the Exam Focus On… Learning how Being correct and fast Tools Allowed All Y our brain and a notepad Goal: Accuracy 90 correct 100 correct Goal: Speed Any speed 15 seconds

slide 407:

ptg17246291 Chapter 15: Analyzing Subnet Masks 353 15 On a piece of scratch paper answer the following questions. In each case: ■ Determine the structure of the addresses in each subnet based on the class and mask using classful IP addressing concepts. In other words find the size of the network sub- net and host parts of the addresses. ■ Calculate the number of hosts in the subnet. ■ Calculate the number of subnets in the network assuming that the same mask is used throughout. 1. 8.1.4.5 255.255.254.0 2. 130.4.102.1 255.255.255.0 3. 199.1.1.100 255.255.255.0 4. 130.4.102.1 255.255.252.0 5. 199.1.1.100 255.255.255.224 The answers are listed in the section “Answers to Earlier Practice Problems” later in this chapter. Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment for more details. Table 15-10 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 15-10 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Answer DIKTA questions Book PCPT Review memory tables Book DVD/website Practice analyzing subnet masks DVD Appendix E DVD/website

slide 408:

ptg17246291 354 CCENT/CCNA ICND1 100-105 Official Cert Guide Review All the Key Topics Table 15-11 Key T opics for Chapter 15 Key Topic Element Description Page Number List Rules for binary subnet mask values 342 List Rules to convert between binary and prefix masks 343 Table 15-4 Nine possible values in a decimal subnet mask 344 List Rules to convert between binary and DDN masks 345 List Some functions of a subnet mask 348 List Comparisons of IP addresses in the same subnet 349 Figure 15-4 Two-part classless view of an IP address 349 Figure 15-6 Three-part classful view of an IP address 349 List Definitions of classful addressing and classless addressing 350 List Formal steps to analyze masks and calculate values 351 Key Terms You Should Know binary mask dotted-decimal notation DDN decimal mask prefix mask CIDR mask classful addressing classless addressing Additional Practice for This Chapter’s Processes For additional practice with analyzing classful networks you may do the same set of prac- tice problems using your choice of tools: Application: Use the Analyzing Subnet Masks application on the DVD or companion website. PDF: Alternatively practice the same problems found in both these apps using DVD Appendix E “Practice for Chapter 15: Analyzing Subnet Masks.” Answers to Earlier Practice Problems Table 15-8 shown earlier listed several practice problems for converting subnet masks Table 15-12 lists the answers. Table 15-12 Answers to Problems in T able 15-8 Prefix Binary Mask Decimal /18 11111111 11111111 11000000 00000000 255.255.192.0 /30 11111111 11111111 11111111 11111100 255.255.255.252 /25 11111111 11111111 11111111 10000000 255.255.255.128 /16 11111111 11111111 00000000 00000000 255.255.0.0 /8 11111111 00000000 00000000 00000000 255.0.0.0

slide 409:

ptg17246291 Chapter 15: Analyzing Subnet Masks 355 15 Prefix Binary Mask Decimal /22 11111111 11111111 11111100 00000000 255.255.252.0 /15 11111111 11111110 00000000 00000000 255.254.0.0 /27 11111111 11111111 11111111 11100000 255.255.255.224 Table 15-13 lists the answers to the practice problems from the earlier section “Practice Analyzing Subnet Masks.” Table 15-13 Answers to Problems from Earlier in the Chapter Problem /P Class N S H 2 S 2 H – 2 1 8.1.4.5 255.255.254.0 23 A 8 15 9 32768 510 2 130.4.102.1 255.255.255.0 24 B 16 8 8 256 254 3 199.1.1.100 255.255.255.0 24 C 24 0 8 N/A 254 4 130.4.102.1 255.255.252.0 22 B 16 6 10 64 1022 5 199.1.1.100 255.255.255.224 27 C 24 3 5 8 30 The following list reviews the problems: 1. For 8.1.4.5 the first octet 8 is in the 1–126 range so it is a Class A address with 8 network bits. Mask 255.255.254.0 converts to /23 so P – N 15 for 15 subnet bits. H can be found by subtracting /P 23 from 32 for 9 host bits. 2. 130.4.102.1 is in the 128–191 range in the first octet making it a Class B address with N 16 bits. 255.255.255.0 converts to /24 so the number of subnet bits is 24 – 16 8. With 24 prefix bits the number of host bits is 32 – 24 8. 3. The third problem purposely shows a case where the mask does not create a subnet part of the address. The address 199.1.1.100 has a first octet between 192 and 223 making it a Class C address with 24 network bits. The prefix version of the mask is /24 so the number of subnet bits is 24 – 24 0. The number of host bits is 32 minus the prefix length 24 for a total of 8 host bits. So in this case the mask shows that the network engineer is using the default mask which creates no subnet bits and no subnets. 4. With the same address as the second problem 130.4.102.1 is a Class B address with N 16 bits. This problem uses a different mask 255.255.252.0 which converts to /22. This makes the number of subnet bits 22 – 16 6. With 22 prefix bits the number of host bits is 32 – 22 10. 5. With the same address as the third problem 199.1.1.100 is a Class C address with N 24 bits. This problem uses a different mask 255.255.255.224 which converts to /27. This makes the number of subnet bits 27 – 24 3. With 27 prefix bits the number of host bits is 32 – 27 5.

slide 410:

ptg17246291 CHAPTER 16 Analyzing Existing Subnets This chapter covers the following exam topics: 1.0 Network Fundamentals 1.8 Configure verify and troubleshoot IPv4 addressing and subnetting 1.9 Compare and contrast IPv4 address types 1.9.a Unicast 1.9.b Broadcast Often a networking task begins with the discovery of the IP address and mask used by some host. Then to understand how the internetwork routes packets to that host you must find key pieces of information about the subnet specifically the following: ■ Subnet ID ■ Subnet broadcast address ■ Subnet’s range of usable unicast IP addresses This chapter discusses the concepts and math to take a known IP address and mask and then fully describe a subnet by finding the values in this list. These specific tasks might well be the most important IP skills in the entire IP addressing and subnetting topics in this book because these tasks might be the most commonly used tasks when operating and trouble- shooting real networks. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 16-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Defining a Subnet 1 Analyzing Existing Subnets: Binary 2 Analyzing Existing Subnets: Decimal 3–6

slide 411:

ptg17246291 1. When thinking about an IP address using classful addressing rules an address can have three parts: network subnet and host. If you examined all the addresses in one subnet in binary which of the following answers correctly states which of the three parts of the addresses will be equal among all addresses Choose the best answer. a. Network part only b. Subnet part only c. Host part only d. Network and subnet parts e. Subnet and host parts 2. Which of the following statements are true regarding the binary subnet ID subnet broadcast address and host IP address values in any single subnet Choose two answers. a. The host part of the broadcast address is all binary 0s. b. The host part of the subnet ID is all binary 0s. c. The host part of a usable IP address can have all binary 1s. d. The host part of any usable IP address must not be all binary 0s. 3. Which of the following is the resident subnet ID for IP address 10.7.99.133/24 a. 10.0.0.0 b. 10.7.0.0 c. 10.7.99.0 d. 10.7.99.128 4. Which of the following is the resident subnet for IP address 192.168.44.97/30 a. 192.168.44.0 b. 192.168.44.64 c. 192.168.44.96 d. 192.168.44.128 5. Which of the following is the subnet broadcast address for the subnet in which IP address 172.31.77.201/27 resides a. 172.31.201.255 b. 172.31.255.255 c. 172.31.77.223 d. 172.31.77.207

slide 412:

ptg17246291 358 CCENT/CCNA ICND1 100-105 Official Cert Guide 6. A fellow engineer tells you to configure the DHCP server to lease the last 100 usable IP addresses in subnet 10.1.4.0/23. Which of the following IP addresses could be leased as a result of your new configuration a. 10.1.4.156 b. 10.1.4.254 c. 10.1.5.200 d. 10.1.7.200 e. 10.1.255.200 Foundation Topics Defining a Subnet An IP subnet is a subset of a classful network created by choice of some network engineer. However that engineer cannot pick just any arbitrary subset of addresses instead the engi- neer must follow certain rules such as the following: ■ The subnet contains a set of consecutive numbers. ■ The subnet holds 2 H numbers where H is the number of host bits defined by the sub- net mask. ■ Two special numbers in the range cannot be used as IP addresses: ■ The fi rst lowest number acts as an identifi er for the subnet subnet ID. ■ The last highest number acts as a subnet broadcast address. ■ The remaining addresses whose values sit between the subnet ID and subnet broadcast address are used as unicast IP addresses. This section reviews and expands the basic concepts of the subnet ID subnet broadcast address and range of addresses in a subnet. An Example with Network 172.16.0.0 and Four Subnets Imagine that you work at the customer support center where you receive all initial calls from users who have problems with their computer. You coach the user through finding her IP address and mask: 172.16.150.41 mask 255.255.192.0. One of the first and most com- mon tasks you will do based on that information is to find the subnet ID of the subnet in which that address resides. In fact this subnet ID is sometimes called the resident subnet because the IP address exists in or resides in that subnet. Before getting into the math examine the mask 255.255.192.0 and classful network 172.16.0.0 for a moment. From the mask based on what you learned in Chapter 15 “Analyzing Subnet Masks” you can find the structure of the addresses in the subnet includ- ing the number of host and subnet bits. That analysis tells you that two subnet bits exist meaning that there should be four 2 2 subnets. Figure 16-1 shows the idea.

slide 413:

ptg17246291 Chapter 16: Analyzing Existing Subnets 359 16 N 16 H 14 S 2 /P N + S /18 Subnets 2 2 Hosts 2 14 - 2 Figure 16-1 Address Structure: Class B Network /18 Mask NOTE This chapter like the others in this part of the book assumes that one mask is used throughout an entire classful network. Because each subnet uses a single mask all subnets of this single IP network must be the same size because all subnets have the same structure. In this example all four subnets will have the structure shown in the figure so all four subnets will have 2 14 – 2 host addresses. Next consider the big picture of what happens with this example subnet design: The one Class B network now has four subnets of equal size. Conceptually if you represent the entire Class B network as a number line each subnet consumes one-fourth of the number line as shown in Figure 16-2. Each subnet has a subnet ID—the numerically lowest number in the subnet—so it sits on the left of the subnet. And each subnet has a subnet broadcast address—the numerically highest number in the subnet—so it sits on the right side of the subnet. Subnet 1 Subnet 3 Subnet 2 Subnet 4 172.16.150.41 Legend: Network ID Subnet ID Subnet Broadcast Address Figure 16-2 Network 172.16.0.0 Divided into Four Equal Subnets The rest of this chapter focuses on how to take one IP address and mask and discover the details about that one subnet in which the address resides. In other words you see how to find the resident subnet of an IP address. Again using IP address 172.16.150.41 and mask 255.255.192.0 as an example Figure 16-3 shows the resident subnet along with the subnet ID and subnet broadcast address that bracket the subnet. Answers to the “Do I Know This Already” quiz: 1 D 2 B D 3 C 4 C 5 C 6 C

slide 414:

ptg17246291 360 CCENT/CCNA ICND1 100-105 Official Cert Guide Subnet 1 Subnet 2 Subnet 4 172.16.150.41 Legend: 172.16.128.0 172.16.191.255 Subnet ID Subnet Broadcast Address Figure 16-3 Resident Subnet for 172.16.150.41 255.255.192.0 Subnet ID Concepts A subnet ID is simply a number used to succinctly represent a subnet. When listed along with its matching subnet mask the subnet ID identifies the subnet and can be used to derive the subnet broadcast address and range of addresses in the subnet. Rather than having to write down all these details about a subnet you simply need to write down the subnet ID and mask and you have enough information to fully describe the subnet. The subnet ID appears in many places but it is seen most often in IP routing tables. For example when an engineer configures a router with its IP address and mask the router calcu- lates the subnet ID and puts a route into its routing table for that subnet. The router typically then advertises the subnet ID/mask combination to neighboring routers with some IP routing protocol. Eventually all the routers in an enterprise learn about the subnet—again using the subnet ID and subnet mask combination—and display it in their routing tables. Y ou can dis- play the contents of a router’s IP routing table using the show ip route command. Unfortunately the terminology related to subnets can sometimes cause problems. First the terms subnet ID subnet number and subnet address are synonyms. In addition people sometimes simply say subnet when referring to both the idea of a subnet and the number that is used as the subnet ID. When talking about routing people sometimes use the term prefix instead of subnet. The term prefix refers to the same idea as subnet it just uses terminology from the classless addressing way to describe IP addresses as discussed in Chapter 15’s section “Classless and Classful Addressing.” The biggest terminology confusion arises between the terms network and subnet. In the real world people often use these terms synonymously and that is perfectly reasonable in some cases. In other cases the specific meaning of these terms and their differences matter to what is being discussed. For example people often might say “What is the network ID” when they really want to know the subnet ID. In another case they might want to know the Class A B or C net- work ID. So when one engineer asks something like “What’s the net ID for 172.16.150.41 slash 18” use the context to figure out whether he wants the literal classful network ID 172.16.0.0 in this case or the literal subnet ID 172.16.128.0 in this case. For the exams be ready to notice when the terms subnet and network are used and then use the context to figure out the specific meaning of the term in that case. Table 16-2 summarizes the key facts about the subnet ID along with the possible syn- onyms for easier review and study.

slide 415:

ptg17246291 Chapter 16: Analyzing Existing Subnets 361 16 Table 16-2 Summary of Subnet ID Key Facts Definition Number that represents the subnet Numeric Value First smallest number in the subnet Literal Synonyms Subnet number subnet address prefix resident subnet Common-Use Synonyms Network network ID network number network address Typically Seen In... R o ut ing tab l e s d oc um e ntat i o n Subnet Broadcast Address The subnet broadcast address has two main roles: to be used as a destination IP address for the purpose of sending packets to all hosts in the subnet and as a means to find the high end of the range of addresses in a subnet. The original purpose for the subnet broadcast address was to give hosts a way to send one packet to all hosts in a subnet and to do so efficiently. For example a host in subnet A could send a packet with a destination address of subnet B’s subnet broadcast address. The routers would forward this one packet just like a packet sent to a host in subnet B. After the packet arrives at the router connected to subnet B that last router would then forward the packet to all hosts in subnet B typically by encapsulating the packet in a data link layer broadcast frame. As a result all hosts in host B’s subnet would receive a copy of the packet. The subnet broadcast address also helps you find the range of addresses in a subnet because the broadcast address is the last highest number in a subnet’s range of addresses. To find the low end of the range calculate the subnet ID to find the high end of the range calculate the subnet broadcast address . Table 16-3 summarizes the key facts about the subnet broadcast address along with the possible synonyms for easier review and study. Table 16-3 Summary of Subnet Broadcast Address Key Facts Definition A reserved number in each subnet that when used as the destination address of a packet causes the device to forward the packet to all hosts in that subnet Numeric Value Last highest number in the subnet Literal Synonyms Directed broadcast address Broader-Use Synonyms Network broadcast Typically Seen In In calculations of the range of addresses in a subnet Range of Usable Addresses The engineers implementing an IP internetwork need to know the range of unicast IP addresses in each subnet. Before you can plan which addresses to use as statically assigned IP addresses which to configure to be leased by the DHCP server and which to reserve for later use you need to know the range of usable addresses. To find the range of usable IP addresses in a subnet first find the subnet ID and the subnet broadcast address. Then just add 1 to the fourth octet of the subnet ID to get the first low- est usable address and subtract 1 from the fourth octet of the subnet broadcast address to get the last highest usable address in the subnet.

slide 416:

ptg17246291 362 CCENT/CCNA ICND1 100-105 Official Cert Guide For example Figure 16-3 showed subnet ID 172.16.128.0 mask /18. The first usable address is simply one more than the subnet ID in this case 172.16.128.1. That same figure showed a subnet broadcast address of 172.16.191.255 so the last usable address is one less or 172.16.191.254. Now that this section has described the concepts behind the numbers that collectively define a subnet the rest of this chapter focuses on the math used to find these values. Analyzing Existing Subnets: Binary What does it mean to “analyze a subnet” For this book it means that you should be able to start with an IP address and mask and then define key facts about the subnet in which that address resides. Specifically that means discovering the subnet ID subnet broadcast address and range of addresses. The analysis can also include the calculation of the num- ber of addresses in the subnet as discussed in Chapter 15 but this chapter does not review those concepts. Many methods exist to calculate the details about a subnet based on the address/mask. This section begins by discussing some calculations that use binary math with the next section showing alternatives that use only decimal math. Although many people prefer the decimal method for going fast on the exams the binary calculations ultimately give you a better understanding of IPv4 addressing. In particular if you plan to move on to attain Cisco certifications beyond CCNA Routing and Switching you should take the time to understand the binary methods discussed in this section even if you use the deci- mal methods for the exams. Finding the Subnet ID: Binary To start this section that uses binary first consider a simple decimal math problem. The problem: Find the smallest three-digit decimal number that begins with 4. The answer of course is 400. And although most people would not have to break down the logic into steps you know that 0 is the lowest-value digit you can use for any digit in a decimal num- ber. You know that the first digit must be a 4 and the number is a three-digit number so you just use the lowest value 0 for the last two digits and find the answer: 400. This same concept applied to binary IP addresses gives you the subnet ID. You have seen all the related concepts in other chapters so if you already intuitively know how to find the subnet ID in binary great If not the following key facts should help you see the logic: All numbers in the subnet subnet ID subnet broadcast address and all usable IP address- es have the same value in the prefix part of the numbers. The subnet ID is the lowest numeric value in the subnet so its host part in binary is all 0s. To find the subnet ID in binary you take the IP address in binary and change all host bits to binary 0. To do so you need to convert the IP address to binary. You also need to identify the prefix and host bits which can be easily done by converting the mask as needed to prefix format. Note that Appendix A “Numeric Reference Tables” includes a decimal- binary conversion table. Figure 16-4 shows the idea using the same address/mask as in the earlier examples in this chapter: 172.16.150.41 mask /18.

slide 417:

ptg17246291 Chapter 16: Analyzing Existing Subnets 363 16 ID ID Prefix: Copy 172.16.150.41 PPPPPPPP PP HHHHHH HHHHHHHH PPPPPPPP 00010000 10 010110 00101001 10101100 00010000 10 000000 00000000 10101100 /18 1 2 3 ________ _________ ________ ________ Legend: Subnet ID Host: Set to 0 4 Figure 16-4 Binary Concept: Convert the IP Address to the Subnet ID Starting at the top of Figure 16-4 the format of the IP address is represented with 18 prefix P and 14 host H bits in the mask Step 1. The second row Step 2 shows the binary version of the IP address converted from the dotted-decimal notation DDN value 172.16.150.41. If you have not yet used the conversion table in Appendix A it might be useful to double-check the conversion of all four octets based on the table. The next two steps show the action to copy the IP address’s prefix bits Step 3 and give the host bits a value of binary 0 Step 4. This resulting number is the subnet ID in binary. The last step not shown in Figure 16-4 is to convert the subnet ID from binary to decimal. This book shows that conversion as a separate step in Figure 16-5 mainly because many people make a mistake at this step in the process. When converting a 32-bit number like an IP address or IP subnet ID back to an IPv4 DDN you must follow this rule: Convert 8 bits at a time from binary to decimal regardless of the line between the prefix and host parts of the number. ID PPPPPPPP PP HHHHHH HHHHHHHH PPPPPPPP 00010000 10 010110 00101001 10101100 00010000 10 000000 00000000 10101100 ________ _________ ________ ________ ID 16 128 0 172 . . . 5 5 5 5 Figure 16-5 Converting the Subnet ID from Binary to DDN Figure 16-5 shows this final step. Note that the third octet the third set of 8 bits has 2 bits in the prefix and 6 bits in the host part of the number but the conversion occurs for all 8 bits.

slide 418:

ptg17246291 364 CCENT/CCNA ICND1 100-105 Official Cert Guide NOTE You can do the numeric conversions in Figures 16-4 and 16-5 by relying on the conversion table in Appendix A. To convert from DDN to binary for each octet find the decimal value in the table and then write down the 8-bit binary equivalent. To convert from binary back to DDN for each octet of 8 bits find the matching binary entry in the table and write down the corresponding decimal value. For example 172 converts to binary 10101100 and 00010000 converts to decimal 16. Finding the Subnet Broadcast Address: Binary Finding the subnet broadcast address uses a similar process. To find the subnet broadcast address use the same binary process used to find the subnet ID but instead of setting all the host bits to the lowest value all binary 0s set the host part to the highest value all binary 1s. Figure 16-6 shows the concept. ________ _________ ________ ________ 172.16.150.41 PPPPPPPP PP HHHHHH HHHHHHHH PPPPPPPP 00010000 10 010110 00101001 10101100 00010000 10 111111 11111111 10101100 16 191 255 172 . . . /18 Legend: Broadcast Address Prefix: Copy Host: Set to 1 3 4 5 5 5 5 1 2 Figure 16-6 Finding a Subnet Broadcast Address: Binary The process in Figure 16-6 demonstrates the same first three steps shown in Figure 16-4. Specifically it shows the identification of the prefix and host bits Step 1 the results of converting the IP address 172.16.150.41 to binary Step 2 and the copying of the prefix bits first 18 bits in this case. The difference occurs in the host bits on the right changing all host bits the last 14 in this case to the largest possible value all binary 1s. The final step converts the 32-bit subnet broadcast address to DDN format. Also remember that with any conversion from DDN to binary or vice versa the process always converts using 8 bits at a time. In particular in this case the entire third octet of binary 10111111 is converted back to decimal 191 . Binary Practice Problems Figures 16-4 and 16-5 demonstrate a process to find the subnet ID using binary math. The following process summarizes those steps in written form for easier reference and practice: Step 1. Convert the mask to prefix format to find the length of the prefix /P and the length of the host part 32 – P. Step 2. Convert the IP address to its 32-bit binary equivalent. Step 3. Copy the prefix bits of the IP address.

slide 419:

ptg17246291 Chapter 16: Analyzing Existing Subnets 365 16 Step 4. Write down 0s for the host bits. Step 5. Convert the resulting 32-bit number 8 bits at a time back to decimal. The process to find the subnet broadcast address is exactly the same except in Step 4 you set the bits to 1s as shown in Figure 16-6. Take a few moments and run through the following five practice problems on scratch paper. In each case find both the subnet ID and subnet broadcast address. Also record the prefix style mask: 1. 8.1.4.5 255.255.0.0 2. 130.4.102.1 255.255.255.0 3. 199.1.1.100 255.255.255.0 4. 130.4.102.1 255.255.252.0 5. 199.1.1.100 255.255.255.224 Tables 16-4 through 16-8 show the results for the five different examples. The tables show the host bits in bold and they include the binary version of the address and mask and the binary version of the subnet ID and subnet broadcast address . Table 16-4 Subnet Analysis for Subnet with Address 8.1.4.5 Mask 255.255.0.0 Prefix Length /16 11111111 11111111 00000000 00000000 Address 8.1.4.5 00001000 00000001 00000100 00000101 Subnet ID 8.1.0.0 00001000 00000001 00000000 00000000 Broadcast Address 8.1.255.255 00001000 00000001 11111111 11111111 Table 16-5 Subnet Analysis for Subnet with Address 130.4.102.1 Mask 255.255.255.0 Prefix Length /24 11111111 11111111 11111111 00000000 Address 130.4.102.1 10000010 00000100 01100110 00000001 Subnet ID 130.4.102.0 10000010 00000100 01100110 00000000 Broadcast Address 130.4.102.255 10000010 00000100 01100110 11111111 Table 16-6 Subnet Analysis for Subnet with Address 199.1.1.100 Mask 255.255.255.0 Prefix Length /24 11111111 11111111 11111111 00000000 Address 199.1.1.100 11000111 00000001 00000001 01100100 Subnet ID 199.1.1.0 11000111 00000001 00000001 00000000 Broadcast Address 199.1.1.255 11000111 00000001 00000001 11111111 Table 16-7 Subnet Analysis for Subnet with Address 130.4.102.1 Mask 255.255.252.0 Prefix Length /22 11111111 11111111 11111100 00000000 Address 130.4.102.1 10000010 00000100 01100110 00000001 Subnet ID 130.4.100.0 10000010 00000100 01100100 00000000 Broadcast Address 130.4.103.255 10000010 00000100 01100111 11111111

slide 420:

ptg17246291 366 CCENT/CCNA ICND1 100-105 Official Cert Guide Table 16-8 Subnet Analysis for Subnet with Address 199.1.1.100 Mask 255.255.255.224 Prefix Length /27 11111111 11111111 11111111 11100000 Address 199.1.1.100 11000111 00000001 00000001 01100100 Subnet ID 199.1.1.96 11000111 00000001 00000001 01100000 Broadcast Address 199.1.1.127 11000111 00000001 00000001 01111111 Shortcut for the Binary Process The binary process described in this section so far requires that all four octets be converted to binary and then back to decimal. However you can easily predict the results in at least three of the four octets based on the DDN mask. You can then avoid the binary math in all but one octet and reduce the number of binary conversions you need to do. First consider an octet and that octet only whose DDN mask value is 255. The mask value of 255 converts to binary 11111111 which means that all 8 bits are prefix bits. Thinking through the steps in the process at Step 2 you convert the address to some number. At Step 3 you copy the number. At Step 4 you convert the same 8-bit number back to deci- mal. All you did in those three steps in this one octet is convert from decimal to binary and convert the same number back to the same decimal value In short the subnet ID and subnet broadcast address are equal to the IP address in octets for which the mask is 255. For example the resident subnet ID for 172.16.150.41 mask 255.255.192.0 is 172.16.128.0. The first two mask octets are 255. Rather than think about the binary math you could just start by copying the address’s value in those two octets: 172.16. Another shortcut exists for octets whose DDN mask value is decimal 0 or binary 00000000. With a decimal mask value of 0 the math always results in a decimal 0 for the subnet ID no matter the beginning value in the IP address. Specifically just look at Steps 4 and 5 in this case: At Step 4 you would write down 8 binary 0s and at Step 5 convert 00000000 back to decimal 0. The following revised process steps take these two shortcuts into account. However when the mask is neither 0 nor 255 the process requires the same conversions. At most you have to do only one octet of the conversions. To find the subnet ID apply the logic in these steps for each of the four octets: Step 1. If the mask 255 copy the decimal IP address for that octet. Step 2. If the mask 0 write down a decimal 0 for that octet. Step 3. If the mask is neither 0 nor 255 in this octet use the same binary logic as shown in the section “Finding the Subnet ID: Binary” earlier in this chapter. Figure 16-7 shows an example of this process again using 172.16.150.41 255.255.192.0.

slide 421:

ptg17246291 Chapter 16: Analyzing Existing Subnets 367 16 0-255 ID ID 0-255 192 Binary 150 ____ .. . 255 Copy 16 16 0 Zero 41 0 255 Copy 172 172 .. . .. . Action Legend: DDN Mask IP Address Subnet ID IP IP Figure 16-7 Binary Shortcut Example To find the subnet broadcast address you can use a decimal shortcut similar to the one used to find the subnet ID: For DDN mask octets equal to decimal 0 set the decimal subnet broadcast address value to 255 instead of 0 as noted in the following list: Step 1. If the mask 255 copy the decimal IP address for that octet. Step 2. If the mask 0 write down a decimal 255 for that octet. Step 3. If the mask is neither 0 nor 255 in this octet use the same binary logic as shown in the section “Finding the Subnet Broadcast Address: Binary” earlier in this chapter. Brief Note About Boolean Math So far this chapter has described how humans can use binary math to find the subnet ID and subnet broadcast address. However computers typically use an entirely different binary process to find the same values using a branch of mathematics called Boolean algebra. Computers already store the IP address and mask in binary form so they do not have to do any conversions to and from decimal. Then certain Boolean operations allow the computers to calculate the subnet ID and subnet broadcast address with just a few CPU instructions. You do not need to know Boolean math to have a good understanding of IP subnetting. However in case you are interested computers use the following Boolean logic to find the subnet ID and subnet broadcast address respectively: Perform a Boolean AND of the IP address and mask. This process converts all host bits to binary 0. Invert the mask and then perform a Boolean OR of the IP address and inverted subnet mask. This process converts all host bits to binary 1s. Finding the Range of Addresses Finding the range of usable addresses in a subnet after you know the subnet ID and subnet broadcast address requires only simple addition and subtraction. To find the first lowest usable IP address in the subnet simply add 1 to the fourth octet of the subnet ID. To find the last highest usable IP address simply subtract 1 from the fourth octet of the subnet broadcast address.

slide 422:

ptg17246291 368 CCENT/CCNA ICND1 100-105 Official Cert Guide Analyzing Existing Subnets: Decimal Analyzing existing subnets using the binary process works well. However some of the math takes time for most people particularly the decimal-binary conversions. And you need to do the math quickly for the Cisco CCENT and CCNA Routing and Switching exams. For the exams you really should be able to take an IP address and mask and calculate the sub- net ID and range of usable addresses within about 15 seconds. When using binary methods most people require a lot of practice to be able to find these answers even when using the abbreviated binary process. This section discusses how to find the subnet ID and subnet broadcast address using only decimal math. Most people can find the answers more quickly using this process at least after a little practice as compared with the binary process. However the decimal process does not tell you anything about the meaning behind the math. So if you have not read the earlier section “Analyzing Existing Subnets: Binary” it is worthwhile to read it for the sake of understanding subnetting. This section focuses on getting the right answer using a method that after you have practiced should be faster . Analysis with Easy Masks With three easy subnet masks in particular finding the subnet ID and subnet broadcast address requires only easy logic and literally no math. Three easy masks exist: 255.0.0.0 255.255.0.0 255.255.255.0 These easy masks have only 255 and 0 in decimal. In comparison difficult masks have one octet that has neither a 255 nor a 0 in the mask which makes the logic more challenging. NOTE The terms easy mask and difficult mask are terms created for use in this book to describe the masks and the level of difficulty when working with each. When the problem uses an easy mask you can quickly find the subnet ID based on the IP address and mask in DDN format. Just use the following process for each of the four octets to find the subnet ID: Step 1. If the mask octet 255 copy the decimal IP address. Step 2. If the mask octet 0 write a decimal 0. A similar simple process exists to find the subnet broadcast address as follows: Step 1. If the mask octet 255 copy the decimal IP address. Step 2. If the mask octet 0 write a decimal 255. Before moving to the next section take some time to fill in the blanks in Table 16-9. Check your answers against Table 16-15 in the section “Answers to Earlier Practice Problems” later in this chapter. Complete the table by listing the subnet ID and subnet broadcast address.

slide 423:

ptg17246291 Chapter 16: Analyzing Existing Subnets 369 16 Table 16-9 Practice Problems: Find Subnet ID and Broadcast Easy Masks IP Address Mask Subnet ID Broadcast Address 1 10.77 .55.3 255.255.255.0 2 172.30.99.4 255.255.255.0 3 192.168.6.54 255.255.255.0 4 10.77 .3.14 255.255.0.0 5 172.22.55.77 255.255.0.0 6 1.99.53.76 255.0.0.0 Predictability in the Interesting Octet Although three masks are easier to work with 255.0.0.0 255.255.0.0 and 255.255.255.0 the rest make the decimal math a little more difficult so we call these masks difficult masks. With difficult masks one octet is neither a 0 nor a 255. The math in the other three octets is easy and boring so this book calls the one octet with the more difficult math the interesting octet. If you take some time to think about different problems and focus on the interesting octet you will begin to see a pattern. This section takes you through that examination so that you can learn how to predict the pattern in decimal and find the subnet ID. First the subnet ID value has a predictable decimal value because of the assumption that a single subnet mask is used for all subnets of a single classful network. The chapters in this part of the book assume that for a given classful network the design engineer chooses to use a single subnet mask for all subnets. See the section “One Size Subnet Fits All—Or Not” in Chapter 13 “Perspectives on IPv4 Subnetting” for more details. To see that predictability consider some planning information written down by a network engineer as shown in Figure 16-8. The figure shows four different masks the engineer is considering using in an IPv4 network along with Class B network 172.16.0.0. The figure shows the third-octet values for the subnet IDs that would be created when using mask 255.255.128.0 255.255.192.0 255.255.224.0 and 255.255.240.0 from top to bottom in the figure. Subnets of 172.16.0.0: 172.16.___.0 2 Subnets 255.255.128.0 4 Subnets 255.255.192.0 240 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 0 64 128 192 0 128 0 32 64 96 128 160 192 224 8 Subnets 255.255.224.0 16 Subnets 255.255.240.0 Figure 16-8 Numeric Patterns in the Interesting Octet

slide 424:

ptg17246291 370 CCENT/CCNA ICND1 100-105 Official Cert Guide First to explain the figure further look at the top row of the figure. If the engineer uses 255.255.128.0 as the mask the mask creates two subnets with subnet IDs 172.16.0.0 and 172.16.128.0. If the engineer uses mask 255.255.192.0 the mask creates four subnets with subnet IDs 172.16.0.0 172.16.64.0 172.16.128.0 and 172.16.192.0. If you take the time to look at the figure the patterns become obvious. In this case: Mask: 255.255.128.0 Pattern: Multiples of 128 Mask: 255.255.192.0 Pattern: Multiples of 64 Mask: 255.255.224.0 Pattern: Multiples of 32 Mask: 255.255.240.0 Pattern: Multiples of 16 To find the subnet ID you just need a way to figure out what the pattern is. If you start with an IP address and mask just find the subnet ID closest to the IP address without going over as discussed in the next section. Finding the Subnet ID: Difficult Masks The following written process lists all the steps to find the subnet ID using only decimal math. This process adds to the earlier process used with easy masks. For each octet: Step 1. If the mask octet 255 copy the decimal IP address. Step 2. If the mask octet 0 write a decimal 0. Step 3. If the mask is neither refer to this octet as the interesting octet: A. Calculate the magic number as 256 – mask. B. Set the subnet ID’s value to the multiple of the magic number that is closest to the IP address without going over. The process uses two new terms created for this book: magic number and interesting octet. The term interesting octet refers to the octet identified at Step 3 in the process in other words it is the octet with the mask that is neither 255 nor 0. Step 3A then uses the term magic number which is derived from the DDN mask. Conceptually the magic number is the number you add to one subnet ID to get the next subnet ID in order as shown in Figure 16-8. Numerically it can be found by subtracting the DDN mask’s value in the interesting octet from 256 as mentioned in Step 3A. The best way to learn this process is to see it happen. In fact if you can stop reading now use the DVD accompanying this book and watch the videos about finding the subnet ID with a difficult mask. These videos demonstrate this process. Y ou can also use the examples on the next few pages that show the process being used on paper. Then follow the practice opportu- nit i e s o utlin e d in th e s e c t i o n “P ra c t i ce A naly z ing Ex ist ing S ub n e ts” lat e r in this chapt e r . Resident Subnet Example 1 For example consider the requirement to find the resident subnet for IP address 130.4.102.1 mask 255.255.240.0. The process does not require you to think about prefix bits versus host bits convert the mask think about the mask in binary or convert the IP address to and from binary. Instead for each of the four octets choose an action based on the value in the mask. Figure 16-9 shows the results the circled numbers in the figure refer to the step numbers in the written process to find the subnet ID as listed in the previous few pages.

slide 425:

ptg17246291 Chapter 16: Analyzing Existing Subnets 371 16 ID 0-255 96 .. . 40 130 1 2 3 1 102 41 130 .. . 240 255 256 –240 16 0 255 .. . Magic Copy Zero Copy Action IP 96 112 80 64 48 32 16 0 128 Multiples: Figure 16-9 Find the Subnet ID: 130.4.102.1 255.255.240.0 First examine the three uninteresting octets 1 2 and 4 in this example. The process keys on the mask and the first two octets have a mask value of 255 so simply copy the IP address to the place where you intend to write down the subnet ID. The fourth octet has a mask value of 0 so write down a 0 for the fourth octet of the subnet ID. The most challenging logic occurs in the interesting octet which is the third octet in this example because of the mask value 240 in that octet. For this octet Step 3A asks you to calculate the magic number as 256 – mask. That means you take the mask’s value in the interesting octet 240 in this case and subtract it from 256: 256 – 240 16. The subnet ID’s value in this octet must be a multiple of decimal 16 in this case. Step 3B then asks you to find the multiples of the magic number 16 in this case and choose the one closest to the IP address without going over. Specifically that means that you should mentally calculate the multiples of the magic number starting at 0. Do not forget to start at 0 Count starting at 0: 0 16 32 48 64 80 96 112 and so on. Then find the multiple closest to the IP address value in this octet 102 in this case without going over 102. So as shown in Figure 16-9 you make the third octet’s value 96 to complete the subnet ID of 130.4.96.0. Resident Subnet Example 2 Consider another example: 192.168.5.77 mask 255.255.255.224. Figure 16-10 shows the results. ID 0-255 5 .. . 168 64 192 1 3 1 1 5 168 77 192 .. . 255 255 256 –224 32 224 255 .. . Copy Copy Magic Copy Action IP 64 96 32 0 128 160 192 224 Multiples: Figure 16-10 Resident Subnet for 192.168.5.77 255.255.255.224

slide 426:

ptg17246291 372 CCENT/CCNA ICND1 100-105 Official Cert Guide The three uninteresting octets 1 2 and 3 in this case require only a little thought. For each octet each with a mask value of 255 just copy the IP address. For the interesting octet at Step 3A the magic number is 256 – 224 32. The multiples of the magic number are 0 32 64 96 and so on. Because the IP address value in the fourth octet is 77 in this case the multiple must be the number closest to 77 without going over therefore the subnet ID ends with 64 for a value of 192.168.5.64. Resident Subnet Practice Problems Before moving to the next section take some time to fill in the blanks in Table 16-10. Check your answers against Table 16-16 in the section “Answers to Earlier Practice Problems” later in this chapter. Complete the table by listing the subnet ID in each case. The text following Table 16-16 also lists explanations for each problem. Table 16-10 Practice Problems: Find Subnet ID Difficult Masks Problem IP Address Mask Subnet ID 1 10.77 .55.3 255.248.0.0 2 172.30.99.4 255.255.192.0 3 192.168.6.54 255.255.255.252 4 10.77 .3.14 255.255.128.0 5 172.22.55.77 255.255.254.0 6 1.99.53.76 255.255.255.248 Finding the Subnet Broadcast Address: Difficult Masks To find a subnet’s broadcast address a similar process can be used. For simplicity this pro- cess begins with the subnet ID rather than the IP address. If you happen to start with an IP address instead use the processes in this chapter to first find the subnet ID and then use the following process to find the subnet broadcast address for that same subnet. For each octet: Step 1. If the mask octet 255 copy the subnet ID. Step 2. If the mask octet 0 write 255. Step 3. If the mask is neither identify this octet as the interesting octet: A. Calculate the magic number as 256 – mask. B. Take the subnet ID’s value add the magic number and subtract 1 ID + magic – 1. As with the similar process used to find the subnet ID you have several options for how to best learn and internalize the process. If you can stop reading now use the DVD accom- panying this book and watch the videos about finding the subnet broadcast address with a difficult mask. Also look at the examples in this section which show the process being used on paper. Then follow the practice opportunities outlined in the section “Additional Practice for This Chapter’s Processes.” Subnet Broadcast Example 1 The first example continues the first example from the section “Finding the Subnet ID: Difficult Masks” earlier in this chapter as demonstrated in Figure 16-9. That example started

slide 427:

ptg17246291 Chapter 16: Analyzing Existing Subnets 373 16 with the IP address/mask of 130.4.102.1 255.255.240.0 and showed how to find subnet ID 130.4.96.0. Figure 16-11 now begins with that subnet ID and the same mask. 111 .. . 4 255 130 1 2 3 1 +Magic –1 Copy 255 Copy .. . 240 255 256 –240 16 0 255 .. . 96 40 130 ID 0-255 Action Figure 16-11 Find the Subnet Broadcast: 130.4.96.0 255.255.240.0 First examine the three uninteresting octets 1 2 and 4. The process keys on the mask and the first two octets have a mask value of 255 so simply copy the subnet ID to the place where you intend to write down the subnet broadcast address. The fourth octet has a mask value of 0 so write down a 255 for the fourth octet. The logic related to the interesting octet occurs in the third octet in this example because of the mask value 240. First Step 3A asks you to calculate the magic number as 256 – mask. If you had already calculated the subnet ID using the decimal process in this book you should already know the magic number. At Step 3B you take the subnet ID’s value 96 add the magic number 16 and subtract 1 for a total of 111. That makes the subnet broadcast address 130.4.111.255. Subnet Broadcast Example 2 Again this example continues an earlier example from the section “Resident Subnet Example 2” as demonstrated in Figure 16-10. That example started with the IP address/ mask of 192.168.5.77 mask 255.255.255.224 and showed how to find subnet ID 192.168.5.64. Figure 16-12 now begins with that subnet ID and the same mask. ID 0-255 5 .. . 168 95 192 1 3 1 1 Copy Copy +Magic –1 Copy .. . 255 255 256 –224 32 224 255 .. . 5 168 64 192 Action Figure 16-12 Find the Subnet Broadcast: 192.168.5.64 255.255.255.224 First examine the three uninteresting octets 1 2 and 3. The process keys on the mask and the first three octets have a mask value of 255 so simply copy the subnet ID to the place where you intend to write down the subnet broadcast address.

slide 428:

ptg17246291 374 CCENT/CCNA ICND1 100-105 Official Cert Guide The interesting logic occurs in the interesting octet the fourth octet in this example because of the mask value 224. First Step 3A asks you to calculate the magic number as 256 – mask. If you had already calculated the subnet ID it is the same magic num- ber because the same mask is used. At Step 3B you take the subnet ID’s value 64 add magic 32 and subtract 1 for a total of 95. That makes the subnet broadcast address 192.168.5.95. Subnet Broadcast Address Practice Problems Before moving to the next section take some time to do several practice problems on a scratch piece of paper. Go back to Table 16-10 which lists IP addresses and masks and practice by finding the subnet broadcast address for all the problems in that table. Then check your answers against Table 16-17 in the section “Answers to Earlier Practice Problems” later in this chapter. Practice Analyzing Existing Subnets As with the other subnetting math in this book using a two-phase approach may help. Take time now to practice until you feel like you understand the process. Then before the exam make sure you master the math. Table 16-11 summarizes the key concepts and suggestions for this two-phase approach. Table 16-11 Keep-Reading and T ake-Exam Goals for This Chapter’s T opics Time Frame Before Moving to the Next Chapter Before Taking the Exam Focus On... Learning how Being correct and fast Tools Allowed All Y our brain and a notepad Goal: Accuracy 90 correct 100 correct Goal: Speed Any speed 20–30 seconds A Choice: Memorize or Calculate As described in this chapter the decimal processes to find the subnet ID and subnet broad- cast address do require some calculation including the calculation of the magic number 256 – mask. The processes also use a DDN mask so if an exam question gives you a prefix-style mask you need to convert to DDN format before using the process in this book. Over the years some people have told me they prefer to memorize a table to find the magic number. These tables could list the magic number for different DDN masks and prefix masks so you avoid converting from the prefix mask to DDN. Table 16-12 shows an exam- ple of such a table. Feel free to ignore this table use it or make your own. Table 16-12 Reference T able: DDN Mask Values Binary Equivalent Magic Numbers and Prefixes Prefix interesting octet 2 /9 /10 /11 /12 /13 /14 /15 /16 Prefix interesting octet 3 /17 /18 /19 /20 /21 /22 /23 /24 Prefix interesting octet 4 /25 /26 /27 /28 /29 /30 Magic number 128 64 32 16 8 4 2 1 DDN mask in the interesting octet 128 192 224 240 248 252 254 255

slide 429:

ptg17246291 Chapter 16: Analyzing Existing Subnets 375 16 Chapter Review One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book DVD or interactive tools for the same material found on the book’s companion website. Refer to the “Your Study Plan” ele- ment for more details. Table 16-13 outlines the key review elements and where you can find them. To better track your study progress record when you completed these activities in the second column. Table 16-13 Chapter Review Tracking Review Element Review Dates Resource Used Review key topics Book DVD/website Review key terms Book DVD/website Answer DIKTA questions Book PCPT Review memory tables Book DVD/website Practice mask analysis DVD Appendix F DVD/website Practice analyzing existing subnets DVD Appendix F DVD/website Review All the Key Topics Table 16-14 Key T opics for Chapter 16 Key Topic Element Description Page Number List Definition of a subnet’s key numbers 358 Table 16-2 Key facts about the subnet ID 361 Table 16-3 Key facts about the subnet broadcast address 361 List Steps to use binary math to find the subnet ID 364 List General steps to use binary and decimal math to find the subnet ID 366 List Steps to use decimal and binary math to find the subnet broadcast address 367 List Steps to use only decimal math to find the subnet ID 370 List Steps to use only decimal math to find the subnet broadcast address 372 Key Terms You Should Know resident subnet subnet ID subnet number subnet address subnet broadcast address Additional Practice for This Chapter’s Processes For additional practice with analyzing subnets you may do the same set of practice prob- lems using your choice of tools: Application: Use the Analyzing Existing Subnets application on the DVD or companion website. PDF: Alternatively practice the same problems found in these apps using DVD Appendix F “Practice for Chapter 16: Analyzing Existing Subnets.”

slide 430:

ptg17246291 376 CCENT/CCNA ICND1 100-105 Official Cert Guide Answers to Earlier Practice Problems This chapter includes practice problems spread around different locations in the chapter. The answers are located in Tables 16-15 16-16 and 16-17. Table 16-15 Answers to Problems in T able 16-9 IP Address Mask Subnet ID Broadcast Address 1 10.77 .55.3 255.255.255.0 10.77 .55.0 10.77 .55.255 2 172.30.99.4 255.255.255.0 172.30.99.0 172.30.99.255 3 192.168.6.54 255.255.255.0 192.168.6.0 192.168.6.255 4 10.77 .3.14 255.255.0.0 10.77 .0.0 10.77 .255.255 5 172.22.55.77 255.255.0.0 172.22.0.0 172.22.255.255 6 1.99.53.76 255.0.0.0 1.0.0.0 1.255.255.255 Table 16-16 Answers to Problems in T able 16- 10 IP Address Mask Subnet ID 1 10.77 .55.3 255.248.0.0 10.72.0.0 2 172.30.99.4 255.255.192.0 172.30.64.0 3 192.168.6.54 255.255.255.252 192.168.6.52 4 10.77 .3.14 255.255.128.0 10.77 .0.0 5 172.22.55.77 255.255.254.0 172.22.54.0 6 1.99.53.76 255.255.255.248 1.99.53.72 The following list explains the answers for Table 16-16: 1. The second octet is the interesting octet with magic number 256 – 248 8. The mul- tiples of 8 include 0 8 16 24 ... 64 72 and 80. 72 is closest to the IP address value in that same octet 77 without going over making the subnet ID 10.72.0.0. 2. The third octet is the interesting octet with magic number 256 – 192 64. The mul- tiples of 64 include 0 64 128 and 192. 64 is closest to the IP address value in that same octet 99 without going over making the subnet ID 172.30.64.0. 3. The fourth octet is the interesting octet with magic number 256 – 252 4. The mul- tiples of 4 include 0 4 8 12 16 … 48 52 and 56. 52 is the closest to the IP address value in that same octet 54 without going over making the subnet ID 192.168.6.52. 4. The third octet is the interesting octet with magic number 256 – 128 128. Only two multiples exist that matter: 0 and 128. 0 is the closest to the IP address value in that same octet 3 without going over making the subnet ID 10.77.0.0. 5. The third octet is the interesting octet with magic number 256 – 254 2. The mul- tiples of 2 include 0 2 4 6 8 and so on—essentially all even numbers. 54 is closest to the IP address value in that same octet 55 without going over making the subnet ID 172.22.54.0.

slide 431:

ptg17246291 Chapter 16: Analyzing Existing Subnets 377 16 6. The fourth octet is the interesting octet with magic number 256 – 248 8. The mul- tiples of 8 include 0 8 16 24 … 64 72 and 80. 72 is closest to the IP address value in that same octet 76 without going over making the subnet ID 1.99.53.72. Table 16-17 Answers to Problems in the Section “Subnet Broadcast Address Practice Problems” Subnet ID Mask Broadcast Address 1 10.72.0.0 255.248.0.0 10.79.255.255 2 172.30.64.0 255.255.192.0 172.30.127 .255 3 192.168.6.52 255.255.255.252 192.168.6.55 4 10.77 .0.0 255.255.128.0 10.77 .127 .255 5 172.22.54.0 255.255.254.0 172.22.55.255 6 1.99.53.72 255.255.255.248 1.99.53.79 The following list explains the answers for Table 16-17: 1. The second octet is the interesting octet. Completing the three easy octets means that the broadcast address in the interesting octet will be 10.___.255.255. With magic number 256 – 248 8 the second octet will be 72 from the subnet ID plus 8 minus 1 or 79. 2. The third octet is the interesting octet. Completing the three easy octets means that the broadcast address in the interesting octet will be 172.30.___.255. With magic number 256 – 192 64 the interesting octet will be 64 from the subnet ID plus 64 the magic number minus 1 for 127. 3. The fourth octet is the interesting octet. Completing the three easy octets means that the broadcast address in the interesting octet will be 192.168.6.___. With magic num- ber 256 – 252 4 the interesting octet will be 52 the subnet ID value plus 4 the magic number minus 1 or 55. 4. The third octet is the interesting octet. Completing the three easy octets means that the broadcast address will be 10.77.___.255. With magic number 256 – 128 128 the interesting octet will be 0 the subnet ID value plus 128 the magic number minus 1 or 127. 5. The third octet is the interesting octet. Completing the three easy octets means that the broadcast address will be 172.22.___.255. With magic number 256 – 254 2 the broadcast address in the interesting octet will be 54 the subnet ID value plus 2 the magic number minus 1 or 55. 6. The fourth octet is the interesting octet. Completing the three easy octets means that the broadcast address will be 1.99.53.___. With magic number 256 – 248 8 the broadcast address in the interesting octet will be 72 the subnet ID value plus 8 the magic number minus 1 or 79.

slide 432:

ptg17246291 Keep track of your part review progress with the checklist in Table P4-1. Details on each task follow the table. Table P4-1 Part IV Part Review Checklist Activity 1st Date Completed 2nd Date Completed Repeat All DIKTA Questions Answer Part Review Questions Review Key Topics Create Subnet Terms Mind Map Subnetting Exercises Repeat All DIKTA Questions For this task use the PCPT software to answer the “Do I Know This Already” questions again for the chapters in this part of the book. Answer Part Review Questions For this task use PCPT to answer the Part Review questions for this part of the book. Part IV Review

slide 433:

ptg17246291 Review Key Topics Review all key topics in all chapters in this part either by browsing the chapters or by using the Key Topics application on the DVD or companion website. Create Terminology Mind Map The topic of IPv4 addressing and subnetting happens to have many terms that are literal syn- onyms many terms with similar meanings along with terms that describe something about another term. So create a mind map call it map A to organize all IP addressing and subnet- ting terms you remember. Use four main topic areas: IP addressing IP networks IP subnets and masks. Inside these subdivide terms as to whether they are either a synonym a similar term or a description. Figure P4-1 shows the beginnings of one branch of the mind map to give you the general idea. For this branch you would just remember any terms related to “IP address” and place them into one of these three categories. Y our map can of course look different. As usual first do this exercise without the book or your notes. Later when you do look at the book again make sure that you have at least included all the key terms from the ends of the chapters. Figure P4-1 Sample Beginning Point for Part IV Mind Map A NOTE For more information on mind mapping refer to the Introduction in the section “About Mind Maps.” If you do choose to use mind map software record where you stored the file here in Table P4-2. Appendix L “Mind Map Solutions” lists sample mind map answers but as usual your mind maps can and will look different. Table P4-2 Configuration Mind Maps for Part IV Review Map Description Where You Saved It 1 Mind Map: Subnetting Terms Subnetting Exercises Chapter 14 “Analyzing Classful IPv4 Networks” Chapter 15 “Analyzing Subnet Masks” and Chapter 16 “Analyzing Existing Subnets” list some subnetting exercises along with time and accuracy goals. Now is a good time to work on those goals. Some options include the following: Practice from this book’s DVD appendixes or DVD/web applications: The Chapter Review section of Chapters 14 15 and 16 mention addressing and subnetting exercises

slide 434:

ptg17246291 380 CCENT/CCNA ICND1 100-105 Official Cert Guide included with this book. Find all the related applications in the Part IV Review section of the DVD or companion website or open DVD Appendix D “Practice for Chapter 14: Analyzing Classful IPv4 Networks” Appendix E “Practice for Chapter 15: Analyzing Subnet Masks” and Appendix F “Practice for Chapter 16: Analyzing Existing Subnets” for a simple PDF with the problems. Those exercises include activities such as analyzing classful networks analyzing subnet masks converting subnet masks and analyzing exist- ing subnets. Pearson Network Simulator: The full Pearson ICND1 or CCNA simulator has subnet- ting math exercises that you can do by using CLI commands. Look for the labs with names “IP Address Rejection” and “Subnet ID Calculation” in their names. Author’s CCENT blog: I’ve written a few dozen subnetting exercises on the blog over the years—just look at the Questions category at the top of the page and you will see a vari- ety of IPv4 addressing and subnetting question types. Start at blog.certskills.com/ccent.

slide 435:

ptg17246291 This page intentionally left blank

slide 436:

ptg17246291 Part V of this book presents the foundations of what a Cisco router does and how to con- figure Cisco routers to implement those features. Much like Part II of this book introduced switch features switch CLI and all the common features most sites would use in Cisco switches Part V walks through the most common features for Cisco routers. Chapter 17 focuses on the basics of installing and operating a Cisco router. However rout- ers need some configuration before they can correctly route packets. So Chapters 18 and 19 then show how routers learn the required IP addresses and subnets so that routers can do their jobs of routing IPv4 packets to all destinations. Chapter 18 first looks at configuring IP addresses as well as static IP routes. Chapter 19 then shows how routers can dynamically learn about remote subnets using a routing protocol in this case the Routing Information Protocol RIP Version 2. Chapter 20 closes Part V with more of a host focus on the IPv4 network. This section walks through what happens when a host first connects to the network first discovering its own IPv4 address with Dynamic Host Configuration Protocol DHCP resolving hostnames with Domain Name System DNS and then learning IP-MAC mapping information with Address Resolution Protocol ARP.

slide 437:

ptg17246291 Part V Implementing IPv4 Chapter 17: Operating Cisco Routers Chapter 18: Configuring IPv4 Addresses and Static Routes Chapter 19: Learning IPv4 Routes with RIPv2 Chapter 20: DHCP and IP Networking on Hosts Part V Review

slide 438:

ptg17246291 CHAPTER 17 Operating Cisco Routers This chapter covers the following exam topics: 1.0 Network Fundamentals 1.6 Select the appropriate cabling type based on implementation requirements 1.8 Configure verify and troubleshoot IPv4 addressing and subnetting 5.0 Infrastructure Management 5.3 Configure and verify initial device configuration Getting an IPv4 network up and working requires some basic steps: installing routers con- figuring their IPv4 addresses optionally configuring some static IPv4 routes and then con- figuring a routing protocol to dynamically learn routes. This chapter focuses on Step 1: how to install an enterprise-class Cisco router with just enough configuration to get the router working ready for those next steps. This chapter breaks the topics into two major headings. The first discusses the physical instal- lation of an enterprise-class Cisco router. The second section looks at the command-line inter- face CLI on a Cisco router which has the same look and feel as the Cisco switch CLI. This section first lists the similarities between a switch and router CLI and then introduces the configuration required to make the router start forwarding IP packets on its interfaces. “Do I Know This Already” Quiz Take the quiz either here or use the PCPT software if you want to use the score to help you decide how much time to spend on this chapter. The answers are at the bottom of the page following the quiz and the explanations are in DVD Appendix C and in the PCPT software. Table 17-1 “Do I Know This Already” Foundation T opics Section-to-Question Mapping Foundation Topics Section Questions Installing Cisco Routers 1 Enabling IPv4 Support on Cisco Routers 2–6 1. Which of the following installation steps are more likely required on a Cisco router but not typically required on a Cisco switch Choose two answers. a. Connect Ethernet cables b. Connect serial cables c. Connect to the console port d. Connect the power cable e. Turn the on/off switch to “on”

slide 439:

ptg17246291 2. Which of the following commands might you see associated with the router CLI but not with the switch CLI a. The clock rate command b. The ip address address mask command c. The ip address dhcp command d. The interface vlan 1 command 3. You just bought two Cisco routers for use in a lab connecting each router to a differ- ent LAN switch with their Fa0/0 interfaces. You also connected the two routers’ serial interfaces using a back-to-back cable. Which of the following steps are not required to be able to forward IPv4 packets on both routers’ interfaces Choose two answers. a. Configuring an IP address on each router’s Fast Ethernet and serial interfaces b. Configuring the bandwidth command on one router’s serial interface c. Configuring the clock rate command on one router’s serial interface d. Setting the interface description on both the Fast Ethernet and serial interface of each router 4. The output of the show ip interface brief command on R1 lists interface status codes of “down” and “down” for interface Serial 0/0. Which of the following could be true a. The shutdown command is currently configured for that interface. b. R1’s serial interface has been configured to use Frame Relay but the router on the other end of the serial link has been configured to use PPP. c. R1’s serial interface does not have a serial cable installed. d. Both routers have been cabled to a working serial link CSU/DSUs included but only one router has been configured with an IP address. 5. Which of the following commands do not list the IP address and mask of at least one interface Choose two answers. a. show running-config b. show protocols type number c. show ip interface brief d. show interfaces e. show version 6. Which of the following is different on the Cisco switch CLI for a Layer 2 switch as compared with the Cisco router CLI a. The commands used to configure simple password checking for the console b. The number of IP addresses configured c. The configuration of the device’s hostname d. The configuration of an interface description

slide 440:

ptg17246291 386 CCENT/CCNA ICND1 100-105 Official Cert Guide Foundation Topics Installing Cisco Routers Routers collectively provide the main feature of the network layer—the capability to for- ward packets end to end through a network. As introduced in Chapter 4 “Fundamentals of IPv4 Addressing and Routing” routers forward packets by connecting to various physical network links like Ethernet serial links and Frame Relay and then using Layer 3 routing logic to choose where to forward each packet. As a reminder Chapter 2 “Fundamentals of Ethernet LANs” covered the details of making those physical connections to Ethernet networks while Chapter 3 “Fundamentals of WANs” covered the basics of cabling with WAN links. This section examines some of the details of router installation and cabling first from the enterprise perspective and then from the perspective of connecting a typical small office/ home office SOHO to an ISP using high-speed Internet. Installing Enterprise Routers A typical enterprise network has a few centralized sites as well as lots of smaller remote sites. To support devices at each site the computers IP phones printers and other devices the network includes at least one LAN switch at each site. In addition each site has a router which connects to the LAN switch and to some WAN link. The WAN link provides connec- tivity from each remote site back to the central site and to other sites through the connec- tion to the central site. Figures 17-1 and 17-2 show contrasting ways to draw parts of an enterprise network. Both show a typical branch office on the left with a router and some end-user PCs. The central site on the right has basically the same components plus some servers. The sites connect using a point-to-point serial link connecting the two routers. The first figure omits many of the cabling details making the figure more useful when you want to discuss general Layer 3 concepts the second figure shows the cabling details. Branch Office Central Site Servers End Users 4 5 6 1 2 3 R1 R2 S1 S2 Figure 17-1 Generic Enterprise Network Diagram Answers to the “Do I Know This Already” quiz: 1 B E 2 A 3 B D 4 C 5 C E 6 B

slide 441:

ptg17246291 Chapter 17: Operating Cisco Routers 387 17 4 5 6 S1 S2 Central Site Leased Line Servers Internal CSU/DSU Serial Cable CSU/ DSU R2 UTP Cables 3 Branch Office UTP Cables R1 IP 2 1 Figure 17-2 More Detailed Cabling Diagram for the Same Enterprise Network The Ethernet cables in Figure 17-2 should be familiar. In particular routers use the same Ethernet cabling pinouts as PCs so each router uses a UTP cable with a straight-through pinout. Next consider the hardware on the ends of the serial link in particular where the channel service unit/data service unit CSU/DSU hardware resides on each end of the serial link. It sits either outside the router as a separate device as shown on the left or integrated into the router’s serial interface hardware as shown on the right. Most new installations today include the CSU/DSU in the router’s serial interface. Finally the serial link requires some cabling inside the same wiring closet or other space between where the telco serial line terminates and where the router sits on a shelf or in a rack. The WAN cable installed by the telco typically has an RJ-48 connector which is the same size and shape as an RJ-45 connector. The telco cable with the RJ-48 connector inserts into the CSU/DSU. In the example of Figure 17-2 at the central site the telco cable con- nects directly into the router’s serial interface. At the branch office router the cable con- nects to the external CSU/DSU which then connects to the router serial interface using some other serial cable. As a reminder Chapter 3’s section “Leased-Line Cabling” intro- duced the basics of this cabling. Cisco Integrated Services Routers Product vendors including Cisco typically provide several different types of router hard- ware. Today routers often do much more work than simply routing packets—in fact they serve as a device or platform from which to provide many network services. Cisco even brands their enterprise routers not just as routers but as “integrated services routers” emphasizing the multi-purpose nature of the products. As an example consider the networking functions needed at a typical branch office. A typi- cal enterprise branch office needs a router for WAN/LAN connectivity and a LAN switch to provide a high-performance local network and connectivity into the router and WAN. Many branches also need Voice over IP VoIP services to support IP phones and several security services as well. Plus it is hard to imagine a site with users that does not have Wi-Fi access today. So rather than