1 Introduction

The transmission control protocol (TCP) conveys the vast majority of the traffic with more than 90% of bytes. The reliability of data transmission keeps TCP remains the dominating transport protocol in the internet network [14, 27]. However, with the increase of applications running on top of TCP and the demand for a high-speed network, TCP reveals some shortcomings such as low network throughput due to slow ramp-up mechanism or unfairness in network resource sharing with other data flows [11, 25]. For these reasons, researchers are encouraged to investigate TCP in more detail in order to provide a better solution for solving these existed problems [3, 4, 16, 20, 25].

In order to understand the root causes of unfairness problem, the complexity of TCP traffic is needed to be classified. In this study, TCP traffic is divided into short-lived and long-lived TCP based on their size of data and their life transmission time [23, 32]. In another study, by investigating the lifetime and transfer size of each TCP flow, L. Guo and I. Matta discovered TCP flows follow a heavy-tailed distribution in which only a small percentage (e.g., less than 20%) of flows are long-lived TCP (e.g., more than 20 packets), but they carry more than 80% of the total traffic in bytes [6, 17]. The vulnerability of long-lived TCP can state that the unfairness problem flows in sharing network resources [5]. Because of its significant amount of data, long-lived TCP flows need a long transmission time to finish its transaction. Hence, it is usually affected by other flows in network resource sharing. In detail, UDP flows usually occupy more than their fair share of the bandwidth. Short-lived TCP affects long-lived TCP by reducing its network throughput by up to 10% as the study in [9, 15, 34].

The basis of TCP congestion control lies in the additive increase multiplicative decrease mechanism (AIMD) [10]. The congestion window is halved for every window containing a packet loss and is increased roughly by one segment per round-trip time (RTT). By this mechanism, standard TCP is successful at low speeds; however, it is not suitable for high-speed communication due to its slow grow-up of congestion window size when congestion occurs. In other words, standard TCP is not efficient for high speeds of data communication, which is currently a high demand for all TCP applications [31, 35]. For these reasons, it is crucial to develop a new transport mechanism for improving network performance and reduce the impaction between long-lived TCP flows and other network flows [30].

In this paper, a new transport mechanism is proposed with a novel mechanism to solve the stated unfairness problems and to improve the network throughput of long-lived TCP by modifying the edge network Equationuipment in the following process. First, edge routers will be responsible for classifying flows and marking packets, whether they belong to long-lived or other flows. Second, once a flow is classified into a long-lived TCP flow, edge routers will be able to control the flow by providing a set of traffic regulation mechanisms. A mechanism for predicting the traffic level is firstly defined. Based on the predicted traffic level, we can decide to regulate the long-lived TCP by either reducing its data rate or splitting its connection to increasing the data speed. In order to highlight the advantage of the proposed transport mechanism, we develop two probability models for estimating the packet loss rate and several traversed hops, which respectively denote for the reliability and resource consumption and then compare with the conventional TCP. Furthermore, we perform an extensive set of ns-2 simulation experiments in a variety of scenarios in order to verify the analytical models. The analytical results and the supporting experimental outcomes show the following:

  • When the error rate is high, ALL-TCP achieves higher reliability than the conventional system.

  • In the proposed model, the lost packets are retransmitted from the edge router instead of retransmitting from the source node; hence the number of traversal hops will be reduced. In other words, the proposed model will be better than conventional in terms of resource consumption.

  • The experiments show that our proposed model obtains higher throughput than the conventional. The reason is that the RTT of each segment is shorter than the end-to-end RTT, and the transmission process in each segment is independent of the others.

The rest of the paper is organized as follows. Section 2 outlines related works and positions our analysis concerning prior studies. In Section 3, we present the proposed framework in the viewpoint of architecture and operation mechanism. In Section 4, we develop the analytical models to highlight the advantages of our new transportation mechanism in terms of reliability and resource consumption and further conduct an extensive of ns-2 experiments to validate the accuracy of our analytical model. Finally, Section 5 concludes the paper with final remarks.

2 Related work

TCP has been recognized as the most important transport layer protocol for the Internet. It is distinguished by its reliable transmission, flow control, and congestion control [8, 26]. The literature on TCP protocol is considerable; however, it is out of the scope of this paper to present a comprehensive survey. Hence, the most related papers have been reviewed in this section in terms of long-lived TCP regarding network performance and unfairness issues. There is a real unfairness issue amongst long-lived TCP, UDP, and short-lived TCP in sharing network resources. As mentioned earlier in the introduction of this paper, UDP flows usually use more than their fair share of the bandwidth. However, there is no existing solution for solving the impact of UDP to other network flows because UDP is connectionless; it does not provide mechanisms to control the end-to-end data flow [24]. Hence, most of the researches focus on TCP traffics, connection-oriented protocol. The complexity of TCP unfairness is not only reflected by the competition in network resources between UDP and TCP traffics but also between the short and long-lived TCP. Short-lived TCP flows may reduce up to 10% in the throughput of the long-lived flows [17]. In order to resolve the unfairness problems, several types of research have been proposed. We can classify previous works into two aspects. First, the solutions that are given for general network traffic (i.e., TCP and UDP). Second, specific consideration will explore the unfairness of TCP traffics in detail regarding long-lived and short-lived TCP flows.

