Ospf多区域路由重分布

合集下载

BGP和OSPF在路由重分发时的注意点

BGP和OSPF在路由重分发时的注意点

RGNOSv10.3(3)BGP和OSPF在路由重分发时的注意点2008-5-15福建星网锐捷网络有限公司版权所有侵权必究前言本文档介绍了RGNOS V10.3(3)中BGP和OSPF路由重发布时的一些实现特点。

由于这些特点区别于友商CISCO的BGP功能实现,在具体的项目实施过程中需要注意。

1.☹本文档仅限公司内部使用,严禁外传。

1.☺如果您在阅读中产生疑问,请与文档维护人联系。

目录1. 1OSPF重分发BGP路由1. 1.1注意点1. 这里Cisco验证的版本为c7200-adventerprisek9-mz.124-9.T1.bin2. 1.2应用实例1. 1.2.1网络拓扑四台设备之间建立EBGP/IBGP/EBGP连接。

C1为CISCO 3550、C2、C3是Cisco模拟器,R1是我司设备,实验设备为RG-S5750。

C1和R1建立EBGP连接,R1和C2建立IBGP连接,C2和C3建立EBGP连接。

其中C1和C3主要是发送路由,具体的操作在R1和C2。

2. 1.2.2配置文件C1 简化配置C1#sho running-configBuilding configuration...Current configuration : 2557 bytes!version 12.2no service padservice timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname C1!!no aaa new-modelip subnet-zeroip routing!!!!!!no file verify autospanning-tree mode pvstspanning-tree extend system-id!vlan internal allocation policy ascending!!interface Loopback0ip address 1.1.1.1 255.255.255.255!interface FastEthernet0/1no switchportip address 192.168.16.1 255.255.255.248!interface FastEthernet0/2switchport mode dynamic desirable!interface FastEthernet0/3switchport mode dynamic desirable!...!router bgp 1no synchronizationbgp log-neighbor-changesredistribute staticneighbor 192.168.16.2 remote-as 23no auto-summary!ip classlessip route 192.168.111.0 255.255.255.0 Loopback0ip route 192.168.112.0 255.255.255.0 Loopback0ip http serverip http secure-server!!!control-plane!!line con 0line vty 0 4privilege level 15password wlogin!!endC1#C2简化配置C2#sho runnBuilding configuration...Current configuration : 1450 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname C2!boot-start-markerwarm-rebootboot-end-marker!!no aaa new-model!resource policy!ip cef!!!!interface Loopback0ip address 192.168.125.1 255.255.255.0 secondary ip address 192.168.126.1 255.255.255.0 secondary ip address 2.2.2.2 255.255.255.255!interface FastEthernet0/0ip address 192.168.26.2 255.255.255.248duplex full!interface Ethernet1/0no ip addressshutdownduplex half!interface Ethernet1/1no ip addressshutdownduplex half!interface Ethernet1/2no ip addressshutdownduplex half!interface Ethernet1/3ip address 192.168.23.1 255.255.255.248duplex full!router ospf 1log-adjacency-changesnetwork 2.2.2.2 0.0.0.0 area 0network 192.168.26.0 0.0.0.7 area 0!router bgp 23no synchronizationbgp log-neighbor-changesnetwork 192.168.125.0network 192.168.126.0neighbor 6.6.6.6 remote-as 23neighbor 6.6.6.6 update-source Loopback0neighbor 6.6.6.6 next-hop-selfneighbor 192.168.23.2 remote-as 3no auto-summary!no ip http serverno ip http secure-server!!...!line con 0stopbits 1line aux 0line vty 0 4privilege level 15password wlogin!!endC2#C3简化配置C3#sho runnBuilding configuration...Current configuration : 1178 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname C3!boot-start-markerboot-end-marker!!no aaa new-model!resource policy!ip cef!!!!!!interface Loopback0ip address 3.3.3.3 255.255.255.255!interface FastEthernet0/0no ip addressshutdownduplex full!interface Ethernet1/0no ip addressshutdownduplex half!interface Ethernet1/1no ip addressshutdownduplex half!interface Ethernet1/2no ip addressshutdownduplex half!interface Ethernet1/3ip address 192.168.23.2 255.255.255.248duplex full!router bgp 3no synchronizationbgp log-neighbor-changesredistribute staticneighbor 192.168.23.1 remote-as 23no auto-summary!ip route 192.168.131.0 255.255.255.0 Loopback0ip route 192.168.132.0 255.255.255.0 Loopback0no ip http serverno ip http secure-server!!!logging alarm informational!...!line con 0stopbits 1line aux 0line vty 0 4privilege level 15password wlogin!!endC2#R1简化配置R1#show runnBuilding configuration...Current configuration : 2080 bytes!version RGNOS 10.3.00(3), Release(38105)(Fri Apr 25 15:29:44 CST 2008 -ngcf31)hostname R1co-operate enable!!!!route-map ospf_redist permit 10match route-type external!vlan 1!!!!!interface GigabitEthernet 0/1no switchportno ip proxy-arpip address 192.168.26.1 255.255.255.248!interface GigabitEthernet 0/2!...!interface GigabitEthernet 0/23!interface GigabitEthernet 0/24no switchportno ip proxy-arpip address 192.168.16.2 255.255.255.248!interface Loopback 0ip address 6.6.6.6 255.255.255.255ip address 192.168.165.1 255.255.255.0 secondaryip address 192.168.166.1 255.255.255.0 secondary!!!!!!!!router bgp 23neighbor 2.2.2.2 remote-as 23neighbor 2.2.2.2 update-source Loopback 0neighbor 192.168.16.1 remote-as 1!address-family ipv4network 192.168.165.0network 192.168.166.0neighbor 2.2.2.2 activateneighbor 2.2.2.2 next-hop-selfneighbor 192.168.16.1 activateexit-address-family!!router ospf 1router-id 6.6.6.6network 6.6.6.6 0.0.0.0 area 0network 192.168.26.0 0.0.0.7 area 0!!!ip route 192.168.161.0 255.255.255.0 Loopback 0ip route 192.168.162.0 255.255.255.0 Loopback 0!!line con 0line vty 0 10privilege level 15loginpassword w!!end3. 1.2.3检验配置效果C2使用show ip bgp可以看到125.0/126.0是源发路由,111.0/112.0/165.0/166.0是IBGP路由,131.0/132.0是EBGP路由。

OSPF多区域

OSPF多区域

多区域 OSPFOSPF MultiArea【实验目的】了解和掌握ospf的原理,熟悉ospf多域配置步骤。

懂得如何配置Vitrul links,Transit area, Stub Area ,Totally Stubby Area, Not-so-stubby area(nssa)。

【实验原理】了解Internal router,Backbone router,Area Border Router (ABR), Autonomous System Boundary Router (ASBR) 以及各种类型链路通告的不同之处,优化ospf网络。

【实验拓扑】【实验设备】路由器五台,串行线,用于配置路由的主机【实验内容】1、按图示配置端口,用ping检查各端口间连通性(A/B,E/F用于virtul links实验; C的lo地址在用于验证external routesummarization D的lo地址加入area 8,为验证interarea summarization; A/F的lo 地址在nssa时才加入)建议配置好各个neighber的vty,可以用一台终端观察整个拓扑。

(config)#enable password cisco(config)#line vty 0 4(config-line)#Login(config-line)#Password cisco利用terminal monitor可在telnet上看到debug输出2、在各个路由器启动ospf进程,注意area的分布Router(config)#router ospf *Router(config-router)#network *.*.*.* *.*.*.* area *查看ABR/ASBR/DR/BDR。

show ip ospfshow ip ospf interfaceshow ip ospf neighborshow ip ospf neighbor detail3、 show ip route查看各router路由表,注意area 10,area 11没出现在别的router。

OSPF多进程之间的路由重发布

OSPF多进程之间的路由重发布

OSPF多进程之间的路由重发布1、实验拓扑如下图:R1R4R3 R2Area 00spf 10Area 0Ospf 1002、实验目的:1、实现R2与R3之间互相访问时的数据分流。

R2访问R3的3.3.3.3/32时走R1,R2访问R3的30.30.30.30/32时走R4。

R3访问R2的2.2.2.2/32时走R1,R3访问R2的20.20.20.20/32时走R1。

2、实现线路的冗余备份。

