<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Juniper &#8211; StubArea51.net</title>
	<atom:link href="https://stubarea51.net/category/juniper/feed/" rel="self" type="application/rss+xml" />
	<link>https://stubarea51.net</link>
	<description>Whitebox Network Engineering , News and Reviews</description>
	<lastBuildDate>Tue, 14 Nov 2023 08:29:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.13</generator>
<site xmlns="com-wordpress:feed-additions:1">95485312</site>	<item>
		<title>Juniper to Mikrotik &#8211; MPLS Commands</title>
		<link>https://stubarea51.net/2021/02/06/juniper-to-mikrotik-mpls-commands/</link>
					<comments>https://stubarea51.net/2021/02/06/juniper-to-mikrotik-mpls-commands/#respond</comments>
		
		<dc:creator><![CDATA[Kevin Myers]]></dc:creator>
		<pubDate>Sat, 06 Feb 2021 14:40:53 +0000</pubDate>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[MikroTIk]]></category>
		<category><![CDATA[MPLS]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MikroTik]]></category>
		<category><![CDATA[mpls]]></category>
		<guid isPermaLink="false">https://stubarea51.net/?p=2318</guid>

					<description><![CDATA[About the Juniper to MikroTik series In the world of network engineering, learning a new syntax for a NOS can be daunting if you need a specific config quickly.&#160; Juniper is a popular option for service providers/data centers and is widely deployed across the world.&#160; This is a continuation of the Rosetta stone for network [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2>About the Juniper to MikroTik series</h2>



<p>In the world of network engineering, learning a new syntax for a NOS can be daunting if you need a specific config quickly.&nbsp; Juniper is a popular option for service providers/data centers and is widely deployed across the world.&nbsp;</p>



<p>This is a continuation of the Rosetta stone for network operating systems series.&nbsp;&nbsp;In this article we will be covering multi-protocol label switching (MPLS) using label distribution protocol (LDP).  We are sticking with LDP as MikroTik does not have wide support for RSVP-TE. </p>



<p>You can find the first two articles of the series here:</p>



<p><a href="https://stubarea51.net/2021/01/24/juniper-to-mikrotik-bgp-commands/">Juniper to MikroTik &#8211; BGP commands</a></p>



<p><a href="https://stubarea51.net/2021/01/31/juniper-to-mikrotik-ospf-commands/">Juniper to MikroTik &#8211; OSPF commands</a>  </p>



<p>While many commands have almost the exact same information, others are as close as possible.&nbsp; Since there isn’t always an exact match, sometimes you may have to run two or three commands to get the information needed.&nbsp;</p>



<h2>Using EVE-NG for testing</h2>



<p>We conducted utilized EVE-NG for all of the testing with the topology seen below.</p>



<figure class="wp-block-image size-large"><img width="1024" height="484" src="https://stubarea51.net/wp-content/uploads/2021/01/image-54-1024x484.png" alt="" class="wp-image-2321" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-54-1024x484.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-54-300x142.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-54-768x363.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-54-1536x726.png 1536w, https://stubarea51.net/wp-content/uploads/2021/01/image-54-2048x968.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>




<table id="tablepress-11" class="tablepress tablepress-id-11">
<thead>
<tr class="row-1 odd">
	<th class="column-1">Juniper Command</th><th class="column-2">MikroTik Command</th>
</tr>
</thead>
<tbody class="row-hover">
<tr class="row-2 even">
	<td class="column-1">show ldp neighbor</td><td class="column-2">mpls ldp neighbor print</td>
</tr>
<tr class="row-3 odd">
	<td class="column-1">show ldp interface</td><td class="column-2">mpls ldp interface print</td>
</tr>
<tr class="row-4 even">
	<td class="column-1">show route forwarding-table family mpls</td><td class="column-2">mpls forwarding-table print</td>
</tr>
<tr class="row-5 odd">
	<td class="column-1">show ldp database</td><td class="column-2">mpls remote-bindings print</td>
</tr>
<tr class="row-6 even">
	<td class="column-1">show ldp database</td><td class="column-2">mpls local-bindings print</td>
</tr>
<tr class="row-7 odd">
	<td class="column-1">show mpls label usage</td><td class="column-2">mpls print</td>
</tr>
<tr class="row-8 even">
	<td class="column-1">set interfaces ge-0/0/0 unit 0 family mpls<br />
set protocols ldp interface ge-0/0/0.0</td><td class="column-2">/mpls ldp interface<br />
add interface=ether1</td>
</tr>
<tr class="row-9 odd">
	<td class="column-1">set routing-options router-id 10.1.1.1</td><td class="column-2">/mpls ldp<br />
set enabled=yes lsr-id=10.1.1.3</td>
</tr>
</tbody>
</table>




<hr class="wp-block-separator"/>



<h2 class="has-text-align-center">Examples of the commands above</h2>



<hr class="wp-block-separator"/>



<p>This first command will show you some basic information about your MPLS LDP neighbors.  On juniper you can add the keyword detail to the end for additional information on the neighbors.  </p>



<p><strong>[admin@MikroTik-R3] &gt; mpls ldp neighbor print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="191" src="https://stubarea51.net/wp-content/uploads/2021/01/image-64-1024x191.png" alt="" class="wp-image-2336" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-64-1024x191.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-64-300x56.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-64-768x143.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-64.png 1116w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>root@JUNOS-R2&gt; show ldp neighbor</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="134" src="https://stubarea51.net/wp-content/uploads/2021/01/image-63-1024x134.png" alt="" class="wp-image-2335" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-63-1024x134.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-63-300x39.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-63-768x101.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-63.png 1158w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator"/>



<p>This command will list all of the interfaces that are currently enabled for LDP.  </p>



<p><strong>[admin@MikroTik-R3] &gt; mpls ldp interface print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="169" src="https://stubarea51.net/wp-content/uploads/2021/01/image-65-1024x169.png" alt="" class="wp-image-2337" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-65-1024x169.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-65-300x49.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-65-768x127.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-65.png 1068w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>root@JUNOS-R2&gt; show ldp interface</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="168" src="https://stubarea51.net/wp-content/uploads/2021/01/image-62-1024x168.png" alt="" class="wp-image-2334" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-62-1024x168.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-62-300x49.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-62-768x126.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-62.png 1170w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator"/>



<p>Use this command to display the MPLS forwarding table which shows what labels are assigned, the interface used and the next-hop.  It will also tell you the action taken such as pop, swap, or push.  </p>



<p><strong>[admin@MikroTik-R3] &gt; mpls forwarding-table print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="247" src="https://stubarea51.net/wp-content/uploads/2021/01/image-61-1024x247.png" alt="" class="wp-image-2333" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-61-1024x247.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-61-300x72.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-61-768x185.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-61-1140x276.png 1140w, https://stubarea51.net/wp-content/uploads/2021/01/image-61.png 1144w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>root@JUNOS-R2&gt; show route forwarding-table family mpls</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="495" src="https://stubarea51.net/wp-content/uploads/2021/01/image-60-1024x495.png" alt="" class="wp-image-2332" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-60-1024x495.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-60-300x145.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-60-768x371.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-60.png 1166w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator"/>



<p>The next two commands will be combined since juniper only has one command to be equivalent to mikrotiks output.  This is will show the advertised and received labels for all of the prefixes known to LDP as well as the label associated with it and where it was learned from.  On JunOS you will notice label 3.  This is juiper&#8217;s method to signal implicit null and request label popping by the downstream router.  </p>



<p><strong>[admin@MikroTik-R3] &gt; mpls remote-bindings print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="908" height="520" src="https://stubarea51.net/wp-content/uploads/2021/01/image-59.png" alt="" class="wp-image-2331" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-59.png 908w, https://stubarea51.net/wp-content/uploads/2021/01/image-59-300x172.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-59-768x440.png 768w" sizes="(max-width: 908px) 100vw, 908px" /></figure>



<p><strong>[admin@MikroTik-R3] &gt; mpls local-bindings print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="916" height="616" src="https://stubarea51.net/wp-content/uploads/2021/01/image-58.png" alt="" class="wp-image-2330" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-58.png 916w, https://stubarea51.net/wp-content/uploads/2021/01/image-58-300x202.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-58-768x516.png 768w" sizes="(max-width: 916px) 100vw, 916px" /></figure>



<p><strong>root@JUNOS-R2&gt; show ldp database</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="596" height="1024" src="https://stubarea51.net/wp-content/uploads/2021/01/image-57-596x1024.png" alt="" class="wp-image-2328" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-57-596x1024.png 596w, https://stubarea51.net/wp-content/uploads/2021/01/image-57-175x300.png 175w, https://stubarea51.net/wp-content/uploads/2021/01/image-57.png 764w" sizes="(max-width: 596px) 100vw, 596px" /></figure>



<hr class="wp-block-separator"/>



<p>This last command will show the label ranges and what they are used for.  </p>



<p><strong>[admin@MikroTik-R3] &gt; mpls print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="512" height="114" src="https://stubarea51.net/wp-content/uploads/2021/01/image-56.png" alt="" class="wp-image-2327" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-56.png 512w, https://stubarea51.net/wp-content/uploads/2021/01/image-56-300x67.png 300w" sizes="(max-width: 512px) 100vw, 512px" /></figure>



<p><strong>root@JUNOS-R2&gt; show mpls label usage</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="143" src="https://stubarea51.net/wp-content/uploads/2021/01/image-55-1024x143.png" alt="" class="wp-image-2326" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-55-1024x143.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-55-300x42.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-55-768x108.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-55.png 1514w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2>Configurations</h2>



<pre class="wp-block-code"><code>root@JUNOS-R1# show | display set
set version 18.2R1.9
set system root-authentication encrypted-password "$6$iCt/DOMc$lQFrIQdrjot1m0lIY5A2eUaOmat87oAqbNZWd/3KPij2QWTlBQEyYlVbb1/emd2N9VKN6NL0olk.kJK7mLcgM0"
set system host-name JUNOS-R1
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system processes dhcp-service traceoptions file dhcp_logfile
set system processes dhcp-service traceoptions file size 10m
set system processes dhcp-service traceoptions level all
set system processes dhcp-service traceoptions flag packet
set interfaces ge-0/0/0 unit 0 family inet address 203.0.113.1/29
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces fxp0 unit 0 family inet dhcp vendor-id Juniper-vmx-VM6015C6C2F2
set interfaces lo0 unit 0 family inet address 10.1.1.1/32
set routing-options router-id 10.1.1.1
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/0.0</code></pre>



<pre class="wp-block-code"><code>root@JUNOS-R2# show | display set
set version 18.2R1.9
set system root-authentication encrypted-password "$6$x.MmgodX$XG1D3lCYPC8VpIhE8NXxdRJaoZS8sYB2PB0v50POrrx6Mi.nhnTB/41NGFk1zL8RDQBdR/lCPG2NazFDYgzNf/"
set system host-name JUNOS-R2
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system processes dhcp-service traceoptions file dhcp_logfile
set system processes dhcp-service traceoptions file size 10m
set system processes dhcp-service traceoptions level all
set system processes dhcp-service traceoptions flag packet
set interfaces ge-0/0/0 unit 0 family inet address 203.0.113.2/29
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family inet address 203.0.113.9/29
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces fxp0 unit 0 family inet dhcp vendor-id Juniper-vmx-VM6015C6C3B3
set interfaces lo0 unit 0 family inet address 10.1.1.2/32
set routing-options router-id 10.1.1.2
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface ge-0/0/1.0</code></pre>



<pre class="wp-block-code"><code>&#091;admin@MikroTik-R3] &gt; export
# jan/31/2021 20:52:19 by RouterOS 6.46.8
# software id =
#
#
#
/interface bridge
add name=Loopback0
/interface wireless security-profiles
set &#091; find default=yes ] supplicant-identity=MikroTik
/ip address
add address=203.0.113.10/29 interface=ether1 network=203.0.113.8
add address=10.1.1.3 interface=Loopback0 network=10.1.1.3
add address=203.0.113.17/29 interface=ether2 network=203.0.113.16
/ip dhcp-client
add disabled=no interface=ether2
add disabled=no interface=ether1
/mpls ldp
set enabled=yes lsr-id=10.1.1.3
/mpls ldp interface
add interface=ether1
add interface=ether2
/routing ospf network
add area=backbone network=203.0.113.8/29
add area=backbone network=10.1.1.3/32
add area=backbone network=203.0.113.16/29
/system identity
set name=MikroTik-R3</code></pre>



<pre class="wp-block-code"><code>&#091;admin@MikroTik-R4] &gt; export
# jan/31/2021 21:06:10 by RouterOS 6.46.8
# software id =
#
#
#
/interface bridge
add name=Loopback0
/interface wireless security-profiles
set &#091; find default=yes ] supplicant-identity=MikroTik
/ip address
add address=203.0.113.18/29 interface=ether1 network=203.0.113.16
add address=10.1.1.4 interface=Loopback0 network=10.1.1.4
/ip dhcp-client
add disabled=no interface=ether2
add disabled=no interface=ether1
/mpls ldp
set enabled=yes lsr-id=10.1.1.4
/mpls ldp interface
add interface=ether1
/routing ospf network
add area=backbone network=203.0.113.16/29
add area=backbone network=10.1.1.4/32
/system identity
set name=MikroTik-R4</code></pre>



<p>Thanks for joining us for this series and check back soon for more posts.   </p>
]]></content:encoded>
					
					<wfw:commentRss>https://stubarea51.net/2021/02/06/juniper-to-mikrotik-mpls-commands/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2318</post-id>	</item>
		<item>
		<title>Juniper To MikroTik &#8211; OSPF Commands</title>
		<link>https://stubarea51.net/2021/01/31/juniper-to-mikrotik-ospf-commands/</link>
					<comments>https://stubarea51.net/2021/01/31/juniper-to-mikrotik-ospf-commands/#comments</comments>
		
		<dc:creator><![CDATA[Kevin Myers]]></dc:creator>
		<pubDate>Mon, 01 Feb 2021 05:50:33 +0000</pubDate>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[MikroTIk]]></category>
		<category><![CDATA[OSPF]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MikroTik]]></category>
		<guid isPermaLink="false">https://stubarea51.net/?p=2276</guid>

					<description><![CDATA[About the Juniper to MikroTik Series In the world of network engineering, learning a new syntax for a NOS can be daunting if you need a specific config quickly.&#160; Juniper is a popular option for service providers/data centers and is widely deployed across the world.&#160; This is a continuation of the Rosetta stone for network [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h4>About the Juniper to MikroTik Series</h4>



<p>In the world of network engineering, learning a new syntax for a NOS can be daunting if you need a specific config quickly.&nbsp; Juniper is a popular option for service providers/data centers and is widely deployed across the world.&nbsp;</p>



<p>This is a continuation of the Rosetta stone for network operating systems series.&nbsp; In this portion of the series we will be covering Open Shortest Path First, OSPF, version 2 which is a popular interior gateway protocol (IGP).   </p>



<p>You can find the first article of the series Juniper to Mikrotik &#8211; BGP Commands <a href="https://stubarea51.net/2021/01/24/juniper-to-mikrotik-bgp-commands/">here</a>.</p>



<p>While many commands have almost the exact same information, others are as close as possible.&nbsp; Since there isn’t always an exact match, sometimes you may have to run two or three commands to get the information needed.&nbsp;</p>



<h4>Using EVE-NG for testing</h4>



<p>We conducted all testing on EVE-NG utilizing the topology seen below.  </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="378" src="https://stubarea51.net/wp-content/uploads/2021/01/image-44-1024x378.png" alt="" class="wp-image-2298" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-44-1024x378.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-44-300x111.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-44-768x284.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-44-1536x567.png 1536w, https://stubarea51.net/wp-content/uploads/2021/01/image-44.png 1630w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>




<table id="tablepress-10" class="tablepress tablepress-id-10">
<thead>
<tr class="row-1 odd">
	<th class="column-1">JunOS Command</th><th class="column-2">MikroTik Command</th>
</tr>
</thead>
<tbody class="row-hover">
<tr class="row-2 even">
	<td class="column-1">show ospf neighbor</td><td class="column-2">routing ospf neighbor print</td>
</tr>
<tr class="row-3 odd">
	<td class="column-1">show ospf interface</td><td class="column-2">routing ospf interface print</td>
</tr>
<tr class="row-4 even">
	<td class="column-1">show ospf overview brief</td><td class="column-2">routing ospf instance print detail</td>
</tr>
<tr class="row-5 odd">
	<td class="column-1">show ospf database</td><td class="column-2">routing ospf lsa print</td>
</tr>
<tr class="row-6 even">
	<td class="column-1">show route protocol ospf</td><td class="column-2">ip route print where ospf=yes</td>
</tr>
<tr class="row-7 odd">
	<td class="column-1">show ospf route abr</td><td class="column-2">routing ospf area-border-router print</td>
</tr>
<tr class="row-8 even">
	<td class="column-1">show ospf route asbr</td><td class="column-2">routing ospf as-border-router print</td>
</tr>
<tr class="row-9 odd">
	<td class="column-1">edit protocols ospf</td><td class="column-2">/routing ospf instance</td>
</tr>
<tr class="row-10 even">
	<td class="column-1">set routing-options router-id 203.0.113.1</td><td class="column-2">/routing ospf instance set 0 router-id=203.0.113.2</td>
</tr>
<tr class="row-11 odd">
	<td class="column-1">set protocols ospf area 0.0.0.0 interface lo0.0</td><td class="column-2">/routing ospf network add area=backbone network=203.0.113.2/32</td>
</tr>
<tr class="row-12 even">
	<td class="column-1">set protocols ospf area 0.0.0.0 interface ge-0/0/0.0</td><td class="column-2">	/routing ospf network<br />
add area=backbone network=203.0.113.128/29</td>
</tr>
<tr class="row-13 odd">
	<td class="column-1">set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p<br />
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 hello-interval 1<br />
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 dead-interval 4</td><td class="column-2">/routing ospf interface add dead-interval=4s hello-interval=1s interface=ether1 network-type=point-to-point</td>
</tr>
</tbody>
</table>
<!-- #tablepress-10 from cache -->



<hr class="wp-block-separator"/>



<h4 class="has-text-align-center">Examples of the commands above</h4>



<hr class="wp-block-separator"/>



<p>This first command will show you all of the routers you have an OSPF neighbor adjacency with. </p>



<p><strong>[admin@MIKROTIK-OSPF] &gt; routing ospf neighbor print</strong></p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" src="https://stubarea51.net/wp-content/uploads/2021/01/image-32-1024x91.png" alt="" class="wp-image-2286" width="880" height="78" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-32-1024x91.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-32-300x27.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-32-768x69.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-32-1536x137.png 1536w, https://stubarea51.net/wp-content/uploads/2021/01/image-32.png 1590w" sizes="(max-width: 880px) 100vw, 880px" /></figure>



<p><strong>root@JUNOS-OSPF&gt; show ospf neighbor</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="108" src="https://stubarea51.net/wp-content/uploads/2021/01/image-34-1024x108.png" alt="" class="wp-image-2288" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-34-1024x108.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-34-300x32.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-34-768x81.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-34.png 1098w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>This next command lists all of the interface enabled for OSPF as well as some basic information such as cost, priority, and network type.  Juniper displays slightly different information such as area, DR info, and number of neighbors.  Juniper does not have the concept of a network statement so interfaces explicitly configured for OSPF will appear here.  You can optionally add the detail command on JunOS for more information.  </p>



<p><strong>[admin@MIKROTIK-OSPF] &gt; routing ospf interface print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="291" src="https://stubarea51.net/wp-content/uploads/2021/01/image-51-1024x291.png" alt="" class="wp-image-2309" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-51-1024x291.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-51-300x85.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-51-768x219.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-51.png 1216w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>root@JUNOS-OSPF&gt; show ospf interface</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="128" src="https://stubarea51.net/wp-content/uploads/2021/01/image-37-1024x128.png" alt="" class="wp-image-2291" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-37-1024x128.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-37-300x37.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-37-768x96.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-37-1140x144.png 1140w, https://stubarea51.net/wp-content/uploads/2021/01/image-37.png 1154w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>This command will list all of the details regarding the OSPF instances running on the router.  </p>



<p><strong>[admin@MIKROTIK-OSPF] &gt; routing ospf instance print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="188" src="https://stubarea51.net/wp-content/uploads/2021/01/image-53-1024x188.png" alt="" class="wp-image-2312" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-53-1024x188.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-53-300x55.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-53-768x141.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-53.png 1284w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>root@JUNOS-OSPF&gt; show ospf overview brief</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="972" height="730" src="https://stubarea51.net/wp-content/uploads/2021/01/image-39.png" alt="" class="wp-image-2293" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-39.png 972w, https://stubarea51.net/wp-content/uploads/2021/01/image-39-300x225.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-39-768x577.png 768w" sizes="(max-width: 972px) 100vw, 972px" /></figure>



<p>This command lists all of the OSPF LSAs as well as some details about them. </p>



<p><strong>[admin@MIKROTIK-OSPF] &gt; routing ospf lsa print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="498" src="https://stubarea51.net/wp-content/uploads/2021/01/image-50-1024x498.png" alt="" class="wp-image-2308" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-50-1024x498.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-50-300x146.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-50-768x373.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-50.png 1214w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>root@JUNOS-OSPF&gt; show ospf database</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="234" src="https://stubarea51.net/wp-content/uploads/2021/01/image-41-1024x234.png" alt="" class="wp-image-2295" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-41-1024x234.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-41-300x69.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-41-768x176.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-41.png 1102w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>This next command will show all of the OSPF routes in the routing table.</p>



<p><strong>[admin@MIKROTIK-OSPF] &gt; ip route print where ospf=yes</strong></p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" src="https://stubarea51.net/wp-content/uploads/2021/01/image-43-1024x119.png" alt="" class="wp-image-2297" width="826" height="95" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-43-1024x119.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-43-300x35.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-43-768x89.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-43.png 1512w" sizes="(max-width: 826px) 100vw, 826px" /></figure>



<p><strong>root@JUNOS-OSPF&gt; show route protocol ospf</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="944" height="388" src="https://stubarea51.net/wp-content/uploads/2021/01/image-42.png" alt="" class="wp-image-2296" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-42.png 944w, https://stubarea51.net/wp-content/uploads/2021/01/image-42-300x123.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-42-768x316.png 768w" sizes="(max-width: 944px) 100vw, 944px" /></figure>



<p>This next set of commands will show you the area-border-routers or autonomous-system-boundary routers.  We injected a connected route into OSPF to generate a type-5 LSA for an external route.  </p>



<p><strong>[admin@MIKROTIK-OSPF] &gt; routing ospf area-border-router print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="309" src="https://stubarea51.net/wp-content/uploads/2021/01/image-52-1024x309.png" alt="" class="wp-image-2311" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-52-1024x309.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-52-300x91.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-52-768x232.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-52.png 1112w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>[admin@MIKROTIK-OSPF] &gt; routing ospf as-border-router print</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="868" height="150" src="https://stubarea51.net/wp-content/uploads/2021/01/image-46.png" alt="" class="wp-image-2300" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-46.png 868w, https://stubarea51.net/wp-content/uploads/2021/01/image-46-300x52.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-46-768x133.png 768w" sizes="(max-width: 868px) 100vw, 868px" /></figure>



<p><strong>root@JUNOS-OSPF&gt; show ospf route abr</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="197" src="https://stubarea51.net/wp-content/uploads/2021/01/image-47-1024x197.png" alt="" class="wp-image-2301" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-47-1024x197.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-47-300x58.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-47-768x148.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-47.png 1134w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>root@JUNOS-OSPF&gt; show ospf route asbr</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="195" src="https://stubarea51.net/wp-content/uploads/2021/01/image-48-1024x195.png" alt="" class="wp-image-2302" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-48-1024x195.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-48-300x57.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-48-768x147.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-48.png 1132w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Mikrotik OSPF configuration</p>



<pre class="wp-block-code"><code>/interface bridge
add name=Loopback0
add name=Loopback1
add name=Loopback2
/interface wireless security-profiles
set &#091; find default=yes ] supplicant-identity=MikroTik
/routing ospf area
add area-id=0.0.0.51 name=Area51
/routing ospf instance
set &#091; find default=yes ] redistribute-connected=as-type-1 router-id=203.0.113.2
/ip address
add address=203.0.113.2 interface=Loopback0 network=203.0.113.2
add address=203.0.113.3 interface=Loopback1 network=203.0.113.3
add address=203.0.113.4 interface=Loopback2 network=203.0.113.4
add address=203.0.113.130/29 interface=ether1 network=203.0.113.128
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
/routing ospf interface
add dead-interval=4s hello-interval=1s interface=ether1 network-type=point-to-point
/routing ospf network
add area=backbone network=203.0.113.2/32
add area=backbone network=203.0.113.128/29
add area=Area51 network=203.0.113.3/32
/system identity
set name=MIKROTIK-OSPF</code></pre>



<p>Juniper OSPF configuration</p>



<pre class="wp-block-code"><code>set interfaces ge-0/0/0 unit 0 family inet address 203.0.113.129/29
set interfaces lo0 unit 0 family inet address 203.0.113.1/32
set routing-options router-id 203.0.113.1
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 hello-interval 1
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 dead-interval 4
set protocols ospf area 0.0.0.0 interface lo0.0 passive</code></pre>



<h4>More Juniper to MikroTik articles are on the way!</h4>



<p>This article covered some of basic and common OSPF commands.  Check back in the future for examples of more advanced features and capabilities.  Also stay tuned for our upcoming Juniper to MikroTik MPLS command translation. </p>
]]></content:encoded>
					
					<wfw:commentRss>https://stubarea51.net/2021/01/31/juniper-to-mikrotik-ospf-commands/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2276</post-id>	</item>
		<item>
		<title>Juniper to MikroTik &#8211; BGP commands</title>
		<link>https://stubarea51.net/2021/01/24/juniper-to-mikrotik-bgp-commands/</link>
					<comments>https://stubarea51.net/2021/01/24/juniper-to-mikrotik-bgp-commands/#respond</comments>
		
		<dc:creator><![CDATA[Kevin Myers]]></dc:creator>
		<pubDate>Sun, 24 Jan 2021 18:07:00 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<category><![CDATA[Juniper]]></category>
		<category><![CDATA[MikroTIk]]></category>
		<category><![CDATA[MikroTik]]></category>
		<guid isPermaLink="false">https://stubarea51.net/?p=2208</guid>

					<description><![CDATA[About the Juniper to MikroTik series In the world of network engineering, learning a new syntax for a NOS can be daunting if you need a specific config quickly.&#160; Juniper is a popular option for service providers/data centers and is widely deployed across the world.&#160; This is a continuation of the Rosetta stone for network [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h4>About the Juniper to MikroTik series</h4>



<p>In the world of network engineering, learning a new syntax for a NOS can be daunting if you need a specific config quickly.&nbsp; Juniper is a popular option for service providers/data centers and is widely deployed across the world.&nbsp;</p>



<p>This is a continuation of the Rosetta stone for network operating systems series.&nbsp; We’ll be working through several protocols over series of posts to help you quickly move between different environments.&nbsp;</p>



<p>While many commands have almost the exact same information, others are as close as possible.&nbsp; Since there isn’t always an exact match, sometimes you may have to run two or three commands to get the information needed.&nbsp;<br><br></p>



<p></p>



<h4>Using EVE-NG for testing</h4>



<p>We conducted all of this testing utilizing EVE-NG and the topology seen below.&nbsp;</p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-18.png"><img loading="lazy" width="970" height="564" src="https://stubarea51.net/wp-content/uploads/2021/01/image-18.png" alt="" class="wp-image-2238" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-18.png 970w, https://stubarea51.net/wp-content/uploads/2021/01/image-18-300x174.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-18-768x447.png 768w" sizes="(max-width: 970px) 100vw, 970px" /></a></figure>



<p></p>



<p>
<table id="tablepress-9" class="tablepress tablepress-id-9">
<thead>
<tr class="row-1 odd">
	<th class="column-1">Juniper Command</th><th class="column-2">MikroTik Command</th>
</tr>
</thead>
<tbody class="row-hover">
<tr class="row-2 even">
	<td class="column-1">show bgp summary</td><td class="column-2">routing bgp peer print brief</td>
</tr>
<tr class="row-3 odd">
	<td class="column-1">show bgp neighbor</td><td class="column-2">routing bgp peer print status</td>
</tr>
<tr class="row-4 even">
	<td class="column-1">show route advertising-protocol bgp 172.31.254.2</td><td class="column-2">routing bgp advertisements print peer=peer_name</td>
</tr>
<tr class="row-5 odd">
	<td class="column-1">show route receive-protocol bgp 172.31.254.2</td><td class="column-2">ip route print where received-from=peer_name</td>
</tr>
<tr class="row-6 even">
	<td class="column-1">show route protocol bgp</td><td class="column-2">ip route print where bgp=yes</td>
</tr>
<tr class="row-7 odd">
	<td class="column-1">clear bgp neighbor 172.31.254.2 soft-inbound</td><td class="column-2">routing bgp peer refresh peer_name</td>
</tr>
<tr class="row-8 even">
	<td class="column-1">clear bgp neighbor 172.31.254.2 soft</td><td class="column-2">routing bgp peer resend peer_name</td>
</tr>
<tr class="row-9 odd">
	<td class="column-1">set routing-options autonomous-system 1</td><td class="column-2">/routing bgp instance<br />
set default as=2<br />
</td>
</tr>
<tr class="row-10 even">
	<td class="column-1">set protocols bgp group EBGP type external<br />
set protocols bgp group EBGP peer-as 2<br />
set protocols bgp group EBGP neighbor 172.31.254.2<br />
</td><td class="column-2">/routing bgp peer<br />
add name=PEER-1 remote-address=172.31.254.1 remote-as=1<br />
</td>
</tr>
<tr class="row-11 odd">
	<td class="column-1">set policy-options policy-statement REDIS-CONNECTED term 1 from protocol direct<br />
set policy-options policy-statement REDIS-CONNECTED term 1 then accept<br />
set protocols bgp group EBGP export REDIS-CONNECTED<br />
</td><td class="column-2">/routing bgp network<br />
add network=100.89.88.0/24<br />
add network=100.89.87.0/24<br />
add network=100.89.86.0/24<br />
</td>
</tr>
<tr class="row-12 even">
	<td class="column-1">set routing-options static route 0.0.0.0/0 discard<br />
set protocols bgp group EBGP export SEND-DEFAULT<br />
set policy-options policy-statement SEND-DEFAULT term 1 from protocol static<br />
set policy-options policy-statement SEND-DEFAULT term 1 from route-filter 0.0.0.0/0 exact<br />
set policy-options policy-statement SEND-DEFAULT term 1 then accept<br />
</td><td class="column-2">/routing bgp peer<br />
add default-originate-always name=PEER-1 remote-address=172.31.254.1 remote-as=1<br />
</td>
</tr>
</tbody>
</table>
<!-- #tablepress-9 from cache --><br><br></p>



<hr class="wp-block-separator"/>



<h4 class="has-text-align-center">Examples of the commands above</h4>



<hr class="wp-block-separator"/>



<p>This is a quick way to get a list of the peers/ASN and their status</p>



<p><strong>[admin@MIKROTIK-BGP] &gt; routing bgp peer print brief</strong></p>



<figure class="wp-block-image size-large is-resized"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-19.png"><img loading="lazy" src="https://stubarea51.net/wp-content/uploads/2021/01/image-19.png" alt="" class="wp-image-2240" width="436" height="85" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-19.png 890w, https://stubarea51.net/wp-content/uploads/2021/01/image-19-300x59.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-19-768x150.png 768w" sizes="(max-width: 436px) 100vw, 436px" /></a></figure>



<p><strong>root@JUNOS-BGP&gt; show bgp summary</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-30.png"><img loading="lazy" width="1024" height="151" src="https://stubarea51.net/wp-content/uploads/2021/01/image-30-1024x151.png" alt="" class="wp-image-2255" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-30-1024x151.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-30-300x44.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-30-768x113.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-30-1536x227.png 1536w, https://stubarea51.net/wp-content/uploads/2021/01/image-30.png 1694w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>This next command will show you more information about a peer.&nbsp; In this case we did not specify the peer as there is only one.&nbsp; On a peering router with multiple peers it is recommended to look only at specific peer information to not be overwhelmed with irrelevant information.&nbsp;</p>



<p><strong>[admin@MIKROTIK-BGP] &gt; routing bgp peer print status</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-20.png"><img loading="lazy" width="1024" height="143" src="https://stubarea51.net/wp-content/uploads/2021/01/image-20-1024x143.png" alt="" class="wp-image-2242" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-20-1024x143.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-20-300x42.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-20-768x107.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-20-1536x215.png 1536w, https://stubarea51.net/wp-content/uploads/2021/01/image-20.png 1788w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><strong>root@JUNOS-BGP&gt; show bgp neighbor</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-29.png"><img loading="lazy" width="915" height="1024" src="https://stubarea51.net/wp-content/uploads/2021/01/image-29-915x1024.png" alt="" class="wp-image-2254" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-29-915x1024.png 915w, https://stubarea51.net/wp-content/uploads/2021/01/image-29-268x300.png 268w, https://stubarea51.net/wp-content/uploads/2021/01/image-29-768x860.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-29.png 1170w" sizes="(max-width: 915px) 100vw, 915px" /></a></figure>



<p>The next command allows you to see the prefixes that are sent to your peer as well as the next-hop associated with it.&nbsp;</p>



<p><strong>[admin@MIKROTIK-BGP] &gt; routing bgp advertisements print peer=PEER-1</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-21.png"><img loading="lazy" width="1024" height="95" src="https://stubarea51.net/wp-content/uploads/2021/01/image-21-1024x95.png" alt="" class="wp-image-2243" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-21-1024x95.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-21-300x28.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-21-768x71.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-21-1536x142.png 1536w, https://stubarea51.net/wp-content/uploads/2021/01/image-21.png 1854w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><strong>root@JUNOS-BGP&gt; show route advertising-protocol bgp 172.31.254.2</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-28.png"><img loading="lazy" width="1024" height="324" src="https://stubarea51.net/wp-content/uploads/2021/01/image-28-1024x324.png" alt="" class="wp-image-2253" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-28-1024x324.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-28-300x95.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-28-768x243.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-28.png 1054w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>This next one will show you what routes were received from the peer and the next-hop you will advertise.&nbsp;</p>



<p><strong>[admin@MIKROTIK-BGP] &gt; ip route print where received-from=PEER-1</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-22.png"><img loading="lazy" width="1024" height="209" src="https://stubarea51.net/wp-content/uploads/2021/01/image-22-1024x209.png" alt="" class="wp-image-2244" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-22-1024x209.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-22-300x61.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-22-768x157.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-22-1536x314.png 1536w, https://stubarea51.net/wp-content/uploads/2021/01/image-22.png 1538w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><strong>root@JUNOS-BGP&gt; show route receive-protocol bgp 172.31.254.2</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-27.png"><img loading="lazy" width="1024" height="283" src="https://stubarea51.net/wp-content/uploads/2021/01/image-27-1024x283.png" alt="" class="wp-image-2252" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-27-1024x283.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-27-300x83.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-27-768x212.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-27.png 1058w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Here we will see the BGP prefixes that are in the routing table – both active and not.&nbsp; On junOS you will see the count for hidden routes in the output but you will not see the hidden entries.&nbsp; This will require the use of “show route protocol bgp hidden” to see the hidden entries.&nbsp; On mikrotik you will see this type of route in the route table as inactive.&nbsp;</p>



<p><strong>[admin@MIKROTIK-BGP] &gt; ip route print where bgp=yes</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-23.png"><img loading="lazy" width="1024" height="212" src="https://stubarea51.net/wp-content/uploads/2021/01/image-23-1024x212.png" alt="" class="wp-image-2245" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-23-1024x212.png 1024w, https://stubarea51.net/wp-content/uploads/2021/01/image-23-300x62.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-23-768x159.png 768w, https://stubarea51.net/wp-content/uploads/2021/01/image-23.png 1526w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><strong>root@JUNOS-BGP&gt; show route protocol bgp</strong></p>



<figure class="wp-block-image size-large"><a href="https://stubarea51.net/wp-content/uploads/2021/01/image-26.png"><img loading="lazy" width="994" height="588" src="https://stubarea51.net/wp-content/uploads/2021/01/image-26.png" alt="" class="wp-image-2251" srcset="https://stubarea51.net/wp-content/uploads/2021/01/image-26.png 994w, https://stubarea51.net/wp-content/uploads/2021/01/image-26-300x177.png 300w, https://stubarea51.net/wp-content/uploads/2021/01/image-26-768x454.png 768w" sizes="(max-width: 994px) 100vw, 994px" /></a></figure>



<p><strong>Configure BGP instance, peering, and originate a default route.&nbsp;</strong></p>



<p>Here is a very basic BGP peering configuration to establish a peer, advertise a few routes, and originate a default route.&nbsp; </p>



<p>Let’s look at some of the differences in the configuration.&nbsp; <br><br>It&#8217;s worth noting  that everything in CAPS was manually defined .&nbsp; <br><br>On junOS there is no concept of the “network” command that you might see in MikroTik or Cisco. <br><br>To accomplish the same functionality in this example I used a policy-statement named REDIS-CONNECTED that matched any connected route for redistribution.&nbsp; <br><br>This is then applied as an export statement into the EBGP peer group.&nbsp; Likewise, there is not a construct for “default-originate”.&nbsp; In order to accomplish the same functionality, we created a static route to discard and exported this to the EBGP peer.</p>



<p><strong>MikroTik BGP Configuration</strong></p>



<pre class="wp-block-code"><code>/routing bgp instance
set default as=2
/routing bgp network
add network=100.89.88.0/24
add network=100.89.87.0/24
add network=100.89.86.0/24
/routing bgp peer
add default-originate=always name=PEER-1 remote-address=172.31.254.1 remote-as=1</code></pre>



<p><strong>Juniper BGP Configuration</strong></p>



<pre class="wp-block-code"><code>set interfaces lo0 unit 0 family inet address 100.99.98.1/24
set interfaces lo0 unit 0 family inet address 100.99.97.1/24
set interfaces lo0 unit 0 family inet address 100.99.96.1/24
set routing-options static route 0.0.0.0/0 discard
set routing-options autonomous-system 1
set protocols bgp group EBGP type external
set protocols bgp group EBGP export REDIS-CONNECTED
set protocols bgp group EBGP export SEND-DEFAULT
set protocols bgp group EBGP peer-as 2
set protocols bgp group EBGP neighbor 172.31.254.2
set policy-options policy-statement REDIS-CONNECTED term 1 from protocol direct
set policy-options policy-statement REDIS-CONNECTED term 1 then accept
set policy-options policy-statement SEND-DEFAULT term 1 from protocol static
set policy-options policy-statement SEND-DEFAULT term 1 from route-filter 0.0.0.0/0 exact
set policy-options policy-statement SEND-DEFAULT term 1 then accept</code></pre>



<p><strong>More to come</strong></p>



<p>There are so many commands to consider for BGP, we probably could have added close to 100, but we decided to list the commands we use most often to start with and will be adding to the list of BGP commands as well as other like OSPF, MPLS, and VLANs in future posts.&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stubarea51.net/2021/01/24/juniper-to-mikrotik-bgp-commands/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2208</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 27/259 objects using disk
Page Caching using disk: enhanced 
Minified using disk
Database Caching 4/42 queries in 0.053 seconds using disk (Request-wide modification query)

Served from: stubarea51.net @ 2026-06-13 22:40:59 by W3 Total Cache
-->