Role of session identifier in Otway-Rees protocol
The $M$ in  Otway-Ress protocol (It is $C$ as the Challenge in the article);


  
  In mutual authentication, both parties are suspicious of each other and of the freshness of the authentication messages; therefore each must generate independent challenges in order to assure themselves of the
  timeliness of the interaction.
  Its important property is that it has not previously been used to authenticate the two parties concerned.
  This property can be guaranteed either by storing all previously used challenges, by using numbers from a monotonically increasing sequence (e.g. time) or probabilistically by generating a sufficiently large number randomly. 
  


$M$ is used to prevent replay attacks.