Score:0

how to configure a network interface on ubuntu server 22.04 lts?

so flag

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?

pt flag
What does your `/etc/netplan` file look like? What actions did you take after modifying that file?
Karichi avatar
so flag
# 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 avatar
so flag
after editing the ip address in the file I executed sudo netplan apply
pt flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.