# US 8,751,669 B2 · Method and arrangement to maintain a TCP connection

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,751,669 B2
- Document ID: US8751669B2
- Status: Granted
- Kind: B2
- Application number: 12/808,555
- Filed: 2007-12-20
- Published: 2011-06-02
- Granted: 2014-06-10
- Earliest claimed: 2007-12-20
- Assignees: Telefonaktiebolaget L M Ericsson (publ)
- Applicants: Anders Eriksson
- Inventors: Anders Eriksson
- Web page: https://patentgrep.com/patent/US8751669B2

## CPC

- H04L 67/14: Session management (for real-time applications in data packet communications networks H04L65/1066)
- H04L 67/04: specially adapted for terminals or networks with limited capabilities; specially adapted for terminal portability
- H04L 67/145: avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
- H04L 69/163: In-band adaptation of TCP data exchange; In-band control procedures
- H04L 69/16: Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present invention relates to a method and an arrangement to maintain a TCP connection (230) between two hosts (140, 250) in a multi-hop network (110,120). If the connection (230) is inactive (no IP packets sent or received) during a certain period of time, it may happen that the connection (230) is released by certain intermediate network entities such as a Network Address Translation NAT function (130). The current invention overcomes this problem by sending keep-alive packets (210) from one of the hosts (250) towards the other (140) at regular intervals. Said packets (210) prevent the NAT (130) from releasing the connection (230). In order to not disturb the other host (140) e.g. a mobile terminal in a sleeping mode, the keep-alive packets (210) are adapted in such way that they are sent far enough to reach the NAT (130) but not all way to the other host (140).

## Claims

### Claim 1

A method of maintaining a connection established in a multi-hop network between a first host and a second host and passing through at least one network node that is designed to release the connection after a certain time of inactivity the method comprising the steps of:
sending from the first host towards the second host at least one probe packet having a time-to-live information field set to a probe value Lprobe;
receiving either a corresponding acknowledge packet ACK or a corresponding time-to-live exceeded packet;
decrementing the probe value Lprobe if an acknowledge packet ACK is received or incrementing the probe value Lprobe if a time-to-live exceeded packet is received;
repeating the steps using a binary search algorithm until a hop value LHV has been determined that is less than the number of hops the probe packet needs to make in order to reach the second host but greater than or equal to the number of hops the probe packet needs to make in order to reach the network node;
wherein a number of probe packets that need to be sent in order to determine the hop value LHV is equal to log 2(Lmax), wherein Lmax is equal to a maximum number of hops; and
sending a keep-alive packet from the first host towards the second host where the keep-alive packet is designed to delay the release of the connection and having a time-to-live information field set to the hop value LHV.

### Claim 2 (depends on 1)

The method as in claim 1, wherein the step of sending the keep-alive packet is repeated at regular time intervals.

### Claim 3 (depends on 1)

The method as in claim 1, wherein the set of steps of determining the hop value LHV is repeated at regular time intervals.

### Claim 4 (depends on 1)

The method as in claim 1, wherein the probe packet is a payload carrying packet.

### Claim 5 (depends on 1)

The method as in claim 1, wherein the connection is a TCP connection, the network node is a Network Address Translation function (NAT), the first host is a server and the second host is a mobile terminal.

### Claim 6 (depends on 1)

The method as in claim 1, wherein the hop value LHV is unique for each connection.

### Claim 7 (depends on 1)

The method as in claim 1, wherein the keep-alive packet is configured to start a timer.

### Claim 8 (depends on 1)

The method as in claim 1, wherein the first host is a server including a processor.

### Claim 9

A host adapted to maintain a connection established in a multi-hop network with another host passing through a network node that is designed to release the connection after a certain time of inactivity, comprising:
a processor, configured to:
provide a probe packet having a time-to-live information field set a probe value Lprobe;
receive either an acknowledge packet ACK or a time-to-live exceeded packet;
decrement the probe value Lprobe if the acknowledge packet ACK is received or increment the probe value Lprobe if the time-to-live exceeded packet is received;
perform a binary search algorithm to determine a hop value LHV that is less than a number of hops the probe packet needs to make to reach the another host but greater than or equal to the number of hops the probe packet needs to make to reach the network node;
wherein a number of probe packets that need to be sent in order to determine the hop value LHV is equal to log 2(Lmax), wherein Lmax is equal to a maximum number of hops; and
provide a keep-alive packet for the another host designed to delay a release of the connection and having a time-to-live information field set to the hop value LHV.

### Claim 10 (depends on 9)

The host as in claim 9, wherein said processor is configured to provide the keep-alive packet at a regular interval.

### Claim 11 (depends on 9)

The host as in claim 9, wherein the processor is configured to determine the hop value LHV at a regular time interval.

### Claim 12 (depends on 9)

The host as in claim 9, wherein the probe packet is a payload carrying packet.

### Claim 13 (depends on 9)

The host as in claim 9, wherein the connection is a TCP connection and the network node is a Network Address Translation (NAT) function.

### Claim 14 (depends on 9)

The hoot as in claim 9, wherein the host is a server.

### Claim 15 (depends on 9)

The host as in claim 9, wherein the another host is a mobile terminal.

### Claim 16 (depends on 9)

The host as in claim 9, further comprising a transmitter device configured to send the probe packet toward the another host and send the keep-alive packet toward the another host.

### Claim 17 (depends on 9)

The host as in claim 9, further comprising a receiver device configured to receive either the acknowledge packet ACK or the time-to-live exceeded packet.

### Claim 18 (depends on 9)

The host as in claim 9, wherein the hop value LHV is unique for each connection.

### Claim 19 (depends on 9)

The host as in claim 9, wherein the keep-alive packet is configured to start a timer.

### Claim 20 (depends on 9)

The host as in claim 9, wherein the processor is configured to employ a history of acknowledge packets ACK or time-to-live exceeded packets to set the probe value Lprobe.
