Railway structure is a structure with an infinite length for which its modeling is usually carried out by accepting some assumptions for boundary conditions. In practice, there are various methods of modeling by forming equations of motions and dynamic analysis. One of these methods is modeling the railway track by finite element method. Generally in such modeling, a limited length of a track is modeled and executed by implementing some boundary conditions. Assortment of boundary conditions has an effect on dynamic responses. To reduce such effects, usually the length of the track is chosen to such a measure to minimize the dynamic responses of the end points of the track elements to zero. Doing so would cause an increase in the length of the track and hence add to an equation's degrees of freedom, volume of output and prolongation of analysis time. For this reason, a combination of finite elements and infinite beam elements (two end elements) has been proposed for railway track modeling. Also, matrices of mass, damping and stiffness of one infinite element which has been laid on a visco-elastic bed, have been calculated by implementing selected shape functions. Therefore, by applying two infinite beam elements on either side of the model, a railway track is formed like a beam on an elastic bed which creates the possibility of eliminating the boundary condition effects.