Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
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 0.0.0.0.. 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.
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).
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 10.1.1.1 is only through one road and nothing in OSPF database..
Juniper Router Show commands...
admin> show ospf database OSPF link state database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum LenRouter 184.108.40.206 220.127.116.11 0x8000000b 179 0x22 0xce1d 48Router *18.104.22.168 22.214.171.124 0x80000015 56 0x22 0x34b0 48Router 10.1.1.1 10.1.1.1 0x8000000c 1129 0x22 0x50c8 72Router 10.2.2.1 10.2.2.1 0x8000000d 706 0x2 0x827 72Network *126.96.36.199 188.8.131.52 0x80000008 656 0x22 0x81a1 32Network *184.108.40.206 220.127.116.11 0x80000009 356 0x22 0x9a78 32Network 18.104.22.168 22.214.171.124 0x80000004 220 0x22 0x957f 32
admin> show routeinet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both126.96.36.199/30 *[Direct/0] 01:46:27 > via fe-0/0/0.01.1.1.2/32 *[Local/0] 02:40:18 Local via fe-0/0/0.02.2.2.0/30 *[OSPF/10] 01:46:18, metric 65 > to 188.8.131.52 via fe-0/0/1.03.3.3.0/30 *[Direct/0] 02:40:18 > via fe-0/0/1.03.3.3.2/32 *[Local/0] 02:40:18 Local via fe-0/0/1.04.4.4.0/30 *[OSPF/10] 01:45:43, metric 2 > to 184.108.40.206 via fe-0/0/0.010.1.1.1/32 *[OSPF/10] 01:46:18, metric 2 > to 220.127.116.11 via fe-0/0/1.010.2.2.1/32 *[OSPF/10] 01:45:43, metric 3 > to 18.104.22.168 via fe-0/0/0.0
Cisco Router show commands..
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.
10.1.1.1 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 22.214.171.124 network there as this is a point-to-point interface.
The Juniper can reach 10.1.1.1 through 126.96.36.199 because this is the shortest path... if the 188.8.131.52 link were to go down, you would see that you can reach 10.1.1.1 through 184.108.40.206.
Does this answer your question ?
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.
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 220.127.116.11 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).
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 ?!
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.