# Content Naming

Z-Mesh uses a hybrid naming scheme in which the NetID and Content Name fields are combined to create a unique Content Name address. There are several benefits to this approach:

  • A Z-Mesh Network is identified using a NetID and is somewhat akin to an IP subnet. This allows for localized Content Names while still being able to be addressable using the global NetID.
  • The NetID can be associated with the Internet IP-address of a Z-Mesh forwarder making it possible to use the Internet as back-bone for routing between NetID's.
  • Content Names are heirarchical and support up to 6 levels (Content Name is 6 bytes).
  • A Content Name can be translated from a URI to a Z-Mesh 6-byte Content Name that maps to the physical infrastructure.
  • Content Names support wildcard, this means that one can subscribe to multiple Content Names, without having to know the sources.

# Hierarchical

The Content Name URI (eg. location/cph/floor/1/event/temp) is mapped to a set of identifiers which is used as Content Name. As the Content Name URI is heirarchical, it is possible to exploit this for routing purposes (thus restricting mobility).

For example, the Content Name URI (eg. location/cph/floor/1/room/202/event/temp) can be mapped to the 6-byte Content Name in the following way: location-cph=0x02, floor2=0x02, room202=0x05, temp = 0x04 which could then translate to Content Name 020205040000. For a CO2-sensor on 4th floor in the Berlin office the mapping could look like this: location-berlin=0x03, floor4=0x04, room404=0x06, humid=0x06 which could then mapped to Content Name 030406080000.

Content Name byte position Content Name Verb Content Name Nouns
0 location cph=0x02, berlin=0x03 ...
1 Floor 2rd floor=0x02, 3rd floor=0x03, 4=0x04 ...
2 Room room201=0x04, room202=0x05, room404=0x06 ...
3 Sensor value Temp=0x4, Humid=0x06, CO2=0x08 ...

Hierarchical Content Names MAY allow for Wildcards. For example, to subscribe to all temperature readings from the entire Berlin office, one would simply replace floor and room values with the 0xFF wildcard-identifier in the content name: 03FFFF040000.

# Network-ID DNS helper records

For Internet applications communicating with Z-Mesh applications, additional information about the Network-ID and the naming scheme is needed.

Accessing a Z-Mesh resource using HTTP or MQTT gateway possible by translating the URI into a Z-Mesh Network-ID and Content Name.

# HTTP Gateway

Converting an HTTP temperature sensor URI to a Z-Mesh Network-ID/Content-Name:

https://hq-sensornet.my-corp.com/location/cph/floor/1/temp
        | ----- Hostname ------ | -------- Path -------- |
        | ---- Network-ID ----- | ---- Content Name ---- |

# MQTT Gateway

Mapping a MQTT Topic for a temperature sensor to a Content-Name:

headquarter-sensornet/location/cph/floor/1/temp
| --- Network-ID --- | --- Content Name --- |

# DNS TXT record

Using the Internet DNS system to map external IP-addresses to Z-Mesh Network-ID and Naming Scheme using a TXT record (example for hq-sensornet.my-corp.com):

hq-sensornet IN TXT "networkid=12345 namingscheme=1"
Last Updated: 11/11/2025, 3:06:32 PM