[Xorp-hackers] Queries on iBGP and RIP

Andrea Bittau a.bittau@cs.ucl.ac.uk
Mon, 11 Jul 2005 17:59:16 -0700


On Sun, Jul 10, 2005 at 11:51:13PM -0500, Ajay Mahimkar wrote:
> having different local_pref values. Could someone please let me know how to 
> achieve -> two routers in the same AS advertise different local_pref values 
> thereby having preference of one router over other? 

Use the latest CVS [about 30 mins from now---I think the public CVS needs time
to sync, as I just commited].

Try this export policy:

policy {
	policy-statement lp {
		term a {
			action {
				localpref: 123
			}
		}
	}
}

protocols {
	bgp {
		export: "lp"
	}
}

Note that policy lp will simply overwrite the localpref to 123 on any route
which is advertised by BGP.  It will not cause explicit redistribution from say,
static routes.  Thus I assume you have routes in BGP somehow... perhaps obtained
by another peering.

If you want different peerings to have different localprefs try adding a dest
block such as:

dest {
	neighbor: 10.0.0.1
}

This will cause only 10.0.0.1 to receive a localpref of 123.


Note that the current code in BGP will overwrite the localpref to 100 on the
input side i think.


> 2. I was trying to use re-advertising of iBGP routes via RIP. I added the 
> following in the RIP configuration, 

Route re-distribution is in TODO.  However it will look something like:

policy-statement rdr {
	term a {
		source {
			protocol: "bgp"
		}
	}
}

protocols {
	rip {
		export: "rdr"
	}
}



I am currently heavily working on policy, and will do so for about 2 weeks.  It
is best if you check the status of the policy code in about two weeks.
Certainly more things will work