@地址汇总
1、三类地址汇总
注:在产生 3 类的ABR 上配置
R1配置命令:
The device is running!
system //进入系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1 //更改设备名称
[r1]interface g0/0/0 //进入接口
[r1-GigabitEthernet0/0/0]ip add 192.168.12.1 24 //配置IP地址
[r1]interface LoopBack 1 //建立回环接口1
[r1-LoopBack1]ip add 10.10.1.1 24 //配置IP
[r1]interface LoopBack 2 //建立回环接口2
[r1-LoopBack2]ip add 10.10.2.1 24 //配置IP
[r1]inter LoopBack 3 //建立回环接口3
[r1-LoopBack3]ip add 10.10.3.1 24 //配置IP
[r1]interface LoopBack 4 //建立回环接口4
[r1-LoopBack4]ip add 10.10.4.1 24 //配置IP地址
[r1]ospf 1 //启用OSPF
[r1-ospf-1]area 12 //创建域12
[r1-ospf-1-area-0.0.0.12]network 192.168.12.1 0.0.0.255 //
[r1-ospf-1-area-0.0.0.12]network 10.10.1.1 0.0.0.255
[r1-ospf-1-area-0.0.0.12]network 10.10.2.1 0.0.0.255
[r1-ospf-1-area-0.0.0.12]network 10.10.3.1 0.0.0.255
[r1-ospf-1-area-0.0.0.12]network 10.10.4.1 0.0.0.255
[r1]dis ospf peer brief //查看OSPF简要信息
OSPF Process 1 with Router ID 192.168.12.1
Peer Statistic Information
Area Id Interface Neighbor id State
0.0.0.12 GigabitEthernet0/0/0 2.2.2.2 Full
R2配置命令:
The device is running!
system //进入用户视图
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2 //更改设备名称
[r2]int g0/0/1 //进入接口
[r2-GigabitEthernet0/0/1]ip add 192.168.12.2 24 //配置IP
[r2]int g0/0/0 //进入接口
[r2-GigabitEthernet0/0/0]ip add 192.168.23.1 24 //配置IP
[r2]display ip interface brief //查看接口简要信息
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.23.1/24 up up
GigabitEthernet0/0/1 192.168.12.2/24 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
[r2]ospf 1 router-id 2.2.2.2 //启用OSPF并更改名称
[r2-ospf-1]area 12 //进入域12
[r2-ospf-1-area-0.0.0.12]network 192.168.12.2 0.0.0.255
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.23.1 0.0.0.255
[r2]display ospf peer brief
OSPF Process 1 with Router ID 2.2.2.2
Peer Statistic Information
--------------------------------------------------------------------- Area Id Interface Neighbor id State
0.0.0.12 GigabitEthernet0/0/1 192.168.12.1 Full
---------------------------------------------------------------------[r2]display ospf peer brief
OSPF Process 1 with Router ID 2.2.2.2
Peer Statistic Information
--------------------------------------------------------------------- Area Id Interface Neighbor id State
0.0.0.0 GigabitEthernet0/0/0 3.3.3.3 Full
0.0.0.12 GigabitEthernet0/0/1 192.168.12.1 Full
---------------------------------------------------------------------[r2]ospf 1
[r2-ospf-1]area 12
[r2-ospf-1-area-0.0.0.12]abr-summary 10.10.0.0 255.255.0.0 //汇总
[r2-ospf-1-area-0.0.0.12]display this
[V200R003C00]
area 0.0.0.12
abr-summary 10.10.0.0 255.255.255.0
abr-summary 10.10.0.0 255.255.0.0
network 192.168.12.0 0.0.0.255
R3配置命令:
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.23.2 24
[r3]ospf 1 router-id 3.3.3.3 //route-id改为3.3.3.3
[r3-ospf-1]area 0 //进入0区
[r3-ospf-1-area-0.0.0.0]network 192.168.23.2 0.0.0.0
[r3]display ip interface brief //查看接口接口简要IP
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned up down
GigabitEthernet0/0/1 192.168.23.2/24 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
[r3]dis ospf peer brief
OSPF Process 1 with Router ID 3.3.3.3
Peer Statistic Information
Area Id Interface Neighbor id State
0.0.0.0 GigabitEthernet0/0/1 2.2.2.2 Full
[r3]display ospf lsdb
OSPF Process 1 with Router ID 3.3.3.3
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 102 36 80000005 1
Router 3.3.3.3 3.3.3.3 103 36 80000003 1
Network 192.168.23.1 2.2.2.2 102 32 80000002 0
Sum-Net 10.10.3.1 2.2.2.2 200 28 80000001 1
Sum-Net 10.10.2.1 2.2.2.2 200 28 80000001 1
Sum-Net 10.10.1.1 2.2.2.2 200 28 80000001 1
Sum-Net 192.168.12.0 2.2.2.2 200 28 80000001 1
Sum-Net 10.10.4.1 2.2.2.2 200 28 80000001 1
[r3]dis ospf lsdb
OSPF Process 1 with Router ID 3.3.3.3
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 259 36 80000005 1
Router 3.3.3.3 3.3.3.3 260 36 80000003 1
Network 192.168.23.1 2.2.2.2 259 32 80000002 0
Sum-Net 10.10.0.0 2.2.2.2 18 28 80000001 1
Sum-Net 192.168.12.0 2.2.2.2 357 28 80000001 1
2、5类LSA汇总
需求验证:
1,将R1上配置的loopback 1/2/3/4 通过import-route的方式,引导到OSPF
2,在R3上 验证数据库中包含了四个关于10网段的5类LSA
3,在R1上配置5类LSA汇总
注:在产生 5 类的LSA的 ASBR 上配置
在R1上删除12域配置
[r1]ospf 1
[r1-ospf-1]area 12
[r1-ospf-1-area-0.0.0.12]un network 10.10.1.1 0.0.0.255
[r1-ospf-1-area-0.0.0.12]un network 10.10.2.1 0.0.0.255
[r1-ospf-1-area-0.0.0.12]un network 10.10.3.1 0.0.0.255
[r1-ospf-1-area-0.0.0.12]un network 10.10.4.1 0.0.0.255
在R3上验证
在R1上重新配置
[r1]ospf 1
[r1-ospf-1]import-route direct //在OSPF上宣告直连
[r1-ospf-1]asbr-summary 10.10.0.0 255.255.240.0 //
在R3重新验证
汇总本质:
在LS协议中,汇总其实就是对LSA的汇总。
汇总仅仅发生在发送方向。
汇总仅发送汇总之后的LSA之上,之前的明细LSA都不发送。
汇总作用:
1、节省了设备的系统资源 : LSA数量减少。
2、可以增强OSPF的稳定性。n编辑器