You are on page 1of 133

The Online

CCNP SWITCH
642-813 Exam Guide
No filler.
No hype.
Exam-focused.
“A portable, comprehensive guide with everything you need to get up to
speed and pass the SWITCH Exam - the first time.”
www.ccnpguide.com
1|Page

Introduction
I started www.ccnpguide.com as a way for me to capture technical notes as I prepared for the three major CCNP Exams – SWITCH, ROUTE, & TSHOOT.
As I began sharing my notes with the world, I immediately started to receive feedback on the SWITCH exam’s focus areas and how difficult it was. What
I realized was that the exam prep resources available (read: Cisco Press Books) were not even covering all of the exam topics, including some that you
were required to configure in live simulation scenarios. First-time fail rates seemed normal and a big part of that was because the some of the simulation
scenarios required you to know some extremely specific protocol configuration details that most network professionals just wouldn’t know off the top of
their heads.
I began to tailor my notes to include topics that were not being covered in “official” exam guides and trimmed down those that just were not necessary.
The feedback was overwhelmingly positive from the online community! The problem is, of course, that the notes were not formatted well for off-line
consumption and didn’t include enough lab/scenario-based examples.
This guide is an answer to the countless requests to create a portable, comprehensive, and exam-focused SWITCH prep guide. I’ve refined the online
notes even more to focus exclusively on exactly what Cisco expects you to know on exam day. I have also included a Simulation Scenarios section at the
end. Lastly, Exam Takeaway notes are scattered throughout the guide to help connect you with the most important topics and study suggestions.
Here’s my recommendation. Read through this manual a few times and make sure you understand each chapter. Pay close attention to the Exam
Takeaway notes and take them seriously. After you feel comfortable with the details in each chapter, go to the Simulation Scenarios section and run
through the three scenarios until you can solve them off the top of your head. That may mean running through them ten times each, but trust me –
you’ll thank me when you sit for the test.
If you have questions, exam feedback, or want to reach out to me directly - shoot me an email at aaron@ccnpguide.com. I promise you’ll get a
response.

Best of luck.

2|Page

PPDIOO, Design, & Planning

4

VLANs and Trunks

9

InterInter-VLAN Routing

27

EtherChannels

41

Spanning Tree Protocol

47

SNMP, Syslog, & IP SLA

67

High Availability

75

Security

87

Wireless

98

VoIP

108

Simulation Scenarios

120

Shortcuts.

3|Page

Cisco Chapter 1:

642
813

PPDIOO,
Planning
& Design
4|Page

Planning
It’s tough for Cisco to test how to write up an implementation plan within the time frame allowed for the exam, so they test it indirectly. They may
present a complicated business problem with many undefined technical “implementation” components and require you to solve the problem. In order to
do so, you’ll have to be able to come up with an implementation plan on the fly to know which technologies, protocols, interfaces, etc. need to be
configured. Once you configure them, you will also need to come up with a “verification plan” in your head so you can verify that the business need was
met (and you get your points for the question).
An example may be a complex problem requiring you to configure new VLANs on a recently added switch (VLAN plan), add LACP trunks (HA plan),
change the routing on the existing multilayer switches to add the new VLAN networks (layer 3 planning). Load balance the all new connections using
HSRP (HA plan) based on business VLAN requirements (VLAN plan).
It’s easy to see how quickly a simulation scenario like that can cover many of the blueprint planning topics in a single exam question. Expect to see
situational problems like that example.

Implementation Plan Components
The implementation should consist of several phases (ex. install hardware, push configurations, cut-over to production, etc.). It is important to remember
the following steps for each phase:




Description of the step
Reference to design documents
Detailed implementation guidelines
Detailed roll-back guidelines in case of failure
Estimated time needed for implementation

5|Page

Specific Cisco Design
Recommendations
There are some general guidelines Cisco recommends around Layer 2 design. Cisco recommends the local VLAN approach if possible within the campus
environment. That allows the access layer to focus on port density and VLAN termination. The distribution layer can then be used for routing and
boundary definitions. The core is used exclusively for optimized transport of traffic.

General Network Planning Guidelines
Design

When verifying a new network design, test it first on a pilot network before implementing it network-wide on the production network
When planning for HA, to minimize the risk of potential outages, it is critical to use the appropriate technology as well as redundancy within that
technology to prevent single points of failure

Implementation Plan
A documented rollback plan should be part of any implementation plan.

Exam Takeaways 

Really pay attention to these Planning
Guidelines sections because the topic is
so ambiguous and Cisco loves these
sections.

6|Page

Security Planning Guidelines
Design


Make sure you have a list of the applications running in the
environment
If it is a security design, Cisco recommends having a network audit
Critical pieces to include when designing and implementing a
security solution is to include:
o An incident response plan
o The organization’s security policy
o A list of customer requirements

Verification Plan
Verification of an implemented security solution requires
results from audit testing of the implemented solution

VLAN Planning Guidelines
Implementation Plan


Some examples of organizational objectives when developing a VLAN implementation plan could include: improving customer support, increasing
competitiveness, and reducing costs
When creating a VLAN implementation plan, it is critical to have a summary implementation plan that lays out the implementation overview.
Incremental implementation of components is the recommended approach when defining a VLAN implementation plan.

Verification Plan
A VLAN-based implementation and verification plan should include:

Verification that the SVI has already been created and that it shows up on all required switches using the show vlan command.
Verification that trunked links are configured to allow the newly created VLANs

7|Page

SONA
SONA is a Cisco model that provides guidance, best practices, and blueprints for connecting network services and applications to enable business
solutions.
SONA outlines three layers for the enterprise network:
1. The Network Infrastructure Layer - where all the network devices are connected (network, servers, storage, etc)
2. The Interactive Services Layer - Allocated resources to applications delivered through the network infrastructure layer.
3. The Application Layer - Includes business applications.

PPDIOO

Prepare – organizational requirements, strategy, financial justification

Plan – network requirements, gap analysis with existing network infrastructure, project plan

Design - design specification created (used for implement phase)

Implement – network is built, additional components added

Operate – maintaining network health, day-to-day operations

Optimize – proactive management, potential to optimize network redesign

High-level benefits of a lifecycled approach:

Lower TCO of network
Increased availability


Improved business agility
Faster access to applications and services

8|Page

Cisco Chapter 2:

642
813

VLANS &
Trunks
9|Page

VLANs
A VLAN = a single broadcast domain = logical network segment (subnet)
VLANs are used to segment large broadcast domains into smaller, more manageable sections. By default, all switch ports are assigned to VLAN 1, type
Ethernet, and MTU of 1500 bytes.

Note: End user devices associated with a VLAN are unaware that the VLAN even exists.

To create a vlan:

Assign it to an interface:

To delete a vlan:

Switch# conf t
Switch(config)# vlan 43
Switch(config-vlan)# name Marketing
Switch(config-vlan)# exit

Switch(config)# int fa 1/23
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 43
Switch(config-if)# no shut

Switch(config)# no vlan 43

You should be aware that there are two types of VLAN configuration, static and dynamic. The most common method is static because it is simple and
easy to configure. It must be configured on every interface for every device.

A VLAN Membership Policy Server can be used to dynamically assign ports to a VLAN based on the
source MAC address of the host that is attached to the interface. If the same host moves to another
switch port on the network, the new interface is automatically assigned to the proper VLAN.

Exam Takeaways 

VLANs are important especially the
details of the two VLAN models. 

Make sure you understand the 80/20
rule and how it applies to the VLAN
models.

10 | P a g e

VLAN Models
End-to-end (or campus-wide VLAN deployments)
Every VLAN is made available to every access switch across the network. In this option, broadcasts must cross the core and suck up valuable resources.
Usually use VTP Client/Server modes.
This model is sometimes implemented for two primary reasons. First, users can connect to any switch port independent of their physical location and be
placed on the correct VLAN. Second, resource and security parameters can be defined for all members of a particular VLAN and can be updated from a
central location.

Local
Uses layer three at the distribution layer to keep inter-VLAN traffic within that switch block and is better suited for environments where most traffic is not
locally destined. Usually uses VTP transparent mode because you don’t want the VLANs propagated around the network (hence, “local”). In this model, a
VLAN should not extend past the distribution switch.

The 80/20 Rule
Back in the 1990′s when most network resources were local (ex. printers, servers), a design rule developed known as the “80/20 rule”. The rule stated
that you should design network boundaries such that 80% of traffic stays within the local subnet (doesn’t cross a backbone or leave the VLAN) and only
around 20% of traffic should be destined for remote sites (ex. Internet). Well the enterprise and computing has changed dramatically since then with
web-based services exploding – and now the new recommendation is the opposite, or the 20/80 rule. That means that 20% of traffic is local and 80%
traverses the distribution layer/core.
It’s an important concept because local VLAN model generally follows the opposite approach of the 80/20 rule, where most traffic is destined remotely.
Remember that.

11 | P a g e

Best practices for VLAN design

For the local VLANs model, limit 1-3 VLANs per access switch and limit those VLANs to only a couple access switches and the distribution switches.

Avoid using VLAN one as the “blackhole” for all unused ports.

Try to separate voice, data, management, default, and blackhole VLANs (each assigned their own VLAN ID).

In the local VLANs model, avoid VTP (use transparent mode).

Turn off DTP on trunk ports and configure them manually – also use IEEE 802.1Q over ISL.

Manually configure access ports that are not intended to be trunks by using the switchport mode host command. (disables EtherChannel, disables
trunking, and enables PortFast)

Prevent all data traffic from VLAN 1.

Avoid Telnet on management VLANs, use SSH instead.

User access ports are typically at least Fast Ethernet or Gigabit Ethernet. Links between the access and distribution layers are typically Gigabit
Ethernet or faster, layer 2, and have an oversubscription ratio of no more than 20:1. Links between the distribution and core should be Gigabit
Etherchannel or 10-Gig Ethernet, layer 3, with an oversubscription ratio of no more than 4:1.

VLAN Troubleshooting Steps
Physical Connection OK?

1

No

Check with CDP; fix any cabling or duplex
problems

Router and switch configuration OK?

2

No

Compare configurations and fix
inconsistencies

VLAN configuration OK?

3

No

Fix VLAN problems

12 | P a g e

VLAN Verification
To determine the trunking status of an interface:
# show int fa 1/24 trunk

For more detailed switchport information:
# show int fa 1/24 switchport

A simpler alternative would be just [show trunk].

Note: If you are troubleshooting a trunk link with this command and
notice that the operational mode description says “down”, the interface
itself is shutdown and needs to be started with the no shut command.

To determine the physical status of a link:

To see a list of VLANs and their assigned interfaces:

# show int fa 1/24 status

To check if an interface is assigned to a specific VLAN:
# show vlan id 100

This command is especially helpful as it displays all ports belonging to
the VLAN as well as the MTU of each assigned port and type.

# show vlan brief

To see a complete detailed interface list for all VLANs:
# show vlan

Note: The show vlan command does not include trunk ports in its VLAN
port output as they carry a variety of VLANs.

13 | P a g e

VLAN Trunking
There are two frame tagging methods for trunk links:

ISL
Cisco proprietary, adds own frame header and CRC
The ISL header is 26 bytes and it appends and additional CRC which is 4 bytes, for a total of 30 additional bytes to every ISL encapsulated frame.
Because it is proprietary, ISL trunk encapsulation will only work with Cisco devices – and not all Cisco switches even support it.

802.1Q
802.1Q is an open standard, inserts its own 4 byte tag within frame and recalculates the CRC value, allows for native VLANs (untagged frames to go
through)
802.1Q has become the dominate layer 2 trunking protocol in use today as fewer organizations use Cisco’s proprietary ISL. 802.1Q also adds a 4 byte tag
into the Ethernet frame for VLAN tagging and is designed exclusively for point-to-point links. The 4 byte field that is inserted by 802.1Q does not interfere
with the original frame header, so the MAC source/destination information is unchanged.
802.1Q is often used by service providers for tunneling secure VPNs. 802.1Q tunneling feature allows ISPs to segregate different customer’s traffic
throughout their infrastructure.
Using 802.1Q or ISL can create problems with other tagging methods. The maximum size for any
Ethernet frame, as specified by IEEE 802.3, is 1518 bytes. That means that if a frame entering a trunk
port is already near the maximum size, the header and CRC added by ISL or the inserted tag and CRC
added by 802.1Q will push the frame size over the IEEE limit. To resolve this conflict, the IEEE 802.3
committee created a subgroup – 802.3ac that extended the maximum Ethernet frame size to 1522
bytes. If you see the “Giants” counter on an interface anything other than zero, this is likely the cause.

Exam Takeaways 

Understand the details outlined here
about ISL and 802.1Q because you will
likely see a question or two.

14 | P a g e

DTP (Dynamic Trunking Protocol) is a proprietary protocol for negotiating a common trunking mode between two switches.

To Configure a VLAN Trunk Interface
Switch(config)# int fa 1/5
Switch(config-if)# switchport
Switch(config-if)# switchport trunk encapsulation {isl | dot1q | negotiate}
Switch(config-if)# switchport trunk native vlan 1 (for 802.1Q trunks only)
Switch(config-if)# switchport trunk allowed vlan {list | add list | remove list}
Switch(config-if)# switchport mode {trunk | dynamic {desirable | auto}}
// If set to dynamic, it defaults to ISL if not specified.

Trunk links by default allow all active VLANs (those that the switch knows about). Also, all dot1Q trunks use VLAN 1 as the default native VLAN.
It is recommended to specifically allow only VLANs that cross the trunk using the switchport trunk allowed vlan command. Because the switch will
forward broadcasts out all ports on that VLAN, frames will be forwarded over the trunk too – which wastes trunk bandwidth.
If a non-trunking port receives an ISL encapsulated frame, it will not be able to remove the ISL header and will by default drop the ISL frames. If a nontrunking port receives an 802.1Q encapsulated frame, it simply reads the destination MAC address and forwards the frame as it would any other layer 2
frame.

15 | P a g e

Trunking Modes
Make sure you understand how these trunking modes interact because it makes easy test material. Notice that even dynamic desirable (the most
aggressive dynamic trunking mode) will still not form a trunk if the other end is configured as an access port.

Trunk

Dynamic desirable

Dynamic auto

Nonegotiate

Manual permanent trunking
mode

(default) The port actively tries
to bring up the link as a trunk,
sending negotiations with the
other end

The port can be converted to a
trunk link, but only if the far end
requests it

Puts the interface into
permanent trunking mode and
does not send DTP frames

Exam Takeaways 

You really need to understand which
trunk types do and do not form trunks,
especially the dynamic and desirable
labels.

16 | P a g e

Trunk Troubleshooting

Native VLANs

When troubleshooting a trunk link, all of the following must be set the
same on both ends:

It is important that the native VLAN is configured correctly on both sides
of an 802.1Q trunk. Native VLAN is a “default” VLAN that allows frames
to be passed through the trunk untagged. If there were devices in the
middle of the trunk that required line access, they could use the native
VLAN. This is a rare situation, but worth understanding.




trunking mode (trunk, dynamic auto, dynamic desirable )
encapsulation
native VLANs (For dot1Q only and will only break native VLAN
traffic if mismatched)
allowed VLANs

If you are required to troubleshoot VLAN traffic that is not being passed
across a trunk, make sure that the VLAN is in the interface allowed list
for each side of the trunk. While all VLANs are allowed by default across
trunk links, many organizations explicitly define allowed VLANs over
trunks for security and to prevent unnecessary broadcast traffic on the
link.

VTP

VTP (VLAN Trunking Protocol) - uses layer 2 trunk frames to communicate VLAN information among switches. It manages the addition, deletion, and
renaming of VLANs across the network from a single source.

Organized into domains (only one per switch). Each switch within that domain must have the same VTP domain name configured otherwise database
information will not be synchronized. Because each switch can only be configured with a single VTP domain, it will only listen and act on VTP
advertisements it hears that match its own VTP domain name. Advertisements are used to communicate changes to other switches.

17 | P a g e

VTP Modes
VTP has three modes:

Server mode – These switches have full control for creation and changes to VLANs.

All changes are advertised out to all other switches. Each

domain has at least one VTP server.

Client mode – Cannot create or change VLANs, but they do send periodic advertisements and can change their configurations to match those they
hear.

Transparent mode – Do not participate in VTP.

In VTP version 1, a switch in transparent mode inspects VTP messages for the domain name

and version and forwards a message only if both match. VTP version 2 forwards VTP messages in transparent mode without checking the version - only a
matching VTP domain name is required.

VTP Configuration Revision
Number
VTP switches use an index called the VTP configuration revision number which is sent with VTP
advertisements. The configuration revision number helps to identify changes to the network by
increasing the revision number by one every time a change occurs. Every switch stores the revision
number of the last advertisement it heard. If a switch receives an advertisement with a higher revision
number than is stored locally, its configuration is changed to reflect the new advertisement and
forwards the advertisement to its neighbor switches.

Exam Takeaways 

Know:
• How VTP operates
• How revision numbers work
• How VTP modes work 

VTP is another surprisingly heavily
tested topic even though it is not widely
used in practice. 

Do not worry too much about the
configurations for VTP, it is mostly
18 | P a g e
theory.

If the revision number is the same as in the switch’s local database, it simply ignores the advertisement.
Finally, if the number in the advertisement is lower than the number stored in its database, the switch
will respond back with more current VLAN information.

It is important to set the revision number to 0 before inserting a new switch into a production environment. Transparent mode’s revision
number is always 0.
There are two ways to do it:

Change it to transparent mode, then back to server.
Change the VTP domain name to a bogus name, then change it back to the original.

If a switch is set to server (the default) or client and is inserted into the environment with a higher rev. number than the last advertisement, a VTP
synchronization problem occurs, potentially disabling all VLAN-assigned ports. Note that even a client with a higher revision number can take down the
entire network if it propagates its VLAN database to its peers - so be very careful when adding new switches!
Also, VTP information is stored in flash in the vlan.dat file. That way it survives reboots.

To check the VTP Revision Number:
Switch# show vtp status

VTP Message Types
There are three different types of VTP messages:

Summary advertisements

Subset advertisements

Requests from clients

Sent from all switches every 300 seconds (5
minutes) and after any VLAN-related changes
(Added, removed, renamed)

VTP servers send subset advertisements after
a VLAN change occurs that follow the
summary advertisements. They provide more
specific details into the changes.

Clients can requests any VTP information they
don’t have. The server will respond with a
summary advertisements and subsequent
subset advertisements.

19 | P a g e

VTP Versions
VTP has two versions (1 & 2) that are not interoperable. All that is required to change from v1 to v2 across the network is to change one server switch to
v2 and it will send out an advertisement to all other switches to make the change as well. v1 is the default.

To Configure a VTP server for v2:
Switch(config)# vtp version 2

VTP v2 has the following enhancements over v1:



Token Ring VLAN support
TLV support
Version-independent message forwarding
Performs consistency checks

VTP Pruning
VTP Pruning makes more efficient use of trunk bandwidth by reducing unnecessary flooded traffic over trunk links. Broadcasts and unicast frames are
only transmitted over a trunk link if the switch on the receiving end of the trunk has ports in that VLAN.
By default, VTP pruning is disabled; to enable it:
Switch(config)# vtp pruning

When pruning is enabled on a server, it propagates the pruning to all switches in the management domain. (This is generally the quickest way to enable it
within your switched network). Also, VLAN 1 is considered pruning ineligible by Cisco. VLANs 2-1000 are eligible for pruning by default.

20 | P a g e

VTP Configuration
Note: VTP information will not be exchanged without first configuring the VTP domain name.

To Configure a VTP Management Domain:
Switch(config)# vtp domain domain-name
Switch(config)# vtp mode {server | client | transparent}
Switch(config)# vtp password password

Note: If a VTP password is locally configured, the same password must be set on all VTP-participating switches.

After VTP is configured, the switch will begin passing the management domain, configuration revision number, and known VLANs and their parameters
through its trunk links.

VTP Example Configuration:
Step 1. Enter global configuration mode:
Switch# configure terminal
Step 2. Configure the VTP mode as server:
Switch(config)# vtp mode server
Step 3. Configure the domain name:
Switch(config)# vtp domain domain_name
Step 4. (Optional.) Enable VTP version 2:
Switch(config)# vtp version 2

Step 5. (Optional.) Specify a VTP password:
Switch(config)# vtp password password_string

Step 6. (Optional.) Enable VTP pruning in the management domain:
Switch(config)# vtp pruning

21 | P a g e

Verifying the VTP Configuration
To display information about the VTP configuration:
Switch# show vtp status
The show vtp status command is extremely valuable when troubleshooting a VTP issue. It shows the configuration register number on the switch, the
VTP domain name, VTP version number, and VTP mode (ex. server).

To display statistics about the VTP operation:
Switch# show vtp counters

VTP Troubleshooting
Troubleshooting VTP if a switch does not seem to be receiving updates from a VTP server switch:

Make sure the switch is not set to transparent mode.

The link towards the VTP server may not be in trunking mode. Remember that VTP advertisements are only sent over trunked links. Perform a

sh int xx/x switchport to verify.

Make sure the VTP domain name matches that of the server (it is case sensitive).

Make sure the VTP version is set the same.

If using VTP passwords, make sure they match on both the server and client.

22 | P a g e

Private VLANs
Private VLANs allow you to prevent layer 2 connectivity between two devices within the same VLAN. An example would be two web servers that reside on
the same network, but for security purposes, should never communicate. This allows a separated environment, but one that conserves IP addresses.
Both ISPs and web hosting providers are frequent users of private VLANs.
Private VLAN ports are associated with a set of supporting VLANs. Only when both concepts are combined will private VLANs function properly. The
terms Cisco uses are primary and secondary private VLANs. In a nutshell, a normal or primary VLAN can be associated with a specially defined secondary
private VLAN.

Private VLAN Port Types
There are two secondary private VLAN port types:

Isolated
Complete Layer 2 separation from other ports within the same Private VLAN, except for promiscuous ports. All traffic to the port is blocked, except traffic
from promiscuous ports. (Ex. a port configured for a highly-secure server)

Community
Communicate among themselves as well as the promiscuous port. Several devices can belong to a
common community private VLAN, in which they will only be able to talk to each other and the
promiscuous port (ex. default gateway).

Exam Takeaways 

Note: All secondary VLANs must be associated with one primary VLAN. Also, VTP does not pass private
VLAN information so the private VLAN configuration is only local to the switch they are configured on.

Private VLANs are complicated and you
will likely not see many questions on
the topic. Focus on understanding how
the
promiscuous,
isolated,
and
community ports interact and where
they would be assigned.

23 | P a g e

Interface Modes
Each physical switch interface that uses a private VLAN must be configured with a VLAN association. The interface can be one of two modes:

Promiscuous
They can communicate with all other ports within the private VLAN. These are usually assigned to router or VLAN interfaces as they need access to all
the networked devices within the private VLAN. A promiscuous port is only part of one primary VLAN, but each promiscuous port can map to more than
one secondary Private VLAN.

Host
A switch port that connects to a regular host that resides in a community or isolated VLAN. The port only communicates with the promiscuous port or
ports in the same community VLAN.

Private VLAN Configuration
1. Set the VTP mode to Transparent
Switch(config)# vtp mode transparent

2. Define the secondary VLAN(s)
Switch(config)# vlan 20
Switch(config-vlan)# private-vlan {isolated | community}

3. Define the primary VLAN
Switch(config)# vlan 10
Switch(config-vlan)# private-vlan primary
Switch(config-vlan)# private-vlan association {secondary-vlan-list | add secondary-vlan-list | remove
secondary-vlan-list}

24 | P a g e

4. Define the physical interface
Switch(config-if)# switchport mode private-vlan {host | promiscuous}
Switch(config-if)# switchport private-vlan host association primary-vlan-id secondary-vlan-id

or
Switch(config-if)# switchport private-vlan mapping primary-vlan-id secondary-vlan-list | {add secondary-vlanlist} | {remove secondary-vlan-list}
** Interfaces set to promiscuous mode you must “map” the port to primary and secondary VLANs. Just remember that promiscuous ports are “mapped”
and host ports are “associated”.

Private VLAN Configuration Example
This is getting messy, so let’s run through an example that configures both isolated and community secondary private VLANs as well as host and
promiscuous interfaces:
Switch# conf t
Switch(config)# vtp mode transparent
Switch(config)# vlan 40
Switch(config-vlan)# private-vlan community
Switch(config)# vlan 50
Switch(config-vlan)# private-vlan community
Switch(config)# vlan 60
Switch(config-vlan)# private-vlan isolated
Switch(config)# vlan 100
Switch(config-vlan)# private-vlan primary
Switch(config-vlan)# private-vlan association 40,50,60
Switch(config-vlan)# exit
…continued below

25 | P a g e

Switch(config)# int fastethernet 0/4
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host association 100 40
Switch(config)# int fastethernet 0/5
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host association 100 50
Switch(config)# int fastethernet 0/6
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan host association 100 60
Switch(config)# int fastethernet 0/1
Switch(config-if)# switchport mode private-vlan promiscuous
Switch(config-if)# switchport private-vlan mapping 100 40,50,60

Private VLANs on SVIs
On switched virtual interfaces (SVIs) or layer 3 VLANs with IP addresses, an additional map must be inserted. For this example, let’s use layer 3 VLAN
300 as the primary VLAN. Let’s also assume that we have already created and configured secondary private VLANs 80 and 90. These are the additional
mapping steps that must occur:

Switch(config)# vlan 80
Switch(config-vlan)# private-vlan isolated
Switch(config)# vlan 90
Switch(config-vlan)# private-vlan community
Switch(config)# vlan 300
Switch(config-vlan)# private-vlan primary
Switch(config-vlan)# private-vlan association 80,90
Switch(config-vlan)# exit
Switch(config)# interface vlan 300
Switch(config-if)# ip address 192.168.1.199 255.255.255.0

At this point, VLAN 300 can communicate at layer 3, but the secondary VLANs (80 & 90) are stuck at layer 2. To allow the secondary VLANs to switch
layer 3 traffic as well, you need to insert this mapping on the primary VLAN (SVI) interface:
Switch(config-if)# private-vlan mapping 80,90

26 | P a g e

Cisco Chapter 3:

642
813

InterVLAN
Routing
27 | P a g e

Inter-VLAN Routing
VLANs require a layer 3 device between them to
communicate. Cisco recommends using layer 3
routing at the distribution layer or core layer of
the multilayer switched network to terminate local
VLANS, isolate network problems, and avoid
access layer issues from affecting the core.

There are 3 inter-VLAN routing device
options:


layer 3 multilayer Catalyst switch
external router that allows trunking (routeron-a-stick)
external router with enough interfaces for
every VLAN (this doesn’t scale and is very
expensive)

All Catalyst multilayer switches support the
following types of layer 3 interfaces:
Routed port – a pure layer 3 port similar to that
on a router
Switch virtual interface (SVI) – virtual routed
VLAN interface for inter-VLAN routing
Bridge virtual interface (BVI) – a layer 3
bridging interface

28 | P a g e

External Router (router-on-a-stick)
A layer two switch can be connected to a single router to allow inter-VLAN communication either using a single physical link as a trunk with multiple subinterfaces (a.k.a. router-on-a-stick) or using separate physical links between the switch and router for each individual VLAN.

Router-on-a-stick Example:
interface FastEthernet 0/1
no ip address
duplex auto
speed auto
interface FastEthernet 0/1.10
description data vlan
encapsulation dot1q 10
ip address 10.1.10.0 255.255.255.0
interface FastEthernet 0/1.20
description mgmt vlan
encapsulation dot1q 20
ip address 10.1.20.0 255.255.255.0
interface FastEthernet 0/1.55
description native vlan
encapsulation dot1q native
ip address 10.1.55.0 255.255.255.0

Advantages

Works with almost all switches because the switches do not have
to support layer 3, just VLANs and trunking
Simple configuration (one switch port, one router interface)

Disadvantages


Router is a single point of failure
If the trunk becomes congested, it can affect every VLAN
Slightly higher latency because traffic must leave and re-enter
the switch and the router makes the traffic decisions in software
(which is slower than hardware)
The added processing on the router will add overhead

Exam Takeaways 

While it is important to understand the
router-on-a-stick
model,
you
will
probably not have to answer too much
on it or configure it.

29 | P a g e

Configuring Inter-VLAN Routing with an External
Router
Implementation Planning

Need to know how many VLANS require routing, the VLAN IDs,

Example Router Interface Configuration:

and what ports connect to the router

Every router subinterface must be configured with the same
type of frame encapsulation (usually 802.1q) as well as the
switch side of the link

Make sure the native VLAN is the same on both ends. Now a
subinterface on the router can be created for the native VLAN,
also if it is a subinterface – make sure to define its
encapsulation type with the encapsulation dot1q ID vlan
command.

It is best practice to match the subinterface ID to the VLAN ID

Router(config)# interface FastEthernet0/0
Router(config-if)#no shutdown
Router(config)# interface FastEthernet 0/0.1
Router(config-subif) description VLAN 1
Router(config-subif)# encapsulation dot1Q 1 native
Router(config-subif)# ip address 10.1.1.1 255.255.255.0
Router(config-subif)# exit
Router(config)# interface FastEthernet 0/0.2
Router(config-subif)# description VLAN 2
Router(config-subif)# encapsulation dot1Q 2
Router(config-subif)# ip address 10.2.2.1 255.255.255.0
Router(config-subif)# exit
Router(config)# end

Example switch trunk interface configuration
Configuring Router-on-a-stick
1. Enable trunking on the switch port

switch(config)# interface FastEthernet 4/2
switch(config-if)# switchport trunk encapsulation dot1q
switch(config-if)# switchport mode trunk

2. Enable the router interface with the no shut command
3. Create the subinterfaces on the router for each VLAN
4. Configure IPs and encapsulation on each subinterface as they relate to their VLANs

30 | P a g e

Switch Virtual Interfaces
Remember that Cisco recommends using layer 2 between access and distribution layers and layer 3 routing between distribution and core layers.
SVIs are virtual VLAN interfaces on multilayer switches; one SVI is created for each VLAN to be routed and it performs the process for all the packets
associated with that VLAN. The only SVI created by default is the SVI for VLAN 1. The rest must be created manually using the command:
Switch(conf)# interface vlan vlan_id

SVIs are commonly used for:

Default gateways for users within the VLAN

Virtual route between VLANs

Provides an IP address for connectivity to the switch itself

Can be used as an interface for routing protocols

Exam Takeaways 

An SVI is considered “up” when at least one interface in its associated VLAN is active and forwarding
traffic. If all interfaces within that VLAN are down, the SVI goes down to prevent creating a routing
black hole.

SVIs are a very important topic on the
exam (as it should be). 

The SVI Autostate feature is relatively
minor.

Advantages 

If you do not know how to configure
SVIs, do not take the exam. 

Be familiar with VLAN 1 (default) 

Use the IP routing command when
required!



Fast because all performed in hardware

No need for external links for routing
Low latency (doesn’t need to leave
the switch)

Disadvantage

May require a more expensive switch

31 | P a g e

Configuring Inter-VLAN Routing with SVIs
Implementation Planning

Identify which VLANs require layer 3 gateways as you may not want all VLANs to be routable within the organization

Make sure VLANs are first created on the switch, then make the SVIs

Find out what IPs need to be configured on each SVI interface, then use the no shutdown command to enable them

Configure any routing protocols that are required

Determine if any switch ports should be excluded from contributing to the SVI line-state up-and-down calculation

Configuring SVIs
1. Enable IP routing

Example Configuration:

2. Create the VLANs
3. Create the SVI
4. Assign an IP address to each SVI
5. Enable the interface
6. Optional – Enable an IP routing protocol

Switch# configure terminal
Switch(config)# ip routing
Switch(config)# vlan 10
Switch(config)# interface vlan 10
Switch(config-if)# ip address 10.10.1.1 255.0.0.0
Switch(config-if)# no shutdown
Switch(config)# router rip
Switch(config-router)# network 10.0.0.0

Note: Routing protocols are only required to allow different devices to
communicate across different VLANs or networks. They are not required
to route between SVIs on the same switch because the switch sees the
SVIs as connected interfaces.

32 | P a g e

SVI Autostate
An SVI is automatically created when the following conditions are met:


The VLAN is active and exists in the VLAN database
The VLAN interface exists and is not administratively shut down
At least a single port on the switch has a port in the VLAN, is in the up state, and is in the spanning-tree forwarding state.

If there are multiple ports on the switch in the same VLAN, the default action is to take down the SVI interface if all of the ports in that VLAN are shut
down.
The command switchport autostate exclude, when applied to port, will allow the VLAN to go down if all of the other ports in the VLAN go down
except the one autostate exclude was applied to. This is often desirable when traffic analyzers are attached to a host. They will stay up, but are just
passive monitors, so if all other devices in the VLAN go down – this port would prevent the VLAN from going down, so autostate exclude is applied to
allow the VLAN to still go down.

Routed Ports
Routed ports are physical ports on the switch that act much like a router interface would with an IP address configured. Routed ports are not associated
with any particular VLAN and do not run layer 2 protocols like STP and VTP.

Note: Routed interfaces also do not support subinterfaces.

Routed ports are point-to-point links that usually connect core switches to other core switches or distribution layer switches (if the distribution layer is
running layer 3). They can also be used when a switch has only a single switch port per VLAN or subnet.
Make sure when configuring a routed port that you use the no switchport command to make sure the interface is configured to operate at layer 3. Also
make sure to assign IP addresses and any other layer 3 information required. Check that routing protocols are configured.

33 | P a g e

Advantages

A multilayer switch can have both SVIs and routed ports configured
Multilayer switches forward all layer 2 and 3 traffic in hardware, so it is very fast

Configuring Inter-VLAN Routing with Routed Ports
1. Select the interface
2. Convert to layer 3 port (no switchport command)
3. Add an IP address
4. Enable the interface (no shut command)

Example:
Core(config)# interface GigabitEthernet 1/1
Core(config-if)# no switchport
Core(config-if)# ip address 10.10.1.1 255.255.255.252
Core(config-if)# exit

Verification Commands
show
show
show
ping
show
show

ip interface interface_type_port | svi_number
interface interface_type_port | svi_number
running interface type_port | svi_number
vlan
interface trunk

Troubleshooting Inter-VLAN
Problems
Here is a list to run through when identifying an issue related to interVLAN routing:



Correct
Correct
Correct
Correct

VLANs on switches and trunks
routes
primary and secondary root bridges
IP addresses and masks

