Mitigation of missing session data for routing session
View Patent ↗Techniques are disclosed for mitigating lost state data for a communication session by a network device performing session-based routing. For example, in response to determining a first network device has not received packets of a reverse packet flow of a session from a second network device, the first network device sends, to the second network device, a first packet including first metadata comprising a first control message querying a health of the session. The first network device receives, from the second network device, a second control message requesting second metadata for reestablishing the session, the second control message sent in response to the first control message. The first network device sends a second packet of the forward packet flow including the second metadata for reestablishing the session to the second network device. The second network device recovers lost state data for the session using the second metadata.
1 . A first network device comprising:
processing circuitry in communication with storage media, the processing circuitry configured to:
send a first packet of a forward packet flow to a second network device, wherein a session between a first client device and a second client device comprises the forward packet flow and a reverse packet flow, wherein the first packet originates from the first client device, and wherein the first packet includes a first header, a first payload, and is modified by the first network device to include first metadata comprising a first control message configured to query a health of the session;
receive, from the second network device, a second control message configured to request second metadata for reestablishing the session; and
in response to receiving the second control message, send a second packet of the forward packet flow to the second network device, wherein the second packet originates from the first client device, and wherein the second packet includes a second header, a second payload, and is modified by the first network device to include the second metadata for reestablishing the session.
2 . The first network device of claim 1 , wherein the second metadata comprises a session identifier for the session.
3 . The first network device of claim 2 , wherein the session identifier is a 5-tuple comprising a source address and a source port for the first client device, a destination address and a destination port for the second client device, and a network protocol.
4 . The first network device of claim 1 , wherein the first network device comprises an ingress router of a service provider network and the second network device comprises an egress router of the service provider network.
5 . The first network device of claim 1 ,
wherein the first control message configured to query the health of the session comprises a type-length-value (TLV) message that includes a message type, a message length, and a message value, and
wherein the message value specifies at least one of a session health check request or a session timeout request.
6 . The first network device of claim 1 , wherein the processing circuitry is configured to modify the first packet to include the first control message in response to determining that the first network device has not received a packet of the reverse packet flow of the session from the second network device for a predetermined amount of time.
7 . The first network device of claim 1 , wherein the processing circuitry is further configured to:
receive, from the second network device, a second packet of a second forward packet flow comprising third metadata comprising a third control message configured to query a health of a second session comprising the second forward packet flow and a second reverse packet flow;
determine that the first network device does not possess state data for the second session specified by the third control message;
in response to determining that the first network device does not include the state data for the second session, send, to the second network device, a fourth control message configured to request fourth metadata for reestablishing the second session;
receive, from the second network device, a third packet including the fourth metadata for reestablishing the second session; and
define the state data for the second session based on the fourth metadata.
8 . The first network device of claim 7 , wherein the processing circuitry is configured to:
prior to receiving the third packet including the fourth metadata for the second session, receive, from the second network device, a fourth packet for the second session that does not include metadata for the second session;
determine that the first network device does not possess state data for the second session; and
drop the fourth packet in response to determining that the first network device does not include state data for the second session.
9 . The first network device of claim 7 , wherein to determine that the first network device does not possess state data for the second session, the processing circuitry is configured to determine that a session table of the first network device does not include an entry for the session specified by the third control message.
10 . The first network device of claim 1 , wherein the second control message configured to request second metadata for reestablishing the session is sent in response to the first control message configured to query the health of the session.
11 . A method, comprising:
sending, by a first network device, a first packet of a forward packet flow to a second network device, wherein a session between a first client device and a second client device comprises the forward packet flow and a reverse packet flow, wherein the first packet originates from the first client device, and wherein the first packet includes a first header, a first payload, and is modified by the first network device to include first metadata comprising a first control message configured to query a health of the session;
receiving, by the first network device and from the second network device, a second control message configured to request second metadata for reestablishing the session; and
in response to receiving the second control message, sending, by the first network device, a second packet of the forward packet flow to the second network device, wherein the second packet originates from the first client device, and wherein the second packet includes a second header, a second payload, and is modified by the first network device to include the second metadata for reestablishing the session.
12 . The method of claim 11 , wherein the second metadata comprises a session identifier for the session.
13 . The method of claim 12 , wherein the session identifier is a 5-tuple comprising a source address and a source port for the first client device, a destination address and a destination port for the second client device, and a network protocol.
14 . The method of claim 11 , wherein the first network device comprises an ingress router of a service provider network and the second network device comprises an egress router of the service provider network.
15 . The method of claim 11 ,
wherein the first control message configured to query the health of the session comprises a type-length-value (TLV) message that includes a message type, a message length, and a message value, and
wherein the message value specifies at least one of a session health check request or a session timeout request.
16 . The method of claim 11 , further comprising modifying, by the first network device, the first packet to include the first control message in response to determining that the first network device has not received a packet of the reverse packet flow of the session from the second network device for a predetermined amount of time.
17 . The method of claim 11 , further comprising:
receiving, by the first network device and from the second network device, a second packet of a second forward packet flow comprising third metadata comprising a third control message configured to query a health of a second session comprising the second forward packet flow and a second reverse packet flow;
determining, by the first network device, that the first network device does not possess state data for the second session specified by the third control message;
in response to determining that the first network device does not include the state data for the second session, sending, by the first network device and to the second network device, a fourth control message configured to request fourth metadata for reestablishing the second session;
receiving, by the first network device and from the second network device, a third packet including the fourth metadata for reestablishing the second session; and
defining, by the first network device, the state data for the second session based on the fourth metadata.
18 . The method of claim 17 , further comprising:
prior to receiving the third packet including the fourth metadata for the second session, receiving, by the first network device and from the second network device, a fourth packet for the second session that does not include metadata for the second session;
determining, by the first network device, that the first network device does not possess state data for the second session; and
dropping, by the first network device, the fourth packet in response to determining that the first network device does not include state data for the second session.
19 . The method of claim 17 , wherein determining that the first network device does not possess state data for the second session comprises determining that a session table of the first network device does not include an entry for the session specified by the third control message.
20 . Non-transitory, computer-readable storage media comprising instructions that, when executed, cause processing circuitry of a first network device to:
send a first packet of a forward packet flow to a second network device, wherein a session between a first client device and a second client device comprises the forward packet flow and a reverse packet flow, wherein the first packet originates from the first client device, and wherein the first packet includes a first header, a first payload, and is modified by the first network device to include first metadata comprising a first control message configured to query a health of the session;
receive, from the second network device, a second control message configured to request second metadata for reestablishing the session; and
in response to receiving the second control message, send a second packet of the forward packet flow to the second network device, wherein the second packet originates from the first client device, and wherein the second packet includes a second header, a second payload, and is modified by the first network device to include the second metadata for reestablishing the session.