才子佳人博客

我的故事我讲述

CISCO packet tracer模拟:使用OSPF协议实现多路由器互连实例(实战篇)
 
来源:xjh  编辑:xjh  2016-01-15

文章给出用CISCO packet tracer模拟使用OSPF协议的实例,即使用OSPF协议实现多路由器互连,并分享出实验配置的pkt文件,打开后即可进行模拟实验。

lab_multi_router_dynamic_ospf.rar

在配置过程中需注意以下几点:

1)使用se口必须指定相同的clock rate,其它与fa口设置相同。

2)分两个域 area 0,1,Router2是边界路由器,路由器分布如下:

RouterA,RouterB,Router2: area 0.0.0.0

Router3,Router4,Router2: area 0.0.0.1

3)使用OSPF动态路由协议时,需在每个路由器中把相连网络的网络号添加到 router ospf中,比如RouterA。

RouterA(config)#router ospf 1
RouterA(config-router)#network 192.168.50.0 0.0.0.255 area 0.0.0.0
RouterA(config-router)#network 101.0.0.0 0.255.255.255 area 0.0.0.0

network的作用是声明跟该路由器直接连接的网络,后面的掩码是原掩码255.255.255.0的反码0.0.0.255,area后面是划分的域编号。

4)配置RouterA loopback 0 地址
RouterA>en
RouterA#conf ter
RouterA(config)#int Loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
RouterA(config-if)#ip add 10.0.0.1 255.255.255.255
RouterA(config-if)#
RouterA(config-if)#exit
RouterA(config)#

5)查看Routing for Networks
Router2>show ip pro

Routing Protocol is "ospf 1"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 10.0.0.5

Number of areas in this router is 2. 2 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

101.7.156.0 0.0.0.255 area 0

101.7.157.0 0.0.0.255 area 0

101.7.151.0 0.0.0.255 area 1

101.7.152.0 0.0.0.255 area 1

Routing Information Sources:

Gateway Distance Last Update

101.7.156.1 110 00:17:54

101.7.157.2 110 00:17:54

101.7.151.2 110 00:17:54

101.7.152.2 110 00:17:54

Distance: (default is 110)

Router2>

6)断开Router2的se2/0,fa0/0前后,在PC0 上分别执行下面命令,观察路由的变化。

tracert 192.168.50.2

tracert 172.15.1.2

7)查看Router2路由表

Router2>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

10.0.0.0/32 is subnetted, 1 subnets
C 10.0.0.5 is directly connected, Loopback0

101.0.0.0/24 is subnetted, 6 subnets
C 101.7.151.0 is directly connected, FastEthernet0/0
C 101.7.152.0 is directly connected, FastEthernet1/0
O 101.7.153.0 [110/782] via 101.7.152.2, 00:18:50, FastEthernet1/0

[110/782] via 101.7.151.2, 00:18:50, FastEthernet0/0
C 101.7.156.0 is directly connected, Serial2/0
C 101.7.157.0 is directly connected, Serial3/0
O 101.7.158.0 [110/782] via 101.7.157.2, 00:19:25, Serial3/0

[110/782] via 101.7.156.1, 00:19:25, Serial2/0

172.15.0.0/24 is subnetted, 1 subnets
O 172.15.1.0 [110/782] via 101.7.157.2, 00:19:25, Serial3/0

172.16.0.0/24 is subnetted, 1 subnets
O 172.16.2.0 [110/2] via 101.7.151.2, 00:18:50, FastEthernet0/0
O 192.168.2.0/24 [110/2] via 101.7.152.2, 00:18:50, FastEthernet1/0
O 192.168.50.0/24 [110/782] via 101.7.156.1, 00:19:25, Serial2/0
Router2>



使用OSPF协议实现多路由器互连实例(点击查看放大原图)

断开Router2的fa0/0前,在PC0 上分别执行命令


断开Router2的fa0/0后,在PC0 上分别执行命令




分类:网络日志| 查看评论
相关文章
文章点击排行
本年度文章点击排行
发表评论:
  • 昵称: *
  • 邮箱: *
  • 网址:
  • 评论:(最多100字)
  • 验证码: