I have a sensor field with dimension 200*200. I choose nearest node to center of field as a cluster head. My goal is that data of sensors forward to cluster head and cluster head forward data to sink node. I want cluster head become next hop of any sensor nodes (apart from sink node) in field. How do i do that? Thanks
I don't know ns2 but if there is a forwarding command then it should be just a matter of looping the nodes and running the forward command. Here's some pseudo code.