DEBIAN - /etc/network/interfaces Template


This is a Debian /etc/network/interfaces file example.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug ens18
#iface ens18 inet dhcp
auto ens18
iface ens18 inet static
    address V.W.X.Y/Z
    gateway V.W.X.Y
    up route add -net netmask gw
    down route del -net netmask gw

# The VLAN 666 over the ens18 interface
auto ens18.666
iface ens18.666 inet static
        vlan-raw-device ens18