Skip to content

Host Naming Convention

Overview

Onagre enforces strict validation for hostnames, fully qualified domain names (FQDNs), and IP addresses to ensure compatibility with networking standards. Hosts must adhere to one of the following formats:

Hostname Validation Examples

Hostname Valid? Explanation
example.com ✅ Yes Valid domain name.
sub.domain.com ✅ Yes Valid subdomain.
localhost ✅ Yes Common local hostname.
a-b-c123.net ✅ Yes Valid use of letters, numbers, and hyphens.
-invalid.com ❌ No Cannot start with a hyphen (-).
verylonglabelnameover63characterslong.example.com ❌ No A label exceeds 63 characters.
example..com ❌ No Double dots .. are not allowed.
example.com- ❌ No Cannot end with a hyphen (-).
_invalid.com ❌ No Underscores (_) are not allowed in hostnames.
123..example.com ❌ No Consecutive dots are not valid.

Fully Qualified Domain Name (FQDN) Examples

FQDN Valid? Explanation
server.example.com ✅ Yes Common fully qualified domain name.
my-host.example.net ✅ Yes Valid use of hyphen in a subdomain.
api.sub.example.org ✅ Yes Valid multiple subdomain levels.
web1.example.co.uk ✅ Yes Valid domain with country code TLD.
12345.example.com ✅ Yes Hostnames can be fully numeric.
host..example.com ❌ No Double dots .. are not valid.
invalid.-example.com ❌ No A label cannot start with a hyphen (-).
sub_domain.example.com ❌ No Underscores (_) are not allowed.
ex@mple.com ❌ No Special characters are not allowed.
veryverylonghostnameover63characterslong.example.com ❌ No A label exceeds the 63-character limit.

IPv4 Validation Examples

IPv4 Address Valid? Explanation
192.168.1.1 ✅ Yes Common private address.
127.0.0.1 ✅ Yes Loopback address (localhost).
300.168.1.1 ❌ No 300 exceeds the valid range (0-255).
192.168.1.256 ❌ No 256 exceeds the valid range (0-255).
192.168.01.1 ❌ No Leading zeroes are not allowed (01).
192.168.1 ❌ No Incomplete (missing an octet).
192.168.1.1.1 ❌ No Too many octets (should have 4).
192.168..1.1 ❌ No Double .. is not allowed.
abc.def.gha.bcd ❌ No Contains invalid characters (letters).

IPv6 Validation Examples

IPv6 Address Valid? Explanation
2001:db8::ff00:42:8329 ✅ Yes Valid IPv6 address using ::.
2001:0db8:85a3:0000:0000:8a2e:0370:7334 ✅ Yes Fully expanded IPv6 address.
::1 ✅ Yes Loopback address (equivalent to 127.0.0.1 in IPv4).
:: ✅ Yes Unspecified address (default).
fe80::1 ✅ Yes Valid link-local address.
2001:db8:::1 ❌ No Too many colons (::: is not allowed).
2001:ghij::1 ❌ No Contains non-hexadecimal letters (g-j).
2001::12345 ❌ No A segment exceeds ffff (max 0-FFFF).
1234::5678::9abc ❌ No Double :: is not allowed in multiple places.
::ffff:192.168.1.256 ❌ No Invalid embedded IPv4 (256).

Summary

Onagre follows strict hostname, FQDN, and IP validation rules based on networking standards. Ensuring that all inputs conform to these guidelines prevents misconfigurations and enhances reliability within the platform.