下放默认路由:
[R3]ip route-static 0.0.0.0 0.0.0.0 NULL 0
[R3]rip 1
[R3-rip-1]default-route originate cost 5 修改下放缺省路由的度量值为5
[R3]dis ip routing-table protocol rip
路由引入:
[R3]ip route-static 123.1.1.0 24 NULL 0
[R3]rip 1
[R3-rip-1]import-route static cost 8 引入前修改度量值为8
路由过滤:
R1入接口配置:
[R1]acl basic 2000
[R1-acl-ipv4-basic-2000]rule deny source 3.3.3.1 0
[R1-acl-ipv4-basic-2000]rule deny source 3.3.3.2 0
[R1-acl-ipv4-basic-2000]rule permit source any
[R1-rip-1]filter-policy 2000 import Vlan-interface 12 指定过滤接口
R2出接口配置:
[R2]acl basic 2000
[R2-acl-ipv4-basic-2000]rule deny source 3.3.3.1 0
[R2-acl-ipv4-basic-2000]rule deny source 3.3.3.2 0
[R2-acl-ipv4-basic-2000]rule permit source any
[R2]rip 1
[R2-rip-1]filter-policy 2000 export Vlan-interface 12
认证:
[R1]int vlan 12
[R1-Vlan-interface12]rip authentication-mode md5 rfc2082 plain 123456 1 (1为钥匙链)
需要两端都配置
被动接口:
[R1]rip 1
[R1-rip-1]silent-interface LoopBack 1
[R1-rip-1]silent-interface LoopBack 2
[R1-rip-1]silent-interface LoopBack 3
[R1-rip-1]silent-interface LoopBack 4
路由聚合:
[R3]int vlan 23
[R3-Vlan-interface23]rip summary-address 3.3.3.0 24
RIP与BFD的联动 :
echo单跳检测:(R1配置)
[R1]bfd session init-mode active
[R1]bfd echo-source-ip 8.8.8.8 单向检测需要指定源,地址可以随意
[R1]int vlan 12
[R1-Vlan-interface12]rip bfd enable
[R1-Vlan-interface12]bfd min-receive-interval 500
[R1-Vlan-interface12]bfd min-transmit-interval 500
[R1-Vlan-interface12]bfd detect-multiplier 3
双向检测:(R1-R3配置)
R1配置:
[R1]bfd session init-mode active
[R1]rip 1
[R1-rip-1]peer 23.1.1.3
[R1-rip-1]undo validate-source-address
[R1-rip-1]int vlan 12
[R1-Vlan-interface12]rip bfd enable 必须BFD开启功能
[R1-Vlan-interface12]bfd min-receive-interval 500
[R1-Vlan-interface12]bfd min-transmit-interval 500
[R1-Vlan-interface12]bfd detect-multiplier 3
[R1]ip route-static 23.1.1.3 32 Vlan-interface 12 12.1.1.1
R3配置:
[R3]bfd session init-mode active
[R3]rip
[R3-rip-1]peer 12.1.1.1
[R3-rip-1]undo validate-source-address
[R3-rip-1]int vlan 23
[R3-Vlan-interface23]rip bfd enable
[R3-Vlan-interface23]bfd min-receive-interval 500
[R3-Vlan-interface23]bfd min-transmit-interval 500
[R3-Vlan-interface23]bfd detect-multiplier 3
[R3]ip route-static 12.1.1.1 32 Vlan-interface 23 23.1.1.2
RIP水平分割:
[R1]int vlan 12
[R1-Vlan-interface12]rip split-horizon
接收路由是增加路由权值:
[R1]int vlan 12
[R1-Vlan-interface12]rip metricin 5 增加5跳
修改优先级:
[R1]rip 1
[R1-rip-1]preference 101
缺省情况下,RIP的优先级为100
修改RIP的计时器:
[R1]rip 1
[R1-rip-1]timers update 20 timeout 120
缺省情况下,Period update定时器是30秒,Timeout定时器是180秒,Garbage-collection定时器则是Period update定时器的4倍,即120秒
查看所有的RIP信息:
[R1]dis rip
以上拓扑见QQ收藏