34 | P a g e

Routing Protocol Configuration
Unlike routers, multilayer switches do not automatically route until a layer 3 interface is defined or an SVI is created. Routing can be configured just like
on an actual router, using static routes and dynamic routing protocols. If routing is required, make sure the global ip routing command has first been
applied. You may be required to do some dynamic routing protocol configuration on a multilayer switch within the SWITCH exam, so make sure you
brush up on your routing protocol basics.

Example:
Switch(config)# ip routing
Switch(config)# router eigrp 20
Switch(config-router)# no auto-summary
Switch(config-router)# network 10.0.0.0
Switch(config-router)# exit

To verify a routing protocol is behaving as expected, use the show ip route command to display the active routing table routes. Show IP route will allow
you to see the routing protocols currently running on the device.

Multilayer Switching
A Multilayer switch can perform both layer two switching as well as inter-VLAN routing. While I spend a considerable amount of time walking through the
low-level details here, Cisco thinks it is really important. It’s also easy for Cisco to ask SWITCH exam questions on (like the order of operations), so take
your time and make sure you understand the process. Knowing the order of events within the switch will help you understand how the many forwarding
and filtering options interact.

35 | P a g e

Switch Forwarding Architectures
There are three different ways packets are switched on a layer 3 switch or router:
Process Switching
Each packet is examined by the internal processor and is handled in software. This is the slowest option (only used in routers).
Route Caching (old method also known as “fast switching”)
The route processor tracks a flow’s first packet, setting up a “shortcut” for the remaining packets to avoid software-based routing, instead being
immediate forwarded in hardware. This method is faster than process switching and is done in both routers and layer 3 switches.
Cisco Express Forwarding (a.k.a. CEF or topology-based switching)
Layer 3 routing table dynamically populates a single database of the entire network topology in hardware (the FIB) for fast and efficient lookup. This is
the fastest method and is the default option within Cisco routers and multilayer switches.

Cisco Express Forwarding
Multilayer Switching, or MLS, is a fairly general term used to describe features that enable very efficient routing of traffic between VLANs and routed
ports. Cisco Express Forwarding, or CEF, is the specific implementation of MLS Cisco uses on their multilayer switches.

Layer 2 Forwarding Process

INPUT

OUTPUT

1. Receive frame
2. Verify integrity

1. Apply outbound VLAN ACL
2. Apply outbound QoS ACL

3. Apply inbound VLAN ACL

3. Select outbound port

4. Lookup destination MAC

4. Place in port queue
5. Rewrite
6. Forward frame

36 | P a g e

Layer 3 Forwarding Process
INPUT

ROUTING

OUTPUT

1. Receive frame

1. Apply input ACL

1. Apply outbound VLAN ACL

2. Verify integrity
3. Apply inbound VLAN ACL

2. Switch if entry is in CEF cache
3. Identify exit interface and next hop
address using routing table

2. Apply outbound QoS ACL
3. Select egress port

4. Look up dest. MAC

4. Apply output ACL

4. Place in interface queue
5. Rewrite layer 3 packet (src. + dest.
MAC, IP checksum and FCS, decrement
TTL in IP header)
6. Forward

CAM
The CAM table stores information about frames that pass through the switch for more intelligent
forwarding.
The CAM table stores two pieces of information about traffic:

MAC address
Inbound port

Exam Takeaways 

There are a lot of notes here about CEF
because it is complicated, but do not
sweat it too much. There is no need to
memorize
details
like
the
input/routing/output/ process. 

Read through this MLS section a couple
times to make sure you understand how
each feature works at a high level.

Frames passing through the switch first enter the ingress queue, then proceed simultaneously to the
Security TCAM (ACLs), QoS TCAM, and L2 Forwarding Table (CAM). Afterwards, they all then enter the
egress queue before exiting an interface.

37 | P a g e

CAM Command Summary
#sh mac address-table dynamic
Allows you to view the contents of the switch’s CAM table (ones learned through passing frames)

#sh mac address-table count
Shows the CAM table entries according to VLAN assignments. So if you want to see how many hosts the switch knows about in a particular VLAN, this
lays it out in a nice table format.

TCAM
The TCAM stores layer 3 and up information including QoS, ACLs, and routing info. The TCAM always is organized by masks – each mask has 8 value
patterns associated with it. Note that each mask-value pair is evaluated simultaneously (in parallel) looking for the longest match in a single look up.
Troubleshooting tip: If you need to find out where a particular device is attached to the network, you can run the sh mac address-table dynamic address
xxxx.xxxx.xxxx command at the core of the network, determining which ports it is connected to (and thus downstream switch). Continue the process
until you reach the final access switch that the device is attached to.

FIB + Adjacency Tables
The FIB, or Forwarding Information Base, is what allows CEF to switch layer three traffic so quickly. It is created in hardware using the existing routing
table to create a single route cache, allowing the packets to be forwarded directly the very first time they are seen on the switch.

38 | P a g e

The FIB uses destination IP address as table index. Also contains next-hop IP and MAC so no other look up is necessary.
CEF uses another table, the adjacency table, along with the FIB to quickly forward packets. While the FIB stores the routing information, the adjacency
table is derived from the ARP table and stores the layer 2 next-hop address and frame header rewrite information for all FIB entries. The control plane is
what controls and coordinates all of this information, which is physically separate from the data plane (the actual layer 2 forwarding). This further allows
performance improvements.
To recap, the FIB is responsible for maintaining the next-hop IP address for all known routes and the adjacency tables maintain the layer 2 information.
The adjacency tables link to the FIB entries, so combined they provide all the layer 2 and 3 next hop information necessary to dramatically increase
packet switching speed. When the adjacency table is full, a TCAM entry points to the L3 engine to redirect the adjacency.

There are five adjacency categories that you should be aware of:




Null
Punt
Glean
Discard
Drop

For the CCNP SWITCH exam, it’s not important that you understand the function of each adjacency. Just know that they provide L2 information for CEF,
are derived from ARP table, and be able to recognize the names.

39 | P a g e

Distributed CEF (dCEF)
Distributed CEF, commonly denoted dCEF, speeds up CEF switching even more by running a FIB table on each of a switch’s line cards. Because the FIB
look up occurs directly on the line card itself, it no longer has to query the switch’s processor or route table for next hop information.
This is currently the fastest method of implementing CEF on Cisco switches. Switching methods in order from fastest to slowest: dCEF, CEF, fast
switching, process switching.

CEF Configuration and Verification
All modern Catalyst switches use CEF by default, so no manual configuration is necessary.

Some verification commands to know:
Switch# show ip cef
Shows entries currently in the FIB

Switch# show adjacency
Displays current adjacency information

CEF Exceptions
Some types of traffic are not able to bypass the processor using CEF. Some examples include:



ARP packets
Router response (TTL expired, MTU exceeded, etc.)
IP broadcasts (DHCP request)
Routing Protocol Updates




CDP packets
Anything encrypted
Packets triggering NAT
Most non-IP packets

40 | P a g e

Cisco Chapter 4:

EtherChannels
642

813
41 | P a g e

EtherChannel is a term used to describe bundling or aggregating 2-8 parallel links. EtherChannel provides a level of link redundancy. If one link in the
bundle fails, traffic sent through that link is automatically moved to an adjacent link.
Normally multiple links between switch creates the potential for bridging loops, but because an EtherChannel bundle is treated as a single logical link by
both switches, it avoids the problem. Also, Spanning Tree sees the bundle as a single link so individual ports will not be placed in a blocked STP state,
allowing greater bandwidth utilization. If there are two redundant EtherChannel bundles, one entire EtherChannel will be blocked by STP to prevent a
loop.
Any changes made to an interface after the EtherChannel has been created will be automatically made to all other ports in that bundle.
cannot form if any of the assigned ports are SPAN ports.

Also – bundles

EtherChannel links can be either access or trunk links, but if they are trunked (usually the case), they require the following be the same on all
connected interfaces:




VLANs
Trunking Mode
Native VLAN
Speed
Duplex

EtherChannel Link Negotiation
Protocols
PAgP (Port Aggregation Protocol)

Cisco proprietary

Forms EtherChannel only if ports are configured for identical static VLANs or trunking

42 | P a g e

Will automatically modify interface parameters on all ports in the bundle if the EtherChannel interface is changed.

STP sends packets over only one physical link in a PAgP bundle. Because STP’s algorithm uses the lowest port priority (priority + port ID), if
defaults are set, STP will always use the lowest number port for BPDUs.

LACP (Link Aggregation Control Protocol)

An open standard to PAgP

IEEE 802.3ab

Uses priority system for end switches

Switch with the lowest system priority (2 byte value followed by MAC – lowest wins) determines which ports are active in the EtherChannel at any
given time.

Uses port priority to determine which ports to place in standby mode if hardware limitations do not allow all ports to participate in the
EtherChannel.

Most leave the system and port priority to defaults

EtherChannel Negotiation Protocols Summary
PAgP

LACP

On

On

Auto

Passive

Desirable

Active

Negotiation Characteristics
Sent?
No
All ports
channeling
No
Waits to channel
until asked
Yes
Actively asks to
form a channel

Exam Takeaways 

EtherChannel is definitely important in
terms of L2 connectivity, so make sure
you know the details of PAgP and LACP! 

Know the configuration for LACP
because you will likely have to configure
it. 

L3 EtherChannels not important 

43 negotiation
|Page
Memorize the EtherChannel
table

Configuration
PAgP

LACP

PAgP EtherChannel Interface Example:

LACP EtherChannel Interface Example:

Switch(config)# interface fa 1/1/2
Switch(config-if)# channel-protocol pagp
Switch(config-if)# channel-group number mode {on |
{{auto | desirable} | [non-silent]}}

Switch(config)# lacp system-priority number
(optional)
Switch(config)# interface fa 1/1/3
Switch(config-if)# channel-protocol lacp
Switch(config-if)# channel-group number mode {on |
passive | active}
Switch(config-if)#lacp port-priority number
(optional)

By default, PAgP operates in silent submode – allowing ports to be
added to the EtherChannel, even if it does not hear anything from the
far end. This allows a switch to form an EtherChannel with a non-PAgP
devices such as a network analyzer or server. It is best practice to
always use non-silent mode when connecting two switches together.

It’s important to note that EtherChannels can operate at layer 2 and 3. The configuration is a bit different between the two, so it is important to
recognize what type you need before you begin your configurations. Layer 2 EtherChannel links are simply bundled switch links that acts as one logical
link. This is most commonly used for trunked links between switches.
Layer 3 EtherChannel bundles allow you to create a virtual portchannel link that can be configured with an IP address. An example where this would be
useful would be if you are connecting an EtherChannel bundle to a router. The router will require that its bundle has an IP address, so the virtual
portchannel interface that you create can be assigned an IP address. Another example would be between multilayer switches at the distribution and
core layers. Cisco recommends running layer 3 connectivity between the two and EtherChannels would assist with providing increased bandwidth and
redundancy.

44 | P a g e

Switch(config)# interface portchannel number
Switch(config-if)# ip address x.x.x.x x.x.x.x (for layer 3 only)
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk vlan allowed vlan 2,56,70
Switch(config-if)# switchport trunk native vlan 99

Note that in the configuration example above how the interface mode (trunk) and VLANs are all configured on the portchannel directly and not on the
physical interfaces that make up the bundle. While it will pass traffic either way, it is much simpler to manage VLAN consistency and configuration on the
bundled link.
A LACP system priority can be assigned to define the decision-making switch (lower priority wins – default is 32,768). If no priority is
assigned, the switch with the lowest MAC address will be assigned.

Etherchannel Load Balancing
The bundles use an algorithm to determine each link’s load, so they will never be able to operate at 100% capacity of the sum of the links. That means
the load will not be balanced equally amongst the individual links. A hash algorithm is used to determine which individual interface each frame is
forwarded through.
The algorithm can use source IP, destination IP, a combination of the two, source and destination MAC, or TCP/UDP port numbers. If only one address or
port number is used for the hash, the switch uses one or more low-order bits of the hash results as an index into the bundled links. If two or more
addresses and or TCP ports are hashed, the hash performs an XOR on the low-order bits of the addresses or ports as the index.

To configure the EtherChannel load balancing type globally on the switch:
(config)# port-channel load-balance method

45 | P a g e

Methods:



src-ip source IP
dst-ip destination IP
src-dst-ip source and destination IP (XOR)
**DEFAULT METHOD**
src-mac source MAC





dst-mac destination MAC
src-dst-mac source and destination MAC (XOR)
src-port source port
dst-port destination port
src-dst-port source and destination port (XOR)

Troubleshooting an EtherChannel
Remember that there should be consistent configurations on both ends of the bundle.

If using mode “on”, make sure both ends are set to it.

If one end is set to desirable (PAgP) or active (LACP), the other side must be set to either desirable or auto.

Auto (PAgP) passive (LACP) modes require the far end to request for participation.

PAgP auto and desirable modes default to silent submode – which will establish an EtherChannel without hearing from the far end. If set to nonsilent submode, packets must be received from the far end before a channel will form.

To verify the EtherChannel Status:
Switch# show etherchannel summary
To verify an individual port’s configuration:
Switch# sh run interface xx/xx
To check for EtherChannel errors on an interface:
Switch# sh run interface xx/xx etherchannel
To verify the EtherChannel load balancing on a switch:
Switch# sh etherchannel load-balance

46 | P a g e

Cisco Chapter 5:

642
813

Spanning
Tree
Protocol
47 | P a g e

Spanning Tree Protocol (STP) is designed to prevent problems related to bridging loops. STP solves the problem by blocking redundant paths and
allowing only a single active path.
Spanning tree works by selecting a root switch then selecting a loop-free path from the root switch to every other switch. To do that spanning tree must
choose a single root bridge, one root port for each nonroot switch, and a single designated port for each network segment.

Several different versions of Spanning Tree have been introduced over the years. Here are a few:
Common Spanning Tree (CST)
IEEE 802.1D, One instance of spanning tree runs for the entire switched network resulting in low CPU requirements, but suboptimal traffic paths when
multiple VLANs are used. It is also slow to converge.
Per VLAN Spanning Tree Plus (PVST+)
One instance of STP per VLAN, more resources required, slow convergence still, includes portfast, BPDU guard, BPDU filter, Root Guard, and Loop Guard.
Rapid STP (RSTP)
IEEE 802.1w, One instance of STP, but very fast convergence time. Still suboptimal traffic flows because only a single instance for the entire switched
network.
Multiple Spanning Tree (MST)
An IEEE standard that allows you to map multiple VLANS with similar traffic flow requirements into the same spanning-tree instance. MST also supports
RSTP for fast convergence. Each instance supports portfast, BPDU guard, BPDU filter, Root Guard, and Loop Guard.
PVRST+
A Cisco enhancement to RSTP that behaves similar to PVST+. It supports a separate instance of RSTP for each VLAN and each instance supports
portfast, BPDU guard, BPDU filter, Root Guard, and Loop Guard. This option has the largest CPU and memory requirements.

Note: MST and PVRST+ have become the dominate spanning-tree protocols of choice and in Cisco switches, PVST+ is the default flavor of STP that is
enabled when a VLAN is created on most switches.

48 | P a g e

STP Path Selection

STP Definitions

Spanning tree builds the tree structure attempting to use the fastest
links it has available for the active paths. STP uses the following steps
to select its paths:

Bridge ID – bridge priority + MAC Address
Bridge Priority – 0-65,535

1. Lowest root bridge ID (BID)

Default Priority – 32,768

2. Lowest path cost to the root

Port ID – port priority + port number

3. Lowest sender bridge ID

Port Priority – 0-240 (default is 128, increments of 16)

4. Lowest sender port ID (PID)
Path Cost – The cumulative cost of all links between the switch and the
root bridge

STP Convergence
1. Root bridge election
Each VLAN elects one root bridge. All ports on the root bridge act as designated ports, which send and receive traffic as well as BPDUs. The bridge with
the lowest priority becomes root.
2. Root ports are determined on all non-root bridges
Each non-root bridge is assigned a single root port that sends and receives traffic. The root port is chosen based on the port with the lowest-cost path
between the non-root bridge and the root bridge. If two paths are equal cost, the port with the lowest port ID (priority + port number) will win.
3. Designated port selection
Each segment has a single designated port. Designated ports are chosen from on non-root ports that have the lowest path cost to the root bridge. In the
event of a tie, the bridge ID acts as a tiebreaker (lowest wins). All ports on a root bridge are designated ports.

49 | P a g e

STP Port Roles
Root port



On non-root bridges only
Forwards traffic towards the root bridge
Only one per switch
Can populate the MAC table

Designated port




On root and non-root bridges
All ports on root bridge are designated
ports
Receives and forwards frames towards
the root bridge as needed
Only one per segment
Can populate the MAC table

Nondesignated port



Does not forward packets (blocking)
Does not populate the MAC table
Disabled port
A port that is shut down

STP Port States
Blocking


In nondesignated status and does not
forward frames
Receives BPDUs to determine root switch
Default 20 seconds in this state (max
age)

Listening

Receives and sends BPDUs
15 seconds (forward delay)

Learning

Populates the CAM table
15 seconds (forward delay)

Forwarding


Part of the active topology
Forwards frames
Sends and receives BPDUs

Disabled

Does not participate in STP
Does not forward frames

50 | P a g e

