Abstract:Aimed at the problem that MANET routing protocol could be only simulated in software which lead to a inaccurate result, and taking a large scale MANET routing protocol SPDSR for example, a method of implementing MANET routing protocols in Linux OS is put forward. This method lays a foundation for building a practical MANET test. Based on the study in Linux original routing architecture, by using net-filter framework and TUN/TAP technology the functions of packets intercepting and user space buffering are achieved, then the SPDSR routing algorithm is started. With establishing a route check module, which delivers route status to user space through and updates route table timer, a faulting delete operating for past routes will be avoided. Finally, the SPDSR protocol has been successfully added in Linux. Practical network test result shows that the implementation of SPDSR based on Linux is able to build and maintain route in a wireless mobile ad hoc net-work, as well as meet the needs of engineering application.