Field types

Every type a doc type's field can have, and the network types that read what you paste and show the block for you.

A doc type is an ordered set of typed fields, and the type decides how a value is entered, checked, shown, and searched. The type is picked when a field is added, on the doc type under Admin → Doc types or as a local field from inside a document, and can be changed later on the field’s edit page.

Changing the type converts each document’s value where it fits the new type: a VLAN typed as text becomes a number, 10.0.0.5 in a text field becomes an IP address, a dropdown’s option becomes its label in a text field. A value that doesn’t fit is kept as it was, and the doc type page says how many were converted and kept. Moving a dropdown to another option list, or changing a MAC field’s format, converts the same way. Document links and secret references are never converted, and the change is in the audit log with the old type.

TypeHolds
Text, Markdown, Rich textWords. Markdown and Rich text keep headings, lists, tables, and checklists
Number, Date, URL, Yes / noOne value of that kind
Dropdown, Multi-select dropdownOne or several options from a shared list, with a + to add an option inline
Link to documentAnother document, of the doc type the field names
SecretA reference into your vault, never the secret itself
IP address, IP address list, Network (CIDR), IP rangeAddresses and blocks, IPv4 or IPv6
MAC address, VLAN ID, HostnameThe rest of what identifies a device on a network
Port, Port range, Port list, AS numberServices and routing

Why network details have types of their own

An address typed into a text field is only as good as whoever typed it: 10.0.0.5, 10.0.0.5/24, and 10.0.0.5 255.255.255.0 are the same thing written three ways, and nothing stops 10.0.0.300. A typed field takes any of the common spellings, refuses what is not an address, and saves one form, so the document reads the same whoever filled it in and the API hands an integration a value it can parse.

Each type reads what you paste: a whole value goes into the right controls in one go, and a list fills a row per entry.

Addresses and blocks

  • IP address. An address with a prefix (/nn) selector beside it. Leave the prefix blank for a single address: it is saved as /32 (IPv4) or /128 (IPv6). Pick one such as /24 to record the subnet the address sits on, and the document works out that network for you. Pasting 10.0.0.5/24 or 10.0.0.5 255.255.255.0 fills both controls. An address that is a network’s own address, which no host can use, gets a note suggesting a Network field instead.
  • IP address list. Several addresses in order, such as DNS servers: put the primary first. Each row works like an IP address field, and pasting a whole list fills a row for each.
  • Network (CIDR). A whole block rather than one host. The prefix is required, and the network address is taken from it on save: 192.168.1.77/24 is kept as 192.168.1.0/24.
  • IP range. A first and a last address, such as a DHCP pool. Both ends must be IPv4, or both IPv6, and the field shows how many addresses the range holds.

On the document, an address or network is badged Address or Network, and Block details lists the network, subnet mask, wildcard mask, broadcast, usable range, usable addresses, and total addresses, so nobody has to open a subnet calculator to read a firewall document.

Devices

  • MAC address. Whatever is typed or pasted is rewritten straight away in one format, and saved that way: colons, hyphens, dotted groups of four, or no separators, in upper or lower case. The instance default is under Admin → Settings → Network fields; a field can choose a format of its own. Addresses already saved are shown in the format in force now, and search finds a MAC however it is spelled. A locally administered address (set by software or by hand, not by the maker) is labeled as one.
  • VLAN ID. A whole number from 1 to 4094.
  • Hostname. A short name such as fw01, or a fully qualified one such as fw01.example.com. Saved in lowercase.

Services and routing

  • Port. One port from 1 to 65535, with a protocol selector beside it: TCP, UDP, both, or left blank. Pasting 443/tcp or tcp 443 fills both, a known service name such as https is read as its port, and the field says which service a well-known port usually is.
  • Port range. A first and a last port, such as 5060-5080 for a phone system, with a protocol. Leave the last port blank for a single port.
  • Port list. Several ports or ranges in order, such as what a firewall rule opens. Each row has a first and a last port and its own protocol; pasting 80, 443/tcp, 5060-5080/udp fills a row for each.
  • AS number. An autonomous system number, such as an ISP’s. Type 13335 or paste AS13335; it is saved as the number and shown as AS13335. Private, documentation, and reserved numbers are labeled as such.

Over the API

Values are keyed by field id, and the network types come back normalized: "10.0.0.5/24", ["80/tcp", "443/tcp"], a number for a VLAN or an AS number. The REST API topic has the stored form and what each type accepts on write.

The starter doc types use these types on ISP, Firewall, Switch, Wi-Fi, Printer, and Server, and in the new Network doc type.