Spanning-tree uses a link cost calculation to determine the root ports on non-root switches. It is calculated by adding the costs of all links between the
root bridge and the local switch.
10 Gbps

> Cost 2

1 Gbps

> Cost 4

100 Mbps > Cost 19
10 Mbps > Cost 100

Rapid Spanning Tree
Rapid Spanning Tree Protocol (IEEE 802.1w) was introduced to dramatically speed up STP’s convergence when network changes occur. RSTP can revert
to 802.1D (common spanning-tree) to inter-operate with legacy bridges on a per-port basis. A rapid version of PVST+, RPVST+ is a per-VLAN
implementation of rapid spanning-tree.

RSTP Port States
Discarding


Merges the former disabled, blocking, and listening states
Prevents the forwarding of frames
Seen in both stable/active and synchronization/changes

Learning

Receives frames to populate the MAC table
Seen in both stable/active and synchronization/changes

Forwarding


Forwarding ports determine the active topology
An agreement process between switches occurs before frames can
be forwarded
Only seen in stable/active topologies

Note: In every RSTP port state, BPDU frames are accepted and
processed.

51 | P a g e

Operational
Status

STP Port State

RSTP Port State

Port Included in
Active Topology

Enabled

Blocking

Discarding

No

Enabled

Listening

Discarding

No

Enabled

Learning

Learning

Yes

Enabled

Forwarding

Forwarding

Yes

Disabled

Discarding

Discarding

No

RSTP Port Roles
Root port (active)



On non-root bridges only
Best port towards the root bridge
Only one per switch
Is always in forwarding state in an active/stable topology

Designated port (active)



On root and non-root bridges
All ports on root bridge are designated ports
Receives and forwards frames towards the root bridge as needed
Only one per segment

Alternate (inactive)

Offers an alternate path towards the root bridge, but is in discarding
state in an active topology
Present on nondesignated switches and becomes designated if path
fails

Backup (inactive)

An additional switch port on a redundant (and designated) link
It has a higher port ID than its redundant peer port, so it assumes
the discarding state

Disabled port

No role in spanning tree

52 | P a g e

RSTP Link Type
In common spanning tree, it took 50 seconds before a port could be placed in forwarding state after a network change. RSTP’s biggest advantage is its
ability to rapidly transition alternate ports to a forwarding state. To do this, the protocol relies on two variables, link type and edge port.
Link type – Point-to-point or shared

Determined by duplex mode of port
Full Duplex – assumed to be point-to-point
Half Duplex – assumed to be shared

Point-to-point links are considered candidates for rapid transition to forwarding state

Link type can be manually configured if desired

The link types cannot be determined until the port role is first established.

Roots ports

Don’t use the link type parameter
Make rapid transition to forwarding state as soon as it receives a BPDU from the root bridge and puts nondesignated ports in blocking state (called
sync)

Alternative and backup ports

Do not use link type in most cases
Simply go through RSTP operation process

Designated ports

Most common use of link type parameter
Only allows rapid transition to forwarding if point-to-point

53 | P a g e

RSTP Edge Ports
Edge ports are assumed to be connected to an end host and never another switch. Edge ports immediately transition to rapid forwarding state when
enabled.

the RSTP equivalent of PortFast

allowed to transition directly into forwarding state

designated through manual configuration

Does not generate a topology change notification when link transitions to enabled or disabled status

If an edge port receives a BPDU, it loses edge port status and become a normal STP port and generates a topology change
notification (TCN)

RSTP Topology Changes
In 802.1D spanning tree, when a switch detects a topology change, it first notifies the root bridge. The root bridge then sets the TC (topology change)
flag on the BPDUs it sends out, which gets relayed throughout the switched network.
When a switch receives the notification, it reduces its bridging-table aging time equal to the forward delay. That allows the outdated topology information
to be flushed from the switches. This model works well, but the problem is that it takes a minimum of twice the forwarding delay for bridges to transition
back to forwarding state.
RSTP solves this. In RSTP, only non-edge ports that are transitioning to forwarding state cause a topology change notification to be sent out. Unlike with
802.1D, ports moving to blocking state do not cause a TCN BPDU to be sent.

54 | P a g e

Synchronization
Synchronization is a term used to describe the RSTP network convergence process. Non-edge ports begin in the discarding state. It then performs a
handshake to determine the state of each end of the link. Each switch assumes that its port should become the designated port for the link, and so it
sends a proposal message (a configuration BPDU) to its neighbor switch. When a switch receives a proposal message, the following events occur:

1. If the sender has a superior BPDU, the local switch realizes that the sender should be the designated switch (thus have the designated port) and
its own port should then become a new root port.
2. Before the switch agrees to anything, it must synchronize itself with the topology.
3. All non-edge ports are moved to discarding sate to prevent loops from forming.
4. An agreement message is sent back to the sender, affirming the new designated port choice. This also lets the sender switch know that it is in
the process of synchronizing itself.
5. The root port is moved into forwarding state. The sender’s port can begin forwarding.
6. For each non-edge port in discarding state, a proposal message is sent to the respective neighbor.
7. An agreement message is expected and received.
8. The non-edge port is moved to forwarding state.

Because the recipient of a sync proposal isolates itself from the rest of the network (all other non-edge ports are temporarily in blocking state), the
nearest neighbors must also synchronize themselves. This creates a rippling wave of synchronizing switches throughout the network which occurs very
quickly. Because timers are not used, changes occur at the speed of BPDU transmissions.

55 | P a g e

Bridge IDs
In 802.1D, each switch was required to have a unique bridge ID, consisting of a priority value + MAC address. PVST+ and PVRST+ also require the BID,
but they must also include VLAN information within the BID because a unique instance must run for each VLAN on each switch.
To accomplish this, a portion of the priority field is used to carry the VID.

Old bridge priority: Priority value (default 32,768 using increments of 1) + MAC address
New bridge priority: Priority value (default 32,768 using increments of 4,096) + Extended system ID (12 bit field carrying the VID) + MAC Address

Remember that if the priority value is not manually configured, the root bridge for each VLAN will be determined by lowest MAC address. Also, keep in
mind that the priority value you configure is only a portion of the actual priority value used by the switch because the VLAN ID is also attached.
Here’s an example: Default priority field for VLAN 11: 32768 + 11 = 32779
Higher priority for VLAN 11: 28672 + 11 = 28683

RSTP Compatibility with 802.1D
802.1w and PVRST+ are backwards compatible with common spanning tree, but lose the fast convergence benefit for that particular segment. If a switch
receives BPDUs that do not reflect its current operating mode, for two times the hello time, it switches STP modes.

Spanning Tree Load Balancing
The default STP mode on current Cisco switches is PVST+. That has three major implications:


it means that all VLANS will elect the same root bridge
a topology change will impact all VLANs in exactly the same way
all redundant links would also be blocked in exactly the same manner

56 | P a g e

One way to use STP to load balance across redundant uplinks between switches is to change the port priority for the active VLANs to intentionally force
half the VLANs to prefer one link and the other half to prefer the other link. By lowering the port priority for a VLAN on a redundant link’s interface, traffic
for that VLAN would begin to use that link and place one of the interfaces on the other uplink into the blocking state.

Example:
Switch
Switch
Switch
Switch
Switch
Switch
Switch

A# conf t
A(config)# interface fa 0/1
A(config-if)# spanning-tree vlan 1-10 port priority 20
A(config-if)# switchport mode trunk
A(config-if)# interface fa 0/2
A(config-if)# spanning-tree vlan 11-20 port priority 20
A(config-if)# switchport mode trunk

In this example, VLANs 1-10 would traverse the left link (priority of 20 is less than default of 32)and use the right link
as a backup only, while VLANs 11-20 would prefer the right uplink and use the left link as a backup only. This way
both uplinks are being used, but only one for each VLAN. Make sure you understand how this works because this is
a very common implementation design.

PortFast
Spanning Tree Portfast causes layer 2 switch interfaces to enter forwarding state immediately, bypassing the listening and learning states. It should be
used on ports connected directly to end hosts like servers or workstations. Note: If Portfast isn’t enabled, DHCP timeouts can occur while STP converges,
causing more problems.

To configure PortFast
Switch# conf t
Switch (config)# int fa 3/1
Switch (config-if)# [no] spanning-tree portfast

57 | P a g e

To verify PortFast on an interface:
Switch# sh spanning-tree int fa 3/1 portfast

PortFast can be configured globally on an access switch for all interfaces to save configuration space. Also, it only applies to access interfaces, not trunks.
Use the spanning-tree portfast trunk command if it is required on a trunk. If you do so, make sure to disable it explicitly on uplink interfaces.

To configure PortFast globally:
Switch# spanning-tree portfast default

Switchport Mode Host
To configure PortFast and disable both channeling and trunking negotiation on an interface:
Switch (config-if)# switchport host

RPVST+ Configuration
Enable RPVST+ globally on all switches
Switch(config)# spanning-tree mode rapid-pvst

Designate and configure a secondary root bridge
Switch(config)# spanning-tree vlan 2 root secondary
or

Designate and configure a primary root bridge
Switch(config)# spanning-tree vlan 2 root primary

Switch(config)# spanning-tree vlan 2 priority 4096
Verify the configuration

or
Switch(config)# spanning-tree vlan 2 priority 0

Switch# show spanning-tree vlan 2

58 | P a g e

Multiple Spanning Tree
MST, or 802.1s, expands upon the IEEE 802.1w RST algorithm in an attempt to reduce the number of STP instances, thus reducing the required CPU
cycles on a switch. MST enables you to group VLANs and associate them with spanning tree instances. Each instance’s topology can be independent of
the rest, allowing VLANs to be grouped and load balanced for fault tolerance measures. MST is also backwards compatible with all older STP variations.

Switches participating in MST that have the same MST configuration information are referred to as a region. Switches with different MST configurations or
that are running legacy 802.1D are considered separate MST regions.

Note: Switches in the same MST region must have the exact same MST configuration to work properly (including revision number).
MST is usually not implemented in campus environments because if you follow the local VLAN model (recommended by Cisco), there should not be that
many VLANs on any given switch because they should only extend to the switch block boundary. That makes RPVST+ a better choice because of its
simpler configuration. Because MST is still often deployed, Cisco definitely still considers it an important topic on the SWITCH exam.

Multiple Spanning Tree Regions
Each switch that runs MST in the network has a single MST configuration consisting of the following 3
items:


Configuration name (alphanumeric)
Configuration revision number
A 4096-element table that associates each VLAN to a given instance

Exam Takeaways

The default MST instance is for all VLANs is MST00. 

MST will likely show up on the exam, so
take the time to understand the details
here. 

Know the STP enhancements and where
they should be applied.

59 | P a g e

MST Configuration
MST must be manually configured on each participating switch. Apply the following configurations on each switch that runs MST:

1
Enable MST globally:
Switch(config)# spanning-tree mode mst

Enter MST Submode:
Switch(config)# spanning-tree mst configuration
Switch(config-mst)# sh current

2
Display configuration to be applied:
Switch(config-mst)# show pending

Note: This step is important because without it, you will be unable to
verify the configuration.
Display current running MST configuration:
Switch(config-mst)# show current

Define a configuration name:
Apply the configuration:
Switch(config-mst)# name XYZ
Switch(config-mst)# end
Set the MST revision number:
Cancel the configuration:
Switch(config-mst)# revision 1
Switch(config-mst)# abort
Map the VLANs to an MST instance:
Assign an MST root bridge
Switch(config-mst)# instance 1 vlan 3, 5, 7
Switch(config-mst)# instance 2 vlan 2, 4, 6

Switch(config)# spanning-tree mst 2 root primary

60 | P a g e

MST Verification Commands
Switch# show spanning-tree mst
Switch# show spanning-tree mst 1 (to view MST info for a single instance)
Switch# show spanning-tree mst 1 detail

Spanning Tree Enhancements
BPDU Guard
Prevents problems related to switches accidentally being connected to PortFast-enabled ports. Bridging loops would normally instantly occur. It places
the port in err-disable state if it receives a BPDU - disabling the interface.
To enable BPDU Guard globally on the switch:
Switch(config)# spanning-tree portfast edge bpduguard default
To enable BPDU Guard at the interface level:
Switch(config-if)# spanning-tree bpduguard enable

Exam Takeaways 

STP is often the largest topic tested on
the exam. Make sure you spend some
time learning the basics in this section. 

One of the things they like to test on
specifically is the STP enhancements.
Know why and how each is used.

61 | P a g e

BPDU Filtering
Prevents BPDUs from being transmitted from PortFast-enabled interfaces.
When enabled globally on the switch:
Configures all PortFast ports for BPDU filtering
If BPDUs are seen, the port loses its PortFast status, BPDU filtering is
disabled, and STP resumes default operation on the port
When the port comes up, it sends 10 BPDUs, if it hears any BPDUs
during that time PortFast and BPDU filtering are disabled



When applied to an individual port:

It ignores all BPDUs it receives
It does not transmit BPDUs

Note: If you enable BPDU Guard and BPDU filtering on the same interface, BPDU Guard has no effect because BPDU filtering has precedence over BPDU
Guard.

To enable BPDU filtering globally on the switch:
Switch(config)# spanning-tree portfast bpdufilter default

To enable BPDU filtering at the interface level:
Switch(config-if)# spanning-tree bpdufilter enable

To verify:
Switch# show spanning-tree summary
OR
Switch# show spanning-tree interface fa 0/3 detail

62 | P a g e

Root Guard
Root guard was developed to control where root bridges can be located within the network. Switches learn about and elect root bridges based on BPDUs
they receive, so if a new switch is added to the environment with a lower bridge priority than the current root bridge, the new switch will become root –
and in turn disrupt your carefully planned traffic patterns. To prevent this from occurring, root guard can be applied to interface where a root bridge
should never been seen.
When root guard is applied to an interface, it forces the port to essentially always remain a designated interface, never allowing it to transition to a root
port. If a root guard-enabled port receives a superior BPDU, it immediately moves the port to a root-inconsistent STP state (essentially the same as the
listening state) and does not forward any traffic out that port.
When the root guard protected port stops receiving superior BPDUs, it automatically unblocks the port and proceeds through its normal listening, learning,
and eventually forwarding states. No intervention is required.

To enable root guard on an interface:
Switch(config)# int fa 4/4
Switch(config-if)# spanning-tree guard root

Loop Guard
Most bridging loops that occur when STP is active happen when a port in blocking state stops receiving BPDUs on the interface and therefore transitions
the port to forwarding state – creating an all-ports-forwarding loop. It blocks ports on a per-VLAN basis, so on trunks it will only block that VLAN – not
the whole trunk.
Loop guard should be applied to all non-designated ports (ex. root, alternate).

63 | P a g e

To enable loop guard on an interface:
Switch(config)# int fa 4/4
Switch(config-if)# spanning-tree guard loop

To enable loop guard globally on the switch:
Switch(config)# spanning-tree loopguard default

To verify:
Switch# show spanning-tree interface fa 0/3 detail

UDLD
UDLD is another loop-prevention mechanism for STP. It tries to discover unidirectional links before they grow into bridging loops. This situation is much
more common in fiber optic networks where there is a physical Rx/Tx pair and a situation can arise where one is not functioning correctly.
STP relies on constant and consistent reception of BPDU messages. If a switch stops receiving BPDUs on a designated (upstream) port, STP ages out the
information for the port and transitions it into forwarding state. This will lead to a loop.
UDLD sends UDLD protocol packets to its neighbor switch – 15 seconds is the default. The neighbor is then expected to echo packet the packets before a
timer expires. If the switch does not hear a reply it waits, before finally shutting down the port.

There are two UDLD modes:
Normal – UDLD simply places the port into an undetermined state if it stops hearing responses from its directly-connected neighbor
Aggressive (Preferred) – Tries to re-establish the connection up to 8 times, then puts the port in err-disable state (essentially shutting down the port)

64 | P a g e

To enable UDLD on an interface:
Switch(config)# int fa 4/4
Switch(config-if)# udld port {aggressive}

To enable UDLD globally on all fiber ports:
Switch(config)# udld {enable | aggressive}

Note: While both loop guard and aggressive UDLD have many overlapping functions, enabling both provides the best protection.

Uplinkfast & Backbonefast
Uplink fast is applied at the access layer and provides a mechanism to very quickly have a secondary uplink to the distribution layer take over if the
current STP uplink fails. This is similar to RSTP’s backup port role and only addresses a direct link failure.
To enable Uplinkfast on a switch:
Switch(config)# spanning-tree uplinkfast

Backbone fast is often applied at the distribution and core layers and was developed to fix STP convergence slowness on indirect backbone links.
UplinkFast is designed to detect direct failures, whereas BackboneFast is designed to detect indirect failures. An indirect failure is not immediately
detected when it occurs, and under normal STP operation, the Max Age timer is used to detect an indirect failure. That means about 50 seconds of STP
convergence.
BackboneFast effectively eliminates the Max Age timeout period associated with an indirect failure, lowering convergence from the default 50 seconds to
30 seconds.
To enable Backbonefast on a switch:
Switch(config)# spanning-tree backbonefast

65 | P a g e

