Mega Guide CCNA 640-802
Mega Guide CCNA 640-802
Mega Guide CCNA 640-802
n
www.preplogic.com n
1-800-418-6789
All rights reserved. No part of this document shall be stored in a retrieval system or transmitted by any
means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from
the publisher. No patent liability is assumed with respect to the use of the information contained herein.
1-800-418-6789
solutions@preplogic.com
Abstract. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Your Product. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
About the Author. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Domain 1 – The Benefits of Cisco Certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Domain 2 – Network Foundations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
The Purpose and Pieces of Networking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Interpreting a Network Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Types of Network Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Using the OSI Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Comparing the OSI Model and TCP/IP Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Understanding TCP/IP Foundations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Understanding IP Addressing Foundations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Reserved IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Private IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Common IP Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Common Client Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Communication Using TCP and UDP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Ethernet Foundations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Ethernet: The Physical Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Ethernet: The Data Link Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Ethernet Communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Ethernet Network Equipment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Understanding Collision Domains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Hubs and Switches, Exposed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Switch MAC Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Domain 3 – IOS Foundations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
IOS Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Connecting to the Cisco Switch or Router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Understanding the Cisco IOS Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Cisco IOS Help and Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Cisco IOS Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Abstract
The Cisco Certified Network Associate is the most well-recognized and respected Networking certification
in the world. By attaining it, students and candidates signify themselves as extremely accomplished and
capable Network Administrators. The exam, created by Cisco Systems, is extremely difficult and not to be
taken lightly. It covers a myriad of topics, from the basics of the OSI model, all the way to the most detailed
analysis of routing packets across multiple subnetted networks. It is multiple choice, simulative, and incor-
porates test strategies such as “drag and drop” and “hot area” questions to verify a candidate’s knowledge.
Before taking this exam, you should be very familiar with both Cisco technology and networking. Most can-
didates for this exam have already passed other certifications, such as the CompTIA A+ or Network+ exams.
If it is your first certification, we recommend you study for the exam very thoroughly. It will not be easy.
Your Product
This CCNA MegaGuide has been designed from the ground up with you, the student, in mind. It is lean,
strong, and specifically targeted toward the candidate. Unlike many other CCNA products, the PrepLogic
CCNA MegaGuide does not waste time with excessive explanations. Instead, it is packed full of valuable
techniques, priceless information, and brief, but precisely worded, explanations. While we do not recom-
mend using only this product to pass the exam, but rather a combination of PrepLogic Audio Training,
Practice Exams, and Video Training, we have designed the product so that it and it alone can be used to
pass the exam.
1. Credibility – Cisco certifications are considered by many to be some of the most real-world ap-
plicable certification paths in the industry. Obtaining Cisco certification is no easy feat, so when
you do become certified, the certification acronyms you place after your name (such as CCENT,
CCNA or CCNP) actually means something to other IT professionals!
2. Marketability – Organizations are looking for Cisco-certified individuals! Cisco has structured
their partner program in such a way that it requires organizations to hire certified individuals to
move to higher levels in their partner relationship with Cisco. The higher the partner relation-
ship, the bigger discount on Cisco equipment (along with many other benefits). So, an organiza-
tion can actually save money by hiring you. Nice!
3. Sense of Accomplishment – When you take a Cisco certification exam, regardless of the pass
or fail mark, you will know that the exam is fair. Cisco does not attempt to mislead you in their
exam questions or ask questions that are looking for the “Cisco answer” rather than “how it really
works.” There’s nothing like passing the exam and then thinking to yourself, “Wow. There’s no way
I could have passed that test without really knowing what I was doing.”
With that in mind, let’s move into the material that will help you get there.
n Personal Computers (PCs) and Servers – these devices serve as the endpoints in the network
and are responsible for sending and receiving data to and from the network.
n Network Connections – you must have a way to attach a device to the network; this building
block includes the network interface card (NIC), cabling and connectors.
n Hubs and Switches – these devices provide points on which all the end systems of a network
can attach.
n Routers – routers connect multiple networks together and find the best way to reach each network.
These components can build a network within a local area (LAN) or across a wide area (WAN). In recent
years, the lines between a LAN and WAN have begun to blur, since Wireless and Fiber Optic technology
can extend the reach of a LAN much further than older technology ever could. Regardless, the following
definitions still stand strong:
n Local Area Network (LAN) – a computer network covering a small geographic area such as a
home, office or group of buildings.
n Wide Area Network (WAN) – a computer network covering a large geographic area such as a
city, state, nation or globe.
WAN
Internet
Router
Switch
LAN
Switch Switch
LAN
WAN
Server PC
Application
Presentation
Session
Transport
Network
Data Link
Physical
Your first job will be to memorize the layers and their order. There are two handy memorization tips you
can use to remember the layers: All People Seem To Need Data Processing, where each word contains
the first letter of the layers from the top-down, or you can use Please Do Not Throw Sausage Pizza Away,
where each word contains the first letter of the layers from the bottom-up. I personally love sausage pizza,
so I prefer the latter.
Once you’ve got the layers down, you now need to know what each of them accomplishes. I’ll present this
to you in two ways. First, we’ll look at the cold, hard facts about each layer, and then we’ll look at a practical
example of how the OSI Model is used in real-world network communication. So, here are the facts:
n Application Layer: This layer interfaces directly with the network-aware application, giving it
access to network resources. Without this layer, no user application would be able to get access
to the network.
n Presentation Layer: Encodes the data being sent or received into a generic format that will be
understood by both devices. For example, a web browser might receive data in HTML format or a
picture in JPG format, which are generic and well understood standards.
n Session Layer: Begins, ends, and manages the sessions between devices.
n Transport Layer: Handles the reliability of the connection and logical separation of applica-
tions. For example, if a computer is surfing the Internet with a web browser and at the same time
listening to Internet-radio, this layer ensures the correct data arrives to the correct application.
In addition, this layer handles flow-control (ensuring one side does not send information faster
than the other can receive) and data integrity (ensuring the data is not corrupt). The most com-
mon Transport Layer protocol is TCP.
n Network Layer: Provides logical addressing services allowing a device to dictate the source and
destination address used for end-to-end communication. This layer is also responsible for rout-
ing the packet from its source to its destination. The most common Network layer protocol is IP.
n Data Link Layer: Provides physical addressing services allowing a device to dictate the source and
destination address used for local network communication. This layer permits communication
between devices connected to the same network. This layer is also responsible for error detection.
n Physical Layer: Defines the physical standards used for network communication.
Now that we’ve seen the facts, let’s put them together into a practical example of network communica-
tion. On the next page is a network diagram representing a task many people do frequently: using online
banking to manage finances. In this case, UserA (shown to the left) has used a web browser to issue a
request to transfer $100.00 from his checking account to his savings account. Let’s follow this network
request step-by-step as it passes through the layers of the OSI Model.
Application Application
Transport Transport
Network Network
Physical Physical
After seeing how reliable communication works, you might wonder why any application would choose
to communicate unreliably. Unreliable communication is very useful for any “real-time” application that is
sending or receiving data as it actually happens. For example, it would not benefit the communication at
all to use a reliable connection for Voice over IP (VoIP) since packets are being sent as a person is speaking.
If one or more of the packets are dropped along the path, it would not make sense to send that packet at
a later time. The communication has already passed that point. Common applications that use unreliable
communication are VoIP, video over IP and online games.
The second job of the Transport Layer is to logically separate applications. In the TCP/IP protocol suite (which
will be fully discussed layer), this is done using port numbers. When the user’s IE application sends the
$100.00 transfer request to the web server, it needs to ensure the web server application receives it and not
some other application service. For example, the online banking web server might also be an email server
and a database server. In order to ensure the web server application gets the request instead of the email
server application, the user’s IE will send the request to the web server’s well known port number. If we are
using HTTP to complete the transfer request, the well known port number will be 80. If we are using HTTPS,
the well known port number will be 443. This is considered the destination port number used for communica-
tion. This destination port number directs the network request to the correct server application.
While it is necessary to distinguish the correct server application the user is requesting, the user’s IE applica-
tion must also separate itself from the other network applications that are running on the PC. For example,
our user transferring $100.00 might also be listening to online Internet radio, watching stock prices and
playing an online game of chess with a person in Russia, all while performing this transfer. The IE application
needs a way to ensure that communications coming from the web server end up back in the IE application
window rather than being received by the online chess game. This is the job of the source port number. When
IE attempts to communicate across the network, Microsoft Windows will generate a unique source port num-
ber for the application. This source port number is communicated to the web server along with the $100.00
request. When the web server responds to the $100.00 transfer, it will direct the response to the user’s source
port number, allowing Microsoft Windows to return the data to the requesting IE application window.
User
IP:172.30.2.50 Web Server
IP:151.151.13.144
We’ll talk plenty more about port numbers later on in this guide; however, a very handy way to see the
port numbers that are coming to and from your PC is by using the netstat command line utility. Let me
show you one more example of these port numbers in action. I am going to open three command-line
windows in Microsoft Windows (you can do this by clicking Start > Run > cmd). In two of them, I am go-
ing to open a File Transfer Protocol (FTP) session to ftp.cisco.com (a public Cisco FTP site). In the third, I
will enter the netstat command.
My PC has many connections coming to it from other applications, but I’ve drawn a box around the two that
we need to see. The request is going to the Foreign Address of 198.133.219.27:21, which represents the IP
address of ftp.cisco.com and the destination port number 21. The request is coming from the IP address of
172.30.2.50 (which is my PC) with a source port number of 49621 and 49622. These port numbers repre-
sent the two command prompt windows with an FTP session open (shown behind the active window).
R1 R2 R3
Once the router has received the packet, it will look at the destination IP address and compare it to its rout-
ing table, which tells the router where to send the data next. The router sees that it needs to send the packet
to the next router in the chain (R2) to reach the web server’s network. In order to accomplish this, it removes
the original source and destination MAC address that was used previously and replaces it with the source
MAC address (0099:bbc9:392a) and destination MAC address (0057:bb89:21cc) that allows it to reach
the next router. When R2 receives the packet, it sees (based on its routing table) that it needs to send the
packet to R3 to reach the web server. To accomplish this, it removes the last source and destination MAC ad-
dress and replaces it with the source MAC address (0073:3828:192d) and destination MAC address (0038:
bbc4:9ffc) that allows it to reach R3. This process continues until the web server finally receives the data.
Application
Presentation Application
Session
Transport Transport
Network Internetwork
Data Link
Network Interface
Physical
Notice that the TCP/IP model groups the top three layers into a single “Application” layer. This is because
these functions typically occur before the data leaves the application itself. Also, because the Data Link
and Physical layers of the OSI model are so closely related together, the TCP/IP model groups them into a
single “Network Interface” layer.
Just like Microsoft Office is not just one application but, rather, a suite of applications, TCP/IP is not just one
protocol but a suite of protocols. Only by combining the function of a variety of protocols in the package
are we able to have successful network communication. The figure on the next page shows the most com-
mon TCP/IP protocols used today along with the functioning OSI and TCP/IP model layer.
Application
Telnet, SMTP, POP3,
FTP, NNTP, HTTP,
Presentation Application
SNMP, DNS, SSH, ...
Session
Data Link
Network Interface Ethernet, PPP, ADSL
Physical
The protocol we will tackle first is IP. Earlier in the document, I mentioned that IP (and the Network layer
of the OSI Model) is responsible for addressing in the network. Just by looking at an IP address, you will
see four octets divided by periods with some number between 0 and 255 in each one. In addition, you will
rarely see an IP address without an accompanying subnet mask:
IP Address: 172.16.172.38
Subnet Mask: 255.255.0.0
The IP address and subnet mask give you enough information to understand a network design. The sub-
net mask divides the IP address into two pieces: the network and the host.
Network Host
172.16. 172.38
255.255. 0.0
In the example shown above, the network is defined as “172.16” and the host is defined as “172.38”. All of
the devices that are plugged into the same network (not passing through a router) must begin with the
same network ID, as shown in the figure below:
Notice that all the PCs to the left of the router begin with 172.16 (defining Network 1), and all the PCs
to the right of the router begin with 172.17 (defining Network 2). This helps to demonstrate a couple
key points. First, every interface of a router must be attached to a unique network. Second, a router both
separates and provides communication between different networks. We’ll get into the specific functions
of routers in just a moment. Let’s get back to the foundations of IP addressing.
You should be able to look at an IP address and determine what class of address it belongs to:
Whenever you use the default subnet mask with an IP address, you are using classful addressing. While
using classful addressing is popular with Class C addresses (because the network size is fairly manage-
able), Class A and B addresses will usually use classless addressing. This means that you are using a
subnet mask other than the default with these larger classes of addresses. For example, I could put a Class
C subnet mask on a Class A address such as 10.25.96.22, 255.255.255.0. At this point, 10.25.96 would rep-
resent the network and 22 would represent the host. This is a simple form of a skill known as subnetting,
which we will discuss much later in this guide.
Class A and B networks are commonly subnetted because of the large number of hosts they have on
each network. Cisco’s recommendation for the maximum amount of hosts per network is currently at
500. Despite this recommendation, most administrators do not like allowing networks to grow much
beyond 200 hosts per network. As you can see, Class A and B networks slightly exceed this maximum with
16,777,214 and 65,534 hosts per network, respectively. The more hosts you have on a network, the more
broadcast traffic you must deal with. Broadcast traffic is part of the day-to-day life of a network. It is neces-
sary to ensure proper operation of a network but can become excessive in larger networks and weigh the
network down. Too many broadcasts affect both the performance of the network and the performance of
the devices attached to the network. This is why the number one purpose of a router is to stop broadcasts.
Routers stop broadcast packets from traveling from one network to another.
Reserved IP Addresses
While most IP addresses shown in the Class A, B and C network ranges can be assigned to hosts, there are
a few reserved addresses that have specific meaning:
n Addresses Starting with 127: Any address that starts with 127 is considered a loopback address
and is used for internal testing. For example, you can ping the address 127.0.0.1 to test the PC
you are working with. You cannot assign addresses beginning with 127 to a device.
n Addresses Starting with 169.254: Any address that starts with 169.254 is considered an auto-
configuration address. These typically occur when a DHCP client is unable to obtain an IP address
from a DHCP server. While you can assign addresses in this range to clients, it is not recommended.
n The First IP address from Each Network Range: The first IP address from each network is
reserved as the Network Identifier (Network ID), which is used in routing processes. For example,
172.16.0.0 is the Network ID for the 172.16.0.0 255.255.0.0 network. You cannot assign this ad-
dress to any network device.
n The Last IP address from Each Network Range: The last IP address from each network is
reserved as the Broadcast ID, which is used to send a broadcast packet to all devices in the net-
work. For example, 172.16.255.255 is the Broadcast ID for the 172.16.0.0 255.255.0.0 network. You
cannot assign this address to any network device.
Private IP Addresses
Private IP addresses were originally developed to allow an organization to configure a network that used
TCP/IP but did not connect to the Internet. Private addresses are functionally the same as public IP ad-
dresses (addresses that operate on the Internet); however, every Internet Service Provider (ISP) that allows
you to connect to the Internet blocks private addresses from reaching the Internet. This allows an orga-
nization to have a full network infrastructure between all of their offices without any fear of users in their
organization reaching the Internet or anyone on the Internet reaching users in the organization.
Branch Office
172.16.0.0 (Private)
Internet
(Public)
Home Office
192.168.1.0 (Private)
There is one private address range for the Class A, B and C address ranges. They are as follows:
These addresses will function on internal networks, but will not function on the Internet. As a “sneak peek”
of technology to come later in this guide, most organizations will use Network Address Translation (NAT)
to allow their users to access the Internet despite the use of private addresses on the internal network.
Common IP Services
When building a network infrastructure, you will need to assign the devices on the network IP addresses
from the appropriate network ranges. This can be done either statically or dynamically. In Microsoft Windows
XP, you can statically assign an address by opening the Control Panel, double-clicking Network Connections,
right-clicking the network adapter you would like to configure and selecting Properties. Once the network
properties window appears, you can double click the TCP/IP protocol and enter the appropriate IP address
information. In Microsoft Vista, you can statically assign an address by opening the Control Panel, double-
clicking Network and Sharing Center, clicking on Network Connections on the left, right-clicking on the
network adapter you would like to configure and selecting Properties. Once the network properties window
appears, you can double click the TCP/IP protocol and enter the appropriate IP address information.
While statically assigning addresses is absolutely necessary for key network devices such as servers, printers
and routers, it can become quite tedious and unmanageable for hundreds, if not thousands, of individual
PCs. Because of this, some ingenious person created the Dynamic Host Configuration Protocol (DHCP). DHCP
allows a network administrator to set up a pool of IP addresses to be handed out by a DHCP Server to the cli-
ents. Once that is created, the administrator no longer needs to statically assign IP addresses to each network
client. The process of DHCP can be depicted as follows on the page below:
In addition to sending out IP address information, the DHCP server can assign items such as the subnet
mask, default gateway and DNS server information.
Speaking of DNS server information, that topic is the next big IP service that I’d like to cover. The Domain
Name Service (DNS) is a system that was created which allows users to remember simple names rather than
IP address information. For example, it is much easier to remember www.google.com than 74.125.19.103. In
order for a PC to gain DNS name lookup capabilities, it must be configured with the IP address of a DNS server.
You can make this assignment either statically (using the same TCP/IP properties window shown previously)
or through the DHCP server. Once the client has a DNS server configured, the process is simply as follows:
DNS Server
Client
These DNS server lookups occur anytime a client is attempting to access anything using a common name
rather than an IP address.
1. ipconfig
The ipconfig command line utility allows you to verify a client’s MAC address, IP address, subnet mask,
default gateway and DNS server information. To run this utility, simply open a command line and type ip-
config. By typing this simple command (shown on the next page), you will be given the IP address, subnet
mask and default gateway assigned to the PC.
n ipconfig /all – using this argument, you will be able to see additional information (such as MAC
address and DNS Servers) about the device’s TCP/IP configuration.
n ipconfig /release – this argument allows you to release an IP address the PC has obtained via DHCP.
n ipconfig /renew – this argument allows you to request a new IP address from a DHCP server.
n ipconfig /flushdns – this argument allows you to erase any cached DNS entries on the client. For
example, after a client resolves www.google.com to 74.125.19.103, it will cache (remember) that
mapping for 24 hours. If the IP address of Google changes during that time, it may be necessary
to manually flush the cached DNS entries on a client.
2. ping
If there were a flathead screwdriver in the network world, the ping command would be it. The ping com-
mand tests network connectivity to a remote device. Technically, it puts the entire alphabet (a through z) in
a packet and sends that packet to whatever device you specify. When the device receives it, it sends it right
back. You can then measure the time it took to reach the remote device. To execute the ping command, sim-
ply type ping <hostname or IP address>. The following is an example of a ping to www.google.com:
As you can see, the Microsoft Windows PC will send four ping requests to the destination by default and
display the response time (in milliseconds) for each attempt. There are three common arguments used
with the ping command:
n ping –t <hostname or IP address> - by using the –t flag, the ping will repeat continuously until
stopped by using the ^c (Ctrl + c) break string.
n ping –a <IP address> - the –a flag causes ping to perform a reverse DNS lookup on an IP ad-
dress. For example, issuing the command ping –a 74.125.19.104 would return the google.com
DNS name associated with the IP address.
n ping –l <size in bytes> <hostname or IP address> - by default, a ping packet is very small. You
can increase the size by using the –l argument (that is a lowercase L not a 1). For example, you
could type ping –l 1200 www.google.com to send packets 1200 bytes in size to google.com.
This is useful when stress-testing connections or servers.
3. tracert
As you can see, the tracert command sends three ping requests to each router that it passes through.
This allows you to find the bottleneck between the source and the destination. In the example above,
209.85.248.220 was the slowest router in the path between my local PC and www.google.com. There is
only one common argument for the tracert command:
n tracert –d <hostname or IP address> - the –d argument prevents traceroute from resolving IP ad-
dresses to hostnames. For example, ip68-2-2-29.ph.ph.cox.net shown in the traceroute output above
is a hostname, 68.2.2.29 is the IP address. This speeds up the traceroute command considerably.
4. nslookup
The nslookup command allows you to send multiple queries to a DNS server. There are many cases in net-
work troubleshooting where problems originate because a DNS server has incorrect name-to-IP-address
mappings in its database. Nslookup can help diagnose these issues. The following is an example of using
nslookup to query a local DNS server:
When you enter a domain name to resolve, nslookup will provide the name and IP address of the DNS
server resolving the name (adtec.home.local/172.30.100.100 in this case) and the IP address(es) of the do-
main name you are resolving. Notice that the DNS server provided four IP addresses for www.google.com.
This is because Google has a large enough web presence to have redundant servers supporting its domain
name. There are many options that can be used with the nslookup command; two of them have common
relevance to Cisco technicians. Keep in mind that both of these commands are entered after you have
entered the base nslookup command:
n server <DNS server name or IP address> - the server selection option allows you to change
DNS servers used for the DNS lookups. For example, in the nslookup output above, I was using
the server “adtec.home.local”. Perhaps I suspected that the adtec server was returning incorrect
information. Using the server command, I could redirect my DNS requests to a different server.
Tip: the DNS server 4.2.2.2 is a well-known public DNS server.
n ls <domain name> - There may be times where you want to see all the DNS records associated
with a certain domain. For example, google.com contains DNS records for www, mail, images and
so on. Typing ls google.com can display all these DNS records. Please keep in mind that many
DNS servers restrict this command because of the secure information it can display.
5. arp
Whenever a network device attempts to communicate, it will need to have both the Layer 3 (IP address)
and Layer 2 (MAC address) of its destination. The ARP command allows you to verify all of the Layer 2 to
Layer 3 address mappings (known as Address Resolution Protocol or ARP mappings) a network client
has stored in its cache (memory). For example, if the network client 192.168.150.21 attempted to com-
municate with 192.168.150.1, it would need to send an ARP broadcast to determine the MAC address for
192.168.150.1. Using the arp command-line utility, you are able to verify these mappings as shown below:
In the example above, the IP address 192.168.150.1 is mapped to the MAC address 0013.7f6d.49ac. The
arp command is unique in that you cannot issue the command without any arguments. The following are
common arguments for use with the arp command:
n arp –a – the –a argument displays all entries currently in the arp table. This command is demon-
strated in the previous graphic.
n arp –d – the –d argument manually deletes entries out of the arp table. By default, Windows
will remember IP to MAC address mappings for 10 minutes. In a network where IP addresses are
changing (usually due to network maintenance or upgrades), it may be beneficial to flush the
arp cache and allow it to dynamically rebuild. Use the arp –d * syntax to remove all entries from
the arp cache.
n Connectionless: Does not notify receiving device that information is about to be sent; the UDP
application just sends information and assumes it is received.
n Limited Error Checking: UDP can optionally include a header checksum, which can be used to
test if header corruption occurred when the message was sent.
n No Data Recovery: The UDP protocol itself cannot recover data if it is lost or contains a bad
checksum. If you would like a reliable UDP application, reliability must be coded into the applica-
tion itself (such is the case with TFTP, a common UDP application).
n No Sequencing: UDP does not have the ability to tell what order packets were sent in. Therefore,
any data received out of order may be dropped by the receiving device.
n Connection Oriented: Before any data is sent, an active session (connection) is set up between
network devices.
n Error Checking: TCP always includes a header checksum, which can be used to test if any header
corruption occurred when the message was sent.
n Data Recovery: After the initial session is created between two network devices, all transmis-
sions are acknowledged (ACKed) to ensure data is not lost. If a message is not acknowledged, it
will be retransmitted.
n Sequencing: When data crosses a complex TCP/IP network, such as the Internet, there is the
potential that data can take multiple paths and end up out of order. TCP uses sequence numbers
on all transmitted data to ensure it is able to be placed in the correct order.
Because of its reliability, TCP is by far the most popular protocol for day-to-day application such as web
browsing, email and file transfers. UDP is typically used in real-time applications such as VoIP, video over IP
and online gaming.
UDP Communication
Understanding UDP network communication is fairly simple since there is no session or error checking
involved. The following figure shows UDP communication in action:
P4 P3 P2 P1
In this case, a UDP client is sending four packets to a UDP server. As seen before in our OSI Model discus-
sion, the communication will come from a source port, which designates the client application it came
from, and will be directed to a destination port, which designates the server application it would like to
access. All four packets are sent without warning and without expecting any acknowledgement.
There are only two common UDP port numbers that you should be able to recognize at the CCNA level:
n UDP Port 53: DNS Requests (used when a client wants to lookup a DNS name)
n UDP Port 69: TFTP File Transfers (used to copy configuration and IOS files to and from a Cisco device)
TCP Communication
TCP is quite a bit more complex than UDP, simply because of all the reliability mechanisms it includes. The
foundation that TCP communication relies on is in building a session. This is accomplished using a process
known as a TCP 3-Way Handshake.
Packet 1
-CTL: SYN
-SEQ:1000
TCP Client TCP Server
192.168.1.10 192.168.1.20
In the initial packet, the client uses two TCP header fields to relay some key information. The first is the
Control (CTL) field. The CTL field dictates what type of TCP packet this is. In this case, it is a Synchronization
(SYN) message, letting the remote server know the client is beginning communication. The second field is
the Sequence Number (SEQ). As data is sent, this sequence number will continue to increase to ensure the
data remains in order. This initial packet is telling the server the starting sequence number for the client. In
this case it’s 1000. Now let’s see how the server responds:
Packet 2
-CTL: SYN, ACK
-SEQ: 500
-ACK: 1001
TCP Client TCP Server
192.168.1.10 192.168.1.20
Notice that the server has now changed the CTL field to SYN, ACK. That’s essentially the server saying, “I
received your request to start communication (ACK), so let me start communication with you (SYN).” Since
the server is a completely different device than the client, it will have its own starting sequence numbers
for communication. In this case, it will begin by starting with SEQ 500. You can also notice a new field in
the packet, which is the acknowledgement (ACK) number. Notice that it is 1001, one more than the TCP
clients sequence number. This is the server saying, “TCP client, I received your SEQ 1000, so I’ll be expect-
ing your next sequence number to be 1001.” The ACK numbers should always be one more than the last
sequence number unless data was lost during transmission. Now, let’s take a look at the final message of
the TCP 3-Way Handshake.
Packet 3
-CTL: ACK
-SEQ: 1001
-ACK: 501
TCP Client TCP Server
192.168.1.10 192.168.1.20
Once the client receives the SYN, ACK packet, it processes it and responds with a final ACK. This is the cli-
ent saying, “I received your SYN, ACK…let’s start talking!” Notice that the client uses SEQ number 1001 to
respond to the TCP server, which is what the TCP server was expecting. It also sends ACK 501, which tells
the TCP server, “I received your SEQ 500, I’ll be expecting 501 next.” Once this third packet is received by
the TCP server, the session is built and data can be sent.
TCP Windowing
Once the TCP session has been set up, the two devices will begin to transmit data using the SEQ and ACK num-
bers to keep everything straight. Continuing the example from the TCP Three-Way Handshake, the TCP client
might send 1 byte of data to the TCP server. Since the last SEQ number used was 1001, the single byte of data
will be sent with SEQ number 1002. When the server acknowledges receipt of the data, it will reply with ACK
number 1003. If the client has 1,000,000 bytes (1 Megabyte) of data to send, sending one byte of data at a time
is an extremely inefficient process to accomplish this. Think of it as having a conversation with a person, but you
can only say one word at a time and must wait for each word to be acknowledged before saying another word.
To help with this issue, the idea of TCP windowing was introduced. TCP windowing allows a device to
send more and more data while receiving only one ACK. As the devices detect a more reliable connection,
the amount they send (known as the window size) increases. The figure below demonstrates this concept.
Packet 1 (Contains
500 Bits of Data)
-SEQ: 1500
Sender Receiver
ACK 1501
Packet 2 (Contains
1000 Bits of Data)
-SEQ: 2500
ACK 2501
Packet 3+ (Contains
2000 Bits of Data)
-SEQ: 4500
Rather than start by sending a single byte of data, most operating systems will begin somewhere around
500 bytes of data. Each time a successful acknowledgement comes back, the sending PC increases its
window size by a factor of two, sending 500, then 1000, then 2000 bytes of data. Again, the amount the
window size increases is dependent on the operating system, but doubling the window size each time
is typical. This process will continue until the sending computer loses some data during the transmission
(due to the receiving computer or some network device between the sender and receiver not being able
to keep up) or until the receiving computer communicates back that its maximum TCP window size has
been reached. There is one last item of note in the concept of TCP sliding windows: you might notice that
the final transmission in the previous graphic is shown as Packet 3+. This is because most networks have
a maximum packet size (known as the Maximum Transmission Unit or MTU) of 1500 bytes. So, for the final
transmission, the PC is most likely sending multiple packets for each acknowledgement received.
IP: 192.168.150.1
MAC: 00a0:9128:1121
Router
If you have ever copied a large file to a server, you may have seen the idea of TCP sliding windows in effect.
Initially, the amount of time to copy the file is reported as some astronomically large amount, such as 15
hours. As you let a few seconds pass, you notice that the time has decreased dramatically to 4 or 5 hours.
After a few more seconds, the copy time estimate has decreased to 2 to 3 hours. You are seeing the effect
of TCP sliding windows before your very eyes. As the window size becomes greater, the transmissions
become more efficient and the time to copy the data becomes significantly less.
The user shown on the left of the diagram has opened a web browser to access the web server on the
right. In the address bar of the web browser, the user types http://192.168.10.50. The following describes
the general process of communication:
n The web browser passes the request down to the operating system. Based on the application
being used, the operating system realizes this will be TCP-based communication.
n In order to direct the data to the correct application, the operating system tags the packet with
the destination port number of 80 (the well-known port number for HTTP). To allow return traffic
to the client, the operating system dynamically assigns port 53,422 to the web browser applica-
tion as the source port number.
n Since this is the initial communication with the web server, the user PC must complete a TCP
Three-Way Handshake to build the session. The initial packet sent will be a TCP SYN.
n The TCP SYN data is tagged with the source IP address of 192.168.150.21 (the user) and a desti-
nation IP address of 192.168.10.50 (the web server).
n The user’s PC is able to determine that the remote web server is on a different network. Because of
this, it sends an ARP broadcast to find the MAC address of its default gateway (192.168.150.1). The
default gateway responds to the ARP message with its MAC address (00a0:9128:1121).
n The user’s PC adds the source MAC address (0011:bc12:9b51) and destination MAC address
(00a0:9128:1121) as the Layer 2 header of the TCP SYN frame and transmits the data.
n The router receives the frame and checks the destination MAC address. Since it sees itself as the
destination MAC address, it begins processing the Network layer (IP address) information.
n Since the router sees 192.168.10.50 as the destination IP address, it realizes this packet is meant
to be sent through the router rather than to the router. The router looks at its routing table and
sees it is attached to the 192.168.10.0/24 network.
n The router removes the original source MAC address (0011:bc12:9b51) and destination MAC
address (00a0:9128:1121). Before it can send the data to the web server, it must replace these
addresses with MAC address information relevant to the web server’s network. The router sends
an ARP broadcast to find the MAC address of the web server (192.168.10.50). The web server
responds to the ARP message with its MAC address (0082:88f3:cc33).
n The router places the correct source MAC address (00a9:ffc9:392a) and destination MAC ad-
dress (0082:88f3:cc33) onto the TCP SYN frame and sends the data out of the interface where
the web server resides.
n The web server receives the TCP SYN frame. Since it sees the destination MAC address as itself, it
begins processing the Network layer (IP address) information.
n Since the web server sees 192.168.10.50 as the destination IP address, it realizes this packet is
destined for itself and begins processing the Transport layer (in this case, TCP) information.
n As the web server processes the Transport layer information, it realizes this is a TCP SYN packet,
which indicates a host is attempting to begin network communication.
n The web server replies to the TCP SYN message with a SYN ACK message. The SYN ACK message
is tagged with a source IP address of 192.168.10.50 (the web server) and a destination IP ad-
dress of 192.168.150.21 (the user).
n The web server realizes the destination IP address is not on its network and adds its own source
MAC address (0082:88f3:cc33) and the destination MAC address of the router (00a9:ffc9:392a).
An ARP broadcast is not necessary since this MAC address information has been cached. The
frame is sent to the router.
n The router receives the frame and checks the destination MAC address. Since it sees itself as the
destination MAC address, it begins processing the Network layer (IP address) information.
n Since the router sees 192.168.150.21 as the destination IP address, it realizes this packet is meant
to be sent through the router rather than to the router. The router looks at its routing table and
sees it is attached to the 192.168.150.0/24 network.
n The router removes the original source MAC address (0082:88f3:cc33) and destination MAC
address (00a9:ffc9:392a). Before it can return the data to the user, it must replace these ad-
dresses with MAC address information relevant to the user’s network. The router adds its own
MAC address as the source (00a0:9128:1121) and the user’s MAC address (0011:bc12:9b51) as
the destination. An ARP broadcast is not necessary since this MAC address information has been
cached. The frame is sent to the user’s PC.
n The user’s PC receives the frame and processes it due to its MAC address and IP address being
identified in the header. Once the data reaches the Transport layer of the OSI Model, the user’s
PC sees the SYN ACK message and replies with an ACK. The sequence numbers (SEQ) and ac-
knowledgement numbers (ACK) are now synchronized between the two devices.
n Once the web server receives the ACK, the TCP Three-Way Handshake is complete and the web
server begins to send data to respond to the user’s request(s).
Ethernet Foundations
Developed in the 1970s, Ethernet has become the fabric of LANs around the world. This initial introduction
is designed to “hit the high-points” of Ethernet networking.
Ethernet is a Physical and Data Link layer standard, when matched to the OSI Model, as shown in the
following figure:
Application
Presentation
Session
Transport
Network
LLC (sub-layer 2)
Data Link
MAC (sub-layer 1)
Ethernet
Category 5, RJ-45,
Physical
10base2, etc...
In the big picture of networks, you can swap out Ethernet for many other technologies (such as Serial WAN
links, Token Ring, Wireless and so on) without changing the functions of TCP/IP. Remember, TCP/IP oper-
ates from the Network layer through the Application layer. So, let’s work through Ethernet, starting with
the Physical layer aspects.
UTP cable without an RJ-45 tip UTP cable with an RJ-45 tip
The CCENT and CCNA exams are not so much focused on Ethernet cabling standards and Physical layer
characteristics as they are cable decision making. Simply put, Cisco wants to know, “Do you know which
Ethernet cable to use?” This decision comes down to a choice between Ethernet Straight-Through and
Ethernet Crossover cabling.
In the LAN environment, there are devices that are designed to naturally connect. For example, a server,
PC or router will typically plug directly into a network switch or hub. Because the devices are engineered
to connect this way, the network plugs are designed physically differently. A PC will send data on pins 1
and 2 of the Ethernet cable (known as Tx pins). A switch or hub is designed to receive data on pins 1 and
2. Likewise, a PC is designed to receive data on pins 3 and 6 (known as the Rx pins), and a switch or hub is
designed to send data on these pins. This is visually demonstrated in the figure below:
PC HUB
TX+ 1 1 RX+
TX- 2 2 RX-
RX+ 3 3 TX+
4 4
5 5
RX- 6 6 TX-
7 7
8 8
Whenever you are making these “natural” connections, you are able to use an Ethernet straight-through
cable. An easy way to remember this is that it is used when you are connecting “unlike” devices. Some
examples of these include:
n PC to switch
n Router to switch
n Printer to hub
n PC to hub
n Server to switch
While these connections are the most common in LAN environments, you will also run into cases where
you have a need to connect “like” devices. If you attempt to do this using an Ethernet straight-through
cable, the devices will not be able to communicate since they are wired to send and receive on the same
pins. It would be synonymous to two individuals attempting to speak without listening or listen without
speaking. In these cases, you will need to employ an Ethernet crossover cable, which crosses the send and
receive pins, as shown in the figure below:
PC PC
TX+ 1 1 TX+
TX- 2 2 TX-
RX+ 3 3 RX+
4 4
5 5
RX- 6 6 RX-
7 7
8 8
n Switch to switch
n Switch to hub
n PC to PC
n PC to router
n Router to router
n Media Access Control (MAC) – Handles Ethernet frame formatting and addressing
n Logical Link Control (LLC) – The connecting layer which allows data to be passed to the correct
Network layer protocol
Since the functions of the LLC sub-layer are simpler, let’s discuss those first. In today’s world, TCP/IP reigns
as the network protocol of choice, but it was not always this way. Other protocols such as IPX/SPX, Apple-
Talk and DecNET were in use in many network environments. The LLC layer of Ethernet provides the ca-
pability to select alternate Network layer protocols. Without this layer, Ethernet would be tied to a specific
Network layer protocol that could never change unless the whole Ethernet standard was changed.
The MAC sub-layer is primarily responsible for error correction and addressing functions. The error correc-
tion comes in through a small check known as the Frame Check Sequence (FCS), which is added on at the
end of the frame:
Preamble/
Destination Source
Start of Data FCS
MAC Address MAC Address
Frame
The FCS is the result of a mathematical formula run on the entire frame. This is technically known as a hash.
When a PC decides to send data across the network, just before it is sent, it runs a mathematical formula
on the entire frame and puts the result of this formula (the hash) in the FCS field at the end. When the data
is received, the first thing the receiving device does is to run the same formula on the data and compare
the result to the result contained in the FCS. If the results match, the frame is considered good and will
be processed. If the results do not match, it means the data in the frame must have become corrupted or
maliciously modified (by a network intruder). The frame is considered damaged and will be dropped.
The second major function of the MAC sub-layer is addressing. In the Network Foundations section, we
discussed the concept behind the MAC address but never looked specifically at its format. The Ethernet
MAC address is 6-bytes long and can be written in a variety of formats, depending on the type of equip-
ment you are working with. The following are examples of the same MAC address written different ways:
n 00-0C-29-9C-F9-F4
n 000C.299C.F9F4
n 000C:299C:F9F4
n 000C299CF9F4
This can sometimes throw off network technicians who are used to the rigidity of the format of an IP address.
Each MAC address uniquely identifies each network card in the world. With 6-bytes of data (48-bits), it is
possible to have 248 or 281,474,976,710,656 possible MAC addresses. Each MAC address is comprised of
two pieces: the Organizational Unique Identifier (OUI) and a Network Interface Controller (NIC) identifier.
The OUI is assigned to organizations producing network equipment. For example, if Intel decided to create
a new network card, they would apply for an OUI which is assigned to the Intel organization. If Intel were
assigned 00-1b-33 as their OUI, they would begin creating network cards starting with this OUI as the MAC
address (for example, 00-1b-33-00-00-01, 00-1b-33-00-00-02, and so on).
3 Bytes 3 Bytes
3 Bytes 3 Bytes
00-0C-29 9C-F9-F4
Example
Ethernet Communication
Ethernet was designed to use a method of transmission known as Carrier Sense, Multiple Access with Collision
Detection (CSMA/CD). This standard defines the rules Ethernet must live by when communicating. Based on
the Ethernet standard, only one device connected to an Ethernet segment is able to send or receive at a time,
otherwise a collision occurs and the data must be re-sent. The rules of CSMA/CD follow this flow:
This system works flawlessly unless two network devices happen to be listening to the Ethernet wire at
the same time. The more devices you add to the network, the chances of this happening increase. If two
devices send data at the same time, the following CSMA/CD procedure occurs:
The more collisions you have on a network, the slower your network performs.
Hub Hub
Crossover Cable
1 Collision Domain
This means that only one device connected to either of the two hubs pictured above will be able to send
or receive at a time. If more than one device attempts to transmit, a collision will occur and be handled by
the rules of CSMA/CD.
This brings us to the major difference between hubs and switches. A network switch isolates each port
into its own collision domain:
Switch Switch
Crossover Cable
5 Collision Domains
This allows all four PCs pictured in the previous figure to send and receive at the same time (if they are
able to run in full-duplex, which we will discuss in a moment). A switch-based network allows a network to
be tremendously more efficient than a hub-based environment.
As I just mentioned, switches provide the capability of full-duplex. This allows a network device to send
and receive at the same time rather than half-duplex, which allows a network device to send or receive
at the same time. All network equipment is rated as if it were running at half-duplex, so when you use a
100-Mbps NIC, you can actually achieve 200-Mbps of throughput if operating in full-duplex (100-Mbps
sending and 100-Mbps receiving at the same time).
n Dedicated Bandwidth – Since each host is isolated into their own network segment (collision
domain), they are dedicated the full amount of bandwidth the switch port can provide. If you
have a 100-Mbps switch, each attached port will receive a full 100-Mbps of bandwidth. If you
have a 100-Mbps hub, the bandwidth is divided among the devices needing to transmit data. If
four devices have data to send, the bandwidth of the hub would be divided between them.
n Data Link Layer Intelligence – Ethernet switches have the ability to learn the MAC addresses of
the attached device(s). By building a MAC address table in memory, it can then direct messages
out specific ports. For example, if HostA wanted to send data to HostB, the switch could allow the
data to only reach HostB rather than sending it to all attached devices. When using hubs (which
is a Physical layer device), every message is sent out of all ports regardless of the destination.
n Speed Mismatches – Since each of the ports are handled individually, switches are able to
handle variable speed ports. For example, you can have a 24-port switch equipped with 22 1-
Gbps ports and two 10-Gbps ports. Hubs must have all ports set to equal bandwidth amounts.
HostA HostC
Port1 Port2
Port3 Port4
HostB HostD
This can be useful if you are attempting to create your own console cable. On one end of the console
cable, you will need a DB-9 serial port adapter, which connects to the PC. Many of the newer Cisco console
cables have these serial adapters built-in:
After you have connected one end of the console cable to your PC and the other end to the Cisco switch
or router, you will need a terminal emulator program to interact with the Cisco router. The following is a list
of common terminal emulators:
n HyperTerm
n Tera Term
n Putty
n Minicom
n SecureCRT
Once you have opened one of these programs, you will need to select your PC COM port for the connec-
tion. The COM port MUST be configured with the following settings:
n Data Bits: 8
n Parity: None
n Stop Bits: 1
Once you have configured these settings, you can click OK and press the Enter key a few times in the
terminal program. A prompt from the Cisco device should appear.
User Mode
Router>enable
Privileged Mode
Router#configure terminal
n User Mode - This is the initial mode you access when you log into the Cisco IOS device. From
User Mode, you have extremely limited access to view information such as interface status,
router uptime and IOS version information. Commands that could expose any security-related
information are disabled in this mode.
n Privileged Mode – This mode allows you to view the full configuration of the Cisco IOS device
and provides access to troubleshooting and testing utilities such as the debug commands. This
is the only mode which allows you to save your IOS configuration.
n Global Configuration Mode – From this mode, you can change global settings on the Cisco IOS
device. Some examples of these settings are the name of the IOS device, a logon banner and the
privileged mode password. More importantly, from global configuration mode, you can access
any of the sub-configuration modes.
n Interface/Line/Router/Other Configuration Modes – After moving into global configuration
mode, you are able to access any of the sub-configuration modes. These modes give you an
interface to configure specific aspects of the router or switch. For example, you could configure
an individual interface by moving into Interface configuration mode.
The IOS prompt always consists of two pieces: the hostname of the device and the mode you are currently
accessing. These are formatted as <hostname><mode>. The following is an example of what each of the
modes look like:
n User Mode – RouterA> (note the > symbol indicates user mode)
The following syntax example allows you to visualize moving through these modes:
RouterA>
RouterA>enable
Password:
RouterA#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#interface fastethernet 0/1
RouterA(config-if)#end
RouterA#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#interface fastethernet 0/1
RouterA(config-if)#exit
RouterA(config)#exit
RouterA#
n Enable – The enable command moves you from user mode to privileged mode. On a configured
Cisco IOS device, this transition is always password protected (as shown in the example). On an
unconfigured Cisco IOS device, there will be no password required.
n Configure Terminal – The configure terminal command moves you from privileged mode to
global configuration mode.
n End / CTRL+Z – The end command and the ctrl-z keystroke are assigned an identical function:
exit all configuration modes and drop back to privileged mode. No matter how deep you are in
the configuration modes, these two commands will always back you out completely.
n Exit – The exit command moves you back through configuration modes one mode at a time.
In the example syntax, you can see that we moved from interface configuration mode back to
global configuration mode by typing exit the first time. We then moved from global configura-
tion mode back to privileged mode by typing exit the second time. If we were to type exit a
third time (from privileged mode), we would log out of the IOS device.
No matter where you are in the Cisco IOS, you can use the question mark key (?) to see a list of
commands available:
RouterA#?
Exec commands:
<1-99> Session number to resume
access-enable Create a temporary Access-List entry
access-template Create a temporary Access-List entry
archive manage archive files
cd Change current directory
clear Reset functions
clock Manage the system clock
cns CNS agents
configure Enter configuration mode
connect Open a terminal connection
copy Copy from one file to another
crypto Encryption related commands.
…<output omitted>…
These commands are always listed alphabetically. The ? help system stretches beyond just listing com-
mands. You can use it to receive a filtered list of commands by placing the ? directly following specific
letters. For example, typing c? produces the following list of commands:
RouterA#c?
cd clear clock cns configure
connect copy crypto
This represents every command in the current privileged mode that starts with the letter c.
Finally, you can use the ? to walk through complete command syntax. For example, let’s use the clock
command (shown above) to demonstrate:
RouterA#clock ?
set Set the time and date
RouterA#clock set ?
hh:mm:ss Current Time
RouterA#
Notice, I used the ? to prompt the next portion of the command to enter. When using the ?, you do not
need to press the Enter key; the Cisco IOS recognizes the symbol immediately. Because of the vast amount
of commands used in the Cisco IOS, the ? can quickly become your best friend.
Cisco has also engineered an intuitive syntax error system in the IOS. There are three types of messages
you will receive if you enter a command incorrectly:
n Incomplete Command – This error appears if you have not typed enough information for the
IOS device to process the command.
Example:
RouterA#clock set 13:05:00 December 26
% Incomplete command.
n Ambiguous Command – This error appears if you have not typed enough of a command
for it to be uniquely recognized. This often occurs when using shortcuts, which we will discuss
in a moment.
Example:
RouterA#cl
% Ambiguous command: “cl”
n Invalid Input Detected – This error message appears when you have mistyped or misspelled
a command in the IOS. The Cisco IOS will even point out where the mistype occurred, using
the ^ symbol.
Example:
RouterA(config)#interfuce fastethernet 0/1
^
% Invalid input detected at ‘^’ marker.
Now we can discuss the Cisco IOS shortcuts. The Cisco IOS command parsing system will allow you to
type a shortcut for any command, as long as you type enough characters for the command to be uniquely
recognized. For example, let’s say we wanted to get into global configuration mode on our router:
RouterA#c?
cd clear clock cns configure
connect copy crypto
RouterA#conf ?
confirm Confirm replacement of running-config with a new config
file
memory Configure from NV memory
network Configure from a TFTP network host
overwrite-network Overwrite NV memory from TFTP network host
replace Replace the running-config with a new config file
terminal Configure from the terminal
<cr>
RouterA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#
Notice, I was able to type conf instead of the entire word configure since these four letters allow the Cisco
IOS to recognize the command uniquely. If I were to just type con and press enter, the IOS would return
the ambiguous command error message. For the second portion, I was able to type t instead of the entire
word terminal since there were no other commands that began with the letter t.
Using the Tab key can be helpful in shortcut processing. As soon as you have typed enough characters, the
IOS will complete the rest of the command for you:
Finally, the Cisco IOS has some handy navigation commands that can make you more efficient when work-
ing in the command-line interface.
Command Function
Ctrl+R Re-displays a line (starts a new line, with the same command shown)
I have highlighted the Ctrl commands used most often when working with the IOS. It may seem silly to
have Ctrl commands that perform the same functions as the arrow keys on the keyboard; these Ctrl com-
mands exist because some older terminal programs do not allow you to use the arrow keys.
n terminal history size <0-256> - This privileged mode command allows you to set the number
of entered commands the IOS remembers. By default, the IOS remembers the last 10 commands
you have entered and can recall them using the up arrow or ctrl+p commands.
Example:
n no ip domain-lookup – This global configuration mode command prevents the Cisco IOS
device from trying to lookup names typed in privileged mode. By default, when you type a word
not recognized in the Cisco IOS command set in privileged mode, the IOS device assumes you
are trying to Telnet to a device by that name. The command processing will hang for about 30
seconds, trying to map the word you typed to an IP address.
RouterA#comfigure
Translating “comfigure”...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find
computer address
Typing this command in global configuration mode disables this name-lookup feature.
Example:
RouterA#configure terminal
RouterA(config)#no ip domain-lookup
n logging synchronous – This line configuration mode command prevents console messages
from interrupting your command input. When working on an IOS device through the console
port, status messages will often display and interrupt your command entry.
Example:
RouterA#show run
090777: *Jul 24 17:44:41: %CDP-4-DUPLEX_MISMATCH: duplex mismatch
discovered on FastEthernet0/23 (not half duplex), with
AccessServer Ethernet0 (half duplex).ning
You may have been trying to type the command show running-config, but a status message
interrupted your typing. While the command will still work, this can be very hard on your mind.
Typing the logging synchronous command under line configuration mode (which will be dis-
cussed much more in the upcoming material) causes the IOS device to repaint the text you were
typing on a new line.
Example:
RouterA#configure terminal
RouterA(config)#line console 0
RouterA(config-line)#logging synchronous
RouterA(config-line)#end
RouterA#show run
090782: *Jul 24 17:48:13: %SYS-5-CONFIG_I: Configured from console
by vty0 (172.30.3.105)
RouterA#show running-config
n exec-timeout <minutes> <seconds> - This line configuration mode command lets you recon-
figure the amount of idle time you can spend before the Cisco IOS device automatically logs
you out. This can be useful when initially configuring the IOS device; the default timeout period
is 10 minutes.
Example:
RouterA#configure terminal
RouterA(config)#line console 0
RouterA(config-line)#exec-timeout 60 0 (configures 1 hour idle timeout)
n Assigning passwords
! By default, the Cisco IOS is stored in a compressed .bin format in the flash of the switch. During the boot
process, the switch decompresses and copies the entire IOS into RAM. This allows the IOS to operate much
faster. During this process, pound symbols (#) will buzz across your terminal window.
! The text above gives us information about the IOS version and feature set that is running on this switch.
This is currently running the IOS version 12.2(40)SE with an IP Services feature set. Cisco sells many dif-
ferent versions of the IOS that have different price points. For example, if you run a Voice over IP (VoIP)
network, you would want an IP Voice IOS or Enterprise feature set, which has a higher price point than the
IP Base feature set all Cisco devices ship with.
Initializing flashfs...
flashfs[1]: 3 files, 1 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 15998976
flashfs[1]: Bytes used: 8834560
flashfs[1]: Bytes available: 7164416
flashfs[1]: flashfs fsck took 9 seconds.
flashfs[1]: Initialization complete.
! During boot, the switch performs a Power-on Self Test (POST) in which all components are tested.
The lights on the front of the switch will initially all be lit and will slowly tick down (turning off ) as
these tests complete.
! If you see the above notice, you know that the switch is able to support encryption features. At this point,
we are most interested in these features for Secure Shell (or SSH) support, which we will discuss later. If
this notice does not appear, your device will only be able to support Telnet access.
! The above line represents the amount of memory (RAM) installed in this switch. It currently has 65526
Kilobytes (KB) or 64 Megabytes (MB) installed. The switch partitions this memory into smaller pieces. The
8192K represents a memory partition
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
! The information above gives key serial and model number information about the switch which would
be needed if you ever called Cisco for technical support or warranty service. This is a Cisco Catalyst 3550
switch (C3550) with 24 ports supporting inline power (24PWR).
! The boot process is now complete and the switch is functional. The question above is only asked if the
switch has no existing configuration. The Initial Configuration Dialog is a step-by-step process to configure
base functionality on the switch. In the real world, nobody uses this step-by-step process, so I would highly
suggest answering NO to the above question, as I will do here:
Assigning Passwords
When working with Cisco IOS devices, you’ll need to get used to the idea of setting multiple levels of pass-
words. There are two modes to protect: User mode (initial access to the device) and Privileged mode (full
administrative access to the device). We’ll start by protecting the User mode.
On a Cisco switch, there are only two ways to reach User mode: through the console port and through
Telnet/SSH remote access sessions. Use the following syntax to secure both of these portals:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line console 0
Switch(config-line)#password cisco
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#line vty 0 4
Switch(config-line)#password cisco
Switch(config-line)#login
Switch(config-line)#end
Switch#
n line console 0 – Moves from global configuration mode into line configuration for the console port.
n line vty 0 4 – Moves from global configuration mode into line configuration for the Virtual Ter-
minal (VTY) lines. These VTY lines receive Telnet and SSH connections. Most Cisco devices allow
up to five simultaneous Telnet/SSH connections. Typing line vty 0 4 configures all five of these
ports at the same time.
n password <password> - Sets the password for the console or VTY lines. In our example, you
must now type the password “cisco” to get into user mode from the console or VTY lines.
n login – Requires logins to the port. If you enter the password command without entering the
login command, the user will never be prompted for the password, even though you have one
set, since logins are not required. Note: the login command exists by default under VTY lines but
must be entered under the console line.
After performing the previous configuration, the User mode is now protected on your Cisco switch. We
now need to protect the transition from User mode to Privileged mode (accomplished by typing the en-
able command). You can use one of two commands to accomplish this:
Both of these commands accomplish the same objective: requiring a password when a user attempts to
move from User to Privileged mode. The difference between them is one of these commands is stored in
clear text in the running configuration while the other is encrypted:
Switch#show run
Building configuration...
Notice the enable secret command has been completely encrypted and is not visible on the device. The
enable password command is displayed in clear text. The enable password <password> command is
the older of the two and is not used unless you are working with older Cisco equipment. If both com-
mands are entered on a Cisco device, the enable password is automatically disabled (only the enable
secret password will function).
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Fido
Fido(config)#
Notice that the prompt immediately changes to Fido. Since I’d rather not have Fido as my hostname for
the rest of this guide, I’ll remove the hostname using the no command
The no command can be used to remove any configuration in the Cisco IOS. For example, if I wanted to
remove the enable password I previously entered, I could type no enable password.
For legal purposes, it’s always good to have a logon banner on all Cisco devices. To configure a logon ban-
ner (known as a Message of the Day or MOTD banner in the Unix/Cisco realm), use the following syntax:
The banner motd <delimiter> command is fairly straightforward. Keep in mind that the delimiter charac-
ter can be any character you wish. It simply marks the start and end of your logon banner; in my example, I
chose to use the ampersand (&) since I did not plan to use that character anywhere in the logon banner.
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#username Jeremy password cisco
Switch(config)#ip domain-name preplogic.com
Switch(config)#crypto key generate rsa
The name for the keys will be: Switch.preplogic.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.
Switch(config)#
01:06:57: %SSH-5-ENABLED: SSH 1.99 has been enabled
Switch(config)#line vty 0 4
Switch(config-line)#login local
Switch(config-line)#transport input ssh telnet
n username <username> password <password> - While Telnet requires just a password, SSH
connections require both a user account and password. Using this syntax creates a user account
on your Cisco switch for SSH access.
n ip domain-name <domain> - In order to perform SSH, you must use encryption keys (formulas).
The switch will generate an encryption key with a specific name; this domain-name is tied to
that name. If you glance at the syntax above, you’ll see a line that says “The name for the keys
will be: Switch.preplogic.com.” This is simply an identifier for this encryption key set. You cannot
generate encryption keys without first setting a domain name.
n crypto key generate rsa – This command actually generates the encryption keys. You’ll notice
that you are required to enter the size of the “modulus” after entering this command. This is the
strength of the encryption formula. The larger the modulus, the stronger the encryption. How-
ever, the larger your modulus, the more resources the switch will use to perform the encryption.
n login local – Entering this command under the VTY lines instructs them to use the local user
database (where we created our user account) to authenticate incoming connections, rather
than the simple password we typed under the VTY lines previously.
n transport input <protocol(s)> - This command instructs the switch as to the specific protocols
allowed to access the VTY lines. In the previous syntax example, I chose to allow SSH and Telnet
connections. If you only wanted to allow SSH (thereby disallowing Telnet), you could enter
transport input ssh.
Switch#conf t
Switch(config)#interface fastethernet 0/10
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum 1
Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#switchport port-security violation shutdown
n switchport mode access – Much of the function of this command will be discussed when we
talk about VLANs. For now, think of it simply as setting the switch port as an access port which
connects to end devices rather than another switch.
n switchport port-security – Turns on the port security feature for this port.
n switchport port-security maximum <number> - Sets the maximum number of allowed MAC
addresses on this port. In the previous example, I allowed a maximum of one MAC address.
n switchport port-security mac-address sticky – This command is optional. What it does is hard-
code the first MAC address it learns (since we limited the maximum MAC addresses to one) as
the only allowed MAC address on the port. This is useful if you would like to allow only a specific
device to access a switch port rather than multiple devices.
n switchport port-security violation shutdown – Instructs the switch to shutdown the port if
any of the previous criteria are violated.
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastEthernet 0/10
Switch(config-if)#speed 100
Switch(config-if)#duplex full
This syntax example sets the port to 100Mbps, full-duplex. You can choose any setting the switch supports,
such as 10Mbps, half-duplex or 1000Mbps, full-duplex. Just make sure you hard-code the other side of the
connection with the same settings!
You can also add descriptions to key switch ports in your environment by using the description command:
Finally, as a security practice, Cisco recommends that you shut down any switch port that is not currently
in use on your switch. You can accomplish this by accessing the interface(s) you would like to shut down
and simply type the shutdown command:
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.10.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip default-gateway 192.168.10.1
The VLAN 1 interface is considered a virtual interface that is reachable by all ports assigned to VLAN 1
(which all ports are, by default). This concept will be discussed much more when we get into VLANs later in
this guide. The no shutdown command turns the VLAN interface since it has a shutdown state by default.
Let’s start off with the biggest show command of all: show running-config
Switch#show running-config
Building configuration...
!
interface FastEthernet0/10
switchport mode access
switchport port-security
switchport port-security mac-address sticky
shutdown
speed 100
duplex full
!
!<output omitted>
!
interface Vlan1
ip address 192.168.10.1 255.255.255.0
!
ip default-gateway 192.168.10.1
!
banner motd ^C
*************************************************************
This is a private system. Unauthorized access prohibited.
*************************************************************
^C
!
line con 0
password cisco
login
line vty 0 4
password cisco
login local
transport input telnet ssh
line vty 5 15
login
!
end
This show command shows every single command you’ve ever typed into the switch. If you want to cre-
ate a backup of your configuration, copying the output of the show running-config command to a text
document is a great method.
The second show command of interest is the show interface command. This command can be used to
verify the statistics of any interface of your switch:
I have highlighted some key information from this output. The first highlighted line shows the status of
the interface. “FastEthernet 0/12 is up” means that it is physically connected (the interface is physically
intact). The “line protocol is up” means that the data link connectivity is operational. In this case, the data
link connectivity represents Ethernet function. Simply put, that first line says, “I’m physically okay and
communicating on this Ethernet network.” Understanding how to interpret that first line is a big one for
troubleshooting. Here are all the possibilities:
The second piece of information we can see from the show interface command is the speed and
duplex settings. If the interface has auto-detected the speed and duplex, this allows you to see the
settings it negotiated.
Lastly, the show interface command gives us plenty of statistics about the interface, including the
amount of data sent and received and traffic loads over the last five minutes. This can be very helpful in
determining the overall usage of an interface and can be used to detect communication problems.
Now we come to my all-time favorite command on both Cisco switches and routers: show ip interface brief.
This command gives a “quick view” look at all of the interfaces on the switch along with their associated IP
address (if relevant), their Status (Physical layer) and Protocol (Data Link layer). This command is fantastic
to get a fast look at switch interface information.
Last, but not least, we need to look at saving the configuration. Every change that we’ve made to the
switch has been stored in the running-config, which is located in RAM. If the switch were to lose power, all
of the configurations that we’ve entered would be lost. Let’s first talk about the “CCNA approved” method
of saving your configuration, and then I’ll show you the shortcut. To save your configuration on a Cisco
switch, enter the following:
Performing this configuration copies the data from RAM (running-config) to Non-Volatile RAM (NVRAM, or
startup-config). The common shortcut used to enter this command is copy run start.
The faster method of saving your configuration is to use the write command. Just entering write (or the
wr shortcut) from any privileged mode prompt automatically copies the running-configuration to the
startup-configuration with no questions asked. While this method is used quite often in Cisco environ-
ments, it may or may not work in your CCNA exam simulations.
n WLANs are half-duplex: Currently, full-duplex communication is not yet supported in the wire-
less arena. A wireless device will be able to send or receive at once but can never do both.
n WLANs use CSMA/CA rather than CSMA/CD: Since wireless networks do not have the ability to
detect a collision, WLANs use a collision avoidance (CA) algorithm that assigns specific timeslots
to each client attached to the WLAN. This is important to realize since the more clients you at-
tach to a wireless access point, the slower all devices become.
n WLANs use radio frequency to communicate: WLAN network connections are far more
susceptible to interference than wired LAN connections. There are also varying regulations in dif-
ferent countries that you will need to consider before deploying a WLAN.
This RF signal can be absorbed or completely reflected as it strikes different objects. For example, as the RF
signal passes through a drywall barrier, the signal will be absorbed and be weaker on the other side. While
this is expected, passing through too many absorbing barriers can cause the signal to become too weak
to be useful to a network client. There are other materials, such as metal, that can completely reflect the
RF signal causing it to be unavailable to a client. For example, you may have a wireless network client in a
room with many metal file cabinets. As the client moves around the room, they may completely lose the
network RF signal and drop off the network.
Anytime you have a device that broadcasts an RF signal, you must have that device registered with a
government entity that manages RF signals. In the United States, this entity is known as the Federal Com-
munications Commission (FCC). Thankfully, the FCC has created three bands of RF that are considered
“unlicensed.” This means that devices using these bands do not need to be registered. Without unlicensed
bands, every cordless phone, microwave oven and WLAN access point would have to go through exten-
sive litigation before it could be used. The three unlicensed bands are:
Keep in mind that the above RF bands are country specific. While most countries use the same unlicensed
bands, it’s always best to check with the specific country’s RF regulating entity.
When it comes to RF, the higher frequency signals can handle more bandwidth but travel less distance.
For example, if you had an RF device using the 900 MHz band, it could transmit further, but handle less
traffic than the 2.4 and 5 GHz bands. Because of the low bandwidth amount offered by the 900 MHz band,
modern WLANs only use the 2.4 GHz and 5 GHz bands, with the 2.4 GHz band being far more saturated
with devices than the 5 GHz band.
There have been three major network standards that have been released since the original wireless net-
work implementations in the late 1990s. The following table gives the “fast facts” on these standards:
Non-Overlapping 3 3 12
Channels
At this point, we have only discussed the RF band aspect of these standards. The maximum data rate
dictates the maximum speed that each of these standards is able to reach. Keep in mind, this represents
the maximum. As the signal becomes weaker (the client moves further away from the WAP), the data rate
will decrease. The number of non-overlapping channels represents the number of non-interfering access
points you can have in close proximity to each other. The channels will be further discussed in the WLAN
best practices section.
A variety of security standards have been released to assist in WLAN network security challenges.
802.1x EAP
The Extensible Authentication Protocol (EAP) was developed in part to address wireless security vulner-
abilities. EAP represents a framework of authentication protocols that can be changed to meet specific
requirements. EAP is not a protocol that directly secures your network but, rather, a framework that offers
a “shell” to plug in your own authentication protocol. For example, Cisco developed LEAP, which was a
method that allowed you to have dynamic WEP keys, in response to the weaknesses found in the original
WEP standard. With LEAP, you do not enter a static WEP key but, instead, are allowed username/password
credentials to securely pass to an authentication server which will generate a new, dynamic WEP key each
time the user joins the network. LEAP is just one form of EAP; there are many others.
802.1x is the implementation of EAP on a wired or wireless network. The typical 802.1x architecture is
as follows:
With 802.1x, the supplicant passes its authentication credentials to the WAP (the authenticator); however,
the WAP does not actually do the authentication. It passes the credentials to the authentication server,
which checks the credentials (such as a username and password) against its database. If the credentials
match, the server will tell the WAP to generate encryption keys and allow the client access. If the creden-
tials do not match, the client will not be able to access the wireless network.
Using this 802.1x method is fantastic since you can change the method or strength authentication with-
out needing to upgrade your authenticator equipment.
When designing a WLAN, there are three methods of WLAN connections that you can use:
n Independent Basic Service Set (BSS) Ad-Hoc Connections: WLAN connections between two
or more end devices without requiring the use of a wireless access point.
n Basic Service Set (BSS) Infrastructure Connections: WLAN connections between one or more
clients and a single wireless access point.
n Extended Service Set (ESS) Infrastructure Connections: WLAN connections involving two or
more BSS systems connected to a common switched network.
Since corporations cover a larger service area, most will use an ESS design.
When designing an ESS infrastructure, you should always provide an overlap of wireless coverage cells to al-
low clients to roam between access points without losing a signal. As shown in the following figure, the cells
should have an overlap of 10 to 15 percent for data-only and an overlap of 15-20 percent for VoIP traffic.
When designing overlapping coverage, you must factor in the idea of wireless channels. Wireless access
points that offer overlapping signals will interfere with each other if assigned to the same channel. Chang-
ing the wireless channel of a WAP assigns it to run on different wireless frequencies. 802.11b and 802.11g
support 11 different channels that run on the following frequencies in the 2.4 GHz range:
As you can see, many of the channels overlap frequency. For example, if you were to place a WAP using
channel 1 (2.401 - 2.423 GHz ) next to a WAP using channel 3 (2.411 - 2.433 GHz), the signals would inter-
fere with each other. The only “clean” channels to safely use in close proximity are channels 1, 6, and 11. A
typical wireless cell design for a mid- to large-sized organization would look like this:
Channel 6
Channel 1 Channel 1
Channel 11
Channel 6 Channel 6
Channel 1
With 12 non-overlapping channels to use, 802.11a, which runs in the 5 GHz range is much more flexible in
terms of network design.
The average 802.11b/g WAP can transmit a usable signal about 300 feet in an “open field” (no obstruc-
tions) environment. However, as a client receives a weaker signal, the transmission data rate will decrease
(lower speed connections can travel further distances). As an 802.11g client travels away from the WAP, it
will negotiate down through the following speeds:
n 54 Mbps
n 48 Mbps
n 36 Mbps
n 24 Mbps
n 18 Mbps
n 12 Mbps
n 9 Mbps
n 6 Mbps
If the downgrade of speed presents a performance issue for your clients, you can place your WAPs
closer together.
Depending on the type of WAP you use, the configuration can be performed using a web-based or
command-line interface. Regardless of the method used, there are some basic parameters you should
set on every WAP:
n Wireless standard(s) – choose between running 802.11b, 802.11g, or 802.11a. Many WAPs can
run all three standards at the same time.
n Channel assignment – select clean channels for adjacent WAPs. Many WAPs support an auto
channel assignment feature, which searches for the cleanest channel.
n Service Set Identifier (SSID) – create one or more SSIDs, which identify the wireless network
to clients.
n Security settings – choose encryption and authentication methods you will use for
your organization.
The WAPs should be configured in a layered approach. First, test the switch port that you plan to use for
the WAP. Ensure it operates correctly for an end PC. Then, install the access point and create an SSID with-
out any security parameters. Join the unsecure SSID with a client and make sure everything works before
you add security. Then, add the wireless security and test using the same wireless client.
Most of the wireless troubleshooting you will encounter will be due to interference issues. Since many
other devices share the same radio frequencies, finding a clean channel may be a challenge in some en-
vironments. Many organizations have chosen to use 802.11a equipment because there are far more clean
frequencies to use than 802.11b/g.
Cisco 800 Series Cisco 1800 Series Cisco 2800 Series Cisco 3800 Series
These product lines are typically found in corporate networks. While there are other router lines available,
they are usually found in higher-end environments such as Internet Service Providers (ISPs).
The beauty of learning Cisco is the fact that all of these routers have the same IOS. Once you learn to work
with one of them, you’ll have the foundations for working with all of them. The major differences between
the routers are the amount of memory, processing power and interfaces each one is able to support. The
higher-end product lines (such as the Cisco 3800 series) support many more interfaces and are able to
handle a much larger amount of network traffic than the lower-end product lines (such as the 800 series).
R1 R2 R3
Broadcast Broadcast
Domain 2 Domain 3
Broadcast Broadcast
Domain 1 Domain 4
The reach of a broadcast domain defines how far a broadcast will go before it is stopped.
While routers stop broadcasts, they do allow unicast (directed, one-to-one communication) between end
systems. To accomplish this feat, the router uses a routing table, which lists all the destinations it is able to
reach. Let’s add IP networks to the previous figure:
R1 R2 R3
192.168.1.0 192.168.2.0
255.255.255.0 255.255.255.0
192.168.0.0 192.168.3.0
255.255.255.0 255.255.255.0
If a host from the left side of the network decided it needed to reach a host on the right side of the net-
work, it would send the network traffic to R1, which is its default gateway (for a full discussion of why the
host makes this decision, refer back to Domain 2 of this guide). R1 will then look at its routing table, which
will look something like this:
R1 Routing Table:
Route 1: Connected – 192.168.0.0/24
Route 2: Connected – 192.168.1.0/24
Route 3: Through R2 – 192.168.2.0/24
Route 4: Through R2 – 192.168.3.0/24
As R1 receives packets for a host in the 192.168.3.0 network, it observes its routing table and realizes the
packets need to be sent to R2. Once R2 receives the packets from R1, it looks at its routing table, which will
look something like this:
R2 Routing Table:
Route 1: Through R1 – 192.168.0.0/24
Route 2: Connected – 192.168.1.0/24
Route 3: Connected – 192.168.2.0/24
Route 4: Through R3 – 192.168.3.0/24
The process would then continue with R2 sending the packets to R3, who is directly connected to the net-
work where the destination host resides. This is the process that we’ve all come to know as routing. After
some base configuration, the routers will know the networks to which they are directly connected. Your
job is then to educate these routers about all the networks they are able to reach through other routers.
You can do this one of two ways:
n Static Routing – A form of routing where you manually enter in each network the router is able
to reach and the path to get there. This form of routing is great if you are paid by the hour.
n Dynamic Routing – A form of routing where the routers communicate with each other and
build the routing tables dynamically. This form of routing is great if you have a salary position.
In most networks, Cisco administrators will use a combination of both styles of routing to accomplish
specific goals. So, to review, while routers can accomplish quite a bit, they have two key purposes:
To properly design and support a routed network, you must have a full understanding of how IP networks
are created.
If we were to use only these default subnet masks in addressing our network, we would be using a class-
ful network design. The following figure gives an example of using classful addressing:
192.168.1.50 10.0.1.10
192.168.1.1 172.16.0.2
R1 R2
172.16.0.1 10.100.1.1
192.168.1.51 10.0.1.11
Please keep in mind that this network diagram is horrific for many reasons but is primarily used to demon-
strate the limitations of classful addressing. If you look at the network on the right, the 10.0.0.0 Class A subnet
is in use. This subnet provides more than 16 million addresses and yet, only a few of them are being used.
Since the 10.0.0.0 network has been used behind R2, it cannot be used anywhere else in your network.
Today, just about every network in existence uses classless addressing. In this form of addressing, the
original class of address is only used as a guide. You can take the original subnet mask attached to the
address and subnet it further down to a more manageable size. For example, I could take the Class A
10.0.0.0 network and apply a Class C subnet mask to it. This basic form of subnetting would provide 65,536
subnets (networks) that I could apply to my organization with 254 hosts per subnet. The following figure
gives an example of using this type of classless addressing:
10.0.1.50 10.0.3.10
10.0.1.1 10.0.2.2
R1 R2
10.0.2.1 10.0.3.1
10.0.1.51 10.0.3.11
While “easy” subnetting like that shown in the previous example is used most often in real-world corpo-
rate environments, all Cisco certification exams expect you to know how to handle difficult subnetting.
Before we get into subnetting, let me first say that there are probably more methods used to understand
and learn subnetting than any other topic in network technology. What I will present in this guide is one
form that many have found useful, but if there is another form that you feel more comfortable with, feel
free to use it!
The first topic you must master on your way to successful subnetting is converting between decimal
and binary. We are used to looking at numbers in decimal form (in bytes of information), but network
processing looks at numbers in binary form (in bits of information). Take, for example, the IP address
216.77.133.249 in its dotted-decimal form (4 bytes) which can be represented in binary form as 11011000.
01001101.10000101.11111001 (32 bits).
In order to convert between decimal and binary, you must understand the powers of 2:
2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
Every byte of information can be broken down into eight bits, where each bit represents a power of two.
By flipping a bit from a zero to a one, you enable that power of two:
0 = 0 0 0 0 0 0 0 0
Decimal Binary
So if you wanted to convert the number 216 to binary, you would use simple subtraction beginning with
the largest power of 2:
216 = 1 1 0 1 1 0 0 0
Decimal Binary
You can use this process to convert any number to binary. You will also want to know how to convert back.
For example, if given the binary number 01001101, you should be able to add the respective powers of
two back together to get a decimal value:
? = 0 1 0 0 1 1 0 1
Decimal Binary
2^6 = 64
2^3 = 8
2^2 = 4
2^0 = 1
64 + 8 + 4 + 1 = 77
Keep in mind that Cisco exams do not allow you to use a calculator! You should practice these decimal-to-
binary and binary-to-decimal skills until you can accomplish both conversions rather quickly.
Now that we have the base skill for subnetting mastered, we can move into the process of subnetting
itself. The need for, and process of, subnetting is best demonstrated through an example.
R1 R3
R2
Example 1: You are the administrator for the network shown in the prior figure. The organization wishes
to use public addressing for all devices in the organization and has been assigned the Class C subnet
200.5.9.0 by their ISP.
The problem with the previous scenario is the fact that the organization has a single, Class C network but
has five networks in the organization (3 LANs and 2 WANs). You must break up the single, Class C network
into at least five subnetworks. Here’s the process:
In this initial step, you must determine the number of networks the organization needs and convert that
number to binary. In this case, our organization needed five networks, so:
5 = 00000101
Step (2) Reserve required bits in a subnet mask and find incremental value.
In this second step, we need to determine how many bits it takes to reach the number of networks re-
quired. Looking at the binary equivalent of five (00000101), we can see that it takes three bits (in bold) to
get the number five. You cannot get this decimal number with any less than three bits.
Next, to reserve the required bits, we need to look at the original subnet mask in all binary. We were told that
this is a Class C subnet mask. If we were to convert the subnet mask to all binary, it would look like this:
255.255.255.0 = 11111111.11111111.11111111.00000000
Up until now, we have been saying that the decimal number “255” represents the network portion of the
IP address and the decimal number “0” represents the host. Since we’re now working in binary, we need
to think the binary bit “1” represents a network bit and the binary bit “0” represents a host bit. The process
of subnetting borrows host bits to create more networks (which we need in this case). Since it takes three
bits to get the number five, we know that we must add three more network bits (1’s) to our subnet mask.
The result is as follows:
11111111.11111111.11111111.11100000
Notice that we picked up right where the network “1” bits left off and converted three of the previous host
bits into network bits. From this binary number, we can now find what our decimal subnet mask will be for
this entire organization. By converting this binary number back to decimal, we get:
11111111.11111111.11111111.11100000 = 255.255.255.224
Every device in the organization - every router, every switch, every PC - will use this subnet mask in their
network configuration. That leads us to the second half of this second step: “find incremental value.”
The incremental value is necessary for the third and final step of this subnetting process. The incremental
value is the lowest network bit converted back to a decimal number. Looking at our subnet mask again:
11111111.11111111.11111111.11(1)00000
We can see that the lowest network bit (which I’ve put in parenthesis) is 32 as a decimal number.
The incremental value is used to find the network ranges that we will be using in our organization. All we
need to do is add the increment to the original network we were assigned in the same octet as the incre-
ment was found. In this case, looking back at the subnet mask:
11111111.11111111.11111111.11100000
We can see that the increment is in the fourth octet. Thus, our math proceeds as follows:
200.5.9.0
200.5.9.32
200.5.9.64
200.5.9.96
200.5.9.128
200.5.9.160
…and so on.
These numbers represent the beginning of each network range. In order to find the complete network range,
we need to subtract one from each of the beginning IP addresses to fill in the end of the previous range:
200.5.9.0 - 200.5.9.31
200.5.9.32 - 200.5.9.63
200.5.9.64 - 200.5.9.95
200.5.9.96 - 200.5.9.127
200.5.9.128 - 200.5.9.159
200.5.9.160 - 200.5.9.191
…and so on.
In our original, Class C network of 200.5.9.0 through 200.5.9.255, we cannot use the first IP address,
205.5.9.0 (since it identifies the network) nor could we use the last IP address, 200.5.9.255 (since it is used
for sending a broadcast to the entire network). We have now broken our single network into multiple
subnetworks. Each one of these subnetworks has a network identifier and a broadcast address, which are
unusable. Thus, we could create a table that looks something like this:
…and so on
If we were to assign the address of the network shown in the previous network diagram, it might look like this:
R1 R3
200.5.9.64 - 200.5.9.95
Keep in mind that every device must use the subnet mask 255.255.255.224 if this addressing scheme is
going to function.
So, to summarize this example, we have taken a single, Class C network of 200.5.9.0 and broken it into at
least five subnets (actually, 8 total subnets) that are able to support 30 hosts per subnet.
Example 2: A service provider has given you the Class C network range 209.50.1.0. Your company must
break the network into 20 separate subnets.
Step (2) Reserve required bits in a subnet mask and find incremental value.
n The binary value of 20 subnets tells us that we need at least 5 network bits to satisfy this require-
ment (since you cannot get the number 20 with any less than 5 bits – 10100).
n Our original subnet mask is 255.255.255.0 (Class C subnet).
n The full binary representation of the subnet mask is as follows:
255.255.255.0 = 11111111.11111111.11111111.00000000
n We must “convert” 5 of the client bits (0) to network bits (1) in order to satisfy the requirements:
n If we convert the mask back to decimal, we now have the subnet mask that will be used on all
the new networks – 255.255.255.248
n Our increment bit is the last possible network bit, converted back to a binary number:
n Start with your given network address, and add your increment to the subnetted octet:
209.50.1.0
209.50.1.8
209.50.1.16
…etc
n You can now fill in your end ranges, which is the last possible IP address before you start the
next range
209.50.1.0 – 209.50.1.7
209.50.1.8 – 209.50.1.15
209.50.1.16 – 209.50.1.23
…etc
n You can then assign these ranges to your networks! Remember the first and last address from each
range (network / broadcast IP) are unusable.
Recently, the CCENT and CCNA exams began testing subnetting skills using Class A and Class B examples.
Let me walk you through a Class B example, which is nearly identical to Class A.
Example 3: Your company would like to break the Class B private IP address range 172.16.0.0 into 60
different subnets
Step (2) Reserve required bits in a subnet mask and find incremental value.
n The binary value of 60 subnets tells us that we need at least 6 network bits to satisfy this require-
ment (since you cannot get the number 60 with any less than 6 bits – 111100).
n Our original subnet mask is 255.255.0.0 (Class B subnet).
n The full binary representation of the subnet mask is as follows:
255.255.0.0 = 11111111.11111111.00000000.00000000
n We must “convert” 6 of the client bits (0) to network bits (1) in order to satisfy the requirements:
n If we convert the mask back to decimal, we now have the subnet mask that will be used on all
the new networks – 255.255.252.0
n Our increment bit is the last possible network bit, converted back to a binary number:
n Start with your given network address, and add your increment to the subnetted octet:
172.16.0.0
172.16.4.0
172.16.8.0
…etc
n You can now fill in your end ranges, which is the last possible IP address before you start the
next range
172.16.0.0 – 172.16.3.255
172.16.4.0 – 172.16.7.255
172.16.8.0 – 172.16.11.255
…etc
n You can then assign these ranges to your networks! Remember the first and last address from
each range (network / broadcast IP) are unusable.
These subnetting examples are all you need to solve a network scenario when a specific number
of subnets are required. However, there are times when you will need to subnet and are given a specific
number of hosts. For example, you might need to break the Class C 209.50.1.0 network into smaller sub-
nets, but the subnets should accommodate at least 50 hosts per network. Let’s work through an example
using this approach.
Example 4: A service provider has given you the Class C network range 209.50.1.0. Your company must
break the network into as many subnets as possible, as long as there are at least 50 clients per network.
Step (2) Reserve required bits in a subnet mask and find incremental value.
n The binary value of 50 clients tells us that we need at least 6 client bits to satisfy this requirement
(since you cannot get the number 50 with any less than 6 bits – 110010).
255.255.255.0 = 11111111.11111111.11111111.00000000
We must ensure 6 of the client bits remain client bits (0) in order to satisfy the requirements. When reserv-
ing client bits, always reserve from right-to-left (as opposed to reserving from left-to-right, as we do with
network bits). All other bits can become network bits:
New Mask = 11111111.11111111.11111111.11 000000 note the 6 client bits that we have saved
n If we convert the mask back to decimal, we now have the subnet mask that will be used on all
the new networks – 255.255.255.192
n Our increment bit is the last possible network bit, converted back to a binary number:
n Start with your given network address, and add your increment to the subnetted octet:
209.50.1.0
209.50.1.64
209.50.1.128
209.50.1.192
n You can now fill in your end ranges, which is the last possible IP address before you start the
next range
209.50.1.0 – 209.50.1.63
209.50.1.64 – 209.50.1.127
209.50.1.128 – 209.50.1.191
209.50.1.192 – 209.50.1.255
n You can then assign these ranges to your networks! Remember the first and last address from each
range (network / broadcast IP) are unusable.
Now, let’s take a look at an example of subnetting based on a specific number of hosts with a Class B address.
Example 5: Your company would like to break the Class B private IP address range 172.16.0.0 into as many
subnets as possible, provided that they can get at least 300 clients per subnet.
n Remember, the binary representations of 8 bits (a single octet of an IP address) can only reach
255, but that does not mean we cannot cross octet boundaries when working with Class A
or B examples!
Step (2) Reserve required bits in a subnet mask and find incremental value.
n The binary value of 300 clients tells us that we need at least 9 client bits to satisfy this require-
ment (since you cannot get the number 300 with any less than 9 bits – 100101100).
255.255.0.0 = 11111111.11111111.00000000.00000000
n We must ensure 9 of the client bits (0) remain client bits (save the clients!) in order to satisfy the
requirements. All other bits can become network bits:
New Mask = 11111111.11111111.1111111 0.00000000 note the 9 client bits that we have saved.
n If we convert the mask back to decimal, we now have the subnet mask that will be used on all
the new networks – 255.255.254.0
n Our increment bit is the last possible network bit, converted back to a binary number:
n Start with your given network address and add your increment to the subnetted octet:
172.16.0.0
172.16.2.0
172.16.4.0
etc…
n You can now fill in your end ranges, which is the last possible IP address before you start the
next range.
172.16.0.0 – 172.16.1.255
172.16.2.0 – 172.16.3.255
172.16.4.0 – 172.16.5.255
etc…
n You can then assign these ranges to your networks! Remember the first and last address from
each range (network / broadcast IP) are unusable.
Finally, the last style of subnetting requires you to reverse engineer existing subnet problems. For example,
you may be troubleshooting and see a specific IP address and subnet mask assignment. You will then
need to reverse engineer the problem to find which network range the client, switch or router came from.
Let’s work through another example.
IP Address: 192.168.1.58
Subnet Mask: 255.255.255.240
Identify the original range of addresses (the subnet) that this IP address belongs to.
n When reverse engineering a problem, all you need to do is break the subnet mask back into
binary and find the increment that was used.
255.255.255.240 = 11111111.11111111.11111111.11110000
n As before, the last possible network bit is your increment. In this case, the increment is 16.
n Use this increment to find the network ranges until you pass the given IP address:
192.168.1.0
192.168.1.16
192.168.1.32
192.168.1.48
192.168.1.64 (passed given IP address 192.168.1.58)
n Now, fill in the end ranges to find the answer to the scenario:
192.168.1.0 – 192.168.1.15
192.168.1.16 – 192.168.1.31
192.168.1.32 – 192.168.1.47
192.168.1.48 – 192.168.1.63 (IP address 192.168.1.58 belongs to this range)
These six examples represent just about every subnetting style that you will encounter on the CCENT and
CCNA exams. Before we get into the final method of subnetting, let me add some side information that
will help in everything TCP/IP.
1. Subnet masks can be represented in decimal notation or bit notation. Thus far, we have seen
them in decimal notation, such as 255.255.255.240. However, you can also write a shorthand ver-
sion of this subnet mask by using bit notation. Bit notation is simply a forward slash - / followed
by the number of network bits (1s) in the subnet mask. For example:
255.255.255.240 = 11111111.11111111.11111111.11110000
There are 28 network bits in this subnet mask, so we can write it as a /28.
Bit notation is usually combined with IP addresses, so writing 192.168.1.0/28 tells you what the
network is and what the current subnet mask in use is.
2. There may be times where you are required to know how many hosts can exist on a network
when given a certain subnet mask. For example, you may have subnetted a Class B subnet mask
(255.255.0.0) to a custom subnet mask of 255.255.254.0. This provides rather large networks (as
seen previously in Example 5), but you want to know just how many hosts are allowed on each
network. You can find this by using the formula (2 ^ x) – 2, where x represents the number of
host bits. For example:
255.255.254.0 = 11111111.11111111.11111110.00000000
As you can see, there are 9 host bits (0s) in this subnet mask, so you can use the formula (2^9) – 2
to find that there are 510 valid host IP addresses per network.
3. There may be times where you are required to know how many subnets can exist when given a
certain subnet mask. For example, you may have subnetted a Class B subnet mask (255.255.0.0)
to a custom subnet mask of 255.255.254.0. You want to know just how many subnets can be
created by using this custom subnet mask. You can find this by using the formula (2 ^ x), where x
is the number of subnet bits. For example:
255.255.254.0 = 11111111.11111111.11111110.00000000
As you can see, there are 7 subnet bits (1s added to the original Class B subnet mask), so you can
use the formula (2^7) to find that there are 128 valid subnets.
4. Because the Cisco exam does not allow you to use a calculator, finding large powers of 2 can be
time consuming. As a time saving measure, remember that the original values we used for
subnetting are indeed powers of two:
a. 2^0 = 1
b. 2^1 = 2
c. 2^2 = 4
d. 2^3 = 8
e. 2^4 = 16
f. 2^5 = 32
g. 2^6 = 64
h. 2^7 = 128
So, you already know the first 8 powers of two off the top of your head; to find anything larger,
just start from 2^7 and keep multiplying by 2 (i.e. 2^8 = 256, 2^9 = 512 and so on).
Now we can move into the final type of subnetting. This type of subnetting does not really introduce any
new concepts but, rather, combines multiple subnet problems into one. This is known as Variable Length
Subnet Masking (VLSM). With VLSM, you can change subnet masks wherever you want in your organiza-
tion. In order to use VLSM, you must be using a routing protocol that supports it. While routing protocols
will be discussed later in this guide, let me list them here as they relate directly to this topic:
RIPv1 RIPv2
IGRP OSPF
IS-IS
EIGRP
BGP
Now, let’s walk through one more subnetting scenario to explain how VLSM is used.
Example 5: The corporate network for ACME Inc. is shown in the following network diagram. The
organization wishes to subnet the Class C address 192.168.100.0/24 to fit their organization. Subnet this
Class C network using the most efficient addressing possible.
50 Users 20 Users
R1 R3
R2
20 Users
When approaching this problem, you must remember to begin with the largest subnet first. In this case, the
network of 50 users is the largest. So, let’s use the skills we’ve discussed so far to figure this out. I’ll be very
brief in my descriptions since we’ve done many examples like this already:
Step (2) Reserve required bits in a subnet mask and find incremental value.
n 50 clients require 6 host bits.
255.255.255.0 = 11111111.11111111.11111111.00000000
192.168.100.0
192.168.100.64
n We can stop after we find a single range since our network diagram shows only one network of
50 users. Let’s fill in the end range.
192.168.100.0 – 192.168.100.63
192.168.100.64
The single subnet (in bold) is the only large subnet we need. Now, with VLSM, we can move on and find
the subnet mask for the next largest subnet: 20 users.
Step (2) Reserve required bits in a subnet mask and find incremental value.
255.255.255.0 = 11111111.11111111.11111111.00000000
n Since 192.168.100.0 – 192.168.100.63 are used in our 50-user network, the first two network
ranges are not usable. We need to pick up where the last subnet problem left off:
n We can stop after we find two ranges since our network diagram shows two networks of 20 us-
ers. Let’s fill in the end range.
192.168.100.64 – 192.168.100.95
192.168.100.96 – 192.168.100.127
192.168.100.128
The two subnets (in bold) will be used to address the networks of 20 users. Now, we can move on to the
final piece of the equation: the WAN links. Each WAN link has two host addresses (one for each router).
Step (2) Reserve required bits in a subnet mask and find incremental value.
255.255.255.0 = 11111111.11111111.11111111.00000000
n Since 192.168.100.0 – 192.168.100.127 are used in our 50- and 20-user networks, we need to pick
up where the last subnet problem left off.
192.168.100.128
192.168.100.132
192.168.100.136
192.168.100.140
n We can stop after we find three ranges since our network diagram shows three WAN links. Let’s
fill in the end range
192.168.100.128 – 192.168.100.131
192.168.100.132 – 192.168.100.135
192.168.100.136 – 192.168.100.139
192.168.100.128
Now we can assemble all this subnet information into one, big VLSM network diagram:
192.168.100.132 - 135/30
50 Users 20 Users
R1 R3
20 Users
192.168.100.64 - 95/27
Beautiful! The last thing I will say to wrap up this section is that subnetting is not a skill you can master
overnight. It will take plenty of practice to sharpen your skills. Google can be your best friend for finding
subnetting practice.
n Assigning passwords
I have bolded the key information from the boot process. Just by watching the router boot, we can ob-
serve the following:
Just as with the switch, after the initial boot, the router prompts us to enter initial configuration dialog.
Because of this question, we can tell that the router does not have any existing configuration. You should
always answer “no” to the initial configuration dialog.
Once you have come to a user-mode prompt on the router, it is always best to move directly to privileged
mode and enter a command such as show run or show ip interface brief to become familiar with the
exact interfaces of the router:
Router>enable
Router#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Serial0/0 unassigned YES unset administratively down down
From this output, we can determine that the router has two interfaces: FastEthernet 0/0 and Serial 0/0. This
would be excellent to document for future reference.
Assigning Passwords
Just as with a switch, you must assign passwords at multiple levels on a Cisco router. Use the following
commands to accomplish this:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line console 0
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#exit
Router(config)#line vty 0 4
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#end
Router#
n line console 0 – Moves from global configuration mode into line configuration for the console port.
n line vty 0 4 – Moves from global configuration mode into line configuration for the Virtual Ter-
minal (VTY) lines. These VTY lines receive Telnet and SSH connections. Most Cisco devices allow
up to five simultaneous Telnet/SSH connections. Typing line vty 0 4 configures all five of these
ports at the same time.
n password <password> - Sets the password for the console or VTY lines. In our example, you
must now type the password “cisco” to get into user mode from the console or VTY lines.
n login – Requires logins to the port. If you enter the password command without entering the
login command, the user will never be prompted for the password, even though you have one
set, since logins are not required. Note: the login command exists by default under VTY lines but
must be entered under the console line.
After performing the previous configuration, the User mode is now protected on your Cisco router. We
now need to protect the transition from User mode to Privileged mode (accomplished by typing the
enable command). Just as with the switch, this can be accomplished using the enable secret or the en-
able password command. Because the enable password is stored in the running configuration without
encryption, most opt to use just the enable secret command, as shown below:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Neo
Neo(config)#
For legal purposes, it’s always good to have a logon banner on all Cisco devices. To configure a logon ban-
ner (known as a Message of the Day or MOTD banner in the Unix/Cisco realm), use the following syntax:
Neo(config)#banner motd %
Enter TEXT message. End with the character ‘%’.
*************************************************************
This is a private system. Unauthorized access prohibited.
*************************************************************
%
Neo(config)#
The banner motd <delimiter> command is fairly straightforward. Keep in mind that the delimiter charac-
ter can be any character you wish. It simply marks the start and end of your logon banner; in my example, I
chose to use the percent (%) since I did not plan to use that character anywhere in the logon banner.
Neo#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Neo(config)#username Jeremy password cisco
Neo(config)#ip domain-name preplogic.com
Neo(config)#crypto key generate rsa
The name for the keys will be: Neo.preplogic.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.
Neo(config)#
01:06:57: %SSH-5-ENABLED: SSH 1.99 has been enabled
Neo(config)#line vty 0 4
Neo(config-line)#login local
Neo(config-line)#transport input ssh telnet
Because this is identical to the switch configuration for SSH, refer back to the section entitled “Working
with Cisco Switches” for a deeper description of these commands.
n Must be assigned an IP address on a different network than other interfaces on the router
For our configuration, we have been given the following network diagram:
S0/0 - 200.5.9.22/30
Neo
F0/0 - 172.30.2.180/24
To configure this scenario, move to global configuration mode and enter the following commands:
Neo(config)#interface fa0/0
Neo(config-if)#ip address 172.30.2.180 255.255.255.0
Neo(config-if)#speed 100
Neo(config-if)#duplex full
Neo(config-if)#no shutdown
Neo(config-if)#exit
Neo(config)#interface s0/0
Neo(config-if)#ip address 200.5.9.22 255.255.255.252
Neo(config-if)#no shutdown
For this scenario, I am assuming the switch the Neo router is connected to is also set to a hardcoded speed
of 100Mbps and full duplex.
Let’s start off by configuring our Cisco router to support the SDM GUI:
n ip http server – enables the HTTP server functionality on your router (the SDM is accessed
through a web interface). Note: you can also enter the command ip http secure-server to en-
able HTTPS encrypted functionality when using the SDM.
n ip http authentication local – instructs the router to use the local user database when authen-
ticating users attempting to access the SDM interface.
n username Jeremy secret cisco – adds the user account “Jeremy” with an encrypted password of
“cisco” to the local user database used for authentication with the SDM.
n username Jeremy privilege level 15 – gives the user account “Jeremy” full, privileged access to
the router. This type of user account is necessary for the SDM.
n privilege level 15 – gives instant privileged-level access to user accounts that successfully
authenticate through the VTY ports of the router. This is necessary since the SDM accesses the
router through the VTY ports and entering commands while you are doing the configuration
through the SDM GUI.
n login local – instructs the VTY lines to use the local user database on the router for authenticat-
ing users rather than the password entered under the VTY lines.
Your router is now ready to be accessed using the SDM graphic interface. To download this software, you
must have a Cisco CCO account with the necessary privileges. After the software has been downloaded
and installed, you can double-click the Cisco SDM to access the router of your choice:
Once you click the Launch button, you will be prompted for the authentication credentials you entered in
the previous router configuration. In this case, I entered the username of Jeremy and a password of cisco.
The Cisco SDM main window then opens.
From this initial window, you can get an overview of your router’s configuration and operational status.
Once you have arrived here, click the Add button at the top of the screen. In the new window that appears,
you can configure the scope of DHCP addresses you would like to hand out to fit your specific network. I
have configured a sample in the following figure:
Once you have configured the DHCP scope, you can click the OK button. Depending on the options you chose
in the Cisco SDM window, you can have the router generate a preview of the commands it will be sending to
the Cisco router. This is not only a way to verify the configuration but a powerful method of learning the com-
mand-line syntax to accomplish many of the features the SDM GUI performs in the click of a button.
n Telnet – convenient, widely available, very insecure protocol (all data sent in clear-text).
n SSH – not-as-convenient or widely available, but very secure protocol (all data encrypted).
While we have already discussed the configuration of a Cisco router to support these remote management
protocols, we have not discussed their use on a Cisco router. Say we had the following network configuration:
192.168.1.1 172.16.0.2
S1 S2
R1 R2
192.168.1.100 10.100.1.100
172.16.0.1 10.100.1.1
You have telnetted to R1 from your laptop PC and would like to access R2. You can accomplish this by
entering the following command from privileged mode:
R1#telnet 172.16.0.2
Trying 172.16.0.2 … Open
You have now opened a Telnet session from R1 to R2. From here, you can make any changes to R2 that are
necessary. Once you are finished with the telnet session, you can simply type exit from privileged mode
to close it out. However, there are many times when you may want to temporarily suspend a telnet session
to do some work on a previous device. For example, you may be accessing the R2 router and need to get
back to R1 without completely closing the current telnet session. To accomplish this, use the following
keystroke: <ctrl + shift + 6>, followed by x. For example:
R2>enable
R2#configure terminal
R2(config)#(<ctrl + shift + 6>, x pressed here)
R1#
As soon as you type this suspend keystroke, you are immediately taken back to the previous router. You
can always verify what open sessions you have by typing the command show sessions:
R1#show sessions
Conn Host Address Byte Idle Conn Name
* 1 172.16.0.2 172.16.0.2 0 0 172.16.0.2
R1 currently has a single open session to R2 (172.16.0.2). From here, you could telnet to other locations
from R1 or resume your connection to R2. To resume the connection, simply type the command resume
<connection number> from privileged mode. In this case, the connection number (shown as “Conn” in the
show sessions output) is 1.
You can also enter the show users command to verify if anyone is telnetted into your router. For example,
if you were to enter the show users command on R2, you would get the following output:
R2#sh users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
11 vty 0 idle 00:02:32 172.16.0.1
This verifies that R1 (172.16.0.1) is currently accessing R2 on the VTY 0 port. So, to summarize:
n show running-config – contains every command entered into the configuration of the
Cisco router.
n show interfaces – verifies key information about a specific interface of the router.
The key information from this output is bolded above and discussed below:
n FastEthernet0/0 is up, line protocol is up – Verifies the Physical and Data Link layer operation
of the interface.
n Full-duplex, 100Mb/s – Verifies the duplex and speed settings of the interface.
Furthermore, the packet statistics shown at the bottom of the output can aid in troubleshooting poorly
performing interfaces.
192.168.1.50 10.0.1.10
192.168.1.1 172.16.0.2
R1 R2
172.16.0.1 10.100.1.1
192.168.1.51 10.0.1.11
After you placed a base configuration (passwords, IP addresses, etc…) on R1, it would be able to success-
fully reach only directly-connected networks (192.168.1.0/24 and 172.16.0.0/24, assuming Class C subnet
masks). R1 could not reach the network behind R2 (10.100.1.0/24). Likewise, if R2 had this same base con-
figuration, it could not reach the 192.168.1.0/24 network behind R1. In order to fix this dilemma, we have
to use some form of routing.
In the Cisco realm, there are two forms of routing that exist:
n Static Routing – A form of routing which requires administrators to manually enter the destina-
tion network and the path to reach that destination.
n Dynamic Routing – A form of routing that allows the routers to communicate and exchange
network information.
Most networks will use some combination of static and dynamic routing to accomplish their goals.
Let’s put this general syntax to practice through an example. Looking at the network diagram on the pre-
vious page, we could create a fully routed network through the following two commands:
Notice first that we are adding two separate routes on two separate routers. We tell R1, “to reach the
10.00.1.0/24 network, go to the IP address 172.16.0.2 (which is R2).” We tell R2, “to reach the 192.168.1.0
network, go to the IP address 172.16.0.1 (which is R1).”
Static routing is one of the simplest methods you can use to configure routing on small networks. How-
ever, when the number of networks grow in your organization, static routing can become quite inefficient.
Regardless of how large your organization grows, static routing is almost always used for one specific con-
figuration in your network: the default route. Default routes are typically used to reach the devices on the
Internet. Because the Internet routing table is over 100MB in size, most routers simply don’t have enough
memory to handle it. Likewise, a complex understanding of the Border Gateway Protocol (BGP, the routing
protocol of the Internet) is required to manage a router with the Internet routing table.
Internet
200.5.1.1/30
ISP
200.5.1.2/30
R1
Your router, R1 on the left, needs to be able to route traffic to the internet. To accomplish this, you can
enter the following configuration:
This statement tells R1 to send all traffic that does not have a more specific destination in the routing table
off to the ISP router.
Exterior routing protocols (EGPs) work on the Internet, connecting organizations together.
Distance vector routing protocols send the entire routing table on a specific time inter-
val. In the case of RIP, this interval is once every 30 seconds. Changes to the routing table
replicate to all routers in the network. These routing protocols are easy to configure.
Link state routing protocols send route updates only when changes occur to the rout-
ing table. In a well-designed network, updates do not need to be sent to every router
and can be constrained to the area where the network change occurred. These routing
protocols take more technical knowledge to configure accurately.
Hybrid routing protocols try to combine the best features of distance vector and link
state routing protocols into a single routing protocol. Unfortunately, hybrid routing
protocols are proprietary.
Classful routing protocols do not send subnet mask information in routing updates. If
R1 were running a classful routing protocol and sending a routing update about the
10.1.1.0/24 network to R2, it would only send an update containing “10.1.1.0” (no /24 mask
attached). Because of this, all routers must use the same subnet mask for the network.
Classless routing protocols send subnet mask information in routing updates. Using
the same scenario, R1 would advertise the 10.1.1.0/24 network to R2, so R2 is not left to
guess on the subnet mask.
While it would be nice to custom-pick our own criteria to create our own routing protocol, we must
choose from one of the following options (at the CCNA level):
The last item you should know before we get into the routing protocols themselves is the idea behind
administrative distance (AD). AD represents the believability of a routing protocol. Each routing protocol is
assigned an AD number; the lower that number, the more believable the routing protocol becomes. This
way, a router is able to choose one route over another. For example, if R1 received two routing updates,
one from RIP and the other from OSPF, about the 10.1.1.0/24 network, the router would need a way to
choose one update over the other. The following table is what routers use to decide:
Connected Interface 0
EIGRP 90
OSPF 110
In the case we just discussed, R1 would choose the OSPF protocol over the RIP protocol since it has a lower
administrative distance (110 vs. 120).
n RIP uses hop count as a metric. Each router that traffic passes through is considered a hop. If R1
was attempting to reach the 192.168.2.0/24 in the following figure, it would always choose the
56-Kbps Frame Relay circuit if configured with the RIP protocol.
FastEthernet
S1 S2
R1 R2 R3
192.168.1.0/24 192.168.2.0/24
56-Kbps
Frame Relay
172.16.1.0/24
.1 .1 .2 .1
R1 R2
192.168.1.0/24 10.1.1.0/24
By default, R1 is able to reach the 192.168.1.0/24 and 172.16.1.0/24 networks since they are directly con-
nected; it is not able to reach the 10.1.1.0/24 network. Likewise, R2 is not able to reach the 192.168.1.0/24
network. If you were to configure RIPv2 to solve this scenario, you could use the following syntax:
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 192.168.1.0
R1(config-router)#network 172.16.0.0
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 10.0.0.0
R2(config-router)#network 172.16.0.0
That’s all there is to it! I want to call your attention to the network statements in this syntax. These net-
work commands accomplish two things:
So, if you look at R1, RIP will begin running on the 192.168.1.1 interface, since this is part of the 192.168.1.0
network. R1 will also advertise the 192.168.1.0 network to its neighbors. Pay special attention to the next
network command: network 172.16.0.0. First off, this allows RIP to run on the 172.16.1.1 interface and
allows RIP to advertise the 172.16.1.0 network. A common question is, “Why didn’t you enter the command
network 172.16.1.0 instead of network 172.16.0.0?” This is because the original design of RIP was in a
classful sense. When entering network statements with RIP you MUST enter the original class of address. Since
172.16.1.0/24 was originally a Class B address, we enter it as 172.16.0.0.
The same thing can be seen for the 10.1.1.0/24 network on R2; the network statement is entered as
10.0.0.0 since this network was originally a Class A address. If you make a mistake on this on a real router,
the router will fix the network statement for you (adjust it back to the original class of address). If you
make a mistake like this on the CCENT or CCNA exam, you will lose points!
The RIP protocol can be verified through the use of the following three commands:
n show ip protocols – verifies the status of all routing protocols active on the router.
n show ip route – verifies the current entries in the routing table. RIP should begin populating the
routing table after configuration.
n debug ip rip – allows you to see RIP updates as they are sent and received.
The following RIP output is generated from configuring the routers in the prior configuration example:
R1#show ip protocols
Routing Protocol is “rip”
Sending updates every 30 seconds, next due in 7 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Based on the output from the show ip protocols command, you are able to determine how often updates
are being sent, the interfaces running RIP and which version of RIP they are running, the networks you are
routing, and the neighboring routers on the segment.
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2
ia - IS-IS inter area, * - candidate default, U - per-user static
route
o - ODR, P - periodic downloaded static route
The above routing table verifies that RIP is correctly advertising the networks. Notice that the 10.1.1.0/24
network is advertised as 10.0.0.0/8. This is due to a feature known as auto-summarization. This feature
attempts to shrink routing tables by summarizing networks back to their classful boundaries. Most people
disable this feature by entering the command no auto-summary under the RIP routing process.
R1#debug ip rip
RIP protocol debugging is on
00:35:09: RIP: received v2 update from 172.16.1.2 on Serial1
00:35:09: 10.0.0.0/8 via 0.0.0.0 in 1 hops
00:35:15: RIP: sending v2 update to 224.0.0.9 via Ethernet0 (192.168.1.1)
00:35:15: RIP: build update entries
00:35:15: 10.0.0.0/8 via 0.0.0.0, metric 2, tag 0
00:35:15: 172.16.0.0/16 via 0.0.0.0, metric 1, tag 0
00:35:15: RIP: sending v2 update to 224.0.0.9 via Serial1 (172.16.1.1)
00:35:15: RIP: build update entries
00:35:15: 192.168.1.0/24 via 0.0.0.0, metric 1, tag 0
After executing the debug command above, we can see that the RIP process received an update about the
10.0.0.0/8 network and then sent an update about the 192.168.1.0/24 network to the neighboring router.
n Fast, Efficient Routing Algorithm – EIGRP uses the Diffusing Update Algorithm (DUAL), which
allows it to quickly identify backup paths in the network should a primary route fail. In addition,
DUAL is far more processor and memory efficient than the Shortest Path First (SPF) algorithm,
which powers the OSPF and IS-IS link state routing protocols.
n Routing for multiple network-layer protocols – While not as huge of a feature as it used to be,
EIGRP can route for other network layer protocols such as IPX, IPv6 and Appletalk.
n Auto or manual route summarization – EIGRP can increase routing table efficiency by summa-
rizing multiple, more specific routing table entries into a broader, summarized route entry. This
can be done automatically (through the auto-summarization feature) or manually at any point in
the network.
n Unequal load balancing – While all other routing protocols can only load balance over equal
cost links, EIGRP can load balance accurately over unequal cost links. For example, if an organiza-
tion had a 3 Mbps and a 1.5 Mbps link connecting between offices, EIGRP could accurately use
both links at the same time, sending double the amount of data over the 3 Mbps link.
n Multicast support – All EIGRP routing information is exchanged between neighbors using mul-
ticast, which is more efficient than using broadcast or multiple unicast messages.
n Sophisticated metric – EIGRP uses the configured bandwidth and delay on interfaces to find
the best way around the network. Other routing protocols only use a single metric, such as Hop
Count (RIP) or Cost (OSPF).
n Neighbor table – contains a list of all neighbor relationships an EIGRP router has formed with
other routers.
n Topology table – contains a list of all routes that exist in the network. The primary routes are
identified as successor routes, the backup routes are identified as feasible successor routes.
n Routing table – contains a list of the best routes in the network. These routes were identified as
successor routes in the topology table.
To demonstrate the configuration of EIGRP, we will use a network diagram identical to the RIP configura-
tion. This will help show some of the differences between the EIGRP setup and the RIP setup.
172.16.1.0/24
.1 .1 .2 .1
R1 R2
192.168.1.0/24 10.1.1.0/24
The initial configuration of EIGRP looks nearly identical to the initial configuration of RIP:
R1(config)#router eigrp 90
R1(config-router)#network 192.168.1.0
R1(config-router)#network 172.16.0.0
R2(config)#router eigrp 90
R2(config-router)#network 10.0.0.0
R2(config-router)#network 172.16.0.0
The initial, subtle difference you may notice is the number following the router eigrp command. This num-
ber represents the autonomous system. In order for routers to exchange routing information, they must be a
part of the same autonomous system. In this case, I chose the number 90 for the autonomous system number.
The network commands work exactly the same as RIP. This is because Cisco wanted to make EIGRP as
simple as the RIP protocol to configure. However, in order to support some of the advanced features of
other routing protocols, Cisco also gives you the opportunity to use wildcard masks (also known as inverse
masks) with your network statements. Wildcard masks give you the ability to specify exactly what interfac-
es you would like to use with the EIGRP routing protocol. For example, on both R1 and R2, we entered the
command network 172.16.0.0. This starts the EIGRP process on any interface originally belonging to the
class B 172.16.0.0 network. In our case, the WAN links were identified as these interfaces. However, perhaps
there were other interfaces on R1 and R2 (not shown in the diagram) that were assigned a 172.16 address
that we did not want to run EIGRP. We can use the wildcard mask to be more specific. For example,
we could enter the following network statements:
This instructs R1 and R2 to run EIGRP on any interface that starts with 172.16.1 rather than just any in-
terface that starts with 172.16. This allows us to be more specific. In general, wherever you see a zero in a
wildcard mask, it means “look at these numbers.” Wherever you see 255 (or binary 1s) in a wildcard mask, it
means “ignore these numbers.” For example:
“Look at these”
“Ignore these”
This network statement says “run EIGRP on any interface having an IP address that begins with 172.16.1…
but I don’t care what is in the last octet of the IP address.” So, R1 looks at its interfaces and sees a 172.16.1.1
IP address which matches the filter. R2 looks at its interfaces and sees a 172.16.2.1 IP address which
matches the filter. We could have even been more specific with the wildcard mask statements:
These types of wildcard masks are commonly used to identify exactly the interface you would like to run
EIGRP. Finally, we could have been extremely broad:
This would start EIGRP on any interface assigned an IP address beginning with 172. A network statement
such as network 0.0.0.0 255.255.255.255 would start EIGRP on all interfaces of a router. This is not
suggested since it may cause interfaces to begin running EIGRP before they are completely configured.
Wildcard masks will be seen again in both the OSPF routing protocol and access-lists.
After we have enabled EIGRP in the previous network, we can verify its operation by viewing the routing table:
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2
ia - IS-IS inter area, * - candidate default, U - per-user static
o - ODR, P - periodic downloaded static route
The routing table on R1 verifies the 10.0.0.0/8 network advertised by R2. It is received this way because of the
auto-summarization features that are on with EIGRP. The auto-summarization feature enables itself anytime
one class of network is advertised over a different classful network. In our example, the 10.1.1.0/24 network
(by default, a Class A network) was advertised over the 172.16.1.0/24 network (a different class of network),
so EIGRP summarized it back to the classful boundary of 10.0.0.0/8. If the link between R1 and R2 would have
been a subnet of the 10.0.0.0/8 network, auto-summarization would not have engaged.
Anytime you see something with “auto” in its name on a Cisco device, you should immediately think
“I auto-not use this.” It is generally considered a good practice to disable auto-summarization and put
manual summary routes where you deem necessary. To disable auto-summarization, simply go to both R1
and R2 and enter the following command from router configuration mode:
R1(config-router)#no auto-summary
R2(config-router)#no auto-summary
Once you do this, you can verify the routing table again:
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2
ia - IS-IS inter area, * - candidate default, U - per-user static
route
o - ODR, P - periodic downloaded static route
As you can see, the 10.0.0.0/8 entry has been replaced by the more specific 10.1.1.0/24 entry.
In addition to the show ip route command, you can use the following commands to verify the
operation of EIGRP:
n show ip protocols – verifies the configured parameters and current state of EIGRP.
n show ip eigrp neighbors – verifies the currently formed neighbors also running EIGRP and
their status.
n show ip eigrp topology – displays the contents of the EIGRP topology table.
The following are examples of these show commands on the previous topology we configured:
R1#show ip protocols
Routing Protocol is “eigrp 90”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 90
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
172.16.0.0
192.168.1.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:13:51
172.16.1.2 90 00:06:27
Distance: internal 90 external 170
Based on the previous output, you are able to verify the network statements configured, the EIGRP au-
tonomous system number and the neighbors (routing information sources) EIGRP has formed.
This output represents the EIGRP neighbor table. While much can be gleaned from this output, the
primary focus is on the neighbor address, the interface to which the neighbor is connected and the Hold
timer. The Hold timer represents how long until the neighbor is considered dead. Since EIGRP sends Hello
packets once every 5 seconds and neighbors are considered dead if they miss three consecutive Hellos,
the Hold timer will fluctuate between 10 – 15 seconds. Only if a Hello packet is missed will the Hold timer
drop below 10 seconds.
The previous output represents the EIGRP topology table. All routes are marked (P)assive, which is good. If
the route was marked as (A)ctive, it would indicate the router is actively trying to find a replacement route
since the primary route had failed.
Finally, EIGRP also supports secure authentication of all neighbors. This prevents a rogue (intrusive, typi-
cally configured by a hacker) or invalid router from forming a neighbor relationship and infecting your
routing table with invalid routes. To configure authentication, you must first create a key chain in global
configuration mode:
The previous key chain configuration would need to be replicated on R2. The power of these key chains is
that they allow the EIGRP authentication passwords to change on a timed interval without intervention by
you as the administrator. After you have created the key chain with any number of keys, you need to apply
it to the interface where the EIGRP neighbors are located:
R1(config)#int s1
R1(config-if)#ip authentication mode eigrp 90 md5
R1(config-if)#ip authentication key-chain eigrp 90 EIGRP_AUTH
The first command applied above enables EIGRP authentication using MD5 hashing (a very secure way
of exchanging passwords). The second command links in the EIGRP_AUTH key-chain we created in global
configuration mode. This configuration would need to be mirrored on R2 in order for the authentication to
work successfully. Keep in mind that the EIGRP neighbor relationship will stop between R1 and R2 (poten-
tially causing a network outage) until authentication is applied to both routers.
OSPF functions very similarly to EIGRP in that it forms neighbor relationships by using the Hello protocol. By
default, Hello messages are sent once every ten seconds to verify that the neighboring router is still online.
Most of the complexity of OSPF comes in understanding the terminology. The following diagram repre-
sents a network design in OSPF:
Area 2
ABR
Area 1
Area 3
Area 0 (Backbone)
ABR
Autonomous System
In OSPF, you must plan your network around the idea of an area. Routers within an area all have exactly
the same routing information. As the network grows, the amount of routing information that your routers
need to maintain can become excessive, causing all the routers to run slowly. At this point, you can break
your network into multiple areas and use summary routes (identical concept to summarization in EIGRP)
to limit the amount of data in the routing tables of your routers. For example, using the previous figure,
imagine that there were 100 different routers in Area 1 that were using 172.16 addresses:
172.16.0.0/24
172.16.1.0/24
172.16.2.0/24
…
172.16.99.0/24
172.16.100.0/24
This would give quite a few entries in the routing table. This is where the summarization function of the
Area Border Router (ABR) comes in. OSPF ABRs have the unique capability of summarization between
areas. No other router within the OSPF system can perform summarization. In our example, we could
implement summarization like this:
172.16.0.0/24
172.16.1.0/24
172.16.2.0/24
...
172.16.100.0/24
Area 1 172.16.0.0/17
Area 0 (Backbone)
By using the summary route 172.16.0.0/17, we encompass the IP addresses 172.16.0.0 – 172.16.127.255,
most of which are represented in Area 1. For all the routers in the backbone area (and other OSPF areas),
the massive network in Area 1 is summed up in a single route table entry. While the ability to perform
route summarization is not currently a CCENT or CCNA topic, it undoubtedly will be soon. Even though
an in-depth understanding of route summarization is not required, the CCNA exam does require you to
understand the reasoning behind OSPF area design.
Because the CCNA exam focuses on single-area OSPF configuration, we can use our previous topology to
demonstrate the configuration of OSPF:
172.16.1.0/24
.1 .1 .2 .1
R1 R2
192.168.1.0/24 10.1.1.0/24
Area 0 (Backbone)
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 172.16.1.0 0.0.0.255 area 0
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 172.16.1.0 0.0.0.255 area 0
R2(config-router)#network 10.1.1.0 0.0.0.255 area 0
While this is very similar to the EIGRP configuration, there are a few subtle differences. First, the number
following the router ospf command represents a process-id. This is just a number to identify the OSPF
process on the router; it does not need to be the same on every router (though it usually is).
Second, we see the new router-id command. This command is used to set the “name” of the router to the
OSPF process. This name is advertised in the Hello packets and is used for the more advanced configurations
which are part of the CCNP track. If you do not manually set the router-id, it will default to the highest IP
address on the router (with loopback interfaces beating physical interfaces). It’s always best to hardcode this
under the OSPF process; it can be any IP address you want, as long as it’s unique in the OSPF network.
Finally, the network command works nearly the same as the network command in EIGRP. The two subtle
differences are the absolute requirement of using wildcard masks (the network command will not work
without a wildcard mask). You must also specify the OSPF area to which the network belongs. At the CCNA
level, you can expect only OSPF single-area configurations.
Once you have this basic configuration implemented, OSPF is running. We can verify the configuration
using similar commands:
R2#show ip protocols
Routing Protocol is “ospf 1”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 2.2.2.2
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.1.0 0.0.0.255 area 0
172.16.1.0 0.0.0.255 area 0
Routing Information Sources:
Gateway Distance Last Update
1.1.1.1 110 1d22h
2.2.2.2 110 1d22h
Distance: (default is 110)
Based on the output of the show ip protocols command, we are able to see that OSPF is running, the
networks and areas it is advertising and the routing information sources (neighboring routers).
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
As you can see from the routing table, routes are now being learned by the (O)SPF protocol.
Finally, the show ip ospf neighbor command is perhaps the handiest troubleshooting command. There
are many things that can prevent an OSPF neighbor relationship from forming. The following is a brief list
of the most common issues:
n Hello or Dead Timer Mismatch – If one neighboring router sends Hello messages on a different
timer (10 seconds is the default), neighbor relationships will not form. Dead timers must also
match between neighbors.
n Area Mismatch – Neighbors cannot form if they are configured in different areas.
n Password Mismatch – If you are using authentication with OSPF, neighbors must have the
same password.
R1(config)#interface serial 1
R1(config-if)#ip ospf authentication message-digest
R1(config-if)#ip ospf authentication-key password
R2(config)#interface serial 1
R2(config-if)#ip ospf authentication message-digest
R2(config-if)#ip ospf authentication-key password
As long as the two routers have the same authentication-key (password, in this case), the OSPF neighbor
relationship will form.
n Understanding VTP
In a network environment like that pictured in the previous figure, a network administrator runs into the
following challenges:
n Unbounded Broadcast Domains – As devices are added, the number of broadcasts increases
significantly. This causes more processor load for all devices connected to the network.
n Security Vulnerabilities – Layer 2 security measures are extremely limited when it comes to
preventing hosts on the same LAN from fully accessing each other.
n Unknown MAC addresses – The switches continually learn new MAC addresses as old entries
age out simply because of the size of the network. This further increases the amount of broad-
casts on the network since switches will flood packets that have unknown MAC addresses.
n Management difficulties – A flat, switched network has very limited management and monitor-
ing support. Isolating and fixing problems in this type of network can be very time consuming.
VLANs can help with these issues. VLANs have the ability to divide the network into separate domains. The
best description of a VLAN that I’ve ever seen is this:
Trunk
In the figure above, there are two VLANs: VLAN 10 (the blue VLAN) and VLAN 20 (the green VLAN). When a
user in VLAN 10 sends a broadcast, it will remain in VLAN 10. The same idea is true for a broadcast sent in
VLAN 20. Each VLAN is assigned its own subnet. VLAN 10 devices use IP addresses from the 172.16.10.0/24
subnet. VLAN 20 devices use IP addresses from the 172.16.20.0/24 subnet.
Notice also the link between the switches. In order for broadcasts from the green and blue VLANs to reach
devices connected to both switches, the switches must forward traffic from both VLANs to each other.
This special type of port is known in the Cisco realm as a trunk port. A trunk port forwards all VLAN traffic
between switches. Other switch vendors refer to these ports as tagged ports. They call them tagged ports
for a good reason: in order for switches to send each other frames from multiple VLANs, each frame must
be “tagged” with a VLAN identifier.
The protocol that performs this “tagging” is known as 802.1Q. It is an industry standard tagging protocol,
so you could have a Cisco switch connected to some other vendor switch and still use VLANs between
them. The 802.1Q tags are always removed before sending the data to a connected PC (the end devices do
not have any concept of VLANs; VLANs are just a managed switch configuration).
Understanding VTP
Because VLANs are a network-wide configuration, Cisco created a proprietary protocol known as the VLAN
Trunking Protocol (VTP). This is the most horrific name Cisco could have chosen since VTP is not a trunking
protocol at all but, rather, a replication protocol that works over trunk links. The goal of VTP is to replicate
VLANs that you create from one switch to another so you don’t have to visit (and configure) every switch
in your network anytime a VLAN needs to be added or removed.
The concept behind VTP is simple: perform additions and deletions of VLANs from a switch in your net-
work. That switch will then replicate the changes to all the other switches in your network which will then
perform the same configurations. The following are some key facts you’ll want to know about VTP:
n In order for switches to exchange VTP information, they must be in the same VTP domain. The
VTP domain name is defined by you on each switch in the network. The VTP domain name is also
case sensitive.
n There are three VTP modes:
VTP Server – Every switch is a VTP Server by default. These switches have the authority
to create, delete and modify VLAN information. They then replicate that information
to the other switches in the VTP Domain. It is best to only have one VTP Server in your
switched network.
VTP Client – By converting a switch to VTP Client mode, it is no longer able to make
any changes to the VLANs in the network. It can only receive and apply updates from
the VTP Server.
VTP Transparent – VTP Transparent mode switches do not participate at all in VTP. By
changing a switch to this mode, you effectively disable VTP. VLANs can still be created
on the switch, but they do not replicate anywhere else in the network.
Since you can have multiple VTP Servers in the network, changes to the VLAN information is tracked by a
VTP Revision Number. Each time the VLAN database is modified (by adding or deleting a VLAN), the switch
will increment its VTP Revision Number. The new revision is then advertised out to other switches which
replace their VLAN database with the new revision.
VTP Server
Rev #23
VTP Domain
VTP Rev #23 PrepLogic VTP Rev #23
n VTP and VLAN information is not stored in NVRAM but, rather, in a file in flash called vlan.dat.
Therefore, if you want to completely clear a switch’s configuration, you must do three things:
Enter erase startup-config (or write erase) to erase the switch’s configuration in NVRAM.
n A brand new switch with no VTP configuration will automatically become a part of the first VTP
Domain it hears about through VTP advertisements.
The above syntax assumes you would want the first 22 ports of your switch assigned as access ports,
which connect to end devices. These ports will never become trunks.
The above syntax assumes you would want port 23 and 24 of your switch to become trunk ports. The
first command (switchport trunk encapsulation dot1q) may not be necessary on newer switches since
support for the ISL trunking protocol (which was Cisco proprietary) is being phased out. On these newer
switches, you would simply enter the switchport mode trunk command since only one encapsulation
type is supported. Once you have configured your trunk ports, you can verify their operation by typing the
command show interfaces <interface> switchport as shown below:
The key output to verify your trunk configuration is bolded above. The “Administrative” sections dictate the
configuration of the interface. This could be set to “dynamic desirable,”“trunk” or “access.” The “Operational”
sections dictate what the interface is currently using. For example, you might have a “dynamic desirable”
administrative mode, but the operational mode is “access” if an end device connects to the port.
Once you have configured your trunk ports, you can then set up VTP.
Cisco recommends that you configure a single VTP Server in your network and set the rest of the switches
to be VTP Clients. VTP passwords can also be assigned to further protect the VTP domain. To verify your
VTP configuration, use the command show vtp status:
From the prior output, you can verify that this switch is configured as a VTP Server in the VTP domain
PREPLOGIC (all other switches must use this domain name with the correct case). We can also verify that
no (zero) revisions (which are additions/deletions) have been made to the VLAN database since this switch
became a VTP Server since the “Configuration Revision” is set to 0.
Lastly, we need to create VLANs and assign ports to those VLANs. The following configuration creates
three VLANs
Switch(config)#vlan 10
Switch(config-vlan)#name SALES
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name MARKETING
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#name ENGINEERING
The name on the VLAN is optional, but extremely helpful when you are trying to identify each VLAN. Now
that the VLANs are created, you can assign ports to each VLAN:
You can verify the VLAN assignment by using the command show vlan. I prefer to follow that command
with the brief variable to shorten the output:
Notice from this output that ports Fa0/23 and Fa0/24 are missing. This is because they have been config-
ured as trunk ports, which are not part of any one VLAN.
We have now created VLANs and assigned the ports. The ports that are assigned to separate VLANs can no
longer access each other.
VLAN 10 VLAN 20
172.16.10.25 172.16.20.25
Fa0/1 Fa0/0
172.16.10.1/24 172.16.20.1/24
If the left half of the switch in the previous figure were assigned to VLAN 10 and the right half were as-
signed to VLAN 20, the router would need one port for each VLAN. If the clients needed to get between
the VLANs, they would go through the router (which would be configured as their default gateway).
The problem with this solution is scalability. As the network grows, more VLANs will be added, and you
will eventually run out of router ports, not to mention that you are using a separate port for the router
interface in each VLAN. A more practical solution is the router on a stick:
Trunk Fa0/0
Router On
A Stick
VLAN 10 VLAN 20
Fa0/0.10
172.16.10.1/24
Fa0/0.20
172.16.10.25 172.16.20.25 172.16.20.1/24
The router on a stick solution requires you to configure a trunk port from the switch to the router. Since a
trunk port forwards all VLAN traffic, we can then configure sub-interfaces on the router to respond to each
of the VLANs. The following would be a router on a stick configuration for the VLANs we previously created
(10, 20 and 30):
Router(config)#interface fa0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 172.16.10.1 255.255.255.0
Router(config-subif)#exit
Router(config)#interface fa0/0.20
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 172.16.20.1 255.255.255.0
Router(config-subif)#exit
Router(config)#interface fa0/0.30
Router(config-subif)#encapsulation dot1q 30
Router(config-subif)#ip address 172.16.30.1 255.255.255.0
Router(config-subif)#exit
The previous configuration assumes we assigned the subnets 172.16.10.0/24, 172.16.20.0/24 and
172.16.30.0/24 to VLANs 10, 20 and 30, respectively. You can create literally hundreds (perhaps even thou-
sands) of sub-interfaces on a router. The encapsulation dot1q <vlan> command applied to each sub-in-
terface assigns a VLAN number to each sub-interface. This is how the sub-interface knows to which VLAN it
should respond. The router will not allow you to assign an IP address to the sub-interface without typing this
command first. Clients in each VLAN should have the sub-interface IP address set up as their default gateway.
Distribution Distribution
Switch 1 Switch 2
The key word in this switch diagram is redundancy. Redundancy is good! If either distribution switch were to
fail, the access switches would have a backup. However, without STP, redundancy in the switch world can be
devastating. Remember, switches forward broadcast traffic out of all ports. If a device were to send a broad-
cast in this environment, the broadcast would end up looping through the entire network thousands of
times every second. This would cause a complete network outage until all the redundant links were removed.
Thus, we have discovered the goal of STP: disable the redundant links until they are necessary.
While the goal may seem like a simple task, the size of today’s networks has made STP quite complex. STP
is designed to allow only one active path at a time. To accomplish this, switches exchange Bridge Protocol
Data Unit (BPDU) messages. This is the language of love between the switches. Since BPDU messages are
sent out of all ports, it allows the switches to learn where the loops exist:
I just got my
own BPDU... BPDU:
There must “I am S1”
be a loop.
S1 S2
BPDU:
“I am S1”
The BPDUs not only identify loops but act as election ballots. Inside the BPDU “envelope” (aka packet) are
two switch IDs:
n Switch Priority – A value between 0 and 61440. By default, this value is 32768.
n Switch MAC Address – The MAC address assigned to the switch.
These two IDs are combined into one number called the Bridge ID and advertised to all the other
switches in the network. For example, a Bridge ID might look like 32768.000c.854b.ee80. Once all the
switches have exchanged BPDU packets, the switch with the lowest Bridge ID will be elected as the STP
Root Bridge. Once the STP Root Bridge has been elected, all switches in the network will attempt to find
the best path to reach the root bridge and block the redundant paths. Using the initial STP diagram, this is
what the STP results would become, assuming Distribution Switch 1 was elected as the Root Bridge:
Distribution DP RP Distribution
Switch 1 Switch 2
DP BL
DP DP DP DP DP DP DP DP
RP BL RP BL RP BL RP BL
As you can see, STP uses different port identifiers to dictate the status of each port. These identifiers can
be understood as the following:
n Designated Port (DP) – A port that is forwarding. The STP Root Bridge will always have all
ports set as DPs. STP also requires that there be one DP per segment (only one side of the link is
blocked to eliminate redundant paths).
n Root Port (RP) – A port that is used to reach the Root Bridge. This port will be kept in the
forwarding state.
n Blocked Port (BL) – A port that is disabled to eliminate loops in the network.
The switches shown in the previous figure found the most cost-efficient path (based on link speed) to
reach the Root Bridge and then blocked the redundant paths.
The STP protocol was created quite some time ago when a few minutes of downtime was not as critical
as it is in today’s networks. The STP standard has the following port transition process when an Ethernet
cable is connected to a switch:
n Listening (15 seconds) – During this time, the switch is listening for and sending BPDUs. It is not
forwarding any other traffic.
n Learning (15 seconds) – During this time, the switch is learning the MAC addresses on the
ports. It is not forwarding traffic during this time.
This means that any new Ethernet cable that is attached to a switch will take at least 30 seconds before it
is able to send traffic. In addition, every switch has a Blocking max-age timer. This adds up to an additional
20 seconds to activate a currently blocked (BL) port should the primary path fail. These timers cause two
problems. First, modern PCs are able to boot faster than the 30 second timer, leaving them temporarily
without network connectivity. Second, major outages in the network occur anytime STP needs to failover
to a new port. To address these problems, we can use the following two solutions:
n PortFast – PortFast disables the Listening and Learning timers on any port configured in the “ac-
cess” mode (switchport mode access). This allows ports connected to end devices to immedi-
ately assume the Forwarding state.
n Rapid STP – A new edition of STP recently released allows the switches to remember and im-
mediately use “Alternate” ports (alternate is a new RSTP port definition). This allows non-root
backup ports to immediately failover should the primary port go down.
This command sets the switch as the STP Root Bridge for all VLANs by lowering the STP Priority to 24576.
You can verify the status of this by using the following show command:
CoreSwitch#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 000c.854b.ee80
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Cisco switches run a version of STP known as Per-VLAN STP (PVST). This runs an instance of STP on each
VLAN. PVST adds the VLAN number to the STP Priority, which is why the above output shows the priority
of the Root Bridge as 24577 rather than 24576. Once you have set the priority on the Root Bridge, all the
other switches in the network will find the best way to reach the core switch (most central to the network)
and block the redundant paths.
Your second step in configuring STP is to enable PortFast on ports connected to end devices. To accom-
plish this, you can use the following syntax:
In the previous example, ports 1-22 on the switch were set in PortFast mode. Take a look at the warning
message given by the switch. This warning message highlights the fact that PortFast should only be used
on ports connecting to end-devices. Using this feature on ports connected to other switches can cause
loops in the network.
Finally, STP can be optimized by moving to the Rapid STP (RSTP) version of STP. However, in order to enjoy
the fast failover times supported by RSTP, you must be running it on all switches in your environment. This
may mean you need to upgrade IOS versions or even switch hardware. The command to enable RSTP is as
follows (this must be executed on all switches in your network):
n Verifying ACLs
n ACLs applied for security – Permit statements dictate the traffic that is allowed through the
router; deny statements dictate the traffic that is dropped by the router.
n ACLs applied for NAT – Permit statements dictate the traffic which will be translated by NAT;
deny statements dictate the traffic which will not be translated by NAT.
n ACLs applied for QoS – Permit statements dictate traffic that will receive priority; deny state-
ments dictate traffic that will not get priority.
n ACLs applied for VPNs – Permit statements dictate traffic allowed to cross the VPN; deny state-
ments dictate traffic not allowed to cross the VPN.
This list could go on and on through the many features supported by the Cisco IOS. The point is to under-
stand that ACLs are not just used for security-related configurations. While ACLs can be applied to many
different aspects of a router, the CCNA exam focuses on security and NAT.
In general, an access control list is just that: a list. It is an ordered list of statements that the router reads
from the top-down. For example, imagine that we had the following list filtering inbound traffic to the
S0/0 interface of our router:
F0/0 S0/0
Router Internet
Access List 10
As traffic is sent into your router, it looks at the access list in order, comparing each incoming packet to the
list of statements. Once it finds a match, it stops processing the list. For example, if the router in the figure
above received a packet from the host 4.2.2.2, it would pass the first two lines in the access list since they
do not match the IP address. Once it hits the third line in the access list, it would register a match, permit
the packet and stop processing. The “Deny any” statement at the end of the access list would only be
reached if the packet did not match any of the first four statements.
That also brings us to focus on the fourth statement. Access lists use wildcard masks. For a full discussion
on this functionality, refer to the OSPF portion of this guide. The fourth statement in the access list permits
any IP addresses that start with 200.1.1; the last octet is not inspected.
Finally, the “Deny any” statement in the access list demonstrates a key point about all access lists: if a packet is
not permitted somewhere by an explicit statement (entered by an administrator) in the access list, it will be
denied. This is known as the implicit deny rule. The final rule of every access list is an implicit deny.
n Standard Access List – Permits or denies traffic based on the source IP address only
n Extended Access List – Permits or denies traffic based on the source or destination IP address,
protocol (such as TCP, UDP, etc…), port number information, time of day and many other criteria
Because of their flexibility, extended access lists are more popular; however, standard access lists are still
quite common. When you create an access list on a router, the number of access lists that you create dic-
tates the type of access list:
Router(config)#access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<1100-1199> Extended 48-bit MAC address access list
<1300-1999> IP standard access list (expanded range)
<200-299> Protocol type-code access list
<2000-2699> IP extended access list (expanded range)
<700-799> 48-bit MAC address access list
dynamic-extended Extend the dynamic ACL abolute timer
rate-limit Simple rate-limit specific access list
As you can see from the previous output, creating an access list identified by numbers 1-99 or 1300–1999
will create a standard access list. Creating an access list identified by numbers 100-199 or 2000-2699 will
create an extended access list.
S0/0
F0/0
Internet
F0/0
S0/0
F0/0
R1 S0/0 R2
Network 2
Network 3
192.168.2.0/24
192.168.2.0/24
Network 1
192.168.1.0/24
The company represented in the previous figure would like to prevent Network 3 from accessing the
Internet. The following syntax will create the list itself:
The above syntax creates access list #1, which is a standard access list (1-99). The first statement denies
the 192.168.2.0 subnet access and the second statement permits everyone else. The second statement is
necessary because the access list would end up denying all traffic since there is an implicit deny all at the
end of every access list (it does not need to be added by you). Now, the access list needs to be applied:
Pay special attention to the router where this configuration was entered and the interface where the
command was applied. If we would have applied the standard access list on R2 or R3, it may have denied
Network 3 from accessing networks other than just the Internet. This brings us to a fundamental rule of
standard ACLs: always apply standard ACLs closer to the destination.
It is also a common practice to apply standard ACLs to the VTY lines of a router. By doing this, you can limit
Telnet and SSH access to a specific set of IP addresses. The following is an example of this application:
The previous syntax allows only IP addresses from the 10.1.1.0/24 subnet to Telnet or SSH into the router
for management purposes.
S0/0
F0/0 F0/0
R1 S0/0 R2
.150
Network 2
192.168.1.128/25
.100
Network 1
192.168.1.0/25
The access list in this scenario must meet the following requirements:
n The host on Network 2 is able to access the server on Network 1 using HTTP, HTTPS and FTP.
n The host on Network 2 should not have any other access to the server on Network 1.
The first three lines of access list 100 are focused on permitting the host on Network 2 to access the
server on Network 1 using HTTP (TCP port 80), HTTPS (TCP port 443) and FTP (TCP port 21). These ports
are placed at the end of the access list command since they are destination port numbers. The fourth
line of the access list denies the host on Network 1 any other access to the server. Keep in mind that this
is accomplished by denying the IP protocol rather than TCP. The final line permits the hosts on Network
2 to access any other destination. The wildcard mask used to permit Network 2 might look a little odd
until you look at the subnet mask used by Network 2. The current subnet mask is a /25 in bit notation or
255.255.255.128 in decimal form. To find the wildcard (inverse) mask for a given network, simply subtract
the decimal form of the subnet mask from all 255s:
255.255.255.255
- 255.255.255.128
-----------------------
0.0.0.127
R2(config)#interface fa0/0
R2(config-if)#ip access-group 100 in
Again, notice the router and interface to which we applied the access list. As the hosts on Network 2 are com-
ing into the fa0/0, the access list will filter their access. We could have applied this same access list on R2 S0/0,
outbound; R1 S0/0, inbound; or R1 Fa0/0, outbound with the same effect. However, any of these locations
would require the Network 2 traffic to pass further through the network before it could be dropped. This
is not as efficient as R2, Fa0/0 inbound. This leads us to the rule of thumb for extended ACLs: extended ACLs
should always be applied closer to the source. This is exactly flipped from the rule of standard ACLs. Since the
extended ACL can specify destination information, you can be very precise in your restrictions.
Notice that each permit statement has a sequence number in front of it (10, 20, 30 and 40). This allows
you to come back and insert lines between the existing statements in the ACL (simply by using sequence
numbers such as 15 or 23). You can also remove individual lines from the ACL by using the command no
<sequence number> from the “nacl” (named ACL) configuration mode. These access lists are applied in the
same fashion as the numbered access lists.
Verifying ACLs
The best command to verify ACLs is the show access-list <number/name> command. For example:
This is an excellent command because it verifies the number of matches (match = packet) that have hit
each statement of the access list since the last restart of the router.
You can also verify the access list statements by using the show run command. The example below filters
the show run output to only include lines containing “access-list”
You can also use the show run command to verify the interfaces that have an access list applied to them:
n Static NAT – defines single static translations from one IP address to another
Static NAT allows you to use private IP addressing for your internal servers and yet make them available
on the public Internet. In the network diagram below, the internal server 192.168.1.100 is mapped to
the public IP address 200.50.63.122. Anytime this server accesses the Internet, it is seen as this public IP
address. Likewise, anytime someone on the Internet accesses this public IP address, they will translate to
this internal server. Static NAT like this should always be filtered using an extended ACL to allow only the
necessary ports through to the server.
F0/0 S0/0
Internet
R1
192.168.1.100/24 192.168.1.100/24
To perform the static NAT configuration show above, you can use the following syntax:
The English translation of the first line of this syntax says, “I want to NAT (ip nat) from the inside of my net-
work to the outside (inside). The source of this translation will be what I statically define (source static).
The internal IP address of this translation will be 192.168.1.100. The external IP address of this translation
will be 202.50.63.122.”
After this static translation is in place, we then identify the inside and outside interfaces of the router
to the NAT process by using the ip nat inside and ip nat outside syntax. I purposely used an example
where the external IP address of the router was something completely different than the IP address being
mapped. I did this to prove the point that the IP address being mapped does not need to be assigned
to your router in any way. However, the service provider must be configured to forward traffic to that IP
address in the direction of your router (you would accomplish this by purchasing IP addresses from the
service provider).
Dynamic NAT allows you to translate a pool of IP addresses. In the diagram below, the group of internal
(private) IP addresses is being translated to external (public) IP addresses.
S0/0
F0/0 Internet
R1
192.168.1.0/24 202.50.63.0/24
Keep in mind that this is a 1:1 mapping; this is not an example of many hosts sharing a single IP address
(known as NAT Overload or PAT). This would keep you from creating more than 200 static translations to
map each private IP address to a public IP address. The following configuration would accomplish this:
Notice the changes in the configuration since the static NAT example. Initially, a standard ACL is created
which is used to identify (permit) internal IP addresses to be translated. Second, a NAT pool is created
which defines the external addresses to be used in the translation. Finally, the third statement puts the
two address definitions in action, translating the source IP addresses defined in access list 50 to the exter-
nal IP addresses defined in the NAT pool EXTERNALS. This form of NAT is least commonly used.
NAT Overload (also known as PAT) allows many private IP addresses to share one or more public IP ad-
dresses. In the diagram below, the entire private network (192.168.1.0/24) is sharing the public IP address
202.50.63.1 when accessing the internet.
S0/0
F0/0 Internet
R1
192.168.1.0/24 202.50.63.1/24
This is accomplished by using unique source port numbers. If you think back to the discussion of TCP
and UDP in the early part of this guide (Network Foundations), the network protocol always generates a
random source port number when it sends traffic to a destination port number. NAT Overload uses this
source port number to make the external translation unique. Inside the router, a NAT translation table is
generated resembling this format:
This table is from a real router, but I have modified it slightly for simplicity. The router is translating from
Inside Local addresses (internal, private IP addresses) to an Inside Global (external, public IP address). The
Internet host being accessed by the internal user is seen as the Outside Global address column.
Notice that this configuration is nearly identical to that of dynamic NAT. The only difference is that the NAT
pool consists of only a single IP address and the ip nat inside source command is concluded with the
keyword overload. This instructs the router to use PAT with whatever IP addresses are in the NAT pool. This
example shows only a single IP address in the NAT pool being used; however, you can use multiple IP ad-
dresses in a larger network which may exhaust the number of ports available on a single IP address.
There are two primary verification commands you can use to ensure NAT is working properly. They are
show ip nat translations and show ip nat statistics.
The output above is the same command we issued earlier when discussing the properties of NAT over-
load. The additional column is the Outside local addresses. This is how the internal hosts see the external
IP addresses. This column will typically mirror the Outside global addresses unless you have implemented
the more sophisticated destination NAT translations. Destination NAT is not discussed at the CCNA level.
This command allows you to see the incoming and outgoing interfaces configured for NAT, along with the
number of hits and misses. A hit is when an additional packet is received for a NAT translation already in
the table. A miss is when a packet is received that requires a new NAT translation to be made.
IPv6 does provide a number of fantastic features; however, very few of them can actually translate into
increased revenue for businesses. The number one feature of IPv6 is the increased address space. We
have moved from 32-bit addressing in IPv4 to 128-bit hexadecimal addressing in IPv6. The following is an
example of an IPv6 address:
The new IPv6 addresses have eight, 16-bit octets of four hexadecimal characters each. Because these ad-
dresses are quite cumbersome, the following two rules were created to shorten them:
n Rule 1: Groups of consecutive zeros can be represented with a double colon (::); however, the
double colon can only be used once in each address.
Ex: 2001:0050:0300::0ab4:1e2b:98aa
Ex: 2001:50:300::ab4:1e2b:98aa
While this still leaves the address quite a bit longer than an IPv4 address, it’s slightly more manageable
after these two rules are applied.
Because the number of addresses available in IPv6 will be so large, each network device may have mul-
tiple IP address assignments. These assignments can fall into three categories of addresses:
n Link Local Addresses – These addresses are very similar to the 169.254.x.x/16 address space of
IPv4. They are addresses generated by the local device that allows them to communicate on the
local (layer 2) network.
n Unique / Site Local Addresss – These addresses are similar to the private address ranges of IPv4.
They are used to communicate within an organization. Originally these were called “Site Local
Addresses” but more recently have been changed to “Unique Local Addresses.”
n Global Addresses – These addresses are similar to the public address ranges of IPv4. They will
be routable on the new Internet which some have termed “Internet2.” \
Along with the new address types, there are new types of communication in IPv6:
n Unicast – Just like IPv4, one-to-one communication.
n Multicast – One-to-group communication. This messaging type has replaced broadcasts (there
are no broadcasts in IPv6).
n Anycast – One-to-closest communication. Allows multiple devices to be assigned the same IP
address. When this address is requested by a client, the closest device will respond.
The changeover to IPv6 will not be a “drop dead date.” That is, we’re not going to set a date where everyone
must be running IPv6 or be cut off from the world. Rather, it will be a slow transition of routers running both
IPv4 and IPv6. Both IPv4 and IPv6 Internet connections will still be made available for quite some time in the
future. The following diagram shows how many organizations will slowly migrate to the new IPv6:
IPv4
S0/0 Internet
IPv4 Client
192.168.1.50/24 F0/0
R1
S0/1
Dual
Stack Router IPv6
Internet
IPv6 Client
2001:50:300::ab4:1e2b:98aa/64
Before we look at the configuration of the dual stack router, note the addressing of the IPv6 client. The
client has the address 2001:50:300::ab4:1e2b:98aa/64. The /64 subnet mask means the first half of the ad-
dress represents the network (remember, each octet in these new IPv6 addresses are 16 bits each) and the
second half of the address represents the host on the network. Since this is a shortened address, here are
the full representations:
R1(config)#ipv6 unicast-routing
R1(config)#interface fa0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#ipv6 address 2001:0050:0300::1/64
As of right now, the CCNA exam just requires you to know the foundations of IPv6. You can expect this
topic to grow on all Cisco exams as the IPv6 protocol becomes more widespread.
n Low Cost – It is much cheaper to purchase an Internet connection at each of your office loca-
tions rather than dedicated WAN links. The Internet can then be used not only for normal Inter-
net access but as a backbone for interoffice communication.
n Availability and Scalability – Internet connections are widely available. Because of this, your
VPN is able to scale to encompass multiple offices, telecommuters and home office users with
very little increase in cost.
Typically, anytime you see a VPN network diagram, the core of the focus will be the Internet:
HQ Branch Office
Internet Telecommuter
This diagram leads us to understand the three major types of VPN connections:
n Site-to-Site – VPN linking two offices together. Routers or firewall equipment handle VPN con-
nections rather than end users.
n Remote Access – VPN linking remote user to the corporate network. The end-user usually
handles the VPN connection through some installed software.
n SSL / Web VPN – Newest type of VPN which allows you to tunnel traffic through an existing SSL
connection which is typically initiated through a web browser. SSL/Web VPN connections are
commonly categorized as a new style of remote access VPN.
As you might imagine, sending corporate data over the Internet requires plenty of security considerations.
Because of this, all Cisco VPN connections use a protocol known as IPSec. Like TCP/IP, IPSec is actually a
suite of protocols which focuses on securing the connection. The IPSec protocol addresses each of these
security arenas:
n Authentication – This portion of the IPSec protocol verifies the source of each packet. This is
typically done through pre-shared keys (a simple, but not as secure approach) or certificates (a
more complex, more secure approach).
n Encryption – IPSec handles scrambling the data before it is sent over the Internet so it is not
understandable to anyone but the intended receiver. Common encryption algorithms used over
VPN connections are DES, 3DES and AES (listed in order of weakest to strongest).
n Data Integrity – IPSec needs to ensure data does not change between the sending and receiv-
ing devices. For this, the MD5 (weaker) and SHA-1 (stronger) hashing algorithms are used.
n Anti-Replay Protection – IPSec uses sequence numbers to ensure data is not duplicated or sent
at a later time or date. If duplicate or late data is received, IPSec will block it.
A leased line connection is a private, point-to-point link between offices. The private links consist of one
or more DS0 channels. Each DS0 is the equivalent of 64 Kbps. Once you reach 24 DS0s, you will achieve a
T1 speed (1.544 Mbps). While physical implementations of leased lines will vary, you will always need to
choose between two data link WAN protocols:
n High-Level Data Link Control (HDLC) – All Cisco routers use the HDLC protocol by default
on Serial interfaces. Cisco’s version of HDLC is proprietary, so it is useful only when connecting
between two Cisco routers. HDLC has very little configuration and features associated with it.
n Point-to-Point Protocol (PPP) – PPP is the industry standard protocol for many types of WAN
connections including leased lines. You can use this to connect a Cisco router to any other brand
of router. PPP supports many more features than HDLC.
The configuration of HDLC is not worth mentioning since…there is none! Cisco routers run HDLC by
default on all Serial interfaces, so the WAN connection operates simply by plugging each router into the
leased line connection and assigning IP addresses. You can verify your router is running the HDLC protocol
by using the show interfaces command:
The PPP protocol supports the following four features beyond basic connectivity:
n Authentication – Verifies that the remote device that is connecting provides the necessary
authentication credentials.
n Callback – Disconnects the calling device and calls them back at a pre-defined number.
n Multilink – Binds multiple physical connections into a single logical link. For example, multilink
can combine the bandwidth from two T1 lines into a single, 3 Mbps connection.
The CCNA exam focuses solely on the authentication aspects of PPP. I will use the following network dia-
gram to demonstrate the configuration of PPP authentication:
172.16.1.0/24
.1 .2
Neo Cipher
Neo(config)#interface S1
Neo(config-if)#encapsulation ppp
Cipher(config)#interface S1
Cipher(config-if)#encapsulation ppp
That’s it! We’ve now converted from HDLC to PPP. Before we add authentication to the mix, we need to
highlight the two types:
n Password Authentication Protocol (PAP) – PAP was the initial authentication protocol used
with PPP. It sends the username and password in clear-text, which is quite dangerous. PAP is
rarely used in today’s modern environments.
To configure CHAP authentication for the previous network scenario, use the following syntax:
The previous syntax is known as a two-way CHAP authentication since each router authenticates the
other. The first command of the syntax creates a user account for the opposite router. The Neo router ex-
pects another router to provide the username Cipher (Cisco routers use their hostname as their username,
by default) and a password of “cisco”. The Cipher router expects another router to provide the username
Neo and a password of “cisco”. When performing two-way CHAP authentication, the passwords must be the
same between the two routers. This is because of the way CHAP handles the password hashing.
Once we have configured PPP, we can verify its operation by using the same show interfaces command:
The highlighted line “LCP Open” shows that the PPP Link Control Protocol (LCP) is operational. LCP is
responsible for negotiating all PPP features, including authentication. Below that, we can see that the IP
Control Protocol (IPCP) and CDP Control Protocol (CDPCP) are allowing these protocols to work over the
PPP link. These are both known as PPP Network Control Protocols (NCPs).
Authentication is one of the common troubleshooting areas for PPP. The best command to troubleshoot
authentication issues is debug ppp authentication.
As you can see, the three phases of CHAP are Challenge, Response and a Success/Failure message. In this
case, our authentication succeeded.
Half of the challenge in understanding the world of Frame Relay is in understanding the terminology. Take
the following sample network diagram:
R1 S0/0 S0/0 R2
102 201
103
301
Frame Relay
S0/0
R3
n Permanent Virtual Circuit (PVC) – The dotted lines through the Frame Relay cloud represent
PVCs. These are circuits established through the service provider’s network that links your locations
together. Each PVC has a recurring monthly cost based on the amount of bandwidth desired.
n Data Link Connection Identifier (DLCI) – The numbers in the cloud represent DLCI numbers.
These are the data link-layer addressing that Frame Relay uses.
n Committed Information Rate (CIR) – The CIR is the lowest average speed the service provider
commits to give you. Many service providers will allow you to burst above your CIR if the band-
width is available.
n Local Access Rate (LAR) – The maximum physical speed your connection supports to the Frame
Relay service provider.
n Local Management Interface (LMI) – The protocol used between you and the service provider
to manage the Frame Relay connections.
n Inverse Arp (InARP) – A “backwards” ARP message that attempts to determine a device’s IP ad-
dress based on its data link layer address.
Now that the terms are on the table, here’s how Frame Relay works. When you sign up for a Frame Relay con-
nection, you will dictate how many offices will be linked together through the Frame Relay network. You will
then need to choose the type of Frame Relay topology you would like to assemble. Here are three styles:
R1 S0/0 S0/0 R2
Frame Relay
S0/0 S0/0
R4 R3
n Hub and Spoke – All Frame Relay circuits come in through one central router (the hub). This is
the cheapest, but least redundant way to deploy Frame Relay.
R1 S0/0 S0/0 R2
Frame Relay
S0/0 S0/0
R4 R3
n Full Mesh – Every site has a PVC directly to each of the other sites. This is the most redundant
configuration but is expensive.
R1 S0/0 S0/0 R2
Frame Relay
S0/0 S0/0
R4 R3
n Partial Mesh – Critical sites have multiple connections to each other; non-critical sites have
limited PVC connections.
Once you have selected the number of PVCs and their locations, the service provider will assign you DLCI
numbers. These DLCIs are the addressing used to connect between offices. The concept of DLCIs can be
somewhat confusing since the addressing works backwards when compared to what we are used to see-
ing. For example, take the following PVC between R1 and R2:
R1 S0/0 S0/0 R2
102 201
Frame Relay
We would assume that if R1 was sending to R2, it would come from the source DLCI 102 and transmit to
the destination DLCI 201. Rather, Frame Relay works exactly the opposite: R1 sends to a destination DLCI
102 which is transmitted through the Frame Relay service provider and exits the R2 WAN connection on
DLCI 201. I often compare this to flying to a location from an airport. You might leave out of gate B5, but
arrive in gate C13. The address “changes” in mid-air, as you are flying through the service provider cloud.
For this reason, people often refer to DLCI numbers as “local DLCIs.” This is because the router will transmit
data to its local DLCI number which the service provider will translate to the remote DLCI information
when the data exits the cloud.
To configure Frame Relay, you first need to plan your sub-interface strategy. Sub-interfaces are often used
in Frame Relay since a single physical interface can connect to many destinations. You have two choices in
Frame Relay sub-interfaces:
n Multipoint – Multipoint sub-interfaces are useful when all PVCs share the same IP subnet. This
design makes the Frame Relay cloud feel like an Ethernet switch. Be careful – multipoint designs
cause issues with many routing protocols, especially distance vector routing protocols which use
Split Horizon loop prevention.
S0/0 S0/0
R1 192.168.1.1/24 192.168.1.2/24 R2
102 201
103
301
Frame Relay
S0/0
192.168.1.3/24 R3
This design is something that you choose – it is not dictated by the Frame Relay service provider. I’ll show
both designs using the same Frame Relay topology:
Multipoint Configuration
The previous figure illustrates a Frame Relay multipoint configuration. You can tell this because all routers
are sharing the same IP subnet. To configure this design, use the following syntax:
The key command in a multipoint configuration is the frame-relay map command. This commands maps
a remote IP address to the local DLCI number used to reach the remote IP address. Take the following
command on R1: frame-relay map ip 192.168.1.2 102 broadcast. This command says “to reach the
remote IP address 192.168.1.2, use DLCI 102…and allow broadcasts to be sent on this circuit.” The broad-
cast keyword allows routing protocol updates to be sent by R1 to R2, in this case. If you left the broadcast
keyword off, routing protocols would not operate over the Frame Relay cloud.
R1 R2
S0/0 S0/0
S0/0.12 S0/0.12
192.168.12.1/24 102 201 192.168.12.2/24
S0/0.13
103
192.168.13.1/24
301
Frame Relay
S0/0
S0/0.13 R3
192.168.13.2/24
Point-to-Point Configuration
This figure demonstrates a point-to-point configuration. As you can see, each PVC is assigned its own IP
subnet. The sub-interface numbers you choose can be anything you want.
While it looks like more configuration, the point-to-point Frame Relay design is more optimal than a multi-
point since it does not have any issues with routing protocols.
You can verify the Frame Relay configuration by using the following three commands:
n show frame-relay lmi – Verifies the LMI signaling between you and the service provider. The
LMI should be auto-detected by any router manufactured within the last decade; however, if you
have an exceptionally old router, you may need to hardcode the LMI type under the interface
configuration mode by typing frame-relay lmi-type <type>. The type should match whatever
the service provider is using; your choices are cisco, ansi, or q933a.
n show frame-relay pvc – Displays statistics (packets sent/received, bytes sent/received, etc…)
about each PVC established through the Frame Relay service provider.
n Hostname
n IP address
n Device model
n IOS version
This can be very handy when attempting to build a network diagram (it sure beats tracing cables). To dem-
onstrate CDP, take the following network diagram:
R1 R2
Based on this network diagram, we do not know what ports are connected to each router, what IP address
information each device has or even what model of equipment is in use. To demonstrate CDP, I’ll connect
to the console port of R1:
By typing the show cdp neighbors command, I am able to see that R1 has a connection to R2 from its
Serial 1 interface (local interface). The remote router is a 2520 (platform). R1 is connected to R2’s Serial 1
interface (port ID). If we want more information, we can add the detail argument:
Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.2(10a), RELEASE SOFTWARE
(fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Tue 21-May-02 10:55 by pwade
advertisement version: 2
From this output, we are able to determine that R2 has the IP address 172.16.1.2 and is running the
12.2(10a) version of the IOS.
After filling this information in on our diagram, we can then telnet to R2 and execute the same command:
R1#telnet 172.16.1.2
Trying 172.16.1.2 ... Open
From the CDP neighbor table on R2 we are able to see the information about the switch connection along
with the mirrored information about R1. If we wanted, we could follow this command up with the detail
keyword to get the specific IP address and IOS version information.
Because CDP does provide sensitive network information, some organizations choose to turn it off. There
are two ways to accomplish this:
n Globally: no cdp run – Typing the command no cdp run from global configuration mode dis-
ables CDP on the entire device.
n Per-Interface: no cdp enable – Typing the command no cdp enable under interface configura-
tion mode prevents CDP from running on just one interface.
As we saw from the previous CDP section, it’s easy to telnet between Cisco devices. All you need to do is type
telnet <remote IP address> from a user or privileged mode prompt. Unbelievably, the telnet keyword is
optional. You can just type the remote device IP address and the IOS will assume you are trying to telnet.
Once you have accessed the remote device, there are two ways to get back: ending your telnet session or
suspending your telnet session. To end your telnet session, simply type the exit command from a user or
privileged mode prompt:
R1#telnet 172.16.1.2
Trying 172.16.1.2 ... Open
R2>exit
R1#
Suspending your telnet session is quite handy when you are jumping back and forth between devices
often. The suspend command is quite tricky. Press ctrl + shift + 6 at the same time, let go, then type x
on the keyboard:
R1#telnet 172.16.1.2
Trying 172.16.1.2 ... Open
Notice from the previous syntax that pressing the ctrl + shift + 6, then x combination immediately moves
us back to R1. The telnet session is still active, but it has been suspended for the time being. If I would like
to see the telnet sessions open from my router, I can do so with the show sessions command:
R1#show sessions
Conn Host Address Byte Idle Conn Name
* 1 172.16.1.2 172.16.1.2 0 1 172.16.1.2
R1 shows a single session (connection 1) open to R2. If I want to resume the telnet session, I can type
resume 1 (where 1 is the connection number shown in the first column):
R1#resume 1
[Resuming connection 1 to 172.16.1.2 ... ]
R2>
If you wanted to create multiple telnet sessions from R1 to other devices, you could quickly jump around
between them using these skills.
n Read-Only Memory (ROM) – The read-only memory contains the power of self-test (POST) and
ROM monitor, which is a small operating system used for IOS and password recovery should you
accidentally delete the IOS or forget your password.
n Flash – The flash contains the IOS in compressed format. When the router boots, it decompress-
es the IOS into RAM.
n Non-Volatile RAM (NVRAM) – The NVRAM is a small piece of non-volatile memory (doesn’t go
away when the device reboots) used to store the startup configuration.
n Random Access Memory (RAM) – The high-speed, volatile memory component used to hold
the IOS and running configuration while the device is running.
By this point, you are familiar with the method used to save your configuration: copy running-config
startup-config. This transfers the contents of the running configuration in RAM into NVRAM. The copy
command can be used to copy between other memory components as well. For example, we could copy
the running configuration into flash by typing the following:
Directory of flash:/
Notice the highlighted line from the show flash output: we have now stored a backup of our running
configuration in flash!
There will be times when you want to transfer files to and from your Cisco devices. This is typically used
for IOS upgrades or backup. Moving files between PCs and Cisco devices requires the use of a TFTP server.
TFTP server software is widely and freely available on the Internet. The best TFTP software to date is
TFTPd32 available from this webpage: http://tftpd32.jounin.net/.
Once you have downloaded and installed TFTP software on your PC, moving files is easy. Take the follow-
ing network diagram:
Ethernet Connection
While this diagram shows the devices directly connected, this is not a requirement. As long as each device
is able to reach the other’s IP address, TFTP will work just fine. After you have opened the TFTP software on
the host, you can back up the Cisco IOS by using the following syntax:
CAT3550#show flash
Directory of flash:/
The show flash command was executed to retrieve the filename of the IOS we wanted to back up. The
exclamation points will begin appearing as the file is being copied. You can also verify the copy progress
from the TFTP server window:
The copy command can also be used to upgrade or restore the IOS onto a device just by reversing the
command: copy tftp: flash:.
Practice Questions
Chapter 1 Describe How a Network Works
1. Which of the following pieces of information does a BPDU contain?
Select the three best answers.
3. Which of the following statements are correct about network segmentation with bridges?
Choose TWO.
A. Bridges act as intelligent network devices, forwarding traffic based on layer 3 addresses.
B. Bridges are layer 2 “filters” that keep local traffic local, and forward all other traffic.
C. Bridges allow open traffic flow, and perform no segmentation.
D. When a destination address is not known to a bridge, it “floods” the traffic to all segments.
5. When one host transmits data across a network to another host, information is processed
through the OSI stack. Align the OSI layers in the correct order in which a destination host
processes network traffic with the first layer processed on the top.
Session
Network
Presentation
Transport
Application
Physical
Data Link
A. Values for the hello, forward delay, and max-age protocol timers
B. The bridge ID of the sending switch
C. The spanning-tree path cost to the root
D. Its DNS name
E. The ID of the root bridge
2. What might be the reason for a switch port being in STP blocking state?
Select the best answer.
3. Your backup server is experiencing poor network performance issues, and your nightly backups
are not completing. The server is connected via a 100MB Ethernet to the switch, and you suspect
there is a duplex mismatch. What commands would you use to troubleshoot the issue?
Select THREE.
A. show interfaces
B. show interface counters
C. show log
D. show log history
E. show interfaces status
2. You are designing an internetwork. Due to the variety of technologies and connectivity methods
in use, you need to select routing protocols that support unequal cost path load balancing.
Which protocols will you select?
Select the two best answers.
A. RIP v.1
B. RIP v.2
C. IGRP
D. EIGRP
E. OSPF
3. You are configuring OSPF on a Cisco router. Interface FastEthernet 0/0 belongs to the
192.168.1.0/24 IP subnet. Your router has multiple interfaces. You want only this interface to be
included in the OSPF routing process. Which command would you issue?
Select the best answer.
4. Users are complaining that your company’s website has been extremely slow all day, and in
several cases, connections are timing out. You have checked all the servers, and they seem fine,
but the load on your router’s external interface is abnormally high. You suspect a denial of
service attack using spoofed ICMP traffic that is bringing a barrage of echo replies to your
network. What single entry in your ACL would provide the most information to trace the attack
when applied inbound to the outside interface?
Select the best answer.
5. A previous consultant designed the following access list for a client. Which of the below state-
ments are true concerning this access list?
access-list 10 permit 10.1.1.1
access-list 10 deny 10.1.1.0 0.0.0.255
access-list 10 permit 192.168.0.0 0.0.255.255
Choose THREE.
6. A user is complaining that they cannot access anything beyond the local LAN network. They are
unable to ping the gateway IP address of 192.168.37.1. What is the problem?
Select the best answer.
A. The subnet mask of the host does not match the gateway.
B. The IP address of the host is not on the same subnet as the gateway.
C. The default gateway of the host incorrect
D. The gateway IP address should be configured on the switch, not the router.
Exhibit(s):
92.168.37.1
Subnet Mask: 255.255.255.240
IP Address: 192.168.37.17
Subnet Mask: 255.255.255.240
Gateway: 192.168.37.1
? Ethernet
Bridge
Hub
Router
Ethernet
?
Switch
Available Devices
3. You want to be able to download an image file over the network. Your FTP server requires a user-
name and password. Which command or set of commands can you use to specify authentication
information for your FTP connections?
Select the best answer.
4. You are designing an access list to filter UDP traffic from port 500 on any host to any port on
host 172.16.1.1. Which command(s) will you use?
Select the best answer.
5. You have two routers within your network, and you need to enable RIP as your routing protocol.
The routers are connected by the 192.168.1.0/24 network. Router A also has an interface in the
10.1.1.0/24 network. Router B has an interface in the 172.16.0.0/16 network. What are all the
commands necessary to enable RIP on router B, and ensure all connected networks are reach-
able by router A?
Select the best answer.
A. router rip
B. router rip network 192.168.1.0
C. enable router rip network 10.0.0.0 network 192.168.1.0
D. router rip network 172.16.0.0 network 192.168.1.0
Exhibit(s):
192.168.1.0/24
Router A Router B
10.1.1.0/24 172.16.0.0/16
6. Host A is sending packets destined for LA to its default Gateway in San Francisco. The San Fran-
cisco router has both EIGRP and RIP enabled. What is the next hop for packets destined for LA?
(Note: All EIGRP routes are internal, and the LA and SF routers are running both protocols.)
Sacramento
RIP
EIGRP
Roseville
A. Carrier Sense
B. DCF
C. Acknowledgement frames
D. Request to Send/Clear to Send
E. Frame fragmentation
2. In CSMA/CA, which component uses the Network Allocation Vector (NAV) to determine the state
of the wireless medium?
Select the best answer.
A. Acknowledgement frames
B. Carrier Sense
C. Frame fragmentation
D. Request to Send/Clear to Send
2. Which commands can be used to reenable a switch interface when there is a MAC security violation?
Choose TWO.
Exhibit(s):
Exhibit(s):
R1 R2
H1 H2
2. You are attempting to enable one of your WAN links between HQ and one of your branches and
you cannot ping the branch. You have “show interfaces” output for each of the serial interfaces,
shown within the exhibit. What is the problem?
Select the best answer.
Exhibit(s):
Explanation B. Incorrect. BPDUs don’t carry information about hostnames. In fact, the 802.1D standard
does not require switches to have hostnames, as they are level 2 devices.
Explanation C. Correct. Each bridge that takes part in the Spanning Tree Process must have a Bridge ID.
This parameter plays an important role in the process of Root bridge selection. This bridge ID is often
derived from the switch MAC address.
Explanation D. Correct. The Spanning Tree Protocol tries to select an optimal loop-free topology. The
shortest distance to the root switch is calculated for each switch based on the path cost.
Explanation E. Correct. BPDUs are exchanged periodically between switches. It is important that switches
know the communication parameters of their neighbors to detect line and device failures. Each BPDU car-
ries the configuration of the sending switch.
2. Answer: A
Explanation A. Correct. The physical layer defines the physical processes and specifications for activating,
maintaining, and deactivating the communications channel between communicating devices. Voltage
levels, timing, data rates, maximum transmission distances, etc. are defined by the physical layer.
Explanation B. Incorrect. The data-link layer has two sublayers defined by IEEE: Logical Link Control (LLC)
and Media Access Control (MAC). MAC is responsible for media access and is media dependant. LLC de-
scribes frame transmission mechanisms, and may provide either reliable, or best-effort delivery.
Explanation C. Incorrect. The transport layer is used for addressing applications by means of TCP/UDP ports.
The TCP protocol is also able to provide guaranteed delivery. In addition, the transport layer segments data.
Explanation D. Incorrect. The network layer provides addressing. IP addressing is an example of network
layer addressing. Other functions performed by the network layer are routing (in accordance with address-
ing) and packet fragmentation (takes into consideration the MTU).
Explanation E. Incorrect. The presentation layer deals with data representation. If two devices use different
data formats (such as ASCII table versus EBCDIC0), they will be unable to communicate.
3. Answers: B, D
Explanation A. Incorrect. Bridges function at layer 2, forwarding frames to all ports.
Explanation B. Correct. Bridges are intelligent network filters that build forwarding tables to distinguish
between local and remote destinations.
Explanation C. Incorrect. Bridges are intelligent devices that segment the network through filtering.
Explanation D. Correct. When a bridge does not have an address within its table, it sends the traffic to all ports.
4. Answers: A, C, D
Explanation A. Correct. Half-duplex transmissions rely on nodes to detect collisions and perform retrans-
mission, and therefore are susceptible to collisions.
Explanation C. Correct. Hubs rely on network nodes to detect collisions and retransmit.
Explanation E. Incorrect. Half-duplex can attain around 50-60% of the bandwidth of a link due to collisions
and retransmissions.
5. Answer:
Physical
Data Link
Network
Transport
Session
Presentation
Application
Explanation: The sequence in which a host receiving traffic will process data is: Physical, Data Link, Net-
work, Transport, Session, Presentation, and Application. A sending host would process in the reverse order.
Chapter 2
1. Answers: A, B, C, E
Explanation A. Correct. This important information allows switches to discover each other on the network,
as well as to detect when a switch/bridge failure occurs.
Explanation B. Correct. This information is important because each switch/bridge needs to have a unique
way to identify neighbor devices and their knowledge of the STP topology.
Explanation C. Correct. Each switch/bridge informs its neighbor about its proximity to the root bridge/
switch. Based on this information, other switches (from lower levels) will calculate per port distance to the
root bridge to determine which ports must be disabled.
Explanation D. Incorrect. Switches don’t care about DNS names, and don’t send this kind of information in
BPDUs. DNS operates on layers 5-7 (from session to application layer).
Explanation E. Correct. Each switch needs to inform its neighbors about the switch that it considers a root
bridge in the STP topology.
2. Answer: D
Explanation A. Incorrect. This is not a reason for STP to put a port into blocking state. The STP protocol
does not manage faulty hardware conditions.
Explanation B. Incorrect. The STP protocol does not manage collisions, and it won’t change port state even
if very high collision conditions are encountered.
Explanation C. Incorrect. In fact, FastEtherchannel (or just EtherChannel) is a way to avoid ports being put
into blocking state, in case you have more than one interconnect between switches.
Explanation D. Correct. The main job of the STP protocol is to find data-link loops within the Internet-
work, and eliminate these loops to avoid various problems that can be caused by virtue of multiple paths
between end nodes. Redundant paths are put into blocking state.
Explanation E. Incorrect. A duplicate MAC address, although unlikely, is a serious problem within an Inter-
network. However, the Spanning Tree Protocol does not handle such faulty conditions.
3. Answers: A, C, E
Explanation A. Correct. This command is the first place to look for performance issues. You will see the
speed and duplex (negotiated), and also the error counts on the interface. Duplex errors will result in a
high number of errors. If the duplex mismatch is causing the circuit to flap repeatedly, the interface may
go into error-disable mode. The error disable status will show up on the “show interfaces” command.
Explanation B. Incorrect. This command will show packet counts for all the interfaces. Although this com-
mand is useful for analyzing interface traffic, it will not provide helpful information for troubleshooting
duplex issues.
Explanation C. Correct. The “show log” command will display logging information when configured cor-
rectly. Duplex mismatches will be logged for the problem interface, as will interface flapping. If the duplex
mismatch is causing the circuit to flap repeatedly, the interface may go into error-disable mode. This will
show up in the logs.
Explanation D. Incorrect. The “show log history” command displays statistics about the log: messages
logged, dropped, received, etc. The “show log” command would be far more useful when troubleshooting
duplex mismatches.
Explanation E. Correct. This command will show all the interfaces, their status, VLAN, negotiated duplex,
and speed and type.
Chapter 3
1. Answers: C, D, E
Explanation A. Incorrect. This command enables the OSPF process and assigns it a prcoess ID (100 in this
particular case). This command does not allow you to influence the selection of a router ID.
Explanation B. Incorrect. This command is used to restore connectivity to a backbone area when no physical
connectivity to it exists from a particular area. This command does not influence the selection of a router ID.
Explanation C. Correct. By default, OSPF selects a configured loopback interface as its router ID. This loop-
back interface will be the one with the highest IP address. If no loopback interface exists, the IP address on
one of the other router interfaces will be selected.
Explanation D. Correct. By default, OSPF selects a configured loopback interface as its router ID. If no
loopback interfaces are configured, OSPF will select an interface of any kind. The selected interface will be
the one with the highest IP address.
Explanation E. Correct. By using the router-id command in router configuration mode for OSPF, you can
manually assign a router ID to a router. After the issuance of the command, you need to restart the OSPF
process to force changes.
2. Answers: C, D
Explanation A. Incorrect. RIP v.1 only supports equal cost path load balancing on 4 ports by default. How-
ever, RIP v.1 can be configured to support up to 6 equal paths for load balancing.
Explanation B. Incorrect. RIP v.2 only supports equal cost path load balancing on 4 ports by default. How-
ever, RIP v.2 can be configured to support up to 6 equal paths for load balancing.
Explanation C. Correct. Both IGRP and EIGRP support unequal cost path load balancing. In other words,
a router configured for some of these routing protocols is able to install more than a single “best” path to
the destination.
Explanation D. Correct. Both IGRP and EIGRP support unequal cost path load balancing. In other words,
a router configured for some of these routing protocols is able to install more than a single “best” path to
the destination.
Explanation E. Incorrect. OPSF only supports equal cost path load balancing, over 4 paths by default, with
the possibility to configure 6 equal cost paths.
3. Answer: C
Explanation A. Incorrect. The OSPF network command uses wildcard bits, rather than subnet mask. Thus, to
specify a match in the first three octets, one should specify
0.0.0.255 instead of 255.255.255.0
Explanation B. Incorrect. The OSPF network command uses wildcard bits, rather than subnet mask. Thus,
to specify an exact match, one should specify 0.0.0.0 instead of 255.255.255.255.
Explanation C. Correct. The network command assigns a network (the first command parameter
(192.168.1.0)), and specifies the wildcard bits (the second command parameter (0.0.0.255 -exact match))
to an area (the third command parameter (0 ¬Backbone)).
4. Answer: B
Explanation A. Incorrect. This entry is correct to identify the traffic, but would not log any of the traffic infor-
mation. Without turning on the logging functionality, there is no way to identify the source of the DOS attack.
Explanation B. Correct. This IP extended access list identifies the correct traffic, and will log information
into the buffer for examination.
Explanation C. Incorrect. This IP standard access list will not achieve the desired result.
Explanation D. Incorrect. You cannot specify protocol or packet type with an IP standard access list.
5. Answers: C, D, E
Explanation A. Incorrect. Standard IP access lists are numbered from 1-99; extended IP access lists are
from 100-199.
Explanation C. Correct. This host is not specifically identified within the access list, and the implicit deny
will be applied.
Explanation D. Correct. All access lists have an implicit deny at the end.
Explanation E. Correct. Standard access lists are numbered from 1-99; extended access lists are from 100-199.
6. Answer: B
Explanation A. Incorrect -The subnet mask is the same as the mask of the router gateway.
Explanation B. Correct. The IP addressed configured on the host is on a different subnet than the gateway.
The IP address range of the 192.168.37.0/28 is 192.168.37.1 to 192.168.37.14
Explanation C. Incorrect -The default gateway is properly configured for 192.168.37.1 -just like the
router interface.
Explanation D. Incorrect -The switch is a layer 2 device which does not need to be configured with a layer 3 IP
address. The router is the correct device to have an IP address assigned to it for use by hosts as the gateway.
Chapter 4
1. Answer:
? Ethernet
Bridge
Hub
Router
Ethernet
?
Switch
Available Devices
Explanation: Routers are used to connect to the WAN. In this particular example, two routers are used to
interconnect the two sites using a leased line.
2. Answer: C
Explanation A. This is incorrect. Flash memory is used for storing IOS images. NVRAM is used for storing
device configuration files.
Explanation B. This is incorrect. RAM is used as a fast access buffer in Cisco routers and switches. NVRAM is
used to store configuration files.
Explanation C. Correct. NVRAM is a type of memory, which due to its relatively low power consumption
can be used as a non-volatile device configuration storage.
Explanation D. This is incorrect. NVRAM is used to store configuration files. Images normally get stored in
flash, and if there is room for more than one image, a couple of IOS images can be stored in flash.
Explanation E. Incorrect. NVRAM is used to only store configuration information, and is not suitable for
being a fast cache.
3. Answer: D
Explanation A. Incorrect. Authenticated FTP sessions for file transfers are supported by Cisco routers and
switches. Authentication information needs to be specified in global configuration mode.
Explanation B. Incorrect. This parameter of the copy command does not exist in Cisco IOS.
Explanation C. Incorrect. This parameter of the copy command does not exist in Cisco IOS.
Explanation D. Correct. You need to use the above two commands in global configuration mode to setup
a default username and password to be used by the router when performing FTP file transfers. Note that
this username and password are used by the router for all FTP file transfers, and not just per session.
4. Answer: A
Explanation A. This is the correct syntax. This access list will deny UDP traffic on port 500 from any host to
any UDP port on host 172.16.1.1.
Explanation B. Incorrect. The above access list will deny UDP traffic from port 500 from the host 172.16.1.1
to any UDP port on any host, which is not the requirement of this question.
Explanation C. Incorrect. The above access list will deny UDP traffic from host 172.16.1.1 to any host on
UDP port 500, which is not the requirement of this question.
Explanation D. Incorrect. The above access list will block any traffic to UDP port 500 to any host. In addition,
this access list will deny traffic sourced from 172.16.1.1 to any host. This is not the requirement of this
question.
Explanation E. Incorrect. The above access list will deny any UDP traffic to port 500, and it will allow
host 172.16.1.1 to communicate with any other host using the udp protocol. This is not the requirement
of this question.
5. Answer: D
Explanation A. Incorrect. This command would just activate the routing protocol.
Explanation B. Incorrect. In order to ensure that router A learns all the connected networks on router B, you
must use the network command for each interface, and directly connnected interfaces.
Explanation D. Correct. The “router rip” command activates RIP as the routing protocol. The “network” com-
mand then activates RIP processing for interfaces associated with the networks. In order for router B to prop-
agate and receive information, both the 192.168.1.0 and 172.16.0.0 network statements must be present.
6. Answer:
Sacramento
RIP
EIGRP
Roseville
Explanation: The next hop en route to LA will be the Roseville router. If a router participates in several
routing protocols and the destination traffic has separate paths using the different routing protocols, it
will utilize the administrative distance of the routing protocol as a tiebreaker to determine the next hop
path. The route with the lowest administrative distance will win. In this case, EIGRP routes have an admin
distance of 90, where RIP is 120.
Chapter 5
1. Answers: A, B, C, D
Explanation A. Correct. Before a wireless station transmits, it must sense whether the medium is in use.
There are two methods for determining this:
-Checking the Physical Layer, or PHY, to see if a carrier is present
-Using the Network Allocation Vector (NAV), which is a transmission timer
Explanation B. Correct. The DCF (distributed coordination function) is an IEEE access mechanism for
controlling wireless medium access. DCF prevents two stations that sense a lull in traffic from sending
information at the same time through the use of a random backoff timer.
Explanation C. Correct. Acknowledgement frames notify a sending station that a transmission has been
received, and receive special treatment in the wireless world. These frames are not subject to any of the
backoff timers, and their timely delivery helps avoid needless retransmissions.
Explanation D. Correct. RTS/CTS are special control frames that are used when communicating with an
access point, and provide a “two-way” handshake method of transmission control.
Explanation E. Incorrect. Frame fragmentation is part of the 802.11 medium access control, but it is not di-
rectly a part of CSMA/CA. It allows for the breakup of frames into smaller pieces to reduce media contention.
2. Answer: B
Explanation A. Incorrect. Acknowledgement frames notify a sending station that a transmission has been
received, and receive special treatment in the wireless world. These frames are not subject to any of the
backoff timers, and their timely delivery helps avoid needless retransmissions.
Explanation B. Correct. Before a wireless station transmits, it must sense whether the medium is in use.
There are two methods for determining this:
-Checking the Physical Layer, or PHY, to see if a carrier is present
-Using the Network Allocation Vector (NAV), which is a transmission timer
Explanation C. Incorrect. Frame fragmentation is part of the 802.11 medium access control, but it is not di-
rectly a part of CSMA/CA. It allows for the breakup of frames into smaller pieces to reduce media contention.
Explanation D. Incorrect. RTS/CTS are special control frames that are used when communicating with an
access point, and provide a “two-way” handshake method of transmission control.
1. Answer: C
Explanation A. Incorrect. Plain text passwords are type “0” passwords. If this was plain text, the entry would
read: enable secret 0 $1$PhXB$ZF1hptFe6PADLVC/EGN6N/
Explanation B. Incorrect. Passwords that can be decrypted are tagged with a “7” in the cisco config. There
are several public utilities designed to “crack” these passwords.
Explanation C. Correct. Cisco tags its passwords with a 0, 5, or 7 to identify the type of password. In this
case, the password is a type 5, or MD5 encrypted password, which cannot be cracked.
2. Answers: A, B
Explanation A. Correct. This interface configuration command will always manually reset an interface,
resetting the status on port security.
Explanation B. Correct. This global configuration command will reset all port security violations, and en-
able the ports.
Explanation C. Incorrect. This command is set at the global configuration prompt. If you are in the interface
configuration mode, utilize the “no shutdown” command to reset the port.
Explanation D. Incorrect. This is not an IOS command. You will need to utilize either of the above com-
mands to reenable the switchport.
Chapter 7
1. Answers: A, C, D
Explanation A. Correct -The ACL allows H1 to access TCP port 80 (written as www) to host H2
Explanation B. Incorrect -The deny TCP blocks access on TCP ports 20-23. Access-lists are read by the router
in a top down manner so the deny statement is read first and blocks the permit statement below it.
Explanation C. Correct -The ACL allows access from H1 to H2 on UDP port 23. The deny statement above
does not affect this rule because it is UDP as opposed to TCP.
Explanation D. Correct -The ACL does permits H1 to access H2 via HTTPS (TCP 443)
Chapter 8
1. Answers: A, D, E
Explanation A. Correct. As ISDN provides integrated services; voice and video are part of the ISDN stan-
dard. Since ISDN uses baseband communication, its behavior such as speed, packet drop, and delay are
easily predictable, which is a huge plus for voice and video.
Explanation B. Incorrect. DSL technologies allow for speeds up to a couple Mbps, or tens of Mbps
in some cases. These technologies use existing telephone lines and complex algorithms for
broadband communications.
Explanation C. Incorrect. ISDN provides point-to-point connectivity, as there are only two parties in an ISDN
connection: called and called parties. Other technologies, such as Frame Relay, provide for mesh connectivity.
Explanation D. Correct. One of the most important applications of ISDN is for high density dial-up access,
used by ISPs and enterprise remote access solutions. The bandwidth of ISDN dial-up connections makes
this protocol preferred in comparison to legacy analog lines.
Explanation E. Correct. Pretty similar to remote access -ISDN can be used for cost effective remote access,
including dial backup.
2. Answer: C
Explanation A. Incorrect. The encapsulation types match on both routers. They are using HDLC. If this was
the problem, the line protocol would be down.
Explanation B. Incorrect. Cisco numbers serial interfaces based on primary and subinterfaces. 0/0 presents
hardware that usually has multiple serial interfaces on a card. A single-digit interface usually indicates a
fixed interface. This does not matter for WAN connections, and interface numbers do not need to match.
Explanation C. Correct. This WAN link is set up using a /30 network with two IPs. 172.16.1.12/30 is the
network, and 172.16.1.15 is the broadcast address. The interfaces should be IP’d with 172.16.1.13 and 14.
Router A is utilizing the network address, and this would cause issues.
Explanation D. Incorrect. Cisco is constantly creating new hardware types to provide faster performance
with improved signal quality, but this would not cause the stated issue.