0

I have a server with only one network card (enp2s0) and I would like to have two IP addresses on two different networks. However, I would like to have one static IP and one using DHCP.

The first network on which I want a static IP is: 128.10.100.1/24. This first network is only composed of 2 servers: this one and an other one, which has a static IP as well 128.10.100.11 The second network on which I want a DHCP attributed address is: 10.2.14.1/24. This network is connected to internet through a router. It can have other devices and this is the reason why I don't want to have a static IP. To avoid any conflict. Here is my netplan configuration so far:

network:
 renderer: networked
 version: 2
 ethernets:
  enp2s0:
    dhcp4: true
    dhcp6: false
    addresses:
     - 128.10.100.40/24
    gateway4: 10.2.14.254
    nameservers:
     addresses: [8.8.4.4, 8.8.8.8]

My hope was to have my static IP 128.10.100.40 and a DHCP attributed IP (like 10.2.14.10 for example). However the Netplan configuration does not work, I don't receive any IP on the network 10.2.14.1/24.

Is this the correct way to do it ? Is there another way I should look at ?

Thanks for your help

NB : It is worth mentioning that I don't have access to the router, and I cannot setup an IP linked the MAC address directly on the router.

Bastien
  • 11
  • 1

0 Answers0