We present a radio lightcurve of the O5.5 III(f^+) star HD 168112, based on archive data from the Very Large Array (VLA) and the Australia Telescope Compact Array (ATCA). The fluxes show considerable variability and a negative spectral index, thereby confirming that HD 168112 is a non-thermal radio emitter. The non-thermal radio emission is believed to be due to synchrotron radiation from relativistic electrons that have been Fermi accelerated in shocks. For HD 168112, it is not known whether these shocks are due to a wind-wind collision in a binary system or to the intrinsic instability of the stellar wind driving mechanism. Assuming HD 168112 to be a single star, our synchrotron model shows that the velocity jump of the shocks should be very high, or there should be a very large number of shocks in the wind. Neither of these is compatible with time-dependent hydrodynamical calculations of O star winds. If, on the other hand, we assume that HD 168112 is a binary, the high velocity jump is easily explained by ascribing it to the wind-wind collision. By further assuming the star to be an eccentric binary, we can explain the observed radio variability by the colliding-wind region moving in and out of the region where free-free absorption is important. The radio data presented here show that the binary has a period of between one and two years. By combining the radio data with X-ray data, we find that the most likely period is ~1.4 yr.