OSPF Practice Guide OSPF Practice Guide Table of Contents Table of Contents Experiment Description ....................................................................................................................1 Experiment Description ................................................................................................................1 Version Introduction .....................................................................................................................1 Experiment Objectives .................................................................................................................1 Experiment Tasks ........................................................................................................................1 Relevant Materials .......................................................................................................................1 Chapter 1 OSPF Single-area Experiment Guide .............................................................................2 1.1 Networking and Service Description ......................................................................................2 1.2 Command Line List ................................................................................................................2 1.3 Configuration Flow .................................................................................................................3 1.4 Configuration Procedure ........................................................................................................3 1.5 Result Verification ..................................................................................................................3 1.6 FAQ ........................................................................................................................................6 1.7 Additional Task ......................................................................................................................7 1.8 Configuration Reference ........................................................................................................7 1.8.1 Configure the Port .......................................................................................................7 1.8.2 OSPF Configuration ....................................................................................................8 Chapter 2 OSPF Multi-area Experiment Guide ............................................................................ 10 2.1 Networking and Service Description ................................................................................... 10 2.2 Command Line List ............................................................................................................. 10 2.3 Configuration Flow .............................................................................................................. 11 2.4 Configuration Procedure ..................................................................................................... 11 2.5 Result Verification ............................................................................................................... 11 2.6 FAQ ..................................................................................................................................... 14 2.7 Additional Task ................................................................................................................... 14 2.8 Configuration Reference ..................................................................................................... 14 2.8.1 Configure the Port .................................................................................................... 14 2.8.2 OSPF Configuration ................................................................................................. 15 Chapter 3 OSPF Route Aggregration Configuration Guide ....................................................... 17 3.1 Networking and Service Introduction: ................................................................................. 17 3.2 Command Line List ............................................................................................................. 17 3.3 Configuration Flow .............................................................................................................. 18 3.4 Configuration Procedure ..................................................................................................... 18 3.5 Result Verification ............................................................................................................... 18 3.6 Configuration Reference ..................................................................................................... 19 3.6.1 Configure the Port .................................................................................................... 19 3.6.2 OSPF Configuration ................................................................................................. 20 Chapter 4 Experiment Guide to OSPF Electing DR/BDR ............................................................ 21 4.1 Networking and Service Description ................................................................................... 21 4.2 Command Line List ............................................................................................................. 21 4.3 Configuration Flow .............................................................................................................. 22 4.4 Configuration Procedure ..................................................................................................... 22 4.5 Result Verification ............................................................................................................... 22 4.6 FAQ ..................................................................................................................................... 24 4.7 Additional Task ................................................................................................................... 24 4.8 Configuration Reference ..................................................................................................... 24 4.8.1 Configure the Port .................................................................................................... 24 4.8.2 OSPF Configuration ................................................................................................. 25 Chapter 5 Area Authentication Configuration Guide .................................................................. 26 5.1 Networking and Service Description ................................................................................... 26 Confidential Information of Huawei. No Spreading without Permission i OSPF Practice Guide Table of Contents 5.2 Command Line List ............................................................................................................. 26 5.3 Configuration Flow .............................................................................................................. 27 5.4 Configuration Procedure ..................................................................................................... 27 5.5 Result Verification ............................................................................................................... 28 5.6 Configuration Reference ..................................................................................................... 29 5.6.1 Configure the Port .................................................................................................... 29 5.6.2 OSPF Configuration ................................................................................................. 29 Chapter 6 STUB Area Configuration Guide ................................................................................. 31 6.1 Networking and Service Introduction .................................................................................. 31 6.2 Command Line List ............................................................................................................. 32 6.3 Configuration Procedure ..................................................................................................... 32 6.4 Result Verification ............................................................................................................... 32 6.4.1 Before Configuration: ............................................................................................... 32 6.4.2 After Configuring Area 1 to Stub .............................................................................. 33 6.5 Configuration Reference ..................................................................................................... 34 6.5.1 Configure the Port .................................................................................................... 34 6.5.2 OSPF Configuration ................................................................................................. 35 6.5.3 Configure stub area .................................................................................................. 37 Chapter 7 NSSA Area Configuration Guide ................................................................................. 38 7.1 Networking and Service Description ................................................................................... 38 7.2 Command Line List ............................................................................................................. 38 7.3 Configuration Flow .............................................................................................................. 39 7.4 Configuration Procedure ..................................................................................................... 39 7.5 Result Verification ............................................................................................................... 40 7.6 FAQ ..................................................................................................................................... 42 7.7 Additional Task ................................................................................................................... 43 7.8 Configuration Reference ..................................................................................................... 43 7.8.1 Configure the Port .................................................................................................... 43 7.8.2 OSPF Configuration ................................................................................................. 44 Chapter 8 Virtual Link Configuration Guide ................................................................................ 46 8.1 Networking and Service Description ................................................................................... 46 8.2 Command Line List ............................................................................................................. 46 8.3 Configuration Flow .............................................................................................................. 47 8.4 Configuration Procedure ..................................................................................................... 47 8.5 Result Verification ............................................................................................................... 48 8.6 FAQ ..................................................................................................................................... 49 8.7 Configuration Reference ..................................................................................................... 49 8.7.1 Configure the Port .................................................................................................... 49 8.7.2 OSPF Configuration ................................................................................................. 50 ii Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Experiment Description Experiment Description This experiment guide introduces the configuration methods and configuration procedure of the basic services of OSPF protocol, and covers the currently prevalent technologies of OSPF. It is designed to help you understand the configuration methods and configuration procedure of the basic services of OSPF. Version Introduction This guide is applicable to VRP versions 3.30, RELEASE 0008 and 5.10.,RELEASE 0039 Experiment Objectives Understand configuration procedures of different applications of OSPF Get familiar with the configuration commands of relevant applications of OSPF Experiment Tasks Configure OSPF area Configure OSPF area OSPF route aggregation configuration Configure DR/BDR election Configure area authentication STUB area configuration Configure NSSA area Configure virtual link Relevant Materials VRP 3.30 Operation Manual VRP 5.10 Operation Manual Confidential Information of Huawei. No Spreading without Permission 1 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide Chapter 1 OSPF Single-area Experiment Guide 1.1 Networking and Service Description 4 routers RTA, RTB, RTC and RTD run the OSPF concurrently, and belong to the same area, i.e., Area 0. By running OSPF, communication between routers is implemented. All router’s version are VRP versions 3.30, RELEASE 0008 1.2 Command Line List Table 1-1 Operation Version Configure Router ID VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 Enable OSPF and Enter the OSPF View Enter OSPF Area view Run OSPF protocol on the specified network segment 2 Command router id router-id router id router-id ospf [ process-id ] [ router-id router-id ] ospf [ process-id ] [ router-id router-id ] Area area-id Area area-id network ip-address wildcard-mask network ip-address wildcard-mask Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide 1.3 Configuration Flow Designate Router ID Run OSPF Create area Advertise network Figure 1-1 1.4 Configuration Procedure 1) Specify the router ID In system-view, specify a router ID. Generally, the Loopback address is used as a router ID. 2) Run OSPF In system-view, run OSPF, and adopt the default OSPF process 1. 3) Create an area In the OSPF view, create a backbone area: Area 0. 4) Declare the network In the Area view, declare the corresponding network. Different routers declare different networks. For example, 10.1.1.0 and 192.2.2.0 are declared on the router RTB. 1.5 Result Verification 1) The networks of each device can access each other (as tested via the “ping” command) [RTA]ping -a 1.1.1.1 3.3.3.3 PING 3.3.3.3: 56 data bytes, press CTRL_C to break Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=29 Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=29 Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=29 Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=28 Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=28 ms ms ms ms ms --3.30.30.3 ping statistics-5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 28/28/3 ms Confidential Information of Huawei. No Spreading without Permission 3 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide 2) 4 Use the “display ip routing-table” command to check the routing table. [RTA]display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 DIRECT 0 2.2.2.2/32 OSPF 10 3.3.3.3/32 OSPF 10 Cost 0 2 1564 4.4.4.4/32 10.1.1.0/30 10.1.1.1/32 10.2.2.0/30 127.0.0.0/8 127.0.0.1/32 192.1.1.0/30 192.1.1.1/32 192.1.1.2/32 192.2.2.0/30 1563 0 0 1563 0 0 0 0 0 1563 OSPF DIRECT DIRECT OSPF DIRECT DIRECT DIRECT DIRECT DIRECT OSPF 10 0 0 10 0 0 0 0 0 10 [RTB]display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 2.2.2.2/32 DIRECT 0 3.3.3.3/32 OSPF 10 4.4.4.4/32 OSPF 10 Cost 2 0 1563 1564 10.1.1.0/30 10.1.1.2/32 10.2.2.0/30 127.0.0.0/8 127.0.0.1/32 192.1.1.0/30 192.2.2.0/30 192.2.2.1/32 192.2.2.2/32 0 0 1563 0 0 1563 0 0 0 DIRECT DIRECT OSPF DIRECT DIRECT OSPF DIRECT DIRECT DIRECT 0 0 10 0 0 10 0 0 0 [RTC]display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 Cost 1564 2.2.2.2/32 3.3.3.3/32 4.4.4.4/32 10.1.1.0/30 10.2.2.0/30 10.2.2.2/32 127.0.0.0/8 127.0.0.1/32 192.1.1.0/30 192.2.2.0/30 192.2.2.1/32 192.2.2.2/32 1563 0 2 1563 0 0 0 0 1563 0 0 0 OSPF DIRECT OSPF OSPF DIRECT DIRECT DIRECT DIRECT OSPF DIRECT DIRECT DIRECT 10 0 10 10 0 0 0 0 10 0 0 0 [RTD]display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 2.2.2.2/32 OSPF 10 Cost 1563 1564 3.3.3.3/32 4.4.4.4/32 10.1.1.0/30 2 0 1563 OSPF DIRECT OSPF 10 0 10 Nexthop 127.0.0.1 10.1.1.2 10.1.1.2 192.1.1.2 192.1.1.2 10.1.1.1 127.0.0.1 192.1.1.2 127.0.0.1 127.0.0.1 192.1.1.1 127.0.0.1 192.1.1.2 10.1.1.2 Interface InLoopBack0 Ethernet0/0 Ethernet0/0 Serial2/0 Serial2/0 Ethernet0/0 InLoopBack0 Serial2/0 InLoopBack0 InLoopBack0 Serial2/0 InLoopBack0 Serial2/0 Ethernet0/0 Nexthop 10.1.1.1 127.0.0.1 192.2.2.1 10.1.1.1 192.2.2.1 10.1.1.2 127.0.0.1 192.2.2.1 127.0.0.1 127.0.0.1 10.1.1.1 192.2.2.2 192.2.2.1 127.0.0.1 Interface Ethernet0/0 InLoopBack0 Serial2/0 Ethernet0/0 Serial2/0 Ethernet0/0 InLoopBack0 Serial2/0 InLoopBack0 InLoopBack0 Ethernet0/0 Serial2/0 Serial2/0 InLoopBack0 Nexthop 10.2.2.1 192.2.2.2 192.2.2.2 127.0.0.1 10.2.2.1 192.2.2.2 10.2.2.2 127.0.0.1 127.0.0.1 127.0.0.1 10.2.2.1 192.2.2.1 127.0.0.1 192.2.2.2 Interface Ethernet0/0 Serial2/0 Serial2/0 InLoopBack0 Ethernet0/0 Serial2/0 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 Ethernet0/0 Serial2/0 InLoopBack0 Serial2/0 Nexthop 192.1.1.1 10.2.2.2 192.1.1.1 10.2.2.2 127.0.0.1 192.1.1.1 Interface Serial2/0 Ethernet0/0 Serial2/0 Ethernet0/0 InLoopBack0 Serial2/0 Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide 10.2.2.0/30 10.2.2.1/32 127.0.0.0/8 127.0.0.1/32 192.1.1.0/30 192.1.1.1/32 192.1.1.2/32 192.2.2.0/30 DIRECT DIRECT DIRECT DIRECT DIRECT DIRECT DIRECT OSPF 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 1563 10.2.2.1 127.0.0.1 127.0.0.1 127.0.0.1 192.1.1.2 192.1.1.1 127.0.0.1 10.2.2.2 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 Serial2/0 Serial2/0 InLoopBack0 Ethernet0/0 Note: Each channel of router learns other route information through OSPF and provide interconnection of network. From the routing table, we can see that the OSPF can support equivalent routes. For example, on the RTD, the data that reaches 2.2.2.2/32 can be sent to 10.2.2.2, or sent to 192.1.1.1. 3) Use the “display ospf routing” command to check the OSPF routing table. [RTA] display ospf routing OSPF Process 1 with Router ID 1.1.1.1 Routing Tables: Routing for Network Destination Cost Type NextHop AdvRouter 10.1.1.0/30 1 Net 10.1.1.1 1.1.1.1 192.2.2.0/30 1563 Stub 10.1.1.2 2.2.2.2 2.2.2.2/32 2 Stub 10.1.1.2 2.2.2.2 1.1.1.1/32 1 Stub 1.1.1.1 1.1.1.1 192.1.1.0/30 1562 Stub 192.1.1.1 1.1.1.1 10.2.2.0/30 1563 Net 192.1.1.2 3.3.3.3 4.4.4.4/32 1563 Stub 192.1.1.2 4.4.4.4 3.3.3.3/32 1564 Stub 192.1.1.2 3.3.3.3 10.1.1.2 Total Nets: 8 Intra Area: 8 Inter Area: 0 ASE: 0 NSSA: 0 4) Area 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 Use the “display ospf lsdb” command to check the link state database. [RTA] display ospf lsdb OSPF Process 1 with Router ID 1.1.1.1 Link State Database Type Stub Stub Stub Stub Stub Stub Rtr Rtr Rtr Rtr Net Net LinkState ID 192.2.2.0 2.2.2.2 4.4.4.4 192.1.1.0 1.1.1.1 3.3.3.3 2.2.2.2 4.4.4.4 1.1.1.1 3.3.3.3 10.1.1.1 10.2.2.2 Area: 0.0.0.0 AdvRouter 2.2.2.2 2.2.2.2 4.4.4.4 1.1.1.1 1.1.1.1 3.3.3.3 2.2.2.2 4.4.4.4 1.1.1.1 3.3.3.3 1.1.1.1 3.3.3.3 Age 149 136 162 162 125 149 137 163 125 151 241 189 Len 24 24 24 24 24 24 72 72 72 72 32 32 Sequence 0 0 0 0 0 0 80000009 80000009 80000009 80000009 80000001 80000001 Metric 0 0 0 0 0 0 0 0 0 0 0 0 Where SpfTree SpfTree SpfTree SpfTree SpfTree SpfTree Clist Clist SpfTree Clist SpfTree SpfTree Note: The OSPF describes the network topology of an area through the correct LSA. Note that each database type represents a different type of LSA in the OSPF. Listed below are common LAS types: Stub: LSA of route connected to an end network. (Note: End network refers to edge network, and is not the same concept as Stub area.) Rtr: Router LSA Net: Network LSA Confidential Information of Huawei. No Spreading without Permission 5 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide Snet: Network summary LSA ASB: Border router summary LSA of autonomous system ASE: External LSA of autonomous system NSSA: External LSA of NSSA 5) Use the “display ospf brief” command to check the summary information of OSPF; [RTA]display ospf brief OSPF Process 1 with Router ID 1.1.1.1 OSPF Protocol Information RouterID: 1.1.1.1 Spf-schedule-interval: 5 Routing preference: Inter/Intra: 10 External: 150 Default ASE parameters: Metric: 1 Tag: 1 Type: 2 SPF computation count: 10 Area Count: 1 Nssa Area Count: 0 Area 0.0.0.0: Authtype: none Flags: <> SPF scheduled: <> Interface 10.1.1.1 (Ethernet0/0) Cost: 1 State: DR Type: Broadcast Priority: 1 Designated Router: 10.1.1.1 Backup Designated Router: 10.1.1.2 Timers : Hello 10,Dead 40,Poll 40,Retransmit 5,Transmit Delay 1 Interface 192.1.1.1 (Serial2/0) --> 192.1.1.2 Cost: 1562 State: PtoP Type: PointToPoint Priority: 1 Timers : Hello 10,Dead 40,Poll 40,Retransmit 5,Transmit Delay 1 Interface 1.1.1.1 (LoopBack0) --> 1.1.1.1 Cost: 1 State: PtoP Type: PointToPoint Priority: 1 Timers : Hello 10,Dead 40,Poll 40,Retransmit 5,Transmit Delay 1 Note: The “display ospf brief” command can be used to check all OSPF-related information except routing information, e.g., neighbor information, network type, DR/BDR, Hello time, and so on. It is one of the frequently used commands for detecting error. Other router-related information can also be viewed via the above commands, which is not described here any further. 1.6 FAQ Q: What does neighbor relationship mean in the OSPF? A: Neighbor means the router on the same network link. Q: What does neighboring relationship in OSPF? A: Neighboring relationship is based on the neighbor relationship. When two neighbors have synchronized the OSPF database, a neighboring relationship is developed between them. Q: How many network types are supported by OSPF? 6 Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. A: P2P, P2MP, NBMA and Broadcast. In addition, in the NBMA network, the neighbor relationship needs to be created manually. Q: Does equivalent router exist in the current networking diagram? How many equivalent routes are supported by VRP3.30? How many equivalent routes are supported by VRP5.10 as a maximum? A: Yes, it exists. The VRP3.30 supports a maximum of 3 equivalent routes, and the VRP5.10 supports a maximum of 6 equivalent routes. 1.7 Additional Task In the current networking diagram, the RTA reaches RTC along two routes: RTA-RTB-RTC and RTA-RTD-RTC. To go to RTC via RTA-RTB-RTC and come back via RTC―RTD―RTA, what should we do? 1.8 Configuration Reference 1.8.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit [RTA]interface serial 2/0 [RTA-Serial2/0]ip address 192.1.1.1 255.255.255.252 [RTA-Serial2/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit [RTB]interface serial 2/0 [RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252 [RTB-Serial2/0]quit III. Configure RTC <Quidway>system-view [Quidway]sysname RTC [RTC]interface loopback 0 [RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255 [RTC-LoopBack0]quit [RTC]interface Ethernet 0/0 [RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252 Confidential Information of Huawei. No Spreading without Permission 7 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. [RTC-Ethernet2/0]quit [RTC]interface serial 2/0 [RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252 [RTC-Serial2/0]quit IV. Configure RTD <Quidway>system-view [Quidway]sysname RTD [RTD]interface loopback 0 [RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255 [RTD-LoopBack0]quit [RTD]interface ethernet 0/0 [RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252 [RTD-Ethernet0/0]quit [RTD]interface serial 2/0 [RTD-Serial2/0]ip address 192.1.1.2 255.255.255.252 [RTD-Serial2/0]quit 1.8.2 OSPF Configuration I. Configure RTA 1) Specify Router ID [RTA]router id 1.1.1.1 2) Run OSPF [RTA]ospf 1 3) Create area 0 [RTA-ospf-1]area 0 4) Declare network in the area 0 view [RTA-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 [RTA-ospf-1-area-0.0.0.0]network 192.1.1.0 0.0.0.3 [RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0 II. Configure RTB 1) Specify Router ID [RTB]router id 2.2.2.2 2) Run OSPF [RTB]ospf 1 3) Create area 0 [RTB-ospf-1]area 0 4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 [RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 III. Configure RTC 1) Specify Router ID [RTC]router id 3.3.3.3 2) Run OSPF [RTC]ospf 1 3) 8 Create area 0 Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. [RTC-ospf-1]area 0 4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 10.2.2.0 0.0.0.3 [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0 IV. Configure RTD 1) Specify Router ID [RTD]router id 4.4.4.4 2) Run OSPF [RTD]ospf 1 3) Create area 0 [RTD-ospf-1]area 0 4) Declare network in the area 0 view [RTD-ospf-1-area-0.0.0.0]network 10.2.2.0 0.0.0.3 [RTD-ospf-1-area-0.0.0.0]network 192.1.1.0 0.0.0.3 [RTD-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0 Confidential Information of Huawei. No Spreading without Permission 9 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide Chapter 2 OSPF Multi-area Experiment Guide 2.1 Networking and Service Description Figure 2-1 Four routers RTA, RTB, RTC and RTD run the OSPF concurrently. As shown in the figure, RTA and RTB belong to area 1, RTB and RTC belong to area 0, and RTC and RTD belong to area 2 (Note: The 10.1.1.2/30 of RTA belongs to area 1, and the 10.2.2.2/30 of RTC belongs to area 2) The four routers use their respective loopback as their respective router ID. All router’s version are VRP versions 3.30, RELEASE 0008 2.2 Command Line List Table 2-1 Operation Configure Router ID Enable OSPF and Enter the OSPF View Enter OSPF Area view Run the OSPF protocol in the 10 Version VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 Command router id router-id router id router-id ospf [ process-id ] [ router-id router-id ] ospf [ process-id ] [ router-id router-id ] area area-id area area-id network ip-address wildcard-mask Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Operation specified network segment Version VRP 5.10 Command network ip-address wildcard-mask 2.3 Configuration Flow Designate Router ID Run OSPF Create area Advertise network Figure 2-2 2.4 Configuration Procedure 1) Specify Router ID In system-view, specify a router ID. Generally, the Loopback address is used as router ID. 2) Run OSPF In system-view, run OSPF. Adopt the default OSPF process 1. 3) Create an area In the OSPF view, create the correseponding area. Different routers have different area codes. For example, area 0 and area 1 should be created on router B. 4) Declare network Declare the network in the corresponding area view. Different routers declare different networks. For example, area 0 of router RTB should only declare 192.2.2.0. 2.5 Result Verification 1) Use the “Ping” or “Tracert” command to detect the connectivity of the network; [RTA]ping 10.2.2.1 PING 10.2.2.1: 56 data bytes, press CTRL_C to break Reply from 10.2.2.1: bytes=56 Sequence=1 ttl=253 time=30 Reply from 10.2.2.1: bytes=56 Sequence=2 ttl=253 time=29 Reply from 10.2.2.1: bytes=56 Sequence=3 ttl=253 time=29 Reply from 10.2.2.1: bytes=56 Sequence=4 ttl=253 time=29 Reply from 10.2.2.1: bytes=56 Sequence=5 ttl=253 time=28 ms ms ms ms ms --10.20.20.1 ping statistics-5 packet(s) transmitted Confidential Information of Huawei. No Spreading without Permission 11 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 28/29/3 ms [RTA]tracert 10.2.2.1 traceroute to 10.2.2.1(10.2.2.1) 30 hops max,40 bytes packet 1 10.1.1.2 10 ms 2 ms 2 ms 2 192.2.2.1 20 ms 19 ms 20 ms 3 10.2.2.1 30 ms 20 ms 20 ms 2) 12 Use the “display ip routing-table” command to check the routing table. [RTA]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 1.1.1.1/32 DIRECT 0 2.2.2.2/32 OSPF 10 3.3.3.3/32 OSPF 10 4.4.4.4/32 OSPF 10 10.1.1.0/30 DIRECT 0 10.1.1.1/32 DIRECT 0 10.2.2.0/30 OSPF 10 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 OSPF 10 Cost 0 2 1564 1565 0 0 1564 0 0 1563 Nexthop 127.0.0.1 10.1.1.2 10.1.1.2 10.1.1.2 10.1.1.1 127.0.0.1 10.1.1.2 127.0.0.1 127.0.0.1 10.1.1.2 Interface InLoopBack0 Ethernet0/0 Ethernet0/0 Ethernet0/0 Ethernet0/0 InLoopBack0 Ethernet0/0 InLoopBack0 InLoopBack0 Ethernet0/0 [RTB]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 2.2.2.2/32 DIRECT 0 3.3.3.3/32 OSPF 10 4.4.4.4/32 OSPF 10 10.1.1.0/30 DIRECT 0 10.1.1.2/32 DIRECT 0 10.2.2.0/30 OSPF 10 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 DIRECT 0 192.2.2.1/32 DIRECT 0 192.2.2.2/32 DIRECT 0 Cost 2 0 1563 1564 0 0 1563 0 0 0 0 0 Nexthop 10.1.1.1 127.0.0.1 192.2.2.1 192.2.2.1 10.1.1.2 127.0.0.1 192.2.2.1 127.0.0.1 127.0.0.1 192.2.2.2 192.2.2.1 127.0.0.1 Interface Ethernet0/0 InLoopBack0 Serial2/0 Serial2/0 Ethernet0/0 InLoopBack0 Serial2/0 InLoopBack0 InLoopBack0 Serial2/0 Serial2/0 InLoopBack0 [RTC]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 2.2.2.2/32 OSPF 10 3.3.3.3/32 DIRECT 0 4.4.4.4/32 OSPF 10 10.1.1.0/30 OSPF 10 10.2.2.0/30 DIRECT 0 10.2.2.2/32 DIRECT 0 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 DIRECT 0 192.2.2.1/32 DIRECT 0 192.2.2.2/32 DIRECT 0 Cost 1564 1563 0 2 1563 0 0 0 0 0 0 0 Nexthop 192.2.2.2 192.2.2.2 127.0.0.1 10.2.2.1 192.2.2.2 10.2.2.2 127.0.0.1 127.0.0.1 127.0.0.1 192.2.2.1 127.0.0.1 192.2.2.2 Interface Serial2/0 Serial2/0 InLoopBack0 Ethernet0/0 Serial2/0 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 Serial2/0 InLoopBack0 Serial2/0 [RTD]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 2.2.2.2/32 OSPF 10 3.3.3.3/32 OSPF 10 4.4.4.4/32 DIRECT 0 10.1.1.0/30 OSPF 10 Cost 1565 1564 2 0 1564 Nexthop 10.2.2.2 10.2.2.2 10.2.2.2 127.0.0.1 10.2.2.2 Interface Ethernet0/0 Ethernet0/0 Ethernet0/0 InLoopBack0 Ethernet0/0 Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 10.2.2.0/30 10.2.2.1/32 127.0.0.0/8 127.0.0.1/32 192.2.2.0/30 DIRECT DIRECT DIRECT DIRECT OSPF 0 0 0 0 10 0 0 0 0 1563 10.2.2.1 127.0.0.1 127.0.0.1 127.0.0.1 10.2.2.2 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 Ethernet0/0 Note: As compared with a single area, the result is exactly the same. Each router learns the routing information of each other by running OSPF to provide connectivity for the network. 3) Use the “display ospf lsdb” command to check the link state database. In addition, other commands can be used to check the OSPF-related information. [RTA]dis ospf lsdb OSPF Process 1 with Router ID 1.1.1.1 Link State Database Type Stub Rtr Rtr Net SNet SNet SNet SNet SNet LinkState ID 1.1.1.1 2.2.2.2 1.1.1.1 10.1.1.1 2.2.2.2 4.4.4.4 3.3.3.3 192.2.2.0 10.2.2.0 Area: 0.0.0.1 AdvRouter Age Len Sequence 1.1.1.1 1055 24 0 2.2.2.2 1062 36 80000004 1.1.1.1 1055 48 80000007 1.1.1.1 1055 32 80000002 2.2.2.2 941 28 80000002 2.2.2.2 940 28 80000001 2.2.2.2 941 28 80000002 2.2.2.2 941 28 80000002 2.2.2.2 941 28 80000002 Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 0 SpfTree 1 Uninitialized 1564 Uninitialized 1563 Uninitialized 1562 Uninitialized 1563 Uninitialized [RTB]display ospf lsdb OSPF Process 1 with Router ID 2.2.2.2 Link State Database Type Stub Stub Stub Rtr Rtr Rtr Rtr Net SNet SNet SNet SNet LinkState ID 2.2.2.2 192.2.2.0 3.3.3.3 2.2.2.2 4.4.4.4 1.1.1.1 3.3.3.3 10.2.2.1 4.4.4.4 10.1.1.0 1.1.1.1 10.2.2.0 Area: 0.0.0.0 AdvRouter Age Len Sequence 2.2.2.2 1266 24 0 2.2.2.2 1203 24 0 3.3.3.3 1203 24 0 2.2.2.2 183 60 8000000b 4.4.4.4 1376 60 80000009 1.1.1.1 1375 60 80000007 3.3.3.3 184 60 8000000a 4.4.4.4 1968 32 80000002 3.3.3.3 1073 28 80000002 2.2.2.2 1135 28 80000002 2.2.2.2 1135 28 80000002 3.3.3.3 1073 28 80000003 Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 0 SpfTree 0 Uninitialized 0 Uninitialized 0 SpfTree 0 Uninitialized 2 Uninitialized 1 Inter List 2 Inter List 1 Uninitialized Type Stub Rtr Rtr Net SNet SNet SNet SNet SNet LinkState ID 1.1.1.1 2.2.2.2 1.1.1.1 10.1.1.1 2.2.2.2 4.4.4.4 3.3.3.3 192.2.2.0 10.2.2.0 Area: 0.0.0.1 AdvRouter Age 1.1.1.1 1251 2.2.2.2 183 1.1.1.1 184 1.1.1.1 184 2.2.2.2 1135 2.2.2.2 1135 2.2.2.2 1135 2.2.2.2 1135 2.2.2.2 1135 Metric Where 0 SpfTree 0 SpfTree 0 Clist 0 SpfTree 1 Inter List 1564 Inter List 1563 Inter List 1562 Inter List 1563 Inter List Len 24 36 48 32 28 28 28 28 28 Sequence 0 80000005 80000008 80000003 80000002 80000001 80000002 80000002 80000002 Confidential Information of Huawei. No Spreading without Permission 13 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. Note: By comparing the LSDB of RTA and the LSDB of RTB, we can see that the ABR router, i.e., RTB, needs to maintain the LSDB of two areas: area 1 and area 0. 2.6 FAQ Q: Why are many external areas divided in the OSPF? A: In order to reduce the calculation amount of SPF. Q: Why can SPF calculation amount be reduced by setting up many areas? A: Since the area division is used to divide the planar network into many hierarchical netowrks, the size of the topology data table is reduced. When the network changes, the SPF calculation is only specific to the changed area, so the SPF calculation amount is reduced. 2.7 Additional Task 1) 2) Activate the link between RTA and RTD, create area 0, and check the change of network. Change the area between RTC and RTD to area 1, and observe the network change. 2.8 Configuration Reference 2.8.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit [RTB]interface serial 2/0 [RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252 [RTB-Serial2/0]quit 14 Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. III. Configure RTC <Quidway>system-view [Quidway]sysname RTC [RTC]interface loopback 0 [RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255 [RTC-LoopBack0]quit [RTC]interface Ethernet 0/0 [RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252 [RTC-Ethernet2/0]quit [RTC]interface serial 2/0 [RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252 [RTC-Serial2/0]quit IV. Configure RTD <Quidway>system-view [Quidway]sysname RTD [RTD]interface loopback 0 [RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255 [RTD-LoopBack0]quit [RTD]interface ethernet 0/0 [RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252 [RTD-Ethernet0/0]quit 2.8.2 OSPF Configuration I. Configure RTA 1) Specify Router ID [RTA]router id 1.1.1.1 2) Run OSPF [RTA]ospf 1 3) Create area 1 [RTA-ospf-1]area 1 4) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 [RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0 II. Configure RTB 1) Specify Router ID [RTB]router id 2.2.2.2 2) Run OSPF [RTB]ospf 1 3) Create area 0 [RTB-ospf-1]area 0 4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 5) Create area 1 [RTB-ospf-1]area 1 6) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 Confidential Information of Huawei. No Spreading without Permission 15 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. III. Configure RTC 1) Specify Router ID [RTC]router id 3.3.3.3 2) Run OSPF [RTC]ospf 1 3) Create area 0 [RTC-ospf-1]area 0 4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0 5) Create area 2 [RTC-ospf-1]area 2 6) Declare network in the area 2 view [RTC-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 IV. Configure Router D 1) Specify Router ID [RTD]router id 4.4.4.4 2) Run OSPF [RTD]ospf 1 3) Create area 2 [RTD-ospf-1]area 2 4) Declare network in the area 2 view [RTD-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 [RTD-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0 16 Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Chapter 3 OSPF Route Aggregration Configuration Guide 3.1 Networking and Service Introduction: L2: 110.1.1.1/32 RTB RTA .1 R L1: 110.1.1.2/32 10.1.1.0/30 Area 1 .2 RTC .1 R L0: 2.2.2.2/32 L0: 1.1.1.1/32 192.2.2.0/30 .2 R Area 0 L0: 3.3.3.3/32 Figure 3-1 On the basis of multi-area routing experiment, add L1 and L2 interfaces on the RTA, and enable OSPF. Perform route aggregration on the RTB.The route seen on RTC is the converged route. All router’s version are VRP versions 3.30, RELEASE 0008 3.2 Command Line List Table 3-1 Operation Configure the Route Summarization of OSPF Area Version VRP 3.30 VRP 5.10 Command abr-summary ip-address mask [ advertise | not-advertise ] abr-summary ip-address mask [ advertise | not-advertise | cost cost ] Confidential Information of Huawei. No Spreading without Permission 17 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide 3.3 Configuration Flow Configure interface Advertise network Configure aggregation on ABR Figure 3-2 3.4 Configuration Procedure 1) Configure interfaces. The RTA creates two interface addresses: L1: 110.1.1.1/32 and L2:110.1.1.2/32. 2) Declare network In the area 1 view of RTA, declare the network corresponding to the newly created interface. 3) Configure aggregration on the ABR Configure route aggregration of 110.1.1.0/24 in the area 1 view of RTB. 3.5 Result Verification 1) The L1-L2 route of RTA displayed on RTC is a convergent route. Before aggregration: [RTC]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 2.2.2.2/32 OSPF 10 3.3.3.3/32 DIRECT 0 10.1.1.0/30 OSPF 10 110.1.1.1/32 OSPF 10 110.1.1.2/32 OSPF 10 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 DIRECT 0 192.2.2.1/32 DIRECT 0 192.2.2.2/32 DIRECT 0 18 Cost 1564 1563 0 1563 1564 1564 0 0 0 0 0 Nexthop 192.2.2.2 192.2.2.2 127.0.0.1 192.2.2.2 192.2.2.2 192.2.2.2 127.0.0.1 127.0.0.1 192.2.2.1 127.0.0.1 192.2.2.2 Confidential Information of Huawei. No Spreading without Permission Interface Serial2/0 Serial2/0 InLoopBack0 Serial2/0 Serial2/0 Serial2/0 InLoopBack0 InLoopBack0 Serial2/0 InLoopBack0 Serial2/0 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. After aggregration: [RTC]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 1.1.1.1/32 OSPF 10 2.2.2.2/32 OSPF 10 3.3.3.3/32 DIRECT 0 10.1.1.0/30 OSPF 10 110.1.1.0/24 OSPF 10 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 DIRECT 0 192.2.2.1/32 DIRECT 0 192.2.2.2/32 DIRECT 0 Cost 1564 1563 0 1563 1564 0 0 0 0 0 Nexthop 192.2.2.2 192.2.2.2 127.0.0.1 192.2.2.2 192.2.2.2 127.0.0.1 127.0.0.1 192.2.2.1 127.0.0.1 192.2.2.2 Interface Serial2/0 Serial2/0 InLoopBack0 Serial2/0 Serial2/0 InLoopBack0 InLoopBack0 Serial2/0 InLoopBack0 Serial2/0 3.6 Configuration Reference 3.6.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface loopback 1 [RTA-LoopBack1]ip address 110.1.1.1 255.255.255.255 [RTA-LoopBack1]quit [RTA]interface loopback 2 [RTA-LoopBack2]ip add 110.1.1.2 255.255.255.255 [RTA-LoopBack2]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit [RTB]interface serial 2/0 [RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252 [RTB-Serial2/0]quit III. Configure RTC <Quidway>system-view [Quidway]sysname RTC [RTC]interface loopback 0 [RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255 [RTC-LoopBack0]quit [RTC]interface serial 2/0 [RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252 [RTC-Serial2/0]quit Confidential Information of Huawei. No Spreading without Permission 19 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标 题 1 to the text that you want to appear here. OSPF Practice Guide 3.6.2 OSPF Configuration I. Configure RTA 1) Specify Router ID [RTA]router id 1.1.1.1 2) Run OSPF [RTA]ospf 1 3) Create area 1 [RTA-ospf-1]area 1 4) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.1]network [RTA-ospf-1-area-0.0.0.1]network [RTA-ospf-1-area-0.0.0.1]network [RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 1.1.1.1 0.0.0.0 110.1.1.1 0.0.0.0 110.1.1.2 0.0.0.0 II. Configure RTB 1) Specify Router ID [RTB]router id 2.2.2.2 2) Run OSPF [RTB]ospf 1 3) Create area 0 [RTB-ospf-1]area 0 4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 5) Create area 1 [RTB-ospf-1]area 1 6) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 7) RTB performs route aggregration on area 1. [RTB-ospf-1-area-0.0.0.1]abr-summary 110.1.1.0 255.255.255.0 advertise III. Configure RTC 1) Specify Router ID [RTC]router id 3.3.3.3 2) Run OSPF [RTC]ospf 1 3) Create area 0 [RTC-ospf-1]area 0 4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0 20 Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Chapter 4 Experiment Guide to OSPF Electing DR/BDR 4.1 Networking and Service Description Figure 4-1 Two routers run OSPF concurrently, and are connected via Ethernet. Change the DR priority of RTB to 100, and make it become a DR router in the network. All router’s version are VRP versions 3.30, RELEASE 0008 4.2 Command Line List Table 4-1 Operation Configure Router ID Enable OSPF and Enter the OSPF View Enter OSPF Area view Run OSPF protocol in the specified network segment Configure the interface with a priority for DR election Version VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 Command router id router-id router id router-id ospf [ process-id ] [ router-id router-id ] ospf [ process-id ] [ router-id router-id ] area area-id area area-id network ip-address wildcard-mask network ip-address wildcard-mask ospf dr-priority priority_number ospf dr-priority priority_number Confidential Information of Huawei. No Spreading without Permission 21 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 4.3 Configuration Flow Designate Router ID Set DR priority Run OSPF Create area Advertise network Figure 4-2 4.4 Configuration Procedure 1) Specify the Router ID In system-view, specify a router ID. Generally, the Loopback address is used as router ID. 2) Set DR priorityof OSPF In the Port view, Change the DR priority of RTB to 100. 3) Run OSPF In system-view, run OSPF, and adopt the default OSPF process 1. 4) Create an area In the OSPF view, create area 0. 5) Declare network In the corresponding Area view, declare the network. 4.5 Result Verification 1) Use the “display ospf brief” command to check the summary information of the router OSPF. [RTA]display ospf brief OSPF Process 1 with Router ID 1.1.1.1 OSPF Protocol Information RouterID: 1.1.1.1 Spf-schedule-interval: 5 Routing preference: Inter/Intra: 10 External: 150 Default ASE parameters: Metric: 1 Tag: 1 Type: 2 22 华为技术有限公司 版权所有, 未经许可不得扩散 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide SPF computation count: 11 Area Count: 1 Nssa Area Count: 0 Area 0.0.0.0: Authtype: none Flags: <> SPF scheduled: <> Interface: 10.1.1.1 (Ethernet0/0) Cost: 1 State: BackupDR Type: Broadcast Priority: 1 Designated Router: 10.1.1.2 Backup Designated Router: 10.1.1.1 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1 Interface: 1.1.1.1 (LoopBack0) --> 1.1.1.1 Cost: 1 State: PtoP Type: PointToPoint Priority: 1 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1 [RTB]display ospf brief OSPF Process 1 with Router ID 2.2.2.2 OSPF Protocol Information RouterID: 2.2.2.2 Spf-schedule-interval: 5 Routing preference: Inter/Intra: 10 External: 150 Default ASE parameters: Metric: 1 Tag: 1 Type: 2 SPF computation count: 10 Area Count: 1 Nssa Area Count: 0 Area 0.0.0.0: Authtype: none Flags: <> SPF scheduled: <> Interface: 10.1.1.2 (Ethernet0/0) Cost: 1 State: DR Type: Broadcast Priority: 100 Designated Router: 10.1.1.2 Backup Designated Router: 10.1.1.1 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1 Interface: 2.2.2.2 (LoopBack0) --> 2.2.2.2 Cost: 1 State: PtoP Type: PointToPoint Priority: 1 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1 Note: As seen from the above information, the current RTB is the DR router in the network, and its preference level is 100. But RTA is the BDR router in the network, and its preference level is the default value 1. The DR election is decided by two parameters: DR priority and router ID. The value range of DR priority is 0-255. Value 0 means no participation in the DR/BDR election. Namely, the router is always “DROther”, and the DR priority of each router is 1. Between routers, this parameter will be compared first to decide the DR. The higher the value, the better. Router ID: The router ID must exist if the router needs to run the OSPF protocol. If no ID is configured, the system will select one from the IP addresses of the current interface as the router ID. If the DR priorityis the same, the routers will compare the value of router ID to decide the DR. The lower the router ID value, the better. Confidential Information of Huawei. No Spreading without Permission 23 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 4.6 FAQ Q: What is DR/BDR? What are their functions? A: In order for each router to broadcast the local state information to the whole autonomous system, many neighboring relationships should be set up between the routers. This way, the route change of any router will be transferred repeatedly, and the bandwidth resources will be wasted. In order to solve the problem, OSPF defines the "Designated Router" (DR). All the routers only need to transmit information to the DR for broadcasting the network link states. The router being the DR in its segment is not specified manually. Q: In the current network, the DR priority of RTB is 100, the DR priority of RTA is 1. Now we change the DR priorityl of RTA to 200. Will it be changed to DR immediately? A: No. The DR mechanism in the OSPF is on a lifelong basis. Unless the DR is disconnected, the BDR will not be changed to DR. Once the BDR is changed to DR, the OSPF network will not perform BDR election for DR any longer. 4.7 Additional Task 1) 2) Let the current network contain only DR and no BDR, and observe the network change. In the current network, change the DR priority of RTA and that of RTB to 0, i.e., DR and BDR are not existent, and observe the network change. 4.8 Configuration Reference 4.8.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit 24 华为技术有限公司 版权所有, 未经许可不得扩散 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. 4.8.2 OSPF Configuration I. Configure RTA 1) Specify the router ID [RTA]router id 1.1.1.1 2) Run OSPF [RTA]ospf 1 3) Create area 0 [RTA-ospf-1]area 0 4) Declare network in the area 0 view [RTA-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 [RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0 II. Configure RTB 1) Specify the router ID [RTB]router id 2.2.2.2 2) Setting priority [RTB-Ethernet0/0]ospf dr-priority 100 3) Run the OSPF [RTB]ospf 1 4) Create area 0 [RTB-ospf-1]area 0 5) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 [RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 NOTE: After you complete the configuration, maybe you can find RTA is the DR. In this case, you should reset the ospf process on RTA and RTB, to let the system votes DR again. Confidential Information of Huawei. No Spreading without Permission 25 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Chapter 5 Area Authentication Configuration Guide 5.1 Networking and Service Description Figure 5-1 Run OSPF on RTA and RTB, and learn the loopback address of the opposite party. Use the Simple and Cipher authentication methods on the RTA to perform regional authentication for RTB. All router’s version are VRP versions 3.30, RELEASE 0008 5.2 Command Line List Table 5-1 Operation Configure Router ID Enable OSPF and Enter the OSPF View Enter OSPF Area view Run the OSPF protocol in the specified network segment Configure the area to support authentication type Specify a password for OSPF simple text authentication Specify the key-id and key for 26 Version VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 Command router id router-id router id router-id ospf [ process-id ] [ router-id router-id ] ospf [ process-id ] [ router-id router-id ] Area area-id Area area-id network ip-address wildcard-mask network ip-address wildcard-mask authentication-mode { simple | md5 } authentication-mode { simple | md5 | hmac-md5 } ospf authentication-mode simple password ospf authentication-mode simple [ plain | cipher ] password ospf authentication-mode md5 key_id key Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Operation Version OSPF MD5 authentication VRP 5.10 Command ospf authentication-mode { md5 | hmac-md5 } key-id [ plain | cipher ] password 5.3 Configuration Flow Designate Router ID Run OSPF Create area Advertise network Run area certification Port use certification Figure 5-2 5.4 Configuration Procedure 1) 2) Authoring indication: [ List the steps required for completing the experiment, and provide necessary description on each step. The description should help the learner understand services more easily. Give the relevant parameters when giving the configuration description (e.g., IP address, key and name listed below). Try to make the configuration data normative, and avoid configuration conflict.] Specify the router ID In system-view, specify a router ID. Generally, the Loopback address is used as a router ID. 3) Run the OSPF In system-view, run the OSPF. Apply the default OSPF process 1. 4) Create an area In OSPF view, create area 0. 5) Declare network In the Area view, declare the corresponding network, e.g., declare two networks 1.1.1.1 and 10.1.1.1 on the RTA. 6) Run the area authentication Confidential Information of Huawei. No Spreading without Permission 27 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide In the Area view, run the area authentication. 7) Authenticate use of port Under the corresponding port, apply the authentication mechanism and configure a password. 5.5 Result Verification 1) Use the “display ip routing-table” command to compare the routing table information before and after RTA authentication. When no authentication: [RTA]display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 DIRECT 0 2.2.2.2/32 OSPF 10 10.1.1.0/30 DIRECT 0 10.1.1.1/32 DIRECT 0 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 Cost 0 2 0 0 0 0 Nexthop 127.0.0.1 10.1.1.2 10.1.1.1 127.0.0.1 127.0.0.1 127.0.0.1 Interface InLoopBack0 Ethernet0/0 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 Completing the configuration of authentication on RTA ,but do not configure authentication on RTB ,you can’t find the route toward 2.2.2.2/32. [RTA]display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre Cost Nexthop Interface 1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0 10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0 10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0 127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0 127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0 Note: If the authentication fails, the neighbor relationship cannot be established, and the previously learned route 2.2.2.2 cannot be deleted from the routing table due to timeout. 2) Then use the “display ospf error” command to check the error information. When enable authentication on RTA, but don’t enable it on RTB,you can find errors occurred. [RTA]display ospf error OSPF Process 1 with Router ID 1.1.1.1 OSPF 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 28 packet error statistics: IP received my own packet OSPF wrong version OSPF wrong area id OSPF wrong virtual link OSPF wrong authentication key OSPF packet size > ip length OSPF interface down HELLO: netmask mismatch HELLO: dead timer mismatch HELLO: router id confusion HELLO: NBMA neighbor unknown DD: router id confusion DD: unknown LSA type LS ACK: wrong ack LS ACK: unknown LSA type LS REQ: empty request LS UPD: neighbor state low 0: OSPF wrong packet type 0: OSPF wrong checksum 0: OSPF area mismatch 15: OSPF wrong authentication type 0: OSPF too small packet 0: OSPF transmit error 0: OSPF unknown neighbor 0: HELLO: hello timer mismatch 0: HELLO: extern option mismatch 0: HELLO: virtual neighbor unknown 0: DD: neighbor state low 0: DD: extern option mismatch 0: LS ACK: neighbor state low 0: LS ACK: duplicate ack 0: LS REQ: neighbor state low 0: LS REQ: wrong request 0: LS UPD: newer self-generate LSA Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 0: 0: 0: 0: 0: LS UPD: LSA checksum wrong LS UPD: unknown LSA type DD: MTU option mismatch OPQ-9 : out of flooding scope OPQ-11 : out of flooding scope 0: LS UPD: received less recent LSA 0: OSPF routing: next hop not exist 0: ROUTETYPE: wrong type value 0: OPQ-10 : out of flooding scope Note: From the error information, we can see that the error lies in mismatch of authentication type. 5.6 Configuration Reference 5.6.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit 5.6.2 OSPF Configuration I. Configure RTA 1) Specify the router ID [RTA]router id 1.1.1.1 2) Run the OSPF [RTA]ospf 1 3) Create area 0 [RTA-ospf-1]area 0 4) Declare network in the area 0 view [RTA-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 [RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0 5) Run the area authentication [RTA-ospf-1-area-0.0.0.0]authentication-mode md5 6) Authenticate use of port [RTA-Ethernet0/0]ospf authentication-mode md5 1 huawei Confidential Information of Huawei. No Spreading without Permission 29 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. II. Configure RTB 1) Specify the router ID [RTB]router id 2.2.2.2 2) Run the OSPF [RTB]ospf 1 3) Create area 0 [RTB-ospf-1]area 0 4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 [RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 5) Run the area authentication [RTB-ospf-1-area-0.0.0.0]authentication-mode md5 6) Authenticate use of port [RTB-Ethernet0/0]ospf authentication-mode md5 1 huawei 30 Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. Chapter 6 STUB Area Configuration Guide 6.1 Networking and Service Introduction Figure 6-1 On the basis of introducing the external route to the multi-area OSPF, configure area 1 to STUB area. The Stub area is a special type of OSPF area, which does not receive or disseminate type-5 LSA (AS-external-LSAs). For the network that generates plenty of type-5 LSA, such processing mode can shorten the LSDB of the router in the Stub area effectively, and relieve the occupation of SPF computation for the router resources. Generally, the Stub area is located at the border of the autonomous system. To ensure that the packets from the Stub area to the autonomous system can be forwarded correctly, the ABR of the Stub area will release a default route to this area, and only disseminates packets in this area. Creat vlan 2 and vlan 3 on switch, on RTD configures static routes towards vlan2 and vlan 3. On ospf view import static these static routes. All router’s version are VRP versions 3.30, RELEASE 0008 Confidential Information of Huawei. No Spreading without Permission 31 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 6.2 Command Line List Table 6-1 Operation Version Command Configure an area to be the STUB area VRP 3.30 stub [ no-summary ] VRP 5.10 stub [ no-summary ] Configure the cost of the default route transmitted by OSPF to the STUB area VRP 3.30 default-cost value VRP 5.10 default-cost value 6.3 Configuration Procedure 1) Configure area 1 to stub 6.4 Result Verification 6.4.1 Before Configuration: Display the lsdb and routing-table of RTA before configure stub area. [RTA]display ospf lsdb OSPF Process 1 with Router ID 1.1.1.1 Link State Database LinkState ID 1.1.1.1 2.2.2.2 1.1.1.1 10.1.1.1 2.2.2.2 4.4.4.4 3.3.3.3 192.2.2.0 10.2.2.0 4.4.4.4 Area: 0.0.0.1 AdvRouter Age Len Sequence 1.1.1.1 1661 24 0 2.2.2.2 1651 36 80000008 1.1.1.1 1661 48 8000000b 1.1.1.1 1661 32 80000006 2.2.2.2 1644 28 80000005 2.2.2.2 1644 28 80000004 2.2.2.2 1644 28 80000005 2.2.2.2 1644 28 80000005 2.2.2.2 1644 28 80000005 2.2.2.2 323 28 80000001 Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 0 SpfTree 1 Uninitialized 1564 Uninitialized 1563 Uninitialized 1562 Uninitialized 1563 Uninitialized 1563 Uninitialized Type LinkState ID ASE 110.1.1.0 ASE 110.1.2.0 AS External Database: AdvRouter Age Len Sequence 4.4.4.4 326 36 80000001 4.4.4.4 326 36 80000001 Metric Where 1 Uninitialized 1 Uninitialized Type Stub Rtr Rtr Net SNet SNet SNet SNet SNet ASB [RTA]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 1.1.1.1/32 DIRECT 0 2.2.2.2/32 OSPF 10 3.3.3.3/32 OSPF 10 4.4.4.4/32 OSPF 10 10.1.1.0/30 DIRECT 0 10.1.1.1/32 DIRECT 0 10.2.2.0/30 OSPF 10 110.1.1.0/24 O_ASE 150 110.1.2.0/24 O_ASE 150 32 Cost 0 2 1564 1565 0 0 1564 1 1 Nexthop 127.0.0.1 10.1.1.2 10.1.1.2 10.1.1.2 10.1.1.1 127.0.0.1 10.1.1.2 10.1.1.2 10.1.1.2 Confidential Information of Huawei. No Spreading without Permission Interface InLoopBack0 Ethernet0/0 Ethernet0/0 Ethernet0/0 Ethernet0/0 InLoopBack0 Ethernet0/0 Ethernet0/0 Ethernet0/0 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 127.0.0.0/8 127.0.0.1/32 192.2.2.0/30 DIRECT DIRECT OSPF 0 0 10 0 0 1563 127.0.0.1 127.0.0.1 10.1.1.2 InLoopBack0 InLoopBack0 Ethernet0/0 6.4.2 After Configuring Area 1 to Stub Notes: The following information describe the different results of the commands “stub” and “stub no-summary” These are the results when you use the command “ [RTA-ospf-1-area-0.0.0.1]stub [RTB-ospf-1-area-0.0.0.1]stub” [RTA]display ospf lsdb OSPF Process 1 with Router ID 1.1.1.1 Link State Database Type Stub Rtr Rtr Net SNet SNet SNet SNet SNet SNet LinkState ID 1.1.1.1 2.2.2.2 1.1.1.1 10.1.1.2 0.0.0.0 2.2.2.2 4.4.4.4 3.3.3.3 192.2.2.0 10.2.2.0 Area: 0.0.0.1 AdvRouter Age Len Sequence 1.1.1.1 96 24 0 2.2.2.2 91 36 8000001a 1.1.1.1 96 48 8000001b 2.2.2.2 91 32 80000002 2.2.2.2 111 28 80000002 2.2.2.2 107 28 80000001 2.2.2.2 107 28 80000001 2.2.2.2 107 28 80000001 2.2.2.2 111 28 80000002 2.2.2.2 107 28 80000001 [RTA]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 0.0.0.0/0 OSPF 10 1.1.1.1/32 DIRECT 0 2.2.2.2/32 OSPF 10 3.3.3.3/32 OSPF 10 4.4.4.4/32 OSPF 10 10.1.1.0/30 DIRECT 0 10.1.1.1/32 DIRECT 0 10.2.2.0/30 OSPF 10 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 OSPF 10 Cost 2 0 2 1564 1565 0 0 1564 0 0 1563 Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 0 SpfTree 1 Uninitialized 1 Uninitialized 1564 Uninitialized 1563 Uninitialized 1562 Uninitialized 1563 Uninitialized Nexthop 10.1.1.2 127.0.0.1 10.1.1.2 10.1.1.2 10.1.1.2 10.1.1.1 127.0.0.1 10.1.1.2 127.0.0.1 127.0.0.1 10.1.1.2 Interface Ethernet0/0 InLoopBack0 Ethernet0/0 Ethernet0/0 Ethernet0/0 Ethernet0/0 InLoopBack0 Ethernet0/0 InLoopBack0 InLoopBack0 Ethernet0/0 Note: 1.If you still find AS External Database on RTA, reset ospf process on RTA. 2.The default route of RTA is type-3 LSA and is generated by ABR-RTB. 3.Take a look at the routing table of RTA: The external route disappears, and a new default route appears, but inter-area routes still exist. 4.In order to further shorten the lsdb and the routing table, use the no-summary parameter on the ABR-RTB. Confidential Information of Huawei. No Spreading without Permission 33 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide These are the results when you use the command “ [RTA-ospf-1-area-0.0.0.1]stub [RTB-ospf-1-area-0.0.0.1] stub no-summary ” ” [RTA]display ospf lsdb OSPF Process 1 with Router ID 1.1.1.1 Link State Database Type Stub Rtr Rtr Net SNet LinkState ID 1.1.1.1 2.2.2.2 1.1.1.1 10.1.1.1 0.0.0.0 Area: 0.0.0.1 AdvRouter Age Len Sequence Metric Where 1.1.1.1 65 24 0 0 SpfTree 2.2.2.2 60 36 8000001f 0 SpfTree 1.1.1.1 65 48 80000007 0 SpfTree 1.1.1.1 65 32 80000002 0 SpfTree 2.2.2.2 69 28 80000004 1 Uninitialized [RTA]display ip routing-table Routing Table: public net Destination/Mask Protocol Pre 0.0.0.0/0 OSPF 10 1.1.1.1/32 DIRECT 0 10.1.1.0/30 DIRECT 0 10.1.1.1/32 DIRECT 0 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 Cost 2 0 0 0 0 0 Nexthop 10.1.1.2 127.0.0.1 10.1.1.1 127.0.0.1 127.0.0.1 127.0.0.1 6.5 Configuration Reference 6.5.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit [RTB]interface serial 2/0 [RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252 [RTB-Serial2/0]quit 34 Confidential Information of Huawei. No Spreading without Permission Interface Ethernet0/0 InLoopBack0 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. III. Configure RTC <Quidway>system-view [Quidway]sysname RTC [RTC]interface loopback 0 [RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255 [RTC-LoopBack0]quit [RTC]interface Ethernet 0/0 [RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252 [RTC-Ethernet2/0]quit [RTC]interface serial 2/0 [RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252 [RTC-Serial2/0]quit IV. Configure RTD <Quidway>system-view [Quidway]sysname RTD [RTD]interface loopback 0 [RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255 [RTD-LoopBack0]quit [RTD]interface ethernet 0/0 [RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252 [RTD-Ethernet0/0]quit [RTD]interface ethernet 0/1 [RTD-Ethernet0/1]ip address 10.3.3.1 255.255.255.252 [RTD-Ethernet0/1]quit V. Configure switch [Quidway]sysname switch [switch]vlan 2 [switch-vlan2]quit [switch]vlan 3 [switch-vlan3]quit [switch]interface vlan 1 [switch-Vlan-interface1]ip address 10.3.3.2 255.255.255.252 [switch-Vlan-interface1]quit [switch]interface vlan 2 [switch-Vlan-interface2]ip address 110.1.1.1 255.255.255.0 [switch-Vlan-interface2]quit [switch]interface vlan 3 [switch-Vlan-interface3]ip address 110.1.2.1 255.255.255.0 [switch]ip route-static 0.0.0.0 0.0.0.0 10.3.3.1 6.5.2 OSPF Configuration I. Configure RTA 1) Specify Router ID [RTA]router id 1.1.1.1 2) Run OSPF [RTA]ospf 1 3) Create area 1 [RTA-ospf-1]area 1 4) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 [RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0 Confidential Information of Huawei. No Spreading without Permission 35 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. II. Configure RTB 1) Specify Router ID [RTB]router id 2.2.2.2 2) Run OSPF [RTB]ospf 1 3) Create area 0 [RTB-ospf-1]area 0 4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 5) Create area 1 [RTB-ospf-1]area 1 6) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 III. Configure RTC 1) Specify Router ID [RTC]router id 3.3.3.3 2) Run OSPF [RTC]ospf 1 3) Create area 0 [RTC-ospf-1]area 0 4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 [RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0 5) Create area 2 [RTC-ospf-1]area 2 6) Declare network in the area 2 view [RTC-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 IV. Configure Router D 1) Specify Router ID [RTD]router id 4.4.4.4 2) Run OSPF [RTD]ospf 1 3) Create area 2 [RTD-ospf-1]area 2 4) Declare network in the area 2 view [RTD-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 [RTD-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0 5) Configure static routes towords vlan 2 and vlan 3 [RTD]ip route-static 110.1.1.0 255.255.255.0 10.3.3.2 [RTD]ip route-static 110.1.2.0 255.255.255.0 10.3.3.2 6) On ospf view import these static routes [RTD-ospf-1]import-route static 36 Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. 6.5.3 Configure stub area I. Set area 1 of RTA to Stub [RTA-ospf-1-area-0.0.0.1]stub II. Set area 1 of RTB to stub. Since RTB is ABR, set stub no-summary [RTB-ospf-1-area-0.0.0.1]stub no-summary Confidential Information of Huawei. No Spreading without Permission 37 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Chapter 7 NSSA Area Configuration Guide 7.1 Networking and Service Description Figure 7-1 Four routers RTA, RTB, RTC and RTD run the OSPF concurrently. As shown in the figure, RTA and RTB belong to area 1, RTB and RTC belong to area 0, and RTC and RTD belong to area 2. Set area 1 and area 2 to NSSA area. Four routers use their respective loopback as their router ID. All router’s version are VRP versions 3.30, RELEASE 0008 7.2 Command Line List Table 7-1 Operation Configure Router ID Enable OSPF and Enter the OSPF View Enter OSPF Area view Run the OSPF protocol in the specified network segment 38 Version VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 Command router id router-id router id router-id Ospf [ process-id ] [ router-id router-id ] Ospf [ process-id ] [ router-id router-id ] Area area-id Area area-id network ip-address wildcard-mask network ip-address wildcard-mask Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Operation Configure an area to be the STUB area Configure the cost of the default route transmitted by OSPF to the STUB area Version VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 Command Nssa [ default-route-advertise ] [ no-import-route ] [ no-summary ] Nssa [ default-route-advertise ] [ no-import-route ] [ no-summary ] default-cost cost default-cost cost 7.3 Configuration Flow Designate Router ID Run OSPF Create area Set NSSA area Advertise network Redistribute route Figure 7-2 7.4 Configuration Procedure 1) Specify the router ID In system-view, specify a router ID. Generally, the Loopback address is used as a router ID. 2) Run the OSPF In system-view, run the OSPF. Apply the default OSPF process 1. 3) Create an area In the OSPF view, create an area. Different routers correspond to different area codes. For example, area 0 and area 1 should be created on RTB. 4) Set NSSA area Input NSSA in the OSPF area view, and set the corresponding area to NSSA area. 5) Declare network Confidential Information of Huawei. No Spreading without Permission 39 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Declare network in the corresponding Area view. Different routers declare different networks. For example, area 0 in router RTB declares 192.2.2.0/30. 6) OSPF introduces external route Introduce a straight route on the edge route RTA. 7.5 Result Verification 1) Use the “ping/tracert” to verify the connectivity of OSPF network. [RTA] ping 10.2.2.2 PING 10.2.2.2: 56 data bytes, press CTRL_C to break Reply from 10.2.2.2: bytes=56 Sequence=1 ttl=253 time=30 Reply from 10.2.2.2: bytes=56 Sequence=2 ttl=253 time=29 Reply from 10.2.2.2: bytes=56 Sequence=3 ttl=253 time=29 Reply from 10.2.2.2: bytes=56 Sequence=4 ttl=253 time=28 Reply from 10.2.2.2: bytes=56 Sequence=5 ttl=253 time=29 ms ms ms ms ms --10.20.20.2 ping statistics-5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 28/29/3 ms [RTA]tracert 10.2.2.2 traceroute to 10.2.2.2(10.2.2.2) 30 hops max,40 bytes packet 1 10.1.1.2 3 ms 1 ms 1 ms 2 192.2.2.1 21 ms 19 ms 20 ms 3 10.2.2.2 21 ms 21 ms 21 ms 2) 40 Use the “display ip routing-table” command to check the routing table entry of the router. [RTA]display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 DIRECT 0 10.1.1.0/30 DIRECT 0 10.1.1.1/32 DIRECT 0 10.2.2.0/24 OSPF 10 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/24 OSPF 10 Cost 0 0 0 1564 0 0 3125 Nexthop 127.0.0.1 10.1.1.1 127.0.0.1 10.1.1.2 127.0.0.1 127.0.0.1 10.1.1.2 Interface InLoopBack0 Ethernet0/0 InLoopBack0 Ethernet0/0 InLoopBack0 InLoopBack0 Ethernet0/0 <RTB>display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 O_NSSA 150 2.2.2.2/32 DIRECT 0 10.1.1.0/30 DIRECT 0 10.1.1.2/32 DIRECT 0 10.2.2.0/24 OSPF 10 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/24 OSPF 10 192.2.2.0/30 DIRECT 0 192.2.2.1/32 DIRECT 0 192.2.2.2/32 DIRECT 0 Cost 1 0 0 0 1563 0 0 3124 0 0 0 Nexthop 10.1.1.1 127.0.0.1 10.1.1.2 127.0.0.1 192.2.2.1 127.0.0.1 127.0.0.1 192.2.2.1 192.2.2.2 192.2.2.1 127.0.0.1 Interface Ethernet0/0 InLoopBack0 Ethernet0/0 InLoopBack0 Serial2/0 InLoopBack0 InLoopBack0 Serial2/0 Serial2/0 Serial2/0 InLoopBack0 <RTC>display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 1.1.1.1/32 O_ASE 150 3.3.3.3/32 DIRECT 0 10.1.1.0/30 OSPF 10 10.2.2.0/24 DIRECT 0 Cost 1 0 1563 0 Nexthop 192.2.2.2 127.0.0.1 192.2.2.2 10.2.2.1 Interface Serial2/0 InLoopBack0 Serial2/0 Ethernet0/0 Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 10.2.2.1/32 127.0.0.0/8 127.0.0.1/32 192.2.2.0/24 192.2.2.0/30 192.2.2.1/32 192.2.2.2/32 DIRECT DIRECT DIRECT DIRECT OSPF DIRECT DIRECT 0 0 0 0 10 0 0 <RTD>display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 4.4.4.4/32 DIRECT 0 10.1.1.0/30 OSPF 10 10.2.2.0/24 DIRECT 0 10.2.2.2/32 DIRECT 0 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 OSPF 10 0 0 0 0 3124 0 0 127.0.0.1 127.0.0.1 127.0.0.1 192.2.2.1 192.2.2.2 127.0.0.1 192.2.2.2 InLoopBack0 InLoopBack0 InLoopBack0 Serial2/0 Serial2/0 InLoopBack0 Serial2/0 Cost 0 1564 0 0 0 0 3125 Nexthop 127.0.0.1 10.2.2.1 10.2.2.2 127.0.0.1 127.0.0.1 127.0.0.1 10.2.2.1 Interface InLoopBack0 Ethernet0/0 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 Ethernet0/0 Note: Use the “display ip routing-table” to check the routing entry of the router. Especially, a routing message O_NSSA learned from the RTA exists on the RTB. Its type is LSA 7. Namely, the routing information introduced from RTA is declared to the corresponding router in the area through type LSA 7. In addition, one router RTC only contains routing information O_ASE. Its type is LSA 5. Namely, the routing information of original LSA 7 has been changed to LSA5 by the ABR router (RTB) in the NSSA area, and forwarded to other ordinary areas except STUB and NSSA in the OSPF. For this reason, the area 2 fails to receive the routing information of 1.1.1.1/32. 3) Use the “Display ospf lsdb” command to check the link database of the router: <RTA>display ospf lsdb OSPF Process 1 with Router ID 1.1.1.1 Link State Database Type Rtr Rtr Net SNet SNet NSSA NSSA LinkState ID 2.2.2.2 1.1.1.1 10.1.1.1 192.2.2.0 10.2.2.0 10.1.1.0 1.1.1.1 Area: 0.0.0.1 AdvRouter Age Len Sequence 2.2.2.2 1518 36 8000000c 1.1.1.1 1286 36 8000001b 1.1.1.1 1595 32 80000007 2.2.2.2 1403 28 80000008 2.2.2.2 1403 28 80000007 1.1.1.1 1284 36 80000001 1.1.1.1 1029 36 80000002 Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 3124 Uninitialized 1563 Uninitialized 1 Nssa List 1 Nssa List All areas is NSSA area, AS external database is disabled. <RTB>display ospf lsdb OSPF Process 1 with Router ID 2.2.2.2 Link State Database Type Stub Stub Rtr Rtr SNet SNet LinkState ID 192.2.2.0 192.2.2.0 2.2.2.2 3.3.3.3 10.1.1.0 10.2.2.0 Type LinkState ID Area: 0.0.0.0 AdvRouter Age 2.2.2.2 2027 3.3.3.3 1978 2.2.2.2 227 3.3.3.3 179 2.2.2.2 112 3.3.3.3 57 Len Sequence 24 0 24 0 48 80000013 48 80000010 28 80000009 28 80000008 Area: 0.0.0.1 AdvRouter Age Len Sequence Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 0 SpfTree 1 Inter List 1 Uninitialized Metric Where Confidential Information of Huawei. No Spreading without Permission 41 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Rtr Rtr Net SNet SNet NSSA NSSA 2.2.2.2 1.1.1.1 10.1.1.1 192.2.2.0 10.2.2.0 10.1.1.0 1.1.1.1 2.2.2.2 1.1.1.1 1.1.1.1 2.2.2.2 2.2.2.2 1.1.1.1 1.1.1.1 Type LinkState ID ASE 1.1.1.1 227 307 307 112 112 92 1541 36 36 32 28 28 36 36 AS External Database: AdvRouter Age Len 2.2.2.2 1461 36 8000000d 8000001c 80000008 80000009 80000008 80000002 80000002 Sequence 80000003 0 SpfTree 0 SpfTree 0 SpfTree 3124 Inter List 1563 Inter List 1 Uninitialized 1 Uninitialized Metric Where 1 Ase List [RTC]display ospf lsdb OSPF Process 1 with Router ID 3.3.3.3 Link State Database Type Stub Stub Rtr Rtr SNet SNet LinkState ID 192.2.2.0 192.2.2.0 2.2.2.2 3.3.3.3 10.1.1.0 10.2.2.0 Type Rtr Rtr Net SNet SNet LinkState ID 4.4.4.4 3.3.3.3 10.2.2.1 10.1.1.0 192.2.2.0 Type LinkState ID ASE 1.1.1.1 Area: 0.0.0.0 AdvRouter Age Len Sequence 2.2.2.2 -1 24 0 3.3.3.3 -1 24 0 2.2.2.2 548 48 80000013 3.3.3.3 499 48 80000010 2.2.2.2 434 28 80000009 3.3.3.3 376 28 80000008 Area: 0.0.0.2 AdvRouter Age Len 4.4.4.4 1126 36 3.3.3.3 499 36 3.3.3.3 499 32 3.3.3.3 376 28 3.3.3.3 376 28 Sequence 8000000f 8000000d 80000009 80000008 8000000a AS External Database: AdvRouter Age Len Sequence 2.2.2.2 32 36 80000004 Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 0 SpfTree 1 Uninitialized 1 Inter List Metric 0 0 0 1563 3124 Where Clist SpfTree SpfTree Inter List Inter List Metric Where 1 Uninitialized <RTD>display ospf lsdb OSPF Process 1 with Router ID 4.4.4.4 Link State Database Type Rtr Rtr Net SNet SNet LinkState ID 4.4.4.4 3.3.3.3 10.2.2.1 10.1.1.0 192.2.2.0 Area: 0.0.0.2 AdvRouter Age Len Sequence 4.4.4.4 1337 36 8000000f 3.3.3.3 711 36 8000000d 3.3.3.3 711 32 80000009 3.3.3.3 589 28 80000008 3.3.3.3 589 28 8000000a Metric Where 0 SpfTree 0 SpfTree 0 SpfTree 1563 Uninitialized 3124 Uninitialized Note: By displaying the link state database, the change of LSA in each area is evident. 7.6 FAQ Q: What is the difference between the Stub area and the NSSA area? A: The difference between the NSSA area and the Stub area lies in that the former owns the features of Stub and can introduce external routing information, and make its route transferred in the NSSA area in the form of LSA7. 42 Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. Q: After introducing an external route from area 1, RTD fails to learn this routing information. A: NSSA owns the Stub features. Namely, the ABR router in the Stub area filters the routing information of LSA 5. The routing information introduced from area 1 is transferred in the form of LSA 5. After reaching RTC, the information is filtered out by the RTC and cannot be transferred to RTD. 7.7 Additional Task 1) In the existent conditions, after inputting nssa no-import-route/no-summary/default-route-advertise” into area 2 of RTC, how will the routing tables and link databases of other routers change? 7.8 Configuration Reference 7.8.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit [RTB]interface serial 2/0 [RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252 [RTB-Serial2/0]quit III. Configure RTC <Quidway>system-view [Quidway]sysname RTC [RTC]interface loopback 0 [RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255 [RTC-LoopBack0]quit [RTC]interface Ethernet 0/0 [RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252 [RTC-Ethernet2/0]quit [RTC]interface serial 2/0 [RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252 [RTC-Serial2/0]quit Confidential Information of Huawei. No Spreading without Permission 43 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. IV. Configure RTD <Quidway>system-view [Quidway]sysname RTD [RTD]interface loopback 0 [RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255 [RTD-LoopBack0]quit [RTD]interface ethernet 0/0 [RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252 [RTD-Ethernet0/0]quit 7.8.2 OSPF Configuration I. Configure RTA 1) Specify the router ID [RTA]router id 1.1.1.1 2) Run the OSPF [RTA]ospf 1 3) Create area 1 [RTA-ospf-1]area 1 4) Import the direct routes [RTA-ospf-1]import-route direct 5) Configure NSSA area [RTA-ospf-1-area-0.0.0.1]nssa 6) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 II. Configure RTB 1) Specify the router ID [RTB]router id 2.2.2.2 2) Run the OSPF [RTB]ospf 1 3) Create area 0 [RTB-ospf-1]area 0 4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3 5) Create area 1 [RTB-ospf-1]area 1 6) Configure NSSA area [RTB-ospf-1-area-0.0.0.1]nssa 7) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3 III. Configure RTC 1) Specify the router ID [RTC]router id 3.3.3.3 2) 44 Run the OSPF Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. [RTC]ospf 3) Create area 0 [RTC-ospf-1]area 0 4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.255 5) Create area 2 [RTC-ospf-1]area 2 6) Configure NSSA area [RTC-ospf-1-area-0.0.0.2]nssa 7) Declare network in the area 2 view [RTC-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 IV. Configure RTD 1) Specify the router ID [RTD]router id 4.4.4.4 2) Run the OSPF [RTD]ospf 3) Create area 2 [RTD-ospf-1]area 2 4) Configure NSSA area [RTD-ospf-1-area-0.0.0.2]nssa 5) Declare network in the area 2 view [RTD-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 Confidential Information of Huawei. No Spreading without Permission 45 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Chapter 8 Virtual Link Configuration Guide 8.1 Networking and Service Description Figure 8-1 Four routers RTA, RTB, RTC and RTD run the OSPF concurrently. As shown in the figure, RTA and RTB belong to area 0, RTB and RTC belong to area 1, and RTC and RTD belong to area 2. A virtual link is set up between router RTB and router RTC. The four routers use their respective loopback as their respective router ID. All router’s version are VRP versions 3.30, RELEASE 0008 8.2 Command Line List Table 8-1 Operation Configure Router ID Enable OSPF and Enter the OSPF View Enter OSPF Area view Run the OSPF protocol in the specified network segment 46 Version VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 VRP 3.30 VRP 5.10 Command router id router-id router id router-id ospf [ process-id ] [ router-id router-id ] ospf [ process-id ] [ router-id router-id ] Area area-id Area area-id network ip-address wildcard-mask network ip-address wildcard-mask Confidential Information of Huawei. No Spreading without Permission Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide Operation Version VRP 3.30 Create and configure a virtual link VRP 5.10 Command vlink-peer router-id [ hello seconds] [ retransmit seconds ] [ trans-delay seconds ] [ dead seconds] [ simple password | md5 keyid key ] vlink-peer router-id [ hello seconds] [ retransmit seconds ] [ trans-delay seconds ] [ dead seconds] [ simple [ plain | cipher] password | { md5 | hmac-md5 keyid [ plain | cipher ] key } ] 8.3 Configuration Flow Specify Router ID R Run OSPF Create an area Declare network Establish a virtual link with the corresponding Figure 8-2 8.4 Configuration Procedure 1) Specify the router ID In system-view, specify a router ID. Generally, the Loopback address is used as a router ID. 2) Run the OSPF In system-view, run the OSPF. Apply the default OSPF process 1. 3) Create an area In the OSPF view, create an area. Different routers correspond to different area codes. For example, area 0 and area 1 should be created on RTB. 4) Declare network Declare network in the corresponding Area view. Different routers declare different networks. For example, area 0 in router RTB declares 192.2.2.0/30. Confidential Information of Huawei. No Spreading without Permission 47 Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. OSPF Practice Guide 5) Set up a virtual link on the corresponding router. Set a virtual link on the corresponding router in the Area view. For example, set up a virtual link on RTB in the OSPF area view. The IP is the ID of the far-end router. 8.5 Result Verification 1) Use the “ping/tracert” command to verify the connectivity of OSPF network. <RTD>ping 10.1.1.1 PING 10.1.1.1: 56 data bytes, press CTRL_C to break Reply from 210.11.180.18 : bytes=56 Sequence=1 ttl=253 Reply from 210.11.180.18 : bytes=56 Sequence=2 ttl=253 Reply from 210.11.180.18 : bytes=56 Sequence=3 ttl=253 Reply from 210.11.180.18 : bytes=56 Sequence=4 ttl=253 Reply from 210.11.180.18 : bytes=56 Sequence=5 ttl=253 time=29 time=29 time=29 time=29 time=29 ms ms ms ms ms --10.10.10.1 ping statistics-5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 29/29/3 ms <RTD>tracert 10.1.1.1 traceroute to 10.1.1.1(10.1.1.1) 30 hops max,40 bytes packet 1 10.2.2.1 10 ms 1 ms 2 ms 2 192.2.2.2 20 ms 19 ms 19 ms 3 10.1.1.1 30 ms 21 ms 20 ms 2) Use the “display ip routing-table” command to check the routing table entry of the router. <RTD>display ip routing-table Routing Tables: public net Destination/Mask Protocol Pre 4.4.4.4/32 DIRECT 0 10.1.1.0/30 OSPF 10 10.2.2.0/30 DIRECT 0 10.2.2.2/32 DIRECT 0 127.0.0.0/8 DIRECT 0 127.0.0.1/32 DIRECT 0 192.2.2.0/30 OSPF 10 Cost 0 1564 0 0 0 0 1563 Nexthop 127.0.0.1 10.2.2.1 10.2.2.2 127.0.0.1 127.0.0.1 127.0.0.1 10.2.2.1 Interface InLoopBack0 Ethernet0/0 Ethernet0/0 InLoopBack0 InLoopBack0 InLoopBack0 Ethernet0/0 Note: Since area 2 is not connected to area 0 directly, the routing table of RTD has no route in area 0. Use “display ip routing-table” to check whether the routing information of area 0 is learned successfully on RTD, and hence verify the successful establishment of virtual link. 3) In addition, use the “display ospf vlink” command to check the state of virtual link. [RTB]display ospf vlink OSPF Process 1 with Router ID 2.2.2.2 Virtual Links Virtual-link Neighbor-id -> 3.3.3.3, State: Full Interface 192.2.2.2 (Serial2/0) Cost: 1562 State: PtoP Type: Virtual Transit Area: 0.0.0.1 Timers : Hello 10, Dead 40, Poll 0, Retransmit 5, Transmit Delay 1 [RTC]display ospf vlink OSPF Process 1 with Router ID 3.3.3.3 48 Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. Virtual Links Virtual-link Neighbor-id -> 2.2.2.2, State: Full Interface 192.2.2.1 (Serial2/0) Cost: 1562 State: PtoP Type: Virtual Transit Area: 0.0.0.1 Timers : Hello 10, Dead 40, Poll 0, Retransmit 5, Transmit Delay 1 Note: The virtual link is established on the ABR router between Area0 and Area2. We can use “display ospf vlink” to check the state of virtual link. As shown in the information displayed above, the state of the current virtual link is in the Full state, and the LSDB of both parties is synchronous. 8.6 FAQ Q: Can the virtual link cross two or more non-backbone areas? Or cross backbone area? A: No. Virtual links can only cross non-backbone areas, and can cross only one non-backbone area. Q: What is virtual link? What are its functions? A: Virtual link means the link directed to the backbone area through the tunnel in the area. The OSPF defines all non-backbone areas must be connected with the backbone directly to prevent loop, but the virtual link enables the area disconnected from the backbone area to get connected with the backbone area virtually. 8.7 Configuration Reference 8.7.1 Configure the Port I. Configure RTA <Quidway>system-view [Quidway]sysname RTA [RTA]interface loopback 0 [RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0]quit [RTA]interface ethernet 0/0 [RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252 [RTA-Ethernet0/0]quit II. Configure RTB <Quidway>system-view [Quidway]sysname RTB [RTB]interface loopback 0 [RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0]quit [RTB]interface Ethernet 0/0 [RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252 [RTB-Ethernet0/0]quit [RTB]interface serial 2/0 [RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252 [RTB-Serial2/0]quit Confidential Information of Huawei. No Spreading without Permission 49 OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. III. Configure RTC <Quidway>system-view [Quidway]sysname RTC [RTC]interface loopback 0 [RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255 [RTC-LoopBack0]quit [RTC]interface Ethernet 0/0 [RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252 [RTC-Ethernet2/0]quit [RTC]interface serial 2/0 [RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252 [RTC-Serial2/0]quit IV. Configure RTD <Quidway>system-view [Quidway]sysname RTD [RTD]interface loopback 0 [RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255 [RTD-LoopBack0]quit [RTD]interface ethernet 0/0 [RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252 [RTD-Ethernet0/0]quit 8.7.2 OSPF Configuration I. Configure RTA 1) Specify the router ID [RTA]router id 1.1.1.1 2) Run the OSPF [RTA]ospf 1 3) Create area 0 [RTA-ospf-1]area 0 4) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 II. Configure RTB 1) Specify the router ID [RTB]router id 2.2.2.2 2) Run the OSPF [RTB]ospf 1 3) Create area 0 [RTB-ospf-1]area 0 4) Create area 1 [RTB-ospf-1]area 1 5) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.1]network 192.2.2.0 0.0.0.3 6) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3 7) 50 Establish a virtual link in the area 1 view Confidential Information of Huawei. No Spreading without Permission OSPF Practice Guide Error! Use the Home tab to apply 标题 1 to the text that you want to appear here.Error! Use the Home tab to apply 标题 1 to the text that you want to appear here. [RTB-ospf-1-area-0.0.0.1]vlink-peer 3.3.3.3 III. Configure RTC 1) Specify the router ID [RTC]router id 3.3.3.3 2) Run the OSPF [RTC]ospf 3) Create area 1 [RTC-ospf-1]area 1 4) Create area 2 [RTC-ospf-1]area 2 5) Declare network in the area 1 view [RTC-ospf-1-area-0.0.0.1]network 192.2.2.0 0.0.0.3 6) Declare network in the area 2 view [RTC-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 7) Establish a virtual link in the area 1 view [RTB-ospf-1-area-0.0.0.1]vlink-peer 2.2.2.2 IV. Configure RTD 1) Router ID [RTD]router id 4.4.4.4 2) Run the OSPF [RTD]ospf 1 3) Create area 2 [RTD-ospf-1]area 2 4) Declare network in the area 2 view [RTD-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3 Confidential Information of Huawei. No Spreading without Permission 51