Spanning Tree Best Practices
Something to consider with spanning tree is the lack of multipathing options. STP eliminates loops by creating a tree structure where a single link is
created to each switch. This means that even with all the redundant links you put in place, STP will always only allow one – reducing much of your
available bandwidth. Because of this and other limitations, it is recommended to use layer 3 at both the distribution and core layers. Using layer 3
between the distribution and core allows you to use multipathing (up to 16 paths) using Equal-Cost Multipathing (ECMP) without the dependency of STP.
Also, the new Nexus 7ks allow layer 2 multipathing with two links using virtual port channels.

Because a 50 second network convergence delay is usually not
acceptable in modern networks, RSTP is preferred.

STP should absolutely be used on the network edge to prevent
user/wiring errors from propagating throughout the network

A root bridge should be manually assigned in every STP topology

If using PVST+ or RPVST+, assign a root bridge for each VLAN
using the command:

#spanning-tree vlan ID root

If using HSRP, make sure the STP root bridge and HSRP active
router are assigned to the same device if possible.

Use the STP Enhancements (sometimes referred to as the STP
toolkit) to optimize the topology

Loop guard - Implement on layer 2 uplink ports between access and
distribution layer

Root guard - Implement on distribution switch ports facing the
access ports

UplinkFast- Implement on uplink ports from access to distribution
switches

BPDU guard or root guard- Implement on access ports connected to
end devices, also PortFast

UDLD -Sometimes implemented on fiber ports between switches

66 | P a g e

Troubleshooting Spanning Tree
Duplex Mismatch
If one side of a link is set to half duplex and the other is set to full, then
the potential exists that the full duplex side will begin sending lots of
traffic to the half duplex interface. If that happens, the half duplex
interface will experience collisions when it attempts to transmit STP
BPDUs. The full duplex interface will therefore never receive them, and
assume other interfaces on the switch in blocking state can transfer to a
forwarding state - creating a loop.

Unidirectional link failure
This occurs when a hardware failure causes a normally two-way link to
become a one-way link. The potential loop problem is the same as with
the duplex mismatch issue, with one side moving from blocking to
forwarding because they stop receiving superior BPDUs on the interface.
Aggressive UDLD can prevent loops from forming when this occurs by
putting the offending port into err-disable state. Cisco recommends
using aggressive UDLD on all point-point links in a switched
environment.

Frame Corruption
This is a very uncommon cause of STP loops, but it exists when errors on an interface do not allow BPDU frames from being received. Again, a port
moves from blocking to forwarding because they stop receiving superior BPDUs on the interface. This could be caused by a duplex mismatch, bad cable,
or incorrect cable length.

Resource Errors
If for any reason the CPU of a switch is over-utilized, there exists the possibility that it will be unable to send out BPDUs. STP is generally not very
resource intensive, but be careful when running PVST+.

PortFast-related Errors
PortFast interfaces move directly into forwarding state, so if a hub or switch gets connected to an edge port configured with PortFast, a loop will form.
BPDU Guard can prevent this condition.

67 | P a g e

General STP Troubleshooting Methodology
1. Develop a plan.
2. Isolate the cause and correct an STP problem.
3. Document findings.

Develop a plan
In order to make a plan, you must know the following parts of the network:


The switched topology
The location of the root bridge
The location of blocking ports

Correct the problem
The best way to determine a loop is to capture packets on a saturated link and look for duplicate packets. Another option is to look for abnormally high
interface utilization values. Some common symptoms include HSRP may complain of duplicate IP addresses, consistent flapping of MAC values because
MAC addresses should not flap.

Restore connectivity
Most of the time administrators do not have the luxury of time to identify the root cause of a loop, instead they must stop it as quickly as possible. Here
are some options:

Disable every port that is providing redundancy, starting with areas of the network more affected. Try to disable ports you know should be in
blocking state if possible.
If it is difficult to pin down, increase the level of STP logging on the switches. The loops form when a port moves into forwarding state, so it can
later be identified.

68 | P a g e

Try this:
Switch# debug spanning-tree events

To log the events:
Switch(config)# logging buffered

Check Port Statuses
Start with blocking ports first - here are some more guidelines:

Make sure both root and blocking ports are receiving BPDUs
Switch# show spanning-tree vlan-ID detail
(enter multiple times to see if the number is increasing)




Look for duplex mismatch errors using the show interface command
Check port utilization with the show interface command. Look at the load, input/output values for abnormally high rates
Look for an increase of input error fields using the show interface command
Check for resource errors

Resource Errors

Disable Unnecessary Features

Document Findings

Use the show process cpu command to check
whether the CPU utilization is nearing 100%.

Sometimes it becomes easier to identify a
solution when the network is simplified. Try
disabling unnecessary features to reduce
complexity. Save the configuration before
making the changes so it can be restored
after the issue is resolved.

It is important to document both your
findings and any changes to the network after
the dust clears. Current and detailed
documentation also reduces troubleshooting
time in the future.

69 | P a g e

Cisco Chapter 6:

642
813

SNMP,
Syslog,
& IP SLA
70 | P a g e

71 | P a g e

Many people may be confused as to why I would dedicate an entire chapter to network monitoring tools and their configuration. The reason is because
these topics are tested relatively heavily on the actual CCNP SWITCH Exam. Whether you agree or disagree about the weight given to these topics is
irrelevant. It’s covered on the exam – so take the time to understand these topics (especially IP SLA).

Syslog
Syslog is a network management protocol that is not unique to Cisco devices, but integrates well within IOS. Syslog allows a network-attached device to
report and log error and notification messages either locally or to a remote Syslog server.
Syslog messages are plain text sent using UDP port 514.
Every syslog message contains two parts, a severity level and a facility. The severity level goes from 0 to 7 with 0 being the most severe to 7 being
simply informational.

Syslog Priority (highest to lowest):
0.
1.
2.
3.
4.
5.
6.
7.

Emergency (highest)
Alert
Critical
Error
Warning
Notice
Informational
Debug (lowest)

Exam Takeaways 

The monitoring topics catch many test
takers off guard.
The big three
discussed here cover what you will
need. 

The configurations are not too
important to memorize, but the theory
72 | P a g e
details are extremely important.

Facilities are service identifiers that categorize events and messages for easier reporting.
The most common facilities on IOS devices include:

IP
OSPF


SYS (operating system)
IP Security (IP Sec)


Route Switch Processor (RSP)
Interface (IF)

Messages are presented in the following format:
%FACILITY-SUBFACILITY-SEVERITY-MNEMONIC:Message-text
An example:
%SYS-5-CONFIG_I: cwr2000 on vty0 Configured from console by (192.168.64.25)
The example Syslog message indicates that the operating system (facility = SYS) is issuing a notification (SEVERITY = 5) has been configured
(MNEUMONIC = CONFIG) and that a user on VTY0 from IP 192.168.64.34 has made the configuration.

Note: One of the most common Syslog messages you’ll see is line protocol up/down messages after a configuration change has been made in global
configuration mode. Also, if ACL logging is enabled, Syslog messages will be generated when packets match ACL parameters.

Configuring Syslog
To configure Syslog to export events to an external Syslog
server, use the following commands:
Switch(config)# logging <ip address of server>
Switch(config)# logging trap <severity level>

To configure the local switch to store syslog messages, use the
logging buffered command.
Switch(config)# logging buffered ?
<0-7>
Logging severity level

Use the show logging command to show the contents of the local log files.

73 | P a g e

SNMP
SNMP is simply the standard for network monitoring and management and contains three core elements:


Network Management Application (SNMP Manager)
SNMP Agents (running inside a managed device)
MIB Database object that describes the information requested (inside the agent)

SNMP network management applications periodically uses UDP to poll the agent residing on a managed device for useful,
predetermined information. The problem is it polls the device on a set schedule, so there will be a lag between when an event occurs and when the
application learns of it.
SNMP traps are not so passive. When certain criteria are met, the agent sends the application a notification instantly, so it no longer has to wait around to
find out. This can introduce bandwidth savings. Think of it like push notification in the cellular world.
The data that the agent collects is stored in its MIB. Community strings are used to provide a level of authorization for the MIB contents (read or write) kind of like a weak SNMP passwords. They are transmitted in clear text across the network, so be careful.

SNMP Versions


SNMP v1 – insecure
SNMP v2 – introduced the read/write community strings, added 64 bit counter support, more intelligent requesting, insecure
SNMP v3 – provides encryption and authentication (most secure – recommended whenever possible)

74 | P a g e

SNMP Configuration
1.
2.
3.
4.

Configure
Configure
Configure
Configure

SNMP access lists (optional, but recommended)
community strings
SNMP trap destination
SNMP v3 user (optional, but recommended)

Example:
Switch(config)#
Switch(config)#
Switch(config)#
Switch(config)#

access-list
snmp-server
snmp-server
snmp-server

100 permit ip 10.1.1.0 0.0.0.255 any
community badpassword RO 100
community badpasswordtwo RW 100
trap 192.168.1.52

IP Service Level Agreement
Service level agreements or SLAs are contractual agreements usually between a customer and service provider that spell out the minimum acceptable
levels of service. SLAs are often attached to WAN and MPLS links because any downtime can significantly affect business performance/profits.
In terms of the exam, Cisco’s SLA attempts to measure latency, jitter, and packet loss for a given link. Cisco does this by enabling IOS to send synthetic
traffic to a specific host computer or router that is configured to respond. The router can then use it to determine one way jitter, delay, and packet loss.

Router <——–> Router

OR

Router <———> PC

Common IP SLA Functions

Active edge-to-edge network
availability monitoring
Network performance monitoring



VoIP, video, and VPN monitoring
IP heath assessment
MPLS monitoring

Troubleshooting

75 | P a g e

IP SLA can measure the following statistics:

Network latency (delay) and response
time


Packet loss
Jitter and voice quality scoring

End-to-end network connectivity

IP SLA Operations
Multiple IP SLA operations (measurements) can run in a network at the same time. The reporting tools use SNMP to fetch the data so they can report on
it.
The source router needs to be configured with a target device, protocol, and UDP/TCP port number for each IP SLA operation. The source router uses the
IP SLA control protocol to confirm communication with the responding host before the source sends the test messages.
To increase security, the responder can use an MDF hash to authenticate the message from the source, securing the exchange.
When the operation is complete, the results are stored in the IP SLA MIB on the source and can be retrieved via SNMP (or by traps which can be
conditionally set to send alerts if thresholds are exceeded).
Almost the entire configuration occurs on the source router. The source sends the probe packets that test whatever protocols the administrator chooses.

Note: Although any IP device can be a responder, another IP SLA router running IOS is preferred because the measurement accuracy will be improved
and it is required if you want to measure jitter.

76 | P a g e

IP SLA Operation Breakdown
1. Source sends an IP SLA control message with the configured operation to the responder using UDP port 1967. The control message carries the
protocol, port, and duration defined when the operation was configured on the source router.
o
o
o

If MD5 is enabled, the checksum is sent with the control message.
I authentication is enabled, the responder verifies it. If authentication fails, the responder returns an authentication failure message.
If a response is not received from the responder, it will attempt to retransmit until it eventually times out.

2. The responder sends a confirmation message back to the source router and listens on the specified port.
3. If the response from the control message is OK, it begins sending probe packets.
4. The responder responds to the incoming probe packets for the predetermined time.

The diagram to the right outlines the timestamp process IP SLA uses to calculate round trip time (RTT) accurately.
1. The source sends a packet at time T1
2. The responder records both the receipt time (T2) and the
transmitted time (T3). Because there can be delay between
when the router receives the packet and when a confirmation is
sent back out the interface, it tracks the difference in time (submilliseconds). The source later subtracts this difference from the
total RTT because it was not time in transit, but rather router
software processing time.
An additional benefit of so many timestamps is the ability to track one-way delay, jitter, and packet loss. Remember that traffic behavior can be
asynchronous. Also, make sure that both devices are using the same source for clock information. The same NTP server is a requirement for many of
these functions.

77 | P a g e

Configuring IP SLA
1.
2.
3.
4.

Configure the source router
Activate IP SLA on the source
Configure the tracking object on the source
Configure the responder

Example Source Configuration:
Switch(config)# ip sla 10 (number indicates the IP SLA test identifier)
Switch(config-sla)# type echo prot ipIcmpEcho 192.168.1.10 source-int fa0/1
Switch(config-sla)# frequency 20 (number of times the operation repeats)
Switch(config)# exit
Switch(config)# ip sla schedule 10 life forever start-time now
Switch(config)# track 1 ip sla 10 reachability

Example Responder Configuration:
Switch2(config)# ip sla monitor responder

Verifying IP SLA
Switch# show ip sla statistics
Switch# show ip sla configuration {operationID}
Switch# show ip sla application

78 | P a g e

Cisco Chapter 6:

642 High
813 Availability
79 | P a g e

High Availability
High availability is an organizational objective that enables resilience by increasing network availability and includes the following components:


Redundancy
Technology
People (ex. skills, training)


Processes (ex. change control)
Tools (ex. network management, documentation)

Review of Failover Times




EIGRP and OSPF can both achieve sub-second convergence time
RSTP converges in about 1 second
EtherChannel can failover in approximately 1 second (When a single link in the bundle fails, it redirects traffic to the other links)
Default HSRP timers are 3 seconds for hellos and 10 seconds for hold time but best practice says to change hellos to 1 sec. so convergence takes
less than 3 seconds
The Windows XP TCP/IP stack will hold a session open for about 9 seconds

Optimal Redundancy
Redundancy is not only a question of added cost vs. uptime and resiliency, but also a question of complexity. The more hardware and software deployed
in the name of redundancy adds administrative overhead and complexity, which is tough to put numbers on.
Cisco recommends:


Redundant switches at the core and distribution layers with fully redundant links
Access switches should have redundant links to redundant distribution switches
Avoiding single points of failure as much as possible

This can be achieved at the access layer with help from SSO (for layer 2) and potentially NSF (for layer 3)

80 | P a g e

Redundant Supervisor Engines
Providing redundant switch supervisor engines adds another level of high-availability for critical distribution and core layer devices. Redundant switch
supervisor engine options are only available on Cisco Catalyst 4500 and 6500 families of switches.
The three redundancy options are:


RPR (Route Processor Redundancy) and RPR+
SSO (Stateful Switchover)
NSF (Non-Stop Forwarding)

RPR was the first form of supervisor engine redundancy and is no longer the preferred option. The primary reason is the time required to failover to the
backup supervisor engine.
RPR – 2 to 4 minutes on 6500 (<60 seconds on 4500)
RPR+ – takes between 30-60 seconds
RPR also does not synchronize routing information with the redundant supervisor engine, so all dynamic routing state information is lost upon
failover. Also, upon failover the FIB tables are cleared so all dynamic routing protocols must reconverge. Only static routes will remain intact as
they are manually configured.

Stateful Switchover (SSO)
SSO is designed to minimize disruption while transitioning layer 2 services during a supervisor failover.
Even a clock synchronization failure between supervisors is enough to cause a failover with SSO.

Exam Takeaways 

Recognize what RPR, SSO, and NSF do
and how they work.

81 | P a g e

The redundant supervisor starts up in a fully initialized state and syncs with the startup and running configuration of the active supervisor engine. All
subsequent changes are then also updated, allowing for seamless continuation of all supported layer two protocols.
SSO recognizes the link status of every port, so links that were active before the switchover remain active. Neighboring devices do not see the link go
down and spanning-tree remains unaffected.
On the 6500s, the switchover takes between 0-3 seconds. On the 4500 series switches it takes less than a second. Layer 3 information must be
relearned however, which includes rebuilding ARP tables and layer 3 CEF adjacency tables

Configuring SSO
Switch# configure terminal
Switch(config)# redundancy
Switch(config-red)# mode sso

Verifying SSO
Switch# show redundant states

82 | P a g e

NSF
Non-stop Forwarding, or NSF, is another redundancy protocol designed to accompany SSO. Unlike SSO, which allows seamless layer 2 transitions during
a failover, NSF is designed to optimize layer 3 reconvergence after a failover. When both are used, zero or near zero packets are lost during the
transition. NSF also helps avoid route flapping problems by using the FIB table for failover.
NSF works by continuing to forward CEF flows while layer 3 routing protocols reconverge behind the scenes. The standby supervisor maintains a copy of
the CEF entries and in the event of a failover, it uses those entries to prevent a loss of traffic. After the routing has reconverged and a new RIB is built,
the old CEF entries are removed.
Changes have been made to many of the modern routing protocols (EIGRP, OSPF, IS-IS, BGP) so that upon switchover, an NSF-enabled router sends
special packets that trigger routing updates from the NSF-aware neighbors without resetting the peer relationship and preventing route flapping and
changes.
In summary, NSF improves L3 network availability and stability.

Configuring NSF
The configuration is different for EIGRP, IS-IS, and OSPF than for BGP. See the examples below:

Example:
Switch# conf t
Switch(config)#
Switch(config)#
Switch# conf t
Switch(config)#
Switch(config)#

router ospf 100
nsf
router bgp 10
bgp graceful-restart

83 | P a g e

