All host mapping is writing in one line.
set interfaces dummy dum100 address '10.0.10.100/32' set interfaces dummy dum100 address '10.0.10.101/32' set interfaces dummy dum100 address '10.0.10.103/32' set system static-host-mapping host-name test1 inet '10.0.10.100' set system static-host-mapping host-name test2 inet '10.0.10.101' set system static-host-mapping host-name test3 inet '10.0.10.103'
File hosts
[email protected]:~$ cat /etc/hosts ### Autogenerated by VyOS ### ### Do not edit, your changes will get overwritten ### # Local host 127.0.0.1 localhost 127.0.1.1 r12 # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters # From 'system static-host-mapping' and DHCP server # system 10.0.10.100 test110.0.10.101 test210.0.10.103 [email protected]:~$
Incorrect record And test3 host mapping wrong
[email protected]:~$ ping test1 ping: Unknown host: test1 [email protected]:~$ [email protected]:~$ ping test2 ping: Unknown host: test2 [email protected]:~$ [email protected]:~$ ping test3 PING test110.0.10.101 (10.0.10.100) 56(84) bytes of data. 64 bytes from test110.0.10.101 (10.0.10.100): icmp_seq=1 ttl=64 time=0.027 ms 64 bytes from test110.0.10.101 (10.0.10.100): icmp_seq=2 ttl=64 time=0.038 ms