网络拓扑如图所示:
网络地址规划:vlan 2 10.147.140.0/26
vlan 3 10.147.140.64/26 用于行政楼段;
vlan 4 10.147.140.128/26
vlan 5 10.147.140.192/26 用于中控楼段;
vlan 10 10.147.141.0/30
vlan 11 10.147.141.4/30
vlan 12 10.147.141.8/30
vlan 13 10.147.141.12/30 用于核心交换机到路由器互联网段。
网络协议使用:接入层到汇聚层使用MSTP,各设置两个实例,分别以其中某台汇聚交换机实例为区域 根;
汇聚层到核心层使用VRRP,使用4个虚拟组,分别以某台核心交换机为master,另一台为 backup;
核心层至广域网使用OSPF,设置成等价路径。
中控接入1:
#
sysname SW1
#
undo info-center enable
#
vlan batch 4 to 5
#
stp pathcost-standard legacy
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name production_area
instance 1 vlan 4
instance 2 vlan 5
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 4 to 5
stp instance 2 cost 200
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 4 to 5
stp instance 1 cost 200
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 4
stp disable
#
........................................
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
行政接入3:
#
sysname SW3
#
undo info-center enable
#
vlan batch 2 to 3
#
stp pathcost-standard legacy
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name office_area
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp instance 2 cost 200
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp instance 1 cost 200
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 2
stp disable
#
..................................
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
汇聚层交换机配置:
汇聚A:
#
sysname Convergence_A
#
undo info-center enable
#
vlan batch 4 to 5
#
stp instance 1 root primary
stp instance 2 root secondary
stp pathcost-standard legacy
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name production_area
instance 1 vlan 4
instance 2 vlan 5
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
..................................
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
汇聚B:
#
sysname Convergence_B
#
undo info-center enable
#
vlan batch 4 to 5
#
stp instance 1 root secondary
stp instance 2 root primary
stp pathcost-standard legacy
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name production_area
instance 1 vlan 4
instance 2 vlan 5
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
..................................
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 4 to 5
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
汇聚C:
#
sysname Convergence_C
#
undo info-center enable
#
vlan batch 2 to 3
#
stp instance 1 root primary
stp instance 2 root secondary
stp pathcost-standard legacy
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name office_area
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp disable
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp disable
#
...................................
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
汇聚D:
#
sysname Convergence_D
#
undo info-center enable
#
vlan batch 2 to 3
#
stp instance 1 root secondary
stp instance 2 root primary
stp pathcost-standard legacy
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name office_area
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp disable
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp disable
#
...................................
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
核心交换机配置:
核心1:
#
sysname Core_A
#
undo info-center enable
#
vlan batch 2 to 5 10 14
#
stp disable
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif2
ip address 10.147.140.60 255.255.255.192
vrrp vrid 2 virtual-ip 10.147.140.62
vrrp vrid 2 priority 110
vrrp vrid 2 preempt-mode timer delay 30
#
interface Vlanif3
ip address 10.147.140.125 255.255.255.192
vrrp vrid 3 virtual-ip 10.147.140.126
#
interface Vlanif4
ip address 10.147.141.189 255.255.255.192
vrrp vrid 4 virtual-ip 10.147.141.190
vrrp vrid 4 priority 110
vrrp vrid 4 preempt-mode timer delay 30
#
interface Vlanif5
ip address 10.147.141.252 255.255.255.192
vrrp vrid 5 virtual-ip 10.147.141.254
#
interface Vlanif10
ip address 10.147.140.129 255.255.255.252
#
interface Vlanif14
ip address 10.147.140.141 255.255.255.252
#
interface MEth0/0/1
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 5
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 5
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/6
port link-type access
port default vlan 14
#
................................
#
interface GigabitEthernet0/0/23
eth-trunk 1
#
interface GigabitEthernet0/0/24
eth-trunk 1
#
interface NULL0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.147.140.128 0.0.0.3
network 10.147.140.140 0.0.0.3
network 3.3.3.3 0.0.0.0
#
user-interface con 0
user-interface vty 0 4
#
port-group quit
#
return
核心2:
#
sysname Core_B
#
undo info-center enable
#
vlan batch 2 to 5 11 to 12
#
stp disable
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif2
ip address 10.147.140.61 255.255.255.192
vrrp vrid 2 virtual-ip 10.147.140.62
#
interface Vlanif3
ip address 10.147.140.124 255.255.255.192
vrrp vrid 3 virtual-ip 10.147.140.126
vrrp vrid 3 priority 110
vrrp vrid 3 preempt-mode timer delay 30
#
interface Vlanif4
ip address 10.147.141.188 255.255.255.192
vrrp vrid 4 virtual-ip 10.147.141.190
#
interface Vlanif5
ip address 10.147.141.253 255.255.255.192
vrrp vrid 5 virtual-ip 10.147.141.254
vrrp vrid 5 priority 110
vrrp vrid 5 preempt-mode timer delay 30
#
interface Vlanif11
ip address 10.147.140.133 255.255.255.252
#
interface Vlanif12
ip address 10.147.140.137 255.255.255.252
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 5
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 5
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 11
#
interface GigabitEthernet0/0/6
port link-type access
port default vlan 12
#
................................
#
interface GigabitEthernet0/0/23
eth-trunk 1
#
interface GigabitEthernet0/0/24
eth-trunk 1
#
interface NULL0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.147.140.128 0.0.0.3
network 10.147.140.140 0.0.0.3
network 3.3.3.3 0.0.0.0
#
user-interface con 0
user-interface vty 0 4
#
port-group quit
#
return
路由器配置:
路由器R1:
#
sysname R1
#
undo info-center enable
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 10.147.140.130 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.147.140.134 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
ip address 1.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.147.140.128 0.0.0.3
network 10.147.140.132 0.0.0.3
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
路由器R2:
#
sysname R2
#
undo info-center enable
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 10.147.140.142 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.147.140.138 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
ip address 2.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.147.140.140 0.0.0.3
network 10.147.140.136 0.0.0.3
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
本文出自 “每天进步一点点” 博客,请务必保留此出处http://pthahnil.blog.51cto.com/814988/1431561
双链路负载分担——MSTP+VRRP+OSPF,布布扣,bubuko.com
原文地址:http://pthahnil.blog.51cto.com/814988/1431561