On 26.3.2011 20:44, [email protected] wrote:
> Dear Bird Users.
> 
> Just wanted to know if that is a working bird config and 1 more question.
> 
> Scenario:
> I have an AS and 2x /24 (lets say 193.1.1.1 and 194.1.1.1) networks
> assigned to my as. Furthermore I have 2 uplink providers. AS1 and AS2.
> 
> I want most of the traffic to go thru AS1. AS2 should act as backup
> uplink. My as is defined here as AS0.
> 
>

I believe you config is almost OK.

> 
> ---begin---
> router id 193.1.1.1;
> log "/var/pfad/bird.log
> 
> 
> 
> protocol device { scan time 60;}
> 
> protocol static static_bgp {
>         import all;
> 
>         route 193.1.1.0/24 unreachable;
>         route 194.1.1.0/24 unreachable;
> 

<======= missing '}'

> 
> 
>  protocol kernel{
>       import all;
>       export all;
>                       }
> 
> 
> 
> ######################
> #     FILERS DEF     #
> ######################
> filter bgp_IN {
> if (net ~ [ 169.254.0.0/16+, 172.16.0.0/12+,
>              192.168.0.0/16+, 10.0.0.0/8+,
>              224.0.0.0/4+, 240.0.0.0/4+,
>              0.0.0.0/32-, 0.0.0.0/0{31,32}, 0.0.0.0/0{0,7} ];) then reject;
> 
>            accept;
> }
> 
> 
> filter bgp_OUT {
>       if (net ~ [193.1.1.0/24, 194.1.1.0/24]) then accept;
>       else reject;
> }
> 
> filter bgp_OUT_P {
>       if (net ~ [193.1.1.0/24, 194.1.1.0/24]) then {
>       bgp_path.prepend(0);   ---> My AS#
>       bgp_path.prepend(0);
>       bgp_path.prepend(0);
>       accept; }
>       else reject;
> }
> ######################
> # /    FILERS DEF    #
> ######################
> 
> 
> ######################
> #    BGP CONF        #
> ######################
> 
> 
> 
> protocol bgp THRU_AS1 {
>       local as 0;
>       source adress 193.1.1.1;
>       neighbor 1.1.1.2 as 1;
>       default bgp_local_pref 100;
>       path metric 0;
>       default bgp_med 1;
>       import filter bgp_IN;
>       export filter bgp_OUT;
> 
> 
> 
> }
> 
> 
> protocol bgp THRU_AS2 {
>       local as 0;
>       source adress 193.1.1.1;
>       neighbour 2.2.2.3 as 2;
>       default bgp_local_pref 200;
>       path metric 0;
>       default bgp_med 1;
>       import filter bgp_IN;
>       export filter bgp_OUT_P;
> }
> 
> 
> ---END of conf.---
> 
> Would this work?

I hope so. I don't think these lines are necessary:

        default bgp_local_pref 100;
        path metric 0;
        default bgp_med 1;

> 
> Can someone show me how I could act as uplink for someone else?

I believe this addition/modification should do the job. Client's
network is C.C.C/24 and his/her IP is X.X.X.X etc.

protocol bgp CLIENT {
        local as 0;
        source adress A.A.A.A;
        neighbour X.X.X.X as 7;
        import filter CLIENT_IN;
        export filter CLIENT_OUT;
}

filter CLIENT_OUT {
        if source = RTS_BGP then accept;
        if (net ~ [193.1.1.0/24, 194.1.1.0/24]) then accept;
        reject;
};

filter CLIENT_IN {
        if (net ~ [ C.C.C.0/24 ]) then accept;
        else reject;
}

filter bgp_OUT_P {
        if (net ~ [193.1.1.0/24, 194.1.1.0/24, C.C.C.0/24] ) then {
        bgp_path.prepend(0);   ---> My AS#
        bgp_path.prepend(0);
        bgp_path.prepend(0);
        accept; }
        else reject;
}

filter bgp_OUT {
        if (net ~ [193.1.1.0/24, 194.1.1.0/24, C.C.C.0/24 ]) then accept;
        else reject;
}

                Ondrej


> What would I need to add in the config so AS7 is connected to my as and
> wants an uplink from me with full routing table ?
> 
> 
> Cheers in advanced,
> Victor
> 
> 

Reply via email to