How to Fix unassigned shards STATUS: RED

I got 20-30% of unassigned shards in a cluster and showing status red. How to Fix that issue.

Some nodes are down at certain point of time and they are OFF now for around 2 hrs. and now they are Up and showing status red.

Please don't raise multiple threads on the same question - How to Fix Unallocated Shards?