细初版OSPF实验Word文件下载.docx

上传人:b****1 文档编号:887665 上传时间:2023-04-29 格式:DOCX 页数:76 大小:107.41KB
下载 相关 举报
细初版OSPF实验Word文件下载.docx_第1页
第1页 / 共76页
细初版OSPF实验Word文件下载.docx_第2页
第2页 / 共76页
细初版OSPF实验Word文件下载.docx_第3页
第3页 / 共76页
细初版OSPF实验Word文件下载.docx_第4页
第4页 / 共76页
细初版OSPF实验Word文件下载.docx_第5页
第5页 / 共76页
细初版OSPF实验Word文件下载.docx_第6页
第6页 / 共76页
细初版OSPF实验Word文件下载.docx_第7页
第7页 / 共76页
细初版OSPF实验Word文件下载.docx_第8页
第8页 / 共76页
细初版OSPF实验Word文件下载.docx_第9页
第9页 / 共76页
细初版OSPF实验Word文件下载.docx_第10页
第10页 / 共76页
细初版OSPF实验Word文件下载.docx_第11页
第11页 / 共76页
细初版OSPF实验Word文件下载.docx_第12页
第12页 / 共76页
细初版OSPF实验Word文件下载.docx_第13页
第13页 / 共76页
细初版OSPF实验Word文件下载.docx_第14页
第14页 / 共76页
细初版OSPF实验Word文件下载.docx_第15页
第15页 / 共76页
细初版OSPF实验Word文件下载.docx_第16页
第16页 / 共76页
细初版OSPF实验Word文件下载.docx_第17页
第17页 / 共76页
细初版OSPF实验Word文件下载.docx_第18页
第18页 / 共76页
细初版OSPF实验Word文件下载.docx_第19页
第19页 / 共76页
细初版OSPF实验Word文件下载.docx_第20页
第20页 / 共76页
亲,该文档总共76页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

细初版OSPF实验Word文件下载.docx

《细初版OSPF实验Word文件下载.docx》由会员分享,可在线阅读,更多相关《细初版OSPF实验Word文件下载.docx(76页珍藏版)》请在冰点文库上搜索。

细初版OSPF实验Word文件下载.docx

Router>

en

Router#conft

Enterconfigurationcommands,oneperline.EndwithCNTL/Z.

Router(config)#noipdomain-lookup

Router(config)#hostR1

R1(config)#intf0/0

R1(config-if)#ipaddress10.1.1.1255.255.255.0

R1(config-if)#nosh

R1(config-if)#exit

R1(config)#intloopback0

R1(config-if)#ipaddress1.1.1.1255.255.255.0

R1(config)#routerospf1

R1(config-router)#network10.1.1.00.0.0.255a

R1(config-router)#network10.1.1.00.0.0.255area0

R1(config-router)#network1.1.1.00.0.0.255area0

R1(config-router)#exit

R2配置:

Router(config)#hostR2

R2(config)#intf0/0

R2(config-if)#ipaddress10.1.1.2255.255.255.0

R2(config-if)#nosh

R2(config-if)#exit

R2(config)#ints1/0

R2(config-if)#ipaddress10.1.2.1255.255.255.0

R2(config)#intlo0

R2(config-if)#ipaddress2.2.2.2255.255.255.0

R2(config)#routerospf1

R2(config-router)#network10.1.1.00.0.0.255a0

R2(config-router)#network10.1.2.00.0.0.255a0

R2(config-router)#network2.2.2.00.0.0.255a0

R2(config-router)#exit

R3配置:

Router(config)#noipdomain-lo

Router(config)#hostR3

R3(config)#ints1/0

R3(config-if)#ipaddress10.1.2.2255.255.255.0

R3(config-if)#nosh

R3(config-if)#exit

R3(config)#intlo0

R3(config-if)#ipaddress3.3.3.3255.255.255.0

R3(config)#routerospf1

R3(config-router)#network10.1.2.00.0.0.255a0

R3(config-router)#network3.3.3.00.0.0.255a0

R3(config-router)#exit

通过showipprotocol、showiprouterospf、showipospfinterface、showipospf等命令查看配置信息。

R1#showipprotocols

RoutingProtocolis"

ospf1"

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

RouterID1.1.1.1

Numberofareasinthisrouteris1.1normal0stub0nssa

Maximumpath:

4

RoutingforNetworks:

1.1.1.00.0.0.255area0

10.1.1.00.0.0.255area0

Referencebandwidthunitis100mbps

RoutingInformationSources:

GatewayDistanceLastUpdate

3.3.3.311000:

02:

36

2.2.2.211000:

Distance:

(defaultis110)

通过这个命令可以看到路由器配置的路由信息,这里可以看到配置的是ospf,并且进程ID是1。

而ospf的RID是1.1.1.1。

通过ospf通过的网络分别是1.1.1.0/24和10.1.1.0/24。

R1#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

1.0.0.0/24issubnetted,1subnets

C1.1.1.0isdirectlyconnected,Loopback0

2.0.0.0/32issubnetted,1subnets

O2.2.2.2[110/2]via10.1.1.2,00:

05:

19,FastEthernet0/0

3.0.0.0/32issubnetted,1subnets

O3.3.3.3[110/66]via10.1.1.2,00:

10.0.0.0/24issubnetted,2subnets

O10.1.2.0[110/65]via10.1.1.2,00:

C10.1.1.0isdirectlyconnected,FastEthernet0/0

在R1上查看路由表,可以发现有三条的通过OSPF学到的路由,它们的AD都是110,metric分别是2、66、65。

主要因为2.2.2.2和3.3.3.3是stub路由,所以metric为1,以太网链路的metric是1,而专线的metric是64。

R1#showipospfneighbor

NeighborIDPriStateDeadTimeAddressInterface

2.2.2.21FULL/BDR00:

00:

3710.1.1.2FastEthernet0/0

R2#showipospfneighbor

3.3.3.30FULL/-00:

3210.1.2.2Serial1/0

1.1.1.11FULL/DR00:

3810.1.1.1FastEthernet0/0

R3#showipospfneighbor

2.2.2.20FULL/-00:

3410.1.2.1Serial1/0

分别在R1、R2、R3使用showipospfneighbor这条命令,其中R1和R3有一个邻居,R2有两个邻居。

R1和R2因为是以太网链路,所以要选举DR和BDR,一般来说RID大的为DR,但由于R1比R2先启用OSPF的协议,所以成为了DR。

而R3和R2是点对点链路,不需要选举DR和BDR。

R1#showipospf

RoutingProcess"

withID1.1.1.1

Starttime:

00:

07:

36.520,Timeelapsed:

19:

06.080

SupportsonlysingleTOS(TOS0)routes

SupportsopaqueLSA

SupportsLink-localSignaling(LLS)

Supportsareatransitcapability

Routerisnotoriginatingrouter-LSAswithmaximummetric

InitialSPFscheduledelay5000msecs

MinimumholdtimebetweentwoconsecutiveSPFs10000msecs

MaximumwaittimebetweentwoconsecutiveSPFs10000msecs

Incremental-SPFdisabled

MinimumLSAinterval5secs

MinimumLSAarrival1000msecs

LSAgrouppacingtimer240secs

Interfacefloodpacingtimer33msecs

Retransmissionpacingtimer66msecs

NumberofexternalLSA0.ChecksumSum0x000000

NumberofopaqueASLSA0.ChecksumSum0x000000

NumberofDCbitlessexternalandopaqueASLSA0

NumberofDoNotAgeexternalandopaqueASLSA0

Numberofareastransitcapableis0

Externalfloodlistlength0

IETFNSFhelpersupportenabled

CiscoNSFhelpersupportenabled

AreaBACKBONE(0)

Numberofinterfacesinthisareais2(1loopback)

Areahasnoauthentication

SPFalgorithmlastexecuted00:

14:

14.748ago

SPFalgorithmexecuted6times

Arearangesare

NumberofLSA4.ChecksumSum0x02B6CC

NumberofopaquelinkLSA0.ChecksumSum0x000000

NumberofDCbitlessLSA0

NumberofindicationLSA0

NumberofDoNotAgeLSA0

Floodlistlength0

通过showipospf这个命令可以看到一些关于OSPF的信息。

R2#showipospfneighbordetail

Neighbor3.3.3.3,interfaceaddress10.1.2.2

Inthearea0viainterfaceSerial1/0

Neighborpriorityis0,StateisFULL,6statechanges

DRis0.0.0.0BDRis0.0.0.0

Optionsis0x52

LLSOptionsis0x1(LR)

Deadtimerduein00:

31

Neighborisupfor00:

16:

51

Index2/2,retransmissionqueuelength0,numberofretransmission1

First0x0(0)/0x0(0)Next0x0(0)/0x0(0)

Lastretransmissionscanlengthis1,maximumis1

Lastretransmissionscantimeis0msec,maximumis0msec

Neighbor1.1.1.1,interfaceaddress10.1.1.1

Inthearea0viainterfaceFastEthernet0/0

Neighborpriorityis1,StateisFULL,6statechanges

DRis10.1.1.1BDRis10.1.1.2

37

18:

52

Index1/1,retransmissionqueuelength0,numberofretransmission0

Lastretransmissionscanlengthis0,maximumis0

Lastretransmissionscantimeis0msec,maximumis0msec

通过showipospfneighbordetail显示一个邻居列表,包括它们的OSPF路由器ID,OSPF优先级,邻接关系(如init、预启动、完全连接等)及失效定时器。

另外可以在路由模式下通过router-idA.B.C.D这个命令来设置RID,不过工程上一般上配置使用loopback接口的地址作为RID。

2、验证性实验

2.1、邻居状态验证

2.1.1、OSPF邻居状态(init)

拓扑如下图所示:

图二

OSPF的基本配置参考第1部分。

首先不使用acl对数据包进行控制。

两个路由器的配置如下

R1:

interfaceLoopback0

ipaddress1.1.1.1255.255.255.0

!

interfaceSerial1/0

ipaddress10.1.1.1255.255.255.0

serialrestart-delay0

routerospf1

log-adjacency-changes

network1.1.1.00.0.0.255area0

network10.1.1.00.0.0.255area0

R2:

ipaddress2.2.2.2255.255.255.0

ipaddress10.1.1.2255.255.255.0

network2.2.2.00.0.0.255area0

通过命令查看邻居情况

R1#shipospfneighbor

3110.1.1.2Serial1/0

R2#shipospfneighbor

1.1.1.10FULL/-00:

3510.1.1.1Serial1/0

可以看到两个路由器已经形成了邻居。

这时通过ACL对通过路由器的数据包进行控制,配置如下:

R1#conft

R1(config)#access-list1permit2.2.2.2

R1(config)#ints1/0

R1(config-if)#ipaccess-group1in

这时再通过命令来查看邻接信息

R1#

1.1.1.10INIT/-00:

3110.1.1.1Serial1/0

在R1里没有发现邻居信息。

而在R2上虽然可以看到R1但R1处于初始化的状态,这样是不能形成邻接关系的,也不能交换各自的路由信息。

这主要是因为R1上的ACL挡住了来自R2的Hello包,所以R1不能与R2形成邻居,而R2虽然收到R1的Hello,并发出了带R1的Hello包,但R1不收。

2.1.2、OSPF邻居状态(two-way)

实验拓扑如下图所示:

图三

这个实验与2.1.1不同的是中间连接的链路变成了以太网。

也就是所在two-way状态之后必须要选举DR和BDR。

实验的基本配置:

interfaceFastEthernet0/0

ipospfpriority0

duplexauto

speedauto

可以看到,这里更改了ospf接口的优先级,把两个路由器相连的接口都改为0了。

然后再查看ospf的邻居表。

2.2.2.202WAY/DROTHER00:

3210.1.1.2FastEthernet0/0

1.1.1.102WAY/DROTHER00:

3110.1.1.1FastEthernet0/0

可以看到,他们之间能成为two-way状态,并且由于不存在选举为DR和BDR的条件,所以停留在了two-way状态,而且都为DROTHER。

2.1.3、OSPF邻居状态(Exstart)

首先在2.1.2的基础上把两个接口的优先级改为默认值。

然后在R1的接口上修改MTU。

配置如下:

interfaceL

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2