单区域ospf查看

拓扑图:


配置

路由基本配置
Router>
Router>
Router>en
Router#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host r1
r1(config)#no ip domain lookup
r1(config)#line conso
r1(config)#line console 0
r1(config-line)#exect-tiemou
r1(config-line)#exect-time
r1(config-line)#exec-tim
r1(config-line)#exec-timeout 00
r1(config-line)#log
r1(config-line)#logg
r1(config-line)#logging sync
r1(config-line)#logging synchronous
r1(config-line)#exit
r1(config)#inter s1/1
r1(config-if)#ip address 10.10.10.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#no shutdown
r1(config-if)#exit
r1(config)#inter loopback 1

r1(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

r1(config-if)#ip address 172.16.1.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#inter loop 2

r1(config-if)#
%LINK-5-CHANGED: Interface Loopback2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback2, changed state to up

r1(config-if)#ip address 171.16.2.1 255.255.255.0
r1(config-if)#no shutdown
r1(config-if)#inter loop 1
r1(config-if)#ip address 171.16.1.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#inter loop 3

r1(config-if)#
%LINK-5-CHANGED: Interface Loopback3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback3, changed state to up

r1(config-if)#ip address 171.16.3.1 255.255.255.0
r1(config-if)#no shutdown
r1(config-if)#exit

配置单区域ospf路由
r1(config-if)#ip address 171.16.3.1 255.255.255.0
r1(config-if)#no shutdown
r1(config-if)#exit
r1(config)#router os
r1(config)#router ospf a
r1(config)#router ospf ?
<1-65535> Process ID
r1(config)#router ospf 111 ?
<cr>
r1(config)#router ospf 111
r1(config-router)#net
r1(config-router)#network ?
A.B.C.D Network number
r1(config-router)#network 10.10.10.0 0.0.0.255 area ?
<0-4294967295> OSPF area ID as a decimal value
A.B.C.D OSPF area ID in IP address format
r1(config-router)#network 10.10.10.0 0.0.0.255 area 0 ?
<cr>
r1(config-router)#network 10.10.10.0 0.0.0.255 area 0
r1(config-router)#exit
r1(config)#exit
r1#
%SYS-5-CONFIG_I: Configured from console by console

r1#
%LINK-5-CHANGED: Interface Serial1/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up

r1#
00:15:59: %OSPF-5-ADJCHG: Process 111, Nbr 172.16.3.1 on Serial1/1 from LOADING to FULL, Loading Done

查看路由
-------------R1路由表-------------
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, 1 subnets

C 10.10.10.0 is directly connected, Serial1/1
20.0.0.0/24 is subnetted, 1 subnets
O 20.20.20.0 [110/128] via 10.10.10.2, 00:03:17, Serial1/1
171.16.0.0/24 is subnetted, 3 subnets
C 171.16.1.0 is directly connected, Loopback1
C 171.16.2.0 is directly connected, Loopback2
C 171.16.3.0 is directly connected, Loopback3

-------------R2路由表-------------
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, 1 subnets

C 10.10.10.0 is directly connected, Serial1/0
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, Serial1/1
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, Loopback1
C 172.16.2.0 is directly connected, Loopback2
C 172.16.3.0 is directly connected, Loopback3

-------------R3路由表-------------
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

Gateway of last resort is not set

 10.0.0.0/24 is subnetted, 1 subnets

O 10.10.10.0 [110/128] via 20.20.20.1, 00:00:12, Serial1/0
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, Serial1/0
173.16.0.0/24 is subnetted, 3 subnets
C 173.16.1.0 is directly connected, Loopback1
C 173.16.2.0 is directly connected, Loopback2
C 173.16.3.0 is directly connected, Loopback3

ping测试

-----------r1上ping r3路由------------
r1#ping 173.16.3.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 173.16.3.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

r1#ping 20.20.20.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/5/7 ms

-----------r3上ping r1路由------------
r3#ping 10.10.10.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/5/7 ms

拓展信息
----查看ospf接口信息-----
r1#show ip ospf interface
Serial1/1 is up, line protocol is up
Internet address is 10.10.10.1/24, Area 0
Process ID 111, Router ID 171.16.3.1, Network Type POINT-TO-POINT, Cost: 64
Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0
No designated router on this network
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1 , Adjacent neighbor count is 1
Adjacent with neighbor 172.16.3.1
Suppress hello for 0 neighbor(s)

----查看ospf数据表------
r1#show ip ospf database
OSPF Router with ID (171.16.3.1) (Process ID 111)

            Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
171.16.3.1 171.16.3.1 1728 0x80000002 0x002c1c 2
172.16.3.1 172.16.3.1 339 0x80000004 0x00b6b3 4
173.16.3.1 173.16.3.1 339 0x80000002 0x00d135 2

-----查看ospf邻居表-----
r1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
172.16.3.1 0 FULL/ - 00:00:33 10.10.10.2 Serial1/1

------查看ospf路由-----
r1#show ip route ospf
20.0.0.0/24 is subnetted, 1 subnets
O 20.20.20.0 [110/128] via 10.10.10.2, 00:09:35, Serial1/1

原文地址:http://blog.51cto.com/vbers/2169157

时间: 2024-11-09 03:59:17

单区域ospf查看的相关文章

CCNA实验二十三 单区域OSPF路由协议 &nbsp;

CCNA实验二十三 单区域OSPF路由协议 环境:Windows XP .GNS3.0.7.2 目的: 认识并学会OSPF的基本配置 说明: OSPF(开放式最短路径优先)是一个内部网关协议而且是链路状态路由协议.OSPF通过路由器之间通告网络接口的状态来建立链路状态数据库,生成最短路径树,每个OSPF路由器使用这些最短路径构造路由表.OSPF路由器向加入到OSPF过程的接口发送Hello数据包,Hello协议的目的: 1.用于发现邻居 2.在成为邻居之前,必须对Hello包里的一些参数进行协商

单区域ospf以及DR和BDR选举

首先我绘制如下的拓扑图,各路由器基本配置图中已经标明.三个路由器都分别加上loopback口,并分别配上地址1.1.1.1:2.2.2.2:3.3.3.3 ,之后的配置中各路由将各自loopback口地址作为自己的router id.(为了方便ospf区域规划和问题排查,一般将某一个loopback口地址配置为路由的router id,ospf启动生效后,如果更改了router id或者接口地址,那么只有重启ospf或者重启路由器后才会生效.) 嗯简单看一下RT1的基本配置过程. 所有基本配置结

单区域 OSPF &nbsp; 实验 1:点到点链路上的 OSPF

实验目的通过本实验可以掌握:(1)在路由器上启动 OSPF 路由进程(2)启用参与路由协议的接口,并且通告网络及所在的区域(3)度量值 cost 的计算(4)hello 相关参数的配置(5)点到点链路上的 OSPF 的特征(6)查看和调试 OSPF 路由协议相关信息 实验拓扑本实验的拓扑结构如图 6-1 所示. 实验步骤 4.实验调试

两台三层交换机单区域OSPF动态路由实验

一.   实验目的 1.  掌握三层交换机之间通过OSPF协议实现网段互通的配置方法. 2.  理解RIP协议和OSPF协议内部实现的不同点 二.   应用环境 当两台三层交换机级联时,为了保证每台交换机上所连接的网段可以和另一台交换机上连接的网段互相通信,使用OSPF协议可以动态学习路由. 三.   实验拓扑 四.   实验要求 1.  在交换机A和交换机B上分别划分基于端口的VLAN: 交换机 VLAN  端口成员  交换机A 10 1~8 20 9~16 100 24 交换机B 30 1~

单区域OSPF动态路由配置(拓扑图)

OSPF单区域配置

OSPF单区域配置 OSPF(Open Shortest Path First,开放式最短路径优先) 划分ospf区域可以缩小路由器的范围,减少流量的使用.区域将路由器划分为不同的组,每个组用Area ID标识. 每个接口都要指明属于哪一个区域,area 0 为骨干区域,骨干区域负责在非骨干区域之间发布区域间的路由信息.一个OSPF区域中有且只有一个骨干区域. 设置area区域是,子网掩码是反向掩码./24  0.0.0.255 OSPF单区域配置实验: 一.实验拓扑图 二.实验编址 按照以上地

OSPF的单区域配置

 OSPF的优点:无环路.收敛快.扩展性好.支持认证等优点. 实验目的:  实验内容:  实验拓扑: 实验编址: 实验步骤: 1.基本配置,,根据实验编址表,进行相应的基本IP地址配置,并使用ping命令检测各直连链路的连通性. 其余直连网段的连通性省略. 2.部署单区域OSPF网络 首先使用  ospf  命令创建并运行OSPF. 其中,1代表进程号,如果没写明进程号,则默认是1. 接着使用  area  命令创建区域并进入OSPF区域视图,,输入要创建的区域ID.由于本实验为OSPF单区域配

多区域OSPF

1.骨干区域:起到了让其他非骨干区域能够知道别的区域的网络情况的作用.也就是说,所有非骨干区域的路由信息都要流经骨干区域. 2.虚拟链路:是一个通过非骨干区域到骨干区域的链路. 使用目的:  连接一个非骨干区域到一个骨干区域通过一个非骨干区域 通过一个非骨干区,连接分开的两个骨干区部分 规则: 必须在两个ABR之间进行配置 虚链路通过的区域作为传输区域,必须有完整的路由信息 中间传输区不能是存根区 2操作,基本概念 1. OSPF的分层拓扑的优势: 1) 降低SPF的计算频率 2) 减小路由表

配置VRRP,配置ospf单区域

OSPF开放式最短路径优先协议OSPF的工作过程:1.建立邻居表:2.同步数据库:3.计算路由表OSPF的报文类型:1.hello -用于邻居的建立.维护.拆除:2.dd - database description ,数据库 描述 报文 3.LSR - link state request ,链路 状态 请求4.LSU - link state update ,链路 状态 更新5.LSAck - link state acknowledge ,链路 状态 确认router-id:每一个运行 O