免费注册 查看新帖 |

Chinaunix

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

CISCO3825路由器配置HSRP实现双机备份的问题【新问题出现】 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-18 15:20 |只看该作者 |倒序浏览
路由器1的配置:

  1. route-1#sh conf
  2. Using 2665 out of 491512 bytes
  3. !
  4. version 12.4
  5. service timestamps debug datetime msec
  6. service timestamps log datetime msec
  7. no service password-encryption
  8. !
  9. hostname route-1
  10. !
  11. boot-start-marker
  12. boot-end-marker
  13. !
  14. logging buffered 51200 warnings
  15. !
  16. no aaa new-model
  17. !
  18. resource policy
  19. !
  20. ip subnet-zero
  21. ip cef
  22. !
  23. !
  24. !
  25. !         
  26. no ip domain lookup
  27. ip domain name yourdomain.com
  28. !
  29. username root privilege 15 secret 5 $1$C0LF$TxwntcRjthV5aAkeOAnq/.
  30. !
  31. !
  32. !
  33. !
  34. !
  35. interface GigabitEthernet0/0
  36. description $ETH-LAN$$ETH-SW-LAUNCH$$INTF-INFO-GE 0/0$
  37. ip address 192.168.108.101 255.255.255.0
  38. no ip redirects
  39. duplex auto
  40. speed auto
  41. media-type rj45
  42. negotiation auto
  43. standby 1 ip 192.168.108.103
  44. standby 1 timers 5 15
  45. standby 1 priority 110
  46. standby 1 preempt delay minimum 60
  47. standby 1 track GigabitEthernet0/0
  48. !         
  49. interface GigabitEthernet0/1
  50. no ip address
  51. shutdown
  52. duplex auto
  53. speed auto
  54. media-type rj45
  55. negotiation auto
  56. !
  57. interface FastEthernet0/0/0
  58. switchport access vlan 100
  59. !
  60. interface FastEthernet0/0/1
  61. !
  62. interface FastEthernet0/0/2
  63. !
  64. interface FastEthernet0/0/3
  65. !
  66. interface FastEthernet0/1/0
  67. !
  68. interface FastEthernet0/1/1
  69. !
  70. interface FastEthernet0/1/2
  71. !         
  72. interface FastEthernet0/1/3
  73. !
  74. interface Vlan1
  75. no ip address
  76. !
  77. interface Vlan100
  78. ip address 192.168.106.1 255.255.255.0
  79. standby 2 ip 192.168.106.3
  80. standby 2 timers 5 15
  81. standby 2 priority 110
  82. standby 2 preempt
  83. standby 2 track FastEthernet0/0/0
  84. !
  85. ip classless
  86. !
  87. ip http server
  88. ip http access-class 23
  89. ip http authentication local
  90. ip http timeout-policy idle 60 life 86400 requests 10000
  91. !
  92. access-list 23 permit 10.10.10.0 0.0.0.7
  93. !
  94. control-plane
  95. !
  96. banner login ^C
  97. -----------------------------------------------------------------------
  98. Cisco Router and Security Device Manager (SDM) is installed on this device.
  99. This feature requires the one-time use of the username "cisco"
  100. with the password "cisco". The default username and password have a privilege level of 15.

  101. Please change these publicly known initial credentials using SDM or the IOS CLI.
  102. Here are the Cisco IOS commands.

  103. username <myuser>  privilege 15 secret 0 <mypassword>
  104. no username cisco

  105. Replace <myuser> and <mypassword> with the username and password you want to use.

  106. For more information about SDM please follow the instructions in the QUICK START
  107. GUIDE for your router or go to [url]http://www.cisco.com/go/sdm[/url]
  108. -----------------------------------------------------------------------
  109. ^C        
  110. !
  111. line con 0
  112. login local
  113. stopbits 1
  114. line aux 0
  115. stopbits 1
  116. line vty 0 4
  117. access-class 23 in
  118. privilege level 15
  119. login local
  120. transport input telnet
  121. line vty 5 15
  122. access-class 23 in
  123. privilege level 15
  124. login local
  125. transport input telnet
  126. !
  127. scheduler allocate 20000 1000
  128. !
  129. end
复制代码




