JunOS vs IOS – Basic OSPF

Let’s set up a basic OSPF adjacency between JunOS and IOS. I’ve got the following simple topology:

The good thing here is that the configs shown will show the difference between JunOS and IOS as the actual configuration goal is the same for both.

The Cisco config is as follows:

Router>conf t
#int fa0
#ip address
#int lo100
#ip address

#router ospf 1
#network area 0
#network area 0

Now onto JunOS:

# set interfaces em1 unit 0 family inet address
# set interfaces lo0 unit 100 family inet address

# edit protocols ospf area 0
# set interface
# set interface

Let’s see what we see on the Cisco:

Router#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface     128   FULL/BDR        00:00:34     FastEthernet0

Router#sh ip route is variably subnetted, 3 subnets, 2 masks
O [110/1] via, 00:00:25, FastEthernet0
O [110/1] via, 00:00:25, FastEthernet0
C is directly connected, Loopback100
C is directly connected, FastEthernet0

What about the Olive?

root@Olive> show ospf neighbor
Address         Interface   State           ID             Pri         Dead     em1.0       FULL      1           36

root@Olive>show route      *[OSPF/10]  00:09:05, metric 2
                     > to via em1.0

And yes, both routers can ping both loopbacks :)