Pre-requirements
- Administrator access to Plesk control panel.
- Basic understanding of DNS and reverse DNS (PTR) records.
- Understanding of IP addressing and subnet calculations.
Issue
When attempting to add a PTR record with a subnet mask other than 8, 16, or 24 in Plesk (Domains > example.com > DNS Settings > Add Record), you may encounter the following error:
Incorrect DNS Record parameter values were specified
Cause
This error is due to a limitation in Plesk, which currently only supports subnet masks of 8, 16, or 24 when adding PTR records. This is a known issue tracked under feature request ID #PPPM-5231, and is planned to be addressed in future updates.
Resolution
To resolve the issue, configure PTR records with supported subnet masks (8, 16, or 24) in Plesk. Here's how:
Steps to Add PTR Record with Subnet Mask of 8, 16, or 24
- Log into your Plesk control panel as an administrator.
- Go to Domains > example.com > DNS Settings.
- Click Add Record.
- For the PTR Record, specify a subnet mask of 8, 16, or 24.
- Click OK to save and apply the changes.
Gotchas to Avoid
- Ensure that the subnet mask matches either 8, 16, or 24. Attempting to use unsupported subnet masks will result in the same error.
- Understand that this is a temporary workaround until Plesk implements support for additional subnet masks in a future update.
How to Calculate Subnets and Subnet Masks
A subnet mask defines how an IP address is divided into network and host portions. Common subnet masks include /8, /16, and /24, each representing different numbers of available host addresses within a network. Here’s a quick guide to calculating subnet masks:
Common Subnet Masks and Ranges
Subnet Mask | CIDR Notation | Number of Host IPs |
---|---|---|
255.0.0.0 | /8 | 16,777,214 |
255.255.0.0 | /16 | 65,534 |
255.255.255.0 | /24 | 254 |
How to Calculate a Subnet
To calculate subnets, you can break an IP address range into smaller networks. For example, a /24 subnet allows for 254 usable IP addresses, while a /16 subnet provides up to 65,534 usable IP addresses.
Formula for calculating host addresses:
Hosts per subnet = 2^(32 - subnet bits) - 2
For example, with a /24 subnet (255.255.255.0), there are 8 bits remaining for host addresses:
2^(32 - 24) - 2 = 254 usable addresses
Tools for subnet calculation:
- Online Subnet Calculator
- Use the Linux command
ipcalc
to calculate subnets:
Linux Command to Calculate Subnets
# Install ipcalc (Debian/Ubuntu)
sudo apt-get install ipcalc
# Example command to calculate a /24 subnet
ipcalc 192.168.1.0/24
Example Output
Address: 192.168.1.0
Netmask: 255.255.255.0 = 24
Wildcard: 0.0.0.255
Hosts/Net: 254
Linux Commands to Manage PTR Records and DNS
Check DNS Records for PTR
To verify if the PTR record exists, you can use the following command:
dig -x $localServer.IP
Add PTR Records via CLI (Linux)
If you're managing DNS via the command line, use the following commands to add or remove PTR records:
- Add PTR record:
plesk bin dns --add example.com -ptr 203.0.113.1 mail.example.com.
- Remove PTR record:
plesk bin dns --del example.com -ptr 203.0.113.1 mail.example.com.
Although Plesk currently restricts PTR records to subnet masks of 8, 16, or 24, you can work around this limitation by configuring your DNS zones accordingly. Understanding subnet mask calculations can help you make informed decisions when setting up DNS and PTR records. For more information on DNS management, visit our Knowledge Base.