In a conventional network, most network devices, such as routers, are dedicated devices that do not have much variation in capacity. In recent years, a new concept of Network Functions Virtualisation (NFV) has come into use. The intention is to implement a variety of network functions with software on general-purpose servers and this allows the network operator to select any capabilities and locations of network functions without any physical constraints. This paper focuses on the deployment of NFV-based routing functions which are one of critical virtual network functions, and present the algorithm of virtual routing function allocation that minimize the total network cost. In addition, this paper presents the useful allocation policy of virtual routing functions, based on an evaluation with a ladder-shaped network model. This policy takes the ratio of the cost of a routing function to that of a circuit and traffic distribution in the network into consideration. Furthermore, this paper shows that there are cases where the use of NFV-based routing functions makes it possible to reduce the total network cost dramatically, in comparison to a conventional network, in which it is not economically viable to distribute smallcapacity routing functions.