设为首页收藏本站language 语言切换
查看: 1964|回复: 1
收起左侧

[分享] OSPF基础配置

[复制链接]
发表于 2022-8-9 11:53:19 | 显示全部楼层 |阅读模式
65BCC310-1135-4157-8827-69A3E450BC4D.jpeg
第1个模块
-------------------------
100台路由器,使用什么样的路由协议来设计这个网络
OSPF基本配置:
[R1]ospf ?
  INTEGER<1-65535>  Process ID //进程ID,OSPF邻居建立不要求进程ID相同
  mib-binding       Mib-Binding a Process
  router-id         <Group> router-id command group //路由器ID可以自动选择,但是强烈建议手工配置
  valid-ttl-hops    Valid GTSM TTL hops //TTL安全
  vpn-instance      VPN routing/forwarding Instance //和MPLS VPN有关
  <cr>              Please press ENTER to execute command
R5:
ospf 1 router-id 5.5.5.5
area 0.0.0.56
  network 10.1.56.0 0.0.0.255 //含义1、10.1.56.0/24范围内的设备开启了OSPF 2、同时这个接口所在的网络状态信息同步给其他设备,用于计算路由
R6:
ospf 1
area 0.0.0.56 //简单快速的配置方案,但是容易忽略掉创建区域
interface Serial2/0/0
link-protocol ppp
ip address 10.1.56.6 255.255.255.0
ospf enable 1 area 0.0.0.56 //该接口开启了OSPF,并且属于区域56.同时这个接口所在的网络状态信息同步给其他设备,用于计算路由
验证命令:
[R5]display ospf interface //哪些接口运行了OSPF

         OSPF Process 1 with Router ID 5.5.5.5
                 Interfaces

Area: 0.0.0.56         (MPLS TE not enabled)
IP Address      Type         State    Cost    Pri   DR              BDR
10.1.56.5       P2P          P-2-P    48      1     0.0.0.0         0.0.0.0
[R5]display ospf peer brief //查看OSPF邻居的简要信息,R5通过s2/0/0同邻居66.1.1.1在区域56中构建了邻居(邻接)

         OSPF Process 1 with Router ID 5.5.5.5
                  Peer Statistic Information
----------------------------------------------------------------------------
Area Id          Interface                        Neighbor id      State   
0.0.0.56         Serial2/0/0                      66.1.1.1         Full        
----------------------------------------------------------------------------
[R5]display ip routing-table protocol ospf //查看通过OSPF得到的路由表
Route Flags: R - relay, D - download to fib //转发信息库(forwarding information base)
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 1        Routes : 1        

OSPF routing table status : <Active>
         Destinations : 1        Routes : 1

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       66.1.1.1/32  OSPF    10   48          D   10.1.56.6       Serial2/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0
作业:
1.完成R5和R6的OSPF基本配置,不要忘记环回接口
2.尝试完成R1、R4和R5的OSPF邻居配置

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-10 20:39 , Processed in 0.126697 second(s), 24 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表