While writing a routing-policy term, an engineer at a regional ISP needs to match on the source protocol and prefix of incoming routes, separately from matching on which neighbor or protocol the route is being sent toward. Which two match-condition keywords in a Junos policy term correspond to these two directions?
Select an answer to reveal the explanation.
Short Explanation
A policy term splits its matching logic into two halves: from looks at where a route came from, like its source protocol or prefix, while the other half looks at where it's headed, like a particular neighbor or destination protocol. They're the two sides of the same term, checked together before any action fires. The other pairs listed are actions or flow-control keywords, not match conditions at all.
Full Explanation
Within a Junos policy term, the from condition matches characteristics of an incoming route, such as its source protocol, a prefix list, or a route-filter range, while the to condition matches characteristics of the route's destination, such as a specific neighbor address or the protocol it is being exported into. Together they let an engineer write precise terms, for example matching from protocol static combined with to a specific BGP neighbor, which is exactly the granularity a cooperative needs when deciding which subscriber static routes go to which upstream. Accept and reject are wrong because those are terminating actions applied inside the then clause after a match has already occurred, not the conditions used to perform the matching. Term and then are structural keywords, term names a block of match conditions and actions, then introduces the action clause, but neither one performs matching by itself. Next term and next policy are flow-control actions that direct evaluation to continue elsewhere in the policy or policy chain, again unrelated to defining what a route must look like to match. A caveat: a term with no from condition at all is treated as matching every route on that direction, which is a common source of an overly broad policy. A concrete check is show policy <policy-name> detail, which lists the exact from and to conditions and actions configured in each term.