setting multiple hostnames on a single ip


#1

Hello folks

I’m trying to figure how to assign multiple hostnames to a single ip by configuration mode.

I did the following…
set system host-name ‘test-01 test-01.vyos.com mylocalhost’ no-concatenate
Configuration path: system host-name [test-01 test01-vyos.com mylocalhost] is not
valid
Set failed

So, is directly adding new host names in /etc/hosts is the only solution?

Anyone help?


#2

it depends what is your actual need.

Why do you need to assign “multiple hostnames” ?

A machine has 1 hostname but can serve different services for any URL / URI / addresses you need.

It’s usually DNS records that point to the IP of the machine.

Please explain the complete case so we can point you to the right solution.


#3

I am trying run my PC-router as a virtual host server, by way of introducing proxmoxVE hyper-visor to vyos.

Following proxmox how-to wiki, several names were given to a host.
https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Wheezy#Install_a_standard_Debian_Wheezy_.28amd64.29

to JFL
I’m sorry I don’t have a good answer to your question.
I don’t know in which particular service proxmox servers are needing different names. I’m an at start-level learner for proxmox and sticking to their guide would surely save future troubles.

Anyhow, returning to the vyos configuration mode, is it odd that set no-concatenate doesn’t work for setting multiple hostnames? If someone have already managed, please kindly advice.


#4

This is actually a bad idea to add proxmox on top of vyos.

you will break many things during updates of either system.

Just run vyos in a VM on proxmox, I did it for a long time until I finally got my Edge Router Lite.

PS. You don’t actually need multiple hostnames. The instructions just tell you that you need the ability to RESOLVE by hostname. It does not mean you need multiples.


#5

Thank you for your advise pirateghost.
I will set up a clean proxmox server later.
But for now my motivation is to know what vyos config mode can do and cannot do.

So, is there a way to write multiple hostnames through config mode? or only by way of directly changing /etc/hosts.


#6

You don’t need multiple host names. :wink: