5.2 LINX Discovery Daemon

The LINX Discovery Daemon, linxdisc, automatically discovers LINX network topology and creates links to other LINX hosts. Linxdisc finds LINX by periodically broadcasting and listen for LINX advertisement messages on available Ethernet interfaces. When advertisements from other linxdiscs' arrive linxdisc examines the messages and if it passes a number of controls a LINX connection is created to the sending host. When a collision occurs, i.e. two or more nodes advertising the same name, collision resolution messages are exchanged to determine which node gets to remain in the cluster. The node that wins is the one that has been up for the longest time, if the nodes can't agree which one has been up longest, the node with the highest MAC-address wins. All Linxdisc messages from this version and forward carries a version number. For this implementaition of Linxdisc all messages containg a higher version number are discarded, allowing newer versions of Linxdisc to revert to version 1 of the Linxdisc protocol.

5.2.1 Linxdisc protocol

Connection procedure:

A-side

At startup read configuration file, build a list of all active interfaces, extract hostname and cluster name.

  • Periodically broadcast advertisement messages on interfaces allowed by the configuration.

B-side

  1. When an advertisement message arrives, linxdisc performs the following steps to determine whether to connect to the sender:

    1. Version number matches.

    2. Not my own message, i.e. the sender address is the same as one of my interfaces.

    3. Network cluster name is same as configuration.

    4. Name doesn't match mine, if the name is identical to my name send a collision resolution message back to sender.

    5. Name doesn't match any already established connections.

    6. Check that the configuration doesn't forbid connections to this host.

  2. If all tests pass create a connection to the peer using the advertised name and store information about the connection for later.

  3. When terminated, linxdisc closes all connections it has created before exiting.

  4. If the configuration is changed, closes connection not allowed by the new configuration, and updates advertisements messages to reflect the new configuration.

When a collision occurs:

A-side

  • Send a collision resolution message containing uptime and preferred decision.

B-side

  • When receiving a collision resolution message

    1. Check uptime and preferred decision if in agreement with sender refrain from sending advertisements if not in agreement, break tie based on MAC-address

5.2.1.1 Linxdisc Advertisement Message

Table 5.9 Linxdisc Advertisement Message

012345678910111213141516171819202122232425262728293031
0123
Last 2 bytes Ethernet headerVersion
TypeReserved
Uptime sec
Uptime usec
Linklen
Netlen
Strings

Version

Linxdisc version type (1).

Type

Linxdisc message type, for advertisement (2) is used.

Reserved

Reserved for future use.

Uptime sec

The seconds part of the uptime.

Uptime usec

This microsecond part of the uptime.

Linklen

Length of linxname, c.f. below.

Netlen

Length of netname, c.f. below.

Strings

Carries two null-terminated strings, Linkname and Netname (network cluster name). Link name is a unique identifier for the sending host ment to be used as the name of the link created by the receiving linxdisc. Network cluster name is a unique cluster id string identifying a group of hosts that will form a LINX cluster.

5.2.1.2 Linxdisc Collision Resolution Message

Table 5.10 Linxdisc Collision Resolution Message

012345678910111213141516171819202122232425262728293031
0123
Last 2 bytes Ethernet headerVersion
TypeReserved
Uptime sec
Uptime usec
Preferred decision

Version

Linxdisc version type (1).

Type

Linxdisc message type, for collision resolution (3) is used.

Reserved

Reserved for future use.

Uptime sec

The seconds part of the uptime.

Uptime usec

This microsecond part of the uptime.

Preferred decision

Preferred decision on whether the receiver should exit from the network.