Patch | show igmpsnooping routeraddress | 29 |
Importing BGP routes into OSPF
Introduction With this enhancement you can import routes from BGP into OSPF. OSPF will then redistribute these routes. This enhancement adds three parameters to the set ospf command, and modifies the output of the show ospf command. The new parameters are bgpimport, bgpfilter and bgplimit.
BGP can learn thousands of routes, so it’s important to consider the network impact of importing these routes. Routing devices in the OSPF domain may become overloaded if they store too many routes. You can prevent this by limiting the number of routes that will be imported.
Do not enable the importing of BGP routes into OSPF unless you are sure about the consequences for the OSPF domain.
Enabling BGP route To enable importing BGP routes into OSPF, use the command:
import
set ospf bgpimport=on
Limiting the number There are two ways to limit the number of BGP routes imported into OSPF. of routes One way is to specify a maximum number of routes with the command:
set ospf bgplimit=1...300
When the limit is reached, the importing of routes will stop until existing routes are removed. Because they are BGP routes, actions of BGP control when the routes disappear.
The other way to limit the imported routes is to configure a routing filter. This filter is used in conjunction with the bgpfilter parameter in the set ospf command to control the passing of routing information in and out of the device. To configure a filter, use the add ip filter command:
add ip
Use this filter to limit imported BGP routes with the command:
set ospf bgpfilter=300...399
where the filter number is the previously configured filter.
Take care when configuring the IP filter. If the number of imported routes reaches the bgplimit parameter, you may not have imported all the routes specified with the bgpfilter parameter.
Advertising desired The order in which routes are added is arbitrary. This means that to have routes desired BGP routes advertised by OSPF, you must take care setting the entry
number for the route filter with the add ip route command. Assign a low entry number to a filter used to import preferred BGP routes. Alternatively, set the bgplimit parameter above the total number of routes that BGP will ever add to the routing table.
Patch