The general unfairness problems were early recognized and mentioned in [13, 28]. These papers focused on improving network fairness by either modifying TCP protocol or by employing non-tail-drop buffer management at routers. In particular, in [2], Morris proposes solutions to regulate the data traffics by providing per-flow information at all routers. In [28], Seddigh et al. propose a new packet dropping mechanism. These solutions show significant results; however, they require modifications on all routers which are unfeasible in deployments. The studies in [1, 7, 19, 33] aim to provide traffic metering and dropping mechanisms at the edge routers only with expected bandwidth or fairness guarantees. These researches are considered as an improvement to different services [22], which only provides several class priorities. Their dropping mechanism will base on the user profiles, which supplied vary of dropping level. Their result outcomes show the number of benefits to the network service provider. However, it is challenging to deploy in the overall network because the idea of the open internet is nowadays considered a significant stream in the network society. Many research aims to provide free internet service with high performance. In this paper, we aim to improve the network performance of long-lived TCP and reduce the unfairness in the network but not aiming at any specific users or any individual services. Most of the routers nowadays are green routers, which can modify their power plan to balancing their service rate according to network traffic, switching, and transmission capacity.

These are also several researches focused on analyzing the fairness between long-lived and short-lived TCP. The competition between long-lived and short-lived is early mentioned in [36]. The solution for solving this problem is proposed by I. Matta and L. Guo in [18]. In this paper, they provide a mechanism for isolating low and long TCP flows and then enhance response time and fairness of low flows. The significant results are given. However, the bandwidth (load) control is needed to perform at each core router. X. Wu and I. Nikolaidis proposed algorithms to classify schemes based on lifetime (short us. long-lived flows) and RTT attributes, as well as their combinations in order to provide a better TCP classification schemes. The double objective served by the classification schemes is to satisfy the need for reduced response time, which is the primary concern of short-lived flows, while at the same time ensuring fairness among long-lived flows [4]. In [12, 17], they try to improve the network fairness and to improve the network performance of short-lived TCP flows by suggesting to either using a considerable initial window value or sharing the network measurement information from previous records. These papers require modifying the TCP protocol at the end-host terminals and may lead to congestion collapse.

From different approaches, we provide a new framework to improve the network performance of long-lived TCP flow and to reduce its impaction to other network traffic flows. The following proposed mechanisms highlight our advantages by comparing them with previous studies. First, in order to avoid the unfairness problem, long-lived TCP is controlled separately by classifying the TCP traffics based on the amount of data passing by edge routers. Second, the FARIMA technology, a well-known predicting mechanism in an internet network, is used for determining the traffic level, which is a critical input factor for regulating network traffic. Third, based on the predicted traffic level, the edge device will decide whether it will activate the splitting mechanism for increasing the data transmission process or activate the slow-down mechanism for reducing the transmission speed of controlled, long-lived TCP flows when our edge network equipment is nearly overflowed. We believe that those upgraded mechanisms will improve the performance of long-lived TCP and significantly reduce its impaction to other data flows.

3 Methodology

In this section, the proposed methodology is represented to show the general procedure in solving the mentioned problem. Figure 1 presents an overview of our proposed framework. Several modifications are prerequisites in the network edge routers. Because in the current operation of almost the router operating system, all IP packets received from the Ethernet driver will be intercepted and processed by the routing mechanism for selecting the next forwarding hop. Hence, in the first step, a hooking function is provided in order to intercept all IP packets and forward them into our provided ALL-TCP layer. Hooking function refers to a variety of techniques employed to prevent calls to pre-existing employment and wind around them to change the function’s behaviour at runtime. Second, in the proposed provided layer, a traffic level prediction function is proposed for estimating the traffics state at the next time interval, which is an essential input factor for traffic regulation mechanisms. Next, the packet classification mechanism is provided for selecting long-lived TCP flows from network traffics. In this stage, we can separate TCP traffics from other traffics based on the protocol field in the IP header and then determine the long-lived flow by counting the number of packets of each flow passing the network edge router (i.e., more significant than 30 packets). Finally, the traffic regulation mechanism is designed for regulating the long-lived TCP flows based on the traffic level predicted in the second step [33]. Algorithm 1 shows the algorithm of the proposed method. The complexity of the proposed algorithm approximates O (n*t), where n denote the number of packet and t denote the complexity of the hooking function. The follows descriptions regarding the proposed method process:

  • Hooking function: The hooking function is provided to intercept all IP packets and forward them into the suggested ALL-TCP layer.

  • Traffic level prediction function: A traffic level prediction function is presented for estimating the traffics state at the next time interval, which is an essential input factor for traffic regulation mechanisms.

  • Packet classification mechanism: The packet classification mechanism is provided for selecting long-lived TCP flows from network traffics. In this stage, we can separate TCP traffics from other traffics based on the protocol field in the IP header and then determine the long-lived flow by counting the number of packets of each flow passing the network edge router (i.e., more significant than 30 packets).

  • Traffic regulation mechanism: The traffic regulation mechanism is designed for regulating the long-lived TCP flows based on the traffic level predicted in traffic level prediction function [33].

Fig. 1
figure 1

The overview of proposed software architecture

In order to implement these mechanisms, two solutions are used depending on the operating system. If the internetwork operating system (IOS) is developed in the edge router, the device is upgraded by adding the ALL-TCP layer in its upper protocol stacks. A hooking function is also needed to integrate into the IOS kernel in order to intercept all IP packets and forward them to the ALL-TCP layer for further processing. After processing in our provided layer, packets are redirected to the routing and forwarding module for transmitting to the next hop. In the second solution, the edge router implements a like-Unix operating system, so a modified IP and TCP layers are needed to comfort with our framework. The following sub-sections discuss the following two main mechanisms, traffic level prediction and traffic regulation in more detail.

figure a

3.1 Traffic level prediction

It is important to choose the right prediction model amongst several current prediction techniques (i.e., artificial neural network, autoregressive integrated moving average (ARIMA), fractional ARIMA (FARIMA), and wavelet-based predictors). Because each prediction technology requires matched input parameters based on the characters of analytical data. In the field of the internet network, Feng and Shu [36] compared amongst these prediction technologies by using mean square error and normalized mean square error as performance metrics [29]. The result shows that FARIMA obtains a better accuracy result than others. Also, it may be noted that internet traffic is mainly based on the normal distribution which can be presented by: Y(t) = X(t) + μ, where μ is the mean rate, and X(t) is a stochastic process with a continuous spectrum and zero mean. The FARIMA process is also in this form. Due to the two above reasons, FARIMA is chosen for predicting the network traffic level in our edge device.

FARIMA is a prediction model, which is fitted by time series data either to better understand the data or to predict future points in the series. The goal of FARIMA is to estimate network traffic Y(t + τ) from the measured traffic history {Y(r) ∣ rϵ( −  ∞ , t]}. If given τ as the next control time interval. τ is a significant importance factor because it effects the trade-off between the processing time and the accuracy of prediction decision. For reducing the overhead of the network node processor and the update message in the routing protocol, Y(t + τ) must be predicted with an acceptable value of τ.

Assume that a confident prediction requires that the normalized interval τ -step prediction error (\( \overline{\mathrm{error}}\left(\uptau \right)=\frac{\hat{\mathrm{Y}}\ \left(\mathrm{t}+\uptau \right)-\mathrm{Y}\ \left(\mathrm{t}+\uptau \right)}{\hat{\mathrm{Y}}\ \left(\mathrm{t}+\uptau \right)} \)) should not exceed a percentage ε (e.g. 20%) with a probability Ρε. The maximum prediction interval (MPI) is defined as the follows Equation:

