当前位置:网站首页>Switches and routers technology - 24 - configure OSPF single area
Switches and routers technology - 24 - configure OSPF single area
2022-08-11 04:52:00 【w Spicy little prince】
0SPFRouting single area configuration
Configuration process
1) Create an OSPF process with a process ID ranging from 1 to 65535.
Router ( config )# router ospf [ process - id ]
2) Configure the ID of the current route, which is equivalent to the name of each router in OSPF. It cannot be the same in the same area. The format is the same as the P address.All are dotted decimal, and the value range is 0.0.0.0~255.255.255.255.If not specified, the one with the largest physical address is selected by default.
Router ( config - router )# router - id [ id - number ]
3) Publish the directly connected network to OSPF. The difference between this and the RIP protocol is that the anti-mask of the corresponding network segment needs to be added when publishing.code and area number.
Router (config-router)# network network - address Wildcard - mask area -n umber
The inverse mask is four 255 minus the mask
Configuration example
Router R1
Router>enableRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface g 0/0Router(config-if)#ip address 192.168.10.254 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface g0/1Router(config-if)#ip address 10.10.10.1 255.255.255.252Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#router ospf 10Router(config-router)#router-id 1.1.1.1Router(config-router)#network 192.168.10.0 0.0.0.255 area 0Router(config-router)#network 10.10.10.0 0.0.0.3 area 0
Router R2
Router>enableRouter#configure tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface g0/0Router(config-if)#ip address 10.10.10.2 255.255.255.252Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface g0/1Router(config-if)#ip address 20.20.20.1 255.255.255.252Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#router ospf 10Router(config-router)#router-id 2.2.2.2Router(config-router)#network 10.10.10.0 0.0.0.3 area 0Router(config-router)#network 20.20.20.0 0.0.0.3 area 0
Router R3
Router>enableRouter#configure tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface g0/0Router(config-if)#ip address 20.20.20.2 255.255.255.252Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface g0/1Router(config-if)#ip address 192.168.20.254 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#router ospf 10Router(config-router)#router-id 3.3.3.3Router(config-router)#network 20.20.20.0 0.0.0.3 area 0Router(config-router)#network 192.168.20.0 0.0.0.255 area 0
PC0
Pc1
PC0 ping PC1
View command
View ospf configuration information
show ip ospf
View Neighbors
show ip ospf neighbor
边栏推荐
- 洛谷P2245 星际导航
- 解决多线程调用sql存储过程问题
- 论文笔记:BBN: Bilateral-Branch Network with Cumulative Learningfor Long-Tailed Visual Recognition
- 监听U盘插入 拔出 消息,获得U盘盘符
- 论文笔记:Bag of Tricks for Long-Tailed Visual Recognition with Deep Convolutional Neural Networks
- 洛谷P4032 火锅盛宴
- Object Creation and Display Transformation
- [Actual combat scene] Mall-discount event design plan
- svg-icon的使用方法(svg-sprite-loader插件)
- 交换机和路由器技术-35-NAT转PAT
猜你喜欢
随机推荐
监听U盘插入 拔出 消息,获得U盘盘符
力扣——旋转数组的最小数字
关于pom.xml文件
优先级队列
智能指针笔记
jwsManager服务接口实现类-jni实现
交换机和路由器技术-32-命名ACL
-填涂颜色-
Redis: Solve the problem of modifying the same key with distributed high concurrency
FPGA工程师面试试题集锦121~130
洛谷P6586 蒟蒻火锅的盛宴
利用Navicat Premium导出数据库表结构信息至Excel
The principle, architecture, implementation, practice of "transfer" and "search", no need to be afraid of interviews
c语言fprintf、fscanf、sscanf以及sprintf函数知识要点总结
绿盾加密如何顺利切换成IP-Guard加密
洛谷P2580 于是他错误的点名开始了
Snap - rotate the smallest number of an array
Redis:解决分布式高并发修改同一个Key的问题
嵌入式分享合集33
【实战场景】商城-折扣活动设计方案