beautypg.com

Protocols and standards, Configuring a gre over ipv4 tunnel, Configuration prerequisites – H3C Technologies H3C S10500 Series Switches User Manual

Page 195: Configuration guidelines, Configuration procedure

background image

184

Protocols and standards

RFC 1701, Generic Routing Encapsulation (GRE)

RFC 1702, Generic Routing Encapsulation over IPv4 networks

RFC 2784, Generic Routing Encapsulation (GRE)

Configuring a GRE over IPv4 tunnel

Configuration prerequisites

On each of the peer devices, configure an IP address for the interface to be used as the source
interface of the tunnel interface (which can be a, for example, VLAN interface or loopback

interface), and make sure that this interface can normally communicate with the interface used as

the source interface of the tunnel interface on the peer device.

Create a service loopback group, specify its service type as tunnel, and add an available Layer 2
Ethernet port to the service loopback group. For more information about the service loopback group,

see Layer 2—LAN Switching Configuration Guide.

Configuration guidelines

The source address and destination address of a tunnel uniquely identify a path. They must be
configured at both ends of the tunnel and the source address at one end must be the destination

address at the other end and vice versa.

Tunnel interfaces using the same encapsulation protocol must have different source addresses and
destination addresses.

If you configure a source interface for a tunnel interface, the tunnel interface takes the primary IP
address of the source interface as its source address.

When configuring a route through the tunnel, you are not allowed to set up a static route whose
destination address is in the subnet of the tunnel interface. Instead, you can do one of the following:

{

Configure a static route, using the address of the network segment that the original packet is
destined for as its destination address and the address of the peer tunnel interface as its next

hop.

{

Enable a dynamic routing protocol on both the tunnel interface and the router interface
connecting the private network, so that the dynamic routing protocol can establish a routing

entry that allows the tunnel to forward packets through the tunnel.

Configuration procedure

Follow these steps to configure a GRE over IPv4 tunnel:

To do…

Use the command…

Remarks

Enter system view

system-view —

Create a tunnel interface and enter
tunnel interface view

interface tunnel interface-number

Required
By default, a device has no tunnel

interface.