Hi opers13,
Unless an interface is running OSPF (either active or passive) JUNOS uses the 'export' mechanism to inject prefixes. These prefixes have to come from somewhere. That can either be a local interface (not running OSPF), another routing protocol (static, rip, bgp, etc) or an aggregate route.
You configure it along these lines...
policy-options {
policy-statement static-to-ospf {
term t1 {
from {
protocol static;
route-filter 10.156.0.20/30;
}
then accept;
}
}
}
protocols {
ospf {
export static-to-ospf;
}
}
routing-options {
static {
route 10.156.0.20/30 discard;
}
}
The discard route is similar to a route to null0 in IOS. This creates the entry in the forwarding table for 10.156.0.20/30. Then, you create the policy "static-to-ospf". This policy says if you find an *active* route in the routing table with the protocol set to static then accept that. Otherwise, reject (note, the accept/reject are purely in the sense of exporting the route into OSPF).
Finally, you use the export static-to-ospf command to tell OSPF to advertise routes that are matched by the policy static-to-ospf to its neighbours.
Now... in your config 10.150.0.20/30 is an active OSPF interface running in p2p mode in area 4. To put 10.152.128.0/24 into area 0 (as opposed to area 5, which it is in according to your IOS config excerpt), then you just need to do the following...
interfaces {
ge-0/0/0 {
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 10.156.0.21/30;
}
}
unit 1 {
vlan-id 101;
family inet {
address 10.152.128.1/24;
}
}
}
}
protocols {
ospf {
reference-bandwidth 10g;
area 0.0.0.0 {
interface ge-0/0/0.1 {
point-to-point;
}
}
area 0.0.0.4 {
interface ge-0/0/0.0 {
point-to-point;
}
}
}
}
Rgds,
Guy
Rgds,
Guy