0

I would like to configure the ethernet network interface of a server but I am completely lost. I saw on the internet that you could do it with the nmcli tool but also with netplan, I saw some people say that you had to modify configuration files but everyone was talking about different files.

I have so far added a static IP address to the server interface by editing the .yaml file located in /etc/netplan/ but now the interface has two IP addresses and I don't understand why.

So I would like to know how it is advised on ubuntu 22.04 server to configure a network interface and why have I now two ip addresses?

Karichi
  • 1
  • 2
  • What does your `/etc/netplan` file look like? What actions did you take after modifying that file? – larsks Nov 09 '22 at 16:13
  • # This is the network config written by 'subiquity' network: ethernets: ens33: addresses: [192.168.0.100/24] dhcp4: true nameservers: addresses: - 8.8.8.8 search: - voo.be version: 2 – Karichi Nov 09 '22 at 16:17
  • after editing the ip address in the file I executed sudo netplan apply – Karichi Nov 09 '22 at 16:19
  • 1
    In general, when folks ask for additional information (and in particular for file content), it's better to update your question (because posting file contents in a comment makes them very difficult to read). It looks like you are both setting a static address **and** setting `dhcp4: true`, so it's no surprise you're getting two addresses. Don't use DHCP if you don't want a dynamic address. – larsks Nov 09 '22 at 20:43

0 Answers0