当R1链路故障时数据可以走R4,当R4链路故障时数据可以走R1。

实现链路的冗余备份。

3、理解并掌握route-map在控制路由方面的应用。

3、实验配置文档R1配置:config terint f0/0ip add 10.0.0.1 255.255.255.252no shutint f1/0ip add 10.0.0.5 255.255.255.252no shutint lo 0ip add 1.1.1.1 255.255.255.255endwriteconfig terrouter ospf 10router-id 1.1.1.1network 10.0.0.0 0.0.0.3 area 0redistribute ospf 100 metric-type 1 subnets route-map ospf100_to_ospf10 distribute-list deny_ospf100 inendconfig terrouter ospf 100router-id 1.1.1.1network 10.0.0.4 0.0.0.3 area 0redistribute ospf 10 metric-type 1 subnets route-map ospf10_to_ospf100 distribute-list deny_ospf10 inendwriteip access-list standard deny_ospf10deny 2.2.2.2 0.0.0.0deny 20.20.20.20 0.0.0.0permit anyip access-list standard deny_ospf100deny 3.3.3.3 0.0.0.0deny 30.30.30.30 0.0.0.0permit anyaccess-list 10 permit 2.2.2.2 0.0.0.0access-list 11 permit 3.3.3.3 0.0.0.0access-list 20 permit 20.20.20.20 0.0.0.0access-list 21 permit 30.30.30.30 0.0.0.0route-map ospf100_to_ospf10 permit 10match ip address 11set metric 100route-map ospf100_to_ospf10 permit 20match ip address 21set metric 200route-map ospf10_to_ospf100 permit 10match ip address 10set metric 100route-map ospf10_to_ospf100 permit 20match ip address 20set metric 200R4配置:config terint f0/0ip add 172.16.0.1 255.255.255.252no shutint f1/0ip add 172.16.0.5 255.255.255.252no shutint lo 0ip add 4.4.4.4 255.255.255.255endwriteconfig terrouter ospf 10router-id 4.4.4.4network 172.16.0.4 0.0.0.3 area 0redistribute ospf 100 metric-type 1 subnets route-map ospf100_to_ospf10 distribute-list deny_ospf100 inendconfig terrouter ospf 100router-id 4.4.4.4network 172.16.0.0 0.0.0.3 area 0redistribute ospf 10 metric-type 1 subnets route-map ospf10_to_ospf100 distribute-list deny_ospf10 inendwriteip access-list standard deny_ospf10deny 2.2.2.2 0.0.0.0deny 20.20.20.20 0.0.0.0permit anyip access-list standard deny_ospf100deny 3.3.3.3 0.0.0.0deny 30.30.30.30 0.0.0.0permit anyaccess-list 10 permit 2.2.2.2 0.0.0.0access-list 11 permit 3.3.3.3 0.0.0.0access-list 20 permit 20.20.20.20 0.0.0.0access-list 21 permit 30.30.30.30 0.0.0.0route-map ospf100_to_ospf10 permit 10 match ip address 11set metric 200route-map ospf100_to_ospf10 permit 20 match ip address 21set metric 100route-map ospf10_to_ospf100 permit 10 match ip address 10set metric 200route-map ospf10_to_ospf100 permit 20 match ip address 20set metric 100R2的配置:config terint f0/0ip add 10.0.0.2 255.255.255.252no shutint f1/0ip add 172.16.0.6 255.255.255.252no shutint lo 0ip add 2.2.2.2 255.255.255.255int lo 1ip add 20.20.20.20 255.255.255.255 endwriteconfig terrouter ospf 10router-id 2.2.2.2network 172.16.0.4 0.0.0.3 area 0 network 10.0.0.0 0.0.0.3 area 0 network 2.2.2.2 0.0.0.0 area 0network 20.20.20.20 0.0.0.0 area 0endwriteR3的配置:config terint f0/0ip add 10.0.0.6 255.255.255.252no shutint f1/0ip add 172.16.0.2 255.255.255.252no shutint lo 0ip add 3.3.3.3 255.255.255.255int lo 1ip add 30.30.30.30 255.255.255.255endwriteconfig termrouter ospf 100router-id 3.3.3.3network 172.16.0.0 0.0.0.3 area 0network 10.0.0.4 0.0.0.3 area 0network 3.3.3.3 0.0.0.0 area 0network 30.30.30.30 0.0.0.0 area 0endwrite4、实验测试1、在R2上show ip route查看结果,可以看出实现了数据分流。

