cisco ospf

ospf配置:(Open Shortest Path First)
PC0 and PC1 via Ospf to communicate. Network map as below.
Environment:Cisco Packet Tracer

Set pc0 and pc1 static ip
PC0: 192.168.1.2
    255.255.255.0
gw: 192.168.1.1
PC1: 192.168.2.2
    255.255.255.0
gw: 192.168.2.1


Router0 (interface fa 0/0 and Se 0/1/0 ip config)

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shu     #端口开启

Router(config-if)#exit
Router(config)#int s0/0/0
Router(config-if)#ip add 192.168.3.1 255.255.255.0   #添加ip地址
Router(config-if)#no shu

Router1 (interface fa 0/0 and Se 0/1/0 ip config)

Router>en
Router#conf t
Router(config)#int f0/0
Router(config-if)#ip add 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#exit
Router(config)#int s0/0/0
Router(config-if)#ip add 192.168.3.2 255.255.255.0
Router(config-if)#no shu

 

OSPF route config
Router0 OSPF Route config

Router(config-if)#exit
Router(config)#route ospf 10      #10是id进程号,可以随意定。范围为1-65535
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0    #宣告1.0网段到区域0中
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0

Router1 OSPF Route config

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#route ospf 10
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-if)#no shu

test

 

posted @   Linux大魔王  阅读(250)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 上周热点回顾(3.3-3.9)
· AI 智能体引爆开源社区「GitHub 热点速览」
点击右上角即可分享
微信分享提示