摘要 |
The present invention relates to a GRE packet encapsulation method, a decapsulation method, and corresponding apparatuses. The encapsulation method comprises: when GRE packet encapsulation is performed on an original packet, setting, according to a preset encapsulation rule, an attribute of a predetermined bit of a GRE packet header; then performing GRE packet encapsulation on the GRE packet header whereof the attribute is set as well as on the original packet. The decapsulation method comprises: when a GRE packet is received, decapsulating and parsing, according to a preset decapsulation rule, a predetermined bit of a packet header of the received GRE packet; and decapsulating the received the GRE packet according to a parsing result, so as to decapsulate an original packet in the received GRE packet. Correspondingly, the encapsulation apparatus comprises a setting module and an encapsulation module, and the decapsulation apparatus comprises a parsing module and a decapsulation module. |