一、拓扑图:


 

将OSPF路由重分发到EIGRP域_EIGRP


、配置重分发进EIGRP 和IS-IS:



1、 配置三台路由器的IP地址与协议,配置完后,查看R1路由表:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />



R1#sho ip route         
Codes: C - connected, S - static, 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         
       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         
 
     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks         
C       172.16.255.0/30 is directly connected, Serial1/1         
C       172.16.1.0/24 is directly connected, Loopback0         
C       172.16.2.0/24 is directly connected, Loopback0

查看R2的路由表,看到R2学到了全网的路由:



R2#show ip route         
Codes: C - connected, S - static, 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         
       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         
 
, 2 masks         
C       172.16.255.0/30 is directly connected, Serial1/0         
i L1    172.16.1.0/24 [115/20] via 172.16.255.1, Serial1/0         
i L1    172.16.2.0/24 [115/20] via 172.16.255.1, Serial1/0         
C    192.168.255.0/24 is directly connected, Serial1/1         
D    192.168.1.0/24 [90/2297856] via 192.168.255.1, 05:25:40, Serial1/1         
D    192.168.2.0/24 [90/2297856] via 192.168.255.1, 05:25:40, Serial1/1         
R2#



 


3 、那么我现在在R2上做重分发,一定要切记:要么R1和R2全用L1-2 类型,要么就用全用L1或L2类型,或者说当R1为L1,R2为L1-2,但这样你发布的时候要用L1-2类型做重分发,当R1和R2为L2类型的时候,R2重分发用L2或者L1-2类型重分发都能学到,同理L1也一样,如果R2不去手动指定类型,默认以L2默型发出去,所以当你在R1和R2都没指定类型的时候,也就是R1和R2都为L1-2。但R2却是以L2发出去,这样,R3就学不到R1发过去的路由了,如果R2指定类型,然后你重分发的时候不去指定类型,那么它将会和R2本身路由器的类型同步。(这是我一个一个去证明的,其实我们要注意的就是R1和R2是否是同类型或者是R2为L1-2类型,因为这样是可以搭配,然后在R2上把ISIS发到EIGRP的时候用同类型发布或L1-2发布就不会有问题。同时也要注意把EIGRP 发到ISIS中,默认不加类型都是以L2类型,要两面都要考虑,不然也会造成R1学不到R3那边的路由。






R2(config)#router eigrp 100




R2(config-router)#redistribute connected



 


5 、一切完毕,我们再看一下,R1的路由:


 


R1#s

h ip route         
Codes: C - connected, S - static, 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         
       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         
 
     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks         
C       172.16.255.0/30 is directly connected, Serial1/1         
C       172.16.1.0/24 is directly connected, Loopback0         
C       172.16.2.0/24 is directly connected, Loopback0         
i L2 192.168.255.0/24 [115/84] via 172.16.255.2, Serial1/1         
i L2 192.168.1.0/24 [115/84] via 172.16.255.2, Serial1/1         
i L2 192.168.2.0/24 [115/84] via 172.16.255.2, Serial1/1                  
R1#


 


R3 的路由:


 


R3#show

ip route         
Codes: C - connected, S - static, 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         
       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         
 
     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks         
D EX    172.16.255.0/30 [170/2681856] via 192.168.255.2, 00:00:10, Serial1/0         
D EX    172.16.1.0/24 [170/2172416] via 192.168.255.2, 00:00:10, Serial1/0         
D EX    172.16.2.0/24 [170/2172416] via 192.168.255.2, 00:00:10, Serial1/0                  
C    192.168.255.0/24 is directly connected, Serial1/0         
C    192.168.1.0/24 is directly connected, Loopback0         
C    192.168.2.0/24 is directly connected, Loopback0         
R3#


 


6 、三条D EX外部重分发进来的路由全部学到.







总结:同一区域,L1或L2 都可以和L1-2搭配,在保证R2路由器学到全网路由后,路由器不同类型或同类型发布ISIS的时候都可以用类型L1-2重发布,不指定的话它会是默认L2重分发。同理发布EIGRP的时候如果同类型,可以同类型发布或者用L1-2。但不同类型只能用L1-2发布。总而言之:在建立起IS-IS邻居后,重分发的时候用L1-2是不会有错的,但是会增加IS-IS database ,如果概念清楚,用同类型最好了。所以说事物总是两面性的.


转载于:https://blog.51cto.com/supercisco/248835