HSRP
Several first hop redundancy protocols exist including IRDP, HSRP, VRRP, and GLBP. HSRP is another high-availability tool like Spanning Tree and
dynamic routing protocols.
Default gateways are essential for devices to communicate with devices outside their local network. If the gateway is unavailable for any reason, external
conversations cease. In an effort to mitigate that situation, first hop redundancy protocols have been developed to provide pairs of gateways, often one
active and the other in standby, to allow an always-up default gateway.
HSRP (RFC 2281) is a redundancy protocol developed by Cisco to solve this problem. HSRP provides a virtual MAC and IP address that represents a set (2
or more) of physical routers. The virtual IP will be used as the default gateway address for the segment. The virtual IP will respond to any ARP requests
for the MAC address of the default gateway with its own.
The active router sends hellos (multicast 224.0.0.2 // UDP port 1985) to the standby router(s) to let them know it is still up. If a standby router stops
receiving hellos from the active router, it assumes the role of active and takes over forwarding packets for the network - all transparent to the end
systems.

HSRP Groups
The virtual MAC used is always 0000.0c07.acxx where xx is the HSRP group ID. The .0c07 portion is
the well-known HSRP virtual MAC identifier. For example, if you see a message with XXXXXX.0c07.0b
where the Xs are random MAC values, the HSRP group number would be 11. The 0b HEX values after
the .0c07. is 11 in base 10 format.
Note: There can be only a single active and single standby router in a HSRP group. After two routers,
the rest stay in initial state and wait for the active or standby to go down before contending for the
active and standby position. The active router processes packets sent to the virtual router.

Exam Takeaways 

HSRP is heavily tested. 

Know the states and how an election
occurs. 

Understand how HSRP priorities work
and memorize the virtual MAC/group
tagging (.0c07.xx) 

Know how tracking affects which router
becomes active

The active router in the HSRP group is determined by an election process. The router with the highest
HSRP priority configured wins and if no specific priority has been set, the router with the highest IP
address is elected as the active router. A new election will only occur if the active router is removed;

84 | P a g e

the same is true for the standby router. This default behavior can be changed with the preempt command.

HSRP States
Initial
State from which routers begin HSRP process.

Standby
A candidate to become the next active router.

Learn
The router is still waiting to hear from the active router.

Active
The router is currently forwarding packets.

Listen
Listens for hello messages from the active and standby routers.

Speak
Participates in the election for the active or standby router.
This is also the state an active router enters immediately after it has been preempted by a higher priority router.
** Hellos are sent in the active, standby, and speak states.

85 | P a g e

HSRP Configuration
When configuring both spanning tree and HSRP on a segment, it is best practice to make the root bridge and HSRP active router the same device.
can only be configured on a layer 3 interface including SVIs, routed interfaces, and L3 etherchannels.

HSRP

HSRP Configuration
Switch(conf-if)# standby group-number ip ip-address

The group number is only required if you plan on implementing more than one HSRP group on the router. If none is specified, group number 0 will be
used.
A priority value can be set to force a router to become the active router in the group. The default is 100, and it can be manually set between 0 and 255.
Higher wins. If the priority is the same, the router with the highest IP address will become active for that standby group. Load sharing is often
implemented with HSRP by configuring multiple groups and assigning different VLANs to each.

To set the HSRP priority value for a router:
Switch(conf-if)# standby group-number priority priority-value

The no standby priority command will assign the router a priority of 100 (default).
Remember that if two routers are manually booted up at the same time, if the one with the lower priority boots up first – it will become the active router
in the group even though its priority is lower. That is because it will not see any other routers when it begins the election process and will transition
straight to active. Once the other router comes up, it will not automatically become active. To change this, use the preempt command on the router you
want to remain active.
Switch(conf-if)# standby group-number preempt

To test, use the command show standby brief.

86 | P a g e

HSRP Authentication
Authentication is optional with the following command:
Switch(conf-if)# standby group-number authentication password
The default password is cisco if none is specified and the password string must be the same on all members of the standby group.

HSRP Timers
HSRP uses two important timers between the active/standby routers. Hello timers are used to exchange HSRP information while the hold down timer is
used to determine how long before a router is declared to be down in a group. The default hello times are 3 seconds and the default hold down timer is
10 seconds. That means there could be up to a 10 second delay before the standby router begins forwarding traffic if the active goes down. To tune the
timers (in seconds):
Switch(conf-if)# standby group-number timers hellotime holdtime
Example:
Switch(conf-if)# standby 10 timers 1 3
Note: If you are noticing the HRSP states frequently changing, you may have a physical layer problems or a spanning-tree loop. If you notice the output,
“Standby router is unknown expired”, you likely have a HRSP misconfiguration or a physical layer issue.

87 | P a g e

HSRP Versions
HSRP comes in two versions, 1 and 2. The most significant difference is that v1 only allows up to 255 group numbers and v2 allows up to 4095 – making
it now possible to correspond group numbers with VLAN IDs.

Tracking
Tracking a critical uplink interface can force a re-election by decrementing the active router’s priority value by a set amount (default 10).
Switch(conf-if)# standby

group-number

track

interface

value-to-decrement

Example:
Switch(conf-if)# standby 10 track fa 1/0/1 100

VRRP
VRRP is an open standard redundancy protocol that is similar to Cisco’s HSRP. One difference is that
the virtual IP can either be a virtual one (as is the case with HSRP) or it can be the actual IP address of
the active router.

Exam Takeaways 

You will likely see at least one theory
question on VRRP or GLBP. 

Know how they are different from HSRP
and make sure you memorize the
default load sharing mode in GLBP (per
host round robin). 

Believe it or not IRDP may also make an
appearance, so read that short
paragraph twice.

The VRRP ”master” forwards the traffic and is chosen because it owns the real IP address or has the
highest priority (default is again 100). The “backup” router takes over if the master fails. Priority
values are between 1-255. If the master router fails, it advertises a priority of 0, forcing an election
amongst the backup routers without waiting for the hold down timer to expire.

Note: Multiple VRRP groups are allowed (like HSRP).

88 | P a g e

VRRP Configuration
Switch(conf-if)# vrrp group-number ip virtual-ip-address
Switch(conf-if)# vrrp group-number priority priority-value

VRRP Timers

Advertisements, or hellos – default 1 second

Master down interval = 3 times the advertisement time + skew (essentially the same as HSRP’s hold down timer)

Skew time = (256-priority)/256. Used to ensure the highest priority backup router becomes master.

Note: Make changes on the master because changes in timers are then propagated to the backups automatically.
Switch(conf-if)# vrrp

group-number

advertise

time-in-seconds

VRRP cannot track interface changes, but can track IP SLA object groups.

GLBP
One of the major limitations to both HSRP and VRRP is that a single router handles traffic for the whole group, leaving the others inactive until the master
router fails. GLBP or Gateway Load Balancing Protocol solves this dilemma by load balancing traffic over up to four gateways, maximizing bandwidth.
One virtual IP is used, but each participating router uses a virtual MAC address which is used to respond to ARP requests.
Note: GLBP is only supported on Cisco’s 4500, 6500, and Nexus lines.

89 | P a g e

There are three load sharing options:
Weighted load balancing- based on preconfigured weights assigned to gateways
Host-dependent load balancing – each hosts uses a specific gateway
Round-robin load balancing – Each MAC is used to respond in turn (default)
The routers running GLBP elect a single Active Virtual Gateway (AVG), which manages the load balancing and responds to ARPs. The highest priority
router wins; in a tie highest IP address wins. Group members sends hello multicasts every 3 seconds (multicast address 224.0.0.102), if a router goes
down, another will answer for its requests.
The job of the AVG is to assign virtual MAC addresses to each of the other GLBP routers and to assign each network host to one of the GLBP routers. The
routers that receive the MAC address assignment are the Active Virtual Forwarders, or AVFs.

GLBP Configuration
Switch(conf-if)# glbp group-number ip virtual-ip-address
Switch(conf-if)# glbp group-number priority priority-value

Remember that the default gateway IP address that is configured on the end hosts should be set to the virtual IP address.

IRDP
Some newer hosts use the ICMP Router Discovery Protocol (RFC 1256) to find a new router when a route becomes available. A host running IRDP listens
for hello multicast messages from its configured router and uses an alternate router when that router is no longer available. It is not necessary to
understand the technical details of how IRDP works, but be aware that it is a valid first hop redundancy protocol.

90 | P a g e

Cisco Chapter 7:

642
813

Security

91 | P a g e

Network perimeter security has long been the focus for security products and defenses such as firewalls and layer 3 attacks. The SWITCH exam covers
several different security topics in depth, but all from a layer 2 perspective. These kinds of attacks are usually launched from within a network either from
legitimate or rogue devices (ex. consumer wireless access points, access switches, and hubs).
A rogue switch added to the access layer could disrupt the Spanning Tree root bridge topology and even worse, could create a loop and bring an entire
segment down.

MAC Address Attacks
The primary MAC address attack attempts to overwhelm the CAM table. Another layer 2 MAC attack is MAC spoofing which allows an attacking device to
receive frames intended for a different network host. Precautions include port security and port-based authentication.

MAC Flooding
In a MAC flooding attack, an attacker floods a target switch with invalid source MAC addresses which quickly fill the CAM table. Once the table is full, any
frames whose MAC is not in the table are flooded out all ports causing everyone (including the attacker) to begin to see traffic on their port they would
normally not. After the attack stops, the CAM table entries eventually age out so things will return to normal, but in the meantime the attacker may have
collected valuable information. Two preventative techniques for MAC flooding attacks are port security and implementing DHCP Snooping with Dynamic
ARP Inspection (DAI) – with port security being the most common solution.

Port Security
Port security can put limits on both what MAC addresses are allowed to be connected to a switch port and how many at any given time. Using port
security specific MACs can be statically allowed, or dynamically “learned” using the sticky command.
If you simply enable port security on an interface, it will only allow a single MAC address to connect by default. You should specify the maximum number
of MAC addresses that should connect to the port using the switchport port-security maximum command. If you then choose to statically assign MAC
addresses to that interface, only those will be allowed plus however remaining until you reach the maximum MAC allowed.

92 | P a g e

For example, let’s say you configure port security on and interface, configure it for a max of 2 MAC addresses, then statically configure a single MAC
address with the switchport port-security mac-address command. If you try to add another device to the port, it will be accepted because you allowed
two MACs with the switchport port-security maximum number command.
Note: Port security can only be applied to access ports (including VoIP interfaces), but not trunks!

Configuring Port Security
Switch# conf t
Switch(config)# interface fa 1/1

To enable port security on the interface
Switch(config-int)# switchport port-security
Specify the maximum number of MACs allowed (default is one)
Switch(config-int)# switchport port-security maximum number

Exam Takeaways 

Many port security questions could
show
an
example
interface
configuration and ask something like if
one more device is added to the
interface, what will happen? 

Understand the different violation
options and what they do to an
interface. 

Focus primarily on the theory for
security, not so much the configuration.
However,
some
people
have
commented that the exam looks a lot
more like a security test given the detail
they want you to know, so be prepared!

Specify the violation action when requirements defined are not met or exceeded. Shutdown
puts the interface in err-disable state and sends an SNMP trap, Restrict will drop violator’s frames, log it
and send an SNMP trap, and Protect will drop frames quietly from MACs not specified. Shutdown is the
default action.
Switch(config-int)# switchport port-security violation {shutdown |
restrict | protect}
Statically assign MAC addresses (optional)
Switch(config-int)# switchport port-security mac-address MAC address

93 | P a g e

Set the aging time for each assigned MAC
Switch(config-int)# switchport port-security aging time [0-1440 (minutes)]restrict | protect}
Note: Use this feature to (1)remove and add PCs on a secure port without manually deleting the existing secure MAC addresses (2)while still limiting the
number of secure addresses on a port. If the aging time is set to 0, aging is disabled.

Allows the switch to dynamically learn up to the maximum number of MAC addresses (optional)
Switch(config-int)# switchport port-security mac-address sticky
You can configure an interface to convert the dynamic MAC address to sticky secure MAC addresses and to add them to the running configuration by
enabling sticky port security. The sticky secure MAC addresses do not automatically become part of the startup configuration. If, however, you save the
running configuration to the startup configuration, then reboot the switch, the MACs will be saved upon reboot.

To verify the port security settings:
Switch# show port-security [interface | address]

Port security and VoIP
Port security can be applied to interfaces that use voice VLANs as well. Because voice VLANs typically also include data traffic from a connected PC and
an internal switch in the phone, Cisco recommends setting the maximum number of allowed MAC addresses to 3 when using port security in conjunction
with voice VLANs.

94 | P a g e

VLAN Attacks
The major security concern related to VLANs is a concept commonly known as “VLAN hopping”. VLAN hopping attacks involve an attacker sending and/or
receiving traffic from a VLAN to which they are not assigned. There are two ways this can be done, switch spoofing and double-tagging – both done by
manipulating the way switches create and pass data through trunk links.

Switch Spoofing

802.1Q Double-Tagging

Switch spoofing uses a computer to mimic a trunk tunnel with a directly
connected switch using Dynamic Trunking Protocol (DTP). DTP is
enabled by default on Cisco switches and trunk ports also pass all traffic
across trunks by default. If an attacker is able to trick the switch into
establishing a trunk port, they are able to access (and inject) all traffic
going through the switch.

A double-tagging attack is possible because 802.1Q does not tag frames
sent using the native VLAN. In this attack, the attacker sends a payload
with two VLAN tags, the first assigned to the segment’s native VLAN and
the second assigned to the target destination’s VLAN. The first switch to
receive the attacker’s packet strips off the native VLAN tag and forwards
it out all ports (including adjacent trunk ports) because that is how
802.1Q handles native VLAN traffic. Once the next hop switch receives
the packet, it sees only the second tag and forwards it on to the target
destination.

To Mitigate Switch Spoofing:

Disable DTP on all ports using the switchport nonegotiate command on each port.

Define access ports and trunk ports explicitly using commands like switchport mode access and switchport mode trunk.

Shutdown all unused ports and assign them all to an unused VLAN (ex. something like 999)

Define the native VLAN separate from any data VLANs

Define explicit VLANs allowed on the trunk links, rather than the default - allow all

95 | P a g e

VACLs
There are three types of access control lists (ACLs) that Cisco switches support:


Traditional Router ACL (RACL)
QoS ACL
VACL (also referred to VLAN access-maps)

VACLs are much like route-maps in that they use match and set statements to define what actions are taken. In this case, the set statements are “action”
directives, which include forward, drop, and redirect. Also like route-maps, VACL statements are ordered.

Example:
Switch(config)# access-list 10 permit ip 10.1.1.0 0.0.0.255 any
Switch(config)#mac access-list extended SERVER
Switch(config-ext-mac)# permit any host ooo0.1111.2222
Switch(config)# vlan access-map TEST 1
Switch(config-map)# match ip address 10
Switch(config-map)# action drop
Switch(config-map)# vlan access-map TEST 2
Switch(config-map)# match mac address SERVER
Switch(config-map)# action drop
Switch(config-map)# vlan access-map TEST 3
Switch(config-map)#action forward
Switch(config)# vlan filter TEST vlan-list 14,17

Note that even when using the “action forward” statement, traffic that is not explicitly defined within the access list will be dropped because of the implicit
deny feature at the end of the list. Also, it is important to remember for this exam that both routed and bridged ACLs can be applied as either inbound or
outbound and that VLAN maps and router ACLs can be used in combination.

96 | P a g e

Spoofing Attacks
DHCP Spoofing
DHCP spoofing attacks occur when an attacker responds to DHCP requests, listing themselves as the default gateway or DNS server. This positions them
to intercept all traffic before forwarding it on to the real network gateway. The attacker could also simply flood the DHCP server with requests, filling up
the available IP space (DoS attack).
One option for preventing DHCP spoofing attacks is to statically assign ARP entries into the DHCP server so that dynamically created ARP packets cannot
interfere. A more manageable solution is to use DHCP snooping. DHCP snooping protects against DHCP spoofing attacks and is a security feature that
when enabled, only ports that uplink to an authorized DHCP server are trusted and allowed to pass all DCHP traffic. All other ports are untrusted (default)
and can only send DHCP requests. If a DCHP response (“offer”) is heard on an untrusted interface, it is shutdown.
**DHCP snooping must be first configured globally, then on specific VLANs, and finally in any interfaces. Remember to configure only ports that connect
directly to or uplink to a DHCP server as trusted.

DHCP Snooping Configuration
Globally:
Switch(config)# ip dhcp snooping
On VLAN(s):
Switch(config)# ip dhcp snooping vlan number number

97 | P a g e

On interfaces:
Switch(config-if)# ip dhcp snooping trust
Switch(config-if)# ip dhcp snooping limit pkts/sec (limits DoS attacks)
Verification:
Switch# show ip dhcp snooping

IP Source Guard
If more protection is required, IP Source Guard can be applied to access ports. IP Source Guard keeps track of the host’s IP address and/or MAC address
associated with each port – usually in conjunction with DHCP snooping enabled. If traffic sourced from another address enters that interface, it is
dropped.

To Configure IP Source Guard
Switch(config-if)# ip verify source (uses just IP address filtering)
Switch(config-if)# ip verify source port-security (uses IP + MAC filtering)
Switch# show ip source binding

ARP Spoofing
ARP spoofing is another man-in-the-middle attack exploiting the ARP protocol. An attacker sends out an unsolicited ARP message giving the IP address of
the local gateway with its own MAC address. Local machines then overwrite their ARP tables and all traffic is forwarded through the attacker.

98 | P a g e

