首页 > 其他分享 >OSPF配置

OSPF配置

时间:2022-12-20 17:35:50浏览次数:24  
标签:10.0 ospf 0.0 配置 255.255 router config OSPF


OSPF配置

  • ​​实验拓扑​​
  • ​​端口配置​​
  • ​​OSPF配置,进程号1​​
  • ​​避免不必要的路由流量,设置被动端口​​
  • ​​配置路由器的 router-id​​
  • ​​实验结果​​

主机

端口

Ip

子网掩码

默认网关

PC1

192.168.0.222

255.255.255.224

192.168.0.193

PC2

192.168.0.190

255.255.255.192

192.168.0.129

PC3

192.168.0.126

255.255.255.128

192.168.0.1

R1

F0/0

10.0.0.1

255.255.255.252

R1

F0/1

192.168.0.193

255.255.255.224

R2

F0/0

10.0.0.5

255.255.255.252

R2

F0/1

192.168.0.129

255.255.255.192

R3

F0/0

10.0.0.9

255.255.255.252

R3

F0/1

192.168.0.1

255.255.255.128

R4

F0/0

10.0.0.2

255.255.255.252

R4

F0/1

10.0.0.6

255.255.255.252

R4

F0/2

10.0.0.10

255.255.255.252

实验拓扑

OSPF配置_网络规划设计(路由与交换)

OSPF配置_网络_02

端口配置

R1#configure terminal 
R1(config)#interface f0/0
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#interface f0/1
R1(config-if)#ip address 192.168.0.193 255.255.255.224
R1(config-if)#no shutdown

R2(config)#interface f0/0
R2(config-if)#ip address 10.0.0.5 255.255.255.252
R2(config-if)#no shutdown
R2(config)#interface f0/1
R2(config-if)#ip address 192.168.0.129 255.255.255.128
R2(config-if)#no shutdown

R3(config)#interface f0/0
R3(config-if)#ip address 10.0.0.9 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#interface f0/1
R3(config-if)#ip address 192.168.0.1 255.255.255.128
R3(config-if)#no shutdown


R4(config)#interface f0/0
R4(config-if)#ip address 10.0.0.2 255.255.255.252
R4(config-if)#no shutdown
R4(config-if)#interface f0/1
R4(config-if)#ip address 10.0.0.6 255.255.255.252
R4(config-if)#no shutdown
R4(config-if)#interface f0/1
R4(config-if)#ip address 10.0.0.6 255.255.255.252
R4(config-if)#no shutdown

OSPF配置,进程号1

R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.0.0.3 area 0
R1(config-router)#network 192.168.0.192 0.0.0.31 area 0


R2(config)#router ospf 1
R2(config-router)#network 10.0.0.0 0.0.0.3 area 0
R2(config-router)#network 10.0.0.4 0.0.0.3 area 0
R2(config-router)#network 192.168.0.128 0.0.0.63 area 0

R3(config)#router ospf 1
R3(config-router)#network 10.0.0.0 0.0.0.3 area 0
R3(config-router)#network 10.0.0.8 0.0.0.3 area 0
R3(config-router)#network 192.168.0.0 0.0.0.127 area 0

R4(config)#router ospf 1
R4(config-router)#network 10.0.0.0 0.0.0.3 area 0
R4(config-router)#network 10.0.0.4 0.0.0.3 area 0
R4(config-router)#network 10.0.0.8 0.0.0.3 area 0

避免不必要的路由流量,设置被动端口

R1(config)#router ospf 1
R1(config-router)#passive-interface f0/1

R2(config)#router ospf 1
R2(config-router)#passive-interface f0/1

R3(config)#router ospf 1
R3(config-router)#passive-interface f0/1

配置路由器的 router-id

R1(config)#router ospf 1
R1(config-router)#router-id 172.16.1.1
R1(config-router)#end
R1#clear ip ospf process

R2(config)#router ospf 1
R2(config-router)#rout
R2(config-router)#router-id 172.16.1.2
R2(config-router)#end
R2#clear ip ospf process

R3(config)#router ospf 1
R3(config-router)#router-id 172.16.1.3
R3(config-router)#end
R3#clear ip ospf process

R4(config)#router ospf 1
R4(config-router)#router-id 172.16.1.4
R4(config-router)#end
R4#clear ip ospf process

实验结果

OSPF配置_网络规划设计(路由与交换)_03


标签:10.0,ospf,0.0,配置,255.255,router,config,OSPF
From: https://blog.51cto.com/u_15918664/5956354

相关文章

  • STP配置
    STP配置​​学习目标​​​​实验拓扑​​学习目标检查STP默认状态配置根网桥配置备份根桥接器确定STP配置实验拓扑任务1:检查STP默认状态步骤1。检查链路的链接。当ST......
  • 配置zookeeper服务器
    配置zk服务器基本配置名称作用默认clientPort客户端所连接的服务器所监听的TCP端口2181dataDir于配置内存数据库保存的模糊快照的⽬录,如果某个服务器为......
  • SpringBoot - 配置包扫描注解@ComponentScan
    @ComponentScan作用:配置包扫描规则范围:主程序类上(被@SpringBootApplication修饰),或配置类上(被@Configuration修饰)参数:value指定要扫描的包,excludeFilters配置排除......
  • swagger-ui-express 配置 Authorize
    swagger-ui-express配置Authorize在路径中这样配"security":[{"Bearer":[]}]在securitySchemes中这样配"securitySchemes":{......
  • ubuntu配置nfs
    服务器sudoaptinstallnfs-kernel-server/etc/exports中添加共享目录/home/xpy/cig*(rw,sync,no_root_squash)客户端sudoaptinstallnfs-commonmount-tnfs19......
  • Python 任务自动化工具:nox 的配置与 API
    英文|​​Configuration&API​​​译者|豌豆花下猫@Python猫Github地址:​​https://github.com/chinesehuazhou/nox_doc_cn​​声明:本翻译基于CCBY-NC-SA4.0授权协......
  • fast-livo 配置问题
    问题一:Ubuntu安装Sophus报错:so2.cpp:error:lvaluerequiredasleftoperandofassignment.unit_complex_.real()=1.; 遇到的问题: /Sophus/sophus/so2.cpp......
  • Nginx配置相关说明
    需要详细了解Nginx配置的可以参考以下的站点:Nginx中文WIKI:​​http://wiki.nginx.org/NginxChs​​Nginx源码解析blog:​​http://www.pagefault.info/?p=368​​Nginx英......
  • 美国服务器如何配置防火墙
    1、防火墙的所有文件规则必须更改由于美国服务器防火墙没有内置的变动管理流程,因此文件更改对于许多用户来说并不是最佳的实践方法,因为美国服务器防火墙如果有突发情况......
  • webpy中配置发送邮件服务
    官方cookbook链接:http://webpy.org/cookbook/sendmail.zh-cn前提:需要安装web.py了,因为我这个web应用是用web.py写的#!\urs\bin\envpython#encoding:utf-8importwebdefse......