Skip to content
Understanding DNS Flags in Besu
Nischal Sharma

Published On - June 6, 2023

Understanding DNS Flags in Besu

In the world of blockchain networks, configuration flexibility and dynamic updates are crucial for seamless operations. Hyperledger Besu, an enterprise-grade Ethereum client, offers powerful features like DNS flags that enable users to leverage domain names for network communication. This blog post aims to provide a comprehensive understanding of DNS flags in Besu, including their purpose, usage, and benefits.

What are DNS Flags?

DNS flags in Besu refer to command-line options that enable the use of domain names instead of IP addresses for network communication. These flags provide dynamic network configuration capabilities, allowing for easier management and flexibility in private permissioned networks.

When to Use DNS Flags

DNS flags are particularly useful in the following scenarios:
  • When we want to configure network using domain name instead of IP address, so it's easy to manage and map nodes

  • Dynamic IP addresses: When IP addresses of network nodes frequently change, using domain names simplifies the configuration process.

How to Use DNS Flags

To leverage DNS flags in Besu, follow these steps:
  1. Configure DNS reverse lookup: Ensure that DNS reverse lookup is properly configured to resolve domain names to IP addresses.

  2. Enable DNS support: Use the --Xdns-enabled=true flag when starting Besu to activate DNS support. This flag resolves the hostname during startup, and the resolved IP address remains static.

  3. Optional: Dynamic updates: If there is a need for more dynamic updates, such as for permissioning, add the --Xdns-update-enabled=true flag. This flag queries the DNS for IP address resolution each time, allowing for real-time updates. Note that trusting the DNS server used for IP resolution is crucial when using this flag.

Differences Between Flags

The --Xdns-enabled=true flag enables DNS support in Besu, allowing domain names to be used in network configurations. On the other hand, the --Xdns-update-enabled=true flag adds dynamic update functionality, continuously querying the DNS for IP resolution. The latter is particularly useful when dealing with frequently changing IP addresses.


Besu Version Compatibility

The --Xdns-enabled and --Xdns-update-enabled flags were introduced in Besu version 1.5.3. Furthermore, support for using DNS hostnames in on-chain node permissioning rules was added in Besu version 21.7.3.

 

References and Resources:

 

DNS flags in Hyperledger Besu offer a powerful toolset for dynamic network configuration and management. By enabling domain name support, Besu users can overcome the challenges and issues associated with changing IP addresses. Understanding and utilising DNS flags empowers blockchain developers to build more flexible and scalable network infrastructures.

For further assistance and support with Besu's DNS flags or private network setups, take a look at our Enterprise Blockchain Support offer or reach out to us directly, we're experts in blockchain solutions and Besu implementations.

 
 
The Chainlens Blockchain Explorer provides all of the business metrics you need to support your blockchain and smart contract applications.
We provide SLA-backed production support for Ethereum networks running Quorum and Hyperledger Besu.
Traditional financial markets infrastructure is being redefined by blockchain and DLT technology. We can ensure you’re prepared.
With dedicated support from the creators of Web3j you can ensure you have a trusted partner to support your most critical blockchain applications.
Hyperledger Besu