<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Juniper%3A_BGP_Policy_Inject_OSPF_Routing</id>
	<title>Juniper: BGP Policy Inject OSPF Routing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Juniper%3A_BGP_Policy_Inject_OSPF_Routing"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Juniper:_BGP_Policy_Inject_OSPF_Routing&amp;action=history"/>
	<updated>2026-05-03T20:37:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Juniper:_BGP_Policy_Inject_OSPF_Routing&amp;diff=53372&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;Sumber: https://www.juniper.net/documentation/en_US/junos/topics/example/routing-policy-security-opspf-route-into-bpg-routing-table-injecting.html   This example shows how to...&quot;</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Juniper:_BGP_Policy_Inject_OSPF_Routing&amp;diff=53372&amp;oldid=prev"/>
		<updated>2018-12-22T07:39:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Sumber: https://www.juniper.net/documentation/en_US/junos/topics/example/routing-policy-security-opspf-route-into-bpg-routing-table-injecting.html   This example shows how to...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: https://www.juniper.net/documentation/en_US/junos/topics/example/routing-policy-security-opspf-route-into-bpg-routing-table-injecting.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example shows how to create a policy that injects OSPF routes into the BGP routing table.&lt;br /&gt;
Requirements&lt;br /&gt;
&lt;br /&gt;
Before you begin:&lt;br /&gt;
&lt;br /&gt;
    Configure network interfaces.&lt;br /&gt;
&lt;br /&gt;
    Configure external peer sessions. See Example: Configuring External BGP Point-to-Point Peer Sessions.&lt;br /&gt;
&lt;br /&gt;
    Configure interior gateway protocol (IGP) sessions between peers. &lt;br /&gt;
&lt;br /&gt;
Overview&lt;br /&gt;
&lt;br /&gt;
In this example, you create a routing policy called injectpolicy1 and a routing term called injectterm1. The policy injects OSPF routes into the BGP routing table.&lt;br /&gt;
Configuration&lt;br /&gt;
&lt;br /&gt;
    Configuring the Routing Policy&lt;br /&gt;
&lt;br /&gt;
    Configuring Tracing for the Routing Policy&lt;br /&gt;
&lt;br /&gt;
Configuring the Routing Policy&lt;br /&gt;
CLI Quick Configuration&lt;br /&gt;
&lt;br /&gt;
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.&lt;br /&gt;
content_copy zoom_out_map&lt;br /&gt;
set policy-options policy-statement injectpolicy1 term injectterm1 from protocol ospf&lt;br /&gt;
set policy-options policy-statement injectpolicy1 term injectterm1 from area 0.0.0.1&lt;br /&gt;
set policy-options policy-statement injectpolicy1 term injectterm1 then accept&lt;br /&gt;
set protocols bgp export injectpolicy1&lt;br /&gt;
Step-by-Step Procedure&lt;br /&gt;
&lt;br /&gt;
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.&lt;br /&gt;
&lt;br /&gt;
To inject OSPF routes into a BGP routing table:&lt;br /&gt;
&lt;br /&gt;
    Create the policy term.&lt;br /&gt;
    content_copy zoom_out_map&lt;br /&gt;
    [edit policy-options policy-statement injectpolicy1]&lt;br /&gt;
    user@host# set term injectterm1&lt;br /&gt;
&lt;br /&gt;
    Specify OSPF as a match condition.&lt;br /&gt;
    content_copy zoom_out_map&lt;br /&gt;
    [edit policy-options policy-statement injectpolicy1 term injectterm1]&lt;br /&gt;
    user@host# set from protocol ospf&lt;br /&gt;
&lt;br /&gt;
    Specify the routes from an OSPF area as a match condition.&lt;br /&gt;
    content_copy zoom_out_map&lt;br /&gt;
    [edit policy-options policy-statement injectpolicy1 term injectterm1]&lt;br /&gt;
    user@host# set from area 0.0.0.1&lt;br /&gt;
&lt;br /&gt;
    Specify that the route is to be accepted if the previous conditions are matched.&lt;br /&gt;
    content_copy zoom_out_map&lt;br /&gt;
    [edit policy-options policy-statement injectpolicy1 term injectterm1]&lt;br /&gt;
    user@host# set then accept&lt;br /&gt;
&lt;br /&gt;
    Apply the routing policy to BGP.&lt;br /&gt;
    content_copy zoom_out_map&lt;br /&gt;
    [edit]&lt;br /&gt;
    user@host# set protocols bgp export injectpolicy1&lt;br /&gt;
