免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1447 | 回复: 0
打印 上一主题 下一主题

cisco路由器热备份 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-01 10:32 |只看该作者 |倒序浏览

cisco路由器热备份
1、  指定虚拟路由器地址
   Router(config-if)#standby [group-number] ip [ip-address]
2、  设定路由器的优先级
   Router(config-if)# standby [group-number] priority priority-number
3、  设定Standy模式的路由器可以抢夺Active模式
   Router(config-if)# standby [group-number] preempt
[A1]

4、  配置端口跟踪
Router(config-if)#standby[group-number]track interface-type interface-number [priority-number]
5、设置hsrp切换时间
   standby 组号时间参数1 时间参数2
[A2]



热备份实例
HSRP适应于主路由器与备份路由器的线路完全一致的情况。
使用HSRP功能,建议采用收敛速度较快的动态路由协议,如OSPF,EIGRP。
HSRP基本配置步骤:
在端口配置下,设置端口 IP 地址,
ip address端口 IP 地址 子网掩码
在端口配置下,启用 HSRP 功能,并设置虚拟 IP 地址
standby 组号 IP 虚拟 IP 地址
其中只有有相同组号的路由器属于同一个hsrp组,所有属于同一个hsrp组的路由器的虚拟地址必须一致
在端口设置状态下设置HSRP抢占
standby 组号 preempt
该设置允许权值高于该hsrp组的其它路由器成为主路由器。所有该给路由器都应该设置此项,以便每台路由器都可以成为其它路由器的备份路由器。如果不设置该项,即使用该路由器权值再高,也不会成为主路由器。
设置路由器的hsrp权值
standby 组号 priority 权值
如果不设置该项,缺省权值为100,其中权值数字大,则抢占为主路由器的优先权越高。
设置hsrp组路由器身份验证字符串
standby 组号 authentication 字符串
该项设置为可选设置,如果设置该项,则该hsrp组的所有路由器都必须进行该项设置,且只有有相同字符串的该组路由器才能进行hsrp。
设置hsrp切换时间
standby 组号时间参数1 时间参数2
其中时间参数1表示路由器每间隔多长时间交换一次hello信息,以表明路由器是否出现故障或工作正常。时间参数2表示在多长时间内同组的其他路由器没有收到主路由器的信息,则宣布主路由器瘫痪。该设置的缺省值分别为3秒和10秒。如果要更改缺省值,所有同hsrp组的路由器的该项设置必须一致。
端口跟踪设置
standby 组号 track 端口号
该项设置为可选设置
该设置表示如果所监测的端口出现故障,则也进行路由器的切换。可以跟踪多外端口。 
注意:如果主路由器上有多条线路被跟踪,则有一条线路出现故障时,就会切换到备份路由器上,即使其他都正常工作,直到主路由器该线路正常工作,才能重新发换过来。该项设置实现的功能在实际应用中完全可以由线路备份功能实现,而且在大多数情况下,该项设置也没有多大意义。
另外,hsrp还有很多其它设置及应用,如感兴请在Cisco站点或Cisco Document上查找,或与晓通技术支持中心联系。
  实例:
2511-1与2511-2互为路由器备份 
2511-1的配置
2511-1#sho run
Building configuration… 
Current configuratoin:
!
version 11.3
no service passWord –encryption
!
hostname 251l-l
!
enable password cisco
!
username 2505 password 0 cisco
no ip domain-lookup
!
interface Ethernet0
ip address 192.4.1.99 255.255.255.0
no ip redirects
standby 1 timers 5 15
standby 1 priority 110
standby 1 preempt
standby 1 authentication cisco
standby 1 ip 192.4.1.1
standby 1 track Serial0
standby 1 track Seriall
!
interface serial0
ip address l92.3.1.1 255.255.255.0
encapsulation frame-relay IETF
ip ospf message-digest-key 1 md5 kim
no ip mroute-cache
bandwidth 2000
frame-relay map ip 192.3.1.2 100 broadcast
frame-relay lmi-type cisco
!
interface Serial1
ip address 192.7.l.l 255.255.2550
encapesulation ppp
ip ospf message-digest-key 1 md5 kim
ip ospf network non-broadcast
bandwidth 64
ppp authentication chap
!
router ospf 1
passive-interface Ethernet0
network 192.3.1.0 0.0.0.255 area 0
network 192.4.l.0 0.0.0.255 area 0network 192.7.l.0 0.0.0.255 area 0neighbor 192.7.1.2 priority 1neighbor 192.3.1.2 priority 1area 0 authentication message-digest!no ip classless!line con 0line 1 8line aux 0line vty 0 4 password cisco
login
!
end
 