Dynamic ARP Inspection (DAI) is a security mechanism that works with DHCP snooping to define trusted and untrusted interfaces. DAI intercepts, logs,
and drops ARP messages on untrusted ports that do not match the DHCP snooping MAC/IP bindings. All traffic that matches is passed; all traffic that
does not match is dropped.
DIA is supported on access ports, trunk ports, EtherChannels, and private VLAN interfaces. Dynamic ARP Inspection should be only applied to ingress
interfaces. All access ports should be untrusted and all trunks (including connections to routers) should be configured as trusted. Enable DAI on one or
more VLANs, and then configure the trusted interfaces. It matches IP and MAC by default.

Basic DAI configuration commands
Switch(config)# ip arp inspection vlan vlan-id
Switch(conf-if)# ip arp inspection trust

General Switch Security
Recommendations








Use strong passwords that are not susceptible to a dictionary attack (preferably using numbers and/or symbols)
Limit Telnet access using ACLs
Use SSH instead of Telnet
Physically secure the switch
Use banners that warn intruders against unauthorized access
Remove unused services (ex. finger, TCP and UDP small servers, service config, and HTTP server)
Configure a Syslog server
Disable DTP (Dynamic Trunking Protocol) – define trunks explicitly
Disable CDP when it is not required
no cdp run (disables it globally on the switch)

99 | P a g e

Port-Based Authentication
802.1x is a security protocol designed to authenticate devices like computers to access ports on a switch.
When a device connects to an 802.1x enabled port, it goes through the following steps:
1. It begins in the unauthorized state – only allowing EAP over LAN (EAPOL), CDP, and STP communication.
2. The switch requests authentication or the client sends an EAPOL frame to begin authentication.
3. The switch forwards the client’s authentication information to a RADIUS server and acts as a proxy.
4. If authentication is successful, the port transitions to authorized state and traffic is permitted.
802.1x requires three different devices be configured for port-based authentication to work properly:

Client (or host) – must be running 802.1x compliant system software

Authentication server – Performs the actual authentication of the clients
*Radius is the only supported server type!

Switch (or authenticator) – controls physical access and acts as a proxy

To enable port-based authentication using 802.1x:
Switch(config)# aaa new-model (enables AAA globally, with default lists applied to the VTYs)
Switch(config)# aaa authentication dot1x default group radius
Switch(config)# dot1x system-auth-control (globally enables 802.1x on switch)

To enable 802.1x on an individual interface
Switch(config-if)# dot1x port-control [auto | forced-authorize | force-unauthorized]

100 | P a g e

Note: Forced-authorize is the default dot1x port-control mode. It forces the port to transition directly into an authorized state and disables 802.1x
authentication. This can be applied to interfaces that you inherently trust are secure or more likely do not support any type of 802.1x exchange.
Switch# show dot1x

101 | P a g e

Cisco Chapter 8:

642
813

Wireless

102 | P a g e

For the purpose of this exam, Wireless LANs (WLAN) transmit using either RF or infrared frequencies, often through an access point. One interesting
point is that for the spectrums covered on the test, there are usually no additional RF licenses required. They are limited in physical transmission distance
(ex. within a floor, department, or campus) and are considered by Cisco an extension of the wired campus network.

The Cisco Unified Wireless Network
Cisco’s wireless architecture model includes 5 layers:
1. Client devices- Wireless end clients (ex. laptop, smart phones)
2. Mobility platform – Access points and wireless bridges
3. Network unification – Existing wired network (Ex. routers, switch, WLAN controllers)
4. Network management- WLAN location, management and security (Cisco Wireless Control Systems [WCS] is Cisco’s solution here)
5. Mobility services (also called Unified Advanced Services) – advanced products and services like wireless IP phones, RF firewalls, and location
appliances
Note: Cisco offers wireless IP phones with the same feature set found in desk phones, including optional LEAP authentication.

The Cisco Compatible Extensions Program
The Cisco Compatible Extensions (CCX) program ensures the widespread availability of client devices that are interoperable with a Cisco WLAN
infrastructure. You may notice a “Cisco Compatible” sticker on the device or its packaging.

103 | P a g e

Wireless LAN Attributes
Wireless access points provide client connectivity similar to what a switch would do in a wired infrastructure. Radio waves are the physical medium as
opposed to wires and the same network and application layer protocols can run over a WLAN network (ex. IP, HTTP, etc.).

Some specific considerations

WLANs use Carrier Sense Multiple-Access/Collision Avoidance (CSMA/CA)

Because it is “avoidance” centric and not “detection” centric, it is half duplex. CSMA/CA uses RTS (request to send) and CTS (clear to send)
messages to avoid collisions

RF is susceptible to interference, distortion, and noise often caused by physical structures and specific materials.

WLAN design should include the fact that clients are often mobile and use batteries.

Different countries have unique rules and standards regarding RF implementations.

Antennas are characterized by polarization, gain, and directionality and antenna power is measured in dBi

SSIDs
Service Set Identifiers or SSIDs map a network, by VLAN, to a specific segment of users. The segment of users can have specific QoS or security assigned
to them when they associate with the SSID. The SSIDs are often broadcast by wireless access points, but can also be simply statically configured on a
host device.
Note: SSID names are case sensitive, so inconsistent case in an SSID configuration can result in a failed connection.
Another important point regarding SSID configuration is when an AP is hosting multiple SSIDs (and in turn multiple VLANs), the link back to the switch
must be a trunk that supports all of the VLANs.

104 | P a g e

Wireless Topologies
There are three main types of WLAN topologies used today:


Client access (think end devices connecting to an AP )
Point-to point (ex. building-to-building)
Mesh

There are two modes of connection:

Ad-hoc (a.k.a. Independent Basic Service Set [IBSS])

Clients communicate directly with each other without the use of an
access point
Limited in range and function

Infrastructure

Basic Service Set [BSS] – One AP to connect to clients, so the signal
range (known as it’s microcell) must encompass all clients
Extended Service Set [ESS] – Multiple APs with overlapping
microcells connected by a common distribution system
o Microcells should overlap by 10-15% for data
o Microcells should overlap by 15-20% for voice
o Each AP should use a different channel

Wireless bridges allow wired devices to connect to the wireless network by plugging directly into the
bridge.

Wireless Mesh
Wireless mesh networks are usually designed for long distances. Only the APs on the edges of the
mesh network connected to the wired infrastructure – the rest hops AP to AP, each acting as a
repeater. Each intermediate AP has multiple paths through the mesh network, all coordinated by the
Adaptive Wireless Path (AWP) protocol. AWP chooses the best path for traffic to the wired network and
also select a backup path in case the preferred path fails.

Exam Takeaways 

Keep in mind that the Exam is labeled
SWITCH for a reason.
Wireless is
included in the blueprint and I have
added plenty of notes for you, but keep
in mind that it is a layer 2 exam. 

I would not spend too much time
sweating the details here. Run through
it once or twice, but no more.
105 | P a g e

Client Connectivity
The following steps define how clients connect to an access point. Keep in mind that APs send out beacons with SSID information at regular intervals
unless configured otherwise.
1. Clients sends probe request and listens for probe responses and beacons
2. AP replies to the request with a probe response
3. Client then initiates an association with the access point. During the association, 802.1x authentication and any other necessary security
information is passed to the AP.
4. AP accepts the association. MAC address and SSID information is exchanged between the two.
5. AP adds client’s MAC to its association table
When ESS Infrastructure mode is in use, clients can roam (associate with another AP) between APs, but the access points must be configured with the
same SSID/VLAN information and security settings. Layer 2 roaming is done using Inter-Access Point Protocol (IAPP) with multicast. Layer 3 roaming
performed on different subnets using wireless LAN controllers.

Note: VoIP over WLAN is susceptible to latency and jitter problems. This is a particular issue when roaming between APs, so short roaming times are
critical.

A client will automatically attempt to roam if any of the
following are present:

Data rate is reduced

Misses too many beacons from the associated AP

Max data retry count is exceeded

If configured to search for another AP at regular intervals

Client roaming requires the following configured:

All APs should be configured with identical VLANs

All APs should be configured with identical subnets

All APs should be configured with identical SSIDs

106 | P a g e

WLAN Components
Cisco supports two different types of wireless access points, autonomous and lightweight. Autonomous systems are able to provide wireless services
independently and lightweight models work in combination with a wireless controller. Both variations can receive their power from Power over Ethernet
(PoE) switches or midspan power injectors which inject power into a cable run. Both of these options are important because they prevent the need for
electrical outlets near an AP, giving more flexible location options. Note that access points can require up to 15 Watts of power, so if you are running
PoE, me sure the switch can power the number of APs connected.

Autonomous APs
Autonomous APs run Cisco IOS and are configured directly. The traffic flows from client, to autonomous AP, to connected switch, to the rest of the
network. If roaming is a requirement, make sure proper VLANS and SSIDs are configured (make sure a management VLAN is included). Also, only layer
2 roaming is possible on autonomous APs. Make sure the switch has power and remember to configure the connected switch interface as a trunk if you
are using multiple VLANs.
Redundancy is provided by multiple APs.

Repeaters
Repeaters are access points configured to extend the radio range of an existing wireless network. The repeater AP is not connected to the
wired LAN, instead it is in the signal range of an AP connected to the wired LAN. Autonomous access points are required if you need to
configure repeaters. The SSID must match on both the root access point and the repeater AP and the recommended coverage overlap
between the AP connected to the wired LAN and the repeater AP is 50%.
Because repeaters are also configured on the same channel as the LAN-connected AP, every additional repeater that is added to the chain
on the same channel effectively cuts the throughput of that network in half because wireless works in half-duplex mode. If any AP is
transmitting, everyone else must wait their turn to relay the message.
107 | P a g e

Lightweight APs
When using lightweight access points, the AP and the wireless LAN controller (WLC) split the functions of layer 2, the MAC layer (sometimes referred to as
“split” MAC). The management controller includes a Wireless Control System (WCS) and location-tracking appliance. Redundancy consists of multiple
WLCs.
The AP handles real-time processes and the WLC handles processes that are not time sensitive.

Examples of AP handled functions include:

Security
VLAN tagging


QoS
Forwarding traffic


Authentication
Client association

Controllers provide a single point of management which can be a big advantage in large-scale deployments.

This is where is starts getting heady, especially if you’re a route/switch guy… but hang with me.

LWAPP
LWAPP provides access point discovery, information exchange, and configuration. LWAPP encapsulates control traffic using UDP port 1024 as the source
and UDP port 12223 as the destination. Layer 3 LWAPP uses a UDP/IP frame that requires the Cisco AP to get its IP address from a DHCP server.
The split MAC function is performed by LWAPP or Lightweight Access Point Protocol which uses AES-encrypted control messages, but does not encrypt
data traffic.

Control traffic for LWAPP is encapsulated and encrypted
Data traffic for LWAPP is encapsulated but not encrypted

A newer IETF-standard that can perform the same function is CAPWAP (Control Provisioning of Wireless Access Points protocol). Both CAPWAP and
LWAPP use UPD and the controller does not have to be in the same subnet as the APs, just reachable through IP.

108 | P a g e

Lightweight APs use this process to discover their controller:
1. The AP requests a DHCP address – the response includes the management IP of one or more WLC.
2. The AP sends a Discovery Request message (using LWAPP or CAPWAP) to each WLC.
3. The WLC responds (using LWAPP or CAPWAP) with a Discovery Response that includes the number of APs associated with it.
4. The AP sends a Join Request to the WLC with the fewest APs associated to it.
5. The WLC responds with a Join Response message. Once that is complete, the AP and controller exchange authentication information and
produce encryption keys for future control messages. The WLC then configures the AP (SSID, channels, security settings, etc.).

Step 2 (discovery request) explained:
If Layer 2 LWAPP mode is supported on the LAP, the LAP broadcasts an LWAPP discovery message in a Layer 2 LWAPP frame. If the LAP does not
support Layer 2 mode, or if the WLC or the LAP fails to receive an LWAPP discovery response to the Layer 2 LWAPP discovery message broadcast, the LAP
attempts a Layer 3 LWAPP WLC discovery.

Lightweight AP Planning
When using lightweight access points, the traffic flows from the client to the AP through the switched network, to the WLC, and finally from there to its
destination. Because the traffic always goes from AP to the controller, it is important that the AP has layer 3 connectivity to the WLC.
While the controllers can be distributed across the network (ex. a single controller in each building), Cisco recommends a centralized approach co-locating
them for example together in your data center. Simplified management and user mobility are the reasons.
VLAN and SSID assignments must be configured on the controller in a controller-based environment as opposed to the autonomous model. A
management VLAN is used to communicate between the AP and controller. The interface on the switch connected to the AP should be an access port
using the management VLAN ID. The interface on the switch connected to the controller should be a trunk to forward traffic for multiple subnets.
Etherchannels (portchannels) are often used to connect WLCs to the switch for redundancy and bandwidth.

109 | P a g e

When using LWAPP on a lightweight AP, the console port provides read-only access to the device. As with the autonomous model, you should make sure
the AP has power from either PoE or a power injector.

WLC Configuration
WLCs can be configured by command-line or through a web browser and GUI interface. There are two commands that enable the web interface modes
on the controller:
To enable HTTP access
config network webmode {enable | disable}
To enable HTTPS access
config network secureweb {enable | disable}
Note: Cisco WLAN controllers can be a dedicated appliance, module for 6500 and 7600 series switches, or integrated into 3750G switches. Also, while we
aren’t going to get into configuring an AP, you should be aware that the virtual interface on a WLC is often used for a DHCP relay.

Hybrid Remote Edge Access Point (H-REAP)
If the wireless controllers are located across the WAN, some significant problems can result. The traffic would have to travel over the WAN to the
controller and back again. Also, if the WAN link goes down or flaps, the APs quickly loose functionality. H-REAP is designed to address these
problems.

Connected mode
When the controller is reachable, APs only send non-local traffic to the controller – the rest is just sent directly to the locally-attached switch for
forwarding. That prevents local traffic from having to cross the WAN. Also, it doesn’t have to be local traffic – you can configure any VLANs you want to
stay off the controller, but local VLANs make the most sense. The AP sends only remote and authentication traffic to the controller.
Note: In this mode, the connection between the AP and the switch should be a trunk to carry all the VLANs.

110 | P a g e

Disconnected mode
If the controller becomes unreachable, the AP authenticates clients itself. Local traffic is still sent to the local switch, but remote destinations will not be
reachable as the WAN would be down.
Note: H-REAP is configured on the controllers, not the APs.

Switch Configuration for Wireless
For an autonomous AP, configure it as an access port for a single VLAN or a trunk port for multiple VLANs. Trust CoS if the link is a trunk. Set the
trunk’s native VLAN to the AP’s management VLAN. Prioritize voice if you are using wireless VoIP phones.
For a controller-based AP, generally use an access port and place it in the management VLAN. Trust CoS on the port and again prioritize voice if you
are using wireless VoIP phones.
Configure the switch port connected to the controller as a trunk port (limited to only wireless and management VLANs). Trust CoS on the port and again
prioritize voice if you are using wireless VoIP phones.

111 | P a g e

Cisco Chapter 8:

642
813

VoIP
& QoS
112 | P a g e

Voice over IP (VoIP) is becoming more and more common in the enterprise world by replacing traditional TDM phone systems with feature-rich IP-based
communication servers.

Some benefits of converged voice, video, and data into a single network include:

Expense reducer – if only a single cable drop is required per user, cabling and network provisioning costs go down. PSTN costs also go down as
more calls can use the existing data network and not the public phone service.

Efficiencies in bandwidth – for example, if a voice call is not in progress, data can be transmitted on the same link. That’s not the case with
traditional phone lines.

Innovative features- VoIP allows new services to be added including unifying several modes of communication (ex. voicemail, email, IM). Service
providers can also sell new services and provide more flexible pricing arrangements.

VoIP network
requirements

Video network
requirements

Data network
requirements

Low bandwidth, delay, jitter, packet loss

Low delay, jitter, and packet loss

High bandwidth, availability, and security

PoE

Medium security and management

Jitter and delay are not that crucial

Medium security

High availability

Medium management

High management

Highly available network

113 | P a g e

AVVID
Architecture for voice, video and integrated data, more commonly referred to by Cisco as AVVID, was an all-encompassing blueprint for converged
enterprise networks pitched by Cisco. While it was originally intended to include a very large cross-section of product families, it has been primarily
focused on Cisco’s VoIP products. For the exam you should simply be aware of the fundamental deployment concerns which AVVID addresses:




High availability
QoS
Security
Mobility
Scalability

VoIP Components

IP Phones – Provides voice and applications to users

Cisco Unified Communications Manager (UCM) – Essentially an IP PBX

Voice Gateways – Translate between IP and PSTN (can also serve as a backup to UCS)

Gatekeepers - Optional, usually in larger environments. Performs call admission control, allocates bandwidth for calls, and resolves phone numbers
to IP addresses

Video Conferencing Units – Allow voice/video calls

Multipoint Control Units - Allow multi-point audio and videoconferencing

Application Servers – Provide application services like Unity Voicemail

Note: Voice traffic comes in two types, voice bearer and call control signaling. The voice bearer traffic uses RTP (Real Time Protocol) over UDP, while the
call control portion can use several different protocols to communicate between the phone and UCM and UCM to voice gateway.

114 | P a g e

VoIP Network Requirements
When planning for a VoIP deployment, keep in mind the following factors:
Features like call security, QoS, delay, etc.
Cabling use at least CAT-5.
Power either PoE from the switch, power inline module, or power brick connected to the phone itself.
Bandwidth planning is crucial. Commit no more than 75% capacity to allow for oversubscription and other types of traffic like video, and data.
Network management is important for proactively managing bandwidth and availability.
High availability means redundant links, an auto-restart UPS, monitoring, and a response contract.

