The increasing amount of traffic in recent years has led to increasingly complex network problems. To be able to improve overall network performance and increase network utilization, it is valuable to take measures to capture future trends in network traffic. In traditional machine learning, to guarantee the accuracy and high reliability of the models obtained through training, there are two basic assumptions: (1) the training samples used for learning and the new test samples satisfy the condition of independent identical distribution; and (2) there must be enough training samples to learn a good model. However, time-series data are not easily accessible in real life, and even after putting in a lot of time and effort to collect them, the data may be unavailable due to confidentiality. In this paper, a neural network model based on LSTM and transfer learning is proposed to address the problem of small sample size in network traffic prediction. Knowledge in the source domain is transferred to the target domain using transfer learning, and a prediction model with good performance is constructed with a small amount of target domain data. The results show that the performance of the transfer learning model improves by more than 40% over the direct training model when using the same samples for predicting 10,000 rows of data, resulting in better performance of the network traffic prediction task.INDEX TERMS LSTM, network traffic prediction, transfer learning.