人走茶凉|OSPF基础配置讲解,华为HCIA/HCIP/HCIE数通Datacom系列

一、OSPF区域分类1、骨干区域:区域0
2、非骨干区域:除区域0以外所有其他区域
3、特殊区域:STUBNSSA
规定:骨干区域不可分割 , 非骨干区域必须连接骨干区域
区域表示方法:
1、点分十进制
2、简单表示
二、OSPF简单配置
[R1]displaycurrent-configurationconfigurationOSPF
ospf1
area0.0.0.0
network10.1.12.00.0.0.255
area0.0.0.1
network10.1.13.00.0.0.255
R2OSPF关键配置:
[R2]displaycurrent-configurationconfigurationospf
ospf1
area0.0.0.0
network10.1.12.00.0.0.255
area0.0.0.2
network10.1.24.00.0.0.255
R3OSPF关键配置:
displaycurrent-configurationconfigurationospf
ospf1
area0.0.0.1
network10.1.13.00.0.0.255
R4OSPF关键配置:
displaycurrent-configurationconfigurationos
ospf1
area0.0.0.2
network10.1.24.00.0.0.255
三、验证OSPF1、查看OSPF邻居关系状态正常
[R1]displayospfpeerbrief
OSPFProcess1withRouterID10.1.12.1
PeerStatisticInformation
AreaIdInterfaceNeighboridState
0.0.0.0GigabitEthernet0/0/010.1.12.2Full
0.0.0.1GigabitEthernet0/0/110.1.13.3Full
2、查看OSPF路由表
[R1]displayiprouting-tableprotocolospf
RouteFlags:R-relay,D-downloadtofib
Publicroutingtable:OSPF
Destinations:1Routes:1
OSPFroutingtablestatus:
Destinations:1Routes:1
Destination/MaskProtoPreCostFlagsNextHopInterface
10.1.24.0/24OSPF102D10.1.12.2GigabitEthernet0/0/0
OSPFroutingtablestatus:
Destinations:0Routes:0
displayiprouting-table
RouteFlags:R-relay,D-downloadtofib
------------------------------------------------------------------------------
RoutingTables:Public
Destinations:9Routes:9
Destination/MaskProtoPreCostFlagsNextHopInterface
10.1.12.0/24OSPF102D10.1.13.1GigabitEthernet0/0/1
10.1.13.0/24Direct00D10.1.13.3GigabitEthernet0/0/1
10.1.13.3/32Direct00D127.0.0.1GigabitEthernet0/0/1
10.1.13.255/32Direct00D127.0.0.1GigabitEthernet0/0/1
10.1.24.0/24OSPF103D10.1.13.1GigabitEthernet0/0/1
127.0.0.0/8Direct00D127.0.0.1InLoopBack0
127.0.0.1/32Direct00D127.0.0.1InLoopBack0
127.255.255.255/32Direct00D127.0.0.1InLoopBack0
255.255.255.255/32Direct00D127.0.0.1InLoopBack0
欢迎【零基础】学网络的小伙伴们加入网工训练营 , 资料每天限量10份先来先得哦~
单独私信免费领取哦!【私信小编备注:资料】同时会有更多免费视频供大家学习 , 欢迎来撩~