本文档基于《[7]--20250105数通IP2407周末班 OSPF特殊区域及其他特_笔记.pdf》整理,涵盖 OSPF 静默接口、认证机制、网络类型匹配、MTU 检测以及 IS-IS 协议基础核心概念。
# 单个接口配置
ospf 1
silent-interface GigabitEthernet 0/0/1
# 批量配置(先静默所有,再取消特定接口)
ospf 1
silent-interface all
undo silent-interface GigabitEthernet 0/0/0 # 恢复互联接口| 分类 | 配置层级 | 特点 | 适用场景 |
|---|---|---|---|
| 区域认证 | OSPF 区域视图 (area x) | 批量配置,区域内所有接口强制使用相同方式和密钥。 | 大规模统一部署,简化管理。 |
| 接口认证 | 接口视图 (interface x) | 定制化配置,可为不同接口设置不同密钥。 | 特殊链路需要独立密钥,或临时调试。 |
| 类型 | 标识值 | 原理 | 安全性 | 缺点 |
|---|---|---|---|---|
| Null (空认证) | 0 | 不进行任何校验。 | 无 | 无任何防护,默认状态。 |
| Simple (明文认证) | 1 | 报文中直接携带密码明文。 | 低 | 密码易被抓包截获;无法防篡改(仅比对密码)。 |
| MD5 (哈希认证) | 2 | 携带 Key ID 和哈希值,不传密码。 | 高 | 配置稍复杂;需双方 Key ID 和密码一致。 |
在以太网等广播多路访问网络中,建立邻居必须满足:
Netmask 字段。ospf mtu-enable 未开启,DD 报文中 MTU 填 0。由于任何值都 $\ge$ 0,因此默认不检查 MTU,即使两端 MTU 不一致也能建立邻居。IS-IS 使用 NSAP (Network Service Access Point) 地址标识设备,结构复杂,变长 (8-20 字节)。
Area ID + System ID + 00。1.1.1.1 -> (补零法) 或 (简化法)。| 特性 | OSPF | IS-IS |
|---|---|---|
| 区域边界位置 | 在路由器上 (ABR) | 在链路上 |
| 路由器归属 | 一台路由器可属于多个区域 (接口级别) | 一台路由器完整属于一个区域 |
| 骨干区域构成 | 严格的 Area 0 | 所有 L2 和 L1/L2 路由器构成的逻辑连续体 |
| 区域变更灵活性 | 困难,需中断业务调整 ABR | 灵活,可通过配置多个 NET 平滑迁移区域 |
| 知识点 | 核心结论/易错点 | 难度 |
|---|---|---|
| 静默接口 | 不发 Hello 但通告路由;严禁配在互联口。 | ⭐⭐⭐ |
| 认证优先级 | 接口认证 > 区域认证;类型、Key ID、密码需三方一致。 | ⭐⭐⭐⭐ |
| MD5 原理 | 传哈希不传密码;防篡改、防重放;不可逆。 | ⭐⭐⭐⭐⭐ |
| 广播网掩码 | 必须一致,否则 Type-2 LSA 网段描述冲突导致路由黑洞。 | ⭐⭐⭐⭐ |
| 网络类型 mismatch | P2P+Broadcast 能建邻居但无路由;NBMA+Broadcast 建不了邻居。 | ⭐⭐⭐⭐ |
| MTU 检测 | 华为默认关闭 (填 0),开启后两端 MTU 必须一致才能 Full。 | ⭐⭐⭐ |
| IS-IS 地址 | System ID 固定 6 字节;SEL 固定 00;一台设备只能属一个区域。 | ⭐⭐⭐⭐ |
| 区域边界 | OSPF 边界在路由器 (ABR);IS-IS 边界在链路。 | ⭐⭐⭐⭐ |
此文档涵盖了 PDF 中关于 OSPF 安全特性、邻居建立深层机制以及 IS-IS 基础架构的核心内容,适用于数通 IP 级别的学习与复习。
本实验分为两个部分:OSPF 高级特性验证 和 IS-IS 基础配置。

IP 地址与 NET 规划表:

Ethernet0/0/2 (连接 PC1) 上配置静默接口。R1 配置:
验证:
display ospf interface Ethernet0/0/2,确认状态为 Silent。display ospf peer,确认该接口无邻居。display ip routing-table 192.168.1.0,确认能学习到该路由(证明路由被通告)。R1 配置 (接口 MD5):
interface Ethernet0/0/0
ospf authentication-mode md5 10 cipher Huawei@123R2 配置 (错误配置 - 仅区域认证):
ospf 1
area 0.0.0.0
authentication-mode simple plain验证:
display ospf peer brief,状态应卡在 Init 或 Down。/24。/25 (255.255.255.128)。R2 配置:
interface Ethernet0/0/0
ip address 10.0.12.2 255.255.255.128 # 故意配错验证:
display ospf peer。/24。p2p,R3 保持默认 broadcast。R2 配置:
interface Ethernet0/0/1
ospf network-type p2p验证:
display ospf peer。Full。display ip routing-table 查看对方 Loopback 路由。broadcast。R1 & R2 配置:
interface Ethernet0/0/0
ospf mtu-enable
# R1 额外配置
mtu 1400验证:
ExStart 或 Exchange。debugging ospf packet dd (慎用) 或查看日志,发现 MTU 不匹配拒绝 DD 报文。49.0001.0000.0000.0004.00。49.0001.0000.0000.0005.00。49.0002.0000.0000.0006.00。R4 配置:
R5 配置 (Level-1):
R6 配置 (Level-2):
display isis peer on R4/R5.display isis peer on R4/R6.display ip routing-table protocol isis。isis 1
network-entity 49.0002.0000.0000.0004.00| 测试项 | 配置操作 | 邻居状态 | 路由学习情况 | 结论分析 |
|---|---|---|---|---|
| 静默接口 | R1 E0/0/2 silent-interface | 无邻居 | R2 能 学到 192.168.1.0/24 | 静默接口只阻断 Hello,不阻断 LSA 生成。 |
| 认证不匹配 | R1 MD5, R2 Simple | Down / Init | 无路由 | 认证类型、Key ID、密码必须三方一致。 |
| 掩码不一致 | R1 /24, R2 /25 | Down | 无路由 | 广播网掩码必须一致,否则 Type-2 LSA 冲突。 |
| 网络类型不匹配 | R2 P2P, R3 Broadcast | Full | 无路由 | 邻居能建,但 LSA 拓扑描述不一致导致 SPF 计算失败。 |
| MTU 不匹配 | 开启检查,MTU 1400 vs 1500 | ExStart | 无路由 | DD 报文携带 MTU,大 MTU 方被小 MTU 方拒绝。 |
邻接关系建立:
路由传播特性:
0.0.0.0/0) 指向 R4。NET 地址灵活性:
isis enable <process-id> 才能生效,仅在进程下宣告网段是无效的(这与 OSPF 不同)。本实验手册完整覆盖了文档中关于 OSPF 安全、邻居建立深层机制及 IS-IS 基础架构的核心知识点,通过实操验证了理论中的关键细节。
# 接口视图配置 MD5
interface GigabitEthernet 0/0/0
ospf authentication-mode md5 10 cipher Huawei@123
# 10: Key ID, cipher: 配置文件加密显示0000.0000.000149.0001.0000.0000.0001.00 (Area 49.0001, SysID 0000.0000.0001)。# 静默接口
ospf 1
silent-interface all
undo silent-interface GigabitEthernet 0/0/0
# 区域明文认证
ospf 1
area 0
authentication-mode simple plain Huawei123
# 接口 MD5 认证 (优先于区域认证)
interface GigabitEthernet 0/0/0
ospf authentication-mode md5 10 cipher Huawei@123# 修改网络类型
interface GigabitEthernet 0/0/0
ospf network-type p2p
# 开启 MTU 检查 (默认关闭)
interface GigabitEthernet 0/0/0
ospf mtu-enableisis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0001.00 # 配置 NET 地址
interface GigabitEthernet 0/0/0
ip address 10.0.12.1 255.255.255.0
isis enable 1ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.0.12.0 0.0.0.255
network 192.168.1.0 0.0.0.255
silent-interface Ethernet0/0/2 # 配置静默interface Ethernet0/0/0
ospf authentication-mode md5 10 cipher Huawei@123Full。isis 1
is-level level-1-2
network-entity 49.0001.0000.0000.0004.00
cost-style wide
interface Ethernet0/0/0
isis enable 1
interface Ethernet0/0/1
isis enable 1isis 1
is-level level-1
network-entity 49.0001.0000.0000.0005.00
cost-style wide
interface Ethernet0/0/0
isis enable 1isis 1
is-level level-2
network-entity 49.0002.0000.0000.0006.00
cost-style wide
interface Ethernet0/0/1
isis enable 1