重分布原则

重分布原则

重分布原则(影响的是该协议中其他路由器路由表,不影响本路由器路由表,只影响本路由器数据库)
1.复制粘贴路由表.
2.寻找被直连取代的路由(必须在路由进程下通告出来的直连路由).也会被复制粘贴。

3.往同一个协议的重分布中,重分布直连最优先处理,并且被重分布直连处理过的接口以后都不再处理了.
4.向EIGRP重分布RIP和OSPF时,重分布OSPF被最优先处理。

RIP
重分布EIGRP,OSPF,ISIS协议的时候要挂metric参数或者default-metric 1
重分布直连,静态,rip的时候不需要
EIGRP
重分布ospf,rip,isis协议的时候需要挂metric或者default-metric
重分布静态,直连,eigrp的时候不需要
OSPF
重分布任何协议,静态,直连的时候都不需要挂metric,但是注意subnets参数
IS-IS
IS-IS 度量必须在1 和63 之间。

IS-IS 中没有
default-metric 选项,应该为每个协议定义权值,如果没有为重分配到IS-IS 的路由指定权值,则度量值默认为0。

OSPF和路由重分发故障检测与排除

OSPF和路由重分发故障检测与排除

7 OSPF和路由重分发故障检测与排除本章将回顾OSPF(Open Shortest Path First,开放最短路径优先)的主要特性,包括OSPF数据结构、路由器类型、LSA(Link-State Advertisement,链路状态宣告)类型以及网络类型等内容。

此外,还说明如何建立OSPF邻接关系,并给出一系列用于检测和排除OSPF网络故障的常用命令。

本章提供了两份故障工单,第一份讨论的是OSPF故障问题。

提供了故障工单信息以及与之相应的拓扑结构、一系列show命令输出结果,请尝试解决故障工单中提出的OSPF 网络故障(也可能是多个故障)。

接下来回顾了路由重分发的概念,这里所说的路由重分发指的是将学习自某个路由进程的路由注入到其他路由进程中。

随后给出了路由重分发的故障检测与排除策略。

最后,本章给出了另一份故障工单,讨论的是路由重分发的故障问题。

7.1 “我已经知道了吗?”测验“我已经知道了吗”测验的目的是帮助读者确定是否需要完整地学习本章知识。

表71列出了本章的主要内容以及与这些内容相关联的“我已经知道了吗?”测验题。

150第7章OSPF表7-1 “我已经知道了吗?”基本主题章节与所对应的测验题1.下面哪种OSPF数据结构中包含了OSPF路由器所加入的所有区域的拓扑结构信息?a.OSPF路由信息库b.OSPF链路状态数据库c.OSPF接口表d.OSPF邻居表2.所有的OSPF路由器都能发出哪种OSPF LSA?a.类型1 LSAb.类型2 LSAc.类型3 LSAd.类型4 LSAe.类型5 LSA3.下面哪种OSPF路由器所拥有的网络中至少有一个加入了OSPF area 0?a.内部路由器b.ABRc.主干路由器7.1 151d.ASBR4.LAN接口上的默认OSPF网络类型是什么?a.点对点型b.非广播型c.点对多点型d.广播型5.当两台OSPF路由器均接收到来自对方的Hello消息,并且每台路由器都发现自己的OSPF路由器ID位于所接收到的Hello包时,那么此时处于OSPF邻接状态中的哪个状态?a.Exchange(交换状态)b.ExStart(预启动状态)c.2-Way(双向状态)d.Loading(加载状态)6.下面哪个命令可以显示路由器OSPF链路状态数据库中的LSA头部?a.show ip ospf neighborb.show ip ospf databasec.show ip ospf statisticsd.show ip ospf interface7.在执行路由重分发时,目的路由协议需要为重分发进本路由协议的路由分配一个度量,该度量被称为什么?a.外部度量152第7章OSPFb.内部度量c.种子度量d.源度量8.下面哪个命令可以启用Cisco IOS的IP路由简档(route profiling)功能?a.Router(config)#ip route profileb.Router(config-if)#ip route profilec.Router(config)#route profiling ipd.Router(config-if)#route profiling ip基本主题7.2 OSPF故障检测与排除第6章首先从常规角度讨论了路由协议的故障检测与排除技术,复习了路由器的数据结构以及CEF的数据结构,并探讨了EIGRP及其数据结构,最后还给出了一系列用于收集EIGRP数据结构信息的常用命令。

