Monday 22 February 2010

BGP Route Redistribution

Hello again :)

This post was due to be later down the BGP chain, but it has been requested so I'll do it now for those who don't need the real basics and add the tag so those looking out of sequence at a particular subject matter can read it in sequence.


So- You have a basic BGP network configured, say you have 3 or 4 remote nodes/networks hanging off some routers you administer and you wish to use BGP to ensure all those networks can all see each other.

In many respects, re-distribution is not recommended as BGP historically has been a wholly public facing system and most internal routing processes will use private addressing, but lets say for this instance you're either fully public or on an MPLS network or similar.


(picture to follow)

In those instances, rather than manually add each network via Network statements and updating each of those any time a route or network changes you can redistribute the internal process you are running (the igp).

Once the process has been redistributed it becomes a BGP route in its own right so you could in theory redistribute different Igp's over from different sites. (ie EIGRP on one, OSPF on the other).

We'll assume at this point then that you've read the other parts of the BGP series and know how to setup neighbor relationships and have your external AS up and running to all the nodes on the network.

In order to redistribute the internal routing, login to the AS using the normal router bgp [as number] command then add :


redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [as-number] [metric {metric-value | transparent}] [metric-type type-value] [match {internal | external 1 | external 2}]
[tag tag-value] [route-map map-tag] [subnets]


Let me break that down a little.

redistribute - speaks for itself.
Protocol - Choose from connected, bgp, eigrp, ospf, rip, mobile, isis or static
Process ID - this is the AS number/process ID etc for the IGP
Level (x) - Relates to ISIS redistribution, uncommon so we'll cover later.
AS-Number - the AS number for the redistributed routes (in the case of multi=as environment)
route-map - This will apply the listed route-map to the redistribution process if you want to restrict what networks are advertised.

the rest of the flags are specific for the IGPs with many of them applying to the OSPF protocol (like Match for which set of routes you wish to re-advertise).

For the most part, you will end up doing either a basic redistribute command and then applying some sort of filter via route-map.


I'll follow up with some examples shortly, I'm currently working on uploading some config videos to youtube or similar and embedding them to the blog.

No comments:

Post a Comment