Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

OSPF should aggregate route entries from the backbone area into a non-backbone area or from a non-backbone area into the backbone area. Route aggregation works only on the ABR.

To disable injecting routes into an area from an ABR manually, the user can apply the prefix lists in inbound  or outbound directions to control the dissemination of routes into and out of OSPF areas. The command used to control route dissemination is set protocols ospf area in filter-list prefix. The keyword in indicated routes advertised into an area. Whereas out indicates routes going out of the area. Its important to note that the user must configure the prefix list before applying it through the  set protocols ospf area in filter-list prefix command. The command to create the prefix list is set routing prefix-list. 



                                                     Figure 5-6. OSPF area range configuration. 


Figure 5-6 shows a sample OSPF topology with three different areas configured. In this example we will focus on the configuration on Router 2 to see how it affects the routing table on Router 1 which is in area 0.0.0.2. First we will see the configuration on Router 2.

Configuring Router 2

admin@router2# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 30
admin@router2# set interface gigabit-ethernet ge-1/1/5 family ethernet-switching native-vlan-id 40
admin@router2# set protocols lldp enable true
admin@router2# set protocols ospf router-id 2.2.2.2
admin@router2# set protocols ospf area 0.0.0.2 area-type "stub"
admin@router2# set protocols ospf area 0.0.0.1 in filter-list
admin@router2# set protocols ospf network 10.10.2.0/24 area 0.0.0.2
admin@router2# set protocols ospf network 10.10.4.0/24 area 0.0.0.0
admin@router2# set system hostname "router2"
admin@router2# set l3-interface loopback lo address 2.2.2.2 prefix-length 32
admin@router2# set l3-interface vlan-interface vlan30 address 10.10.2.2 prefix-length 24
admin@router2# set l3-interface vlan-interface vlan40 address 10.10.4.1 prefix-length 24
admin@router2# set vlans vlan-id 30 l3-interface "vlan30"
admin@router2# set vlans vlan-id 40 l3-interface "vlan40"

Check the Routing Table on Router 1

If we check the routing table on Router 1, we can see prefix 10.10.5.0 is in the routing table advertised through OSPF.

admin@router1> show route ipv4
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

O   0.0.0.0/0 [110/11] via 10.10.2.2, vlan10, weight 1, 04:01:47
O   1.1.1.1/32 [110/0] is directly connected, lo, weight 1, 04:03:37
C>* 1.1.1.1/32 is directly connected, lo, 04:03:37
O>* 4.4.4.4/32 [110/20] via 10.10.2.2, vlan10, weight 1, 00:00:02
O   10.10.2.0/24 [110/10] is directly connected, vlan10, weight 1, 04:02:37
C>* 10.10.2.0/24 is directly connected, vlan10, 04:02:37
O>* 10.10.4.0/24 [110/20] via 10.10.2.2, vlan10, weight 1, 00:00:02
O>* 10.10.5.0/24 [110/30] via 10.10.2.2, vlan10, weight 1, 00:00:02

Now we will add the commands set protocols ospf area 0.0.0.2 in filter-list prefix list1 and set routing prefix-list IPv4 list1 deny prefix 10.10.5.0/24 
to Router 2.

admin@router2# set routing prefix-list IPv4 list1 deny prefix 10.10.5.0/24
admin@router2# set protocols ospf area 0.0.0.2 in filter-list prefix "list1"
Commit OK.
Save Done.
admin@router2#

 Now if we check the routing table on Router 1 again, we see the prefix 10.10.5.0/24 has disappeared from the routing table.

admin@router1> show route ipv4
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

O   0.0.0.0/0 [110/11] via 10.10.2.2, vlan10, weight 1, 04:54:16
K>* 0.0.0.0/0 [0/0] via 10.10.51.1, eth0, 04:56:35
O   1.1.1.1/32 [110/0] is directly connected, lo, weight 1, 04:56:06
C>* 1.1.1.1/32 is directly connected, lo, 04:56:06
O   10.10.2.0/24 [110/10] is directly connected, vlan10, weight 1, 04:55:06
C>* 10.10.2.0/24 is directly connected, vlan10, 04:55:06
  • No labels