路由重分布

路由重分布

方法一的缺陷
使用解决方法一的问题是:消除了多个重新分配点内在的冗余性。 当与重分布点相连的链路失效后,则不能到达与失效链路相同域的网 络。 本例中将R3的以太口down掉,则R3的路由表如下:
R3#show ip route Gateway of last resort is not set O O C 192.168.4.0/24 [110/74] via 192.168.3.1, 00:13:51, Serial0/0 192.168.5.0/24 [110/138] via 192.168.3.1, 00:13:51, Serial0/0 192.168.3.0/24 is directly connected, Serial0/0
router rip version 2 no auto-summary network 192.168.6.0 redistribute ospf 1 metric 2 distribute-list 2 in
access-list 1 permit 192.168.3.0 0.0.0.255 access-list 1 permit 192.168.4.0 0.0.0.255 access-list 2 permit 192.168.1.0 0.0.0.255 access-list 2 permit 192.168.2.0 0.0.0.255
解决方法一
R3#show ip route Gateway of last resort is not set O O R R C C 192.168.4.0/24 [110/74] via 192.168.3.1, 00:06:44, Serial0/0 192.168.5.0/24 [110/138] via 192.168.3.1, 00:06:44, Serial0/0 192.168.6.0/24 [120/1] via 192.168.2.5, 00:00:26, FastEthernet0/0 192.168.1.0/24 [120/1] via 192.168.2.5, 00:00:26, FastEthernet0/0 192.168.2.0/24 is directly connected, FastEthernet0/0 192.168.3.0/24 is directly connected, Serial0/0

ospf多区域中nssa默认路由的设置

ospf多区域中nssa默认路由的设置

实验报告实验报告实验目的:通过本实验实现完全nssa 区域,和实现默认路由的方法。

