cisco ospf命令总结.docx

上传人:牧羊曲112 文档编号:3154759 上传时间:2023-03-11 格式:DOCX 页数:6 大小:38.78KB
返回 下载 相关 举报
cisco ospf命令总结.docx_第1页
第1页 / 共6页
cisco ospf命令总结.docx_第2页
第2页 / 共6页
cisco ospf命令总结.docx_第3页
第3页 / 共6页
cisco ospf命令总结.docx_第4页
第4页 / 共6页
cisco ospf命令总结.docx_第5页
第5页 / 共6页
亲,该文档总共6页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《cisco ospf命令总结.docx》由会员分享,可在线阅读,更多相关《cisco ospf命令总结.docx(6页珍藏版)》请在三一办公上搜索。

1、cisco ospf命令总结今天花了一天时间把ospf的基本命令都总结了.绝对心血啊. OSPF配置命令 Router(config)#router ospf 10 进程号只在本地有效 Router(config)#network 192.168.10.0 0.0.0.255 area 0 正反掩码均可 Show ip protocols Show ip route 查看路由表 Show ip route ospf 查看路由表中的OSPF路由项 Show ip ospf neighbors detail 显示OSPF邻居 Show ip ospf 显示OSPF路由器的各项信息 Show ip

2、ospf interface f0/1 brief 显示接口的OSPF信息 Show ip ospf database router 显示各类LSA Show ip ospf database router 192.168.20.2 Debug ip ospf adj 显示邻居关系的建立 Show ip ospf border-routers 可以看到ASBR和ABR,但不能看到自已的角色,只能看到其它路由器的角色 Show ip ospf database-summary LSDB的汇总信息 查看各类LSA的方法: Show ip ospf database router 查看一类LSA 域

3、内 Show ip ospf database network 查看二类LSA MA网络 Show ip ospf database summary 查看三类LSA 域间 Show ip ospf database asbr-summary 查看四类LSA Show ip ospf database external 查看五类LSA 域外 Show ip ospf database nssa-external 查看七类LSA 指定RID、修改路由器优先级、修改hello间隔、dead时间、接口带宽、ospf接口的cost值,修改cost计算公式的分子 Router(config-router)

4、#router-id 1.1.1.1 指定RID Router(config-if)#ip ospf priority 0-255 注意在接口下改 Router(config-router)#clear ip ospf process 重新启动OSPF路由选择进程,如果希望本路由器成为DR,则在更改优先级后用这一命令重新启动进程才能成为DR Router(config-if)#ip ospf hello-interval 10 Router(config-if)#ip ospf dead-interval 40默认是hello间隔的四倍 Router(config-if)#bandwidth

5、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 是被汇总的区域,建议

6、在本区域所有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 0 Router(config-router)#default-information originate 如果没有写默认路由,用下面这种: Router(config-router)#default-information originate always metric-type 1 metric 3 实

7、际上这条命令也只能吸引路由,并不能指向一个网关,所以还是要配一个默认网关 配置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 nssa R2(

8、config-router)#area 2 nssa default-information-originate 在ABR上做,会向nssa区域下发一条LSA7的默认路由 R2(config-router)#area 2 default-cost 6 R2(config-router)#area 2 nssa default-information-originate metric 6 metric-type 1 Metric-type 1的作用是将N2类型的路由改为N1类型的路由 R2(config-router)#area 2 nssa no-redistribution 在ABR上做,阻

9、止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 os

10、pf 10 subnets 2)tunnel Int tunnel 1 int tunnel 3 Tunnel source s1 tunnel source s1 Tunnel destination 13.1.1.3 tunnel destination 13.1.1.1 Ip add 111.1.1.1 255.255.255.0 Ip add 111.1.1.3 255.255.255.0 Router ospf 10 router ospf 10 Net 111.1.1.0 0.0.0.255 area 0 net 111.1.1.0 0.0.0.255 area 0 3)虚链路:

11、最简单的方法,只需在区域的两台边界路由器上配就可以了 R3(config-router)#area 2 virtual-link 2.2.2.2 远离Area0 / 分隔的Area 0 R2#show ip ospf virtual-links OSPF的认证 Link:同一链路上的路由器之间,在接口下做 R1(config-router)#int s1 R1(config-if)#ip ospf authentication-key wolf R1(config-if)#ip ospf authentication R1(config-if)#ip ospf message-digest-k

12、ey 1 md5 wolf (配密文密码) R1(config-if)#ip ospf authentication message-digest-key(启动密文认证) Area:接口下配密码,进程下调用 R1(config-router)#int s0 R2(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-li

13、nk 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_BROADCAST 3层是NBMA,2层是否让通过广播都无所谓。 在HUB端单播 R1(config)#router os 110 R1(config-router)#neighbor 145.1.1.4 R1(config-router)#neighbor 145

14、.1.1.5 确保HUB成为DR,和Spoke交互路由信息。 R1(config)#int s0 R1(config-if)#ip ospf priority 2 R4/R5(config-if)#ip ospf priority 0 R4: O 5.5.5.0 110/65 via 145.1.1.5, 00:00:07, Serial 手工MAP R4(config-if)#frame-relay map ip 145.1.1.5 401 R5(config-if)#frame-relay map ip 145.1.1.4 501 BROADCAST 3层是BMA,2层也一定要让广播通过。

15、 在HUB端单播 R1(config)#router os 110 R1(config-router)#neighbor 145.1.1.4 R1(config-router)#neighbor 145.1.1.5 R4: O 145.1.1.5/32 110/128 via 145.1.1.1, 00:00:24, Serial1 产生/32主机路由,且下一跳指向HUB,所以不需手工MAP。这就是32位的好处。 POINT_TO_MULTIPOINT 全自动,最好的 3层是允许广播,2层也一定要让广播通过。 HUB端起2个P2P子接口: interface Serial0 encapsulation frame-relay no frame-relay inverse-arp 关闭反向ARP interface Serial0.14 point-to-point ip address 14.1.1.1 255.255.255.0 frame-relay interface-dlci 104 interface Serial0.15 point-to-point ip address 15.1.1.1 255.255.255.0 frame-relay interface-dlci 105

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

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号