A-A+

EIGRP配置实验之路由注入

2016年02月21日 站长资讯 暂无评论

三种路由注入3中方法方法:

重分布:添加一条0.0.0.0默认路由,,在EIGRP路由进程中重分布该默认路由。

通 告:添加一条0.0.0.0默认路由,在EIGRP路由进程中network通告该默认路由。

ip default-network:

首先,ip default-network后面的网络必须是外网口所在网段的主类网络。

其次,在EIGRP路由进程中network通告该主类网络。

最后,必须存在到该主类网络的路由,没有的话,可以手动添加。

1、实验拓扑

2、基础配置

  1. R1  
  2. interface Serial0/0  
  3.  ip address 12.1.1.1 255.255.255.0  
  4.    
  5. R2  
  6. interface Serial0/0  
  7.  ip address 12.1.1.2 255.255.255.0  
  8. interface Serial0/1  
  9.  ip address 23.1.1.2 255.255.255.0  
  10. router eigrp 90  
  11.  network 23.1.1.0 0.0.0.255  
  12.  no auto-summary  
  13.    
  14. R3  
  15. interface Serial0/0  
  16.  ip address 34.1.1.3 255.255.255.0  
  17.  serial restart-delay 0  
  18. interface Serial0/1  
  19.  ip address 23.1.1.3 255.255.255.0  
  20.  serial restart-delay 0  
  21. router eigrp 90  
  22.  network 23.1.1.0 0.0.0.255  
  23.  network 34.1.1.0 0.0.0.255  
  24.  auto-summary  
  25.    
  26. R4  
  27. interface Serial0/0  
  28.  ip address 34.1.1.4 255.255.255.0  
  29. router eigrp 90  
  30.  network 34.1.1.0 0.0.0.255  
  31.  auto-summary  

3、重分布配置

  1. R2(config)#ip route 0.0.0.0 0.0.0.0 s0/0  
  2. R2(config)#router eigrp 90  
  3. R2(config-router)#redistribute static   
  4.    
  5. R3#show ip route  
  6. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  7.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area   
  8.        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  9.        E1 - OSPF external type 1, E2 - OSPF external type 2  
  10.        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  11.        ia - IS-IS inter area, * - candidate default, U - per-user static route  
  12.        o - ODR, P - periodic downloaded static route  
  13.    
  14. Gateway of last resort is 23.1.1.2 to network 0.0.0.0  
  15.    
  16.      34.0.0.0/24 is subnetted, 1 subnets  
  17. C       34.1.1.0 is directly connected, Serial0/0  
  18.      23.0.0.0/24 is subnetted, 1 subnets  
  19. C       23.1.1.0 is directly connected, Serial0/1  
  20. D*EX 0.0.0.0/0 [170/2681856] via 23.1.1.2, 00:00:04, Serial0/1  
  21. R3#  
  22.    
  23. R4#show ip route  
  24. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  25.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area   
  26.        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  27.        E1 - OSPF external type 1, E2 - OSPF external type 2  
  28.        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  29.        ia - IS-IS inter area, * - candidate default, U - per-user static route  
  30.        o - ODR, P - periodic downloaded static route  
  31.    
  32. Gateway of last resort is 34.1.1.3 to network 0.0.0.0  
  33.    
  34.      34.0.0.0/24 is subnetted, 1 subnets  
  35. C       34.1.1.0 is directly connected, Serial0/0  
  36.      23.0.0.0/24 is subnetted, 1 subnets  
  37. D       23.1.1.0 [90/2681856] via 34.1.1.3, 00:01:51, Serial0/0  
  38. D*EX 0.0.0.0/0 [170/3193856] via 34.1.1.3, 00:00:12, Serial0/0  
  39. R4#  

重分布进来的静态路由属外部路由,故其AD为170