Call Signaling
There are generally two separate traffic streams when placing a VoIP call. The first is the call control signaling, used to setup, tear-down, maintain, and
redirect calls. Some examples of call signaling protocols include H.323, SIP, and MGCP. Make sure you do not confuse these protocols with the voice
compression protocols like G.729 and G.711.
The second is the actual UDP voice traffic itself, which used RTP (Real-Time Transport Protocol) to encapsulate the traffic.

Bandwidth Considerations
Each call uses somewhere around 21-106 kbs depending on the codec used, plus around 150 bps for control traffic. Each voice packet is in the
neighborhood of 60-120 bytes.

115 | P a g e

A good formula for calculating call bandwidth is: (Packet payload + all headers) * Packets per second



Max one-way delay of 150 ms
Under 1% packet loss
Max average jitter (variable queue delays) of 30 ms
The sum of every application’s bandwidth (including voice) should not exceed 75% of the total available bandwidth for each link.

Voice VLANs
Voice VLANs (sometimes referred to as auxiliary VLANS) are a way for Cisco switches to dynamically tag and assign voice traffic including placing it in its
own separate VLAN/subnet. That allows for QoS and security to be applied as well as simplified troubleshooting. Voice VLANs are disabled by default.
Cisco IP phones have a small internal switch that places an 802.1q tag on the voice traffic and marks the Class of Service (CoS) bits in the tag. Data
traffic (from the attached PC) is sent over the native VLAN, while all voice traffic is sent over the configured VLAN on the access port. Cisco calls this
setup a multi-VLAN access port. This whole process of enabling voice VLANs also enables the switch to forward frames with specific 802.1P markings.
802.1P designates how QoS is applied at the MAC layer.

Power over Ethernet
PoE Switches
Two different power standards exist for PoE, Cisco Inline PoE and IEEE 802.3af. Both have a mechanism to sense that a powered device is connected to
a port. 802.3af relies on the devices to let the switch know how much power it needs, while Cisco’s devices can additionally use CDP to send that
information. Most phones don’t require more than 15 Watts of power, but some PoE equipment still requires more. The new 802.3at standard, also
known as PoE+, will specify up to 30 Watts of power. Some current Cisco switches can supply up to 20W.
Switch assumes all PoE devices require 15.4 W of power until the device tells the switch otherwise. If the switch reboots, all PoE devices will receive 15.4
Watts at the same time, which is why you should budget 15.4 W for every PoE device when doing power planning.
Note: Non-CDP devices always get 15.4 W allocated to them.

116 | P a g e

PoE Configuration
Cisco switches automatically detect and provide power, but if you need to disable it or re-enable it, use the following commands:
Switch(config-if)# power inline {never | auto}

To view power information for all ports:
Switch# show power inline [interface]

Video
Video traffic, from Cisco’s perspective, falls into one of three categories:
Many to many


Examples include Telepresence, WebEx,
peer-to-peer video apps
Data flows client-to-client or MCU-toclient
Bandwidth requirements for high-def
video can be up to 12 Mbs per location
(with compression)

Many to few

Examples include IP surveillance cameras.
Typically require up to 4 Mbs of
bandwidth

Few to many


Example is Internet streaming from a
single source
Quality not as critical
Traffic flows storage to client or server to
client

117 | P a g e

Quality of Service
Quality of Service is a very important part of operating a VoIP platform on a campus network. The ability to prioritize different traffic on the same link
makes voice over IP a reality on a shared Ethernet fabric. There are three main drivers for applying QoS: jitter, packet loss, and delay.

QoS Strategies
Implemented on inbound interfaces:

Implemented on outbound interfaces:

Classification

Traffic Shaping

Distinguishes one type of traffic from another by ACLs, ingress
interfaces, and NBAR. After it is classified, other QoS functions can be
applied.

Defines an artificial maximum throughput for the interface, providing a
steady stream that is throttled while congestion occurs by buffering
traffic.

Marking

Queuing

(layer 2) Within a frame, placing an 802.1P CoS value within the 802.1Q
trunk tag.
(layer 3) IP Precedence or Differentiated Services Code Point (DSCP)
values in a packet’s IP header.

After traffic has been classified and marked, it can be placed into one of
many queues to be sent at different rates and order. Examples include
First In First Out (FIFO), priority queuing, weighted fair queuing, and
custom queuing. Note: the default queue method is FIFO.

Policing

Dropping

Decides whether a specific type of traffic is within predefined bandwidth
levels. If not it is usually dropped (CAR and class-based routing are
examples).

By default, interface queues accept all traffic until they are full and drop
everything after that. Prioritized dropping can be configured to drop
low-priority, re-transmittable packets first (ex. Weighted Random Early
Detection [WRED]).

118 | P a g e

DSCP
Differentiated services provides a mechanism to change levels of service based on the value of specific bits in the IP header or the 802.1Q tag. Each hop
along the way must be configured to treat the marked traffic the way you want, also known as per-hop behavior (PHB).
As mentioned, there are two ways to mark the DSCP values depending on what layer you are marking it at. The first method (layer 2) uses the three
802.1P bits within the 802.1Q tag to set the CoS value. Voice is commonly set to 5 and video 4.
For layer 3, the 8 bit ToS field within the IP header is used. There are again two options here. IP Precedence can be set using the top 3 bits or DSCP can
be set using the top 6 bits. The bottom 2 bits are used for congestion notification. When setting DSCP values, 0 is the default, indicating best-effort
delivery.
The six bit DSCP code consists of two parts, the first 3 bits define the DiffServ Assured Forwarding (AF) class and the next two bits define the drop
probability. The sixth bit is unused. The DSCP Assured Forwarding Values table is below for each of the four defined AF classes.

Note: Voice bearer traffic uses an Expedited Forwarding value of DSCP 46 to give it high priority.

Low Drop

Medium Drop

High Drop

Class 1

AF11

AF12

AF13

Class 2

AF21

AF22

AF23

Class 3

AF31

AF32

AF33

Class 4

AF41

AF42

AF43

119 | P a g e

Trust Boundaries
The place where a decision about priority marking on incoming
frames/packets is done is called the trust boundary. When IP traffic comes
into an interface and is already marked, the switch has the following
options:



Trust the DSCP value
Trust the IP Precedence value
Trust the CoS value in the frame
Classify the traffic based on an IP ACL or MAC ACL

Cisco recommends marking the traffic as close to the source as possible. IP phones can mark their own traffic and other clients can be marked at the
access switch. If that is not an option - mark at the distribution layer, but never at the core. Marking slows traffic down, so it has no place being in the
core. All devices within the network path should be configured to trust the marking and provide service based on that.

Configuring QoS for VoIP
Before rolling out VoIP in your environment, think through the following planning steps:
1. PoE - Ensure there is enough power for all the phones and has a UPS backup
2. Voice VLAN - Think through the number of VLANs/subnets required, add DHCP scopes for the
phones, add voice networks to routing protocols

Exam Takeaways

3. QoS - Decide on which marking and queues you plan on using. Cisco recommends implementing
AutoQoS and then tuning as needed. 

Know how trust boundaries are defined
and where they should be.

4. Fast Convergence - tune routing and HSRP/VRRP/GLBP timers 

Memorize what each
configuration does.

manual

QoS

120 | P a g e

5. Test Plan - Test the implementation before rolling it out to real users. Some things to look for include making sure the phone and PC have the correct
IP addresses, the phone registers itself, and calls can be made.

Auto QoS
Auto QoS, when enabled, configures the switch interfaces using common best-practices including:

Auto discovery and classification of network applications

Creates QoS policies for those apps

Configures the switch to support IP phones

Sets up SNMP traps for network reporting

Provides a consistent QoS configuration across the environment

Note: Auto QoS uses CDP to function properly with IP phones, so make sure it is not disabled.

Configuring Auto QoS
Configures the interface to trust CoS on incoming traffic
Switch(config-if)# auto qos voip trust
Configures the interface to trust CoS only if Cisco phone is connected (requires CDP)
Switch(config-if)# auto qos voip cisco-phone
Displays the Auto QoS configuration
Switch# show auto qos

121 | P a g e

Manual QoS Configuration
Switch(config-if)# switchport voice vlan vlan-ID
Associates a voice VLAN with a switch port

Switch(config-if)# mls qos trust {dscp | cos}
Trust markings on traffic entering an interface. Effectively moves the trust boundary to the attached device (often an IP phone or server).

Switch(config-if)# mls qos trust device cisco-phone
Trust markings only if a Cisco phone is connected

Switch(config-if)# switchport priority extend cos cos-value
Instructs the IP phone to set/overwrite CoS value for data coming from a PC attached the phone. The phone would then be the new trust boundary
because it is now doing the marking on the data traffic. Also important to note that the CoS vlaue assigned at the end of the statement is a number
between 0 and 7.. 7 being the highest priority and 0 being the default value.
Switch(config-if)# switchport priority extend trust
Instructs the phone to trust the priority of the data coming from the attached PC.
Switch# show interfaces interface-id switchport
Verify interface parameters
Switch# show mls qos interface interface-id
Verify QoS parameters on an interface

122 | P a g e

Final VoIP QoS Considerations

If a voice VLAN is configured, untagged traffic is a sent according to the default CoS priority of the port

CDP is required to allow for voice VLANs

Portfast must be enabled on a switch interface configured as a voice VLAN

Several mechanisms can be used in combination to improve VoIP quality including queuing, classification and marking close to the source, and
congestion prevention protocols like WRED

QoS for Video
Video traffic can change dramatically depending on what kind of compression is used and how static the picture is. Video that is constantly changing will
use much more bandwidth and be more bursty that fairly still-image video. Voice traffic is much more steady.
Video should be placed in its own queue, especially if the organization is doing interactive video. Consider creating separate queues for interactive and
streaming video if the business uses it. Less than 200 ms of latency is considered acceptable by most standards.

123 | P a g e

Cisco Chapter 9:

642 Simulation
813 Scenarios
124 | P a g e

Security Simulation
Example:
PROBLEM
The Fresh Fish Factory is a growing mid-size company with a specialty in producing
tasteless crustaceans to retail chains at the lowest possible cost. After a recent financial
server security breach, they decide to make security a priority - beginning with their HR
Accounting VLAN.

The Fresh Fish Factory has decided to restrict access to VLAN 35 to the 10.1.35.0 /24
range as well as implement 802.1x port security on all access switches for enhanced user
authentication. Please complete the following:
1. Configure port-based authentication on AccessSW that will be done using a Radius
server.
Radius server IP address: 10.1.1.29.
Radius key: pass123

2. Restrict VLAN 35 to devices in the 10.1.35.0 /24 address range.
3. Packets from devices in any other network range should be explicitly dropped.
4. Filtering should be implemented as close to the server farm as possible.
You are able to make any necessary configuration changes to both AccessSW and DistSW.

125 | P a g e

SOLUTION
Configure AccessSW:

1. Enable AAA on the switch:
AccessSW# configure terminal
AccessSW(config)# aaa new-model

2. Define the Radius server with the shared secret key:
AccessSW(config)# radius-server host 10.1.1.29 key pass123

3. Enable Radius server authentication on the switch:
AccessSW(config)# aaa authentication dot1x default group radius

4. Enable 802.1x on the switch:
AccessSW# configure terminal
AccessSW(config)# dot1x system-auth-control
5. Configure interface Fast Ethernet 0/12 for 802.1x:
AccessSW(config)# interface fa 0/12
AccessSW(config-if)# switchport mode access
AccessSW(config-if)# dot1x port-control auto
AccessSW(config-if)# exit

126 | P a g e

Configure DistSW
1. Create an access list:
DistSW(config)# ip access-list standard 10
DistSW(config-std-nacl)# permit 10.1.35.0 0.0.0.255
DistSW(config-std-nacl)# exit

2. Define an access map that uses the access list we just created:
DistSW(config)# vlan access-map TEST 1
DistSW(config-access-map)# match ip address 10
DistSW(config-access-map)# action forward
DistSW(config-access-map)# exit
DistSW(config)# vlan access-map TEST 2
DistSW(config-access-map)# action drop
DistSW(config-access-map)# exit

3. Apply the VLAN map to VLAN 35:
DistSW(config)# vlan filter TEST vlan-list 35

127 | P a g e

EtherChannel + STP
Simulation Example:
PROBLEM
The Better Butter Company has recently replaced an edge switch in a wiring closet due to a hardware failure. Unfortunately the
configuration was not backed up and now you are tasked with getting the new switch (AccessSW) up and running as fast as possible
based on the following requirements.

DistSW should not need any configuration changes made, as it worked properly before the outage. It is running rapid spanning tree and VTP
transparent mode.

AccessSW needs to have three VLANs configured on the correct interfaces as shown in the diagram below. It also needs to be running the
same VTP and STP mode as DistSW. DistSW must remain the spanning tree root bridge for all active VLANs.

The connection between the two switches must be configured using a redundant, non-proprietary protocol with DistSW controlling the
activation. VLANs should be manually pruned to prevent unnecessary broadcast propagation.

All VLANs traversing the trunk need to be tagged except for VLAN 99, which should not be tagged.

Additional requirements for AccessSW:
- All active access ports must transition immediately to forwarding state
- No routing is supported on AccessSW
- SVI VLAN 1 needs to be configured with IP address 192.168.1.22 /24

128 | P a g e

129 | P a g e

SOLUTION
1. Create the VLAN 1’s SVI:

AccessSW# conf t
AccessSW(config)# interface vlan 1
AccessSW(config-if)# ip address 192.168.1.22 255.255.255.0
AccessSW(config-if)# no shut
AccessSW(config-if)# exit

2. Configure STP:
AccessSW(config)# spanning-tree mode rapid-pvst
AccessSW(config)# spanning-tree vlan 1,50-52 priority 65535

3. Configure VTP mode:
AccessSW(config)# vtp mode transparent

4.

Configure the access ports:

AccessSW(config)# interface range fastEthernet 0/11-12
AccessSW(config-if)# switchport mode access
AccessSW(config-if)# switchport access vlan 50
AccessSW(config-if)# spanning-tree portfast
AccessSW(config-if)# no shut
AccessSW(config)# interface range fastEthernet 0/13-14
AccessSW(config-if)# switchport mode access
AccessSW(config-if)# switchport access vlan 51
AccessSW(config-if)# spanning-tree portfast
AccessSW(config-if)# no shut

130 | P a g e

AccessSW(config)# interface range fastEthernet 0/15-16
AccessSW(config-if)# switchport mode access
AccessSW(config-if)# switchport access vlan 52
AccessSW(config-if)# spanning-tree portfast
AccessSW(config-if)# no shut
AccessSW(config-if)# exit

5.

Next, configure the trunking ports for a non-proprietary EtherChannel:

AccessSW(config)# interface range fastEthernet 0/1-2
AccessSW(config-if)# channel-protocol lacp
AccessSW(config-if)# channel-group 1 mode passive
AccessSW(config-if)# no shut
AccessSW(config-if)# exit

6. Finally, create the EtherChannel and configure trunk:
AccessSW(config)# interface port-channel 1
AccessSW(config-if)# switchport trunk encapsulation dot1q
AccessSW(config-if)# switchport mode trunk
AccessSW(config-if)# switchport trunk allowed vlan 1,99,50-52
AccessSW(config-if)# switchport trunk native vlan 99
AccessSW(config-if)# no shut
AccessSW(config-if)# exit

131 | P a g e

MLS Simulation Example:
PROBLEM
VLANs 2, 3, and 4 were recently added to the multilayer switch shown in the
diagram to the right and have not been configured. Users in all three VLANs
need to be able to connect to the server, which resides behind the router.
You have been tasked with configuring layer 3 connectivity on the multilayer
switch so that PCs in all three VLANs can successfully ping the server.

Additional requirements:

All routed ports and SVIs must use the lowest available IP address within
its subnet.

Use EIGRP for dynamic routing, no static routes or other routing protocols
can be used.

EIGRP AS 700 needs to be configured

The access ports are already configured, so do not make any changes to
their configurations

132 | P a g e

SOLUTION
1. Configure the switch’s routed interface:
Switch# configure terminal
Switch(config)# int gi 0/1
Switch(config-if)#no switchport
Switch(config-if)# ip address 10.10.10.1 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# exit

2. Configure the VLAN SVIs:
Switch(config)# int vlan 2
Switch(config-if)# ip address 192.168.1.1 255.255.255.224
Switch(config-if)# no shutdown
Switch(config-if)# int vlan 3
Switch(config-if)# ip address 192.168.1.33 255.255.255.224
Switch(config-if)# no shutdown
Switch(config-if)# int vlan 4
Switch(config-if)# ip address 192.168.2.1 255.255.255.255
Switch(config-if)# no shutdown
Switch(config-if)#exit

3. Enable and configure routing:
Switch(config)# ip routing
Switch(config)# router eigrp 700
Switch(config-router)# network 10.10.10.0 0.0.0.255
Switch(config-router)# network 192.168.1.0 0.0.0.31
Switch(config-router)# network 192.168.1.32 0.0.0.31
Switch(config-router)# network 192.168.2.0 0.0.0.255
Switch(config-router)# exit

133 | P a g e