When configuring BOSH Director tile on Ops Manager, user can input a list of external name servers for the network to be added, as shown by the below image.
However, the user might want to know how many external servers that can be configured in the DNS box.
Tanzu Operations Manager with Ubuntu Stemcells
The configured external name servers on BOSH Director will be sent to bosh-agent on VM deployed by the director. And the bosh-agent will then setup the name servers in OS associated with the stemcell. So the answer would depend on which Ubuntu stemcell release is use to create the VM.
Jammy Stemcells
The name servers added as part of the network config on BOSH Director tile will get written out on bosh-agent bootstrap to the /etc/resolv.conf.d/base file, and then resolvconf -u will be run to update /etc/resolv.conf with those entires.
However, there is a hard limit for resolvconf -u to only read the first three entries in the /etc/resolv.conf.d/base file and update file /etc/resolv.conf. Refer to the man page of resolv.conf for more details.
Therefore, at most three name servers configured in BOSH Director could be used even if there are more than three name servers put into the DNS box.
# cat /etc/resolv.conf
# This file was automatically updated by bosh-dns
nameserver 169.##.##.2
nameserver IP1
nameserver IP2
nameserver IP3
Noble Stemcells
The configured name servers on BOSH Director will be written out as system service system-resolved conf files. The bosh-dns component then uses resolvectl to configure itself as the resolver for bosh-dns domains and all name servers configured on BOSH Director will be used by the resolver. For example,
# cat /etc/systemd/resolved.conf.d/10-bosh.conf
# Generated by bosh-agent
[Resolve]
DNS=IP1,IP2,IP3,IP4,IP5
# cat /etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.##.##.53
options edns0 trust-ad
search .
If you want to use different name server to resolve specific domain, check out this KB article: DNS Resolution Configuration Per Domain
More information about bosh-dns is available on BOSH documentation website.