Implementing OSPF LSA filtering & Inter-area route filtering on Huawei Routers

Implementing OSPF LSA filtering & Inter-area route filtering on Huawei Routers

There are four AR routers running OSPF on the intranet. To control the number of OSPF LSDBs, the four AR routers are assigned to different areas. IS-IS runs between R4 (ASBR) in OSPF area 1 and R5 in the branch.
To control the number of routes on the headquarters network, route filtering is configured on R3 (ABR) to limit the number of routes that can enter OSPF area 0.
The branch needs to access the headquarters network. The network administrator has delivered the default IS-IS routes to the branch instead of importing OSPF routes to the 1S-IS routing table.

Step 1: Configure IP addresses for Devices.

*******************************************R1
system-view 
sysname R1

interface GigabitEthernet 0/0/1
description TO_SW1_GE 0/0/1
ip address 10.0.13.1 30 
#
interface GigabitEthernet 0/0/2
description TO_R2_GE 0/0/3
ip address 10.0.13.5 30
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.255
#

*******************************************R2
system-view 
sysname R2

interface GigabitEthernet 0/0/3
description TO_R1_GE 0/0/2
ip address 10.0.13.6 30 
#
interface GigabitEthernet 0/0/2
description TO_R3_GE 0/0/3
ip address 10.0.13.9 30
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.255
#

*******************************************R3
system-view 
sysname R3

interface GigabitEthernet 0/0/1
description TO_SW1_GE 0/0/3
ip address 10.0.13.2 30 
#
interface GigabitEthernet 0/0/2
description TO_R4_GE 0/0/3
ip address 10.0.13.13 30
#
interface GigabitEthernet 0/0/3
description TO_R2_GE 0/0/2
ip address 10.0.13.10 30
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.255
#

*******************************************R4
system-view 
sysname R4

interface GigabitEthernet 0/0/3
description TO_R3_GE 0/0/2
ip address 10.0.13.14 30 
#
interface GigabitEthernet 0/0/2
description TO_R5_GE 0/0/3
ip address 10.0.13.17 30
#
interface LoopBack0
ip address 10.0.4.4 255.255.255.255
#

Step 2: Configure OSPF according to the planning.

*******************************************R1
ospf 1 router-id 10.0.1.1
area 0 
network 10.0.13.0 0.0.0.3
network 10.0.13.4 0.0.0.3
network 10.0.1.1 0.0.0.0

*******************************************R2
ospf 1 router-id 10.0.2.2
area 0 
network 10.0.13.8 0.0.0.3
network 10.0.13.4 0.0.0.3
network 10.0.2.2 0.0.0.0

*******************************************R3
ospf 1 router-id 10.0.3.3
area 0 
network 10.0.13.0 0.0.0.3
network 10.0.13.8 0.0.0.3
network 10.0.3.3 0.0.0.0
#
area 1
network 10.0.13.12 0.0.0.3

*******************************************R4
ospf 1 router-id 10.0.4.4
area 1
network 10.0.13.12 0.0.0.3
network 10.0.4.4 0.0.0.0

Check the OSPF neighbor relationship status on R2 and R3.

Check the OSPF routing table on R1

Step 3: Configure IS-IS according to the planning

*******************************************R4
isis 1 
is-level level-1-2
is-name R4
network-entity 49.0001.0000.0000.0004.00
#
int GigabitEthernet 0/0/2
isis enable 1 
#

*******************************************R5
isis 1 
is-level level-1
is-name R5
network-entity 49.0001.0000.0000.0005.00
#
int GigabitEthernet 0/0/3
isis enable 1 
#
int LoopBack 0 
isis enable 1

Check the ISIS neighbor relationship and IS-IS routing table on R4

Step 4: Configure OSPF route control.

On R1 and R2, create Loopback2 interfaces on R1 and R2 and assign IP addresses on network segment 172:16.2.1/24 to Loopback2 interfaces. Activate OSPF on Loopback2 interfaces and set the number of equal-cost routes to 1 on R3.
On R4, create the loopback 3 interface with the IP address on network segment 172.16.3.1/24, change the OSPF interface type to broadcast, activate OSPF on the Loopback3 interface, and perform inter-area Type 3 LSA filtering on R3 (ABR) to prevent the OSPF inter-area route 172.16.3.0/24 from being transmitted to OSPF area 0.

Create loopback 2 interfaces on R1 and R2 and activate OSPF on the two interfaces

*******************************************R1
interface loopBack2
ip address 172.16.2.1 32 
ospf enable 1 area 0
#

*******************************************R2
interface loopBack2
ip address 172.16.2.1 32 
ospf enable 1 area 0
#

Check the OSPF routing table of R3

The OSPF route 172.16.2.1/32 is used for load balancing, with R1 and R2 as next hops.

Set the maximum number of equal-cost routes for load balancing to 1 on R3

*******************************************R3
ospf 1 
maximum load-balancing 1 

Check the routing table on R3 again.

There is only one OSPF route 172.16.2.1/32 on R3, and the next hop is R2.
When the number of equal-cost routes is greater than number specified in the maximum load-balancing command, valid routes are selected for load balancing based on the following criteria:
Route priority: Routes with the highest priority (lowest weight) are selected for load balancing.
Interface index: If routes have the same priority, the routes with the largest interface index are selected for load balancing.
Next-hop IP address: If routes have the same priority and interface index, the routes with the largest next-hop IP addresses are selected for load balancing.
The index of GE0/0/3 on R3 connected to R2 is greater than that of GEO/0/1 on R1, so the OSPF route 172.16.2.1/32 from R2 becomes valid.

Create LoopBack3 on R4 and activate OSPF

*******************************************R4
interface loopBack2
ip address 172.16.3.1 24
ospf enable 1 area 1
ospf network-type broadcast

Check OSPF routing information on R1

Check OSPF LSDB on R3

Configure Type 3 LSA filtering on R3 (ABR) to prevent the OSPF inter-area route 172.16.3.0/24 from being transmitted to OSPF area 0.

*******************************************R3
ip ip-prefix 1 index 10 deny 172.16.3.0 24 greater-equal 24 less-equal 24 
ip ip-prefix 1 index 20 permit 0.0.0.0 0 less-equal 32 

ospf 1 
area 1 
filter ip-prefix 1 export

Check OSPF LSB on R3 again.

The Type 3 LSA 172.16.3.0 cannot be found in the LSDB of OSPF area 0 on R3.

Check the OSPF route 172.16.3.1/24 route on R1

OSPF route 172.16.3.1/24 route does not exist on R1

Step 5: Configure default IS-IS route control.

Advertise the default route on R4 and check whether the default route is generated on R5.
*******************************************R4
isis 1 
default-route-advertise always level-1-2

Check IS-IS routes and IS-IS LSDB on R5

The LSP 0000.0000.0004.00-01 from R4 carries the default route.



Leave a Reply

This website uses cookies and asks your personal data to enhance your browsing experience.