RIPV1与RIPV2,IGRP与EIGRP和单区域OSPF使用和配置

RIPV1RIPV2IGRPEIGRP和单区域OSPF使用和配置

实验目的:熟练掌握RIP,IGRP,EIGRPOSPF四种路由协议的原理和配置

实验内容:RIP的配置

          IGRP的配置         

EIGRP的配置

          单区域OSPF的配置         

实验条件:2600系列路由器两台,做测试用的PC机两台

一.RIPV1RIPV2的配置

本实验需要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 配置路由器GADSerial 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 配置路由器GADfastethernet 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 配置路由器BHMSerial 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 配置路由器BHMfastethernet 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. 连接到GADPC

IP Address: 172.16.0.2

Subnet mask: 255.255.0.0

Default gateway: 172.16.0.1

b. 连接到BHMPC

IP Address: 172.18.0.2

Subnet mask: 255.255.0.0

Default gateway: 172.18.0.1

Step 14 检查路由器GADBHW的路由表

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 在路由器GADBHW上启动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

 

二.IGRP的配置

本实验需要2600系列路由器两台,交换机一台,PC机两台,console线两条

Step 1 配置路由器GADBHM的基本参数

RIP实验

Step 2 在路由器GAD上启动IGRP

GAD(config)#router igrp 101

GAD(config-router)#network 192.168.22.0

GAD(config-router)#network 192.168.20.0

Step 3 保存路由器GAD上的配置文件

GAD#copy running-config startup-config

Step 4 在路由器BHM上启动IGRP

BHM(config)#router igrp 101

BHM(config-router)#network 192.168.25.0

BHM(config-router)#network 192.168.22.0

Step 5 保存路由器BHM上的配置文件

BHM#copy running-config startup-config

Step 6 PC配置正确的IP地址,子网掩码和缺省网关

连接到GADPC

IP Address: 192.168.20.2

Subnet mask: 255.255.255.0

Default gateway: 192.168.20.1

连接到BHMPC

IP Address: 192.168.25.2

Subnet mask: 255.255.255.0

Default gateway: 192.168.25.1

Step 7 查看路由器GADBHW的基本配置

GAD#show running-config!

version 12.0

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname GAD

!

enable secret 5 $1$HCww$MPv2SeZSoulZbI2ULmwBN.

!

ip subnet-zero

!

interface FastEthernet0/0

ip address 192.168.20.1 255.255.255.0

no ip directed-broadcast

!

interface Serial0/0

ip address 192.168.22.1 255.255.255.0

no ip directed-broadcast

no ip mroute-cache

no fair-queue

clockrate 56000

!

interface Serial0/1

no ip address

no ip directed-broadcast

shutdown

!

router igrp 101

network 192.168.20.0

network 192.168.22.0

!

no ip classless

ip http server

!

line con 0

exec-timeout 0 0

password cisco

login

transport input none

line aux 0

password cisco

login

line vty 0 4

password cisco

login

!

end

 

BHM#show running!

version 12.0

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname BHM

!

enable secret 5 $1$IzR.$HkRSV8TmMTDuAWcw/QbVl0

!

ip subnet-zero

ip host GAD 192.168.20.1 192.168.22.1

!

!

interface FastEthernet0/0

ip address 192.168.25.1 255.255.255.0

no ip directed-broadcast

!

interface Serial0/0

ip address 192.168.22.2 255.255.255.0

no ip directed-broadcast

no ip mroute-cache

no fair-queue

!

interface Serial0/1

no ip address

no ip directed-broadcast

shutdown

no fair-queue

!

!

router igrp 101

network 192.168.22.0

network 192.168.25.0

!

no ip classless

no ip http server

!

!

line con 0

exec-timeout 0 0

password cisco

login

transport input none

line aux 0

line vty 0 4

password cisco

login

!

end

 

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 192.168.25.0/24 is directly connected, FastEthernet0/0

I 192.168.20.0/24 [100/8576] via 192.168.22.1, 00:00:14 , Serial0/0

C 192.168.22.0/24 is directly connected, Serial0/0

 

BHM#show ip protocols

Routing Protocol is "igrp 101"

Sending updates every 90 seconds, next due in 44 seconds

Invalid after 270 seconds, hold down 280, flushed after 630

Outgoing update filter list for all interfaces is

