Injecting route into bird/ospf
ico
ico at petrzalka.net
Fri Jul 28 13:27:23 CEST 2017
Hello,
I would like to hear some advices about bird on linux, what is the best
way to inject some route into OSPF on bird. I want for my router to
announce via OSPF to other routers that some IPs should be directed to it.
Example: I want IPs 10.0.0.1/32 and 10.0.0.5/32 to be directed to my
router. I would set dummy0 interface, set those IPs there, include
dummy0 in OSPF and voila! the rest of network "knows" 10.0.0.1 and
10.0.0.5 is here. This doesn't seem as a good solution for me, because
the traffic to 10.0.0.1 and 10.0.0.5 would then be NATed or modified in
other way so these IPs really don't need to exist.
I'd like to change these settings few times in an hour so writing it to
bird config doesn't seem like a good solution.
Is there a way to do it without setting IPs anywhere? Maybe set some
custom local routing table for this and tell bird to announce routes
found there?
echo "25 mytable" >> /etc/iproute2/rt_tables
ip route show table mytable # empty
ip route add 10.0.0.1/32 dev lo table mytable
ip route show table mytable # shows 10.0.0.1 on loopback
# and now also bird picks up 10.0.0.1 and announces it
What is the best way to do it "the most dynamic way"?
Thank you
ico
More information about the Bird-users
mailing list