When alpine linux asks for ipv4 address from dhcp server, it is not sending hostname to dhcp server. So I cant access by server's hostname in LAN. Here is my setup
I am using Alpine Linux 3.12 on my VM (not container), and arch is aarch64.
The router runs openwrt 19.07.3 and BusyBox is v1.31.1
My config:
nodeprealp99:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname nodeprealp99
I also tried with this:
nodeprealp99:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname nodeprealp99
udhcpc_opts -h $HOSTNAME
I appreciate your help
Best Answer
I have ended up using dhclient, which is also very lightweight
create a config file at /etc/dhcp/dhclient.conf
and reboot