当前位置: 首页 > news >正文

HCIP-2

Broadcast 类型查看

[R4]display ospf interface g0/0/0

          OSPF Process 100 with Router ID 4.4.4.4

                   Interfaces

 Interface: 34.1.1.2 (GigabitEthernet0/0/0)

 Cost: 1       State: DROther    Type: Broadcast    MTU: 1500 

 Priority: 0

 Designated Router: 34.1.1.1

 Backup Designated Router: 0.0.0.0

 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1

华为设备环回网络类型默认p2p  32位主机路由发送无hello包

[R4]display  ospf interface LoopBack 0

          OSPF Process 100 with Router ID 4.4.4.4

                   Interfaces

 Interface: 4.4.4.4 (LoopBack0)

 Cost: 0       State: P-2-P     Type: P2P       MTU: 1500 

 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1

P2p类型

接口类型:                OSPF的工作方式

Loopback                  LOOPBACK  无hello包,32位主机路由发送

点到点(HDLC/PPP)  POINT_TO_POINT hello 10s、dead 40s;不选DR,自动建邻

BMA(以太网)           BROADCAST hello 10s、dead 40s;选DR,自动建邻

NBMA(帧中继)

[R2]display  ospf interface s4/0/0

          OSPF Process 100 with Router ID 2.2.2.2

                   Interfaces

 Interface: 12.1.1.2 (Serial4/0/0) --> 12.1.1.1

 Cost: 48      State: P-2-P     Type: P2P       MTU: 1500 

 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1

修改网络类型

[R2]interface g0/0/0

[R2-GigabitEthernet0/0/0]ospf network-type nbma

一、真实物理接口:        NON_BROADCAST

                          Hello 30, Dead 120;非自动建邻(不使用组播广播发送hello

                          包);只能使用单播建立邻居关系;

必须手工进行建邻

[R2]ospf 100

[R2-ospf-100]peer 12.1.1.1

point-to-multipoint 工作方式:hello 30s dead 120s;自动建邻,不选DR/BDR;计算路径时已传递过来LSA的邻居为下一跳,自动生成达到该网段所有直连子接口的32位主机路由;

解决ospf不规则区域

  1. 远离骨干的非骨干区域
  2. 不连续的骨干区域

解决方法

  1. Tunnel

在两台ABR上创建tunnel,然后将其宣告到OSPF协议中;

缺点:1、选路不佳   2、周期hello和更新均对中间区域进行影响

R3(config)#interface tunnel 0     

R3(config-if)#tunnel source 23.1.1.2

R3(config-if)#tunnel destination  23.1.1.1

R3(config-if)#ip address 10.1.1.2 255.255.255.0

  1. 虚链路 ospf自带

在两台ABR上配置,使未连接骨干的ABR得知骨干的存在,之后将域间路由进行交互;

取消周期的更新和邻居保活;

[R2]ospf 100

[R2-ospf-100]area  1

[R2-ospf-100-area-0.0.0.1]vlink-peer 3.3.3.3

cisco

R3(config)#router ospf 1

R3(config-router)#area  1 virtual-link 2.2.2.2

优点:选路佳、占用中间区域资源少;

缺点:不可靠

  1. 多进程双向重发布技术

[R3]ospf 101

[R3-ospf-101]import-route ospf  100

cisco

R3(config)#router ospf 1

R3(config-router)#redistribute ospf 100 subnets

ospf的lsa

Ospf的lsdb

[R4]display ospf lsdb router 4.4.4.4

          OSPF Process 100 with Router ID 4.4.4.4

                           Area: 0.0.0.2

                   Link State Database

  Type      : Router

  Ls id     : 4.4.4.4

  Adv rtr   : 4.4.4.4 

  Ls age    : 59

  Len       : 48

  Options   :  E 

  seq#      : 80000004

  chksum    : 0xe2e0

  Link count: 2

   * Link ID: 4.4.4.4     

     Data   : 255.255.255.255

     Link Type: StubNet

类型    通告者     携带信息   传播范围  link-id

router  自己本身   链路状态    本区域    自己本身router-id

network  dr       描述ma网络 本区域   dr的ip地址

summary  abr      域外路由条目 整个ospf域 域外路由条目

asbr      abr      asbr的位置  整个ospf域 asbr的router-id

External  asbr     重发布进入的路由条目 除重发布进入区域的所有区域 重发布进入的路由条目

ABR 区域边界路由器

ASBR 自治系统边界路由器,不同协议边界路由器

OSPF的优化:减少LSA的更新

1、特殊区域--优化非骨干区域

条件:不能为骨干区域,不能存在虚链路

【1】不能存在ASBR

{1}末梢区域---拒绝4、5类LSA;产生一条3类缺省

r3(config)#router ospf 1

r3(config-router)#area 1 stub   该区域内所有设备均需配置

华为设备

[R2]ospf 100

 [R2-ospf-100]area  1

 [R2-ospf-100-area-0.0.0.1]stub

{2}完全末梢区域---在末梢区域的基础上进一步拒绝3类的LSA,仅保留一条3类的缺省

先将该区域配置为末梢区域,然后仅需要在ABR上定义为完全末梢即可

r3(config)#router ospf 1

r3(config-router)#area 1 stub no-summary

华为

[R2]ospf 100

 [R2-ospf-100]area 1

 [R2-ospf-100-area-0.0.0.1]stub no-summary

【2】存在ASBR

{1}NSSA---拒绝4、5的LSA,不自动产生3类缺省;5类在NSSA区域内被转换为7类转发;离开该区域后还原为5类

r1(config)#router ospf 1

r1(config-router)#area 2 nssa

华为设备拒绝4类 产生7类缺省

华为

[R4]ospf 100

 [R4-ospf-100]area 2

 [R4-ospf-100-area-0.0.0.2]nssa

{2}完全的NSSA----在NSSA的基础上,进一步拒绝3/4/5类LSA,5类转7类;自动产生缺省指向ABR;

先将该区域配置为NSSA,然后仅需要在ABR上定义为完全即可

r1(config)#router ospf 1

r1(config-router)#area 2 nssa no-summary

华为  华为设备自动产生7类缺省 cisco不自动产生。

[R4]ospf 100

 [R4-ospf-100]area 2

 [R4-ospf-100-area-0.0.0.2]nssa no-summary

  1. 域间路由汇总--在ABR上操作

r3(config)#router ospf 1

r3(config-router)#area 1 range 4.4.4.0 255.255.254.0

          通过该区域内的1/2类LSA计算所得路由才可以汇总

华为设备

[R2]ospf 100

 [R2-ospf-100]area 1

 [R2-ospf-100-area-0.0.0.1]abr-summary 192.168.0.0 255.255.252.0

  1. 域外路由汇总---在ASBR上操作

r5(config)#router ospf 1

r5(config-router)#summary-address 99.1.0.0 255.255.252.0  域外路由可以为5、7类

华为

[R4]ospf 100

 [R4-ospf-100]asbr-summary 172.16.0.0 255.255.252.0

OSPF的扩展配置:

  1. 认证

【1】接口认证--在邻居间相连的接口上配置

  1. 接口明文

r1(config)#int s1/1

r1(config-if)#ip ospf authentication

先开启明文认证需求,开启后本地hello包中认证类型字段已经变化,邻居间必须一致

r1(config-if)#ip ospf authentication-key cisco 配置明文密码

华为