路由器2的配置:

  1. route-1#sh conf
  2. Using 2665 out of 491512 bytes
  3. !
  4. version 12.4
  5. service timestamps debug datetime msec
  6. service timestamps log datetime msec
  7. no service password-encryption
  8. !
  9. hostname route-1
  10. !
  11. boot-start-marker
  12. boot-end-marker
  13. !
  14. logging buffered 51200 warnings
  15. !
  16. no aaa new-model
  17. !
  18. resource policy
  19. !
  20. ip subnet-zero
  21. ip cef
  22. !
  23. !
  24. !
  25. !         
  26. no ip domain lookup
  27. ip domain name yourdomain.com
  28. !
  29. username root privilege 15 secret 5 $1$C0LF$TxwntcRjthV5aAkeOAnq/.
  30. !
  31. !
  32. !
  33. !
  34. !
  35. interface GigabitEthernet0/0
  36. description $ETH-LAN$$ETH-SW-LAUNCH$$INTF-INFO-GE 0/0$
  37. ip address 192.168.108.102 255.255.255.0
  38. no ip redirects
  39. duplex auto
  40. speed auto
  41. media-type rj45
  42. negotiation auto
  43. standby 1 ip 192.168.108.103
  44. standby 1 timers 5 15
  45. standby 1 priority 110
  46. standby 1 preempt delay minimum 60
  47. standby 1 track GigabitEthernet0/0
  48. !         
  49. interface GigabitEthernet0/1
  50. no ip address
  51. shutdown
  52. duplex auto
  53. speed auto
  54. media-type rj45
  55. negotiation auto
  56. !
  57. interface FastEthernet0/0/0
  58. switchport access vlan 100
  59. !
  60. interface FastEthernet0/0/1
  61. !
  62. interface FastEthernet0/0/2
  63. !
  64. interface FastEthernet0/0/3
  65. !
  66. interface FastEthernet0/1/0
  67. !
  68. interface FastEthernet0/1/1
  69. !
  70. interface FastEthernet0/1/2
  71. !         
  72. interface FastEthernet0/1/3
  73. !
  74. interface Vlan1
  75. no ip address
  76. !
  77. interface Vlan100
  78. ip address 192.168.106.2 255.255.255.0
  79. standby 2 ip 192.168.106.3
  80. standby 2 timers 5 15
  81. standby 2 priority 110
  82. standby 2 preempt
  83. standby 2 track FastEthernet0/0/0
  84. !
  85. ip classless
  86. !
  87. ip http server
  88. ip http access-class 23
  89. ip http authentication local
  90. ip http timeout-policy idle 60 life 86400 requests 10000
  91. !
  92. access-list 23 permit 10.10.10.0 0.0.0.7
  93. !
  94. control-plane
  95. !
  96. banner login ^C
  97. -----------------------------------------------------------------------
  98. Cisco Router and Security Device Manager (SDM) is installed on this device.
  99. This feature requires the one-time use of the username "cisco"
  100. with the password "cisco". The default username and password have a privilege level of 15.

  101. Please change these publicly known initial credentials using SDM or the IOS CLI.
  102. Here are the Cisco IOS commands.

  103. username <myuser>  privilege 15 secret 0 <mypassword>
  104. no username cisco

  105. Replace <myuser> and <mypassword> with the username and password you want to use.

  106. For more information about SDM please follow the instructions in the QUICK START
  107. GUIDE for your router or go to [url]http://www.cisco.com/go/sdm[/url]
  108. -----------------------------------------------------------------------
  109. ^C        
  110. !
  111. line con 0
  112. login local
  113. stopbits 1
  114. line aux 0
  115. stopbits 1
  116. line vty 0 4
  117. access-class 23 in
  118. privilege level 15
  119. login local
  120. transport input telnet
  121. line vty 5 15
  122. access-class 23 in
  123. privilege level 15
  124. login local
  125. transport input telnet
  126. !
  127. scheduler allocate 20000 1000
  128. !
  129. end
复制代码




问题现象:

两端网段接测试机后,配置好路由,如果当时通路走的路由器1 ,拔下路由器1的GE0/0网线或者FE0/0/0,则网络不通,也就是说没有切换,大家看哪个地方配置的不对啊!

[ 本帖最后由 八月初三 于 2008-12-19 23:24 编辑 ]

HSRP.JPG (40.1 KB, 下载次数: 58)

HSRP.JPG

论坛徽章:
3
辰龙
日期:2013-11-20 23:03:57子鼠
日期:2014-05-26 14:46:482015年亚洲杯之伊拉克
日期:2015-01-30 14:29:38
2 [报告]
发表于 2008-12-18 15:38 |只看该作者
sh standby 看看

论坛徽章:
3
辰龙
日期:2013-11-20 23:03:57子鼠
日期:2014-05-26 14:46:482015年亚洲杯之伊拉克
日期:2015-01-30 14:29:38
3 [报告]
发表于 2008-12-18 15:45 |只看该作者
很奇怪你的两台路由器的priority 都是110,那个是主啊?

