Beruflich Dokumente
Kultur Dokumente
gi0/0
10.0.0.1/24
Edmonton Router
router>enable Moves to privileged mode
router#configure terminal Moves to global configuration mode
router(config)#hostname Edmonton Sets the hostname
Edmonton(config)#interface Moves to interface configuration mode
gigabitethernet 0/0
Edmonton(config-if)#description LAN Sets the local description of the
Interface interface
Edmonton(config-if)#ip address Assigns an IP address and netmask
10.0.0.1 255.0.0.0
Edmonton(config-if)#no shutdown Enables the interface
Edmonton(config-if)#interface serial Moves to interface configuration mode
0/0/0
Edmonton(config-if)#description Link Sets the local description of the
to Gibbons Router interface
Edmonton(config-if)#ip address Assigns an IP address and netmask
192.168.1.2 255.255.255.252
Edmonton(config-if)#clock rate 56000 Assigns the clock rate to the DCE
cable on this side of link
Edmonton(config-if)#no shutdown Enables the interface
Edmonton(config-if)#exit Returns to global configuration mode
Edmonton(config)#router eigrp 10 Enables the EIGRP routing process for
autonomous system 10
Edmonton(config-router)#network Advertises the 10.0.0.0 network
10.0.0.0
Edmonton(config-router)#network Advertises the 192.168.1.0 network
192.168.1.0
Edmonton(config-router)#exit Returns to global configuration mode
Configuration Example: DHCP 197
Gibbons Router
router>enable Moves to privileged mode.
router#configure terminal Moves to global configuration mode.
router(config)#hostname Gibbons Sets the hostname.
Gibbons(config)#interface giga- Moves to interface configuration mode.
bitethernet 0/0
Gibbons(config-if)#description Sets the local description of the interface.
LAN Interface
Gibbons(config-if)#ip address Assigns an IP address and netmask.
192.168.3.1 255.255.255.0
Gibbons(config-if)#ip DHCP broadcasts will be forwarded as
helper-address 192.168.1.2 a unicast to this address rather than be
dropped.
Gibbons(config-if)#no shutdown Enables the interface.
Gibbons(config-if)#interface Moves to interface configuration mode.
serial 0/0/1
Gibbons(config-if)#description Sets the local description of the interface.
Link to Edmonton Router
Gibbons(config-if)#ip address Assigns an IP address and netmask.
192.168.1.1 255.255.255.252
Gibbons(config-if)#no shutdown Enables the interface.
Gibbons(config-if)#exit Returns to global configuration mode.
Gibbons(config)#router eigrp 10 Enables the EIGRP routing process for
autonomous system 10.
Gibbons(config-router)#network Advertises the 192.168.3.0 network.
192.168.3.0
Gibbons(config-router)#network Advertises the 192.168.1.0 network.
192.168.1.0
Gibbons(config-router)#exit Returns to global configuration mode.
Gibbons(config)#exit Returns to privileged mode.
Gibbons#copy running-config Saves the configuration to NVRAM.
startup-config
CHAPTER 21
First Hop Redundancy Protocols
(FHRP): Hot Standby Router
Protocol (HSRP)
This chapter provides information and commands concerning the following topics:
■ First Hop Redundancy
■ Hot Standby Router Protocol
■ Configuring HSRP on a router
■ Default HSRP configuration settings
■ Verifying HSRP
■ HSRP optimization options
■ Preempt
■ HSRP Message Timers
■ Interface tracking
■ Debugging HSRP
■ Configuration example: HSRP
HSRP
HSRP provides network redundancy for IP networks, ensuring that user traffic immedi-
ately and transparently recovers from first-hop failures in network edge devices or access
circuits.
200 Configuring HSRP on a Router
Verifying HSRP
Router#show running-config Displays what is currently running on the router.
Router#show standby Displays HSRP information.
Router#show standby brief Displays a single-line output summary of each
standby group.
Switch#show standby vlan 1 Displays HSRP information on the VLAN 1 group.
NOTE HSRP can be run on an L3 switch; there-
fore, it is possible to have HSRP run inside different
VLANs.
Preempt
Router(config)#interface Moves to interface configuration mode.
gigabitethernet 0/0
Router(config- This router preempts, or takes control of, the active rout-
if)#standby 1 preempt er if the local priority is higher than the active router.
Router(config- Causes the local router to postpone taking over as the
if)#standby 1 preempt active router for 180 seconds once the router priority is
delay minimum 180 identified as greater than the current HSRP active device.
Router(config- Allows for preemption to occur only after a router
if)#standby 1 preempt reloads. x is the number of seconds between 0 and
delay reload x 3600 for the reload delay.
Router(config-if)#no Disables the preemption delay, but preemption itself
standby 1 preempt delay is still enabled. Use the no standby x preempt com-
reload mand to eliminate preemption.
NOTE If the preempt argument is not configured, the
local router assumes control as the active router only if
the local router receives information indicating that no
router is currently in the active state.
Interface Tracking
Router(config)#interface Moves to interface configuration mode.
gigabitethernet 0/0
Router(config-if)#standby HSRP tracks the availability of interface serial 0/0/0.
1 track serial 0/0/0 25 If serial 0/0/0 goes down, the priority of the router in
group 1 is decremented by 25.
NOTE The default value of the track argument is 10.
TIP The track argument does not assign a new pri-
ority if the tracked interface goes down. The track
argument assigns a value that the priority decreases if
the tracked interface goes down. Therefore, if you are
tracking serial 0/0/0 with a track value of 25 (standby 1
track serial 0/0/0 25) and serial 0/0/0 goes down, the
priority is decreased by 25; assuming a default priority
of 100, the new priority becomes 75.
Debugging HSRP
Router#debug standby Displays all HSRP debugging information,
including state changes and transmission/
reception of HSRP packets
Router#debug standby errors Displays HSRP error messages
Router#debug standby events Displays HSRP event messages
Router#debug standby events Displays all HSRP events except for hellos and
terse advertisements
Router#debug standby events Displays all HSRP tracking events
track
Router#debug standby packets Displays HSRP packet messages
Router#debug standby terse Displays all HSRP errors, events, and packets,
except for hellos and advertisements
Active Router
Priority 105
Preempt is on. Fa0/0 is tracking
fa 0/0 serial 0/0/0.
WS1
172.16.16.5/24 S0/0/0
R1 198.133.219.1/30
Virtual IP
172.16.16.1/24 172.16.16.254/24 S0/0/0 DCE S1
198.133.219.2/30
WS2
R3
Fa0/0 is tracking
S0/0/1 DCE
172.16.16.2/24 serial 0/0/1.
Virtual IP 198.133.219.6/30
S2
172.16.16.254/24 S0/0/1
fa 0/0 R2 198.133.219.5/30
WS3
172.16.16.6/24
Standby Router
172.16.16.3/24 Priority 100
Preempt is on.
Router 1
Router>enable Moves to privileged mode.
Router#configure terminal Moves to global configuration mode.
Router(config)#hostname R1 Sets router name to R1.
R1(config)#interface Moves to interface configuration mode.
fastethernet 0/0
R1(config-if)#ip address Assigns IP address and netmask.
172.16.16.5 255.255.255.0
R1(config-if)#standby 1 ip Activates HSRP group 1 on the interface and
172.16.16.254 creates a virtual IP address of 172.16.6.254.
R1(config-if)#standby 1 Assigns a priority value of 105 to standby
priority 105 group 1.
R1(config-if)#standby 1 This router preempts, or takes control of, the
preempt active router if the local priority is higher than
the active router.
R1(config-if)#standby 1 HSRP tracks the availability of interface serial
track serial 0/0/0 0/0/0. If serial 0/0/0 goes down, the router pri-
ority is decremented by the default 10.
R1(config-if)#no shutdown Enables the interface.
R1(config-if)#interface Moves to interface configuration mode.
serial 0/0/0
R1(config-if)#ip address Assigns IP address and netmask.
198.133.219.1 255.255.255.252
R1(config-if)#no shutdown Enables the interface.
R1(config-if)#exit Returns to global configuration mode.
R1(config)#exit Returns to privileged mode.
R1#copy running-config Saves configuration to NVRAM.
startup-config
204 Configuration Example: HSRP
Router 2
Router>enable Moves to privileged mode.
Router#configure terminal Moves to global configuration mode.
Router(config)#hostname R2 Sets router name to R2.
R2(config)#interface Moves to interface configuration mode.
fastethernet 0/0
R2(config-if)#ip address Assigns IP address and netmask.
172.16.16.6 255.255.255.0
This chapter provides information and commands concerning the following topics:
■ Private IP addresses: RFC 1918
■ Configuring dynamic Network Address Translation: One private to one public
address translation
■ Configuring PAT: Many private to one public address translation
■ Configuring static NAT: One private to one permanent public address translation
■ Verifying NAT and PAT configurations
■ Troubleshooting NAT and PAT configurations
■ Configuration example: PAT
Private Addresses
Class RFC 1918 Internal Address Range CIDR Prefix
A 10.0.0.0–10.255.255.255 10.0.0.0/8
B 172.16.0.0–172.31.255.255 172.16.0.0/12
C 192.168.0.0–192.168.255.255 192.168.0.0/16
NOTE You can have an IP NAT pool of more than one address, if needed. The syntax
for this is as follows:
Corp(config)#ip nat pool scott 64.64.64.70 64.64.64.75 netmask
255.255.255.128
You would then have a pool of six addresses (and all their ports) available for translation.
CAUTION Make sure that you have in your router configurations a way for packets
to travel back to your NAT router. Include a static route on the ISP router defining a
path to your NAT addresses/networks and how to travel back to your internal network.
Without this in place, a packet can leave your network with a public address, but it
cannot return if your ISP router does not know where the public addresses exist in the
network. You should be advertising the public addresses, not your private addresses.
NOTE The default timeout for a translation entry in a NAT table is 24 hours.