RIPV1与RIPV2,IGRP与EIGRP和单区域OSPF使用和配置
实验目的:熟练掌握RIP,IGRP,EIGRP和OSPF四种路由协议的原理和配置
实验条件:2600系列路由器两台,做测试用的PC机两台
一. RIPV1和RIPV2的配置
本实验需要2600系列路由器两台,交换机一台,PC机两台,console线两条
Step 1 配置路由器GAD的主机名和密码
Router>enable
Router#configure terminal
Router(config)#hostname GAD
GAD(config)#enable secret class
GAD(config)#line console 0
GAD(config-line)#password cisco
GAD(config-line)#login
GAD(config-line)#line vty 0 4
GAD(config-line)#password cisco
GAD(config-line)#login
GAD(config-line)#exit
GAD(config)#
Step 2 配置路由器GAD的Serial 0/0
GAD(config)#interface serial 0/0
GAD(config-if)#ip address 172.17.0.1 255.255.0.0
GAD(config-if)#clock rate 64000
GAD(config-if)#no shutdown
GAD(config-if)#exit
Step 3 配置路由器GAD的fastethernet 0/0
GAD(config)#interface fastethernet 0/0
GAD(config-if)#ip address 172.16.0.1 255.255.0.0
GAD(config-if)#no shutdown
GAD(config-if)#exit
Step 4 配置路由器GAD的主机名列表
GAD(config)#ip host BHM 172.18.0.1 172.17.0.2
Step 5 在GAD路由器上启动RIP
GAD(config)#router rip
GAD(config-router)#network 172.16.0.0
GAD(config-router)#network 172.17.0.0
GAD(config-router)#exit
GAD(config)#exit
Step 6 保存路由器GAD上的配置文件
GAD#copy running-config startup-config
Destination filename [startup-config]?[Enter]
Step 7 配置路由器BHM的主机名和密码
Router>enable
Router#configure terminal
Router(config)#hostname BHM
BHM(config)#enable secret class
BHM(config)#line console 0
BHM(config-line)#password cisco
BHM(config-line)#login
BHM(config-line)#line vty 0 4
BHM(config-line)#password cisco
BHM(config-line)#login
BHM(config-line)#exit
BHM(config)#
Step 8 配置路由器BHM的Serial 0/0
BHM(config)#interface serial 0/0
BHM(config-if)#ip address 172.17.0.2 255.255.0.0
BHM(config-if)#no shutdown
BHM(config-if)#exit
Step 9 配置路由器BHM的fastethernet 0/0
BHM(config)#interface fastethernet 0/0
BHM(config-if)#ip address 172.18.0.1 255.255.0.0
BHM(config-if)#no shutdown
BHM(config-if)#exit
Step 10 配置路由器BHM的主机名列表
BHM(config)#ip host GAD 172.16.0.1 172.17.0.1
Step 11 在BHM路由器上启动RIP
BHM(config)#router rip
BHM(config-router)#network 172.18.0.0
BHM(config-router)#network 172.17.0.0
BHM(config-router)#exit
BHM(config)#exit
Step 12 保存路由器BHM上的配置文件
BHM#copy running-config startup-config
Destination filename [startup-config]?[Enter]
Step 13 为PC配置正确的IP地址,子网掩码和缺省网关
a. 连接到GAD的PC
IP Address: 172.16.0.2
Subnet mask: 255.255.0.0
Default gateway: 172.16.0.1
b. 连接到BHM的PC
IP Address: 172.18.0.2
Subnet mask: 255.255.0.0
Default gateway: 172.18.0.1
Step 14 检查路由器GAD和BHW的路由表
GAD#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate
default
U - per-user static route, o - ODR, P - periodic downloaded
static route
T - traffic engineered route
Gateway of last resort is not set
C 172.17.0.0/16 is directly connected, Serial0/0
C 172.16.0.0/16 is directly connected, FastEthernet0/0
R 172.18.0.0/16 [120/1] via 172.17.0.2, Serial0/0
BHM#show ip route
Codes: C - connected, S - static, I - IGRP, 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, 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
C 172.17.0.0/16 is directly connected, Serial0/0
R 172.16.0.0/16 [120/1] via 172.17.0.1, 00:00:27 , Serial0/0
C 172.18.0.0/16 is directly connected, FastEthernet0/0
Step 15 在路由器GAD和BHW上启动RIPV2
GAD(config)#router rip
GAD(config-router)#version 2
GAD(config-router)#exit
GAD(config)#exit
BHM(config)#router rip
BHM(config-router)#version 2
BHM(config-router)#exit
BHM(config)#exit