Incoming update filter list for all interfaces is

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

IGRP metric weight K1=1, K2 =0, K3=1, K4=0, K5=0

IGRP maximum hopcount 100

IGRP maximum metric variance 1

Redistributing: igrp 101

Routing for Networks:

192.168.22.0

192.168.25.0

Routing Information Sources:

Gateway Distance Last Update

192.168.22.1 100 00:00:22

Distance: (default is 100)

 

GAD#debug ip igrp events

IGRP event debugging is on

GAD#

00:17:43 : IGRP: received update from 192.168.22.2 on Serial0/0

00:17:43 : IGRP: Update contains 0 interior, 1 system, and 0 exterior routes.

00:17:43 : IGRP: Total routes in update: 1

00:18:04 : IGRP: sending update to 255.255.255.255 via FastEthernet0/0

(192.168.20.1)

00:18:04 : IGRP: Update contains 0 interior, 2 system, and 0 exterior routes.

00:18:04 : IGRP: Total routes in update: 2

00:18:04 : IGRP: sending update to 255.255.255.255 via Serial0/0 (192.168.22.1)

00:18:04 : IGRP: Update contains 0 interior, 1 system, and 0 exterior routes.

00:18:04 : IGRP: Total routes in update: 1

 

GAD#debug ip igrp transactions

IGRP protocol debugging is on

00:24:53 : IGRP: sending update to 255.255.255.255 via Ethernet0/0 (192.168.20.1)

00:24:53 : network 192.168.25.0, metric=8576

00:24:53 : network 192.168.22.0, metric=8476

00:24:53 : IGRP: sending update to 255.255.255.255 via Serial0/0 (192.168.22.1)

00:24:53 : network 192.168.20.0, metric=110

00:26:07 : IGRP: received update from 192.168.22.2 on Serial0/0

00:26:07 : network 192.168.25.0, metric 8576 (neighbor 110)

 

GAD#show ip route 192.168.25.0

Routing entry for 192.168.25.0/24

Known via "igrp 101", distance 100, metric 8576

Redistributing via igrp 101

Advertised by igrp 101 (self originated)

Last update from 192.168.22.2 on Serial0/0, 00:00:30 ago

Routing Descriptor Blocks:

* 192.168.22.2, from 192.168.22.2, 00:00:30 ago, via Serial0/0

Route metric is 8576, traffic share count is 1

Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit

Reliability 179/255, minimum MTU 1500 bytes

Loading 1/255, Hops 0

三.EIGRP的配置

本实验需要2600系列路由器两台,交换机一台,PC机两台,console线两条

 

Step 1 配置路由器

Router1

Router>enable

Router#configure terminal

Router(config)#hostname PARIS

PARIS (config)#enable secret class

PARIS (config)#line console 0

PARIS (config-line)#password cisco

PARIS (config-line)#login

PARIS (config-line)#line vty 0 4

PARIS (config-line)#password cisco

PARIS (config-line)#login

PARIS (config-line)#exit

PARIS (config)#interface serial 0/0

PARIS (config-if)#ip address 192.168.2.1 255.255.255.252

PARIS (config-if)#clock rate 64000

PARIS (config-if)#no shutdown

PARIS (config-if)#exit

PARIS (config-if)#interface loopback 0

PARIS (config-if)#ip address 192.168.0.2 255.255.255.0

PARIS (config-if)#exit

PARIS (config)#interface fastethernet 0/0

PARIS (config-if)#ip address 192.168.3.1 255.255.255.0

PARIS (config-if)#no shutdown

PARIS (config-if)#exit

PARIS (config)#ip host WARSAW 192.168.2.2 192.168.1.1

Router2

Router>enable

Router#configure terminal

Router(config)#hostname WARSAW

WARSAW (config)#enable secret class

WARSAW (config)#line console 0

WARSAW (config-line)#password cisco

WARSAW (config-line)#login

WARSAW (config-line)#line vty 0 4

WARSAW (config-line)#password cisco

WARSAW (config-line)#login

WARSAW (config-line)#exit

WARSAW (config)#interface serial 0/0

WARSAW (config-if)#ip address 192.168.2.2 255.255.255.252

WARSAW (config-if)#no shutdown

WARSAW (config-if)#exit

WARSAW (config)#interface fastethernet 0/0

WARSAW (config-if)#ip address 192.168.1.1 255.255.255.0

