DHCP and DNS Issue


#1

I’m setting up a demo lab using VyOS (for experience, not required) and have what is probably a simple question but I haven’t found the answer in the forum or using Google.

I have enabled DHCP on VyOS (Nov 2017 release) and my virtual machines are getting IP addresses just fine. They can ping each other by IP with no problem. What I’d like to be able to do is ping/access by name.

For example: server1 has an IP address of 192.168.37.101. Desktop1 at IP address 192.168.37.100 can ping server1 fine using “ping 192.168.37.101” but not when using “ping server1”.

Is it even possible using VyOS to do what I’m trying?

TIA


#2

Yes,
you may use static host mapping
set system static-host-mapping server1 inet 192.168.37.101


#3

Thanks, but that only works if DHCP assigns the same IP address every time. I didn’t see a way to use VyOS to do DHCP reservations. Even then, I may as well just assign IP instead of using DHCP.

It’s looking like the only solution is to add a DNS server to the network.


#4
service dhcp-server shared-network-name DHCP_Pool_ETH1 subnet 192.168.37.0/24 static-mapping <name> ip-address 192.168.37.101
service dhcp-server shared-network-name DHCP_Pool_ETH1 subnet 192.168.37.0/24 static-mapping <name> mac-address <macaddress>

#5

Thanks. That will get me what I need for now.

I appreciate the help.