1Proxy arp
1)当三层设备收到arp包,如果不ARP自己的,但本身有去往目标IP的路由,就会代理响应。
    Proxy ARP is enabled 默认启用
2
    debug arp
    ping 12.1.1.1
ARP: sent req src 10.1.1.5 ca04.0c44.0000,
dst 12.1.1.1 0000.0000.0000 FastEthernet0/0
3)当外口断时发送ICMP重定向告诉R5可以走R4
ICMP: redirect sent to 10.1.1.5 for dest 12.1.1.1, use gw 10.1.1.4
 
4)当内口断掉,要等待ARP超时,ARP Timeout 04:00:00
2IRDP icmp ICMP Router Discovery Protocol
周期性通告网关的地址,客户选择优先高的网关
ip irdp
ip irdp multicast
ip irdp maxadvertinterval 4
ip irdp minadvertinterval 3
ip irdp holdtime 12
ip irdp preference 100
缺点:需要客户端支持
 
3HSRP 热备份路由协议
1)原理:网关之间虚拟一个路由器,网关协商1active 1standby,网络正常时,active管理
虚拟路由器,但active有故障,备份可以抢active.
HSRP MAC0000.0c07.ac01 --------0000.0ccisco-------07acHSRP--------011
v1:224.0.0.2 所有路由
v2:224.0.0.102 所有HSRP路由
2)HSRP状态
init:初始化
learn:学习虚拟IP
listen:监听是否有active router
--------------------以上都没有发hello------------------
speak 宣告自己的HSRP参数
standby:监听active hello 3.33发一次 10sec 没收到就判断主down
active:主要用于响应ARP请求,数据转发
3)HSRP选举依据
priority*IP
4)配置
R3(config-if)#standby 1 ip 10.1.1.10
*Mar 12 05:19:20.581: IP: s=1.1.1.2 (local), d=224.0.0.2 (FastEthernet0/0), len 48, sending broad/multicast
*Mar 12 05:19:20.785: IP: s=1.1.1.20 (FastEthernet0/0), d=224.0.0.2, len 48, rcvd 0
R3(config-if)#standby 1 track s1/1 30
R3(config-if)#standby 1 preempt delay minimum 1
R3(config-if)#standby 1 priority 109
R4(config-if)#standby 1 ip
R4(config-if)#standby 1 preempt 默认没有抢占,不配置delay,马上抢占
5)多组HSRP
1VLAN对应一个HSRP,最好是STP根网桥和active 要对应
只有一个VLAN,也可以虚拟二个组
 
4VRRP
1VRRPHSRP不同点
1VRRP标准化
2)虚拟IP是可以使用物理接口IP
3VRRP角色:master backup
4VRRP只有master发包,backup不发包
5master每个1sec 3sec 就超时
6VRRP track 的是一个对象
7)抢占默认就开
2)配置
R3(config-if)#vrrp 1 ip 10.1.1.10
R4(config-if)#vrrp 1 ip 10.1.1.10
R4#show vrrp
FastEthernet0/0 - Group 1
State is Master
Virtual IP address is 10.1.1.10
Virtual MAC address is 0000.5e00.0101
Advertisement interval is 1.000 sec
Preemption enabled 默认就开启
Priority is 100
Master Router is 10.1.1.4 (local), priority is 100
Master Advertisement interval is 1.000 sec
Master Down interval is 3.609 sec
 
R4(config)#track 1 interface s1/1    line-protocol
 
5GLBP
1GLBPHSRP/VRRP区别
HSRP/VRRP 使用多组进行load-balance 一个虚拟IP一个虚拟MAC
glbp 一组就可以load-balance一个虚拟IP多个虚拟MAC ,最多四个
2GLBP设备角色
1AVG:分配虚拟MAC及做ARP响应
2AVF:转发数据
3)操作过程
选举AVG---->AVGGLBP组员分配虚拟MAC--->GLBP组员会发送免费ARP刷新交换机MAC
--->AVG响应ARP请求,为不同的用户分配不同GLBP组员的MAC给用户
4)配置
 
5)GLBP问题
次佳路径问题
 
 
实验:VRRP
interface Vlan1
 ip address 10.1.1.3 255.255.255.0
 vrrp 1 ip 10.1.1.10
 vrrp 1 track 100
track 100 interface FastEthernet0/0 line-protocol
interface Vlan1
 ip address 10.1.1.4 255.255.255.0
 vrrp 1 ip 10.1.1.10
 vrrp 1 track 100 decrement 20
track 100 interface FastEthernet0/1 line-protocol
实验:GLBP
interface Vlan1
 ip address 10.1.1.3 255.255.255.0
 glbp 1 ip 10.1.1.10
!
interface Vlan1
 ip address 10.1.1.4 255.255.255.0
 glbp 1 ip 10.1.1.10
SW6(config)#int vlan 1
SW6(config-if)#ip add 10.1.1.6 255.255.255.0
SW6(config-if)#no sh
SW3#sh glbp brief
Interface   Grp Fwd Pri State    Address         Active router   Standby router
Vl1         1    -   100 Standby 10.1.1.10       10.1.1.4        local--------AVG
Vl1         1    1   -   Listen   0007.b400.0101 10.1.1.4        -
Vl1         1    2   -   Active   0007.b400.0102 local           -
SW4#sh glbp
Vlan1 - Group 1
 State is Active
    2 state changes, last state change 00:02:48
 Virtual IP address is 10.1.1.10
 Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.776 secs
 Redirect time 600 sec, forwarder time-out 14400 sec
 Preemption disabled
 Active is local
 Standby is 10.1.1.3, priority 100 (expires in 7.772 sec)
 Priority 100 (default)
 Weighting 100 (default 100), thresholds: lower 1, upper 100
 Load balancing: round-robin
 Group members:
    c202.01f0.0000 (10.1.1.3)
    c203.01f0.0000 (10.1.1.4) local
 There are 2 forwarders (1 active)
 Forwarder 1
    State is Active
      1 state change, last state change 00:02:38
    MAC address is 0007.b400.0101 (default)
    Owner ID is c203.01f0.0000
    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 c202.01f0.0000
    Redirection enabled, 598.304 sec remaining (maximum 600 sec)
    Time to live: 14398.308 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 10.1.1.3 (primary), weighting 100 (expires in 8.308 sec)
测试:SW6 ping 10.1.1.10------>sh arp----clear arp----sh arp
影响AVG选举
interface Vlan1
 ip address 10.1.1.3 255.255.255.0
 glbp 1 ip 10.1.1.10
 glbp 1 priority 110
 glbp 1 preempt
影响AVF操作--- 跟权重有关
 Weighting 100 (default 100), thresholds: lower 1, upper 100
最高是100,当低于1时不能再作为AVF 但当回到100又可以做AVF
SW3(config-if)#glbp 1 weighting 110 lower 85 upper 105
SW3(config-if)#glbp 1 load-balancing ?
 host-dependent 不同的源主机使用不同AVF
 round-robin     轮询
 weighted        跟权重