View Only
last person joined: yesterday 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  OSPF Routing Problem

    Posted 06-22-2008 12:05

    Dear All, i have a problem with my juniper routers regarding OSPF configuration, i have two M7i routers connected back to back through E1 links, and these two routers are connected to cisco boxes also, like this (( CiscoA <--> JuniperA <---------->JuniperB<-->CiscoB )) also.. CiscoA and CiscoB are connected back to back to each other, all are running OSPF with one area now :


    1. JuniperA gets routes from CiscoA succefully

    2. JuniperB gets routes from CiscoB succefully

    3. CiscoA and CiscoB exchange routes succefully

    4. JuniperA and JuniperB exchange ONLY directly connected routes with each other, JuniperA doesnt send routes that he learned from CiscoA to JuniperB AT ALL, and same with JuniperB.

    5. i noticed the following, that the routes juniperA learned from CiscoA are the same routes that JuniperB learned from CiscoB. 


    the whole idea with this setup is to load balance the traffic between cisco and juniper, if juniper boxes didnt learn the routes from ciscoA and ciscoB, will be not be able to load balance them, any idea please.. i'm totally lost here.




  • 2.  RE: OSPF Routing Problem

    Posted 06-23-2008 00:59

    Hello Arzo,


    If all the routers' interfaces are correctly configured in area 0 and all the OSPF neighborships are up then my guess is that your load-balancing is not working as you expect due to the default metrics which are in place.


    It is not really accurate to talk about "learning routes" when referring to OSPF will all routers in the same area. All these routers should have the exact same view of the network through the flooding of Type 1 & 2 LSA's (& possibly Type 5 if you are redistributing/exporting static/connected routes). Each node will then run the SPF algorithm to calculate the lowest metric path to all destinations.


    My guess is that the link between the Juniper routers has the highest cost which is why it may look the Juniper routers are only exchanging the directly connected route. But if you type 'show ospf database' on the Juniper routers, I'm sure you'll see all the destinations.


    For changing the metric on Juniper: Modifying the Interface Metric


    And to see the metric, use the command 'show ospf interface' (I believe 'show ip ospf interface' on Cisco).




  • 3.  RE: OSPF Routing Problem

    Posted 06-23-2008 04:21
      |   view attached

    thank you david for helping me in this issue, i attached to you a picture of the network diagram that i did in my lab, also with some show commands from juniper, i checked the ospf database but i cant see 2 routes on juniper, this is the same design as the customer, forget the load balancing, i created the loopback interfaces acting like the networks connected to the router, if you notice that is only through one road and nothing in OSPF database..



    Juniper Router Show commands...


    admin> show ospf database

        OSPF link state database, Area
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router          0x8000000b   179  0x22 0xce1d  48
    Router  *          0x80000015    56  0x22 0x34b0  48
    Router         0x8000000c  1129  0x22 0x50c8  72
    Router         0x8000000d   706  0x2  0x827   72
    Network *          0x80000008   656  0x22 0x81a1  32
    Network *          0x80000009   356  0x22 0x9a78  32
    Network          0x80000004   220  0x22 0x957f  32




    admin> show route

    inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both         *[Direct/0] 01:46:27
                        > via fe-0/0/0.0         *[Local/0] 02:40:18
                          Local via fe-0/0/0.0         *[OSPF/10] 01:46:18, metric 65
                        > to via fe-0/0/1.0         *[Direct/0] 02:40:18
                        > via fe-0/0/1.0         *[Local/0] 02:40:18
                          Local via fe-0/0/1.0         *[OSPF/10] 01:45:43, metric 2
                        > to via fe-0/0/0.0        *[OSPF/10] 01:46:18, metric 2
                        > to via fe-0/0/1.0        *[OSPF/10] 01:45:43, metric 3
                        > to via fe-0/0/0.0



    Cisco Router show commands..


    R2#show ip route
    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
           * - candidate default, U - per-user static route, o - ODR
           P - periodic downloaded static route

    Gateway of last resort is not set
 is subnetted, 1 subnets
    O [110/11] via, 00:51:44, Ethernet0 is subnetted, 1 subnets
    C is directly connected, Serial0 is subnetted, 1 subnets
    C is directly connected, Ethernet0 is subnetted, 1 subnets
    O [110/12] via, 00:51:44, Ethernet0 is subnetted, 2 subnets
    O [110/13] via, 00:51:44, Ethernet0
    C is directly connected, Loopback0

    R2#show ip ospf database

                OSPF Router with ID ( (Process ID 1)

                    Router Link States (Area 0)

    Link ID         ADV Router      Age         Seq#       Checksum Link count         405         0x8000000B 0xCE1D   2         282         0x80000015 0x34B0   2        1353        0x8000000C 0x50C8   4        930         0x8000000D 0x827    4

                    Net Link States (Area 0)

    Link ID         ADV Router      Age         Seq#       Checksum         882         0x80000008 0x81A1         582         0x80000009 0x9A78         446         0x80000004 0x957F



  • 4.  RE: OSPF Routing Problem

    Posted 06-23-2008 04:46

    Hi Arzo,


    Can you please clarify what routes you are expecting to see on the Juniper routers but you are not seeing ?

    I see 7 LSA's on the Juniper and Cisco routers and the routing tables look consistent.

  exists in the Junipers LSDB as a router LSA which expected. Network LSA's are for broadcast interfaces such as ethernet. You don't see the network there as this is a point-to-point interface.


    The Juniper can reach through because this is the shortest path... if the link were to go down, you would see that you can reach through


    Does this answer your question ?




  • 5.  RE: OSPF Routing Problem

    Posted 06-23-2008 05:02

    thank you david, your answers are great, but im totally sure now that 'im very weak in OSPF 🙂


    i told my customer that he will not see two routes cause as you said when one is down you will see the next route immidiatly, but he insist and says that he must see both routes to the destination in the routing table !!!!  can you confirm this last thing to me. can the router ever ever ever see both routes in the routing table ????


    and can you please clearify why doesnt juniper exchange the routing table with each other ?!! 


    i really appretiate your time and efforts. 

  • 6.  RE: OSPF Routing Problem
    Best Answer

    Posted 06-23-2008 05:26

    Hi Arzo, no problem 😉


    You may indeed sometimes see two routes for a given destination in the routing table but only if the cost to reach the destination is the same - this is called equal-cost load-balancing.


    In this case, because the link is E1, it has a much higher cost (looks like 63). Therefore, unless you explicitly manipulate the metrics, the routers will always try to avoid that link if possible. If you can set the metric cost on that link to be 1 (on both of the Ciscos) then you should see 2 routes on the Junipers for one of the loopbacks (the one on the opposite corner of the square).




  • 7.  RE: OSPF Routing Problem

    Posted 06-23-2008 05:45

    hi david,

    thank you so much, the last post was very useful.


    another question 🙂 this is out of the deal cause i just read it, i'm reviewing my OSPF knowledge and i noticed this info..


    Cisco bases link cost on bandwidth, other vendors may use other metrics to calculate a given link cost, you may have to adjust the cost to match another vendors router, both routers must assign the same cost to the link for OSPF to work. (Sybex Book)


    what do you think ?! 

  • 8.  RE: OSPF Routing Problem

    Posted 06-23-2008 06:14

    I disagree... I do not think both routers must assign the same cost to a link for OSPF to work. Typically both routers will associate a link with the same cost (and it makes things easier to maintain) but, unless I am missing something, nothing should break if they do not. Some scenarios may even benefit from the asymmetrical routing that can result from both sides of a link giving it different costs...


    You have to picture LSA as pieces of a puzzle that represents an OSPF area. Link costs are unidirectional: router A can reach B with a cost of 1 but B to A can cost 10. When each router runs its SPF, it will take the direction into account as well.




  • 9.  RE: OSPF Routing Problem

    Posted 06-23-2008 06:22
    thanks a lot david. i'm done. youve been very helpful. respect to you.

  • 10.  RE: OSPF Routing Problem

    Posted 2 days ago

    to see 2 next hops for same destination in Juniper you have to create equal cost multiple path policy. 

    set policy-options policy-statement ECMP then load-balance per-packet

    set routing-options forwarding-table export ECMP

    in your topology you did not mention areas. for full convergence of ospf. your all routers must have area 0. if you can share your configs or complete topology i will better assist you.

    Thank you