Hi,

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

toplogy

 

 

What is the ASK ?

Two ISP’s A & B are connected , ISP-A edge router has a loopback of 4.4.4.4/32 and ISP-B edge Router has a Loopback of 3.3.3.3/32 , 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

output1

 

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

output3

 

Policy Looks Good , Lets Examine the Route now

output4

 

NOW THE PROBLEM 

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

 

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

How do we make sure 4.4.4.4/32 is more preferred Contributing Route over 3.3.3.3/32 ?

Lets write up simple policy to modify the local preference for 3.3.3.3/32 route , so that it has less preference.  Note, 4.4.4.4/32 and 3.3.3.3/32 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

output5

 

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

 

output6

 

output7

 

Lets check on SRX1 , if it receives the Route

output8

 

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

 

Regards

Rakesh M

 

Advertisements