The paper is devoted to the study and long-term forecasting of railway network sections operating. We call a railway network section a set of several railway stations interacting with each other and lines between them. We propose a methodology for mathematical modeling of train traffic on the railway network based on the queuing theory. The resulting models are a set of mathematical descriptions of the incoming train traffic and the train running within the system. Several Markovian Arrival Process are used to describe train arrivals from different directions. Such a description makes it possible to take into account the parameters of separate train flows, which depend on the category of trains and their directions. A queuing network in which all nodes have a finite capacity simulates the movement of trains through the system. This mathematical apparatus allows us to consider the nonlinear structure of the railway network, the operation features of stations, the capacity of railway lines, and the influence of random factors. To apply the methodology, we have chosen two objects that differ in infrastructure and properties of train flows. The first is located in the east of Russia and focused on servicing freight trains. The second is located in Germany, close to Belgium and The Netherlands borders. It is characterized by the predominance of passenger traffic. We construct mathematical models and perform numerical simulations. Based on the results obtained, the maximum allowable load is estimated, and bottlenecks in the structure of transport systems are found. Besides, we give some recommendations on how to increase capacity in the long term.