您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > HCDP实验BFD检测动态路由协议(OSPFBGP)
一、实验拓扑和上个实验《使用BFD备份静态路由》的拓扑一样,编址一样。二、基础配置R1的基础配置#sysnameAR1#interfaceVlanif1ipaddress192.168.10.1255.255.255.0#interfaceGigabitEthernet0/0/0ipaddress12.1.1.1255.255.255.0ospfcost5#interfaceGigabitEthernet0/0/1ipaddress102.1.1.1255.255.255.0#interfaceLoopBack0ipaddress1.1.1.1255.255.255.255#bgp100peer2.2.2.2as-number100peer2.2.2.2connect-interfaceLoopBack0#ipv4-familyunicastundosynchronizationnetwork192.168.10.0peer2.2.2.2enable#ospf1router-id1.1.1.1area0.0.0.0network1.1.1.10.0.0.0network12.1.1.10.0.0.0network102.1.1.10.0.0.0#R2的基础配置#sysnameAR2#interfaceVlanif1ipaddress192.168.20.1255.255.255.0#interfaceGigabitEthernet0/0/0ipaddress12.1.1.2255.255.255.0ospfcost5#interfaceGigabitEthernet0/0/1ipaddress102.1.1.2255.255.255.0#interfaceLoopBack0ipaddress2.2.2.2255.255.255.255#bgp100peer1.1.1.1as-number100peer1.1.1.1connect-interfaceLoopBack0#ipv4-familyunicastundosynchronizationnetwork192.168.20.0peer1.1.1.1enable#ospf1router-id2.2.2.2area0.0.0.0network2.2.2.20.0.0.0network12.1.1.20.0.0.0network102.1.1.20.0.0.0#三、观查现况(未使能BFD)在PC上发50个ping包,并同时中断HUB2和HUB3之间的链路,观察OSPF和BGP的收敛,及PC的丢包PCping192.168.20.20-c50Ping192.168.20.20:32databytes,PressCtrl_CtobreakFrom192.168.20.20:bytes=32seq=1ttl=126time=16msFrom192.168.20.20:bytes=32seq=2ttl=126time=16msFrom192.168.20.20:bytes=32seq=3ttl=126time=16msFrom192.168.20.20:bytes=32seq=4ttl=126time=31msFrom192.168.20.20:bytes=32seq=5ttl=126time=16msRequesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!Requesttimeout!From192.168.20.20:bytes=32seq=25ttl=126time=15msFrom192.168.20.20:bytes=32seq=26ttl=126time=15msFrom192.168.20.20:bytes=32seq=27ttl=126time=31msFrom192.168.20.20:bytes=32seq=28ttl=126time=16ms---192.168.20.20pingstatistics---28packet(s)transmitted9packet(s)received67.86%packetlossround-tripmin/avg/max=15/19/31ms发现PC上发生40秒的丢包,大约20个包,很严重的问题,想想为什么?四、配置BFD进行故障收敛的加速R1的路由器配置(BGP的BFD可选,这里是展示命令)bfdquitospf1bfdall-interfacesenablebfdall-interfacesmin-tx-interval500min-rx-interval500bgp100peer2.2.2.2bfdenableR2的路由器配置(BGP的BFD可选,这里是展示命令)bfdquitospf1bfdall-interfacesenablebfdall-interfacesmin-tx-interval500min-rx-interval500bgp100peer1.1.1.1bfdenable配置完成后检查BFD会话[AR1]disbfdsessionall--------------------------------------------------------------------------------LocalRemotePeerIpAddrStateTypeInterfaceName--------------------------------------------------------------------------------819281922.2.2.2UpD_IP_PEER-8193819312.1.1.2UpD_IP_IFGigabitEthernet0/0/081948194102.1.1.2UpD_IP_IFGigabitEthernet0/0/1--------------------------------------------------------------------------------TotalUP/DOWNSessionNumber:3/0五、重新测试路由收敛速度重新在PC上发起ping包,再次中断Hub2和Hub3的连线(先要连好等路由计算正确),测试丢包及收敛速度PCping192.168.20.20-c50Ping192.168.20.20:32databytes,PressCtrl_CtobreakFrom192.168.20.20:bytes=32seq=1ttl=126time=16msFrom192.168.20.20:bytes=32seq=2ttl=126time=16msFrom192.168.20.20:bytes=32seq=3ttl=126time=16msFrom192.168.20.20:bytes=32seq=4ttl=126time=16msRequesttimeout!From192.168.20.20:bytes=32seq=6ttl=126time=16msFrom192.168.20.20:bytes=32seq=7ttl=126time=16msFrom192.168.20.20:bytes=32seq=8ttl=126time=16msFrom192.168.20.20:bytes=32seq=9ttl=126time=16msFrom192.168.20.20:bytes=32seq=10ttl=126time=15msFrom192.168.20.20:bytes=32seq=11ttl=126time=31msFrom192.168.20.20:bytes=32seq=12ttl=126time=16msFrom192.168.20.20:bytes=32seq=13ttl=126time=15msFrom192.168.20.20:bytes=32seq=14ttl=126time=31msFrom192.168.20.20:bytes=32seq=15ttl=126time=16ms---192.168.20.20pingstatistics---15packet(s)transmitted14packet(s)received6.67%packetlossround-tripmin/avg/max=15/18/31ms此次丢包是1个,故障收敛速度是1.5秒,因为我配置BFD的min-tx-interval500毫秒,默认是三倍的等待时间。如果配置更少如20毫秒,可以实现60毫秒的故障收敛,真机可以试着改下,模拟机如果这样配置出导致BFD会话down掉,因为模拟器模拟的路由器没有这样快的发包能力,你可以改成200毫秒试试。六、附件里是拓扑,建议你试一试
本文标题:HCDP实验BFD检测动态路由协议(OSPFBGP)
链接地址:https://www.777doc.com/doc-2875886 .html