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.
Connection procedure:
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.
When an advertisement message arrives, linxdisc performs the following steps to determine whether to connect to the sender:
Version number matches.
Not my own message, i.e. the sender address is the same as one of my interfaces.
Network cluster name is same as configuration.
Name doesn't match mine, if the name is identical to my name send a collision resolution message back to sender.
Name doesn't match any already established connections.
Check that the configuration doesn't forbid connections to this host.
If all tests pass create a connection to the peer using the advertised name and store information about the connection for later.
When terminated, linxdisc closes all connections it has created before exiting.
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:
Send a collision resolution message containing uptime and preferred decision.
When receiving a collision resolution message
Check uptime and preferred decision if in agreement with sender refrain from sending advertisements if not in agreement, break tie based on MAC-address
Table 5.9 Linxdisc Advertisement Message
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
0 | 1 | 2 | 3 | ||||||||||||||||||||||||||||
Last 2 bytes Ethernet header | Version | ||||||||||||||||||||||||||||||
Type | Reserved | ||||||||||||||||||||||||||||||
Uptime sec | |||||||||||||||||||||||||||||||
Uptime usec | |||||||||||||||||||||||||||||||
Linklen | |||||||||||||||||||||||||||||||
Netlen | |||||||||||||||||||||||||||||||
Strings |
Linxdisc version type (1).
Linxdisc message type, for advertisement (2) is used.
Reserved for future use.
The seconds part of the uptime.
This microsecond part of the uptime.
Length of linxname, c.f. below.
Length of netname, c.f. below.
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.
Table 5.10 Linxdisc Collision Resolution Message
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
0 | 1 | 2 | 3 | ||||||||||||||||||||||||||||
Last 2 bytes Ethernet header | Version | ||||||||||||||||||||||||||||||
Type | Reserved | ||||||||||||||||||||||||||||||
Uptime sec | |||||||||||||||||||||||||||||||
Uptime usec | |||||||||||||||||||||||||||||||
Preferred decision |
Linxdisc version type (1).
Linxdisc message type, for collision resolution (3) is used.
Reserved for future use.
The seconds part of the uptime.
This microsecond part of the uptime.
Preferred decision on whether the receiver should exit from the network.