admin 发表于 2021-2-5 17:08:20

HCNA-30 OSPF多区域配置

HCNA-30 OSPF多区域配置基本配置:<Huawei>system-viewsysname r1interface GigabitEthernet 0/0/0ip address 172.16.12.1 24 interface GigabitEthernet0/0/1ip address 172.16.13.1 24interface GigabitEthernet0/0/2ip address 172.16.15.1 24 quitdisplay ip interface brief <Huawei>system-viewsysname r2interface GigabitEthernet 0/0/0ip address 172.16.12.2 24 interface GigabitEthernet0/0/1ip address 172.16.24.2 24 interface GigabitEthernet0/0/2ip address 172.16.26.2 24 quitdisplay ip interface brief <Huawei>system-viewsysname r3interface GigabitEthernet 0/0/0ip address 172.16.13.3 24 interface GigabitEthernet0/0/1ip address 172.16.34.3 24 interface GigabitEthernet0/0/2ip address 172.16.35.3 24 interface GigabitEthernet4/0/0ip address 192.168.30.1 24 display ip interface brief <Huawei>system-viewsysname r4interface GigabitEthernet 0/0/0ip address 172.16.34.4 24 interface GigabitEthernet0/0/1ip address 172.16.24.4 24 interface GigabitEthernet0/0/2ip address 172.16.46.4 24 interface GigabitEthernet4/0/0ip address 192.168.40.1 24 display ip interface brief <Huawei>system-viewsysname r5interface GigabitEthernet 0/0/0ip address 172.16.15.5 24 interface GigabitEthernet0/0/1ip address 172.16.35.5 24 interface GigabitEthernet0/0/2ip address 192.168.50.1 24 quitdisplay ip interface brief <Huawei>system-viewsysname r6interface GigabitEthernet 0/0/0ip address 172.16.26.6 24 interface GigabitEthernet0/0/1ip address 172.16.46.6 24 interface GigabitEthernet0/0/2ip address 192.168.60.1 24 quitdisplay ip interface brief
配置多区域OSPFospf 1//创建OSPFarea 0 //创建0 骨干区域network 172.16.12.00.0.0.255//宣告参与网段network 172.16.13.00.0.0.255quitarea 1 //创建区域1network172.16.15.0 0.0.0.255 ospf 1area0network172.16.12.0 0.0.0.255network172.16.24.0 0.0.0.255quitarea 2network172.16.26.0 0.0.0.255 ospf 1area0network172.16.13.0 0.0.0.255network172.16.34.0 0.0.0.255network192.168.30.0 0.0.0.255quitarea1network172.16.35.0 0.0.0.255 ospf 1area0network172.16.34.0 0.0.0.255network172.16.24.0 0.0.0.255network192.168.40.0 0.0.0.255quitarea2network172.16.46.0 0.0.0.255 ospf 1area1network172.16.15.0 0.0.0.255network172.16.35.0 0.0.0.255network192.168.50.0 0.0.0.255 ospf 1area2network172.16.26.0 0.0.0.255network172.16.46.0 0.0.0.255network192.168.60.0 0.0.0.255 查看OSPF邻居状态:displayospf peer       OSPF Process 1 with Router ID 172.16.15.5               Neighbors Area 0.0.0.1interface 172.16.15.5(GigabitEthernet0/0/0)'s neighbors Router ID:172.16.12.1      Address:172.16.15.1      State:FullMode:Nbr isSlave Priority: 1   DR:172.16.15.1BDR: 172.16.15.5MTU: 0      Dead timerdue in 35sec    Retranstimer interval: 5    Neighbor isup for 00:04:28   Authentication Sequence: [ 0 ]                Neighbors Area 0.0.0.1interface 172.16.35.5(GigabitEthernet0/0/1)'s neighbors Router ID:172.16.13.3      Address:172.16.35.3      State:FullMode:Nbr isSlave Priority: 1   DR:172.16.35.3BDR: 172.16.35.5MTU: 0      Dead timerdue in 40sec    Retranstimer interval: 5    Neighbor isup for 00:04:16      AuthenticationSequence: [ 0 ] <r1>displayospf peer       OSPF Process 1 with Router ID 172.16.12.1               Neighbors Area 0.0.0.0interface 172.16.12.1(GigabitEthernet0/0/0)'s neighbors Router ID:172.16.12.2      Address:172.16.12.2      State:FullMode:Nbr isMaster Priority: 1   DR:172.16.12.1BDR: 172.16.12.2MTU: 0      Dead timerdue in 37sec    Retranstimer interval: 5    Neighbor isup for 00:25:48      AuthenticationSequence: [ 0 ]                Neighbors Area 0.0.0.0interface 172.16.13.1(GigabitEthernet0/0/1)'s neighbors Router ID:172.16.13.3      Address:172.16.13.3      State:FullMode:Nbr isMaster Priority: 1   DR:172.16.13.1BDR: 172.16.13.3MTU: 0      Dead timerdue in 32sec    Retranstimer interval: 5    Neighbor isup for 00:23:20   Authentication Sequence: [ 0 ]                Neighbors Area 0.0.0.1interface 172.16.15.1(GigabitEthernet0/0/2)'s neighbors Router ID:172.16.15.5      Address:172.16.15.5      State:FullMode:Nbr isMaster Priority: 1   DR:172.16.15.1BDR: 172.16.15.5MTU: 0      Dead timerdue in 31sec    Retranstimer interval: 5    Neighbor isup for 00:19:46      AuthenticationSequence: [ 0 ] <r1>displayip routing-table protocol ospf   //查看路由表中OSPF的条目RouteFlags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : OSPF      Destinations : 9      Routes :11       OSPF routing table status : <Active>      Destinations : 9      Routes :11 Destination/Mask   Proto   PreCost   Flags NextHop         Interface    172.16.24.0/24OSPF    102         D   172.16.12.2   GigabitEthernet0/0/0   172.16.26.0/24OSPF    102         D   172.16.12.2   GigabitEthernet0/0/0   172.16.34.0/24OSPF    102         D   172.16.13.3   GigabitEthernet0/0/1    172.16.35.0/24OSPF   10   2         D172.16.15.5   GigabitEthernet0/0/2   172.16.46.0/24OSPF    103         D   172.16.13.3   GigabitEthernet0/0/1                   OSPF    10   3          D   172.16.12.2   GigabitEthernet0/0/0192.168.30.0/24OSPF    102         D   172.16.13.3   GigabitEthernet0/0/1192.168.40.0/24OSPF    103         D   172.16.13.3   GigabitEthernet0/0/1                   OSPF    10   3          D   172.16.12.2   GigabitEthernet0/0/0192.168.50.0/24OSPF    102         D   172.16.15.5   GigabitEthernet0/0/2192.168.60.0/24OSPF    103         D   172.16.12.2   GigabitEthernet0/0/0 OSPF routing table status : <Inactive>         Destinations: 0      Routes : 0 <r5>displayospf lsdb//查看OSPF链路状态数据库信息       OSPF Process 1 with Router ID 172.16.15.5               Link State Database                      Area: 0.0.0.1 Type      LinkState ID    AdvRouter          Age Len   Sequence   Metric Router    172.16.15.5   172.16.15.5       1437 60    80000008       1 Router    172.16.13.3   172.16.13.3       1488 36    80000005       1 Router    172.16.12.1   172.16.12.1       1503 36    80000005       1 Network   172.16.15.1   172.16.12.1       1503 32    80000002       0 Network   172.16.35.3   172.16.13.3       1488 32    80000002       0 Sum-Net   172.16.26.0   172.16.12.1         30 28    80000002       2 Sum-Net   172.16.26.0   172.16.13.3       1692 28    80000001       3 Sum-Net   172.16.34.0   172.16.12.1       1712 28    80000001       2 Sum-Net   172.16.34.0   172.16.13.3       1692 28    80000001       1 Sum-Net   172.16.13.0   172.16.12.1      357 28    80000002       1 Sum-Net   172.16.13.0   172.16.13.3       1692 28    80000001       1 Sum-Net   172.16.24.0   172.16.13.3       1598 28    80000001       2 Sum-Net   172.16.24.0   172.16.12.1      393 28    80000004       2 Sum-Net   172.16.12.0   172.16.12.1      357 28    80000002       1 Sum-Net   172.16.12.0   172.16.13.3       1692 28    80000001       2 Sum-Net   192.168.60.0    172.16.12.1       1339 28    80000001       3 Sum-Net   192.168.60.0    172.16.13.3       1339 28    80000001       3 Sum-Net   192.168.30.0    172.16.13.3      705 28    80000001       1 Sum-Net   192.168.30.0    172.16.12.1      705 28    80000001       2 Sum-Net   172.16.46.0   172.16.12.1       1575 28    80000001       3 Sum-Net   172.16.46.0   172.16.13.3       1575 28    80000001       2 Sum-Net192.168.40.0    172.16.13.3      734 28    80000001       2 Sum-Net192.168.40.0    172.16.12.1      734 28    80000001       3 可以看到,关于其他区域的路由条目都是通过“Sun-Net”这一LSA获得,而这类LSA是不参与本区域的SPF算法运算的。 测试PC互访全通完成。
页: [1]
查看完整版本: HCNA-30 OSPF多区域配置

公司网站