OSPF(OpenShortestPathFirst开放式最短路径优先)是一个内部网关协议(InteriorGatewayProtocol,简称IGP),用于在单一自治系统(autonomoussystem,AS)内决策路由。是对链路状态路由协议的一种实现,隶属内部网关协议(IGP),故运作于自治系统内部。本次实验主要讲述的是OSPF单区域内的配置,以及配置区域认证的简单模式
工具/原料
win7-64
eNSP
方法/步骤
1、搭建本次实验的拓扑结构三台路由器、一台交换机
2、配置设备的接口信息<R1>system-viewEntersystem咯悝滩镞view,returnuserviewwithCtrl+Z.惺绅寨瞀[R1]interfaceGigabitEthernet0/0/0[R1-GigabitEthernet0/0/0]ipaddress10.0.123.124[R1-GigabitEthernet0/0/0]quit[R1]interfaceLoopBack0[R1-LoopBack0]ipaddress10.0.1.124[R1-LoopBack0]quit<R2>system-viewEntersystemview,returnuserviewwithCtrl+Z.[R2]interfaceGigabitEthernet0/0/0[R2-GigabitEthernet0/0/0]ipaddress10.0.123.224[R2-GigabitEthernet0/0/0]quit[R2]interfaceLoopBack0[R2-LoopBack0]ipaddress10.0.2.224[R2-LoopBack0]quit<R3>system-viewEntersystemview,returnuserviewwithCtrl+Z.[R3]interfaceGigabitEthernet0/0/0[R3-GigabitEthernet0/0/0]ipaddress10.0.123.324[R3-GigabitEthernet0/0/0]quit[R3]interfaceLoopBack0[R3-LoopBack0]ipaddress10.0.3.324[R3-LoopBack0]quit
3、测试区域内的网络连通性<R1>ping-c110.0.123.2PING10.0.123.2:56databytes,pressCTRL_CtobreakReplyfrom10.0.123.2:bytes=56Sequence=1ttl=255time=70ms---10.0.123.2pingstatistics---1packet(s)transmitted1packet(s)received0.00%packetlossround-tripmin/avg/max=70/70/70ms<R1>ping-c110.0.123.3PING10.0.123.3:56databytes,pressCTRL_CtobreakReplyfrom10.0.123.3:bytes=56Sequence=1ttl=255time=50ms---10.0.123.3pingstatistics---1packet(s)transmitted1packet(s)received0.00%packetlossround-tripmin/avg/max=50/50/50ms
4、配置单区域的OSPF水貔藻疽,并同时配置区域认证[R1]ospf1router-id10.0.1.1[R1-ospf-1柯计瓤绘]area0[R1-ospf-1-area-0.0.0.0]network10.0.123.10.0.0.0[R1-ospf-1-area-0.0.0.0]network10.0.1.10.0.0.0[R1-ospf-1-area-0.0.0.0]authentication-modesimpleplainhuawei[R2]ospf1router-id10.0.2.2[R2-ospf-1]area0[R2-ospf-1-area-0.0.0.0]network10.0.123.20.0.0.0[R2-ospf-1-area-0.0.0.0]network10.0.2.20.0.0.0[R2-ospf-1-area-0.0.0.0]authentication-modesimpleplainhuawei[R3]ospf1router-id10.0.3.3[R3-ospf-1]area0[R3-ospf-1-area-0.0.0.0]network10.0.123.30.0.0.0[R3-ospf-1-area-0.0.0.0]network10.0.3.30.0.0.0[R3-ospf-1-area-0.0.0.0]authentication-modesimpleplainhuawei
5、查看配醅呓择锗置完成后的路由表<R1>disiprouRouteFlags:R-relay,D-downloadtofib--幻腾寂埒----------------------------------------------------------------------------RoutingTables:PublicDestinations:12Routes:12Destination/MaskProtoPreCostFlagsNextHopInterface10.0.1.0/24Direct00D10.0.1.1LoopBack010.0.1.1/32Direct00D127.0.0.1LoopBack010.0.1.255/32Direct00D127.0.0.1LoopBack010.0.2.2/32OSPF101D10.0.123.2GigabitEthernet0/0/010.0.3.3/32OSPF101D10.0.123.3GigabitEthernet0/0/010.0.123.0/24Direct00D10.0.123.1GigabitEthernet0/0/010.0.123.1/32Direct00D127.0.0.1GigabitEthernet0/0/010.0.123.255/32Direct00D127.0.0.1GigabitEthernet0/0/0127.0.0.0/8Direct00D127.0.0.1InLoopBack0127.0.0.1/32Direct00D127.0.0.1InLoopBack0127.255.255.255/32Direct00D127.0.0.1InLoopBack0255.255.255.255/32Direct00D127.0.0.1InLoopBack0
6、测试配置完成后的网络连通性<R1>ping-c110.0.2.2PING10.0.2.2:56databytes,pressCTRL_CtobreakReplyfrom10.0.2.2:bytes=56Sequence=1ttl=255time=70ms---10.0.2.2pingstatistics---1packet(s)transmitted1packet(s)received0.00%packetlossround-tripmin/avg/max=70/70/70ms<R1>ping-c110.0.3.3PING10.0.3.3:56databytes,pressCTRL_CtobreakReplyfrom10.0.3.3:bytes=56Sequence=1ttl=255time=40ms---10.0.3.3pingstatistics---1packet(s)transmitted1packet(s)received0.00%packetlossround-tripmin/avg/max=40/40/40ms
7、观察OSPF的生成情况配置的区域认证为简单认证,通过认证保证了区域内的设备通信