interconnecting Cisco and Juniper

In this post I’m going to interconnect 2 routers, a Juniper J-series router and a cisco IOS router in GNS and run OSPF as routing protocol between them. This is just a basic config that shows how we can interconnect routers from two most respected infrastructure/solution providers together. There are so many different parameters regarding routing protocols and specifically OSPF which are beyond the scope of this simple article.
Suppose we have this simple topology:


For the sake of test, I configured a loopback interface with 2 different IP addresses on Junos. Despite Cisco, which allows you to create multiple loopback interfaces easily, Junos doesn’t. it is possible to do so in Junos, but you should consider creating virtual instances/routers that is more advanced to be explained here. Anyway, I configured a loopback interface on Juniper router with IP addresses of and, but want the Cisco router to see just the first address in its routing table. You can advertise networks to OSPF in two ways: enabling routing protocol on an interface or redistributing networks into routing domain. To not to allow the scenario being too simple, I’m going to use the redistribution. First, let’s define a prefix list in Junos:

policy-options {
prefix-list TEST_PREFIX {;

In the second step, we should define a route map-like structure in Junos:

policy-options {
policy-statement TEST_STATE {
term 1 {
from {
prefix-list TEST_PREFIX;
then {
external {
type 1;

route-map in Cisco has a structure like match-and-set mechanism; that is, when something is matched an entry, the “set” command defines the actions that must be taken. In the Junos, we have “policy-options policy-statement” command that acts like route-map in Cisco with the same logic. Matching something, then taking some action. Here, you can assume “from” and “then” keywords in Junos is equivalent to “match” and “set” commands in Cisco language respectively. Anyway, first rule of “TEST_STATE” statement, which named “1”, matches a prefix-list that is created before and after changing the OSPF external type to E1, accept it to be redistributed into routing domain. You know that? I guess many of you that are comfortable with Cisco, may be shocked when you begin to play with Juniper for the first time. Despite many other vendors here and there that use the same commands as Cisco IOS, or easy-to-understand IOS-like interface, the Junos has its own language and way of doing things in Junos is completely different than others. So don’t be frustrated when you first meet Junos guy and let him (maybe her, who knows) to speak!
You know the basic OSPF configuration on Cisco router, otherwise please don’t bother yourself with Junos at this time and go for CCNA, JNCIA, or Network+.
A simple test on Cisco router reveals our external OSPF E1 route; here is the routing table contents of Cisco router: is subnetted, 1 subnets
C is directly connected, Loopback0 is subnetted, 1 subnets
O E1 [110/10] via, 00:13:10, FastEthernet0/0 is subnetted, 1 subnets
C is directly connected, FastEthernet0/0

And finally we have reachability to network:

R1(config)#do ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Packet sent with a source address of
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/138/196 ms

Leave a Comment

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *

1,993 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>