[R1]interface g0/0/0

 [R1-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123

(2)接口密文

r2(config)#int s1/1

r2(config-if)#ip ospf authentication message-digest

r2(config-if)#ip ospf message-digest-key 1 md5 cisco

邻居间必须完全一致

华为

[R3]interface g0/0/1

 [R3-GigabitEthernet0/0/1]ospf authentication-mode simple cipher 123

[R3-GigabitEthernet0/0/1]ospf authentication-mode md5

【2】区域认证

例:在R1上开启关于0区域的明文或密文认证;之后实际是将R1上工作于区域0的接口修改认证类型字段为明文或密文;之后的密码还需要到各个接口上逐一配置;

r3(config)#router ospf 1

r3(config-router)#area 0 authentication  区域明文认证

r3(config-router)#area 0 authentication  message-digest 区域密文认证

华为

[R1]ospf 100

 [R1-ospf-100]area 3

 [R1-ospf-100-area-0.0.0.3]authentication-mode simple cipher 123

[R4]ospf 100

 [R4-ospf-100]area 1

 [R4-ospf-100-area-0.0.0.1]authentication-mode simple cipher 123

 [R4-ospf-100-area-0.0.0.1]authentication-mode md5

【3】虚链路认证

r3(config)#router ospf 1

r3(config-router)#area 1 virtual-link 4.4.4.4 authentication  明文

r3(config-router)#area 1 virtual-link 4.4.4.4 authentication-key cisco

r3(config-router)#area 1 virtual-link 4.4.4.4 authentication message-digest 密文

r3(config-router)#area 1 virtual-link 4.4.4.4 message-digest-key 1 md5 cisco

华为

[R4]ospf 100   

[R4-ospf-100]area 1

 [R4-ospf-100-area-0.0.0.1]vlink-peer 3.3.3.3 simple cipher 123

密文

[R4-ospf-100-area-0.0.0.1]vlink-peer 3.3.3.3 simple cipher 123

 [R4-ospf-100-area-0.0.0.1]vlink-peer 3.3.3.3 md5

特殊区域不能做虚链路

  1. 加快协议收敛速度  10s 40s    30s 120s  邻居间必须一致

r1(config)#int s1/1

r1(config-if)#ip ospf hello-interval 5 

修改本端的hello time,本端dead time 自动4倍关系匹配

r1(config-if)#ip ospf dead-interval 20 修改本端的dead time,本端hello time不变化的;

华为

[R2]interface g0/0/0

 [R2-GigabitEthernet0/0/0]ospf timer hello 5

 [R2-GigabitEthernet0/0/0]ospf timer dead 20

  1. 被动接口---用于同用户相连的接口,只接收不发送路由协议信息

r2(config)#router ospf 1

r2(config-router)#passive-interface fastEthernet 0/0

静默接口

[R2]ospf 100

 [R2-ospf-100]silent-interface g0/0/3

  1. 缺省路由

3类的缺省---由特殊区域自动产生   末梢、完全末梢、完全NSSA

5类的缺省----在一台路由器上,必须已经拥有缺省条目的前提下,进行重发布

r2(config)#router ospf 1

r2(config-router)#default-information originate

若一台设备上不存在缺省路由,那么也可以强制向网内重发布缺省

r2(config)#router ospf 1

r2(config-router)#default-information originate always

注:进入的条目为类型2;

类型1,在内网传递时携带内部的度量值

类型2,在内网传递时不携带内部的度量值

r2(config)#router ospf 1

r2(config-router)#default-information originate metric-type 1

r2(config-router)#default-information originate always metric-type 1

华为

[R1]ospf 100

 [R1-ospf-100]default-route-advertise

 [R1-ospf-100]default-route-advertise always

[R1]ospf 100

 [R1-ospf-100]default-route-advertise always type 1

7类的缺省---边界路由器所在位置处于NSSA区域内,且该路由器上已经拥有缺省路由;

r5(config)#router ospf 1

r5(config-router)#area 2 nssa default-information-originate 默认进入为类型2;

r5(config-router)#area 2 nssa default-information-originate metric-type 1 修改为类型1

相关文章:

  • 访问学者申请需要注意什么?
  • 拼多多根据ID取商品详情原数据 API 实现实时数据获取的完整指南
  • 奥伦德光电耦合器5G通信领域及其相关领域推荐
  • 【动态规划】20子数组系列_环形子数组的最大和_C++(medium)
  • Linux部署WBO在线白板
  • create_metrology_model
  • MYSQL篇--sql优化高频面试题
  • 数据库系统原理总结之——数据库编程
  • 贝叶斯优化的基本流程
  • 做一个个人博客第一步该怎么做?
  • GPT-4:人工智能的新纪元与未来的无限可能
  • 002 Golang-channel-practice
  • 【正点原子STM32连载】 第二十九章 睡眠模式实验 摘自【正点原子】APM32E103最小系统板使用指南
  • 微服务自动化docker-compose
  • 软件测试实习生的最后一天,四小时四场技术面试(三)
  • 10个确保微服务与容器安全的最佳实践
  • 230. Kth Smallest Element in a BST
  • AzureCon上微软宣布了哪些容器相关的重磅消息
  • Date型的使用
  • golang中接口赋值与方法集
  • JS+CSS实现数字滚动
  • Lucene解析 - 基本概念
  • Markdown 语法简单说明
  • Next.js之基础概念(二)
  • OpenStack安装流程(juno版)- 添加网络服务(neutron)- controller节点
  • Phpstorm怎样批量删除空行?
  • Python 反序列化安全问题(二)
  • Redis在Web项目中的应用与实践
  • Spark VS Hadoop:两大大数据分析系统深度解读
  • VUE es6技巧写法(持续更新中~~~)
  • 代理模式
  • 聊聊springcloud的EurekaClientAutoConfiguration
  • 全栈开发——Linux
  • 数组的操作
  • 算法之不定期更新(一)(2018-04-12)
  • Nginx惊现漏洞 百万网站面临“拖库”风险
  • 蚂蚁金服CTO程立:真正的技术革命才刚刚开始
  • ​LeetCode解法汇总1410. HTML 实体解析器
  • ​LeetCode解法汇总2182. 构造限制重复的字符串
  • ​批处理文件中的errorlevel用法
  • #1015 : KMP算法
  • #pragam once 和 #ifndef 预编译头
  • #Z0458. 树的中心2
  • (1)(1.9) MSP (version 4.2)
  • (20050108)又读《平凡的世界》
  • (html转换)StringEscapeUtils类的转义与反转义方法
  • (第27天)Oracle 数据泵转换分区表
  • (附源码)springboot 校园学生兼职系统 毕业设计 742122
  • (力扣)1314.矩阵区域和
  • (十一)JAVA springboot ssm b2b2c多用户商城系统源码:服务网关Zuul高级篇
  • (一)u-boot-nand.bin的下载
  • (转载)跟我一起学习VIM - The Life Changing Editor
  • .Net CF下精确的计时器
  • .NET Standard 的管理策略
  • .net6Api后台+uniapp导出Excel