[Contents] [Prev] [Next] [Index] [Report an Error]

Injecting OSPF Routes into the BGP Routing Table (Optional)

You can specify a match condition for policies based on procotols by naming a protocol from which the route is learned or to which the route is being advertised. You can specify one of the following protocols: aggregate, BGP, direct, DVMRP, IS-IS, local, OSPF, PIM-dense, PIM-sparse, RIP, or static

For example, you can inject or redistribute OSPF routes into the BGP routing table by creating a routing policy.

To redistribute OSPF routes from area 1 only into BGP and not advertise routes learned by BGP:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 105.
  3. If you are finished configuring the policy injectpolicy1, commit the configuration.
  4. Go on to one of the following procedures:

Table 105: Creating a Policy to Inject OSPF Routes into BGP

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Term level in the configuration hierarchy.

In the J-Web configuration editor hierarchy, select Policy options>Policy statement>Term.

From the top of the CLI configuration hierarchy, enter

edit policy-options policy-statement injectpolicy1 term injectterm1

Specify the OSPF routes.

  1. In the From option, click Configure.
  2. In the Protocol box, click Add new entry.
  3. In the Value drop box, select OSPF.
  4. Click OK.

Specify the OSPF match condition:

set from ospf

Specify the routes from a particular OSPF area.

  1. In the Area option, type 1.
  2. Click OK.

Specify Area 1 as a match condition:

set from area 1

Specify that the route is to be accepted if the previous conditions are matched.

  1. Next to Then, click Configure.
  2. From the Accept reject box, Select Accept.

Specify the action to accept:

set then accept

Set the default option to reject other OSPF routes.

  1. In the configuration editor hierarchy, select Policy options>Policy statement>Term.
  2. In the Then option, click Configure.
  3. From the Accept reject box, Select Reject.
  4. Click OK.

Changes in the CLI are applied automatically when you execute the set command.

Navigate to the Protocol>Bgplevel in the configuration hierarchy.

In the J-Web configuration editor hierarchy, select Protocols>Bgp.

From the top of the CLI configuration hierarchy, enter:

edit protocols bgp

Apply the routing policy policy1 to BGP.

  1. In the Export box, click Add new entry.
  2. In the Value option, enter policy1.
  3. Click OK.

Specify the OSPF match condition:

set export policy1


[Contents] [Prev] [Next] [Index] [Report an Error]