WARSAW (config-if)#no shutdown

WARSAW (config-if)#exit

WARSAW (config)#ip host PARIS 192.168.2.1 192.168.3.1

Step 2 保存路由器上的配置文件

Paris #copy running-config startup-config

Destination filename [startup-config]? [Enter]

 

WARSAW #copy running-config startup-config

Destination filename [startup-config]? [Enter]

Step 3 PC配置正确的IP地址,子网掩码和缺省网关

连接到巴黎的PC

IP Address: 192.168.3.2

Subnet mask: 255.255.255.0

Default gateway: 192.168.3.1

连接到华沙的PC

IP Address: 192.168.1.2

Subnet mask: 255.255.255.0

Default gateway: 192.168.1.1

Step 4 在路由器Paris上启动EIGRP

Paris (config)#router eigrp 101

Paris (config-router)#network 192.168.3.0

Paris (config-router)#network 192.168.2.0

Paris (config-router)#network 192.168.0.0

Paris (config-router)#end

Step 5 在路由器Warsaw上启动EIGRP

Warsaw (config)#router eigrp 101

Warsaw (config-router)#network 192.168.2.0

Warsaw (config-router)#network 192.168.1.0

Warsaw (config-router)#end

 

四.OSPF的配置

本实验需要2600系列路由器两台,交换机一台,PC机两台,console线两条

Step 1 配置路由器

Router1

Router>enable

Router#configure terminal

Router(config)#hostname BERLIN

BERLIN (config)#enable secret class

BERLIN (config)#line console 0

BERLIN (config-line)#password cisco

BERLIN (config-line)#login

BERLIN (config-line)#line vty 0 4

BERLIN (config-line)#password cisco

BERLIN (config-line)#login

BERLIN (config-line)#exit

BERLIN (config)#interface serial 0/0

BERLIN (config-if)#ip address 192.168.15.1 255.255.255.252

BERLIN (config-if)#clock rate 64000

BERLIN (config-if)#no shutdown

BERLIN (config-if)#exit

BERLIN (config)#interface fastEthernet 0/0

BERLIN (config-if)#ip address 192.168.1.129 255.255.255.192

BERLIN (configif)#no shutdown

BERLIN (config-if)#exit

BERLIN (config)#ip host ROME 192.168.0.1 192.168.15.2

 

Router2

Router>enable

Router#configure terminal

Router(config)#hostname ROME

ROME (config)#enable password cisco

ROME (config)#enable secret class

ROME (config)#line console 0

ROME (config-line)#password cisco

ROME (config-line)#login

ROME (config-line)#line vty 0 4

ROME (config-line)#password cisco

ROME (config-line)#login

ROME (config-line)#exit

ROME (config)#interface serial 0/0

ROME (config-if)#ip address 192.168.15.2 255.255.255.252

ROME (config-if)#no shutdown

ROME (config-if)#exit

ROME (config)#interface fastEthernet 0/0

ROME (config-if)#ip address 192.168.0.1 255.255.255.0

ROME (config-if)#no shutdown

ROME (config-if)#exit

ROME (config)#ip host BERLIN 192.168.1.129 192.168.15.1

Step 2 保存路由器上的配置文件

BERLIN #copy running-config startup-config

Destination filename [startup-config]? [Enter]

 

ROME #copy running-config startup-config

Destination filename [startup-config]? [Enter]

Step 3 PC配置正确的IP地址,子网掩码和缺省网关

连接到罗马的PC

IP Address: 192.168.0.2

Subnet mask: 255.255.255.0

Default gateway: 192.168.0.1

连接到柏林的PC

IP Address: 192.168.1.130 (can’t use 128 address of subnet)

Subnet mask: 255.255.255.128

Default gateway: 192.168.1.129

Step 4 在路由器Berlin上启动OSPF

Berlin (config)#router ospf 1

Berlin (config-router)#network 192.168.1.128 0.0.0.63 area 0

Berlin (config-router)#network 192.168.15.0 0.0.0.3 area 0

Berlin (config-router)#end

Step 5 在路由器Rome上启动OSPF

Rome (config)#router ospf 1

Rome (config-router)#network 192.168.0.0 0.0.0.255 area 0

Rome (config-router)#network 192.168.15.0 0.0.0.3 area 0

Rome (config-router)#end

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值