Route redistribution between OSPF instances
Yaroslav Dronskii
jaroslav at dronsky.ru
Mon Mar 4 14:54:10 CET 2019
Hello, I need some help in understanding bird. Route redistribution between
ospf instances doesn't work for me.
I tried everything I could think of short of debugging source code, and
narrowed it down to route type.
If it's RTS_OSPF_IA, ospf_metric2 is set to LSINFINITY.
How I wanted to use it:
VM announces some /32 net in area 20.
This net is received by vm's host into table_ospf_0 and redistributed to:
1) backbone area so other vm hosts can reach it
2) table_allroutes via a pipe.
Ospf_allroutes protocol takes it from table_allroutes and announces it to
everyone in area 30.
Am I doing something stupid? Should it even work?
Minimal config example:
ipv4 table table_ospf_0; # contains host-host vm /32 ip announces
ipv4 table table_allroutes; # contains all routes learned.
protocol pipe pipe_ospf_0_allroutes {
table table_ospf_0;
peer table table_allroutes;
import none ;
export filter { if (net.len = 32) then accept; else reject; } ;
}
protocol ospf ospf_vm {
ipv4 {
table table_ospf_0;
export all;
import filter filter_from_ospf;
};
# meant for host-host vm /32 ip announces
# without it, best route to other host's vm will be via PE
area 0.0.0.0 {
interface "ospf0-br" {
authentication cryptographic;
password "pass1";
};
};
# meant for ip announces.
area 0.0.0.20 {
interface "ospf20-br" {
authentication cryptographic;
password "pass2";
};
};
}
protocol ospf ospf_allroutes {
ipv4 {
table table_allroutes;
import keep filtered on;
export all;
import filter filter_to_kernel;
};
# Meant for vm's that want to accept ALL routes with per-vrf ospf
tag
area 0.0.0.30 {
interface "ospf30-br" {
authentication cryptographic;
password "pass3";
};
};
}
How route is seen:
Imported from other vm host via ospf:
bird> show route table table_ospf_0 10.20.5.135/32 all
Table table_ospf_0:
10.20.5.135/32 unicast [ospf_vm 13:52:53.209] IA (150/20)
[10.255.10.129]
via 10.133.146.12 on ospf0-br
Type: OSPF-IA univ
Piped to table_allroutes: (as expected, nothing changed)
bird> show route table table_allroutes 10.20.5.135/32 all
Table table_allroutes:
10.20.5.135/32 unicast [ospf_vm 13:52:53.209] IA (150/20)
[10.255.10.129]
via 10.133.146.12 on ospf0-br
Type: OSPF-IA univ
In ospf_vm:
# birdc show ospf state ospf_vm
area 0.0.0.0
router 10.255.10.129
distance 10
...
xnetwork 10.20.5.135/32 metric 10
...
xrouter 10.20.5.135 metric 10
area 0.0.0.20
router 10.255.10.128
distance 0
xnetwork 10.20.5.135/32 metric 20
...
xrouter 10.20.5.135 metric 20
# birdc show ospf state ospf_allroutes
area 0.0.0.30
router 10.255.10.128
distance 0
external 10.20.5.135/32 metric2 16777215
More information about the Bird-users
mailing list