2511-2的配置
2511-2#sho run
Building configuration...
Current configuration:
!
version 11.3
no servicc password-encryption
!
hostname 2511-2
enable secret 5 $1$7o5F$MSyFWzVf6JBgnjLJghHSB.
!
!
interface Ethernet0
ip address 192.4.1.lOO 255.255.255.0
no ip redirects
standby 1 timers 5 15
standby 1 priority 100
staidby 1 preempt
standby 1 authentication cisco
sandby 1 ip 192.4.1.1
!interface Serial0ip address 192.8.1.2 255.255.255.0encapsulation x25ip ospf missage-digest-key 2 md5 cisco
no ip mroute-cache
x25 address 5678
x25 htc 16
x25 nvc 4
x25 map ip 192.8.l.1 1234 broadcast
!
interface Serial1
no ip address
no ip mroute-cachc
bandwidth 2000
clockrate 2000000
!
router ospt 1
passive-interface Ethernet0
network 192.8.1.0 0.0.0.255 area 0
network 192.4.1.0 0.0.0.255 area 0
neighbor 192.8.1.1 priority 1
area 0 authentication message-digest
!
ip classless
!
line con 0
line 1 8
line aux 0
line vty 0 4
login
!
end
 
2514的配置
2514# sho run
Building configuration...
!Current configuration:!version 11.2no service udp-small-serversno service tcp-small-servers!hostname 2514!enable secret 5 $1$uoHU$Vks/1YCRi33z4TXs4qekI0!
frame-relay switching
!interface Ethernet0
no ip address
!
interface Ethernet1
no ip address
shutdown
!
interfacc Serial0ip address 192.3.1.2 255.255.255.0encapsulation frame-relay IETF
ip ospf message-digest-key 1 md5 kimbandwidth 2000clockrate 2000000
frame-relay map ip 192.3.1.1 100 broadcast
frame-relay intf-type dce
!interface Serial1
ip address 192.8.1.1 255.255.255.0
no ip mroute-cache
enthpsulation x25 dce
ip ospf message-digest-key 2 md5 cisco
bandwidth 64
x25 address 1234
x25 htc 16
x25 nvc 4
x25 map ip 192.8.1.2 5678 broadcast
clockrate 64000
!
router ospf 1passive-interface Ethernet0network 192.3.1.0 0.0.0.255 area 0network 192.8.1.O 0.0.0.255 area 0neighbor 192.8.l.2 priority 1neighbor 192.3.1.1 priority 1area 0 authentication message-digest
!
no ip classless
!
line con 0line aux 0line vty 0 4login!end
2505的配置building configuraiion...Current configuration:!version 11.2no service udp-small-serversno service tcp-small-servers!hostname 2505!enable secret 5 $1$b43o$CpEYSTc2EPwnRlQGDvIm//
!
username 2511-1 password 7 1511021F0725
!
hub ether 0 1link-testauto-polarity
!hub ether O 2link-testauto-polarity!hub ether 0 3link-testauto-polarity!hub ether 0 4link-testauto-polarity!hub ether 0 5
link-test
auto-polarity
!
hub ether 0 6
link-test
auto-polarity
!
hub ether 0 7
link-test
auto-polarity
!
hub ether 0 8
link-test
auto-polarity
!
interface Ethernet0
ip address 192.1.4.1 255.255.255.0
!
interfacc Serial0
ip address 192.l.2.1 255.255.255.0
ip ospf message-digest-key 1 md5 cisco
ip ospf network non-broadcast
bandwidth 2000
clockrate 2000000
!interface Serial1ip address 192.7.1.2 255.255.255.0encapsulation pppip ospf message-digdest-key 1 md5 kimip ospf network non-broadcast
bandwidth 64
clockrate 64000
ppp authentication chap
!
router ospf 1
passive-interface Ethernet0
network 192.l.2.0 0.0.0.255 area 2
network 192.l.4.O 0.0.0.255 area 2
network 192.7.1.0 0.0.0.255 area 0
neighbor 192.7.l.1 priority 1
neighbor 192.1.2.2 priority 1
area 0 authentication message-digest
area 2 authentication message-digest
area 2 range 192.1.0.0 255.255.0.0
!
no ip classless
ip ospf name-lookup
!
line con 0
line aux 0
Iine vty 0 4
login
!
end

[A1]
该设置允许权值高于该hsrp组的其它路由器成为主路由器

[A2]
其中时间参数1表示路由器每间隔多长时间交换一次hello信息,以表明路由器是否出现故障或工作正常。时间参数2表示在多长时间内同组的其他路由器没有收到主路由器的信息,则宣布主路由器瘫痪。该设置的缺省值分别为3秒和10秒。如果要更改缺省值,所有同hsrp组的路由器的该项设置必须一致。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/60772/showart_474475.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP