




免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
今天花了一天时间把ospf的基本命令都总结了.绝对心血啊.OSPF配置命令Router(config)#router ospf 10进程号只在本地有效Router(config)#network 192.168.10.0 0.0.0.255 area 0正反掩码均可Show ip protocolsShow ip route 查看路由表Show ip route ospf 查看路由表中的OSPF路由项Show ip ospf neighbors detail显示OSPF邻居Show ip ospf 显示OSPF路由器的各项信息Show ip ospf interface f0/1 brief 显示接口的OSPF信息Show ip ospf database router显示各类LSAShow ip ospf database router 192.168.20.2Debug ip ospf adj 显示邻居关系的建立Show ip ospf border-routers可以看到ASBR和ABR,但不能看到自已的角色,只能看到其它路由器的角色Show ip ospf database-summary LSDB的汇总信息查看各类LSA的方法:Show ip ospf database router 查看一类LSA 域内Show ip ospf database network 查看二类LSAMA网络Show ip ospf database summary 查看三类LSA域间Show ip ospf database asbr-summary 查看四类LSAShow ip ospf database external 查看五类LSA域外Show ip ospf database nssa-external 查看七类LSA指定RID、修改路由器优先级、修改hello间隔、dead时间、接口带宽、ospf接口的cost值,修改cost计算公式的分子Router(config-router)#router-id 1.1.1.1 指定RIDRouter(config-if)#ip ospf priority 0-255 注意在接口下改Router(config-router)#clear ip ospf process重新启动OSPF路由选择进程,如果希望本路由器成为DR,则在更改优先级后用这一命令重新启动进程才能成为DRRouter(config-if)#ip ospf hello-interval 10Router(config-if)#ip ospf dead-interval 40默认是hello间隔的四倍Router(config-if)#bandwidth 5000 修改带宽,可通过修改带宽实现修改cost值的目的,这个属性是接口本身的属性。不起OSPF也能进行修改,且对其它路由进程同时产生效果Router(config-if)#ip ospf cost 30 直接修改本接口在OSPF中的cost值Router(config-router)#auto-cost reference-bandwidth 1000 修改COST计算公式的分子,单位是Mbps,即十的六次方路由汇总:Router(config-router)#area 0 range 172.16.32.0 255.255.254.0 域间汇总,area 0 是被汇总的区域,建议在本区域所有ABR上都做Router(config-router)#summary-address 10.0.0.0 255.0.0.0 域外汇总,在ASBR的进程中做下发默认路由:有两种方法Router(config)#ip route 0.0.0.0 0.0.0.0 serial 0Router(config-router)#default-information originate如果没有写默认路由,用下面这种:Router(config-router)#default-information originate always metric-type 1 metric 3 实际上这条命令也只能吸引路由,并不能指向一个网关,所以还是要配一个默认网关配置stub区域区域内的每台路由器都要打上命令Router(config-router)#area 2 stub 将area2配置为stub区域Router(config-router)#area 2 default-cost 5 将自动下发的默认路由的cost值改为5,默认情况下是1配置totally stub区域Router(config-router)#area 2 stub no-summary 只需在ABR上配配置NSSA区域Router(config-router)#area 2 nssaR2(config-router)#area 2 nssa default-information-originate 在ABR上做,会向nssa区域下发一条LSA7的默认路由R2(config-router)#area 2 default-cost 6(在ABR上做,改Seed Cost=6)R2(config-router)#area 2 nssa default-information-originate metric 6 metric-type 1Metric-type 1的作用是将N2类型的路由改为N1类型的路由R2(config-router)#area 2 nssa no-redistribution 在ABR上做,阻止ABR上所直连的其它外部区域的路由进入nssa区域R2(config-router)#area 2 nssa no-summary 把三类的LSA也干掉,同时也下发一条LSA3默认路由,并且会取代 default-information-originate所下发的N2的默认路由OSPF区域问题1)在ABR上起不同OSPF进程,进行OSPF之间的重分布。 例如:R3的s1口在area 1中,进程号是10,s0口在area 3中,进程号是20 Router ospf 10 router ospf 20 Redistribute ospf 20 subnets redistribute ospf 10 subnets2)tunnelInt tunnel 1 int tunnel 3Tunnel source s1 tunnel source s1Tunnel destination 13.1.1.3 tunnel destination 13.1.1.1Ip add 111.1.1.1 255.255.255.0 Ip add 111.1.1.3 255.255.255.0Router ospf 10 router ospf 10Net 111.1.1.0 0.0.0.255 area 0 net 111.1.1.0 0.0.0.255 area 03)虚链路:最简单的方法,只需在区域的两台边界路由器上配就可以了R3(config-router)#area 2 virtual-link 2.2.2.2(中转区域)(对方Router-ID)远离Area0 / 分隔的Area 0R2#show ip ospf virtual-linksOSPF的认证Link:同一链路上的路由器之间,在接口下做R1(config-router)#int s1R1(config-if)#ip ospf authentication-key wolf(配明文密码)R1(config-if)#ip ospf authentication (启动明文认证)R1(config-if)#ip ospf message-digest-key 1 md5 wolf(配密文密码)R1(config-if)#ip ospf authentication message-digest-key(启动密文认证)Area:接口下配密码,进程下调用R1(config-router)#int s0R2(config-if)#ip ospf message-digest-key 1 md5 wolf(配密文密码)R2(config-router)#area 0 authentication Message-digest (启动密文认证)区域内的所有路由器都要认证。Virtual-Link:R2(config-router)#area 2 virtual-link 2.2.2.2 message-digest-key 1 md5 wolf(配密文密码)R2(config-router)#area 2 virtual-link 2.2.2.2 authentication message-digest(启动密文认证)如果Area0启动认证,在Virtual-Link上也要启动相应的认证。OSPF链路类型NON_BROADCAST3层是NBMA,2层是否让通过广播都无所谓。(FR map后加不加Broadcast皆可)在HUB端(R1)单播R1(config)#router os 110R1(config-router)#neighbor 145.1.1.4R1(config-router)#neighbor 145.1.1.5确保HUB成为DR,和Spoke交互路由信息。R1(config)#int s0R1(config-if)#ip ospf priority 2R4/R5(config-if)#ip ospf priority 0R4:O5.5.5.0 110/65 via 145.1.1.5, 00:00:07, Serial手工MAP(Spoke 端的互访)R4(config-if)#frame-relay map ip 145.1.1.5 401R5(config-if)#frame-relay map ip 145.1.1.4 501BROADCAST3层是BMA,2层也一定要让广播通过。(FR map后一定要加Broadcsat)R1(config-if)#fram ma ip 145.1.1.4 104 broadcastR1(config-if)#fram ma ip 145.1.1.5 105 broadcast确保HUB成为DR,和Spoke交互路由信息。R1(config)#int s0R1(config-if)#ip ospf priority 2R4/R5(config-if)#ip ospf priority 0R4:O5.5.5.0 110/65 via 145.1.1.5, 00:00:07, Serial手工MAPR4(config-if)#frame-relay map ip 145.1.1.5 401 broadcastR5(config-if)#frame-relay map ip 145.1.1.4 501 broadcastPOINT_TO_MULTIPOINTNON_BROADCAST cisco专有的3层是NBMA,2层是否让通过广播都无所谓。(FR map后加不加Broadcast皆可)在HUB端(R1)单播R1(config)#router os 110R1(config-router)#neighbor 145.1.1.4R1(config-router)#neighbor 145.1.1.5R4:O145.1.1.5/32 110/128 via 145.1.1.1, 00:00:24, Serial1产生/32主机路由,且下一跳指向HUB,所以不需手工MAP。这就是32位的好处。POINT_TO_MULTIPOINT 全自动,最好的3层是允许广播,2层也一定要让广播通过。(FR map后一定要加Broadcsat)R1#show ip os neighbor detailDR is 0.0.0.0 BDR is 0.0.0.0P2P/P2MP/P2MP NBMA都不需要选举DR/BDR,所以DR is 0.0.0.0 BDR is 0.0.0.0POINT_TO_POINT(做不同网段)HUB端起2个P2P子接口:inter
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论