论坛徽章:
0
4 [报告]
发表于 2008-12-18 15:48 |只看该作者

回复 #2 seven007 的帖子

route-1#sh standby
GigabitEthernet0/0 - Group 1
  State is Init (interface down)
    3 state changes, last state change 00:49:33
  Virtual IP address is 192.168.108.103
  Active virtual MAC address is unknown
    Local virtual MAC address is 0000.0c07.ac01 (v1 default)
  Hello time 5 sec, hold time 15 sec
  Preemption enabled, delay min 60 secs
  Active router is unknown
  Standby router is unknown
  Priority 100 (configured 110)
    Track interface GigabitEthernet0/0 state Down decrement 10
  IP redundancy name is "hsrp-Gi0/0-1" (default)
Vlan100 - Group 2
  State is Active
    2 state changes, last state change 01:05:11
  Virtual IP address is 192.168.106.3
  Active virtual MAC address is 0000.0c07.ac02
    Local virtual MAC address is 0000.0c07.ac02 (v1 default)
  Hello time 5 sec, hold time 15 sec
    Next hello sent in 3.592 secs
  Preemption enabled
  Active router is local
  Standby router is 192.168.106.2, priority 110 (expires in 14.668 sec)
  Priority 110 (configured 110)
    Track interface FastEthernet0/0/0 state Up decrement 10
  IP redundancy name is "hsrp-Vl100-2" (default)
route-1#



route-2#sh standby
GigabitEthernet0/0 - Group 1
  State is Active
    5 state changes, last state change 00:49:51
  Virtual IP address is 192.168.108.103
  Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (v1 default)
  Hello time 5 sec, hold time 15 sec
    Next hello sent in 3.456 secs
  Preemption enabled
  Active router is local
  Standby router is unknown
  Priority 110 (configured 110)
    Track interface GigabitEthernet0/0 state Up decrement 10
  IP redundancy name is "hsrp-Gi0/0-1" (default)
Vlan100 - Group 2
  State is Standby
    4 state changes, last state change 00:55:14
  Virtual IP address is 192.168.106.3
  Active virtual MAC address is 0000.0c07.ac02
    Local virtual MAC address is 0000.0c07.ac02 (v1 default)
  Hello time 5 sec, hold time 15 sec
    Next hello sent in 0.808 secs
  Preemption enabled
  Active router is 192.168.106.1, priority 110 (expires in 11.528 sec)
  Standby router is local
  Priority 110 (configured 110)
    Track interface FastEthernet0/0/0 state Up decrement 10
  IP redundancy name is "hsrp-Vl100-2" (default)
route-2#`

论坛徽章:
0
5 [报告]
发表于 2008-12-18 15:59 |只看该作者
是否无所谓呢?这样配置的话,谁当主都可以吧,我可以改改。

论坛徽章:
3
辰龙
日期:2013-11-20 23:03:57子鼠
日期:2014-05-26 14:46:482015年亚洲杯之伊拉克
日期:2015-01-30 14:29:38
6 [报告]
发表于 2008-12-18 16:06 |只看该作者
route-1#sh standby
GigabitEthernet0/0 - Group 1
  State is Init (interface down)

看来接口down掉了,两台router能ping到对方吗?
debug standby看看有什么信息

论坛徽章:
0
7 [报告]
发表于 2008-12-18 16:11 |只看该作者
R1:
GigabitEthernet0/0 - Group 1
  State is Init (interface down)
Vlan100 - Group 2
  State is Active

R2:
GigabitEthernet0/0 - Group 1
  State is Active
Vlan100 - Group 2
  State is Standby


主干的切换了,vlan 100的没切换,是不是和这个有关?也就是说要gi0/0与fa0/0/0要都down了才会有效吧?

论坛徽章:
0
8 [报告]
发表于 2008-12-18 16:12 |只看该作者
GigabitEthernet0/0 的网线拔掉了,这种配两个standby 组号没有问题吧,我现在去debug一下,谢谢你先

论坛徽章:
0
9 [报告]
发表于 2008-12-18 16:14 |只看该作者
是啊,确实是这样,必须内外网线都断掉才能切换!!


可是我已经standby 1 track GigabitEthernet0/0,监视GE0/0了,Ge0/0断了,路由器没有切换,奇怪

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
10 [报告]
发表于 2008-12-18 16:16 |只看该作者
你需要配置接口追踪或者RTR组。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP