Hi,
You can also redistribute routes. In the example below, tunnel interface st0.0 is in area 3. Both connected and static routes are being redistributed as type 1 with a metric of 20. I hope this example helps.
protocols {
ospf {
export [ Connected-Routes Static-Routes ];
area 0.0.0.3 {
interface st0.0 {
interface-type p2mp;
hello-interval 10;
dead-interval 40;
}
}
}
}
policy-options {
policy-statement Connected-Routes {
from {
protocol direct;
route-filter 10.100.1.0/24 exact;
}
then {
metric 20;
local-preference 20;
external {
type 1;
}
accept;
}
}
policy-statement Static-Routes {
from {
protocol static;
route-filter 10.100.5.0/24 exact;
route-filter 10.100.20.0/24 exact;
route-filter 10.100.30.0/24 exact;
}
then {
metric 20;
external {
type 1;
}
accept;
}
}
}