First of all I would like to thanks for your response…
I use 5 Xbee Pro S2B and I wanna make it to mesh network
This is my schema :

On that schema, I use ATMega8 on node B,C,D,E integrated with thermal sensors…
I want :
-When Node C or Node D turned off, Node E automatically search another route
-When both of Node C and D turned off, Node E automatically search path between E and B if the distance possible (still in range)
I’ve been sets B,C,D as routers ; A as coordinator, E as end device
all settings using X-CTU, A as Coordinator API, B and C sets as Router API, E set as END DEVICE API, Shown below :



There are many parameters, could you help me how I must sets all parameters ?
I’ve sets C,D,E broadcast but I still don’t know the right settings…
Node B set to send the data to the node A
The parameters are :
Networking : ID, SC, SD, ZS, NJ, JN,
Addressing : DH, DL, NI, NH, BH, AR, DD, NT, NO, CR
Serial Interfacing : BD, NB, SB, D7, D6, AP, AO
Sleep Modes : SM, SN, SO, SP, ST, PO
Please Help me to fix this problem, Your help is mean a lot to me, thankyou before