請問有沒有大佬可以解釋關于交換機的主備問題,配置了好久了,想的起來的都用了,可是就是沒有主備的區分
配置如下
sw1
#
vlan batch 10 20 30 40
#
stp instance 1 root primary
stp instance 2 root secondary
#
stp region-configuration
region-name bian
instance 1 vlan 10 20
instance 2 vlan 30 40
#
interface Vlanif1
#
interface Vlanif10
ip address 192.168.10.253 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 150
#
interface Vlanif20
ip address 192.168.20.253 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 150
#
interface Vlanif30
ip address 192.168.30.253 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.30.254
#
interface Vlanif40
ip address 192.168.40.253 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.40.254
#
interface MEth0/0/1
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094
sw2
#
vlan batch 10 20 30 40
#
stp instance 1 root secondary
stp instance 2 root primary
#
stp region-configuration
region-name bian
instance 1 vlan 10 20
instance 2 vlan 30 40
interface Vlanif1
#
interface Vlanif10
ip address 192.168.10.253 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.254
#
interface Vlanif20
ip address 192.168.20.253 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.20.254
#
interface Vlanif30
ip address 192.168.30.253 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.30.254
vrrp vrid 30 priority 150
#
interface Vlanif40
ip address 192.168.40.253 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.40.254
vrrp vrid 40 priority 150
#
interface MEth0/0/1
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094

uj5u.com熱心網友回復:
兩臺交換機的相同VLAN的IP地址應該是不相同的,但是你的是相同的。生成樹協議應該把某些介面阻塞了,那么這條鏈路就不會生效。
uj5u.com熱心網友回復:
不同的交換機配置相同的vlanif ip會造成路由環路嗎?
uj5u.com熱心網友回復:
不是環路呀,思科的交換機默認是開啟生成樹的,有了生成樹就不會環路的。我的意思是VRRP時,兩個物理介面地址和虛擬出來的網關地址在一個網段內,但是不能沖突呀,按你的配置,在SW12,SW13上配置的VLAN10的IP地址是沖突的。
uj5u.com熱心網友回復:
原來如此,我明白了

謝謝??
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/40554.html
標籤:交換及路由技術
上一篇:Linux學習筆記:Centos7下安裝和使用docker
下一篇:求助:acl應用中排除一個地址
