the present invention relates to the field of communication technologies , and discloses a method and an apparatus for forwarding packets to solve the problems in the prior art , namely , if a long internet protocol address needs to be searched for at the time of forwarding a packet , the number of ternary content addressable memories need to be increased , or an external random access memory needs to be accessed for more times , which leads to a high cost and low performance . the method includes : extracting a first bit sequence from a destination address of a received packet , and using the first bit sequence as a key value ; searching for a preset tcam entry by using the key value , and obtaining an index value returned by the tcam entry ; and using the index value and a second group of bits in the destination address of the packet as conditions for searching , according to a predetermined algorithm , for a preset forwarding information base entry , and obtaining a forwarding address of the packet . the technical solution under the present invention is applicable to searching a table for an internet protocol version 6 address in a router .