HCIEv3.0考试实战BFD和OSPF协议联动案例-乾颐堂安德
OSPF试学视频及PDF文档可联系网站客服获取 点击联系客服
OSPF协议是当下企业网络中最为常见的动态路由协议,由于协议自身的缘故(比如OSPF的Hello时间,死亡时间等的最小值都为秒级),其发现网络故障的时间较长。当BFD和OSPF协议联动的时候,就可以将BFD对链路故障的快速感应通知OSPF,使得OSPF协议对网络拓扑变化的响应时间提缩短到毫秒级。
请使用图7-9,通过如下实施,来理解BFD和OSPF的联动
步骤1.创建ospf邻居,SW1到2.2.2.2的数据通信通过OSPF路由方式作出决策
[SW2-Vlanif10]ospf //启动OSPF协议
[SW2-ospf-1]area 0 //创建区域0
[SW2-ospf-1-area-0.0.0.0]int loo0
[SW2-LoopBack0]ospf enable area 0 //环回接口启动OSPF协议,并把该接口的网络通告到OSPF协议
[SW2-LoopBack0]int vlan 10
[SW2-Vlanif10]ospf enable area 0
!
[SW1]ospf
[SW1-ospf-1]area 0
[SW1-ospf-1-area-0.0.0.0]int vlan 10
[SW1-Vlanif10]ospf enable area 0
[SW1]display ip routing-table protocol ospf //验证通过OSPF学习到的路由,该结果的前提是设备之间已经建立了OSPF邻居,此处SW1已经学习到SW2的环回接口的路由
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 1 Routes : 1
OSPF routing table status : <Active>
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.2/32 OSPF 10 1 D 10.1.12.2 Vlanif10
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
2.BFD和OSPF联动以及调整BFD参数
[SW1]undo bfd ender //设备上拿掉之前的手工指定BFD标识符会话
[SW2]undo bfd ender
[SW1-ospf-1]bfd all-interfaces enable //在ospf进程下,使得BFD和ospf联动开启
[SW2-ospf-1]bfd all-interfaces enable
Feb 22 2019 16:49:49-08:00 SW2 %%01BFD/4/STACHG_TOUP(l)[13]:BFD session changed to Up. (SlotNumber=0, Discriminator=8192, FormerStatus=Init, Applications=OSPF, BindInterfaceName=Vlanif10, ProcessPST=False)
验证BFD会话
[SW2]display bfd session all //动态创建的标识符BFD会话已经建立成功,UP代表会话建立成功
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
8192 8192 10.1.12.1 Up D_IP_IF Vlanif10
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
[SW1]display bfd session all
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
8192 8192 10.1.12.2 Up D_IP_IF Vlanif10
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
调整BFD发送和接收控制信令的时间到系统最小值100毫秒,以及调整检测倍数为4(默认3倍间隔)
[SW1]interface Vlanif 10
[SW1-Vlanif10]ospf bfd enable //接口开启
[SW1-Vlanif10]ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
!
[SW2]interface Vlanif 10
[SW2-Vlanif10]ospf bfd enable
[SW2-Vlanif10]ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
验证BFD详细信息
[SW2]display bfd session all verbose -------------------------------------------------------------------------------- Session MIndex : 259 (One Hop) State : Up Name : dyn_8193 -------------------------------------------------------------------------------- Local Discriminator : 8193 Remote Discriminator : 8193 //本地和远程标识符为自动生成模式 Session Detect Mode : Asynchronous Mode Without Echo Function BFD Bind Type : Interface(Vlanif10) Bind Session Type : Dynamic Bind Peer IP Address : 10.1.12.1 //BFD会话源地址 NextHop Ip Address : 10.1.12.1 Bind Interface : Vlanif10 FSM Board Id : 0 TOS-EXP : 7 Min Tx Interval (ms) : 100 //BFD信令发送间隔为调整后的100毫秒 Min Rx Interval (ms) : 100 //BFD信令接收间隔为调整后的100毫秒 Actual Tx Interval (ms): 100 Actual Rx Interval (ms): 100 Local Detect Multi : 4 //4倍检测时间而非默认3倍 Detect Interval (ms) : 400 Echo Passive : Disable Acl Number : - Destination Port : 3784 TTL : 255 Proc Interface Status : Disable WTR Interval (ms) : - Active Multi : 4 Last Local Diagnostic : No Diagnostic Bind Application : OSPF Session TX TmrID : 1069 Session Detect TmrID : 1070 Session Init TmrID : - Session WTR TmrID : - Session Echo Tx TmrID : - PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0 Session Description : - --------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0 |
关闭接口模拟BFD联动OSPF故障
[SW2]interface Vlanif 10
[SW2-Vlanif10]shutdown //关闭SW1的直连接口
[SW1]ping -c 1000 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=11 ttl=255 time=30 ms
Feb 22 2019 17:07:00-08:00 SW1 %%01BFD/4/STACHG_TODWN(l)[9]:BFD session changed to Down. (SlotNumber=0, Discriminator=8192, Diagnostic=DetectDown, Applications=OSPF, ProcessPST=False, BindInterfaceName=Vlanif10, InterfacePhysicalState=Up, InterfaceProtocolState=Up) //BFD会话急速DOWN掉,也会导致OSPF邻居马上失效而不会等待OSPF的死亡时间(默认40秒)
Feb 22 2019 17:07:00-08:00 SW1 %%01OSPF/3/NBR_CHG_DOWN(l)[10]:Neighbor event:neighbor state changed to Down. (ProcessId=1, NeighborAddress=10.1.12.2, NeighborEvent=KillNbr, NeighborPreviousState=Full, NeighborCurrentState=Down)
Feb 22 2019 17:07:00-08:00 SW1 %%01OSPF/3/NBR_DOWN_REASON(l)[11]:Neighbor state leaves full or changed to Down. (ProcessId=1, NeighborRouterId=10.1.12.2, NeighborAreaId=0, NeighborInterface=Vlanif10,NeighborDownImmediate reason=Neighbor Down Due to Kill Neighbor, NeighborDownPrimeReason=BFD Session Down, NeighborChangeTime=2019-02-22 17:07:00-08:00)
Request time out //发送的ICMP数据也会超时
Request time out
BFD和OSPF联动实施完毕
OSPF试学视频及PDF文档可联系网站客服获取 点击联系客服
华为HCIE培训咨询可联系乾颐堂官网客服.
咨询QQ及电话:4006188070
乾颐堂官网:www.qytang.com
乾颐堂网络实验室 我们为您想的更多
姓名:
Q Q:
电话:
|