EIGRP发布默认路由的四种方式
-
Redistributed default route
#R1# router eigrp 100
redistribute staticnetwork 10.1.1.1 0.0.0.0no auto-summary ip route 0.0.0.0 0.0.0.0 202.100.1.10
-
By using ip summary-address command
#interface FastEthernet1/0ip 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 100network 1.1.1.1 0.0.0.0network 10.1.1.1 0.0.0.0network 0.0.0.0no auto-summaryip route 0.0.0.0 0.0.0.0 FastEthernet0/0(
写下一跳不行,必须写接口)
基本网络配置
R2#
interface FastEthernet0/0ip address 10.1.1.10 255.255.255.0
R1#
interface FastEthernet0/0ip address 202.100.1.1 255.255.255.0
interface FastEthernet1/0ip 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/0ip 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 100redistribute static
network 10.1.1.1 0.0.0.0no auto-summary
验证
#R2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - 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 10.1.1.1 to network 0.0.0.010.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, FastEthernet0/0D*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 100network 10.1.1.1 0.0.0.0no auto-summary
interface FastEthernet1/0ip address 10.1.1.1 255.255.255.0ip 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 - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - 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 10.1.1.1 to network 0.0.0.010.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, FastEthernet0/0D* 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 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 100network 10.1.1.1 0.0.0.0network 202.100.1.0no auto-summaryip 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 - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - 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 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/0D* 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.0network 10.1.1.1 0.0.0.0network 0.0.0.0
no auto-summaryip 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 - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - 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 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/010.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, FastEthernet0/0D* 0.0.0.0/0 [90/307200] via 10.1.1.1, 00:00:02, FastEthernet0/0
来自为知笔记(Wiz)