The integration of Internet of things (IoT) and intelligent transportation system (ITS) is expected to improve the traffic efficiency and enhance the driving experience. However, due to the dynamic traffic environment and various types of vehicles, it is a challenge to perform vehicle classification and speed estimation with a single magnetic sensor. In this paper, based on a single low-cost magnetic sensor, a scheme is proposed to achieve vehicle classification and speed interval estimation by designing a two-dimensional convolutional neural network (CNN). Specifically, we extract the magnetic field data of each vehicle and then convert the collected data into a two-dimensional grayscale image. In this way, the images of vehicle signals with different types and driving speeds can be used as the input data to train the designed CNN model. With the designed CNN model, we classify the vehicles into 7 types and estimate the speed interval of each vehicle, where the speeds in the range of 10km/h-70km/h are divided into 6 intervals of size 10km/h. The performance of the proposed vehicle classification and speed estimation scheme is evaluated by experiments, where the experimental results show that the accuracy of vehicle classification and the accuracy of speed interval estimation are 97.83% and 96.85%, respectively.