第一步:配置路由器ip 地址地址Router1上的设置上的设置R1(config)#interface s0/0R1(config-if)#ip add 192.168.1.1 255.255.255.0R1(config)#interface loopback 0R1(config-if)#ip add 1.1.1.1 255.255.255.0Router2-router4同理同理第二步:启用路由协议第二步:启用路由协议Router1(asbr 路由器,将loopback 口重分布进OSPF 协议)-router2启用OSPF 协议,router4启用rip 协议,router3启用OSPF 和rip 协议(asbr 路由器)路由器)Router1上的设置上的设置R1(config)#router ospf 1R1(config-router)#network 192.168.1.0 0.0.0.255 area 1 R1(config)#router ospf 1R1(config-router)#redistribute connected subnetsR1(config-router)#area 1 nssaRouter2上的设置上的设置R2(config)#router ospf 1R2(config-router)#network 192.168.1.0 0.0.0.255 area 1 R2(config-router)#network 192.168.2.0 0.0.0.255 area 0 R2(config-router)#network 2.2.2.0 0.0.0.255 area 0R2(config-router)#area 1 nssaRouter3上的设置上的设置R3(config)#router ospf 1R3(config-router)#network 192.168.2.0 0.0.0.255 area 0 R3(config-router)#network 3.3.3.0 0.0.0.255 area 0R3(config)#router ripR3(config-router)#version 2R3(config-router)#network 192.168.3.0R3(config-router)#no auto-summaryRouter4上的设置上的设置R4(config)#router ripR4(config-router)#version 2R4(config-router)#network 192.168.3.0R4(config-router)#network 4.4.4.0R4(config-router)#no auto-summary第三步:设置路由重分布(在router3上设置)上设置)R3(config)#router ripR3(config-router)#redistribute ospf 1 metric 2R3(config)#router ospf 1R3(config-router)#redistribute rip subnets metric 1000第四步:查看路由表第四步:查看路由表Router1上的路由表上的路由表R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP , EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/32 is subnetted, 1 subnetsO IA 2.2.2.2 [110/65] via 192.168.1.2, 00:01:38, Serial0/03.0.0.0/32 is subnetted, 1 subnetsO IA 3.3.3.3 [110/129] via 192.168.1.2, 00:01:38, Serial0/0C 192.168.1.0/24 is directly connected, Serial0/0O IA 192.168.2.0/24 [110/128] via 192.168.1.2, 00:01:38, Serial0/0 Router2上的路由条目上的路由条目R2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user staticrouteo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsO N2 1.1.1.0 [110/20] via 192.168.1.1, 00:00:06, Serial0/02.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback03.0.0.0/32 is subnetted, 1 subnetsO 3.3.3.3 [110/65] via 192.168.2.2, 00:07:45, Serial0/14.0.0.0/24 is subnetted, 1 subnetsO E2 4.4.4.0 [110/1000] via 192.168.2.2, 00:00:06, Serial0/1C 192.168.1.0/24 is directly connected, Serial0/0C 192.168.2.0/24 is directly connected, Serial0/1O E2 192.168.3.0/24 [110/1000] via 192.168.2.2, 00:00:06, Serial0/1 Router4上的路由条目上的路由条目R4#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA externaltype 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsR 1.1.1.0 [120/2] via 192.168.3.1, 00:00:15, Serial0/22.0.0.0/32 is subnetted, 1 subnetsR 2.2.2.2 [120/2] via 192.168.3.1, 00:00:15, Serial0/23.0.0.0/24 is subnetted, 1 subnetsR 3.3.3.0 [120/2] via 192.168.3.1, 00:00:15, Serial0/24.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback0R 192.168.1.0/24 [120/2] via 192.168.3.1, 00:00:15, Serial0/2R 192.168.2.0/24 [120/2] via 192.168.3.1, 00:00:16, Serial0/2C 192.168.3.0/24 is directly connected, Serial0/2上验证第五步:在router1上验证R1#ping 192.168.3.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds: .....Success rate is 0 percent (0/5)在router2上配置,使之正常通信上配置,使之正常通信方法1Router2的设置的设置R2(config)#router ospf 1R2(config-router)#area 1 nssa no-summary在router1上查看上查看R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-ISlevel-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 192.168.1.2 to network 0.0.0.01.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, Serial0/0O*IA 0.0.0.0/0 [110/65] via 192.168.1.2, 00:00:07, Serial0/0验证是否正常通信验证是否正常通信R1#ping 192.168.3.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 784/1107/1440 ms通信成功通信成功方法2在router2上的配置上的配置R2(config)#router ospf 1R2(config-router)#area 1 nssa default-information-originate在router1上查看路由表上查看路由表R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP , EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 192.168.1.2 to network 0.0.0.01.0.0.0/24 is subnetted, 1 subnets C1.1.1.0 is directly connected, Loopback02.0.0.0/32 is subnetted, 1 subnetsO IA2.2.2.2 [110/65] via 192.168.1.2, 00:00:05, Serial0/03.0.0.0/32 is subnetted, 1 subnets O IA3.3.3.3 [110/129] via 192.168.1.2, 00:00:05, Serial0/0 C192.168.1.0/24 is directly connected, Serial0/0 O IA 192.168.2.0/24 [110/128] via 192.168.1.2, 00:00:05, Serial0/0 O*N2 0.0.0.0/0 [110/1] via 192.168.1.2, 00:00:05, Serial0/0验证是否正常通信验证是否正常通信R1#ping 192.168.3.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 784/1107/1440 ms方法3Router2上的设置上的设置R2(config-router)#area1 nssa default-information-originate no-summary查看router1上的路由表上的路由表R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user staticrouteo - ODR, P - periodic downloaded static routeGateway of last resort is 192.168.1.2 to network 0.0.0.01.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, Serial0/0O*IA 0.0.0.0/0 [110/65] via 192.168.1.2, 00:00:38, Serial0/0。

不同的OSPF进程互相重分发

不同的OSPF进程互相重分发

不同OSPF 进程之间的重分发我们为什么需要在不同的OSPF 进程之间进行充分发呢?@过滤OSPF 路由1、过滤“域内”路由:一般情况下,我们是没有办法过滤域内路由的;因为在同一个OSPF区域中,计算域内路由使用的是1类LSA或者2类LSA。