$$ \mathrm{MPI}=\max \Big\{\uptau \mid {\mathrm{P}}_{\overline{\mathrm{error}}}\left(\uptau, \upvarepsilon \right)\le {\mathrm{P}}_{\upvarepsilon} $$
(1)

where \( {\mathrm{P}}_{\overline{\mathrm{error}}}=\Pr \left(\overline{\mathrm{error}}\left(\uptau \right)>\upvarepsilon \right) \). \( {\mathrm{P}}_{\overline{\mathrm{error}}}\ \left(\uptau, \upvarepsilon \right) \) is Equation to P(Z > 0) where Z is a random variable of the Gaussian distribution with a probability density function \( \mathrm{N}\left(-\upvarepsilon \upmu, {\upsigma}_{\upvarepsilon, \uptau}^2\right) \).

Based on the Gaussian assumptions identified in this paper, the traffic could be presented by: Y(t) = X(t) + μ, where μ is the mean rate, and X(t) is a stochastic process with a continuous spectrum and zero mean. By applying the wold’s decomposition theorem, Gaussian process Y(t) can be represented by one-sided moving average as the follows Equation:

$$ \mathrm{Y}\left(\mathrm{t}\right)={\sum}_{\mathrm{u}=0}^{+\propto }{\mathrm{h}}_{\mathrm{u}}\mathrm{n}\left(\mathrm{t}-\mathrm{u}\right)+\upmu $$
(2)

where n(t) and hu denote Gaussian white noise and the possibly infinite vector of moving average weights (coefficients or parameters), respectively. The optimal τ − step predictor of the Gaussian process X(t + τ) is \( \hat{\mathrm{X}}\left(\mathrm{t}+\uptau \right)=\mathrm{E}\left[\mathrm{X}\left(\mathrm{t}+\uptau \right)|\mathrm{X}\left(\mathrm{s}\right),\mathrm{s}\le \mathrm{t}\right] \). Applying Kolmogorov’s approach, \( \hat{\mathrm{X}}\left(\mathrm{t}+\uptau \right) \) can expressed as the follows Equationuation:

$$ \hat{\mathrm{X}}\left(\mathrm{t}+\uptau \right)={\sum}_{\mathrm{u}=0}^{+\infty }{\mathrm{h}}_{\mathrm{u}+\uptau}\mathrm{n}\left(\mathrm{t}-\mathrm{u}\right). $$
(3)

Comparing to Eqs. (2) and (3), the unpredictable part in X(t + τ) is \( \sum \limits_{\mathrm{u}=0}^{\uptau -1}{\mathrm{h}}_{\mathrm{u}}\mathrm{n}\left(\mathrm{t}+\uptau -\mathrm{u}\right) \). So τ − step predictor variance \( \hat{\upsigma_{\uptau}^2} \) can be expressed in Eq. (4).

$$ \hat{\upsigma_{\uptau}^2}={\sum}_{\mathrm{u}=0}^{\uptau -1}{\mathrm{h}}_{\mathrm{u}}^2={\upsigma}^2-{\sum}_{\mathrm{u}=0}^{+\infty }{\mathrm{h}}_{\mathrm{u}}^2 $$
(4)

where σ2 is the variance of X(t). \( {\upsigma}_{\upvarepsilon, \uptau}^2 \)can be calculated by using Eq. (5).

$$ {\upsigma}_{\upvarepsilon, \uptau}^2={\sum}_{\mathrm{u}=0}^{\uptau -1}{\mathrm{h}}_{\mathrm{u}}^2+{\upvarepsilon}^2{\sum}_{\mathrm{u}=\uptau}^{+\infty }{\mathrm{h}}_{\mathrm{u}}^2=\left(1-{\upvarepsilon}^2\right)\hat{\upsigma_{\uptau}^2}+{\upvarepsilon}^2{\upsigma}^2. $$
(5)

From Eqs. (3) and (4),\( {\mathrm{P}}_{\overline{\mathrm{error}}}\left(\uptau, \upvarepsilon \right)\le {\mathrm{P}}_{\upvarepsilon} \) in Eq. (1) is equivalent to \( {\upsigma}_{\upvarepsilon, \uptau}^2\le \frac{\upvarepsilon^2{\upmu}^2}{\Phi^2\left(1-{\mathrm{P}}_{\upvarepsilon}\right)} \) where Ф(x) is the inverse CDF of N(0,1). From Eqs. (1) and (5), MPI can be given as:

$$ \mathrm{MPI}=\max \left\{\uptau |\ \frac{{\hat{\upsigma}}_{\mathrm{r}}^2}{\upsigma^2}\le \left(\frac{1}{{\mathrm{C}}^2{\Phi}^2\left(1-{\mathrm{P}}_{\upvarepsilon}\right)}-1\right)\frac{\upvarepsilon^2}{1-{\upvarepsilon}^2}\right\} $$
(6)

where C=σ/μ is the variance coefficient of Y(t).

3.2 Traffic regulation

Based on the traffic level, Y(t + τ) which is predicted at the next interval of the control time of τ, ALL-TCP agent will decide to either accept or refuse the new long-lived TCP flows [21].

In the first case, when the predicted traffic level is lower than the minimum threshold α. The new long-lived TCP flows will be accepted to enter the proposed traffic regulation module, where the long-lived TCP flow will be split into two sub-connections that work independently. From the functionality point of view, each edge network router operates as a destination host by sending acknowledgment messages for every received packet from the preceding node. Also, it contains functions that operate similarly to those in the conventional source host, in which it follows existing algorithms for sending data packets in response to incoming ACKs, multiple duplicate acknowledgments, or retransmit timeouts.

In the second case, if the predicted traffic level excesses the maximum threshold β, ALL-TCP will reduce the data rate of incoming traffic to avoid congestion state instead of accepting new connections. Random early detection protocol (RED) [11] is used to reduce the data rate of incoming traffic with a few modifications needed. In which, the algorithms for calculating the average queue length is replaced by FARIMA. The behavior of RED with UDP and short-lived TCP flows are remained the same as it does in original version. Howeve, we control the long-lived TCP flows is changed where the long-lived TCP flow that has the highest amount of buffered data in amongst existed long-lived TCP flows in edge router is selected for reducing data rate. This behavior will guarantee the fairness between long-lived TCP flows in resource sharing. For selecting the flow that has highest amount the stored data in buffer, we need to measure the incoming and outgoing packets rate of each long-lived TCP at the next time interval, t + τ separately. If the predicted incoming and outgoing packets of the preceding and the next segment at the next time interval are Yi(t+τ), Yo(t+τ) and the current stored data in the buffer is δ, then expected buffering data for the long-lived TCP flow can be measured as the follows Equation:

$$ \mathrm{B}\left(\mathrm{t}+\uptau \right)={\mathrm{Y}}_{\mathrm{i}}\left(\mathrm{t}+\uptau \right)-\Big(\updelta +{\mathrm{Y}}_{\mathrm{o}}\left(\mathrm{t}+\uptau \right) $$
(7)

The predicted incoming and outgoing packets of preceding and next segments are similarly determined based on the congestion window size at the next time interval of τ. For example, when the current congestion window size of the preceding segment is cwndi and its incoming packets arrive the edge router at the time before the predicted time interval, then Yi(t+τ) = cwndi + 1, otherwise Yi(t+τ) = 0. If Wmax presents for the maximum window size and an Ack message are sent to the sender after receiving a number of η data frames, then the value of the next congestion window size in the case of congestion free can be obtained by the follow Equation:

$$ {\mathrm{cwnd}}_{\mathrm{i}+1}=\left\{\begin{array}{c}{\mathrm{W}}_{\max,}\kern2em \mathrm{if}\ {\mathrm{cwnd}}_{\mathrm{i}+1}\ge {\mathrm{W}}_{\mathrm{max}}\\ {}{\mathrm{cwnd}}_{\mathrm{i}}+{\mathrm{cwnd}}_{\mathrm{i}}/\upeta, \mathrm{Otherwie}\end{array}\right. $$
(8)

In order to reduce the jitter problem at the end of the host terminal and to keep the allocated memory for each flow in the edge router at a minimal value, the data transmission rate between sub-segments of each long-lived TCP flow should be regulated based on the following ratio:

$$ \upgamma =\frac{\updelta +{\mathrm{cwnd}}_{\mathrm{i}+\mathrm{t}}}{\ {\mathrm{cwnd}}_{\mathrm{o}+\mathrm{t}}} $$
(9)

This ratio should be regulated at a value that higher or at least equal to 1 and does not exceed a defined maximum threshold (i.e., γ ≤ 2). When γ is out of the allowed range, the mechanism need to adjust the bias by delay sending packets or acknowledgment message of the sub-segment which has higher throughput. This mechanism is similar to TCP delayed acknowledgment that is proposed in [13].

4 Analysis and simulation

In the proposed traffic regulation module, each long-lived TCP is running based on segment-by-segment transportation (SBST). Hence, in Section A, we explore the advantages of SBST by comparing it with conventional end-to-end transportation (ETET) regarding reliability and resource consumption. In section B, simulated experiments by using the ns-2 tool are conducted to verify the analytical model and to investigate the network throughput of long-lived TCP further.

It’s hard to tune the SBST and ETET, because of the SBST is related to the data transformation to segments at the source node and reconstructed at the receiver. On the other hand, the ETET is related to different feature such as the flow controls rate and error detection, which make the tuning is hard to implement.

4.1 Fundamental of SBST and ETET

In this section, the network reliability and resource consumption of each transportation mechanism is measured by modeling the behavior of a packet. Which is when sent from the sender to the receiver. The reliability is presented by overall packet loss probability, while resource consumption can be measured based on the number of traversed routers that a packet needs to pass by in order to reach the receiver. The following assumptions are used in the proposed model:

  • pi: Packet loss probability at router i.

  • psi: Probability of a packet passing by router number i successfully.

  • pe: End-to-end packet loss probability.

  • ps: Probability of successfully sending a packet from the source to the destination.

  • n: The total number of routers in the network.

  • n1: The number of routers of the first segment.

  • n2: The number of routers of the second segment.

  • R: Maximum number of retransmissions.

4.1.1 Packet loss probability in ETET

The probability of sending a packet successfully from the sender to the receiver is defined as:

$$ {\mathrm{p}}_{\mathrm{s}}={\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right). $$
(10)

Hence, the probability of sending a packet unsuccessfully after R retransmission times is donated as follows:

$$ {\mathrm{p}}_{\mathrm{e}}={\left[1-{\mathrm{p}}_{\mathrm{s}}\right]}^{\mathrm{R}}={\left[1-{\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}}. $$
(11)

Assume that a packet is dropped at a random position k when transmitting to the receiver, then the probability of this event can be described as:

$$ {\mathrm{p}}_{{\mathrm{e}}_{\mathrm{k}}}={\mathrm{p}}_{\mathrm{k}}{\prod}_{\mathrm{i}=1}^{\mathrm{k}-1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right). $$
(12)

In one transmission time, the number of traversed routers of event that a packet may not reach the receiver is defined as the follows Equation:

$$ {\mathrm{h}}_{\mathrm{f}}={\sum}_{\mathrm{k}=1}^{\mathrm{n}-1}\frac{\mathrm{k}{\mathrm{p}}_{{\mathrm{e}}_{\mathrm{k}}}}{1-{\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)}={\sum}_{\mathrm{k}=1}^{\mathrm{n}-1}\left[\frac{\mathrm{k}\ {\mathrm{p}}_{\mathrm{k}}{\prod}_{\mathrm{i}=1}^{\mathrm{k}-1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)}{\ 1-{\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)}\right]. $$
(13)

Hence, the expected of total traversed routers of event that a packet cannot reach the receiver after a maximum number of retransmissions, R, is given as follows Equation:

$$ {\mathrm{h}}_{\mathrm{R}}={\mathrm{R}\mathrm{h}}_{\mathrm{f}}=\mathrm{R}{\sum}_{\mathrm{k}=1}^{\mathrm{n}-1}\left[\frac{\mathrm{k}\ {\mathrm{p}}_{\mathrm{k}}{\prod}_{\mathrm{i}=1}^{\mathrm{k}-1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)}{\ 1-{\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)}\right]. $$
(14)

The expected of traversed routers of event that a packet reaches a receiver after a number of r retransmissions time (r < R) are obtained by the follows Equation:

$$ {\mathrm{h}}_{\mathrm{r}}=\left(\mathrm{r}-1\right){\mathrm{h}}_{\mathrm{f}}+\mathrm{n}. $$
(15)

The probability of event that a packet may not reach the receiver after a maximum number of retransmissions, R, is presented by the follows Equation:

$$ {\mathrm{p}}_{\mathrm{R}}={\left[1-{\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}}. $$
(16)

The probability of event that a packet reaches to the receiver after a number of retransmissions r (r < R) is given as the follows Equation:

$$ {\mathrm{p}}_{\mathrm{r}}={\prod}_{\mathrm{j}=1}^{\mathrm{r}}{\left\{\left[1-{\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]\right\}}^{\mathrm{j}-1}{\prod}_{\mathrm{i}=1}^{\mathrm{n}}\left(1-{\mathrm{p}}_{\mathrm{i}}\right). $$
(17)

From Eqs. (14), (15), (16), and (17), the total expected of traversed routers when a packet is transmitted through an end-to-end connection is defined as the follows Equation:

$$ {\mathrm{h}}_{\mathrm{t}}={\sum}_{\mathrm{r}=1}^{\mathrm{R}-1}\left({\mathrm{p}}_{\mathrm{r}}{\mathrm{h}}_{\mathrm{r}}\right)+{\mathrm{p}}_{\mathrm{R}}{\mathrm{h}}_{\mathrm{R}}. $$
(18)

4.1.2 Packet loss probability in ETET

Packet loss probability in SBST is measured by aggregating the packet loss probability in the first and the second segments. The probability of event that a packet is transmitted successfully through the first segment is given as the follows Equation:

$$ {\mathrm{p}}_{{\mathrm{s}}_{\mathrm{i}1}}={\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right). $$
(19)

The probability of event in which a packet cannot reach the receiver after a maximum number of retransmissions, R, can then be:

$$ {\mathrm{p}}_{{\mathrm{e}}_1}={\left[1-{\mathrm{p}}_{{\mathrm{s}}_{\mathrm{i}1}}\right]}^{\mathrm{R}}={\left[1-{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}}. $$
(20)

Hence, the probability of an event in which a packet is transmitted successfully by passing through the first and second segments is defined sequentially as:

$$ {\mathrm{p}}_{{\mathrm{s}}_1}=1-{\mathrm{p}}_{{\mathrm{e}}_1}=1\hbox{--} {\left[1-{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}} $$
(21)
$$ {\mathrm{p}}_{{\mathrm{s}}_2}=1-{\mathrm{p}}_{{\mathrm{e}}_2}=1\hbox{--} {\left[1-{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_2}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}} $$
(22)

From Eq. (21) and (22), the probability of an event in which a packet is transmitted successfully from the sender to the receiver is described as follows:

$$ {\mathrm{p}}_{\mathrm{s}}={\mathrm{p}}_{{\mathrm{s}}_1}\ {\mathrm{p}}_{{\mathrm{s}}_2} $$
(23)

Therefore, the probability of an event in which a packet cannot reach the receiver after a maximum number of retransmissions, R can be obtained as follows:

$$ {\mathrm{p}}_{\mathrm{e}}=1-{\mathrm{p}}_{\mathrm{s}}=1\hbox{--} \left\{1\hbox{--} {\left[-{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_1}\left(1\kern0.5em {\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}}\right\}\ \left\{1\hbox{--} {\left[1{\prod}_{\mathrm{i}=1}^{\mathrm{n}-{\mathrm{n}}_1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}}\right\} $$
(24)

4.1.3 Resource consumption in SBST

Similar to Eq. (18), the expected total traversed routers that a packet needs to pass through the first segment (\( {\mathrm{h}}_{{\mathrm{t}}_1} \)) can be calculated as:

$$ {\mathrm{h}}_{{\mathrm{t}}_1}={\sum}_{\mathrm{r}=1}^{\mathrm{R}-1}\left({\mathrm{p}}_{{\mathrm{r}}_1}{\mathrm{h}}_{{\mathrm{r}}_1}\right)+{\mathrm{p}}_{{\mathrm{R}}_1}{\mathrm{h}}_{{\mathrm{R}}_1}, $$
(25)

where \( {\mathrm{p}}_{{\mathrm{r}}_1},{\mathrm{h}}_{{\mathrm{r}}_1} \) represent for the packet loss probability and number of traversed routers of event that a packet is transmitted successfully though the first segment, respectively. While, \( {\mathrm{p}}_{{\mathrm{R}}_1} \), \( {\mathrm{h}}_{{\mathrm{R}}_1} \)denote for the packet loss probability and number of traversed routers of event that a packet cannot reach the receiver after a maximum number of retransmission R. The probability of an event that a packet is transmitted successfully though the second segment after a number of retransmissions; k can be defined as the follows Equation:

$$ {\mathrm{p}}_{{\mathrm{r}}_2}=\left\{1-{\left[1-{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_1}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}}\right\}{\left[1-{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_2}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\left(\mathrm{k}-1\right)}\left[{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_2}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]. $$
(26)

The probability of an event that a packet cannot reach the destination after a maximum number of retransmissions, R, is given as follows Equation:

$$ {\mathrm{p}}_{{\mathrm{R}}_2}={\mathrm{p}}_{{\mathrm{r}}_1}{\left[1-{\prod}_{\mathrm{i}=1}^{{\mathrm{n}}_2}\left(1-{\mathrm{p}}_{\mathrm{i}}\right)\right]}^{\mathrm{R}}. $$
(27)

Similar to the analyses in (14) and (15), the number of traversed routers of events that a packet transmits through the second segment in both cases success and failure after a maximum number of retransmissions, R, can be represented as \( {\mathrm{h}}_{{\mathrm{r}}_1} \)and \( {\mathrm{h}}_{{\mathrm{r}}_2} \), respectively. From Eqs. (26) and (27), the overall traversed routers of event that a packet is transmitted through the second segment can be obtained as follows:

$$ {\mathrm{h}}_{{\mathrm{t}}_2}={\sum}_{{\mathrm{r}}_2=1}^{\mathrm{R}-1}\left({\mathrm{p}}_{{\mathrm{r}}_2}{\mathrm{h}}_{{\mathrm{r}}_2}\right)+{\mathrm{p}}_{{\mathrm{R}}_2}{\mathrm{h}}_{{\mathrm{R}}_2}. $$
(28)

From Eqs. (25) and (28), the overall number of traversed routers (ht) through which a packet passes in SBST is identified as:

$$ {\mathrm{h}}_{\mathrm{t}}={\mathrm{h}}_{{\mathrm{t}}_1}+{\mathrm{h}}_{{\mathrm{t}}_2}={\sum}_{\mathrm{r}=1}^{\mathrm{R}-1}\left({\mathrm{p}}_{{\mathrm{r}}_1}{\mathrm{h}}_{{\mathrm{r}}_1}\right)+{\mathrm{p}}_{{\mathrm{R}}_1}{\mathrm{h}}_{{\mathrm{R}}_1}+{\sum}_{{\mathrm{r}}_2=1}^{\mathrm{R}-1}\left({\mathrm{p}}_{{\mathrm{r}}_2}{\mathrm{h}}_{{\mathrm{r}}_2}\right)+{\mathrm{p}}_{{\mathrm{R}}_2}{\mathrm{h}}_{{\mathrm{R}}_2}. $$
(29)

4.1.4 Analytical results

The comparison results can be obtained based on the established Equations, which is given above by using MATLAB software package. The configure ration of the given parameters are set to n = 8, pi = 0.05, and R = 10 according to [3]. The packet loss probability of SBST and ETET are obtained by using Eqs. (11) and (24), respectively. The results in Fig. 2 show that the SBS is more reliable than the conventional ETET. The number of traversed routers is determined by using Eqs. (18) and (29). The results shown in Fig. 3 present that, in SBST, a packet needs to pass by a fewer number of routers to reach the receiver than in ETET. In other words, SBST consumes less network resource than the conventional ETET.

Fig. 2
figure 2

Network reliability comparison

Fig. 3
figure 3

Resource consumption comparison

4.2 Simulation experiments

We simulate ALL-TCP by modifying the implementation of the current Tahoe TCP in ns-2, which generally can be summarized as follows.

First, in order to provide mechanisms for sending packets, we redesign the packet sending module by driving from the TcpAgent class. Second, for acknowledging the received packet, an acknowledgment module is provided by driving from the TcpSink class. Each long-lived TCP flow is maintained and controlled by each flow separately, which includes both sending and acknowledgment modules. Third, because ns-2 currently provides a single point of packet entrance called entry (Which is a connector object). Each packet that enters the Node entry is directly forwarded to the address classifier module (i.e., Classifier instvar). If the Node is not the final destination, the address classifier will forward the packet to the link specified in the routing table. Therefore, we need to provide a hooking function.

In order to intercept packets and forward them to our provided ALL-TCP agent for further processing, our framework lie on the change in transport mechanism without modifying the original TCP protocol implemented in the end-host terminals. Hence, in a real implementation, the edge router is responsible for adapting with a different version of TCP, such as Reno, New-Reno, or SACK.

As we proposed in the Tcl simulated code, a network with four routers that connects two host terminals is created. Each link is configured to 4 Mb of bandwidth capacity, and 50 ms link-delay. We use link error instead of creating congestion in routers in order to create packet losses. The link error probability is similar to packet loss probability, p_i, which is used in our analytical model. The ALL-TCP agent is attached to router number 2 when we simulate for the proposed framework. The overview of our experiment configuration is shown in Fig. 4.

Fig. 4
figure 4

Experiment configuration

The first experiment aims to confirm the analytical model in section Packet Loss Probability in ETET, where the reliability of transmitting a packet via ALL-TCP is proved better than the conventional TCP. In this experiment, the amounts of dropped packets are measured by sending 2.000 packets via the network with different link error. The results from Figs. 5, 6, 7, and 8 show the amounts of dropped packets for link error: 0.025, 0.05, 0.075, and 0.1, respectively. The results show that the packet drop probability of the proposed framework is always smaller than the conventional Tahoe TCP. This conclusion confirms to our analytical model in section Packet Loss Probability in ETET.

Fig. 5
figure 5

Drop packets with link error 0.5

Fig. 6
figure 6

Drop packets with link error 0.75

Fig. 7
figure 7

Drop packets with link error 0.1

Fig. 8
figure 8

Throughput comparison in normal state with one ALL-TCP agent in deployment

In the ALL-TCP framework, each long-lived TCP connection is split into sub-connections that work simultaneously in the case that network traffic is lower than the minimum threshold value. It is because the round trip time of each sub-connection is shorter than the end-to-end RTT. Hence, ALL-TCP is expected to gain higher network throughput than the conventional TCP. In the second experiment, we try to measure the network throughput at the TCP Sink based on the number of received bytes in a fixed 0.8 s time scale. The results in Fig. 9 showed ALL-TCP achieves higher network throughput than the conventional Tahoe TCP and finishes the transmission of 2000 packets in a shorter time. The results (as shown in Fig. 10) are even better than if there are two ALL-TCP agents are deployed in the network.

Fig. 9
figure 9

Throughput comparision in normal state with two ALL-TCP agents in deployment

Fig. 10
figure 10

Lead time to recover congestion window size after congestion

In order to highlight the adaptive ability of the proposed framework, we measure the recovery time of congestion window size from the time of multiplicative decreasing until it recovers to the highest value. The results in Fig. 11 shows ALL-TCP quickly retrieve the highest congestion window size each time it incurs congestion. This advantage helps ALL-TCP not only get higher network throughput but also it is better in adaption to congestion. As well as, this Figure shows that ALL-TCP always get higher network throughput than Tahoe TCP in the case of network configuration with link error set to 0.1.

Fig. 11
figure 11

Throughput comparison with error link 0.1

5 Conclusion

In this paper, a novel protocol design is proposed to improve the network performance of long-lived TCP (ALL-TCP). ALL-TCP firstly separates long-lived TCP from other data flows. Secondly, the traffic regulation mechanism is proposed in which a number set of functions is provided to regular, and control long-lived TCP connections in an edge router. The results of the analytical models and an extensive set of ns-2 simulation showed the follows: 1) ALL-TCP is more reliable and consumes less energy than the conventional TCP in the case of high error rate in the network. 2) It always presents higher network throughput in both cases of congestion state or normal operation due to its shorter RTT. 3) Our modification is on the edge network equipment only, hence these are no effect to the end-host terminals. It could be deployed gradually in current TCP/IP networks with high scalability. 4) The network fairness is obtained because the long-lived TCP is separated from other data flows. For future work, the proposed mechanism can be modified to improve other TCP versions like BIC TCP or compound TCP, in hope to improve the enhance performance and fairness of long-lived TCP flows.