The study on the model of traffic flow is one of the research hotshots in computer network. Employing fractal theory, we set up a mathematical model of traffic flow whose properties depending on the parameters like the ratio distribution of the traffic flow and corresponding time intervals. The self-similar or multifractal traffic can be simulated when the parameters are in different certain ranges. Furthermore, some numerical experiments are shown in this paper to verify the effectiveness of the traffic mathematical model.