Every node having a separate global and local ip address.We can get the global and local IP address during a simulation by using Mote interface Viewer.
Set up the simulation environment.
Run the simulation
Right clicking on node
Click Mote interface viewer.
Select interface - IP address
It will print the Local and Global Ip address.