🌐 Networking Intermediate

What is network tunneling?

Answer

Network tunneling encapsulates one network protocol inside another, allowing traffic to traverse networks that would otherwise not support it. Tunneling creates a virtual point-to-point connection (the tunnel) between two endpoints. Common tunneling protocols: GRE (Generic Routing Encapsulation) — encapsulates any Layer 3 protocol inside IP packets; no encryption (often combined with IPsec). IPsec tunnel mode — encrypted IP-in-IP tunneling for VPNs. L2TP (Layer 2 Tunneling Protocol) — encapsulates PPP frames, often used with IPsec for VPNs. VXLAN (Virtual Extensible LAN) — encapsulates Layer 2 Ethernet frames in UDP packets to extend VLANs across Layer 3 networks; widely used in data centers and cloud. SSH tunneling — forward TCP ports through an encrypted SSH connection. Tunneling enables: connecting networks with different protocols, bypassing firewalls (also used for evasion, which is a security concern), and creating logical overlays over physical networks.