Score:0

Set up a static ip on Ubuntu

eg flag

I have the VM Ubuntu version it has a first static IP fixed. I'm trying to add two others and change the default gateway but I can't, because when I finish the configuration and reboot the server all of this conf is removed.

Here are the commands that I used to configure the static IP:

sudo ip addr add IP address/netmask dev ens256
sudo ip link set dev ens256 up

I have another issue, I can't change the default gateway, below the command line that I used so the error message told me that the gateway already exists and I can't change it.

sudo IP route add default via IP gateway 

Could you help me to change the gateway then set up two other static IPs.? Please note that the VM is not connected to the internet.

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.