博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CCNP交换实验(5) -- 网关热备冗余
阅读量:6819 次
发布时间:2019-06-26

本文共 4454 字,大约阅读时间需要 14 分钟。

HSRP:

1.启用HSRP功能,并设置虚拟地址IP, 1为standby的组号。
2.相同组号的路由器属于同一个HSRP组,所有属于同一个HSRP组的路由器的虚拟地址必须一致。
3.HSRP的优先级默认为100,该值越大抢占为活动路由器的优先权越高
4.可以设置路由器是否抢占为活动路由器
5.由于局域网内大多使用三层交换机,此时HSRP是在交换机的SVI接口上配置的。
1.网关冗余热备份协议HSRP(CISCO私有)
2.VRRP
3.GLBP
enable
conf t
no ip do lo
enable pass cisco
line con 0
logg sync
exec-t 0 0
line vty 0 4
pass cisco
logg sync
exit
host
1.网关冗余热备份协议HSRP(CISCO私有)
-------------------------------------------------------------------------

R1:
int e0/0
ip add 10.1.1.1 255.255.255.0
no shut
exit
int e0/1
ip add 13.1.1.1 255.255.255.0
no shut
exit
router rip
version 2
no auto-summary
network 10.0.0.0
network 13.0.0.0
passive-int e0/0
exit
R2:
int e0/0
ip add 10.1.1.2 255.255.255.0
no shut
exit
int e0/1
ip add 23.1.1.2 255.255.255.0
no shut
exit
router rip
version 2
no auto-summary
network 10.0.0.0
network 23.0.0.0
passive-interface e0/0
exit
R3:
int l0
ip add 33.1.1.1 255.255.255.0
exit
int e0/1
ip add 13.1.1.3 255.255.255.0
no shut
exit
int e0/2
ip add 23.1.1.3 255.255.255.0
no shut
exit
router rip
version 2
no auto-summary
network 33.0.0.0
network 13.0.0.0
network 23.0.0.0
exit
R1:
int e0/0
standby 1 ip 10.1.1.254
standby 1 priority 120
standby 1 preempt
standby 1 authentication mode md5 key-string cisco
standby 2 ip 10.1.1.253
standby 2 preempt
standby 2 authentication mode md5 key-string cisco
exit
R2:
int e0/0
standby 1 ip 10.1.1.254
standby 1 preempt
standby 1 authentication mode md5 key-string cisco
standby 2 ip 10.1.1.253
standby 2 priority 120
standby 2 preempt
standby 2 authentication mode md5 key-string cisco
exit
R1/R2:
show standby brief
PC1:
no ip routing
int e0/0
ip add 10.1.1.100 255.255.255.0
no shut
exit
ip default-gateway 10.1.1.254
ping 33.1.1.1 repeat 10000
R3:
show standby brief
R1:
int e0/0
shutdown
exit
R3:
show standby brief
R1:
int e0/0
standby 1 track e0/1 30
exit
int e0/1
shutdown
exit
show standby brief
show standby
2.VRRP
--------------------------------------------------------------------------
R1:
default int e0/0
int e0/0
ip add 10.1.1.1 255.255.255.0
no shut
exit
router rip
network 10.0.0.0
passive-int e0/0
exit
R2:
default int e0/0
int e0/0
ip add 10.1.1.2 255.255.255.0
no shut
exit
router rip
network 10.0.0.0
passive-interface e0/0
exit

R1:

track 1 int e0/1 line-protocol
exit

int e0/0

vrrp 1 ip 10.1.1.254
vrrp 1 priority 120
vrrp 1 preempt
vrrp 1 authentication mode md5 key-string cisco
vrrp 2 ip 10.1.1.253
vrrp 2 preempt
vrrp 2 authentication mode md5 key-string cisco
vrrp 2 track 1 decrement 30
exit

R2:

track 1 int e0/1 line-protocol
exit

int e0/0

vrrp 1 ip 10.1.1.254
vrrp 1 priority 120
vrrp 1 preempt
vrrp 1 authentication mode md5 key-string cisco
vrrp 2 ip 10.1.1.253
vrrp 2 priority 120
vrrp 2 preempt
vrrp 2 authentication mode md5 key-string cisco
vrrp 2 track 1 decrement 30
exit

 

R1/R2:

show vrrp brief

3. GLBP

--------------------------------------------------------------------

R1:

int e0/0
ip add 10.1.1.1 255.255.255.0
no shut
exit
int e0/1
ip add 20.1.1.1 255.255.255.0
no shut
exit

router rip

version 2
no auto-summary
network 10.0.0.0
network 20.0.0.0
passive-interface e0/0
exit

R2:

int e0/0
ip add 10.1.1.2 255.255.255.0
no shut
exit
int e0/1
ip add 20.1.1.2 255.255.255.0
no shut
exit

router rip

version 2
no auto-summary
network 10.0.0.0
network 20.0.0.0
passive-interface e0/0
exit

R3:

int e0/0
ip add 10.1.1.3 255.255.255.0
no shut
exit
int e0/1
ip add 20.1.1.3 255.255.255.0
no shut
exit

router rip

version 2
no auto-summary
network 10.0.0.0
network 20.0.0.0
passive-interface e0/0
exit

R4:

int l0
ip add 44.1.1.1 255.255.255.0
exit
int e0/0
ip add 20.1.1.4 255.255.255.0
no shut
exit

router rip

version 2
no auto-summary
network 20.0.0.0
network 44.0.0.0
exit

-----------------------------------------------------

R1:
int e0/0
glbp 1 ip 10.1.1.254
glbp 1 priority 200
glbp 1 preempt
glbp 1 authentication text cisco
exit

R2:

int e0/0
glbp 1 ip 10.1.1.254
glbp 1 priority 180
glbp 1 preempt
glbp 1 authentication text cisco
exit

R3:

int e0/0
glbp 1 ip 10.1.1.254
glbp 1 priority 160
glbp 1 preempt
glbp 1 authentication text cisco
exit

R1:

show glbp

R7-PC1:

no ip routing

int e0/0

ip add 10.1.1.100 255.255.255.0
no shut
exit
ip default-gateway 10.1.1.254

ping 44.1.1.1

show arp
clear arp cache
ping 44.1.1.1
show arp

跟踪上行链路

------------------------------------------------------
R1:
track 2 int e0/1 line-protocol

int e0/0

glbp 1 wighting 110 lower 85 upper 105
glb1 1 weighting track 2 decrement 50

 

转载于:https://www.cnblogs.com/thlzhf/p/3258498.html

你可能感兴趣的文章