全网超详细数据中心高可靠技术M-LAG接入OSPF网络实验介绍(V-STP)
1.实验拓扑

2.基本配置
a.接入配置

S1: # vlan batch 10 20 # interface GE1/0/1 port link-type access port default vlan 10 # interface GE1/0/2 port link-type access port default vlan 20 # interface GE1/0/3 port link-type trunk port trunk allow-pass vlan 10 20 # CE3: # bridge-domain 1000 vxlan vni 5010 # bridge-domain 2000 vxlan vni 5020 # interface GE1/0/1.10 mode l2 encapsulation dot1q vid 10 bridge-domain 1000 # interface GE1/0/1.20 mode l2 encapsulation dot1q vid 20 bridge-domain 2000 #
b.M-LA的底层OSPF配置
CE1: # interface GE1/0/5 undo portswitch ip address 10.1.14.1 255.255.255.0 # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # interface LoopBack1 ip address 11.1.1.1 255.255.255.255 # ospf 1 router-id 1.1.1.1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 10.1.14.0 0.0.0.255 network 11.1.1.1 0.0.0.0 # CE2: # interface GE1/0/5 undo portswitch ip address 10.1.24.2 255.255.255.0 # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 # interface LoopBack1 ip address 11.2.2.2 255.255.255.255 # ospf 1 router-id 2.2.2.2 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 10.1.24.2 0.0.0.0 network 11.2.2.2 0.0.0.0 # CE4: # interface GE1/0/1 undo portswitch ip address 10.1.14.4 255.255.255.0 # interface GE1/0/2 undo portswitch ip address 10.1.24.4 255.255.255.0 # interface LoopBack0 ip address 4.4.4.4 255.255.255.255 # ospf 1 router-id 4.4.4.4 area 0.0.0.0 network 4.4.4.4 0.0.0.0 network 10.1.14.0 0.0.0.255 network 10.1.24.0 0.0.0.255 #
c.M-LAG的DFS-Group建立(同时建立DAD链路)
CE1: # dfs-group 1 dual-active detection source ip 11.1.1.1 peer 11.2.2.2 priority 150 # CE2: # dfs-group 1 dual-active detection source ip 11.2.2.2 peer 11.1.1.1 #
d.M-LAG的peer-link配置
CE1: # interface Eth-Trunk1 mode lacp-static trunkport GE 1/0/3 to 1/0/4 peer-link 1 # CE2: # interface Eth-Trunk1 mode lacp-static trunkport GE 1/0/3 to 1/0/4 peer-link 1 #
e.配置M-LAG的V-STP
CE1; # stp mode rstp stp bridge-address 0000-5e00-0001 stp v-stp enable CE2; # stp mode rstp stp bridge-address 0000-5e00-0001 stp v-stp enable
f.配置M-LAG的成员接口
CE1: # interface Eth-Trunk10 port link-type trunk port trunk allow-pass vlan 10 20 mode lacp-static lacp system-id 0000-0000-0001 lacp priority 0 dfs-group 1 m-lag 12 # CE2: # interface Eth-Trunk10 port link-type trunk port trunk allow-pass vlan 10 20 mode lacp-static lacp system-id 0000-0000-0001 lacp priority 0 dfs-group 1 m-lag 12 # CE3: # interface Eth-Trunk10 port link-type trunk port trunk allow-pass vlan 10 20 mode lacp-static #
g.配置双活网关
CE1: # interface Vlanif10 ip address 192.168.1.254 255.255.255.0 mac-address 0000-5e00-0010 # interface Vlanif20 ip address 192.168.2.254 255.255.255.0 mac-address 0000-5e00-0020 # CE2: # interface Vlanif10 ip address 192.168.1.254 255.255.255.0 mac-address 0000-5e00-0010 # interface Vlanif20 ip address 192.168.2.254 255.255.255.0 mac-address 0000-5e00-0020 #
3.结果验证
a.OSPF邻居建立

b.检查M-LAG的peer-link是否建立

c.查看V-STP的情况:

d.查看M-LAG的成员接口建立情况

e.查看故障场景是否ping通(此处仅举例:成员链路断了)

正常情况:

断了后: