Bird and ensuring preference of one route over another via OSPF.
Anubis
anubis at iwwd.com
Mon Dec 4 13:55:17 CET 2017
Hi All,
I have a network wherein there are two routers connected to a network and
both participate in an OSPF area on the public side. I'm needing to ensure
that only one router is maintained as the priority route and the other is
excluded. I've tried setting the costs of the routes, but the 2nd router is
still becoming priority.
How can I achieve this to ensure R1 is priority and R2 isn't use as a valid
route.
Configs below.
Thanks.
Anubis.
Simplified Diagram:
(Internet) -R0----+-------(eth0)- R1 (10.1.0.253) -----------+ (Lan
10.1.0.0/16)
|
|
|
|
+-------(eth0)- R2 (10.1.0.252)
-----------+
R0 is showing R2 as the priority route for 10.1.0.0/16
If I shut down Bird on R2, R1 correctly becomes the main route.
R1 Config:
=============================================
protocol device {
scan time 10;
}
protocol kernel {
export all;
scan time 15;
}
protocol static {
import all;
}
protocol ospf {
import all;
export filter {
ospf_metric1 = 1000;
if source = RTS_STATIC then accept; else reject;
};
area 0 {
interface "eth0" {
cost 5;
type broadcast;
hello 10;
retransmit 2;
wait 10;
dead 40;
};
interface "*" {
cost 1000;
stub;
};
};
}
R2 Config:
=============================================
protocol device {
scan time 10;
}
protocol kernel {
export all;
scan time 15;
}
protocol static {
import all;
}
protocol ospf {
import all;
export filter {
ospf_metric1 = 1500;
if ( source = RTS_STATIC ) then
if (net = 10.1.0.0/16 || net
= 10.2.0.0/16 ) then
reject
"rejected route";
else {
accept
"accepted route";
}
else {
reject "not static route";
}
};
area 0 {
interface "eth0" {
cost 15;
type broadcast;
hello 10;
retransmit 2;
wait 10;
dead 40;
};
interface "*" {
cost 1500;
stub;
};
};
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20171204/5e3a7397/attachment.html>
More information about the Bird-users
mailing list