Setting Static IPV4 In Debian

Set Static IP

nano /etc/network/interfaces
auto ens18
allow-hotplug ens18
iface ens18 inet static
      hwaddress ether 00:0c:29:d4:6b:14
      address 192.168.1.160
      netmask 255.255.255.0
      gateway 192.168.1.1

auto ens19
allow-hotplug ens19
iface ens19 inet static
      hwaddress ether 00:0c:29:d4:6b:1e
      address 10.0.0.160
      netmask 255.255.255.0

Restart Networking

/etc/init.d/networking restart

Was this helpful?

0 / 0