&lt;br /&gt;
Results&lt;br /&gt;
&lt;br /&gt;
Confirm your configuration by entering the show policy-options and show protocols bgp commands from configuration mode. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.&lt;br /&gt;
content_copy zoom_out_map&lt;br /&gt;
user@host# show policy-options&lt;br /&gt;
policy-statement injectpolicy1 {&lt;br /&gt;
term injectterm1 {&lt;br /&gt;
from {&lt;br /&gt;
protocol ospf;&lt;br /&gt;
area 0.0.0.1;&lt;br /&gt;
}&lt;br /&gt;
then accept;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
content_copy zoom_out_map&lt;br /&gt;
user@host# show protocols bgp&lt;br /&gt;
export injectpolicy1;&lt;br /&gt;
&lt;br /&gt;
If you are done configuring the device, enter commit from configuration mode.&lt;br /&gt;
Configuring Tracing for the Routing Policy&lt;br /&gt;
CLI Quick Configuration&lt;br /&gt;
&lt;br /&gt;
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.&lt;br /&gt;
content_copy zoom_out_map&lt;br /&gt;
set policy-options policy-statement injectpolicy1 term injectterm1 then trace&lt;br /&gt;
set routing-options traceoptions file ospf-bgp-policy-log&lt;br /&gt;
set routing-options traceoptions file size 5m&lt;br /&gt;
set routing-options traceoptions file files 5&lt;br /&gt;
set routing-options traceoptions flag policy&lt;br /&gt;
Step-by-Step Procedure&lt;br /&gt;
&lt;br /&gt;
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.&lt;br /&gt;
&lt;br /&gt;
    Include a trace action in the policy.&lt;br /&gt;
    content_copy zoom_out_map&lt;br /&gt;
    [edit policy-options policy-statement injectpolicy1 term injectterm1]&lt;br /&gt;
    user@host# then trace&lt;br /&gt;
&lt;br /&gt;
    Configure the tracing file for the output.&lt;br /&gt;
    content_copy zoom_out_map&lt;br /&gt;
    [edit routing-options traceoptions]&lt;br /&gt;
    user@host# set file ospf-bgp-policy-log&lt;br /&gt;
    user@host# set file size 5m&lt;br /&gt;
    user@host# set file files 5&lt;br /&gt;
    user@host# set flag policy&lt;br /&gt;
&lt;br /&gt;
Results&lt;br /&gt;
&lt;br /&gt;
Confirm your configuration by entering the show policy-options and show routing-options commands from configuration mode. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.&lt;br /&gt;
content_copy zoom_out_map&lt;br /&gt;
user@host# show policy-options&lt;br /&gt;
policy-statement injectpolicy1 {&lt;br /&gt;
term injectterm1 {&lt;br /&gt;
then {&lt;br /&gt;
trace;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
content_copy zoom_out_map&lt;br /&gt;
user@host# show routing-options&lt;br /&gt;
traceoptions {&lt;br /&gt;
file ospf-bgp-policy-log size 5m files 5;&lt;br /&gt;
flag policy;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you are done configuring the device, enter commit from configuration mode.&lt;br /&gt;
Verification&lt;br /&gt;
&lt;br /&gt;
Confirm that the configuration is working properly.&lt;br /&gt;
Verifying That the Expected BGP Routes Are Present&lt;br /&gt;
Purpose&lt;br /&gt;
&lt;br /&gt;
Verify the effect of the export policy.&lt;br /&gt;
Action&lt;br /&gt;
&lt;br /&gt;
From operational mode, enter the show route command.&lt;br /&gt;
Troubleshooting&lt;br /&gt;
&lt;br /&gt;
    Using the show log Command to Examine the Actions of the Routing Policy&lt;br /&gt;
&lt;br /&gt;
Using the show log Command to Examine the Actions of the Routing Policy&lt;br /&gt;
Problem&lt;br /&gt;
&lt;br /&gt;
The routing table contains unexpected routes, or routes are missing from the routing table.&lt;br /&gt;
&lt;br /&gt;
Solution&lt;br /&gt;
&lt;br /&gt;
If you configure policy tracing as shown in this example, you can run the show log ospf-bgp-policy-log command to diagnose problems with the routing policy. The show log ospf-bgp-policy-log command displays information about the routes that the injectpolicy1 policy term analyzes and acts upon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://www.juniper.net/documentation/en_US/junos/topics/example/routing-policy-security-opspf-route-into-bpg-routing-table-injecting.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pranala Menarik==&lt;br /&gt;
&lt;br /&gt;
* [[Cisco]]&lt;br /&gt;
* [[Juniper]]&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>