lab 2 EIGRP Default Route

 
EIGRP发布默认路由的四种方式
  • Redistributed default route

    #R1#
    router eigrp 100
     
    redistribute static
     network 10.1.1.1 0.0.0.0
     no auto-summary
    ip route 0.0.0.0 0.0.0.0 202.100.1.10
    

     

     

  • By using ip summary-address command

    #interface FastEthernet1/0
     ip address 10.1.1.1 255.255.255.0
     
    ip summary-address eigrp 100 0.0.0.0 0.0.0.0 5

     

  • Default route by using ip default-network command

    R1(config)#ip default-network 202.100.1.0(
    写成主类
    这样就可以把这条路由下发给其它的路由器当做默认路由了
     使用本命令要满足以下条件:
    1、接口IP地址必须是主类
    2、接口必须宣告进EIGRP
    3、使用命令下发时也必须写主类网络号

     

  • Default route with network 0.0.0.0 command

    R1#router eigrp 100
     network 1.1.1.1 0.0.0.0
     network 10.1.1.1 0.0.0.0
     network 0.0.0.0
     no auto-summary
    
    ip route 0.0.0.0 0.0.0.0 FastEthernet0/0(
    写下一跳不行,必须写接口

     

基本网络配置

 

 

R2#
interface FastEthernet0/0
 ip address 10.1.1.10 255.255.255.0
R1#

interface FastEthernet0/0
 ip address 202.100.1.1 255.255.255.0

interface FastEthernet1/0
 ip address 10.1.1.1 255.255.255.0

ip route 0.0.0.0 0.0.0.0 202.100.1.10

Interne#

interface FastEthernet0/0
 ip address 202.100.1.10 255.255.255.0

ip route 0.0.0.0 0.0.0.0 202.100.1.1

 

 

Redistributed default route配置

 

 

R1#
router eigrp 100
 
redistribute static
 network 10.1.1.1 0.0.0.0
 no auto-summary

 

 

验证

 
#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 10.1.1.1 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
D*EX 0.0.0.0/0 [170/307200] via 10.1.1.1, 00:17:42, FastEthernet0/0

#

 

 

Default route By using ip summary-address command配置

 
R1#
router eigrp 100
 network 10.1.1.1 0.0.0.0
 no auto-summary

interface FastEthernet1/0
 ip address 10.1.1.1 255.255.255.0
 
ip summary-address eigrp 100 0.0.0.0 0.0.0.0 5

 

 

验证

 
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 10.1.1.1 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
D* 0.0.0.0/0 [90/284160] via 10.1.1.1, 00:00:05, FastEthernet0/0

 

 

Default route by using ip default-network command配置

  • The EIGRP default route can be created with the ip default-network network-number command. The classful destination network.

  • the network must either be an EIGRP-derived network in the routing table or be generated using a static route, which has been redistributed into EIGRP

  • the ip default-network command does not benefit router R1 directly.

R1#router eigrp 100
 network 10.1.1.1 0.0.0.0
 network 202.100.1.0
 no auto-summary

ip default-network 202.100.1.0
ip route 0.0.0.0 0.0.0.0 202.100.1.10

 

 

验证

 
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 10.1.1.1 to network 202.100.1.0
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/409600] via 10.1.1.1, 00:04:01, FastEthernet0/0
D* 202.100.1.0/24 [90/307200] via 10.1.1.1, 00:00:14, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0

 

 

Default route with network 0.0.0.0 command配置

if the network 0.0.0.0 command is added to the EIGRP configuration, it redistributes a default route as a result of the ip route 0.0.0.0 0.0.0.0 interface command.
R1#router eigrp 100
 network 1.1.1.1 0.0.0.0
 network 10.1.1.1 0.0.0.0
 
network 0.0.0.0
 no auto-summary

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

 

 

验证

 
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 10.1.1.1 to network 0.0.0.0
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/409600] via 10.1.1.1, 00:10:37, FastEthernet0/0
D    202.100.1.0/24 [90/307200] via 10.1.1.1, 00:00:30, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
D* 0.0.0.0/0 [90/307200] via 10.1.1.1, 00:00:02, FastEthernet0/0

 

 

 

 

 

 

 

 





posted @ 2018-01-09 21:19  faerl  阅读(296)  评论(0)    收藏  举报