EIGRP区域注入静态路由的三种方法--CCNP学习笔记

EIGRP区域注入静态路由的三种方法
拓扑图

R2 为外网,R1 为边界路由器。R3,R4 为内部路由器
 
基本配置
 
R2配置:
R2#sh run
Building configuration...
 
Current configuration : 794 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
interface Loopback0

 ip address 2.2.2.2 255.255.255.0

!
interface Serial0/0

 ip address 12.1.1.2 255.255.255.0

 serial restart-delay 0
!
interface Serial0/1

 no ip address

 shutdown
 serial restart-delay 0
!
interface Serial0/2

 no ip address

 shutdown
 serial restart-delay 0
!
interface Serial0/3

 no ip address

 shutdown
 serial restart-delay 0
!
ip http server
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end
 
 
R1配置:
R1#sh ru

*Mar  1 00:21:11.123: %SYS-5-CONFIG_I: Configured from console by console

R1#sh ru
R1#sh run
Building configuration...
 
Current configuration : 1011 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
interface Loopback0

 ip address 1.1.1.1 255.255.255.0

!
interface Serial0/0

 ip address 12.1.1.1 255.255.255.0

 serial restart-delay 0
!
interface Serial0/1

 ip address 13.1.1.1 255.255.255.0

 serial restart-delay 0
!
interface Serial0/2

 no ip address

 shutdown
 serial restart-delay 0
!
interface Serial0/3

 no ip address

 shutdown
 serial restart-delay 0
!
router eigrp 90
 redistribute static
 network 1.1.1.0 0.0.0.255
 network 13.1.1.0 0.0.0.255

 no auto-summary

!
ip http server
ip route 0.0.0.0 0.0.0.0 Serial0/0
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
end
 
R3配置
R3#sh running-config
Building configuration...
 
Current configuration : 922 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
interface Loopback0

 ip address 3.3.3.3 255.255.255.0

!
interface Serial0/0

 ip address 35.1.1.3 255.255.255.0

 serial restart-delay 0
!
interface Serial0/1

 ip address 13.1.1.3 255.255.255.0

 serial restart-delay 0
!
interface Serial0/2

 no ip address

 shutdown
 serial restart-delay 0
!
interface Serial0/3

 no ip address

 shutdown
 serial restart-delay 0
!
router eigrp 90
 network 3.3.3.0 0.0.0.255
 network 13.1.1.0 0.0.0.255
 network 35.1.1.0 0.0.0.255

 no auto-summary

!
ip http server
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
end
 
方法一:
重分布
边界路由上做静态路由,然后重分布到内部路由器和三层交换机
 
在EIGRP进程中redistribute static
 
R3上路由表
 

方法二:
network 0.0.0.0
 
R1上做默认路由,再宣告network0.0.0.0
 
与重分布静态路由明显区别在于管理距离,重分布为 170 ,而此方法还是为 EIGRP 90
R3的路由表
 

方法三:
ip default-network
 
边界路由器上:
全局配置模式下

ip default-network [外网主类地址]

这里是ip default-network 12.0.0.0

 
进入EIGRP进程配置
network  [外网主类地址]
这里是network  12.0.0.0
 
本地有外网主类路由
配置一条静态路由或者关闭EIGRP的自动汇总

在这里是配置 ip route 12.0.0.0 255.0.0.0 null 0

 此方法 不需要默认路由
R1的路由表
 

R3的路由表

注意点:带星号的就是默认路由

 

 

你可能感兴趣的:(路由器,休闲,ccnp,EIGRP,注入静态路由)