Address Structures

Network addresses

Network addresses represent a mapping of the addresses of the network type (for example IP) to logical addresses within a control network. This mapping is carried out by the corresponding block driver. The first three bytes of the IP address are identical for all network devices within an Ethernet network with “Class C” IP addresses. Consequently, the last 8 bits of the IP address suffice as network address, since they enable unambiguous mapping between the two addresses on the block driver.

A node has a different network address for each network connection. Different network connections can have the same network address, since each address need only be locally unique.

Terminology: the network address in the main network is usually designated as the network address of a node with no specification of the network connection.

The length of a network address is specified in bits and can be chosen by the block driver as required. The same length must be used for all nodes within a network area. A network address is represented by an array of bytes in accordance with the following coding:

  • Length of the network address: n bits
  • Necessary bytes: b = (n + 7) DIV 8
  • The (n MOD 8) bits of lowest rank of the first byte and all others (n DIV 8) are used for the network address.

Example of network address coding

Length: 11 bit

Address: 111 1000 1100

Node addresses

The node address indicates the absolute address of a node within a control network and is therefore unique within the whole “network tree”. The address is composed of up to 15 address components, each of which occupies 2 bytes. The lower a node is located within the network hierarchy, the longer its address.

The complete node address consists of the partial addresses of all preceding nodes and the partial address of the node itself. Each partial address consists of one or more address components. The length is therefore always a multiple of 2 bytes. The partial address of a node is formed from the network address of the node in its main network and the subnet index of the main network in the case of the parent node. The bits required for the subindex are determined by the router of the parent node. Filler bits can be inserted between the subnet index and the network address in order to ensure that the length of the partial address is a multiple of 2 bytes.

Special cases:

  • A node without a main network: this means that there is neither a subnet index nor a network address in the main network. In this case the address is set to 0x0000.
  • A node in the main network without a parent: In this case a subnet index with the length 0 is assumed. The partial address corresponds to the network address, if necessary extended by filler bits.

Example of node addresses

The node address is always specified in hexadecimal. The individual address components (two bytes in each case) are separated by a colon ”:”. Since this represents an array of bytes and not a 16-bit value, the components are not displayed in the Intel format. For manually input addresses, missing parts in an address component are supplemented by leading zeros: “274” = “0274”. In order to improve the legibility, the display should also always contain the leading zeros.

Absolute and relative addresses

Communication between two nodes can be based on relative or absolute addresses. Absolute addresses are identical to node addresses. Relative addresses specify a path from the sender to the receiver. They consist of an address offset and the descending path to the receiver.

The (negative) address offset describes the number of address components by which a packet must be passed upwards in the tree before it can be passed back down by the common parent node. Since nodes can use partial addresses that consist of more than one component, the number of parent components to be passed is always equal to the address offset. This means that the demarcation between the parent nodes is no longer clear. For that reason the common start of the address of the communication partners is used as the parent address. Each address component is counted as an upward step, independent of the current parent node. Each error resulting from this assumption can be detected by the corresponding parent node and must be handled by it accordingly.

After achieving the common parent node the relative path, as an array of address components, is followed downwards as usual. Formal: the node address of the receiver is formed by removing the last address offset components from the node address of the sender and by appending the relative path to the remaining address.

Example of the formation of node addresses

In the following example each address component is represented by a letter; in each case a dot separates nodes from each other. Since a node can carry several address components, there are some in the example that are represented with several letters.

Node A: a.bc.d.ef.g

Node B: a.bc.i.j.kl.m

  • Address of the lowest common parent: a.bc
  • Relative address from A to B: -4/i.j.kl.m (The number 4 results from the 4 components, d, e, f and g, which must pass on the data packet in the upward direction)

In order to guarantee correct operation of the routing, the relative address must be adapted each time it passes an intermediate node. It is sufficient to adapt the address offset. This is always done by the parent node: If a node receives a data packet from one of its subnets, the address offset is increased by the length of the address component of this subnet.

  • If the new address offset is < 0, then the data packet must be passed further upward.
  • If the address offset is >= 0, then the data packet must be passed on to the child node whose local address corresponds to the relative path, starting from the address offset. First of all, however, the address offset must be increased by the length of the local address of the child node, so that the child node sees the correct address.

A special situation results if the error mentioned above occurs during the determination of the common parent node. In this case the address offset of the actual parent node is negative, but this value is larger than the length of the partial address of the subnet from which the packet originated. So that the next node sees a correct relative address in this case, the node concerned must do the following: it must discover the error, calculate the local address of the child node on the basis of the address of the predecessor node and the length difference, and adapt the address offset accordingly. In this case, too, the address components as such remain unchanged; only the offset is changed.

Broadcast addresses

There are two types of broadcast - global and local. A global broadcast is sent to all the nodes in a network. The empty node address with a length of 0 is reserved for this purpose.

Local broadcasts are sent to all the devices in a network area. For this purpose, all the bits of the network address are set to 1. This is permissible both in relative and in absolute addresses.

A block driver must be able to process both kinds of broadcast addresses. This means: empty network addresses as well as network addresses whose bits were all set to 1 must be interpreted and sent to all devices concerned.