Cisco: OSPF: Inter-Area Route Filtering
My Learning topics result may not be accurate because of my misunderstanding!!!!
I STRONGLY RECOMMENDED to read the Official Documents(cisco.com a.k.a. CCO) and RFCs, any other books, sites.
And learn foundation, create lab yourself, configure, and verify any topics.
Base Lab 1: OSPF Route Filtering Lab 581c807c-e998-4929-9f53-7685fc6c3b88
Lab ID: 581c807c-e998-4929-9f53-7685fc6c3b88
-
-
-
Topology
Base Configuration
Common Configuration Snippet
Million common configuration is here.
-
-
R1
configure terminal
!
interface GigabitEthernet 0/1
ip address 10.1.2.1 255.255.255.0
no shutdown
interface GigabitEthernet 0/2
ip address 10.1.1.1 255.255.255.0
no shutdown
interface Loopback 0
ip address 1.1.0.1 255.255.255.0
ip ospf network point-to-point
interface Loopback 1
ip address 1.1.1.1 255.255.255.0
ip ospf network point-to-point
interface Loopback 2
ip address 1.1.2.1 255.255.255.0
ip ospf network point-to-point
interface Loopback 3
ip address 1.1.3.1 255.255.255.0
ip ospf network point-to-point
interface Loopback 4
ip address 1.1.4.1 255.255.255.0
ip ospf network point-to-point
interface Loopback 5
ip address 1.1.5.1 255.255.255.0
ip ospf network point-to-point
interface Loopback 6
ip address 1.1.6.1 255.255.255.0
ip ospf network point-to-point
!
router ospf 1
router-id 1.1.1.1
network 10.1.1.1 0.0.0.0 area 10
network 10.1.2.1 0.0.0.0 area 10
network 1.1.0.1 0.0.0.0 area 10
network 1.1.1.1 0.0.0.0 area 10
network 1.1.2.1 0.0.0.0 area 10
network 1.1.3.1 0.0.0.0 area 10
network 1.1.4.1 0.0.0.0 area 10
network 1.1.5.1 0.0.0.0 area 10
network 1.1.6.1 0.0.0.0 area 10
exit
!
end
R2
configure terminal
!
interface GigabitEthernet 0/1
ip address 10.2.3.2 255.255.255.0
no shutdown
interface GigabitEthernet 0/2
ip address 10.1.2.2 255.255.255.0
no shutdown
interface Loopback 0
ip address 2.2.2.2 255.255.255.255
no shutdown
!
router ospf 1
router-id 2.2.2.2
network 10.1.2.2 0.0.0.0 area 10
network 10.2.3.2 0.0.0.0 area 0
network 2.2.2.2 0.0.0.0 area 0
exit
!
end
R3
configure terminal
!
interface GigabitEthernet 0/1
ip address 10.3.3.3 255.255.255.0
no shutdown
interface GigabitEthernet 0/2
ip address 10.2.3.3 255.255.255.0
no shutdown
interface Loopback 0
ip address 3.3.0.3 255.255.255.0
ip ospf network point-to-point
interface Loopback 1
ip address 3.3.1.3 255.255.255.0
ip ospf network point-to-point
interface Loopback 2
ip address 3.3.2.3 255.255.255.0
ip ospf network point-to-point
interface Loopback 3
ip address 3.3.3.3 255.255.255.0
ip ospf network point-to-point
interface Loopback 4
ip address 3.3.4.3 255.255.255.0
ip ospf network point-to-point
interface Loopback 5
ip address 3.3.5.3 255.255.255.0
ip ospf network point-to-point
interface Loopback 6
ip address 3.3.6.3 255.255.255.0
ip ospf network point-to-point
!
router ospf 1
router-id 3.3.3.3
network 10.2.3.3 0.0.0.0 area 0
network 10.3.3.3 0.0.0.0 area 0
network 3.3.0.3 0.0.0.0 area 0
network 3.3.1.3 0.0.0.0 area 0
network 3.3.2.3 0.0.0.0 area 0
network 3.3.3.3 0.0.0.0 area 0
network 3.3.4.3 0.0.0.0 area 0
network 3.3.5.3 0.0.0.0 area 0
network 3.3.6.3 0.0.0.0 area 0
exit
!
end
Configuring Inter Area Route Filtering 4fa45a7b-4cb0-4848-9f20-c059e56ee8d3
configure terminal
!
ip prefix-list PRE-AREA10-OUT deny 1.1.2.0/24
ip prefix-list PRE-AREA10-OUT deny 1.1.4.0/24
ip prefix-list PRE-AREA10-OUT permit 0.0.0.0/0 le 32
!
ip prefix-list PRE-AREA10-IN deny 3.3.5.3/24
ip prefix-list PRE-AREA10-IN deny
!
router ospf 1
area 10 filter-list prefix PRE-AREA10-OUT out
area 10 filter-list prefix PRE-AREA10-IN in
!
end
Verification
show ip interface brief
show ip route ospf
show ip ospf database
show ip prefix-list detail <word>
R1 Console Log
R2 Console Log
R3 Console Log
R2#sh ip prefix-list detail
Prefix-list with the last deletion/insertion: PRE-AREA10-OUT
ip prefix-list PRE-AREA10-IN:
count: 2, range entries: 1, sequences: 5 - 10, refcount: 2
seq 5 deny 3.3.5.0/24 (hit count: 1, refcount: 1)
seq 10 permit 0.0.0.0/0 le 32 (hit count: 9, refcount: 1)
ip prefix-list PRE-AREA10-OUT:
count: 3, range entries: 1, sequences: 5 - 15, refcount: 3
seq 5 deny 1.1.2.0/24 (hit count: 1, refcount: 1)
seq 10 deny 1.1.4.0/24 (hit count: 1, refcount: 2)
seq 15 permit 0.0.0.0/0 le 32 (hit count: 7, refcount: 1)
hit count can check ABR OSPF database.
R2#sh ip ospf database | begin Summary Net Link States \(Area 0\)
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
1.1.0.0 2.2.2.2 544 0x80000001 0x0048E8
1.1.1.0 2.2.2.2 544 0x80000001 0x003DF2
1.1.3.0 2.2.2.2 544 0x80000001 0x002707
1.1.5.0 2.2.2.2 544 0x80000001 0x00111B
1.1.6.0 2.2.2.2 544 0x80000001 0x000625
10.1.1.0 2.2.2.2 544 0x80000001 0x00C75F
10.1.2.0 2.2.2.2 584 0x80000001 0x00B274
R2#sh ip ospf database | begin Summary Net Link States \(Area 10\)
Summary Net Link States (Area 10)
Link ID ADV Router Age Seq# Checksum
2.2.2.2 2.2.2.2 548 0x80000001 0x00FA31
3.3.0.0 2.2.2.2 498 0x80000001 0x001617
3.3.1.0 2.2.2.2 498 0x80000001 0x000B21
3.3.2.0 2.2.2.2 498 0x80000001 0x00FF2B
3.3.3.0 2.2.2.2 498 0x80000001 0x00F435
3.3.4.0 2.2.2.2 498 0x80000001 0x00E93F
3.3.6.0 2.2.2.2 498 0x80000001 0x00D353
10.2.3.0 2.2.2.2 548 0x80000001 0x009B89
10.3.3.0 2.2.2.2 498 0x80000001 0x009989
References