4、通告配置

  1. R2(config)#ip route 0.0.0.0 0.0.0.0 s0/0  
  2. R2(config)#router eigrp 90  
  3. R2(config-router)#network 0.0.0.0  
  4.    
  5. R3#show ip route  
  6. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  7.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area   
  8.        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  9.        E1 - OSPF external type 1, E2 - OSPF external type 2  
  10.        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  11.        ia - IS-IS inter area, * - candidate default, U - per-user static route  
  12.        o - ODR, P - periodic downloaded static route  
  13.    
  14. Gateway of last resort is 23.1.1.2 to network 0.0.0.0  
  15.    
  16.      34.0.0.0/24 is subnetted, 1 subnets  
  17. C       34.1.1.0 is directly connected, Serial0/0  
  18.      23.0.0.0/24 is subnetted, 1 subnets  
  19. C       23.1.1.0 is directly connected, Serial0/1  
  20.      12.0.0.0/24 is subnetted, 1 subnets  
  21. D       12.1.1.0 [90/2681856] via 23.1.1.2, 00:00:02, Serial0/1  
  22. D*   0.0.0.0/0 [90/2681856] via 23.1.1.2, 00:00:02, Serial0/1  
  23. R3#  
  24.    
  25. R4#show ip route  
  26. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  27.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area   
  28.        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  29.        E1 - OSPF external type 1, E2 - OSPF external type 2  
  30.        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  31.        ia - IS-IS inter area, * - candidate default, U - per-user static route  
  32.        o - ODR, P - periodic downloaded static route  
  33.    
  34. Gateway of last resort is 34.1.1.3 to network 0.0.0.0  
  35.    
  36.      34.0.0.0/24 is subnetted, 1 subnets  
  37. C       34.1.1.0 is directly connected, Serial0/0  
  38.      23.0.0.0/24 is subnetted, 1 subnets  
  39. D       23.1.1.0 [90/2681856] via 34.1.1.3, 00:03:29, Serial0/0  
  40.      12.0.0.0/24 is subnetted, 1 subnets  
  41. D       12.1.1.0 [90/3193856] via 34.1.1.3, 00:00:28, Serial0/0  
  42. D*   0.0.0.0/0 [90/3193856] via 34.1.1.3, 00:00:28, Serial0/0  
  43. R4#  

network通告进来的静态路由属内部路由,故其AD为90

5、ip default-network配置

  1. R2(config)#ip default-network 12.0.0.0   
  2. R2(config)#router eigrp 90  
  3. R2(config-router)#network 12.0.0.0 0.255.255.255  
  4. R2(config-router)#exit  
  5. R2(config)#ip route 12.0.0.0 255.0.0.0 null 0   
  6.    
  7. R3#show ip route  
  8. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  9.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area   
  10.        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  11.        E1 - OSPF external type 1, E2 - OSPF external type 2  
  12.        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  13.        ia - IS-IS inter area, * - candidate default, U - per-user static route  
  14.        o - ODR, P - periodic downloaded static route  
  15.    
  16. Gateway of last resort is 23.1.1.2 to network 12.0.0.0  
  17.    
  18.      34.0.0.0/24 is subnetted, 1 subnets  
  19. C       34.1.1.0 is directly connected, Serial0/0  
  20.      23.0.0.0/24 is subnetted, 1 subnets  
  21. C       23.1.1.0 is directly connected, Serial0/1  
  22.      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks  
  23. D       12.1.1.0/24 [90/2681856] via 23.1.1.2, 00:01:28, Serial0/1  
  24. D*      12.0.0.0/8 [90/2169856] via 23.1.1.2, 00:00:35, Serial0/1  
  25. R3#  
  26.    
  27. R4#show ip route  
  28. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  29.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area   
  30.        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  31.        E1 - OSPF external type 1, E2 - OSPF external type 2  
  32.        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  33.        ia - IS-IS inter area, * - candidate default, U - per-user static route  
  34.        o - ODR, P - periodic downloaded static route  
  35.    
  36. Gateway of last resort is 34.1.1.3 to network 12.0.0.0  
  37.    
  38.      34.0.0.0/24 is subnetted, 1 subnets  
  39. C       34.1.1.0 is directly connected, Serial0/0  
  40.      23.0.0.0/24 is subnetted, 1 subnets  
  41. D       23.1.1.0 [90/2681856] via 34.1.1.3, 00:06:38, Serial0/0  
  42.      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks  
  43. D       12.1.1.0/24 [90/3193856] via 34.1.1.3, 00:01:59, Serial0/0  
  44. D*      12.0.0.0/8 [90/2681856] via 34.1.1.3, 00:01:07, Serial0/0  
  45. R4#  
标签:

给我留言