bird.conf before going into Production

info at naucum.net info at naucum.net
Sat Mar 26 20:44:22 CET 2011


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.



---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;



 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?

Can someone show me how I could act as uplink for someone else?
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







More information about the Bird-users mailing list