Setting MED (?) for a specific BGP route

Michal Ludvig mludvig at logix.net.nz
Tue Apr 3 00:58:20 CEST 2012


On 04/03/2012 10:38 AM, Michal Ludvig wrote:
> Is there any way to autogenerate MED from IGP? For instance in my case 
> I've got:
>         if source = RTS_OSPF then {
>                 bgp_med = 200;
>         }
>
> That works for now with this hardcoded value. However we're going to 
> add one more POP with OSPF+BGP and then I want the MED to reflect the 
> internal distance to the given subnet.
>
> Like this:
> [POP1] --- [POP2] --- [POP3]
>
> The prefix local to POP1 should be announced from all POPs to our BGP 
> upstream with the lowest MED from POP1, higher from POP2 and the 
> highest MED from POP3. Can I somehow do that automatically?

Just found one way:
         if source = RTS_OSPF_EXT2 then {
                 bgp_med = ospf_metric1;
         }

It seems to work but is it a good idea?

Thx

Michal



More information about the Bird-users mailing list