Laboratory simulation of the interplanetary magnetic field effects on the magnetosphere