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.
| Type | Holds |
|---|---|
| Text, Markdown, Rich text | Words. Markdown and Rich text keep headings, lists, tables, and checklists |
| Number, Date, URL, Yes / no | One value of that kind |
| Dropdown, Multi-select dropdown | One or several options from a shared list, with a + to add an option inline |
| Link to document | Another document, of the doc type the field names |
| Secret | A reference into your vault, never the secret itself |
| IP address, IP address list, Network (CIDR), IP range | Addresses and blocks, IPv4 or IPv6 |
| MAC address, VLAN ID, Hostname | The rest of what identifies a device on a network |
| Port, Port range, Port list, AS number | Services 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/24to record the subnet the address sits on, and the document works out that network for you. Pasting10.0.0.5/24or10.0.0.5 255.255.255.0fills 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/24is kept as192.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 asfw01.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/tcportcp 443fills both, a known service name such ashttpsis 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-5080for 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/udpfills a row for each. - AS number. An autonomous system number, such as an ISP’s. Type
13335or pasteAS13335; it is saved as the number and shown asAS13335. 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.