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

原创 2008年10月02日 12:55:00

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

 

 

OSPF与EIGRP的比较

OSPF和EIGRP都是近年来出现的比较好的动态路由协议,OSPF以协议标准化强,支持厂家多,受到广泛应用,而EIGRP协议由网络界公认的领先厂商Cisco公司发明,并靠其在业界的影响力和绝对的市场份...
  • cscowx
  • cscowx
  • 2008年02月05日 10:53
  • 356

多路径路由算法选择(2)——回顾传统的动态路由协议(RIP、OSPF、BGP、IGRP、EIGRP、IS-IS)

路由协议:用于路由器动态寻找网络最佳路径,保证所有路由器拥有相同的路由表,一般路由协议决定数据包在网络上的行走路径。 路由协议简单分为静态路由协议和动态路由协议。 静态路由协议简单说就是手工配置路由选...
  • mmc2015
  • mmc2015
  • 2015年09月18日 11:01
  • 1774

RIP、OSPF、EIGRP 区别(学习帖)

三种类型的动态路由协议算法分别是距离矢量算法,链路状态算法以及平衡混合算法,这几种算法的类型代表:RIP、OSPF、EIGRP。而且它们都是内部网关协议(IGP),也就是说它们都运行在一个自治系统内部...
  • weiyuefei
  • weiyuefei
  • 2016年08月17日 23:53
  • 4975

IGRP/EIGRP路由协议

EIGRP的管理距离是90,IGRP的管理距离是100,RIP管理距离是120。 IGRP(内部网关路由选择协议)和EIGRP(增强型内部网关路由选择协议) 是思科私有的路由协议。 ...
  • hqj_email
  • hqj_email
  • 2015年06月08日 14:24
  • 713

OSPF 的单区域配置(以华为模拟器为例)

实验拓扑图如下: 配置命令: R1的配置命令: [R1]sys R1 [R1]int g0/0/0 [R1-GigabitEthernet0/0/0] [R1-GigabitE...
  • valecalida
  • valecalida
  • 2016年12月30日 21:47
  • 3041

RIP和OSPF得区别

RIP的15跳限制,超过15跳的路由被认为不可达 RIP不能支持可变长子网掩码(VLSM),导致IP地址分配的低效率 周期性广播整个路由表,在低速链路及广域网云中应用将产生很大问题 收敛速度慢于...
  • yangting09032214
  • yangting09032214
  • 2015年08月31日 19:59
  • 1403

路由重分发、路由过滤方法及难点总结(EIGRP、OSPF实例)(

一、路由过滤的方法:(三种) 1、distribute-list 2、route-map 3、summary 下面分别简单举例,只允许10.10.0.0/16条目进入路由表 1、distribute...
  • V_0815
  • V_0815
  • 2012年09月18日 16:39
  • 4442

配置 rip/igrp/eigrp/ospf

配置 rip/igrp/eigrp/ospf网络环境r1-f0:172.16.10.1r2-e0:172.16.10.2,r2-s0:172.16.20.1r3-s0:172.16.20.2,r3-e...
  • donnie_ming
  • donnie_ming
  • 2007年04月08日 01:12
  • 455

CCNP-EIGRP&OSPF重分布时开销metric值的计算过程

by-小世界http://redcisco.blog.163.com首先明确Eigrp的metric计算公式:其中:带宽单位是kbps,取路由入方向的最小带宽;             延迟单位是10...
  • jgy8421d13
  • jgy8421d13
  • 2015年11月24日 11:12
  • 1283

RIPv1 与 RIPv2

RIPv1                                                           RIPv2 距离矢量                          ...
  • sustwct
  • sustwct
  • 2010年12月15日 10:04
  • 239
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:RIPV1与RIPV2,IGRP与EIGRP和单区域OSPF使用和配置
举报原因:
原因补充:

(最多只允许输入30个字)