home  exhibition  quizzes  tour 
  basics  protocol mechanisms  internet  lans  applications  
  connection management
connection establishment | connection teardown | 2-army problem |

The Two-army problem

Unfortunately, the symmetric connection release mechanism does not always work. The so-called two-army problem illustrates this issue. Imagine that a violet army is encamped in a valley. On both sides of the surrounding hillside are green armies. The violet army is larger than either of the green armies alone, but together the green armies are larger than the violet army. If either green army attacks by itself, it will be defeated, but if the two green armies attack simultaneously, they will be victorious.

The green armies want to synchronize their attacks. However, the only communication medium is to send messengers on foot down into the valley, where they might be captured and the message is lost. The question is: Does a protocol exist that allows the green armies to win?
Please test the application. First the commander of the green army no. 1 sends a message: "I propose we attack at dawn on March 29. How about it?" Now suppose that the message arrives, the commander of the green army no. 2 agrees, and his reply gets safely back to green army no. 1. Will the attack happen? Probably not, because the commander no. 2 does not know if his reply got through. If it did not, green army no.1 will not attack, so it would be foolish for him to charge into battle. A three-way handshake does not help to solve the problem, neither a 4-way handshake.

To see the relevance of the two-army problem during connection teardown try the symmetric release in the connection teardown application. (The two-army problem is described in detail in A. Tanenbaum: Computer Networks - Chapter Connection Release)