ArticleslgStudy

computer science

Tunneling protocol

Tunneling protocol is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Tunneling protocol rather than just read about it. In short: In computer networks, a tunneling protocol is a communication protocol that allows for the movement of data from one network to another. They can, for example, allow private communications to be sent across a public network (such as the Internet), or for one network protocol to be carried over an incompatible network, through a process called encapsulation.

Tunneling protocol — main illustration
Tunneling protocol — illustration

Key takeaways

  • Tunneling protocol belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Tunneling protocol to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Tunneling protocol from memory before moving on to harder problems.

Reference excerpt

In computer networks, a tunneling protocol is a communication protocol that allows for the movement of data from one network to another. They can, for example, allow private communications to be sent across a public network (such as the Internet), or for one network protocol to be carried over an incompatible network, through a process called encapsulation. Because tunneling involves repackaging the traffic data into a different form, perhaps with encryption as standard, it can hide the nature of the traffic that is run through a tunnel. Tunneling protocols work by using the data portion of a packet (the payload) to carry the packets that actually provide the service. Tunneling uses a layered protocol model such as those of the OSI or TCP/IP protocol suite, but usually violates the layering when using the payload to carry a service not normally provided by the network. Typically, the delivery protocol operates at an equal or higher level in the layered model than the payload protocol.

Uses A tunneling protocol may, for example, allow a foreign protocol to run over a network that does not support that particular protocol, such as running IPv6 over IPv4. Another important use is to provide services that are impractical or unsafe to be offered using only the underlying network services, such as providing a corporate network address to a remote user whose physical network address is not part of the corporate network.

Circumventing firewall policy Users can also use tunneling to "sneak through" a firewall, using a protocol that the firewall would normally block, but "wrapped" inside a protocol that the firewall does not block, such as HTTP. If the firewall policy does not specifically exclude this kind of "wrapping", this trick can function to get around the intended firewall policy (or any set of interlocked firewall policies). Another HTTP-based tunneling method uses the HTTP CONNECT method/command. A client issues the HTTP CONNECT command to an HTTP proxy. The proxy then makes a TCP connection to a particular server:port, and relays data between that server:port and the client connection. Because this creates a security hole, CONNECT-capable HTTP proxies commonly restrict access to the CONNECT method. The proxy allows connections only to specific ports, such as 443 for HTTPS. Other tunneling methods able to bypass network firewalls make use of different protocols such as DNS, MQTT, and SMS.

Technical overview As an example of network layer over network layer, Generic Routing Encapsulation (GRE), a protocol running over IP (IP protocol number 47), often serves to carry IP packets, with RFC 1918 private addresses, over the Internet using delivery packets with public IP addresses. In this case, the delivery and payload protocols are the same, but the payload addresses are incompatible with those of the delivery network. It is also possible to establish a connection using the data link layer. The Layer 2 Tunneling Protocol (L2TP) allows the transmission of frames between two nodes. A tunnel is not encrypted by default: the TCP/IP protocol chosen determines the level of security. SSH uses port 22 to enable data encryption of payloads being transmitted over a public network (such as the Internet) connection, thereby providing VPN functionality. IPsec has an end-to-end Transport Mode, but can also operate in a tunneling mode through a trusted security gateway. To understand a particular protocol stack imposed by tunneling, network engineers must understand both the payload and delivery protocol sets.

Common tunneling protocols IP in IP (IP protocol 4): IP in IPv4/IPv6 SIT/IPv6 (IP protocol 41): IPv6 in IPv4/IPv6 GRE (IP protocol 47): Generic Routing Encapsulation OpenVPN (UDP port 1194) SSTP (TCP port 443): Secure Socket Tunneling Protocol IPSec (IP protocols 50 and 51): Internet Protocol Security L2TP (UDP port 1701): Layer 2 Tunneling Protocol L2TPv3 (IP protocol 115): Layer 2 Tunneling Protocol version 3 VXLAN (UDP port 4789): Virtual Extensible Local Area Network PPTP (TCP port 1723 for control, GRE for data): Point-to-Point Tunneling Protocol PPPoE (EtherType 0x8863 for control, 0x8864 for data): Point-to-Point Protocol over Ethernet GENEVE WireGuard (UDP dynamic port)

TCP meltdown problem Tunneling a TCP-encapsulating payload (such as PPP) over a TCP-based connection (such as SSH's port forwarding) is known as "TCP-over-TCP", and doing so can induce a dramatic loss in transmission performance — known as the TCP meltdown problem, which is why virtual private network (VPN) software may instead use a protocol simpler than TCP for the tunnel connection. The throughput of a TCP‑over‑TCP connection can be degraded because the control loops in the inner and outer TCPs interfere destructively with each other. Because TCP is designed to guarantee in‑order and complete packet delivery, the outer TCP masks the connection's health from the inner TCP. In normal TCP operation, packet loss is detected when the receiver replies with duplicate ACKs to a packet received before the missing packet in the sequence. In response, the sender retransmits the lost packet and halves the Congestion Window (CWND). In TCP‑over‑TCP, the outer TCP handles lost packets normally through retransmission and CWND reduction. Still, since the inner TCP has not received any information indicating latency in the connection, it continues to transmit packets at the rate currently governed by its CWND. Because the inner TCP’s CWND is greater than the outer TCP’s, the outer TCP’s send buffer eventually fills. As the buffer inflates, packets experience longer and more variable queueing delays before transmission, thereby increasing the outer TCP’s measured round-trip time (RTT) and RTT variability. This inflates its retransmission timeout (RTO). Once the send buffer becomes full, the tunnel process can no longer forward inner‑TCP ACKs, so the inner TCP stops receiving acknowledgments entirely. Because the inner TCP is no longer receiving ACKs, its RTO expires, causing it to retransmit the oldest unacknowledged segment and double its RTO. The inner TCP’s RTO then grows exponentially because it doubles with every timeout, and no ACKs are received to reset it. The result of a TCP meltdown is an outer TCP with a severely reduced CWND, an inflated RTO, and a full send buffer. This indicates that the inner TCP cannot write and that ACKs are not being sent in either direction.

… excerpt ends here. Continue reading the full article.

Illustrations

Tunneling protocol illustration

Worked examples

Example 1 — a first encounter with Tunneling protocol

Start with the simplest possible case. Write down what Tunneling protocol claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Tunneling protocol before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Tunneling protocol ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Tunneling protocol

In research
Tunneling protocol appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Tunneling protocol in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Tunneling protocol is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cybersecurity engineering, Network protocols, Tunneling protocols, so understanding it makes those chapters shorter.
In everyday life
Look for Tunneling protocol outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Tunneling protocol” →

How to study Tunneling protocol in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Tunneling protocol means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Tunneling protocol out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Tunneling protocol in simple terms?

In computer networks, a tunneling protocol is a communication protocol that allows for the movement of data from one network to another. They can, for example, allow private communications to be sent across a public network (such as the Internet), or for one network protocol to be carried over an i…

Why does Tunneling protocol matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Tunneling protocol?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Tunneling protocol.

Tags

  • Cybersecurity engineering
  • Network protocols
  • Tunneling protocols

Keep exploring