Thank you. its working fine after adding import in protocol direct. Thanks, Madhuri
On Thu, Jun 11, 2015 at 12:32 PM, <os...@cetex.se> wrote: > We're using something like this. > > The important thing is that you need to see this as bird importing > "protocol direct" routes into birds internal routing table, and then you > need to export those to the ospf process. > By default i believe "import from protocol to bird" is allow any, but > "export from bird to protocol" is deny any. > > protocol direct -> import rule (default is allow any) -> bird > bird -> export rule (Default is deny any) -> protocol ospf > > > # Only allow a certain range to be announced to ospf > function allow_anycast_ip() > prefix set anycast; > { > anycast = [ xx.xx.xx.0/22{24,32} ]; > > if net ~ anycast then return true; > return false; > } > > filter export_to_ospf { # Only export anycast routes to ospf > if allow_anycast_ip() then accept; > reject; > } > > protocol direct { > import > interface "lo*"; > } > > protocol ospf { > export filter export_to_ospf; > .... > } > > Best regards > Oskar Stenman > > > > 2015-06-11 8:26 skrev Madhuri: > >> Hi, >> >> How to export prefixes configured on loobback interfaces through OSPF. >> working fine with BGP. >> >> following is the configuration that I have tried. >> But 192.168.1x.1 are not shown in neighbor's route table. >> >> Thanks in advance. >> >> ifconfig output : >> >> lo:11 Link encap:Local Loopback >> inet addr:192.168.11.1 Mask:255.255.255.0 >> UP LOOPBACK RUNNING MTU:65536 Metric:1 >> >> lo:12 Link encap:Local Loopback >> inet addr:192.168.12.1 Mask:255.255.255.0 >> UP LOOPBACK RUNNING MTU:65536 Metric:1 >> >> bird.conf >> >> router id 1.1.1.1; >> >> protocol direct { >> interface "eth1","eth2","lo*"; >> } >> >> protocol kernel { >> persist; >> scan time 20; >> export all; >> } >> >> protocol device { >> scan time 10; >> } >> >> protocol ospf R1 { >> tick 2; >> rfc1583compat yes; >> area 0.0.0.0 { >> stub no; >> interface "eth1","eth2" { >> hello 9; >> retransmit 6; >> cost 10; >> transmit delay 5; >> dead count 5; >> wait 50; >> type broadcast; >> authentication simple; >> password "admin"; >> }; >> }; >> } >> >> Thanks, >> Madhuri >> >