Static IPv4/IPv6 Addresses - Debian 11
Here’s how to set both static IPv4 and IPv6 addressing on Debian 11. The new portions are outlined in italics.
First, edit /etc/network/interfaces
auto lo
auto ens192
iface lo inet loopback
# The primary network interface
allow-hotplug ens192
iface ens192 inet static
address _**{{ ipv4.address }}**_
gateway _**{{ ipv4.gateway }}**_
iface ens192 inet6 static
address _**{{ ipv6.address }}**_
gateway _**{{ ipv6.gateway }}**_
Then, restart your networking stack:
systemctl restart networking