玩转华为ENSP模拟器系列 | 配置OSPF多进程
Posted COCOgsta
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了玩转华为ENSP模拟器系列 | 配置OSPF多进程相关的知识,希望对你有一定的参考价值。
素材来源:华为路由器配置指南
一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:玩转华为ENSP模拟器系列 | 合集_COCOgsta的博客-CSDN博客_华为模拟器实验
目标
验证OSPF支持多个路由进程,各进程间路由相互隔离
组网需求
配置思路
- Device1启用OSPF多个进程,进程1和进程2
- Device2、Device4与Device1的进程1建立OSPF邻居
- Device3、Device5与Device1的进程2建立OSPF邻居
操作步骤
- 配置各接口的IP地址(略)
- 配置Device1的OSPF基本功能
Device1:
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.0.12.0 0.0.0.255
network 10.0.14.0 0.0.0.255
#
ospf 2 router-id 2.2.2.2
area 0.0.0.0
network 10.0.13.0 0.0.0.255
network 10.0.15.0 0.0.0.255
#
- 配置Device2的OSPF基本功能
Device2:
ospf 1
area 0.0.0.0
network 10.0.12.0 0.0.0.255
#
- 配置Device3的OSPF基本功能
Device3:
ospf 1
area 0.0.0.0
network 10.0.13.0 0.0.0.255
- 配置Device4的OSPF基本功能
Device4:
ospf 1
area 0.0.0.0
network 10.0.14.0 0.0.0.255
#
- 配置Device5的OSPF基本功能
Device5:
ospf 1
area 0.0.0.0
network 10.0.15.0 0.0.0.255
#
- Device1与Device2/3/4/5建立OSPF邻居关系,分别属于进程1和进程2的邻居
[~Device1-ospf-2-area-0.0.0.0]dis ospf peer
(M) Indicates MADJ neighbor
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 10.0.12.1 (Eth1/0/0)'s neighbors
Router ID: 10.0.12.2 Address: 10.0.12.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.12.2 BDR: 10.0.12.1 MTU: 0
Dead timer due in 37 sec
Retrans timer interval: 5
Neighbor is up for 00h20m23s
Neighbor Up Time : 2020-01-02 15:18:56
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 10.0.14.1 (Eth1/0/2)'s neighbors
Router ID: 10.0.14.2 Address: 10.0.14.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.14.1 BDR: 10.0.14.2 MTU: 0
Dead timer due in 32 sec
Retrans timer interval: 5
Neighbor is up for 00h14m20s
Neighbor Up Time : 2020-01-02 15:24:58
Authentication Sequence: [ 0 ]
OSPF Process 2 with Router ID 2.2.2.2
Neighbors
Area 0.0.0.0 interface 10.0.13.1 (Eth1/0/1)'s neighbors
Router ID: 10.0.13.2 Address: 10.0.13.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.13.1 BDR: 10.0.13.2 MTU: 0
Dead timer due in 36 sec
Retrans timer interval: 5
Neighbor is up for 00h13m02s
Neighbor Up Time : 2020-01-02 15:26:18
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 10.0.15.1 (Eth1/0/3)'s neighbors
Router ID: 10.0.15.2 Address: 10.0.15.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.15.1 BDR: 10.0.15.2 MTU: 0
Dead timer due in 33 sec
Retrans timer interval: 5
Neighbor is up for 00h12m10s
Neighbor Up Time : 2020-01-02 15:27:09
Authentication Sequence: [ 0 ]
OSPF Process 65534 with Router ID 128.1.138.138
Neighbors
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/0.4094)'s neighbors
Router ID: 128.1.138.137 Address: 128.1.138.137
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 37 sec
Retrans timer interval: 5
Neighbor is up for 00h31m00s
Neighbor Up Time : 2020-01-02 15:08:19
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/1.4094)'s neighbors
Router ID: 128.1.138.139 Address: 128.1.138.139
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 40 sec
Retrans timer interval: 5
Neighbor is up for 00h31m00s
Neighbor Up Time : 2020-01-02 15:08:20
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/2.4094)'s neighbors
Router ID: 128.1.138.140 Address: 128.1.138.140
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 33 sec
Retrans timer interval: 5
Neighbor is up for 00h30m58s
Neighbor Up Time : 2020-01-02 15:08:21
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/3.4094)'s neighbors
Router ID: 128.1.138.141 Address: 128.1.138.141
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 37 sec
Retrans timer interval: 5
Neighbor is up for 00h31m02s
Neighbor Up Time : 2020-01-02 15:08:18
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/0:0)'s neighbors
Router ID: 128.1.138.137 Address: 128.1.138.137
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 34 sec
Retrans timer interval: 5
Neighbor is up for 00h30m49s
Neighbor Up Time : 2020-01-02 15:08:30
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/1:0)'s neighbors
Router ID: 128.1.138.139 Address: 128.1.138.139
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 37 sec
Retrans timer interval: 5
Neighbor is up for 00h30m49s
Neighbor Up Time : 2020-01-02 15:08:31
Authentication Sequence: [ 0 ]
[~Device1-ospf-2-area-0.0.0.0]
- Device1的进程1和进程2的LSDB相互隔离
[~Device1-ospf-2-area-0.0.0.0]dis ospf lsdb
OSPF Process 1 with Router ID 1.1.1.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 1.1.1.1 1.1.1.1 1127 48 80000003 1
Router 10.0.12.2 10.0.12.2 1490 36 80000002 1
Router 10.0.14.2 10.0.14.2 1128 36 80000002 1
Network 10.0.12.2 10.0.12.2 1490 32 80000001 0
Network 10.0.14.1 1.1.1.1 1127 32 80000001 0
OSPF Process 2 with Router ID 2.2.2.2
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 996 48 80000003 1
Router 10.0.13.2 10.0.13.2 1048 36 80000002 1
Router 10.0.15.2 10.0.15.2 997 36 80000002 1
Network 10.0.13.1 2.2.2.2 1047 32 80000001 0
Network 10.0.15.1 2.2.2.2 996 32 80000001 0
OSPF Process 65534 with Router ID 128.1.138.138
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 128.1.138.137 128.1.138.137 316 60 80000004 100
Router 128.1.138.138 128.1.138.138 314 108 80000008 100
Router 128.1.138.139 128.1.138.139 315 60 80000004 100
Router 128.1.138.140 128.1.138.140 325 48 80000003 100
Router 128.1.138.141 128.1.138.141 328 48 80000003 100
Type 10 Opaque (Area-Local Scope) Database
Type LinkState ID AdvRouter Age Len Sequence Area
Opq-Area 4.0.0.0 128.1.138.137 1611 32 80000002 0.0.0.0
Opq-Area 4.0.0.0 128.1.138.138 1799 32 80000002 0.0.0.0
Opq-Area 4.0.0.0 128.1.138.139 1075 32 80000002 0.0.0.0
Opq-Area 4.0.0.0 128.1.138.140 1588 32 80000002 0.0.0.0
Opq-Area 4.0.0.0 128.1.138.141 1042 32 80000002 0.0.0.0
Opq-Area 200.1.204.0 128.1.138.137 370 84 80000002 0.0.0.0
Opq-Area 200.1.204.0 128.1.138.138 403 84 80000002 0.0.0.0
Opq-Area 200.1.204.0 128.1.138.139 383 84 80000002 0.0.0.0
Opq-Area 200.1.204.0 128.1.138.140 495 84 80000002 0.0.0.0
Opq-Area 200.1.204.0 128.1.138.141 362 84 80000002 0.0.0.0
Opq-Area 200.255.204.0 128.1.138.137 326 36 80000003 0.0.0.0
Opq-Area 200.255.204.0 128.1.138.138 318 36 80000005 0.0.0.0
Opq-Area 200.255.204.0 128.1.138.139 318 36 80000004 0.0.0.0
Opq-Area 200.255.204.0 128.1.138.140 319 36 80000004 0.0.0.0
Opq-Area 200.255.204.0 128.1.138.141 322 36 80000004 0.0.0.0
Opq-Area 202.255.238.0 128.1.138.137 370 68 80000002 0.0.0.0
Opq-Area 202.255.238.0 128.1.138.138 403 68 80000002 0.0.0.0
Opq-Area 202.255.238.0 128.1.138.139 383 68 80000002 0.0.0.0
Opq-Area 202.255.238.0 128.1.138.140 495 68 80000002 0.0.0.0
Opq-Area 202.255.238.0 128.1.138.141 362 68 80000002 0.0.0.0
[~Device1-ospf-2-area-0.0.0.0]
- Device2/3/4/5仅可以与相同进程的Device互相ping通,以Device2为例
[~Device2]ping 10.0.14.2
PING 10.0.14.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.14.2: bytes=56 Sequence=1 ttl=254 time=11 ms
Reply from 10.0.14.2: bytes=56 Sequence=2 ttl=254 time=8 ms
Reply from 10.0.14.2: bytes=56 Sequence=3 ttl=254 time=8 ms
--- 10.0.14.2 ping statistics ---
3 packet(s) transmitted
3 packet(s) received
0.00% packet loss
round-trip min/avg/max = 8/9/11 ms
[~Device2]ping 10.0.15.2
PING 10.0.15.2: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 10.0.15.2 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
[~Device2]
- Device1重启进程1,进程2不受影响
<Device1>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y
<Device1>dis ospf peer
(M) Indicates MADJ neighbor
OSPF Process 2 with Router ID 2.2.2.2
Neighbors
Area 0.0.0.0 interface 10.0.13.1 (Eth1/0/1)'s neighbors
Router ID: 10.0.13.2 Address: 10.0.13.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.13.1 BDR: 10.0.13.2 MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00h28m25s
Neighbor Up Time : 2020-01-02 15:26:18
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 10.0.15.1 (Eth1/0/3)'s neighbors
Router ID: 10.0.15.2 Address: 10.0.15.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.15.1 BDR: 10.0.15.2 MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00h27m33s
Neighbor Up Time : 2020-01-02 15:27:09
Authentication Sequence: [ 0 ]
OSPF Process 65534 with Router ID 128.1.138.138
Neighbors
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/0.4094)'s neighbors
Router ID: 128.1.138.137 Address: 128.1.138.137
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 36 sec
Retrans timer interval: 5
Neighbor is up for 00h46m25s
Neighbor Up Time : 2020-01-02 15:08:19
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/1.4094)'s neighbors
Router ID: 128.1.138.139 Address: 128.1.138.139
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 38 sec
Retrans timer interval: 5
Neighbor is up for 00h46m25s
Neighbor Up Time : 2020-01-02 15:08:20
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/2.4094)'s neighbors
Router ID: 128.1.138.140 Address: 128.1.138.140
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 32 sec
Retrans timer interval: 5
Neighbor is up for 00h46m23s
Neighbor Up Time : 2020-01-02 15:08:21
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/3.4094)'s neighbors
Router ID: 128.1.138.141 Address: 128.1.138.141
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 36 sec
Retrans timer interval: 5
Neighbor is up for 00h46m27s
Neighbor Up Time : 2020-01-02 15:08:18
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/0:0)'s neighbors
Router ID: 128.1.138.137 Address: 128.1.138.137
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 33 sec
Retrans timer interval: 5
Neighbor is up for 00h46m14s
Neighbor Up Time : 2020-01-02 15:08:30
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/1:0)'s neighbors
Router ID: 128.1.138.139 Address: 128.1.138.139
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00h46m14s
Neighbor Up Time : 2020-01-02 15:08:31
Authentication Sequence: [ 0 ]
<Device1>
<Device1>
<Device1>
<Device1>
<Device1>
<Device1>dis ospf peer
(M) Indicates MADJ neighbor
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 10.0.12.1 (Eth1/0/0)'s neighbors
Router ID: 10.0.12.2 Address: 10.0.12.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.12.2 BDR: 10.0.12.1 MTU: 0
Dead timer due in 39 sec
Retrans timer interval: 5
Neighbor is up for 00h00m30s
Neighbor Up Time : 2020-01-02 15:54:45
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 10.0.14.1 (Eth1/0/2)'s neighbors
Router ID: 10.0.14.2 Address: 10.0.14.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.14.2 BDR: 10.0.14.1 MTU: 0
Dead timer due in 32 sec
Retrans timer interval: 5
Neighbor is up for 00h00m29s
Neighbor Up Time : 2020-01-02 15:54:46
Authentication Sequence: [ 0 ]
OSPF Process 2 with Router ID 2.2.2.2
Neighbors
Area 0.0.0.0 interface 10.0.13.1 (Eth1/0/1)'s neighbors
Router ID: 10.0.13.2 Address: 10.0.13.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.13.1 BDR: 10.0.13.2 MTU: 0
Dead timer due in 39 sec
Retrans timer interval: 5
Neighbor is up for 00h29m01s
Neighbor Up Time : 2020-01-02 15:26:18
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 10.0.15.1 (Eth1/0/3)'s neighbors
Router ID: 10.0.15.2 Address: 10.0.15.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.15.1 BDR: 10.0.15.2 MTU: 0
Dead timer due in 32 sec
Retrans timer interval: 5
Neighbor is up for 00h28m09s
Neighbor Up Time : 2020-01-02 15:27:09
Authentication Sequence: [ 0 ]
OSPF Process 65534 with Router ID 128.1.138.138
Neighbors
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/0.4094)'s neighbors
Router ID: 128.1.138.137 Address: 128.1.138.137
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00h46m59s
Neighbor Up Time : 2020-01-02 15:08:19
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/1.4094)'s neighbors
Router ID: 128.1.138.139 Address: 128.1.138.139
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 37 sec
Retrans timer interval: 5
Neighbor is up for 00h46m59s
Neighbor Up Time : 2020-01-02 15:08:20
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/2.4094)'s neighbors
Router ID: 128.1.138.140 Address: 128.1.138.140
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 31 sec
Retrans timer interval: 5
Neighbor is up for 00h46m57s
Neighbor Up Time : 2020-01-02 15:08:21
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (Eth1/0/3.4094)'s neighbors
Router ID: 128.1.138.141 Address: 128.1.138.141
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00h47m01s
Neighbor Up Time : 2020-01-02 15:08:18
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/0:0)'s neighbors
Router ID: 128.1.138.137 Address: 128.1.138.137
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 32 sec
Retrans timer interval: 5
Neighbor is up for 00h46m48s
Neighbor Up Time : 2020-01-02 15:08:30
Authentication Sequence: [ 0 ]
Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/1:0)'s neighbors
Router ID: 128.1.138.139 Address: 128.1.138.139
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 34 sec
Retrans timer interval: 5
Neighbor is up for 00h46m48s
Neighbor Up Time : 2020-01-02 15:08:31
Authentication Sequence: [ 0 ]
<Device1>
以上是关于玩转华为ENSP模拟器系列 | 配置OSPF多进程的主要内容,如果未能解决你的问题,请参考以下文章
玩转华为ENSP模拟器系列 | 配置指定进程的BFD for OSPF特性
玩转华为ENSP模拟器系列 | 配置LDP与OSPF联动示例