  A scheme to generate three qubit maximally entangled W-states, using three
trapped ions interacting with red sideband tuned single mode field of a high
finesse cavity, is proposed. For the cavity field initially prepared in a
number state, the probability of generating three ion W-state is calculated. By
using the ion-cavity coupling strengths achieved in experimental realizations,
the interaction time needed for W-state generation is found to be of the order
of 10 $\mu $ sec. It is found that for a fixed number of photons in the cavity
the nature of entanglement of ionic internal states can be manipulated by
appropriate choice of initial state phonon number.
  The ionic qubits in W-like state are found to be entangled to cavity photons.
Analytical expressions for global negativity and partial $K-$way negativities
(K=2 to 4) are obtained to study the evolution of entanglement distribution as
a function of interaction parameter. Reversible entanglement exchange between
different entanglement modes is observed. For specific values of interaction
parameter, the three ions and photon-phonon system are found to have four
partite entanglement, generated by 2-way and 3-way correlations.
