REVERSE FORWARDING INFORMATION BASE ENFORCEMENT
A router determines whether or not to establish a stateful routing session based on the suitability of one or more candidate return path interfaces. This determination is made when a first packet for a new session arrives at the router on a given ingress interface. For example, the router may be configured to require the ingress interface be used for the return path of the session, and the router may evaluate whether the ingress interface is suitable for the return path and may drop the session if the ingress interface is unsuitable for the return path. In other examples, the router may be configured to not require that the ingress interface be used for the return path, and the router may evaluate whether at least one interface is suitable for the return path and drop the session if no interface is suitable for the return path.
1 . A router comprising:
storage media; and
processing circuitry in communication with the storage media, the processing circuitry configured to:
determine whether the router supports a first route for forwarding, using a first candidate interface, one or more packets in a reverse packet flow corresponding to one or more packets in a forward packet flow;
based at least in part on a determination that the router does not support the first route for forwarding, using the first candidate interface, the one or more packets in the reverse packet flow, determine whether the router supports a second route for forwarding, using a second candidate interface, the one or more packets in the reverse packet flow; and
establish a stateful routing session using the second candidate interface for the reverse packet flow.
2 . The router of claim 1 , wherein to determine whether the router supports the second route, the processing circuitry is configured to determine that a forwarding information base (FIB) of the router stores the second route.
3 . The router of claim 1 , wherein to determine whether the router supports the second route, the processing circuitry is configured to determine that a routing information base (RIB) of the router stores the second route.
4 . The router of claim 1 , wherein to determine whether the router supports the second route, the processing circuitry is configured to determine that a next-hop of the second route is associated with the second candidate interface.
5 . The router of claim 1 , wherein the processing circuitry is further configured to receive, using an interface, the one or more packets in the forward packet flow.
6 . The router of claim 5 , wherein the interface comprises one of the first candidate interface or the second candidate interface.
7 . The router of claim 5 , wherein the interface is different from the first candidate interface and the second candidate interface.
8 . The router of claim 1 , wherein the processing circuitry is configured to establish the stateful routing session using the second candidate interface for the reverse packet flow after receiving the one or more packets in the forward packet flow and prior to forwarding the one or more packets in the forward packet flow.
9 . The router of claim 1 , wherein the processing circuitry is further configured to forward, using the second candidate interface, the one or more packets in the reverse packet flow.
10 . The router of claim 1 , to establish the stateful routing session, and after a determination that the router supports the second route for forwarding, using the second candidate interface, the one or more packets in the reverse packet flow, the processing circuitry is configured to:
modify the one or more packets in the forward packet flow to include metadata specifying a session identifier for the stateful routing session; and
forward, to a next-hop for the forward packet flow, the modified one or more packets.
11 . A method comprising:
determining, by a router, whether the router supports a first route for forwarding, using a first candidate interface, one or more packets in a reverse packet flow corresponding to one or more packets in a forward packet flow;
based at least in part on determining that the router does not support the first route for forwarding, using the first candidate interface, the one or more packets in the reverse packet flow, determining, by the router, whether the router supports a second route for forwarding, using a second candidate interface, the one or more packets in the reverse packet flow; and
establishing, by the router, a stateful routing session using the second candidate interface for the reverse packet flow.
12 . The method of claim 11 , wherein determining whether the router supports the second route comprises determining that a forwarding information base (FIB) of the router stores the second route.
13 . The method of claim 11 , wherein determining whether the router supports the second route comprises determining that a routing information base (RIB) of the router stores the second route.
14 . The method of claim 11 , wherein determining whether the router supports the second route comprises determining that a next-hop of the second route is associated with the second candidate interface.
15 . The method of claim 11 , further comprising receiving, by the router and using an interface, the one or more packets in the forward packet flow.
16 . The method of claim 15 , wherein the interface comprises one of the first candidate interface or the second candidate interface.
17 . The method of claim 15 , wherein the interface is different from the first candidate interface and the second candidate interface.
18 . The method of claim 11 , wherein establishing the stateful routing session using the second candidate interface for the reverse packet flow is after receiving the one or more packets in the forward packet flow and prior to forwarding the one or more packets in the forward packet flow.
19 . The method of claim 11 , further comprising forwarding, by the router and using the second candidate interface, the one or more packets in the reverse packet flow.
20 . Non-transitory, computer-readable media comprising instructions that, when executed, are configured to cause processing circuitry to:
determine whether a router supports a first route for forwarding, using a first candidate interface, one or more packets in a reverse packet flow corresponding to one or more packets in a forward packet flow;
based at least in part on determining that the router does not support the first route for forwarding, using the first candidate interface, the one or more packets in the reverse packet flow, determine whether the router supports a second route for forwarding, using a second candidate interface, the one or more packets in the reverse packet flow; and
establish a stateful routing session using the second candidate interface for the reverse packet flow.