In Linux we have several diffent and network types, which are capable of supporting simple desktop connectivity to complex distributed cloud environments. Thats why most of the Cloud Infrastructure are built behind Linux and *BSD systems.

Understanding Linux network types is fundamental for system administrators, SREs, and engineers working with containers, Kubernetes, virtualization, and network isolation.

This article tries to explains the most important Linux network types, some of their use cases, and practical examples using iproute2.

1. Physical Network Interface (Ethernet)

This is the actual hardware network interface controller (NIC). It connects the system to a physical network.

Common names:

  • eth0
  • enp0s1
  • ens0

Use cases

  • Connecting servers
  • Internet connectivity

To list interfaces you can type:

# ip link show
1: ens0: <BROADCAST,MULTICAST,UP,LOWER_UP>

Assign IP address:

ip addr add 192.168.1.10/24 dev ens0
ip link set ens0 up

2. Loopback Interface

The loopback interface allows a system to communicate with itself through using the Interface name: lo and IP range: 127.0.0.0/8

Use cases

  • Local service communication
  • Database access (localhost)
  • Internal testing
ping 127.0.0.1
curl http://127.0.0.1

3. Bridge Network

A bridge connects multiple interfaces at Layer 2, acting like a virtual switch, generally the bridge has a prefix name with br.

Common in:

  • Virtual machines
  • Containers and Kubernetes

Use cases

  • Connecting VMs to physical network
  • Container networking
  • Virtual switches
# creating a simple bridge:
ip link add br0 type bridge
ip link set br0 up

ip link set ens0 master br0
ip link set ens1 master br0

ip addr add 192.168.1.20/24 dev br0

4. VLAN (Virtual LAN)

VLANs allow segmentation of networks logically on the same physical interface.

Operates at Layer 2 using tagging (802.1Q).

Use cases

  • Network segmentation
  • Multi-tenant infrastructure
  • Datacenter isolation

Create VLAN 100:

# creating a VLAN with ID 100:
ip link add link ens0 name ens0.100 type vlan id 100
ip link set ens0.100 up
ip addr add 10.100.0.1/24 dev ens0.100

5. Virtual Ethernet Pair (veth)

A veth pair acts like a virtual cable connecting two interfaces.

Used heavily by:

  • Containers and Kubernetes
  • Network namespaces

Use cases

  • Container networking
  • Namespace communication
# creating a veth
ip link add veth0 type veth peer name veth1
# enabling the veth
ip link set veth0 up
ip link set veth1 up

6. Network Namespaces

Network namespaces isolate network environments and they are independent from host.

Each namespace has:

  • Interfaces and Routes
  • Firewall rules

Use cases

  • Containers and Kubernetes pods
  • Network isolation
# creating a namespace
ip netns add ns1

# move interface to ns
ip link set veth1 netns ns1

# executing a command inside namespace to check the IP
ip netns exec ns1 ip addr

7. TUN (Layer 3 Tunnel)

TUN devices operate at Layer 3 (IP level).

Used for routing IP packets.

Use cases

  • VPNs (WireGuard, OpenVPN)
  • Secure tunnels
# creating and assigning an IP to a tun interface
ip tuntap add dev tun0 mode tun
ip link set tun0 up
ip addr add 10.0.0.1/24 dev tun0

8. TAP (Layer 2 Tunnel)

TAP devices operate at Layer 2 (Ethernet level).

Simulates Ethernet device.

Use cases

  • Virtual machines
  • Bridged networking
  • QEMU/KVM virtualization

Create TAP:

# creating a TAP interface
ip tuntap add dev tap0 mode tap
ip link set tap0 up

# attaching it to a bridge inteface
ip link set tap0 master br0

9. VXLAN (Overlay Network)

VXLAN allows Layer 2 networks over Layer 3 infrastructure. Used heavily in:

  • Kubernetes
  • Cloud networking
  • Overlay networks

Use cases

  • Multi-node container networking
  • Overlay networks

Create VXLAN:

# creating a VXLAN
ip link add vxlan0 type vxlan id 100 dev ens0 remote 192.168.1.50 dstport 4789
ip link set vxlan0 up

# assigning IP
ip addr add 10.200.0.1/24 dev vxlan0

10. Dummy Interface

Dummy interfaces simulate network interfaces. No real traffic.

Use cases

  • Testing
  • Virtual IP assignment
  • Failover systems
ip link add dummy0 type dummy
ip link set dummy0 up
ip addr add 10.10.10.1/32 dev dummy0

How to Visualize All Network Types

# showing intefaces
ip -c link show

# showing routes
ip route show

# showing namespaces
ip netns list

Linux networking provides are the base of network infrastructure such as containers, Kubernetes, virtualization, and VPNs. Most cloud-native networking is built using combinations of:

  • namespaces
  • veth
  • bridges
  • vxlan

Understanding these primitives allows full control and deep troubleshooting capabilities in distributed systems. Hope you like it!