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

相关推荐
大方子15 小时前
【PolarCTF】rce1
网络安全·polarctf
枷锁—sha17 小时前
Burp Suite 抓包全流程与 Xray 联动自动挖洞指南
网络·安全·网络安全
聚铭网络17 小时前
聚铭网络再度入选2026年度扬州市网络和数据安全服务资源池单位
网络安全
darkb1rd20 小时前
八、PHP SAPI与运行环境差异
开发语言·网络安全·php·webshell
世界尽头与你1 天前
(修复方案)基础目录枚举漏洞
安全·网络安全·渗透测试
枷锁—sha2 天前
【SRC】SQL注入快速判定与应对策略(一)
网络·数据库·sql·安全·网络安全·系统安全
liann1192 天前
3.1_网络——基础
网络·安全·web安全·http·网络安全
ESBK20252 天前
第四届移动互联网、云计算与信息安全国际会议(MICCIS 2026)二轮征稿启动,诚邀全球学者共赴学术盛宴
大数据·网络·物联网·网络安全·云计算·密码学·信息与通信
旺仔Sec2 天前
一文带你看懂免费开源 WAF 天花板!雷池 (SafeLine) 部署与实战全解析
web安全·网络安全·开源·waf
七牛云行业应用2 天前
Moltbook一夜崩盘:150万密钥泄露背后的架构“死穴”与重构实战
网络安全·postgresql·架构·高并发·七牛云