The severity and number of attacks on computer networks are rapidly increasing. Most existing security solutions concentrate on resisting one or several attacks. We propose an integrated router security framework, called TrustR. It is able to defend against various types of attacks. TrustR integrates collaborating security primitives including cryptography based security mechanisms, trust management system, and trusted platform module. A simple but efficient method for detecting deceptive routing messages is also proposed. The deployment of TrustR is introduced. Simulation results show that TrustR is effective in resisting attacks and improving network performance.