Fwd: cloning direct routes into another routing table

Gustav Koller gustavkoller at gmail.com
Tue Jan 29 11:33:05 CET 2013


Hello,

I'm trying to clone some routes bird leaned via the direct
protocol into another kernel routing table.

A simple example:
log syslog all;
debug protocols all;

table t_test;

protocol device {}

# export t_test table to kernel table 100
protocol kernel k_test {
        table t_test;
        kernel table 100;
        export all;
}

# static route - shows up in table 100
protocol static static_test {
        table t_test;
        route 10.1.1.1/32 drop;
}

# direct routes # doesn't show up in table 100
protocol direct d_test {
        table t_test;
}


bird learns the routes perfectly fine but doesn't export them to the
kernel table again:

# birdc show route table t_test
BIRD 1.3.9 ready.
10.1.1.1/32        blackhole [static_test 19:40] * (200)
192.168.0.0/24     dev eth0 [d_test 19:40] * (240)

# ip route show table 100
blackhole 10.1.1.1  proto bird

This log extract shows the reason for this:
k_test: Connected to table t_test
k_test < added 10.1.1.1/32 blackhole
k_test < rejected by protocol 192.168.0.0/24 dev eth0

I suspect that this is intentional behavior (kernel protocol rejecting
routes from direct protocol) as it doesn't make much sense adding
direct routes to the kernel in scenarios with a single default/main
routing table.
But in my case that's what I need. Is there a workaround to make this work?

Best regards,
Gustav



More information about the Bird-users mailing list