设为首页收藏本站language 语言切换
查看: 3761|回复: 15
收起左侧

[求助] web-iou模拟hsrp的问题

[复制链接]
发表于 2015-1-27 17:00:39 | 显示全部楼层 |阅读模式
3鸿鹄币
用web-iou模拟hsrp,结果pc机ping不通虚拟网关。
具体配置如下:
S1#sh run
spanning-tree mode rapid-pvst
spanning-tree extend system-id
spanning-tree vlan 10 priority 24576
spanning-tree vlan 20 priority 28672
!
vlan internal allocation policy ascending
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/3
no switchport
ip address 192.168.3.1 255.255.255.0
duplex auto
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.1.1 255.255.255.0
standby 10 ip 192.168.1.253
standby 10 priority 110
standby 10 preempt
!         
interface Vlan20
ip address 192.168.2.1 255.255.255.0
standby 20 ip 192.168.2.253
standby 20 priority 90
standby 20 preempt
!
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0

S2# sh run
spanning-tree mode rapid-pvst
spanning-tree extend system-id
spanning-tree vlan 10 priority 28672
spanning-tree vlan 20 priority 24576
!
vlan internal allocation policy ascending
!
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/3
no switchport
ip address 192.168.4.1 255.255.255.0
duplex auto
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.1.2 255.255.255.0
standby 10 ip 192.168.1.253
standby 10 priority 90
standby 10 preempt
!
interface Vlan20
ip address 192.168.2.2 255.255.255.0
standby 20 ip 192.168.2.253
standby 20 priority 110
standby 20 preempt
!
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.4.0 0.0.0.255 area 0
!

S3#sh run

spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!         
interface Ethernet0/2
switchport access vlan 10
switchport mode access
duplex auto
!
interface Ethernet0/3
duplex auto
!
interface Vlan1
no ip address

S4#sh run
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!         
interface Ethernet0/2
switchport access vlan 20
switchport mode access
duplex auto
!
interface Ethernet0/3
duplex auto
!
interface Vlan1
no ip address
!

C1#sh run
!
interface Ethernet0/0
ip address 192.168.1.3 255.255.255.0
!
interface Ethernet0/1
no ip address
shutdown
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
ip default-gateway 192.168.1.253
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 Ethernet0/0

最佳答案

查看完整内容

S5和S6这两个主机是用什么模拟的?如果是路由器模拟的,建议在路由器上no ip routing,然后ip default-gateway xxx 仅供参考
发表于 2015-1-27 17:00:40 | 显示全部楼层

S5和S6这两个主机是用什么模拟的?如果是路由器模拟的,建议在路由器上no ip routing,然后ip default-gateway xxx
仅供参考
沙发 2015-1-27 17:00:40 回复 收起回复
回复

使用道具 举报

发表于 2015-1-28 10:37:42 | 显示全部楼层
能不能把拓扑贴出来看看
板凳 2015-1-28 10:37:42 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-1-29 08:48:16 | 显示全部楼层
WOLF某某某 发表于 2015-1-28 10:37
能不能把拓扑贴出来看看

C:\Documents and Settings\chenhaibo\桌面\11.gif
地板 2015-1-29 08:48:16 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-1-29 08:49:10 | 显示全部楼层

拓扑

本帖最后由 125004763 于 2015-1-29 08:50 编辑


拓扑

拓扑

拓扑
5# 2015-1-29 08:49:10 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-1-29 11:46:58 | 显示全部楼层
做了no ip routing,然后ip default-gateway xxx,还是不行。
6# 2015-1-29 11:46:58 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-1-29 11:47:12 | 显示全部楼层
WOLF某某某 发表于 2015-1-29 09:28
S5和S6这两个主机是用什么模拟的?如果是路由器模拟的,建议在路由器上no ip routing,然后ip default-gate ...

no ip routing,然后ip default-gateway xxx做了,还是不行
7# 2015-1-29 11:47:12 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-1-29 11:48:02 | 显示全部楼层
125004763 发表于 2015-1-29 11:47
no ip routing,然后ip default-gateway xxx做了,还是不行

感觉配置没有问题啊
8# 2015-1-29 11:48:02 回复 收起回复
回复

使用道具 举报

发表于 2015-1-29 13:18:11 | 显示全部楼层
125004763 发表于 2015-1-29 11:48
感觉配置没有问题啊

能不能把主机的show ip route贴出来看看
9# 2015-1-29 13:18:11 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-1-30 12:46:40 | 显示全部楼层
WOLF某某某 发表于 2015-1-29 13:18
能不能把主机的show ip route贴出来看看

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/24 is directly connected, Ethernet0/0
L        192.168.1.3/32 is directly connected, Ethernet0/0


pC的路由表
10# 2015-1-30 12:46:40 回复 收起回复
回复

使用道具 举报

发表于 2015-1-30 16:17:59 | 显示全部楼层
你VLAN 10的主机PING的是VLAN 10的虚拟网关,VLAN 20的主机PING的是VLAN 20虚拟网关吗?
11# 2015-1-30 16:17:59 回复 收起回复
回复

使用道具 举报

发表于 2015-1-30 16:55:00 | 显示全部楼层
125004763 发表于 2015-1-30 12:46
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/24 is directl ...

PC要no ip routing,你这是没有no ip routing.指定的ip default-gateway是没用的.
只有PC才会走网关,如果没有no ip routing,它是一个路由器,不走网关,走自己的路由表.
仅供参考
12# 2015-1-30 16:55:00 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-1-30 18:10:03 | 显示全部楼层
大冰块 发表于 2015-1-30 16:17
你VLAN 10的主机PING的是VLAN 10的虚拟网关,VLAN 20的主机PING的是VLAN 20虚拟网关吗?

做了no ip routing,确实也ping的是各自的vlan的网关
13# 2015-1-30 18:10:03 回复 收起回复
回复

使用道具 举报

发表于 2015-2-3 14:18:25 | 显示全部楼层
125004763 发表于 2015-1-30 18:10
做了no ip routing,确实也ping的是各自的vlan的网关

我觉得S1,S2,S3,S4之间的不应该都走trunk,S3连接S1,S2的接口都应该划到vlan10下,S4连S1,S2的接口都应该划到vlan20下,因为SVI要对应VLAN接口才行。S1和S2之间走个TRUNK用来实现HSRP(最好2条线路捆绑下做E-CHANNAL)。
14# 2015-2-3 14:18:25 回复 收起回复
回复

使用道具 举报

发表于 2015-2-3 18:21:59 | 显示全部楼层
用之前要先了解这个东西支持不支持

Not supported/working on Layer 2 IOL (Linux)
• HSRP address not pingable
15# 2015-2-3 18:21:59 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-24 02:10 , Processed in 0.167509 second(s), 26 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表