Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.User can use the "

advertise disable" parameter to restrain route aggregation at the ABR. The ABR will aggregate routes by default after area-range is configured and the packet is routed to the best (the longest or most specific) match.
Image RemovedTo 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. 


Image Added
                                                     Figure 5-6. OSPF area range configuration. 

Configuring Switch A

...


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

Code Block
admin@router2# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 30
admin@router2# set interface gigabit-ethernet tege-1/1/495 family ethernet-switching native-vlan-id 500
admin@XorPlus# 40
admin@router2# set protocols lldp enable true
admin@router2# set protocols ospf4ospf router-id 12.12.12.12
admin@XorPlus#admin@router2# set protocols ospf4ospf area 0.0.0.0 interface vlan-500 vif vlan-500 address 192.168.1.2
admin@XorPlus#commit
Waiting for merging configuration.
Commit OK.
Save Done.
admin@XorPlus# 

Configuring Switch B

Code Block
admin@XorPlus# set vlans vlan-id 500 l3-interface vlan-500
admin@XorPlus# set vlan-interface interface vlan-500 vif vlan-500 address 192.168.1.1 prefix-length 30
admin@XorPlus# set interface gigabit-ethernet te-1/1/49 family ethernet-switching native-vlan-id 500
admin@XorPlus# set protocols ospf4 router-id 4.4.4.4
admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan-500 vif vlan-500 address 192.168.1.1
admin@XorPlus#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 40030 l3-interface vlan-400
admin@XorPlus#"vlan30"
admin@router2# set vlan-interfacevlans interface vlan-400id vif40 vlanl3-400 address 172.25.150.250 prefix-length 30
admin@XorPlus# set interface gigabit-ethernet te-1/1/50 family ethernet-switching native-vlan-id 400
admin@XorPlus# set protocols ospf4 area 1.1.1.1 interface vlan-400 vif vlan-400 address 172.25.150.250
admin@XorPlus#commit
Waiting for merging configuration.
Commit OK.
Save Done.
admin@XorPlus# 

 

Configuring Switch C

Code Block
admin@XorPlus# set vlans vlan-id 400 l3-interface vlan-400
admin@XorPlus# set vlan-interface interface vlan-400 vif vlan-400 address 172.25.150.249 prefix-length 30
admin@XorPlus# set interface gigabit-ethernet te-1/1/49 family ethernet-switching native-vlan-id 400
admin@XorPlus# set protocols ospf4 router-id 3.3.3.3
admin@XorPlus# set protocols ospf4 area 1.1.1.1 interface vlan-400 vif vlan-400 address 172.25.150.249
admin@XorPlus#commit
Waiting for merging configuration.
Commit OK.
Save Done.
admin@XorPlus#

Checking the route table on Switch C

There will be a 30-bit route entry,192.168.1.0/30.

Code Block
admin@Xorplus# run show route forward-route ipv4 all 
Destination          NextHopMac          Port    
---------------      -----------------   ---------
172.25.150.248/30    60:EB:69:44:44:44   connected
192.168.1.0/30       A8:2B:B5:E0:94:A7   te-1/1/49
Total route count:2

Configuring area-range on ABR(Switch B)

Code Block
admin@XorPlus# set protocols ospf4 area 0.0.0.0 area-range 192.168.1.0/24 advertise true
admin@XorPlus# commit
Waiting for merging configuration.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.

Code Block
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.

Code Block
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 doneDone.
admin@XorPlus#

Checking the route table on Switch C

The route entry 192.168.1.0/30 will be replaced by 192.168.1.0/24.

Code Block
admin@Xorplus# run show route forward-route ipv4 all 
Destination    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.

Code Block
admin@router1> show route ipv4
Codes: K - kernel route, C - connected, S - static, R - RIP,
     NextHopMac  O - OSPF, I - IS-IS, B - PortBGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F -------- PBR, f - OpenFabric,
       > - selected route, * - FIB route, q ---------------   ---------
172.25.150.248/30    60:EB:69:44:44:44   connected
192.168.1.0/24       A8:2B:B5:E0:94:A7   te-1/1/49
Total route count:2 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