Set static IP | Network interface | debian
Text Only
# 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 # commented out
# add static settings
iface ens18 inet static
# IP address
address 192.168.1.33
# network address
network 192.168.1.0
# subnet mask
netmask 255.255.255.0
# broadcast address
broadcast 192.168.1.255
# default gateway
gateway 192.168.1.1
# name server
dns-nameservers 1.1.1.1
ens18 - example interface
Restart
Nameserver
Unit resolvconf.service could not be found. Unit NetworkManager.service could not be found.
Disable IPv6
- as root
Check with: