I have got couple of requests to write up on Generated Route concept. Generated Route is By far the Most Complex Topic that I felt when I was prepping for JNCIE-SP exam.

-> Generated Route and Aggregated Route are Almost Identical and only vary with Next-hops, while aggregate Route has always a NH-REJECT, Generated Route has a Valid NH.

-> Generated Route is installed as [aggregate/130] , so by default if you are referring it in policy, you need to call it from protocol Aggregate

The above Quotes are by far the General Ones, but digging deep, we got to understand the actual application of a Generated route.

Lets see the Below Topology First




What is the ASK ?

Two ISP’s A & B are connected , ISP-A edge router has a loopback of and ISP-B edge Router has a Loopback of , we need to send Default route as long as we have connection with ISP-A then if Connection is lost to ISP-A , then ISP-B needs to be preferred.


Looks pretty easy and frankly can be done in multiple ways, but how do we do this via Generated Route concept ?


Lets Quickly check if we have OSPF relationship between SRX1 and SRX2 and Bgp between R3 and R4 exchanging their Loopbacks



Lets see the OSPF policy , Generated-Route and Associated Route policy



Policy Looks Good , Lets Examine the Route now




As we can see, the 0/0 route is preferring ISP-B instead of ISP-A 


When you closely Examine the Contributing Routes, is installed well before and the order continues there.

How do we make sure is more preferred Contributing Route over ?

Lets write up simple policy to modify the local preference for route , so that it has less preference.  Note, and are not from same neighbors neither they have multiple exit points, The logic here is to increase the overall credibility of One Route over the Other



Now that it is done, lets see if this worked, our 0/0 should prefer ISP-A and in the even if  ISP-A goes down, ISP-B should be preferred and when ISP-A returns ISP-A should be preferred Back






Lets check on SRX1 , if it receives the Route



That explains all, Not only the route but there are many factors which influence the same.



Rakesh M