最近有兴趣学习下交换机的配置,在进行双机冗余配置时遇到以下问题:
1)同一个VLAN中的主机能和虚拟网关通讯,但主机之间不能ping 通过。
2)各VLAN中的主机能ping 通各VLAN IP和虚拟网关,但主机之间不能互相通讯。
可能是路由的问题但不知道如何解决,请各位前辈指点一二,谢谢!
下面是网络拓扑说明:
(1)两台Cisco 4506作核心交换,4506A是Master,4506B是备份机,之间通过各自的G1/1连接
(2)楼层交换机是两台3500,分别通过F0/1、F0/2和两台4506的F3/1、F3/2建立冗余线路
以下是我对核心交换机、楼层交换机的配置:
hostname 4506A
!
!
ip subnet-zero
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1,10,20 priority 4096
power dc input 2500
!
interface GigabitEthernet1/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet1/2
!
interface FastEthernet3/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet3/2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Vlan1
no ip address
!
interface Vlan10
ip address 192.168.10.3 255.255.255.0
standby priority 120
standby 1 ip 192.168.10.1
standby 1 timers 3 5
standby 1 priority 120
standby 1 preempt
!
interface Vlan20
ip address 192.168.20.3 255.255.255.0
standby 2 ip 192.168.20.1
standby 2 priority 110
standby 2 preempt
!
interface Vlan99
ip address 172.16.0.1 255.255.255.0
ip classless
no ip http server
!
!
!
!
!
line con 0
stopbits 1
line vty 0 4
!
end
4506A#
===========================
hostname 4506B
!
!
ip subnet-zero
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1,10,20 priority 4096
power dc input 2500
!
!
interface GigabitEthernet1/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet1/2
!
interface FastEthernet3/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet3/2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Vlan1
no ip address
!
interface Vlan10
ip address 192.168.10.2 255.255.255.0
standby 1 ip 192.168.10.1
standby 1 timers 3 5
standby 1 priority 110
standby 1 preempt
!
interface Vlan20
ip address 192.168.20.2 255.255.255.0
standby 2 ip 192.168.20.1
standby 2 timers 3 5
standby 2 priority 120
standby 2 preempt
!
interface Vlan99
ip address 172.16.0.2 255.255.255.0
shutdown
!
ip classless
no ip http server
!
!
!
!
!
line con 0
stopbits 1
line vty 0 4
no login
!
end
4506B#
==========================
!
hostname 3500A
!
!
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/47
switchport access vlan 10
!
interface FastEthernet0/48
switchport access vlan 10
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface VLAN1
no ip directed-broadcast
no ip route-cache
!
!
line con 0
transport input none
stopbits 1
line vty 5 15
!
end
==========================
!
hostname 3500B
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/47
switchport access vlan 20
!
interface FastEthernet0/48
switchport access vlan 20
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface VLAN1
no ip directed-broadcast
no ip route-cache
!
!
line con 0
transport input none
stopbits 1
line vty 0 4
login
line vty 5 15
login
!
end
3500B#