Ccna3 Commands
Ccna3 Commands
VTP
VLAN Trunking Protocol (VTP) reduces administration in a switched network.
A switch in VTP server mode can manage additions, deletions and renaming
of VLANs across the domain. For example, when a new VLAN is added on the
VTP server, the VLAN information is distributed to all switches in the domain.
This eliminates the need to configure the new VLAN on every switch. VTP is a
Cisco-proprietary protocol that is available on most of the Cisco Catalyst
series products.
VLAN trunking protocol (VTP) allows a network administrator to manage
VLANs on a switch configured as a VTP server. The VTP server distributes and
synchronizes VLAN information over trunk links to VTP-enabled switches
throughout the switched network. This minimizes the problems caused by
incorrect configurations and configuration inconsistencies.
VTP Modes
A switch can be configured in one of three VTP modes, as described in Figure
1.
VTP Server
Advertises the VTP domain VLAN information to other VTP-enabled
switches in the same VTP domain
Stores the VLAN information for the entire domain in NVRAM
Creates, deletes, or renames VLANs for the domain
Default VTP mode
VTP Client
Cannot create, change, or delete VLANs
Stores the VLAN information for the entire domain in RAM
Must be configured as VTP client
VTP Transparent
Does not participate in VTP except to forward VTP advertisements to
VTP clients and VTP server
VLANs that are created, renamed, or deleted on transparent switches
are local to that switch only
Must be configured as VTP transparent
Note: A switch that is in server or client mode with a higher configuration
revision number than the existing VTP server updates all VLAN information in
the VTP domain. As a best practice, Cisco recommends deploying VTP in
transparent mode for better VLAN control, security, and manageability.
SUMMARY OF THE ABOVE
VTP Version 1 and Version 2 are described in the figure. Switches in the same
VTP domain must use the same VTP version.
Note: VTPv2 is not much different than VTPv1 and is generally only
configured if legacy Token Ring support is required. The newest version of
VTP is Version 3. However, VTP Version 3 is beyond the scope of this course.
#show vtp status {displays the VTP status}
steps to configure VTP:
Step 1: Configure the VTP Server
Step 2: Configure the VTP Domain Name and Password
Step 3: Configure the VTP Clients
Step 4: Configure VLANs on the VTP Server
Step 5: Verify the VTP Clients Have Received the New VLAN Information
Confirm that all switches are configured with default settings to avoid
any issues with configuration revision numbers.
#vtp mode server {Configure Switch as the VTP server}
-show vtp status {confirm that S1 is a VTP server}
-vtp domain CCNA {the domain name is configured as CCNA}
-vtp password class {All switches in the VTP domain must use the same VTP
domain password}
-show vtp password {Verify the VTP password}
Configure the VTP Clients
#vtp mode client {Configure Switch as the VTP client}
-vtp domain CCNA
-vtp password class
Configure VLANs on the VTP Server
#vlan 10
-name SALES
#vlan 20
-name MARKETING
#vlan 30
-name ACCOUNTING
#show vlan status
Note
VLANs 100, 102, 105, 106, and 107: could be created at once i.e
S1(config)# vlan 100,102,105-107
#config t
#vtp mode transparent
#vlan 2000
#end
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@
DTP
DTP is a Cisco proprietary protocol that is automatically enabled on Catalyst
2960 and Catalyst 3560 Series switches. Switches from other vendors do not
support DTP. DTP manages trunk negotiation only if the port on the neighbor
switch is configured in a trunk mode that supports DTP.
Caution: Some internetworking devices might forward DTP frames
improperly, which can cause misconfigurations. To avoid this, turn off DTP on
interfaces on a Cisco switch connected to devices that do not support DTP.
The default DTP configuration for Cisco Catalyst 2960 and 3560 switches is
dynamic auto
To enable trunking from a Cisco switch to a device that does not
support DTP, use
#switchport mode trunk {interface configuration mode command}
#switchport nonegotiate {interface configuration mode command}
This causes the interface to become a trunk, but not generate DTP
frames.
Trunking modes
#switchport mode access - Puts the interface (access port) into permanent
non-trunking mode and negotiates to convert the link into a nontrunk link.
The interface becomes a nontrunk interface, regardless of whether the
neighboring interface is a trunk interface.
#switchport mode dynamic auto - Makes the interface able to convert the
link to a trunk link. The interface becomes a trunk interface if the neighboring
interface is set to trunk or desirable mode. The default switchport mode for
all Ethernet interfaces is dynamic auto.
#switchport mode dynamic desirable - Makes the interface actively attempt
to convert the link to a trunk link. The interface becomes a trunk interface if
the neighboring interface is set to trunk, desirable, or dynamic auto mode.
This is the default switchport mode on older switches, such as the Catalyst
2950 and 3550 Series switches.
#switchport mode trunk - Puts the interface into permanent trunking mode
and negotiates to convert the neighboring link into a trunk link. The interface
becomes a trunk interface even if the neighboring interface is not a trunk
interface.
#switchport nonegotiate - Prevents the interface from generating DTP
frames. You can use this command only when the interface switchport mode
is access or trunk. You must manually configure the neighboring interface as
a trunk interface to establish a trunk link.
Note: A general best practice is to set the interface to trunk and
nonegotiate when a trunk link is required. On links where trunking is
not intended, DTP should be turned off.
#show dtp interface fa0/1 {To determine the current DTP mode}
Troubleshoot VTP Issues
Incompatible VTP Versions
VTP versions are incompatible with each other.
Ensure that all switches are capable of supporting the required VTP
version.
VTP Password Issues
If VTP authentication is enabled, switches must all have the same
password configured to participate in VTP.
Ensure that the password is manually configured on all switches in the
VTP domain.
Incorrect VTP Domain Name
An improperly configured VTP domain affects VLAN synchronization
between switches and if a switch receives the wrong VTP
advertisement, the switch discards the message.
To avoid incorrectly configuring a VTP domain name, set the VTP
domain name on only one VTP server switch.
All other switches in the same VTP domain will accept and
automatically configure their VTP domain name when they receive the
first VTP summary advertisement.
All Switches set to VTP Client Mode
If all switches in the VTP domain are set to client mode, you cannot
create, delete, and manage VLANs.
To avoid losing all VLAN configurations in a VTP domain, configure two
switches as VTP servers.
Incorrect Configuration Revision Number
If a switch with the same VTP domain name but a higher configuration
number is added to the domain, invalid VLANs can be propagated
and / or valid VLANs can be deleted.
The solution is to reset each switch to an earlier configuration and then
reconfigure the correct VLANs.
Before adding a switch to a VTP-enabled network, reset the revision
number on the switch to 0 by assigning it to another false VTP domain
and then reassigning it to the correct VTP domain name.
DTP Troubleshooting
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@
Some Layer 3 protocols implement a TTL mechanism that limits the number
of times a Layer 3 networking device can retransmit a packet. Layer 2 devices
do not have this mechanism, so they continue to retransmit looping traffic
indefinitely. STP, a Layer 2 loop-avoidance mechanism, was developed to
address these problems.
To prevent these issues from occurring in a redundant network, some type of
spanning tree must be enabled on the switches. Spanning tree is enabled, by
default, on Cisco switches to prevent Layer 2 loops from occurring.
Root ports - Switch ports closest to the root bridge in terms of overall cost
to the root bridge.
Designated ports - All non-root ports that are still permitted to forward
traffic on the network.
If one end of a segment is a root port, then the other end is a
designated port. All ports on the root bridge are designated ports.
Alternate and backup ports - Alternate ports and backup ports are in
discarding or blocking state to prevent loops.
Alternate ports are selected only on links where neither end is a root
port.
Blocking ports only come into play when two ports on the same switch
provide redundant links through the network.
As newer and faster Ethernet technologies enter the marketplace, the port
cost values may change to accommodate the different speeds available
The values have already been changed to accommodate the 10 Gb/s
Ethernet standard. To illustrate the continued change associated with
high-speed networking, Catalyst 4500 and 6500 switches support a
longer port cost method; for example, 10 Gb/s has a 2000 port cost,
100 Gb/s has a 200 port cost, and 1 Tb/s has a 20 port cost.
Although switch ports have a default port cost associated with them, the port
cost is configurable. The ability to configure individual port costs gives the
administrator the flexibility to manually control the spanning tree paths to
the root bridge.
The internal root path cost is equal to the sum of all the port costs along the
path to the root bridge (as shown in Figure 3). Paths with the lowest cost
become preferred, and all other redundant paths are blocked.
Paths with the lowest cost become preferred, and all other redundant paths
are blocked.
A root bridge will not have any root ports. All ports on a root bridge will be
designated ports. A switch that is not the root bridge of a network topology
will have only one root port defined.
Note on the above figure that S2 has two port ports, F0/1 and F0/2
with equal cost paths to the root bridge. In this case the bridge IDs of
the neighboring switches, S3 and S4, will be used to break the tie. This
is known as the sender’s BID. S3 has a BID of 24577.5555.5555.5555
and S4 has a BID of 24577.1111.1111.1111. Because S4 has a lower BID,
S2’s F0/1 port, the port connected to S4, will be the root port.
STP determines whether S2’s F0/2 port or S3’s F0/2 port will be the
designated port for the shared segment. The switch with the lower
cost path to the root bridge (root path cost) will have its port selected
as the designated port. S3’s F0/2 port has a lower cost path to the root
bridge so it will be the designated port for that segment.
All STP port roles have been assigned except for S2’s F0/2 port. S2’s
F0/1 port has already been selected as the root port for that switch.
Because S3’s F0/2 port is the designated port for this segment, S2’s
F0/2 port will become an alternate port.
The Designated Port is the port that sends and receives traffic, to and
from that segment to the Root Bridge. This is the best port on that
segment towards the root bridge. The alternate port will not send or
receive traffic on that segment.
Note: Bridge priority is the initial deciding factor when electing a root bridge.
If the bridge priorities of all the switches are the same, the device with the
lowest MAC address becomes the root bridge.
The priorities are equal, so the switch is forced to examine the MAC address
portion to determine which MAC address has a lower value.
Extended System ID
The bridge ID (BID) is used to determine the root bridge on a network. The
BID field of a BPDU frame contains three separate fields:
Bridge priority
Extended system ID
MAC address
Each field is used during the root bridge election.
Bridge Priority
The bridge priority is a customizable value that can be used to influence
which switch becomes the root bridge. The switch with the lowest priority,
which implies the lowest BID, becomes the root bridge because a lower
priority value takes precedence. For example, to ensure that a specific switch
is always the root bridge, set the priority to a lower value than the rest of the
switches on the network. The default priority value for all Cisco switches is
the decimal value 32768. The range is 0 to 61440 in increments of 4096. Valid
priority values are 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768,
36864, 40960, 45056, 49152, 53248, 57344, and 61440. All other values are
rejected. A bridge priority of 0 takes precedence over all other bridge
priorities.
Extended System ID
Early implementations of IEEE 802.1D were designed for networks that did
not use VLANs. There was a single common spanning tree across all switches.
For this reason, in older Cisco switches, the extended system ID could be
omitted in BPDU frames. As VLANs became common for network
infrastructure segmentation, 802.1D was enhanced to include support for
VLANs, which required that the VLAN ID be included in the BPDU frame.
VLAN information is included in the BPDU frame through the use of the
extended system ID. All newer switches include the use of the extended
system ID by default.
The extended system ID value is a decimal value added to the bridge priority
value in the BID to identify the priority and VLAN of the BPDU frame.
When two switches are configured with the same priority and have the same
extended system ID, the switch having the MAC address with the lowest
value, expressed in hexadecimal, will have the lower BID. Initially, all
switches are configured with the same default priority value. The MAC
address is then the deciding factor as to which switch is going to become the
root bridge. To ensure that the root bridge decision best meets network
requirements, it is recommended that the administrator configure the
desired root bridge switch with a lower priority. This also ensures that the
addition of new switches to the network does not trigger a new spanning
tree election, which can disrupt network communication while a new root
bridge is being selected.
When all switches are configured with the same priority, as is the case with
all switches kept in the default configuration with a priority of 32768, the
MAC address becomes the deciding factor as to which switch becomes the
root bridge.
Note: In the example, the priority of all the switches is 32769. The value is
based on the 32768 default priority and the VLAN 1 assignment associated
with each switch (32768+1).
Overview of PVST+
The original IEEE 802.1D standard defines a CST that assumes only one
spanning tree instance for the entire switched network, regardless of the
number of VLANs. A network running CST has these characteristics:
No load sharing is possible. One uplink must block for all VLANs.
The CPU is spared. Only one instance of spanning tree must be
computed.
Cisco developed PVST+ so that a network can run an independent instance of
the Cisco implementation of IEEE 802.1D for each VLAN in the network. With
PVST+, it is possible for one trunk port on a switch to block for a VLAN while
forwarding for other VLANs. PVST+ can be used to implement Layer 2 load
balancing. The switches in a PVST+ environment require greater CPU process
and BPDU bandwidth consumption than a traditional CST implementation of
STP because each VLAN runs a separate instance of STP.
In a PVST+ environment, spanning tree parameters can be tuned so that half
of the VLANs forward on each uplink trunk.
For each VLAN in a switched network, PVST+
performs four steps to provide a loop-free logical
network topology:
Step 1. Elects one root bridge - Only one switch can act as the root
bridge (for a given VLAN). The root bridge is the switch with the lowest
bridge ID. On the root bridge, all ports are designated ports (no root ports).
Listening - Listens for the path to the root. STP has determined that
the port can participate in frame forwarding according to the BPDU
frames that the switch has received. The switch port receives BPDU
frames, transmits its own BPDU frames, and informs adjacent switches
that the switch port is preparing to participate in the active topology.
Learning - Learns the MAC addresses. The port prepares to
participate in frame forwarding and begins to populate the MAC
address table.
Disabled - The Layer 2 port does not participate in spanning tree and
does not forward frames. The disabled state is set when the switch
port is administratively disabled.
Note that the number of ports in each of the various states (blocking,
listening, learning, or forwarding) can be displayed with the #show
spanning-tree summary command.
For example, the VLAN 2 default BID would be 32770 (priority 32768, plus the
extended system ID of 2). If no priority has been configured, every switch has
the same default priority and the election of the root bridge for each VLAN is
based on the MAC address. Because the bridge ID is based on the lowest
MAC address, the switch chosen to be root bridge might not be the most
powerful or the most optimal switch.
There are situations where the administrator may want a specific switch
selected as the root bridge. This may be for a variety of reasons, including:
the switch is more optimally located within the LAN design in regards to
the majority of traffic flow patterns for a particular VLAN;
the switch has higher processing power, or;
the switch is simply easier to access and manage remotely.
Edge Ports
An RSTP edge port is a switch port that is never intended to be connected to
another switch. It immediately transitions to the forwarding state when
enabled.
Note: Configuring an edge port to be attached to another switch is not
recommended. This can have negative implications for RSTP because a
temporary loop may result, possibly delaying the convergence of RSTP.
Method 1
#Spanning-tree VLAN 1 root primary {To ensure that the switch has the
lowest bridge priority so that it manually becomes the root bridge}
The priority for the switch is set to the predefined value of 24,576 or to
the highest multiple of 4,096, less than the lowest bridge priority
detected on the network.
#spanning-tree vlan 1 root secondary {This ensures that the alternate switch
becomes the root bridge if the primary root bridge fails. This command sets
the priority for the switch to the predefined value of 28,672}
This assumes that the rest of the switches in the network have the
default 32,768 priority value defined.
Method 2
#spanning-tree vlan vlan-id priority 24 576 {priority lower than other bridge
on the network}
gives more granular control over the bridge priority value. The priority
value is configured in increments of 4,096 between 0 and 61,440.
#spanning-tree vlan 1 root secondary {entered on another switch}
#show spanning-tree {verify the bridge priority of a switch or even the
configurations}
Note that the above backup root bridge only for one vlan it is not for
load balancing
Rapid PVST+
Note: The default spanning tree configuration on a Catalyst 2960 Series
switch is PVST+. A Catalyst 2960 switch supports PVST+, Rapid PVST+,
and MST, but only one version can be active for all VLANs at any time.
# spanning-tree mode rapid-pvst {enabling Rapid PVST+ global command}
# show spanning-tree vlan 10 {shows the spanning tree configuration for
VLAN 10}
In most cases, the only difference between configuring PVST+ and
Rapid PVST+ is the spanning-tree mode rapid-pvst command.
Link Aggregation
Link aggregation is the ability to create one logical link using multiple physical
links between two devices. This allows load sharing among the physical links,
rather than having STP block one or more of the links. EtherChannel is a form
of link aggregation used in switched networks.
An EtherChannel can be manually configured or can be negotiated by using the
Cisco-proprietary protocol Port Aggregation Protocol (PAgP) or Link
Aggregation Control Protocol (LACP).
When an EtherChannel is configured, the resulting virtual interface is
called a port channel. The physical interfaces are bundled together into a
port channel interface.
Note: Because of the traffic aggregation, links with higher bandwidth must be
available between the access and distribution switches.
It may be possible to use faster links, such as 10 Gb/s, on the aggregated link
between the access and distribution layer switches.
as the speed increases on the access links, even the fastest possible port
on the aggregated link is no longer fast enough to aggregate the traffic
coming from all access links meaning that even faster links may need
EtherChannel Technology.
Advantages of EtherChannel
Most configuration tasks can be done on the EtherChannel interface
instead of on each individual port, ensuring configuration consistency
throughout the links.
EtherChannel relies on existing switch ports. There is no need to
upgrade the link to a faster and more expensive connection to have
more bandwidth.
Load balancing takes place between links that are part of the same
EtherChannel. Depending on the hardware platform, one or more load-
balancing methods can be implemented. These methods include source
MAC to destination MAC load balancing, or source IP to destination IP
load balancing, across the physical links.
EtherChannel creates an aggregation that is seen as one logical link.
When several EtherChannel bundles exist between two switches, STP
may block one of the bundles to prevent switching loops. When STP
blocks one of the redundant links, it blocks the entire EtherChannel. This
blocks all the ports belonging to that EtherChannel link. Where there is
only one EtherChannel link, all physical links in the EtherChannel are
active because STP sees only one (logical) link.
EtherChannel provides redundancy because the overall link is seen as
one logical connection. Additionally, the loss of one physical link within
the channel does not create a change in the topology; therefore a
spanning tree recalculation is not required. Assuming at least one
physical link is present; the EtherChannel remains functional, even if its
overall throughput decreases because of a lost link within the
EtherChannel.
Implementation Restrictions
Note: Interface types cannot be mixed; for example, Fast Ethernet and Gigabit
Ethernet cannot be mixed within a single EtherChannel.
The EtherChannel provides full-duplex bandwidth up to 800 Mb/s (Fast
EtherChannel) or 8 Gb/s (Gigabit EtherChannel) between one switch and
another switch or host. Currently each EtherChannel can consist of up to
eight compatibly-configured Ethernet ports. The Cisco IOS switch can
currently support six EtherChannels.
An EtherChannel link can be created between two switches or an
EtherChannel link can be created between an EtherChannel-enabled
server and a switch
The individual EtherChannel group member port configuration must be
consistent on both devices. If the physical ports of one side are
configured as trunks, the physical ports of the other side must also be
configured as trunks within the same native VLAN.
A configuration applied to the port channel interface affects all physical
interfaces that are assigned to that interface.
A Layer 3 EtherChannel has a single IP address associated with the
logical aggregation of switch ports in the EtherChannel.
PAgP
PAgP is Cisco-proprietary protocol that aids in the automatic creation of
EtherChannel links. When an EtherChannel link is configured using PAgP, PAgP
packets are sent between EtherChannel-capable ports to negotiate the forming
of a channel. When PAgP identifies matched Ethernet links, it groups the links
into an EtherChannel. The EtherChannel is then added to the spanning tree as
a single port.
PAgP packets are sent every 30
Note: In EtherChannel, it is mandatory that all ports have the same speed,
duplex setting, and VLAN information. Any port modification after the creation
of the channel also changes all other channel ports.
PAgP helps create the EtherChannel link by detecting the configuration of
each side and ensuring that links are compatible so that the EtherChannel
link can be enabled when needed.
Modes for PAgP
LACP
LACP allows several physical ports to be bundled to form a single logical
channel. LACP allows a switch to negotiate an automatic bundle by sending
LACP packets to the peer. It performs a function similar to PAgP but it can be
used to facilitate EtherChannels in multivendor environments. On Cisco
devices, both protocols are supported.
LACP provides the same negotiation benefits as PAgP. LACP helps create the
EtherChannel link by detecting the configuration of each side and making sure
that they are compatible so that the EtherChannel link can be enabled when
needed.
Configuration Guidelines
EtherChannel support - All Ethernet interfaces on all modules must
support EtherChannel with no requirement that interfaces be physically
contiguous, or on the same module.
Speed and duplex - Configure all interfaces in an EtherChannel to
operate at the same speed and in the same duplex mode.
VLAN match - All interfaces in the EtherChannel bundle must be
assigned to the same VLAN, or be configured as a trunk (also shown in
the figure).
Range of VLANs - An EtherChannel supports the same allowed range of
VLANs on all the interfaces in a trunking EtherChannel. If the allowed
range of VLANs is not the same, the interfaces do not form an
EtherChannel, even when set to auto or desirable mode.
LACP
#interface range fastethernet 0/1-2 {Specify the interfaces that compose
the EtherChannel group}
#channel-group 1 active {Create the port channel interface, The 1 specifies
a channel group number and can vary. The mode active keywords identify
this as an LACP EtherChannel configuration}
#interface port-channel 1 {To change Layer 2 settings on the port channel
interface, enter port channel interface similar to int fa0/x}
-switchport mode trunk {the EtherChannel is configured as a trunk
interface}
-switchport trunk allowed vlan 1,2,30 {allowed VLANs specified}
PAgP
#interface range fastethernet 0/1-2 {Specify the interfaces that compose
the EtherChannel group}
#channel-group 1 desirable {Create the port channel interface, The 1
specifies a channel group number and can vary. The mode desirable
keywords identify this as an PAgP EtherChannel configuration}
#interface port-channel 1 {To change Layer 2 settings on the port channel
interface, enter port channel interface similar to int fa0/x}
-switchport mode trunk {the EtherChannel is configured as a trunk
interface}
-switchport trunk allowed vlan 1,2,30 {allowed VLANs specified}
Verifying EtherChannel
#show interfaces port-channel 1 {displays the general status of the port
channel interface}
#show etherchannel summary {When several port channel interfaces
are configured on the same device, display one line of information per
port channel}
#show etherchannel port-channel {display information about a specific
port channel interface}
#show interfaces f0/1 etherchannel {On any physical interface member
of an EtherChannel bundle,provide information about the role of the
interface in the EtherChannel}
Troubleshooting EtherChannel
Note: It is easy to confuse PAgP or LACP with DTP, because they both
are protocols used to automate behavior on trunk links. PAgP and LACP are
used for link aggregation (EtherChannel). DTP is used for automating the
creation of trunk links. When an EtherChannel trunk is configured, typically
EtherChannel (PAgP or LACP) is configured first and then DTP.
NOTE: If the EtherChannel Port is down because the configuration of the Port
Channel between two switches involved in incompatible modes. The
EtherChannel is changed to desirable or active depending on the current
mode so that both ends will be compatible using the procedure below.
Router Redundancy
One way to prevent a single point of failure at the default gateway, is to
implement a virtual router. To implement this type of router
redundancy, multiple routers are configured to work together to present
the illusion of a single router to the hosts on the LAN.
By sharing an IP address and a MAC address, two or more routers can
act as a single virtual router.
The IPv4 address of the virtual router is configured as the default
gateway for the workstations on a specific IPv4 segment.
The ARP resolution returns the MAC address of the virtual router.
Frames that are sent to the MAC address of the virtual router can then
be physically processed by the currently active router within the virtual
router group.
A redundancy protocol provides the mechanism for determining which
router should take the active role in forwarding traffic. It also
determines when the forwarding role must be taken over by a standby
router. The transition from one forwarding router to another is
transparent to the end devices.
Steps for Router Failover
When the active router fails, the redundancy protocol transitions the standby
router to the new active router role. These are the steps that take place when
the active router fails:
1. The standby router stops seeing Hello messages from the forwarding
router.
2. The standby router assumes the role of the forwarding router.
3. Because the new forwarding router assumes both the IPv4 and MAC
addresses of the virtual router, the host devices see no disruption in
service. Steps for Router Failover
HSRP Versions
The default HSRP version for Cisco IOS 15 is version 1. HSRP version 2 provides
the following enhancements:
HSRPv2 expands the number of supported groups. HSRP version 1
supports group numbers from 0 to 255. HSRP version 2 supports group
numbers from 0 to 4095.
HSRPv1 uses the multicast address of 224.0.0.2. HSRP version 2 uses the
IPv4 multicast address 224.0.0.102 or the IPv6 multicast address
FF02::66 to send hello packets.
HSRPv1 uses the virtual MAC address range 0000.0C07.AC00 to
0000.0C07.ACFF
HSRPv2 uses the MAC address range from 0000.0C9F.F000 to
0000.0C9F.FFFF for IPv4 and 0005.73A0.0000 through 0005.73A0.0FFF
for IPv6 addresses.
Note: Group numbers are used for more advanced HSRP configurations that
are beyond the scope of this course. For our purposes, we will use group
number 1.
HSRP Priority and Pre-emption
HSRP Priority
HSRP priority can be used to determine the active router. The router with the
highest HSRP priority will be elected as active router. By default, the HSRP
priority is 100. If the priorities are equal, the router with the numerically
highest IPv4 address is elected as the active router.
HSRP Pre-emption
By default, after a router becomes the active route, it will remain the
active router even if another router comes online with a higher HSRP
priority.
To force a new HSRP election process, pre-emption must be enabled.
Preemption is the ability of an HSRP router to trigger the re-election
process. With preemption enabled, a router that comes online with a
higher HSRP priority will assume the role of the active router.
Preemption only allows a router to become the active router if it has a
higher priority. A router enabled for preemption, with equal priority but
a higher IPv4 address will not preempt an active router.
Due to a power failure affecting only R1, the active router is no longer available
and the standby router R2 assumes the role of the active router. After power is
restored, R1 comes back online. Because R1 has a higher priority and
preemption is enabled, it will force a new election process. R1 will re-assume
the role of the active router and R2 will fall back to the role of the standby
router.
Note: With preemption disabled, the router that boots up first will become the
active router if there are no other routers online during the election process.
HSRP Timers
The active and standby HSRP routers send hello packets to the HSRP group
multicast address every 3 seconds, by default. The standby router will become
active if it does not receive a hello message from the active router after 10
seconds. However, to avoid increased CPU usage and unnecessary standby
state changes, do not set the hello timer below 1 second or the hold timer
below 4 seconds.
HSRP Configuration Commands
R1#interface g0/1
R1#ip address 172.16.10.2 255.255.255.0
R1#standby version 2 {configures HSRP to use version 2. HSRP is version 1 by
default}
R1#standby 1 ip 172.16.10.1 {configure virtual ip address that will be used by a
specific group}
R1#standby priority 150 {Configure the priority for the desired active router to
be greater default priority of 100, range 0-255 so that it becomes the active
router range}
R1#standby 1 preempt {Configure the active router to preempt the standby
router in cases where the active router comes online after the standby router}
R1#no shutdown
R2#interface g0/1
R2#ip address 172.16.10.3 255.255.255.0
R2#standby version 2
R2#standby 1 ip 172.16.10.1 {configure virtual ip address that will be used by a
specific group}
R2#no shutdown
HSRP Verification
#show standby {verify that HSRP is configured correctly}
#show standby brief {verify that HSRP is configured correctly. P indicate pre-
empt is configured}
HSRP Failure
To troubleshoot HSRP, you need to understand the basic operation. Most
issues will arise during one of the following HSRP functions:
Failing to successfully elect the active router that controls the virtual IP
for the group.
Failure of the standby router to successfully keep track of the active
router.
Failing to determine when control of the virtual IP for the group should
be handed over to another router.
Failure of end devices to successfully configure the virtual IP address as
the default gateway.