该案例是笔者做过的一个网络改造项目,同时为了保密只介绍VRRP方面的配置以及要注意的事项。

该方案时某医院核心网络,通过两台S8610走VRRP(和网关相连)。网络拓扑如下

 

S8610_1配置

 en
config
hostname S8610_1
enable sec *******
line vty 0 4
pass ********
login
exit
interface TE 1/4
no swi
des S8610_2_T1/4
ip address 192.168.86.1 255.255.255.252
no shut
exit
interface gi 2/24
swi mode trunk
des S8610_2
exit
inter te1/1
no swi
ip address 192.168.86.5 255.255.255.252
des huiju_s1_T1/1
no shut
exit
inter te 1/2
no swi
ip add 192.168.86.21 255.255.255.252
des huiju_s2_T1/1
no shut
exit
inter gi 3/1
me fi
no swi
ip add 192.168.86.13 255.255.255.252
des huiju_s3_G0/24
NO shutdown
ip ospf cost 10
exit
interface gi 3/22
 no switchport
 no ip proxy-arp
 ip address 192.168.90.252 255.255.255.0
 vrrp 10 priority 120
 vrrp 10 ip 192.168.90.254
 vrrp 10 preempt
 description firewall
interface gi 3/23
 no switchport
 medium-type fiber
 port-group 1

interface gi 3/24
 no switchport
 medium-type fiber
 port-group 1
interface AggregatePort 1
 no switchport
 no ip proxy-arp
 ip address 192.168.86.1 255.255.255.252
 description S8610_2_AggregatePort_1

inter loopback 0
ip address 192.168.87.254 255.255.255.255
exit
route ospf 10
router-id 192.168.87.254
y

log de
network 192.168.86.1 0.0.0.0 area 0
network 192.168.86.5 0.0.0.0 area 0
network 192.168.86.21 0.0.0.0 area 0
network 192.168.86.13 0.0.0.0 area 0
exit
end
wr

S8610_2配置

en
config
hostname S8610_2
enable sec *******
line vty 0 4
pass *******
login
exit
service password
interface TE 1/4
no swi
des S8610_1_T1/4
ip address 192.168.86.2 255.255.255.252
no shut
exit
interface gi 2/24
swi mode trunk
des S8610_1
exit
inter te1/1
no swi
ip address 192.168.86.17 255.255.255.252
des KFL_RG_S5750_T1/1
no shut
exit
inter Gi 3/2
ip ospf cost 10
me fi
no swi
ip add 192.168.86.25 255.255.255.252
des huiju_s2_G0/24
no shut
exit
inter gi 3/1
ip ospf cost 10
me fi
no swi
ip add 192.168.86.9 255.255.255.252
des MZL_S5750_G0/24
NO shutdown
exit

interface gi 3/22
 no switchport
 medium-type fiber
 no ip proxy-arp
 ip address 192.168.90.253 255.255.255.0
 vrrp 10 ip 192.168.90.254
inter loopback 0
ip address 192.168.87.253 255.255.255.255
exit
interface gi 3/23
 no switchport
 medium-type fiber
 port-group 1
interface gi 3/24
 no switchport
 medium-type fiber
 port-group 1
interface AggregatePort 1
 no switchport
 no ip proxy-arp
 ip address 192.168.86.2 255.255.255.252
 description S8610_1_aggregateport_1

route ospf 10
router-id 192.168.87.253
y

log de
network 192.168.86.2 0.0.0.0 area 0
network 192.168.86.9 0.0.0.0 area 0
network 192.168.86.17 0.0.0.0 area 0
network 192.168.86.25 0.0.0.0 area 0
exit
end
wr

在生产环境中很少有vrrp结合mstp使用,如果那样结合使用的话,会给核心设备带来额外的开销。