摘要 |
<p>Disclosed in an embodiment of the present invention is a method for establishing a GRE (General Router Encapsulation) tunnel, for automatic negotiation of devices on both ends of the GRE tunnel to configure IP addresses of device ports. The method of the embodiment of the present invention comprises: a first device, via a first interface, receiving a first multicast GRE protocol notification message sent by a second interface of a second device, and an internet protocol IP address of the second interface being carried therein; configuring the GRE tunnel between the first interface and the second interface, and GRE tunnel peer address learning functions being configured to the first interface and the second interface; recording the IP address of the second interface to serve as the target IP address of the GRE tunnel; sending a first GRE protocol reply message to the second interface via the first interface, and the IP address of the first interface being carried therein, for enabling the second interface to record the IP address of the first interface as the target IP address of the GRE tunnel.</p> |