<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000066">
<font size="-1">Dear All<br>
<br>
I am a newbie of bird user. I am running bird version 1.4.5 on my
centos box. <br>
<br>
Now We are struggling with the BGP export filter, as the purpose
we are willing to import certain ASN's prefixes in to our table (
e.g google asn 15169 ), and also only export our prefix to certain
ASN. in this case, some prefixes will be always routed through one
up link. We are done with the import filter to select the incoming
routes, but we are failed with export filter, seems nothing happen
on the export filter. <br>
<br>
This is my configuration.<br>
<br>
log stderr all;<br>
log "/var/log/bird.log" all;<br>
<br>
router id 172.16.120.41;<br>
<br>
table bird_k150;<br>
table bird_k151<br>
<br>
protocol kernel kernel150{<br>
persist; <br>
scan time 20; <br>
export all; <br>
table bird_k150;<br>
kernel table 150; <br>
}<br>
<br>
protocol kernel kernel151{<br>
persist;<br>
scan time 20;<br>
export all;<br>
table bird_k151;<br>
kernel table 151;<br>
}<br>
<br>
protocol kernel {<br>
persist;<br>
scan time 20;<br>
export all;<br>
}<br>
<br>
protocol device {<br>
scan time 10; <br>
}<br>
<br>
protocol static static_bgp_null{<br>
table bird_k151; <br>
route a.b.c.0/24 blackhole;<br>
}<br>
<br>
protocol pipe pipe_n_he{<br>
peer table bird_k151;<br>
export filter {if source=RTS_OSPF_EXT2 &&
net=65.19.175.17/32 || net=61.14.134.86/32 then accept; reject;};<br>
import none; <br>
<br>
<br>
protocol ospf hyospf{<br>
rfc1583compat yes;<br>
export none;<br>
area 0.0.0.0 {<br>
interface "eth*" {<br>
};<br>
};<br>
}<br>
<br>
<br>
protocol bgp bgp_he_net{<br>
description "he.net uplink";<br>
local 10.96.254.34 as 133194;<br>
neighbor 65.19.175.17 as 6939;<br>
multihop 4;<br>
import all;<br>
table bird_k151;<br>
next hop self; <br>
export filter {<br>
if net~103.254.196.0/24 then {<br>
bgp_path.prepend(133194);<br>
bgp_path.prepend(133194);<br>
accept;<br>
}<br>
reject;<br>
};<br>
}<br>
<br>
protocol bgp bgp_telstra{<br>
description "telstra uplink";<br>
local 202.147.20.169 as 133194;<br>
neighbor 61.14.134.86 as 10026;<br>
multihop 3;<br>
import filter {<br>
if bgp_path.last ~ [ 15169, 8075, 8001 ] then {<br>
bgp_local_pref=180;<br>
accept;<br>
}<br>
reject;<br>
};<br>
table bird_k151;<br>
next hop self;<br>
export filter {<br>
if ( source = RTS_STATIC && net ~
103.254.196.0/24 ) then {<br>
if ! ( bgp_path ~ [ 15169, 8075, 8001,
4739 ] ) then {<br>
bgp_path.prepend(133194);<br>
bgp_path.prepend(133194);<br>
bgp_path.prepend(133194);<br>
bgp_path.prepend(133194);<br>
}<br>
accept;<br>
}<br>
reject;<br>
};<br>
}<br>
<br>
<br>
Seems it put 4 times prepend after all that ignoring the if
statement, May I know if we can use bgp_path selection in export
filter. <br>
<br>
Thanks !<br>
<br>
<br>
</font>
</body>
</html>