Cisco路由器的ospf高级路由配置

一 实验拓扑图

Cisco路由器的ospf高级路由配置_第1张图片

二 实验目的

在不同域,不同路由协议,综合配置实现全网互通。

三 实验环境

GNS3,Windows10操作系统,SecureCRT8.0

四 实验过程

1.对R1路由器进行配置
conf t
(配置接口ip信息)
int f0/1
ip add 192.168.1.1 255.255.255.0
no sh
ex
int f0/0
ip add 192.168.2.1 255.255.255.0
no sh
ex
ip route 0.0.0.0 0.0.0.0 192.168.2.2 (配置默认路由)
end

2.对R2路由器进行配置
conf t
(配置接口ip信息)
int f0/0
ip add 192.168.2.2 255.255.255.0
no sh
ex
int f0/1
ip add 192.168.3.1 255.255.255.0
no sh
ex
(启用ospf进程)
router ospf 1
router-id 2.2.2.2 (标记router-id)
net 192.168.3.0 0.0.0.255 a 1 (宣告area 1内网段)
ex
ip route 192.168.1.0 255.255.255.0 192.168.2.1 (配置静态路由)
router ospf 1
redi con su (宣告直连网段)
redi sta su (宣告静态路由网段)
end

3.对R3路由器进行配置
conf t
(配置接口ip信息)
int f0/0
ip add 192.168.4.1 255.255.255.0
no sh
ex
int f0/1
ip add 192.168.3.2 255.255.255.0
no sh
ex
int f1/1
ip add 192.168.7.1 255.255.255.0
no sh
ex
int f1/0
ip add 13.0.0.1 255.255.255.0
no sh
ex
ip route 0.0.0.0 0.0.0.0 13.0.0.2 (配置默认路由)
(启用ospf多区域进程)
router ospf 1
router-id 3.3.3.3 (标记router-id)
net 192.168.3.0 0.0.0.255 a 1 (宣告area 1内网段)
net 192.168.4.0 0.0.0.255 a 0 (宣告area 0内网段)
net 192.168.7.0 0.0.0.255 a 0 (宣告area 0内网段)
default-information or (外部默认路由注入)
end

4.对R4路由器进行配置
conf t
(配置接口ip信息)
int f0/0
ip add 192.168.4.2 255.255.255.0
no sh
ex
int f0/1
ip add 192.168.5.1 255.255.255.0
no sh
ex
(启用ospf进程)
router ospf 1
router-id 4.4.4.4 (标记router-id)
net 192.168.3.0 0.0.0.255 a 1 (宣告area 1内网段)
redi rip su (宣告rip)
ex
(启用rip进程)
router rip
ver 2
no au
net 192.168.5.0
redi ospf 1 me 5 (宣告ospf,且设置度量值(跳数)为5)
end

5.对R5路由器进行配置
conf t
(配置接口ip信息)
int f0/1
ip add 192.168.5.2 255.255.255.0
no sh
ex
int f0/0
ip add 192.168.6.1 255.255.255.0
no sh
ex
(启用rip进程)
router rip
ver 2
no au
net 192.168.5.0
net 192.168.6.0
end

6.对R6路由器进行配置
conf t
(配置接口ip信息)
int f0/1
ip add 13.0.0.2 255.255.255.0
no sh
ex
int f0/0
ip add 14.0.0.1 255.255.255.0
no sh
ex
ip route 192.168.0.0 255.255.0.0 13.0.0.1 (配置总体的静态路由)
end

7.配置PC1,PC2,PC3,PC4
PC1:ip 192.168.1.100 192.168.1.1
PC2:ip 192.168.7.100 192.168.7.1
PC3:ip 14.0.0.14 14.0.0.1
PC4:ip 192.168.6.100 192.168.6.1

五 实验结果

四机相ping,都能ping通,实现全网互通,实验完成
Cisco路由器的ospf高级路由配置_第2张图片

六 实验总结

查看路由表sh ip rou:
R2:
Cisco路由器的ospf高级路由配置_第3张图片
直连网段为C
OSPF引用外部AS学到的路由为O E2
OSPF从外部学到R3注入的默认路由为O
E2
静态路由为S
OSPF区域间学到的路由为O IA
*
R表示的是RIP路由协议(在R4的路由表中可以查看)

你可能感兴趣的:(计算机网络,交换与路由,Cisco设备)