Static IP Configuration

Debian / Ubuntu

ifupdown

Edit /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
source /etc/network/interfaces.d/*

auto eth0
iface eth0 inet static
        address <Your IPv4 address>/32
        gateway 100.100.0.0
        pointopoint 100.100.0.0
        dns-nameservers 23.143.176.176 23.143.176.177

iface eth0 inet6 static
        address <Your IPv6 address>/64
        gateway fe80::1

And delete /etc/network/interfaces.d/eth0

Fedora / CentOS / AlmaLinux / Rocky Linux

Edit /etc/cloud/cloud.cfg.d/98-disable-network.cfg:

network:
  config: disabled

Edit /etc/sysconfig/network-scripts/ifcfg-eth0:

BOOTPROTO=static
DEVICE=eth0
DEFROUTE=yes
HWADDR=<Your MAC address, can be found via `ip l`>
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPADDR=<Your IPv4 address>
NETMASK=255.255.255.255
DNS1=23.143.176.176
DNS2=23.143.176.177
IPV6ADDR=<Your IPv6 address>/64
IPV6INIT=yes
IPV6_DEFAULTGW=fe80::1%eth0
IPV6_DEFAULTDEV=eth0

Edit /etc/sysconfig/network-scripts/route-eth0:

100.100.0.0/32 dev eth0
default via 100.100.0.0 dev eth0

RouterOS

/ip address add address=<Your IPv4 Address> interface=ether1 network=100.100.0.0
/ip route add distance=1 gateway=100.100.0.0

/ipv6 address add address=<Your IPv6 Address>/64 interface=ether1 advertise=yes
/ipv6 route add gateway=fe80::1%ether1

VyOS

set interfaces ethernet eth0 address <Your IPv4 Address>/32
set protocols static route 100.100.0.0/32 interface eth0
set protocols static route 0.0.0.0/0 next-hop 100.100.0.0