思科命令defaultip route add default是什么意思,怎么用?

使用 IP 命令配置最后一道网关 - Cisco Systems
2015 年 7 月 13 日 -
(2015 年 6 月 22 日) |
默认路由用于指引发往路由表中未明确地列出的网络的数据包到达目标。在不需要获知所有更具体的网络(如末节网络)的拓扑中,或者在由于有限的系统资源(如内存和处理能力)而不可能获知所有更具体的网络的拓扑中,默认路由非常有价值。
本文档说明如何配置默认路由或最后选用网关。将使用以下 IP 命令:
ip default-gateway
ip default-network
以及 ip route 0.0.0.0 0.0.0.0
本文档没有任何特定的要求。
本文档不限于特定的软件和硬件版本。显示的命令输出是从运行Cisco IOS软件版本12.2(24a)的思科2500系列路由器。
本文档中的信息都是基于特定实验室环境中的设备创建的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您是在真实网络上操作,请确保您在使用任何命令前已经了解其潜在影响。
有关文档规则的详细信息,请参阅 。
命令与其他两个命令有所不同。只有在 Cisco 路由器上禁用了 IP 路由时,才应使用该命令。
例如,如果路由器是 IP 环境中的主机,可以使用此命令为其定义默认网关。还可以在低端 Cisco 路由器处于引导模式时使用此命令,以便将 Cisco IOS(R) 软件镜像 TFTP 到路由器上。在引导模式下,路由器不会启用 IP 路由。
此示例将 IP 地址 172.16.15.4 上的路由器定义为默认路由:
ip default-gateway 172.16.15.4
不同于 ip default-gateway 命令,可以在 Cisco 路由器上已启用 IP 路由时使用 。如果配置了 ip default-network,则路由器会将要安装到该网络的路由视为该路由器上的最后选用网关。
对于用 ip default-network 配置的每个网络,如果路由器有一个路由到该网络,则该路由被标记为候选默认路由。以下网络图显示从路由器 2513 获得的路由表:
2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
161.44.0.0/24 is subnetted, 1 subnets
161.44.192.0 is directly connected, Ethernet0
131.108.0.0/24 is subnetted, 1 subnets
131.108.99.0 is directly connected, Serial0
198.10.1.0/24 [1/0] via 161.44.192.2
请注意通过 161.44.192.2 到 198.10.1.0 的静态路由,还应注意最后选用网关未被设置。如果配置 ip default-network 198.10.1.0,则路由表将更改为如下所示:
2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 161.44.192.2 to network 198.10.1.0
161.44.0.0/24 is subnetted, 1 subnets
161.44.192.0 is directly connected, Ethernet0
131.108.0.0/24 is subnetted, 1 subnets
131.108.99.0 is directly connected, Serial0
198.10.1.0/24 [1/0] via 161.44.192.2
2513#show ip protocols
最后选用网关现在设置为 161.44.192.2。如该输出底部的 show ip protocols 命令所示,此结果与任何路由协议无关。
可以通过配置 ip default-network 的其他实例来添加其他候选默认路由:
2513#configure terminal
Enter configuration commands, one per line.
End with CNTL/Z.
2513(config)#ip route 171.70.24.0 255.255.255.0 131.108.99.2
2513(config)#ip default-network 171.70.24.0
2513(config)#^Z
2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 161.44.192.2 to network 198.10.1.0
171.70.0.0/16 is variably subnetted, 2 subnets, 2 masks
171.70.0.0/16 [1/0] via 171.70.24.0
171.70.24.0/24 [1/0] via 131.108.99.2
161.44.0.0/24 is subnetted, 1 subnets
161.44.192.0 is directly connected, Ethernet0
131.108.0.0/24 is subnetted, 1 subnets
131.108.99.0 is directly connected, Serial0
198.10.1.0/24 [1/0] via 161.44.192.2
输入 ip default-network 命令之后,在上面的输出中,该网络将不再标记为默认网络。部分会解释其原因。
注意: ip default-network 命令是一种有类命令。这意味着,如果路由器具有一个到此命令指示的子网的路由,则它会将该路由安装到主网。此时,两个网络都尚未标记为默认网络。必须使用主网再次发出 ip default-network 命令,以便标记候选默认路由。
2513#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
2513(config)#ip default-network 171.70.0.0
2513(config)#^Z
2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 171.70.24.0 to network 171.70.0.0
171.70.0.0/16 is variably subnetted, 2 subnets, 2 masks
171.70.0.0/16 [1/0] via 171.70.24.0
171.70.24.0/24 [1/0] via 131.108.99.2
161.44.0.0/24 is subnetted, 1 subnets
161.44.192.0 is directly connected, Ethernet0
131.108.0.0/24 is subnetted, 1 subnets
131.108.99.0 is directly connected, Serial0
198.10.1.0/24 [1/0] via 161.44.192.2
如果原始静态路由已到主网,则没有必要执行额外步骤配置默认网络两次。
此时仍然未运行任何 IP 协议。在未运行任何动态协议的情况下,可以根据路由表是否有除 0.0.0.0/0 以外的到网络的路由,将路由器配置为从多个候选默认路由中进行选择。使用 ip default-network 命令可以使最后选用网关的选择具有稳健性。可以通过签入路由表来让路由器选择到特定网络的默认路由,而不是将静态路由配置到特定的下一跳。
如果到特定网络的路由丢失,则路由器将选择另一个候选默认路由。可以通过在配置中删除静态路由来删除丢失的路由,如下所示:
2513#configure terminal
Enter configuration commands, one per line.
End with CNTL/Z.
2513(config)#no ip route 171.70.24.0 255.255.255.0 131.108.99.2
2513(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
删除到默认网络的静态路由后,路由表将如下所示:
2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 161.44.192.2 to network 198.10.1.0
161.44.0.0/24 is subnetted, 1 subnets
161.44.192.0 is directly connected, Ethernet0
131.108.0.0/24 is subnetted, 1 subnets
131.108.99.0 is directly connected, Serial0
198.10.1.0/24 [1/0] via 161.44.192.2
使用 ip default-network 命令选择的最后选用网关的传播方式会因正在传播默认路由的路由协议而异。要使 IGRP 和 EIGRP 传播路由,由 ip default-network 命令指定的网络必须是 IGRP 或 EIGRP 已知的网络。这意味着该网络在路由表里必须是 IGRP 或 EIGRP 派生的网络,或者,用于生成到该网络的路由的静态路由必须已重分配到 IGRP 或 EIGRP 中或已使用 network 命令通告到这些协议中。
如果使用 ip default-network 命令选择最后选用网关,则 RIP 会将到 0.0.0.0 的路由进行通告。ip default-network 命令中指定的此网络不需要明确地在 RIP 之下进行通告。例如,请注意,在此路由器上的最后选用网关是使用 ip route 和 ip default-network 命令的组合获知的。如果在此路由器上启用了 RIP,则 RIP 会通告到 0.0.0.0 的路由(虽然由于水平分割而未到达 Ethernet0 网络):
2513(config)#router rip
2513(config-router)#network 161.44.0.0
2513(config-router)#network 131.108.0.0
2513(config-router)#^Z
%SYS-5-CONFIG_I: Configured from console by console
2513#debug ip rip
2 07:39:35.504: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (161.44.192.1)
2 07:39:35.508: RIP: build update entries
2 07:39:35.508:
network 131.108.0.0 metric 1
2 07:39:35.512: RIP: sending v1 update to 255.255.255.255 via Serial0 (131.108.99.1)
2 07:39:35.516: RIP: build update entries
2 07:39:35.520:
subnet 0.0.0.0 metric 1
2 07:39:35.524:
network 161.44.0.0 metric 1
开放最短路径优先 (OSPF) 不传播使用 ip default-network 命令通告的默认路由。有关使用 OSPF 时默认路由的行为的详细信息,请参阅 。
IS-IS 不传播使用 ip default-network 命令通告的默认路由。
创建到网络 0.0.0.0 0.0.0.0 的静态路由是在路由器上设置最后选用网关的另一种方法。与使用 ip default-network 命令一样,使用到 0.0.0.0 的静态路由不依赖于任何路由协议。但是,必须已在路由器上启用了 IP 路由。
注意: IGRP 无法识别到 0.0.0.0 的路由。因此,它不能传播使用 ip route 0.0.0.0 0.0.0.0 命令创建的默认路由。请使用 ip default-network 命令以使 IGRP 传播默认路由。
EIGRP 会对到网络 0.0.0.0 的路由进行传播,但必须将静态路由重分配到路由协议中。
在 RIP 的较早版本中,使用 ip route 0.0.0.0 0.0.0.0 创建的默认路由会通过 RIP 路由器自动进行通告。在 Cisco IOS 软件版本 12.0T 及更高版本中,如果默认路由不是通过 RIP 获知的,则 RIP 不会通告该路由。将路由重分配到 RIP 中可能是必要的。
OSPF 和 IS-IS 不传播使用 ip route 0.0.0.0 0.0.0.0 命令创建的默认路由。另外,不能使用 redistribute 命令将此默认路由重分配到 OSPF 或 IS-IS。请使用
命令生成到 IS-IS 或 OSPF 路由域的默认路由。有关使用 OSPF 时默认路由的行为的详细信息,请参阅 。
下面是使用 ip route 0.0.0.0 0.0.0.0 命令配置最后选用网关的示例:
router-3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
router-3(config)#ip route 0.0.0.0 0.0.0.0 170.170.3.4
router-3(config)#^Z
router-3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is 170.170.3.4 to network 0.0.0.0
170.170.0.0/24 is subnetted, 2 subnets
C 170.170.2.0 is directly connected, Serial0
C 170.170.3.0 is directly connected, Ethernet0
S* 0.0.0.0/0 [1/0] via 170.170.3.4
注意: 如果使用 ip default-network 命令将多个网络配置为候选默认路由,则具有最短管理距离的网络将被选为最后选用网关的网络。如果所有网络都有相同的管理距离,则路由表中首先列出的网络(show ip route 列出路由表)将被选为最后选用网关的网络。如果使用 ip default-network 和 ip route 0.0.0.0 0.0.0.0 这两个命令配置候选默认网络,并且 ip default-network 命令所使用的网络被静态获知,则使用 ip default-network 命令定义的网络将被优先选择,并被选择用于最后选用网关。否则,如果 ip default-network 命令所使用的网络是由路由协议派生的,则具有更短管理距离的 ip route 0.0.0.0 0.0.0.0 命令优先,会被选择用于最后选用网关。如果使用多个 ip route 0.0.0.0 0.0.0.0 命令配置默认路由,则流量将在多个路由上进行负载平衡。
在 Cisco 路由器上已禁用 IP 路由时,可使用 ip default-gateway 命令。在已启用了 IP 路由的 Cisco 路由器上,可使用 ip default-network 和 ip route 0.0.0.0 0.0.0.0 命令设置最后选用网关。路由协议传播默认路由信息的方式因各个协议而异。
相关的思科支持社区讨论
是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。
Document ID: 16448Cisco OSPF命令与配置手册_百度百科
关闭特色百科用户权威合作手机百科
收藏 查看&Cisco OSPF命令与配置手册本词条缺少概述、信息栏、名片图,补充相关内容使词条更完整,还能快速升级,赶紧来吧!
作者:(美)帕克赫斯特|译者:孙余强封面
出版社:人民邮电
开本:16开
页数:430页
版次; 第1版 第1次印刷
定价:69OSPF是部署最为广泛的内部网关协议之一,每天都要与之打交道的网络从业人员需要具备丰富的OSPF知识才能胜任。William R. Parkhurst, Ph.D.所著的《Cisco OSPF命令与配置手册》[1]清晰、简明、完整地介绍了所有CiscoIOS OSPF命令。读者可根据自己的目标来使用本书。要是读者备考CCIE笔试和机试,可用本书来熟悉每条OSPF命令用法。如果读者是网络设计人员,则可将本书视为每条OSPF命令的速查参考手册。 在本书列举的示例场景中,演示了每一条OSPF命令的正确用法,这些命令可在最低数量的路由器上配置。有了本书。读者无需搭建庞大、昂贵的实验环境。便可以熟悉每一条OSPF命令。这些示例场景清晰地展示了每条OSPF命令的配法和用途。为了加强读者对某些OSPF命令的理解。作者还在某些示例场景设置了一些故障现象供排错之用。William R. Parkhut, Ph.D.所著的《Cisco OSPF命令与配置手册》 是一本简洁而又完整的OSPF命令手册。书中提供了许多配置示例,在只用 几台路由器的情况下,演示了每条OSPF命令的正确用法。读者可借此学习 每条OSPF命令,而无需搭建庞大而又昂贵的实验室网络环境。本书涵盖了 OSPF配置的诸多主题,包括:接口配置、OSPF区域配置、路由过滤、OSPF 进程配置、路由开销、默认路由的生成、路由重分发、管理距离、OSPF邻 接关系、路由汇总,以及show、debug和clear命令等。 《Cisco OSPF命令与配置手册》层次分明、阐述清晰、分析透彻、理 论与实践并重,不仅适合准备CCNA、CCNP或CCIE认证考试的人员阅读,也 是从事计算机网络设计、管理和运维工作的工程技术人员必不可少的参考 资料。William R. Parkhut,Ph. D. ,CCIE#2969,Cisco公司CCIE团队的项目经理。负责CCIE Communicatio & Setvices考试。加入CCIE团队之前。William在Sprint公司任系统咨询工程师一职。William第一次接触Cisco时,他还在Wictlita州立大学(WSU)电气与计算机工程专业担任教授一职。当时,WSU与Cisco公司合作。筹建了第一个CCIE备考实验室。第1章 OSPF进程配置命令
1.1 router ospf process-id
配置示例:激活OSPF进程
1.2 route ospf process-id vrf name
第2章 OSPF Area命令
2.1 area area-id authentication
配置示例:简单密码认证XSH
2.2 area area-id authentication message-digest
配置示例1:MD5密码认证
配置示例2:更改密钥和密码
2.3 area area-id default-cost cost
配置示例:设置通告进stub区域的默认路由的OSPF开销值
2.4 area area-id a
配置示例:配置OSPF NSSA区域
2.5 area area-id a default-infromation-originate
配置示例:将OSPF NSSA默认路由通告进OSPF NSSA
2.6 area area-id a no-redistribution
配置示例:不让经过重分发的路由进入OSPF NSSA区域
2.7 area area-id a no-summary
配置示例:创建Totally Stubby NSSA区域
2.8 area area-id range ip-address mask
2.9 area area-id range ip-address mask advertise
2.10 area area-id range ip-address mask not-advertise
配置示例1:将OSPF常规(非0)区域的路由汇总通告进OSPF骨干区域
配置示例2:将OSPF骨干区域的路由汇总通告进OSPF常规(非0)区域
配置示例3:针对OSPF汇总路由,设置指向NULL0的静态路由
2.11 area area-id stub
配置示例:配置OSPF stub区域
2.12 area area-id stub no-summary
配置示例:配置OSPFtotally stubby区域
2.13 area trait-area-id virtual-link router-id
配置示例:建立OSPF虚电路
2.14 area trait-area-id virtual-link router-id authentication authentication-key password
2.15 area trait-area-id virtual-link router-id authentication message-digest
2.16 area trait-area-id virtual-link router-id authentication null
配置示例1:虚链路上的简单密码认证
配置示例2:虚链路上的MD5认证
配置示例3:更改密钥和密码
配置示例4:Null(虚)认证
2.17 area trait-area-id virtual-link router-id authentication-key password
配置示例:虚链路上的简单密码认证
2.18 area trait-area-id virtual-link router-id dead-interval seconds
配置示例:修改通过虚链路发送的OSPF hello数据包所含的router dead interval字段值
2.19 area trait-area-id virtual-link router-id hello-interval seconds
配置示例:修改通过虚链路发送的OSPF hello数据包所含的hello interval字段值
2.20 area trait-area-id virtual-link router-id message-digest-key key-id md5 password
配置示例1:虚链路上的MD5认证
配置示例2:更改密钥和密码
2.21 area trait-area-id virtual-link router-id retramit-interval seconds
配置示例:更改通过虚链路发送的LSA的retramit-interval值
2.22 area trait-area-id virtual-link router-id tramit-delay seconds
配置示例:更改虚链路两端的 tramit-delay值
第3章 Auto Cost
3.1 auto-cost reference-bandwidth bandwidth
配置示例:全局性修改OSPF接口的开销值
第4章 生成默认路由
4.1 default-information originate
配置示例:将默认路由通告进OSPF路由进程域
4.2 default-information originate always
配置示例:无条件地将默认路由通告进OSPF路由进程域
4.3 default-information originate metric cost
4.4 default-information originate always metric cost
配置示例:将默认路由无条件地通告进OSPF路由进程域
4.5 default-information originate metric-type type
4.6 default-information originate always metric-type type
配置示例:设置默认路由的OSPF度量类型
4.7 default-information originate route-map route-map-name
配置示例:利用route-map有条件地通告默认路由
第5章 为经过重分发的路由设置默认度量
5.1 default-metric cost
配置示例:为经过重分发的路由设置默认开销值
第6章 管理距离
6.1 distance administrative-distance
配置示例:调整管理距离值,影响路由器对最优路由的选择
6.2 distance administrative-distance source-ip-address source-ip-mask
6.3 distance administrative-distance source-ip-address source-ip-mask access-list-number
配置示例1:调整学自特定OSPF邻居的所有路由的管理距离值
配置示例2:调整学自特定OSPF邻居的 特定路由的管理距离值
6.4 distance ospf external administrative-distance
6.5 distance ospf inter-area administrative-distance
6.6 distance ospf intra-area administrative-distance
配置示例:根据路由类型,调整OSPF路由的管理距离
第7章 用distribute-list过滤路由
7.1 distribute-list access-list-number in
配置示例:阻止学自OSPF的路由进驻IP路由表
7.2 distribute-list access-list-number in interface-type interface-number
配置示例:阻止通过特定接口学得的OSPF路由进驻IP路由表
7.3 distribute-list access-list-number out
7.4 distribute-list access-list-number out interface-type interface-number
7.5 distribute-list access-list-number out routing-process
配置示例:防止重分发进OSPF的路由“进驻”IP路由表
7.6 distribute-list access-list-number in
配置示例:防止学自OSPF的路由进驻IP路由表
7.7 distribute-list access-list-name in interface-type interface-number
配置示例:防止路由器将学自特定接口的OSPF路由安装进IP路由表
7.8 distribute-list access-list-name out
7.9 distribute-list access-list-name out interface-type interface-number
7.10 distribute-list access-list-name out routing-process
配置示例:阻止重分发进OSPF的路由进驻OSPF数据库
7.11 distribute-list prefix prefix-list-name in
配置示例:防止学自OSPF路由“进驻”IP选择表
7.12 distribute-list prefix prefix-list-name in interface-type interface-number
配置示例:阻止学自特定接口的OSPF路由进驻IP路由表
7.13 distribute-list prefix prefix-list-name out
7.14 distribute-list prefix prefix-list-name out interface-type interface-number
7.15 distribute-list prefix prefix-list-name out routing-process
配置示例:防止被重分发进OSPF的路由“进驻”OSPF数据库
第8章 处理MOSPF LSA
8.1 ignore lsa mospf
第9章 记录OSPF邻接关系的改变
9.1 log-adjacency-changes
9.2 log adjacency-changes detail
配置示例1:在控制台记录OSPF邻接状态的变化情况
配置示例2:在内存中记录OSPF邻接状态的变化情况
第10章 配置多路径
10.1 maximum-paths number-of-paths
配置示例:设置OSPF路由器可在IP路由表中安装的最多并行等价路径数
第11章 OSPFneighbor命令
11.1 neighbor ip-address
配置示例1:在NBMA网络中,利用neighbor命令激活OSPF
配置示例2:在Hub-to-Spoke(中心-分支)网络中配置OSPF邻居,且OSPF邻居的IP地址隶属于同一IP子网
配置示例3:在Hub-to-Spoke(中心-分支)网络中配置OSPF邻居,且OSPF邻居的IP地址不属于同一IP子网
11.2 neighbor ip-address cost cost
配置示例:在OSPF网络类型为point-to-multipoint的接口上,修改针对OSPF邻居而设的开销值
11.3 neighbor ip-address database-filter all out
配置示例:降低冗余链路上的LSA泛洪量
11.4 neighbor ip-address poll-interval interval
配置示例:针对OSPF网络类型为NBMA的接口设置Poll Interval值
11.5 neighbor ip-address priority priority
配置示例:设置OSPF邻居的优先级
第12章 OSPF network命令
12.1 network ip-address wild-card-mask area area-id
配置示例1:用主机地址作为本命令的参数,让相关路由器接口参与OSPF进程
配置示例2:使用与接口所设IP地址相对应的网络/掩码作为OSPF network命令的参数
配置示例3:使用更为宽泛的network命令(所含的逆向子网掩码参数更短),让多个路由器接口参与OSPF进程
第13章 Passive OSPF接口
13.1 passive-interface interface-name interface-number
配置示例:配置Passive接口,降低网络中OSPF路由协议流量
13.2 passive-interface default
配置示例:接口多,邻居少的OSPF路由器
第14章 路由重分发
14.1 redistribute routing-process process-id
14.2 redistribute routing-process process-id metricospf-metric
14.3 redistribute routing-process process-id metric-type metric-type
14.4 redistribute routing-process process-id subnets
14.5 redistribute routing-process process-id tag tag-value
配置示例1:以默认度量类型和度量值,将有类路由重分发进OSPF
配置示例2:以默认度量类型和指定的度量值,将有类路由重分发进OSPF
配置示例3:以默认度量类型和指定的度量值,将有类路由重分发进OSPF
配置示例4:以指定的度量值,并以type1路由的形式将有类路由重分发进OSPF
配置示例5:以指定的度量值,并以type1路由的形式,将子网路由重分发进OSPF
配置示例6:以指定的度量值和路由标记值,并以type1路由的形式,将子网路由重分发进OSPF
14.6 redistribute routing-process process-id route-map route-map- name
配置示例1:根据IP地址,来控制路由的重分发
配置示例2:用Route-Map调整经过重分发的路由的度量值
配置示例3:用Route-Map,更改经过重分发的路由的度量类型
配置示例4:用Route-Map,修改经过重分发的路由的标记值
配置示例5:根据路由标记值,控制路由的重分发
第15章 掌控OSPF Router-ID
15.1 router-id ip-address
配置示例:选择OSPF Router-ID
第16章 汇总外部路由
16.1 summary-address ip-address mask
16.2 summary-address ip-address mask not-advertise
配置示例:汇总被重分发进OSPF的路由
16.3 summary-address ip-address mask tag value
配置示例1:让ASBR生成的汇总路由附着路由标记
配置示例2:用路由标记值,来掌控路由的重分发
第17章 OSPF计时器
17.1 time lsa-group-pacing seconds
配置示例:修改LSA组步调延迟值
17.2 time spf delay interval
配置示例:更改SPF timer值
第18章 流量负载均衡
18.1 traffic-share min across-interfaces
第19章 接口配置模式命令
19.1 ip ospf authentication
19.2 ip ospf authentication authentication-key password
19.3 ip ospf authentication message-digest
19.4 ip ospf authentication null
配置示例1:OSPF网络中的简单密码认证
配置示例2:在OSPF网络中启用MD5认证
配置示例3:更改密钥和密码
配置示例4:NULL(虚)认证
19.5 ip ospf cost cost
配置示例:更改接口的OSPF开销值
19.6 ip ospf database-filter all out
配置示例:降低冗余链路上的LSA泛洪量
19.7 ip ospf dead-interval seconds
配置示例:修改路由器接口所发OSPF Hello数据包的router dead interval字段值
19.8 ip ospf demand-circuit
配置示例:将Point-to-Point链路配置为OSPF demand-circuit
19.9 ip ospf flood-reduction
配置示例:在接口上激活ospf flood-reduction特性
19.10 ip ospf hello-interval seconds
配置示例:修改路由器接口所发OSPF Hello数据包的hello interval字段值
19.11 ip ospf message-digest-key key-id md5 password
配置示例1:开启OSPF接口的MD5认证功能
配置示例2:修改密钥和密码
19.12 ip ospf mtu-ignore
配置示例:OSPF邻接关系和MTU不匹配
19.13 ip ospf network broadcast
配置示例1:在NBMA网络内形成全互连的OSPF邻居
配置示例2:NBMA网络内形成部分互连的OSPF邻居
19.14 ip ospf network non-broadcast
19.15 ip ospf network point-to-multipoint
19.16 ip ospf network point-to-multipoint non-broadcast
配置示例1:Hub路由器端互连接口的OSPF网络类型为multipoint,Spoke路由器端互连接口的网络类型为Point-to-Point
配置示例2:Hub和Spoke路由器互连接口两端的OSPF网络类型都为multipoint
19.17 ip ospf network point-to-point
配置示例:Hub和Spoke路由器互连接口两端的OSPF网络类型都为Point-to-Point
19.18 ip ospf priority priority
配置示例:“干涉”指定路由器(DR)的选举
19.19 ip ospf retramit-interval seconds
配置示例:修改retramit interval值
19.20 ip ospf tramit-delay seconds
配置示例:修改OSPF接口的tramit-delay值
第20章 show命令
20.1 show ip ospf
20.2 show ip ospf process-id
示例:显示OSPF进程信息
20.3 show ip ospf border-route
20.4 show ip ospf process-id border-route
示例:显示通往OSPF边界路由器的路由信息
20.5 show ip ospf database
20.6 show ip ospf process-id database
20.7 show ip ospf database adv-router router-id
20.8 show ip ospf process-id database adv-router router-id
20.9 show ip ospf database asbr-summary
20.10 show ip ospf process-id database asbr-summary
20.11 show ip ospf database asbr-summary asbr-id
20.12 show ip ospf process-id database asbr-summary asbr-id
20.13 show ip ospf database database-summary
20.14 show ip ospf process-id database database-summary
20.15 show ip ospf database external
20.16 show ip ospf process-id database external
20.17 show ip ospf database network
20.18 show ip ospf process-id database network
20.19 show ip ospf database a-external
20.20 show ip ospf process-id database a-external
20.21 show ip ospf database router
20.22 show ip ospf process-id database router
20.23 show ip ospf database self-originate
20.24 show ip ospf process-id database self-originate
20.25 show ip ospf database summary
20.26 show ip ospf process-id database summary
示例1:显示由指定OSPF路由器所通告的OSPF数据库信息
示例2:显示描述OSPF ASBR路由器的OSPF数据库信息(type 4 LSA)
20.27 show ip ospf flood-list
20.28 show ip ospf process-id flood-list
20.29 show ip ospf flood-list int-name int-number
20.30 show ip ospf process-id flood-list int-name int-number
示例:显示所有被路由器缓存的OSPF泛洪列表内容
20.31 show ip ospf interface
20.32 show ip ospf process-id interface
20.33 show ip ospf interface int-name int-number
20.34 show ip ospf process-id interface int-name int-number
示例1:显示某个参与OSPF路由进程的接口的信息
示例2:显示参与OSPF路由进程的接口的OSPF计时器信息
20.35 show ip ospf neighbor
20.36 show ip ospf process-id neighbor
20.37 show ip ospf neighbor neighbor-id
20.38 show ip ospf process-id neighbor neighbor-id
20.39 show ip ospf neighbor int-name int-number
20.40 show ip ospf process-id neighbor int-name int-number
20.41 show ip ospf neighbor detail
20.42 show ip ospf process-id neighbor detail
20.43 show ip ospf neighbor detail neighbor-id
20.44 show ip ospf process-id neighbor detail neighbor-id
20.45 show ip ospf neighbor int-name int-number
20.46 show ip ospf process-id neighbor int-name int-number
示例1:显示所有OSPF邻居路由器的信息
示例2:显示特定OSPF邻居路由器的详细信息
20.47 show ip ospf request-list
20.48 show ip ospf process-id request-list
20.49 show ip ospf request-list neighbor-id
20.50 show ip ospf process-id request-list neighbor-id
20.51 show ip ospf request-list int-name int-number
20.52 show ip ospf process-id request-list int-name int-number
示例:显示某特定OSPF邻居的链路状态请求列表信息
20.53 show ip ospf retramission-list
20.54 show ip ospf process-id retramission-list
20.55 show ip ospf retramission neighbor-id
20.56 show ip ospf process-id retramission neighbor-id
20.57 show ip ospf retramission int-name int-number
20.58 show ip ospf process-id retramission int-name int-number
示例:等待某特定路由器接口重传的LSA列表
20.59 show ip ospf summary-address
20.60 show ip ospf process-id summary-address
示例:显示路由器上所配置的汇总地址重分发的信息
20.61 show ip ospf virtual-links
20.62 show ip ospf process-id virtual-links
示例:显示本路由器上所配置的所有OSPF虚链路的状态信息
第21章 debug命令
21.1 debug ip ospf adj
示例1:展示OSPF邻接关系成功建立的过程
示例2:当OSPF邻居路由器间区域ID不一致时,展示OSPF邻接关系的尝试建立过程
21.2 debug ip ospf events
示例1:展示OSPF邻接关系成功建立的过程
示例2:定位OSPF邻接关系建立过程中的问题
21.3 debug ip ospf flood
21.4 debug ip ospf flood ip-access-list-number
示例1:展示由OSPF泛洪协议生成的所有输出
示例2:选择性地显示与OSPF协议有关的debug输出
21.5 debug ip ospf lsa-generation
21.6 debug ip ospf lsa-generation ip-access-list-number
示例:展示OSPF邻接关系成功建立的过程
21.7 debug ip ospf packet
示例:显示OSPF包的信息
21.8 debug ip ospf retramission
21.9 debug ip ospf spf
21.10 debug ip ospf spf external
21.11 debug ip ospf spf external access-list-number
21.12 debug ip ospf spf inter
21.13 debug ip ospf spf inter access-list-number
21.14 debug ip ospf spf intra
21.15 debug ip ospf spf intra access-list-number
示例:显示外部的OSPF路由的SPF输出
第22章 clear命令
22.1 clear ip ospf counte
22.2 clear ip ospf process-id counte
22.3 clear ip ospf process-id counte neighbor
22.4 clear ip ospf process-id counte neighbor int-name int-number
示例:查看并清零记录OSPF邻接状态变迁的计数器
22.5 clear ip ospf process
22.6 clear ip ospf process-id process
22.7 clear ip ospf redistribution
22.8 clear ip ospf process-id redistribition
新手上路我有疑问投诉建议参考资料 查看

我要回帖

更多关于 route del default 的文章

 

随机推荐