首页 电脑网络 电脑知识 正文

单区域OSPF路由协议的配置

1.拓扑图 2.各路由器上配置完成后的 show run a.r1#show run Building configuration... Current configuration : 645 bytes ! version 12.4 no service timestamps log datetime msec no servic

1.拓扑图
单区域OSPF路由协议的配置

2.各路由器上配置完成后的 show run
  a. r1#show run 
Building configuration...

Current configuration : 645 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname r1
!
!
  www.zhishiwu.com  
interface Loopback0
 ip address 11.11.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.123.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.10.1.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 100
 log-adjacency-changes
 network 172.16.123.1 0.0.0.0 area 0
 network 10.10.1.254 0.0.0.0 area 0
!
ip classless
!
!
line con 0
line vty 0 4
 login
!
!
end入内容   b. r2#
r2#show run
Building configuration...

Current configuration : 666 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname r2
!
!
interface Loopback0
 ip address 22.22.2.2 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.123.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.10.2.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 100
 router-id 22.22.2.2
 log-adjacency-changes
 network 172.16.123.2 0.0.0.0 area 0
 network 10.10.2.254 0.0.0.0 area 0
!
ip classless
!
!
line con 0
line vty 0 4
 login
!
!
end   c.
  www.zhishiwu.com   r3#
r3#show run
Building configuration...

Current configuration : 645 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname r3
!
!
interface Loopback0
 ip address 33.33.3.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.123.3 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.10.3.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 100
 log-adjacency-changes
 network 172.16.123.3 0.0.0.0 area 0
 network 10.10.3.254 0.0.0.0 area 0
!
ip classless
!
!
line con 0
line vty 0 4
 login
!
!
end
3.查看邻居表、拓扑表、路由表
  a. r1#show ip ospf nei

Neighbor ID Pri   State   Dead Time   Address Interface
22.22.2.2 1   FULL/BDR 00:00:35 172.16.123.2 FastEthernet0/0
33.33.3.3 1   FULL/DROTHER 00:00:31 172.16.123.3 FastEthernet0/0
r1#show ip ospf nei

Neighbor ID Pri   State   Dead Time   Address Interface
22.22.2.2 1   FULL/BDR 00:00:30 172.16.123.2 FastEthernet0/0
33.33.3.3 1   FULL/DROTHER 00:00:36 172.16.123.3 FastEthernet0/0
r1#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/24 is subnetted, 3 subnets
C   10.10.1.0 is directly connected, FastEthernet0/1
O   10.10.2.0 [110/2] via 172.16.123.2, 00:06:07, FastEthernet0/0
O   10.10.3.0 [110/2] via 172.16.123.3, 00:05:57, FastEthernet0/0
 11.0.0.0/24 is subnetted, 1 subnets
C   11.11.1.0 is directly connected, Loopback0
 172.16.0.0/24 is subnetted, 1 subnets
C   172.16.123.0 is directly connected, FastEthernet0/0
r1# b. r2#show ip ospf nei

Neighbor ID Pri   State   Dead Time   Address Interface
11.11.1.1 1   FULL/DR 00:00:38 172.16.123.1 FastEthernet0/0
33.33.3.3 1   FULL/DROTHER 00:00:31 172.16.123.3 FastEthernet0/0
r2#show ip ospf data
OSPF Router with ID (22.22.2.2) (Process ID 100)

Router Link States (Area 0)

Link ID ADV Router  Age Seq#   Checksum Link count
172.16.123.1 172.16.123.1 2475 0x80000003 0x0055f2 2
172.16.123.2 172.16.123.2 1926 0x80000005 0x006ed2 2
172.16.123.3 172.16.123.3 1651 0x80000007 0x0087b2 2
22.22.2.2   22.22.2.2   489 0x80000007 0x0063f0 2
11.11.1.1   11.11.1.1   489 0x80000007 0x003254 2
33.33.3.3   33.33.3.3   469 0x80000003 0x009c89 2

Net Link States (Area 0)
Link ID ADV Router  Age Seq#   Checksum
172.16.123.1 11.11.1.1   469 0x80000004 0x00fd41
r2#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/24 is subnetted, 3 subnets
O   10.10.1.0 [110/2] via 172.16.123.1, 00:07:57, FastEthernet0/0
C   10.10.2.0 is directly connected, FastEthernet0/1
O   10.10.3.0 [110/2] via 172.16.123.3, 00:07:47, FastEthernet0/0
 22.0.0.0/24 is subnetted, 1 subnets
