分类: 系统运维
2009-05-15 11:47:03
环境:两台2500系列路由器,由串口相连。
要求:在RIPv1和EIGRP中将两个相同主类网络的不同子网由另一个主类网络分割,如何能学到对端网络。
RIP配置:
步骤一、基本配置
Router>
Router>enable
Router#config terminal
Router(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#line console 0
R1(config-line)#logging synchronous
R1(config-line)#exec-timeout 0 0
R1(config-line)#exit
步骤二、接口配置
R1的配置:
R1(config)#interface s0
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#interface loopback 0
R1(config-if)#ip address
R1(config-if)#
R2的配置:
R2(config)#interface s1
R2(config-if)#ip add 172.16.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface loopback 0
R2(config-if)#ip address
R2(config-if)#exit
R2(config)#
步骤三、启用RIP路由选择协议
R1的配置:
R1(config)#router rip à启用RIP
R1(config-router)#network
R1(config-router)#network 172.16.0.0
R1(config-router)#exit
R1(config)#
R2的配置:
R2(config)#router rip à启用RIP
R2(config-router)#network
R2(config-router)#network 172.16.0.0
R2(config-router)#exit
R2(config)#end
显示路由信息
R1#show ip route à显示路由信息
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, 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 not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial0 à没有学习到任何路由条目
C
C
步骤四、配置辅助IP
R1(config)#interface s0
R1(config-if)#ip address
R2(config)#interface s1
R2(config-if)#ip address
步骤四、显示路由信息
R1#show ip route à显示路由信息
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, 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 not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial0
C
R
R
C
步骤五、显示当前配置信息
R1的当前配置:
R1#show running-config
hostname R1
!
no ip domain-lookup
!
interface Loopback0
ip address
!
interface Serial0
ip address
ip address 172.16.1.1 255.255.255.0
clockrate 64000
!
router rip
network
network 172.16.0.0
!
End
R2的当前配置:
R2#show running-config
!
hostname R2
no ip domain-lookup
!
interface Loopback0
ip address
!
interface Serial1
ip address
ip address 172.16.1.2 255.255.255.0
!
router rip
network
network 172.16.0.0
!
End
步骤八、启用EIGRP
R1的配置:
R1(config)#no router rip à关闭IGRP
R1(config)#router eigrp 100 à启用EIGRP
R1(config-router)#network
R1(config-router)#network 172.16.1.0
R1(config-router)#no auto-summary
R2的配置:
R2(config)#no router rip
R2(config)#router eigrp 100
R2(config-router)#network
R2(config-router)#network 172.16.1.0
R2(config-router)#no auto-summary
测试:
R1#show ip route à显示路由
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, 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 not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial0
D
C
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, 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 not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial1
C
D
步骤九、显示当前配置
R1的配置:
R1#show running-config
hostname R1
no ip domain-lookup
!
interface Loopback0
ip address
!
interface Serial0
ip address
ip address 172.16.1.1 255.255.255.0
clockrate 64000
!
router eigrp 100
network
network 172.16.1.0
no auto-summary
!
end
R2的配置:
R2#show running-config
hostname R2
no ip domain-lookup
!
interface Loopback0
ip address
!
interface Serial1
ip address
ip address 172.16.1.2 255.255.255.0
!
router eigrp 100
network
network 172.16.1.0
no auto-summary
!
end