GLBP配置案例

拓扑结构:
Gateway Load Balancing Protocol(网关负载均衡协议)
在这里插入图片描述
在这里插入图片描述案例配置需求
1、 根据拓扑配置IP;
2、 R1、R2、R3之间运行OSPF;
3、 配置GLBP使得PC1和PC2访问11.11.11.11时在R2和R3上轮询;
4、 配置使得R2进行GLBP的虚拟MAC分发,R2和R3进行数据转发;
5、 在R2上配置,当R2的F0/0 down的时候,R2不能再进行数据转发;

案例配置思路

1.根据拓扑配置IP地址,并模拟PC
no ip routing
ip default-gateway 192.168.1.254
2.配置OSPF协议
R1#show run | s ospf
router ospf 100
router-id 91.1.1.1
log-adjacency-changes
network 11.11.11.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0

R2#show run | s ospf
router ospf 100
router-id 92.2.2.2
log-adjacency-changes
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0

R3#show run | s ospf
router ospf 100
router-id 93.3.3.3
log-adjacency-changes
network 192.168.1.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0

3.在R2上配置GLBP
glbp 1 ip 192.168.1.254 /设置GLBP虚拟IP/
glbp 1 priority 110 /设置GLBP优先级(用于AVG选举)/
glbp 1 preempt /开启GLBP抢占
glbp 1 weighting track 1 decrement 100
/设置GLBP track惩罚weight(用于AVF选举)/

4.在R3上配置HSRP
interface FastEthernet 0/1
glbp 1 ip 192.168.1.254
glbp 1 preempt

案例检验结果
1、 配置完成后,在R2上查看GLBP简单状态:
在这里插入图片描述2、 配置完成后,在R2上查看GLBP详细信息:
R2#show glbp
FastEthernet0/1 - Group 1
State is Active
1 state change, last state change 00:04:02
Virtual IP address is 192.168.1.254
Hello time 3 sec, hold time 10 sec

Next hello sent in 2.400 secs
Redirect time 600 sec, forwarder timeout 14400 sec
Preemption enabled, min delay 0 sec
Active is local
Standby is 192.168.1.252, priority 100 (expires in 7.296 sec)
Priority 110 (configured)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Track object 1 undefined
Load balancing: round-robin
Group members:
ca02.4b78.0006 (192.168.1.253) local
ca03.0efc.0006 (192.168.1.252)

There are 2 forwarders (1 active)
Forwarder 1
State is Active
1 state change, last state change 00:03:51
MAC address is 0007.b400.0101 (default)
Owner ID is ca02.4b78.0006
Redirection enabled
Preemption enabled, min delay 30 sec
Active is local, weighting 100
Forwarder 2
State is Listen
MAC address is 0007.b400.0102 (learnt)
Owner ID is ca03.0efc.0006
Redirection enabled, 598.432 sec remaining (maximum 600 sec)
Time to live: 14398.432 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.1.252 (primary), weighting 100 (expires in 9.760 sec)
3、 当R2的F0/0口down了之后,在MSW1上查看GLBP简单信息:
在这里插入图片描述
案例总结及其他
1、 GLBP用于第一跳备份,能为终端设备提供负载均衡的网关;
2、 在GLBP中有AVG和AVF两个特殊身份;
3、 AVG用于管理和分发虚拟MAC,AVF用于转发数据,AVG和AVF可以是同一设备;
4、 默认情况下,GLBP的AVG设备每3秒发送一个hello包;
5、 当AVF设备超过10秒没有接受到Hello包时,会抢占AVG状态,可以设置延迟;
6、 AVG根据优先级priority选举,越大越优先;
7、 AVF根据weight选举,越大越优先,最多可以有4个AVF;
8、 当设备的weight=0时,设备永远不能成为AVF;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值