码迷,mamicode.com
首页 > 系统相关 > 详细

cisco HSRP负载均衡

时间:2016-05-09 22:17:52      阅读:473      评论:0      收藏:0      [点我收藏+]

标签:cisco   热备份   hsrp负载均衡   hsrp   路由交换   

技术分享

R5配置

!

noipdhcp use vrf connected

ipdhcp excluded-address192.168.2.1 192.168.2.9

ipdhcp excluded-address192.168.3.1 192.168.3.9

ipdhcp excluded-address192.168.4.1 192.168.4.9

!

ipdhcp pool vlan2

network 192.168.2.0255.255.255.0

default-router192.168.2.254

!

ipdhcp pool vlan3

network 192.168.3.0255.255.255.0

default-router192.168.3.254

!

ipdhcp pool vlan4

network 192.168.4.0255.255.255.0

default-router192.168.4.254

!

!

!

interface Loopback0

ip address 192.168.100.1 255.255.255.0

!

interface FastEthernet0/0

ip address 192.168.1.1 255.255.255.0

shutdown

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 192.168.0.1 255.255.255.0

duplex auto

speed auto

!

ip route 0.0.0.0 0.0.0.0 192.168.1.2

ip route 0.0.0.0 0.0.0.0 192.168.0.2

!

 

 

SW1配置

!

spanning-treevlan 2priority 8192

spanning-treevlan 3priority 8192

spanning-treevlan 4priority 16384

!

!

interface FastEthernet0/0

ip address 192.168.1.2 255.255.255.0

shutdown

duplex auto

speed auto

!!

interface FastEthernet1/13

switchport mode trunk

!

interface FastEthernet1/14

switchport mode trunk

!

interface FastEthernet1/15

switchport mode trunk

!!

interface Vlan2

ip address 192.168.2.1255.255.255.0

ip helper-address192.168.1.1

standby 2 ip192.168.2.254

standby 2 priority 150

standby 2 preempt

standby 2 trackFastEthernet0/0 100

standby 2 trackFastEthernet1/14 100

standby 2 trackFastEthernet1/13 100

!

interface Vlan3

ip address 192.168.3.1255.255.255.0

ip helper-address192.168.1.1

standby 3 ip192.168.3.254

standby 3 priority 150

standby 3 preempt

standby 3 trackFastEthernet0/0 100

standby 3 trackFastEthernet1/14 100

standby 3 trackFastEthernet1/13 100

!

interface Vlan4

ip address 192.168.4.1255.255.255.0

ip helper-address192.168.1.1

standby 4 ip192.168.4.254

standby 4 preempt

!

ip route 192.168.100.0 255.255.255.0192.168.1.1

!

 

SW2配置

!

spanning-treevlan 2priority 16384

spanning-treevlan 3priority 16384

spanning-treevlan 4priority 8192

!!

interface FastEthernet0/1

ip address 192.168.0.2 255.255.255.0

duplex auto

speed auto

!!

interface FastEthernet1/13

switchport mode trunk

!

interface FastEthernet1/14

switchport mode trunk

!

interface FastEthernet1/15

switchport mode trunk

!!

interface Vlan2

ip address 192.168.2.2255.255.255.0

ip helper-address192.168.0.1

standby 2 ip192.168.2.254

standby 2 preempt

!

interface Vlan3

ip address 192.168.3.2255.255.255.0

ip helper-address192.168.0.1

standby 3 ip192.168.3.254

standby 3 preempt

!

interface Vlan4

ip address 192.168.4.2255.255.255.0

ip helper-address192.168.0.1

standby 4 ip192.168.4.254

standby 4 priority 150

standby 4 preempt

standby 4 trackFastEthernet0/1 100

standby 4 trackFastEthernet1/13 100

standby 4 trackFastEthernet1/14 100

!

ip route 192.168.100.0 255.255.255.0192.168.0.1

!

 

 

SW3配置

 

!

interface FastEthernet1/14

switchport mode trunk

!

interface FastEthernet1/15

switchport mode trunk

!

2    VLAN0002                         active    Fa1/0

3    VLAN0003                         active    Fa1/1

 

SW4配置

!

interface FastEthernet1/14

switchport mode trunk

!

interface FastEthernet1/15

switchport mode trunk

!

2   VLAN0002                        active  

3    VLAN0003                         activeFa1/0

4    VLAN0004                         active    Fa1/1

 

PC配置

技术分享

本文出自 “迁徙” 博客,请务必保留此出处http://xianlei.blog.51cto.com/4030712/1771581

cisco HSRP负载均衡

标签:cisco   热备份   hsrp负载均衡   hsrp   路由交换   

原文地址:http://xianlei.blog.51cto.com/4030712/1771581

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!