这些LSA在同一个区域中必须是相同的,为了实现构建一个完整的区域拓扑。

属于邻接关系的两个路由器之间的数据库中的1类LSA和2类LSA必须是完全相同的;如果想过滤的话,我们可以使用分发列表,作用于将路由条目放入路由表的时候。

除此之外,我们还可以在同一个区域中,运行不同的OSPF进程,然后在不同的进程之间实现重分发,这样一来的话。

虽然是在同一个区域,但是不同的OSPF进程之间的路由互相学习的时候会看做是不同的路由,到了对方的进程中,是作为外部路由来出现的,此时我们就可以在同一个区域中过滤之前的那种所谓的“O ”的路由了;其实现在已经变换成了" 外部路由"之间的过滤了;2、过滤O IA 路由:与其我们通过不同的OSPF进程来划分同一个区域,从而导致在重分发的过程中实现路由的过滤。

还不如我们将同一个区域划分成不同的区域,这样的话,原来是与同一个区域的路由,现在学习时候就变成了O IA 的路由。

此时此刻,我们可以在ABR 上实现3 类LSA的过滤;我们可以理解ABR的功能:@将非骨干区域中的内部路由转发到骨干区域中去;@将骨干区域中的内部路由以及从其他非骨干区域学习的域间路由转发到其他的非骨干区域;3、过滤外部路由;因为到目前为止,我们还不可以实现5 类LSA 的过滤。

如果想过滤外部路由的话,我们也可以通过在OSPF内部路由上运行不同的OSPF进程,然后在进程之间实现重分发;@划分OSPF 域;要么出于管理的目的或者在“重分发点”上控制路由的角度来考虑,我们将一个完整的OSPF路由域通过不同的OSPF进程来划分,都是一个很正常的实现方案;此时,我们将不同的OSPF进程看做是完全不同的“两个协议”。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

eigrp/ospf双向分发配置
往eigrp里做重分布时,metric值默认是 infinity;
人工指定metric值时包括:带宽,延迟,可靠度, 负载,MTU。
(注:可靠度=255时最大,延迟=1时最 小,MTU=1500,一般来说这三个值都设成这 样.而且在配置metric值时的顺序就是这样 的顺序.)
eigrp/rip双向分发配置
router eigrp [ID]: redistribute rip metric 10000 100 255 1
1500
router rip: redistribute eigrp [ID] metric 10
虚链路
router-id X.X.X.X area X virtual-link X.X.X.X
//subnets表明子网通告
eigrp/ospf双向分发配置:
router eigrp [ID]: redistribute ospf [ID] metric 10000 100
255 1 1500
router ospf [ID]: redistribute eigrp [ID] metric 200 subnets
由此在做此类配置时,主要是各区域间重 分发的配置。
ospf/rip双向分发配置
router rip: redistribute ospf [ID] metric 10 //metric度
量值不能大于16
router ospf [ID]: redistribute rip metric 200 subnets
Ospf多区域/路由重分布
Ospf多区域
(1)基本多区域设置 (2)虚链路设置
基本多区域设置
配置举例
R0: R0(config)#router ospf 10 R0(config-router)# network 192.168.0.0 0.0.0.255 area 1
R1: R1(config)#router ospf 10 R1(config-router)# network 192.168.0.0 0.0.0.255 area 1 R1(config-router)# network 192.168.1.0 0.0.0.255 area 2 R1(config-router)# network 192.168.3.0 0.0.0.255 area 0
R3: R3(config)#router ospf R3(config-router)# network 192.168.4.0 0.0.0.255 area 3
虚链路设置
路由重分布
路由重分布
Rip,Eigrp,Ospf都属于内部路由协议,所以 在涉及到二种协议的路由上应做双向重分 发。
R4: R4(config)#router ospf 10 R4(config-router)# network 192.168.0.0 0.0.0.255 area 2
R2: R2(config)#router ospf 10 R2(config-router)# network 192.168.3.0 0.0.0.255 area 0 R2(config-router)# network 192.168.4.0 0.0.0.255 area 3
相关文档
最新文档