Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

source-based-fpolicy-statementorwarding

Syntax

Hierarchy Level

Description

Source based forwarding is used to provide value added services where paths through the network are selected based on the packet’s source address. In some deployments, the destination node of the packet, identified by the protocol next hop, stays the same, but the path through the network may vary.

In some deployments, the destination of the packet changes too. In this scenario, separate forwarding tables are used for traffic forwarding, and traffic is steered into these tables based on the packet's source address.

PTX routers provide a mechanism to conditionally route a packet with a specific source IP address via a specific forwarding table. When a packet arrives at the router interface, the source IP address information is retrieved from the packet, and a source lookup is performed in the forwarding table using the packet's source IP address. If a match is found in the forwarding table, the matching route in the forwarding table has the details on which forwarding table to lookup the destination IP address for this packet. Subsequently, the destination IP address and next-hop is used from the designated forwarding table to forward the packet.

This type of conditional traffic steering is done only after initial configuration. You initially configure policy options and within the policy options, under a policy statement, for a match criteria, specify the forwarding table for this route, from where the destination IP address and next-hop is retrieved to forward the packet. In the following example, a packet with BGP community c1 is matched in the from clause, and the matching packet's forwarding table specified in the then clause.

You then include the policy in a forwarding table export policy.

You have to enable the interface to do a source lookup when the packet arrives at the interface - you use the source-lookup configuration statement to enable the interface to do a source lookup. You can enable source-lookup per interface, per routing protocol family, for INET or INET6. You cannot use source-lookup along with Source Class Usage (SCU). In the following example, source-lookup is enabled for an interface at the [edit interfaces] hierarchy of the CLI.

Note:
  • Only the table prefixes - inet.0, inet6.0 and instance tables (including L3vVPN prefixes) are supported.

  • The source-lookup configuration statement cannot be used alongside source-class-usage configuration statement (set interfaces interface name unit unit number family routing protocol family source-class-usage). But because souce-lookup is enabled per family for INET or INET 6, there can be a situation where INET has source-lookup enabled and INET6 has source-class-usage enabled - this use case is supported.

  • After configuring the policy, issue show policy policy name to display the configured policy, like in the following example.

  • You can use the show route extensive command to display whether a source-lookup for the route is being performed. In the following output, the Opaque Data field displays Source Based Forwarding details.

Required Privilege Level

routing

routing-control

interface

interface-control

Release Information

Statement introduced in Junos OS Evolved Release 24.4R1