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

CCNP交换实验(5) -- 网关热备冗余的更多相关文章

  1. CCNP交换实验(7) -- NAT

    1.静态NAT2.动态NAT3.复用内部全局地址的NAT(PAT) enableconf tno ip do loenable pass ciscoline con 0logg syncexec-t ...

  2. [na]vrrp两用(网关冗余+服务器热备)

    VRRP的两种用途 早上想了想vrrp的使用,1,网关冗余 2,服务器热备 思想稍微有点不一样.主要在于监控口 服务器的话有心跳线,用户同步一些配置和迁移一些服务.达到热备的目的.:牵涉到四个优先级: ...

  3. web双机热备添加心跳检测ip的时候填了网关导致外网ip不能上网

    web双机热备添加心跳检测ip的时候填了网关导致外网ip不能上网 1 连接 机器其他机器, 通过机房做的服务器的局域网,ssh到这台的局域网ip,删除网卡配置文件的网关哪一行,重启网卡. 2 如果没有 ...

  4. Nginx+keepalived双机热备(主从模式)

    负载均衡技术对于一个网站尤其是大型网站的web服务器集群来说是至关重要的!做好负载均衡架构,可以实现故障转移和高可用环境,避免单点故障,保证网站健康持续运行.关于负载均衡介绍,可以参考:linux负载 ...

  5. Nginx+keepalived 双机热备(主从模式)

    负载均衡技术对于一个网站尤其是大型网站的web服务器集群来说是至关重要的!做好负载均衡架构,可以实现故障转移和高可用环境,避免单点故障,保证网站健康持续运行.关于负载均衡介绍,可以参考:linux负载 ...

  6. 《nginx 四》双机主从热备

    lvs+keepalived+nginx实现高性能负载均衡集群 LVS作用 LVS是一个开源的软件,可以实现传输层四层负载均衡.LVS是Linux Virtual Server的缩写,意思是Linux ...

  7. Nginx+keepalived双机热备(默认路径安装)- 基础篇

    负载均衡技术对于一个网站尤其是大型网站的web服务器集群来说是至关重要的!做好负载均衡架构,可以实现故障转移和高可用环境,避免单点故障,保证网站健康持续运行.关于负载均衡介绍,可以参考:linux负载 ...

  8. CCNP路由实验之十五 NAT(网络地址转换)

     CCNP路由实验之十五 NAT(网络地址转换) 众所周知,要让自己的电脑连上Internet,必须要到运营商(ISP)申请一个上网账号,依据此账号申请自己的宽频业务(拨号上网.商业固定IP等等) ...

  9. 【Nginx】(主从热备)LVS+Keepalived+Nginx实现高性能负载均衡集群

    一.LVS 1.1 概述 1.2 Nginx与LVS区别什么 二.Keepalived 2.1 概述 2.2 keepalived和其工作原理 三.LVS+Keepalived+Nginx 搭建双机主 ...

随机推荐

  1. Centos6.4下tar包安装最新版Mysql5.6

    1.下载 mysql:http://www.mysql.com/downloads/ (须要注冊ORACLE账号) 版本号:mysql-advanced-5.6.21-linux-glibc2.5-x ...

  2. css 基础(一)

    一.css样式表的分类 首先介绍一下css中的样式表  a.外部样式表  将需要的样式放在单独的外部文件中,需要使用是直接调用,通常放在.css文件中.例如:/*以下部分是放在(my.css)自定义名 ...

  3. [Swust 549]--变位词(vector水过)

    Time limit(ms): 1000 Memory limit(kb): 65535   Description 输入N和一个要查找的字符串,以下有N个字符串,我们需要找出其中的所有待查找字符串的 ...

  4. BZOJ 2809: [Apio2012]dispatching( 平衡树 + 启发式合并 )

    枚举树上的每个结点做管理者, 贪心地取其子树中薪水较低的, 算出这个结点为管理者的满意度, 更新答案. 用平衡树+启发式合并, 时间复杂度为O(N log²N) ------------------- ...

  5. Android的回调

    学了两三周的安卓了,最先开始是看mars老师的视频,看了一两天结合慕课网上的一些安卓视频,到现在算是有点入门了. 安卓立用得比较多的回调函数有点不明是怎么实现的,网上找了一些资料,结合自己的实践,总算 ...

  6. activity_main.xml

    activity_main.xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android ...

  7. Python之路Day8

    摘要: Socket编程 异常处理 线程.进程 1.socket编程 1.1 socket 三次握手,注意阻塞的应用. 1.2 socketserver(2.x写作:SocketServer) 实现多 ...

  8. 将时间显示为“刚刚”“n分钟/小时前”等

    在很多场合为了显示出信息的及时性,一般会将时间显示成“刚刚”,“5分钟前”,“3小时前”等,而不是直接将时间打印出来.比如微博,SNS类应用就最长用到这个功能.而一般存储在数据库中的时间格式为 Uni ...

  9. Chapter 2.策略模式

    首先贴一段代码: package xiao; import java.util.Scanner; class CashSuper{    private int num;    private dou ...

  10. 基于visual Studio2013解决算法导论之051区间树

     题目 区间树 解决代码及点评 #include <stdio.h> #include <string.h> #include <iostream> #def ...