A technique for time and frequency transfer over an asynchronous fiber optical transmission control protocol (TCP)/IP network is being developed in Sweden by SP Measurement Technology together with STUPI. The technique is based on passive listening to existing data traffic at 10 Gb/s in the network. Since the network is asynchronous, intermediate supporting clocks will be located and compared at each router. We detect, with a specially designed high-speed optoelectronic device, a header recognizer, the frame alignment bytes of the synchronous optical network (SONET)/synchronous digital hierarchy (SDH) protocol, as a reference for the supporting clock comparison. The goal of the project is to establish a time transfer system with an accuracy on the nanosecond level. In this paper, we present the results of a time transfer over a distance of 5 km. We have compared two clocks: a cesium clock at the Swedish National Laboratory for time and frequency and a remote rubidium clock. The results of the time transfer with the fiber link have been simultaneously compared to measurements with a Global Positioning System (GPS) carrier phase link in terms of precision and stability. The root-mean-square (rms) difference between the time difference measured with the fiber link and the GPS link is approximately 300 ps. A large part of the difference is due to the heating of the GPS antenna cable, which introduces daily delay variations on the order of 1 ns from peak to peak. For one of the days with small day-to-day variations in temperature, the corresponding rms difference is 72 ps, and the Allan deviation is below 30 ps for averaging times longer than 5 min.