【实验拓扑】

图中的x用1代替,例如155.x.0.0 = 155.1.0.0
 

 

 

【实验要求】

在R5上配置150.1.5.0/24为默认网络
并将其冲发布到EIGRP中,让R4能够学习到

 
【实验步骤】
1、按照上图配置好接口地址以及EIGRP
2、在R5上配置默认网络
R5:
ip default-network 150.1.5.0
ip default-network 150.1.0.0

router eigrp 100
no auto-summary
redistribute static

 
【看一下为何配置两条默认网络】
1、如果只配置1条ip default-network 150.1.5.0

 
R5(config)# ip default-network 150.1.0.0
R5#show ip route
*Mar  1 00:41:51.627: %SYS-5-CONFIG_I: Configured from console by console
R5#show ip route
Gateway of last resort is not set

 
     155.1.0.0/24 is subnetted, 2 subnets
C       155.1.0.0 is directly connected, Serial0/0
C       155.1.45.0 is directly connected, Serial0/1
     150.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       150.1.5.0/24 is directly connected, Loopback0
D       150.1.4.0/24 [90/10639872] via 155.1.0.4, 00:39:09, Serial0/0
S       150.1.0.0/16 [1/0] via 150.1.5.0

 
2、配置了两条默认路由后的路由表

 
R5(config)#ip default-network 150.1.5.0
R5(config)#ip default-network 150.1.0.0
R5(config)#end
R5#show ip route
*Mar  1 00:41:32.143: %SYS-5-CONFIG_I: Configured from console by console
R5#show ip route

 
Gateway of last resort is 150.1.5.0 to network 150.1.0.0

 
     155.1.0.0/24 is subnetted, 2 subnets
C       155.1.0.0 is directly connected, Serial0/0
C       155.1.45.0 is directly connected, Serial0/1
 *   150.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       150.1.5.0/24 is directly connected, Loopback0
D       150.1.4.0/24 [90/10639872] via 155.1.0.4, 00:38:49, Serial0/0
S*      150.1.0.0/16 [1/0] via 150.1.5.0

 
我们会发现配置了1条的被路由表识别为静态路由 S,而配置了两条后会识别为静态默认路由 S*

配置了重发布后在R4上学习到的不同效果,注意多了一个 *,代表默认网络
1、配置了1条默认路由效果
R4:
R4#show ip route
     155.1.0.0/24 is subnetted, 2 subnets
C       155.1.0.0 is directly connected, Serial0/0
C       155.1.45.0 is directly connected, Serial0/1
     150.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
D       150.1.5.0/24 [90/10639872] via 155.1.0.5, 00:00:04, Serial0/0
C       150.1.4.0/24 is directly connected, Loopback0
D EX    150.1.0.0/16 [170/10639872] via 155.1.0.5, 00:00:04, Serial0/0

 
2、配置了两条默认路由效果
R4#show ip route
     155.1.0.0/24 is subnetted, 2 subnets
C       155.1.0.0 is directly connected, Serial0/0
C       155.1.45.0 is directly connected, Serial0/1
     150.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
D       150.1.5.0/24 [90/10639872] via 155.1.0.5, 00:00:03, Serial0/0
C       150.1.4.0/24 is directly connected, Loopback0
D * EX    150.1.0.0/16 [170/10639872] via 155.1.0.5, 00:00:03, Serial0/0