Multicast and Routing Guide K/KA/KB.15.15
Example
Example 79 Assigning loopback IP addresses to OSPF areas
The loopback IP address 13.3.4.5 of loopback 2 is advertised only in OSPF area
0.0.0.111. The IP addresses 14.2.3.4 and 15.2.3.4 of loopback 1 are advertised
in all OSPF areas. The lines in bold below show that the IP address of loopback
interface 2 is assigned to OSPF area 111.
HP Switch(config)# interface loopback 1
HP Switch(lo-1)# ip address 14.2.3.4
HP Switch(lo-1)# ip address 15.2.3.4
HP Switch(lo-1)# exit
HP Switch(config)# interface loopback 2
HP Switch(lo-2)# ip address 13.3.4.5
HP Switch(lo-2)# ip ospf 15.2.3.4 area 0.0.0.111
HP Switch(lo-2)# exit
Example 80 Verifying OSPF redistribution of loopback interfaces
To verify the OSPF redistribution of loopback interfaces, enter the show ip
routecommand from any context level to display IP route table entries.
In this example, a loopback address assigned to an area is displayed as an ospf
intra-area (internal) route to its neighbor; a loopback address not assigned to
a specific area is displayed as an ospf external route:
HP Switch(config)# show ip route
IP Route Entries
Destination Gateway VLAN Type Sub-Type Metric Dist
----------- ------- ---- ---- -------- ------ ----
20.0.15.1/32 25.0.67.131 25 ospf external2 10 110
20.0.16.2/32 25.0.67.131 25 ospf intra-area 2 110
Configuring external route redistribution in an OSPF domain (optional)
For more information, see “Configuring for external route redistribution in an OSPF domain”
(page 201).
Configuring redistribution filters
Syntax:
router ospf restrict ip-addr/mask-length
Prevents distribution of the specified range of external routes through an ASBR from
sources external to the OSPF domain.
Default: Allow all supported, external route sources
NOTE: Use this command to block unwanted, external routes before enabling
route redistribution on the ASBR.
Example:
To configure a routing switch operating as an ASBR to filter out redistribution of
static, connected, or RIP routes on network 10.0.0.0, enter the following commands:
HP Switch(config)# router ospf restrict 10.0.0.0/8
NOTE: In the default configuration, redistribution is permitted for all routes from supported sources.
148 Open Shortest Path First Protocol (OSPF)