C   22.22.2.0 is directly connected, Loopback0
 172.16.0.0/24 is subnetted, 1 subnets
C   172.16.123.0 is directly connected, FastEthernet0/0
r2# c. r3#show ip ospf nei

Neighbor ID Pri   State   Dead Time   Address Interface
22.22.2.2 1   FULL/BDR 00:00:33 172.16.123.2 FastEthernet0/0
11.11.1.1 1   FULL/DR 00:00:37 172.16.123.1 FastEthernet0/0
r3#show ip ospf data
OSPF Router with ID (33.33.3.3) (Process ID 100)

Router Link States (Area 0)

Link ID ADV Router  Age Seq#   Checksum Link count
172.16.123.1 172.16.123.1 2546 0x80000003 0x0055f2 2
172.16.123.2 172.16.123.2 1997 0x80000005 0x006ed2 2
172.16.123.3 172.16.123.3 1722 0x80000007 0x0087b2 2
22.22.2.2   22.22.2.2   560 0x80000007 0x0063f0 2
11.11.1.1   11.11.1.1   560 0x80000007 0x003254 2
33.33.3.3   33.33.3.3   540 0x80000003 0x009c89 2

Net Link States (Area 0)
Link ID ADV Router  Age Seq#   Checksum
172.16.123.1 11.11.1.1   540 0x80000004 0x00fd41
r3#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
  www.zhishiwu.com  
Gateway of last resort is not set

 10.0.0.0/24 is subnetted, 3 subnets
O   10.10.1.0 [110/2] via 172.16.123.1, 00:08:59, FastEthernet0/0
O   10.10.2.0 [110/2] via 172.16.123.2, 00:08:59, FastEthernet0/0
C   10.10.3.0 is directly connected, FastEthernet0/1
 33.0.0.0/24 is subnetted, 1 subnets
C   33.33.3.0 is directly connected, Loopback0
 172.16.0.0/24 is subnetted, 1 subnets
C   172.16.123.0 is directly connected, FastEthernet0/0
r3#
备注:在Packet Tracer环境中,如开始没有配置router-id,之后才配置loopback 0 IP地址,loopback地址不会自动成为router-id,而需要保存配置后,用reload命令重启路由器。
(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)

本文转载自互联网,如有侵权,联系删除

本文地址:https://www.peigen.net/post/10665.html

相关推荐

板栗怎么私信主播?

板栗直播可以看直播,想必有一些用户已经知道,如果遇见自己喜欢的主播,我们该怎么私信主播呢?为此,小编特意查询资料,把板栗如何私信主播的方法分享给大家。 1)打开板栗,点击打开要私信的直播,接着点击左上...

电脑知识 2024-11-30 0 147

e兼职APP怎么进行身份认证?

e兼职app下载最靠谱的大学生兼职,帮助大学生提升技能,借用靠谱企业的力量培育大学生的社会经验与专业技能,最快5秒内找到心仪的兼职,大众点评最好的兼职软件。不过这么好用的软件,在使用前需要进行身份验证...

电脑知识 2024-11-30 0 151

口碑农场邀请码怎么获取

口碑农场是口碑app中新增加的一个玩法。口碑农场邀请码怎么获取?想要获得口碑农场的邀请码,具体该怎么操作?下面就是口碑农场邀请码获取教程,一起来看一下。...

电脑知识 2024-11-30 0 143

伙星app怎么更换主页封面?

伙星是一款关于相机相关的应用,能够让用户来制作各种好玩的、搞笑的照片,并且还有着许许多多的特效,能够让你看到很多很好玩的内容,除了这些,用户可以在里面进行拍照和漂流瓶交友等,那么在伙星app中要怎么更...

电脑知识 2024-11-30 0 127

会声会影怎么添加背景音乐?

会声会影2018是一款强大的照片|图片|视频制作、剪辑软件,具有多种的视频编辑功能和制作动画效果。但是如果想要让自己制作的视频有意思,背景音乐一定少不了,下面,小编就为大家介绍下会声会影添加背景音乐方...

电脑知识 2024-11-30 0 145

如何制作高质量的PPT?

如何制作高质量的PPT?不管是对于一个学生、老师还是上班族Word、PPT、表格这三个办公软件都是必修的技能了。我们如何将这些做得优秀?如何脱衣而出?所以呀今天我们就先来讨论一下如何制作PPT。如果...

电脑知识 2024-11-30 0 132

感谢您的支持