< Home

Configuring a Route on a Tunnel Interface

Context

GRE-encapsulated packets can be correctly forwarded only when a local and a remote device on the backbone network have a reachable route between them and the route passes through the devices' tunnel interfaces. The route can be static or dynamic.

Switch_1 in Figure 1 illustrates the configuration.
Figure 1 Configuring a dynamic routing protocol for GRE

  • When configuring a static route, configure a route on both the local and the remote devices. Set the destination address of a static route to the original destination address of original packets (address of GE0/0/2 on Switch_2), and set the outbound interface to the tunnel interface on the local device (Tunnel1 on Switch_1).

  • When configuring a dynamic routing protocol, configure the protocol on both the tunnel interface and the interface connected to the network running the X protocol.

    For example, as in Figure 1, configure the dynamic routing protocol on the tunnel interface and GE0/0/2 connected to the network running the X protocol, and set the outbound interface to GE0/0/2 on Switch_2 in the routing table to Tunnel1.

    In practice, you must configure different types of routing protocols or different processes of the same type of routing protocol to advertise routes for the tunnel interface and the backbone network. This ensures user packets are forwarded by a physical interface rather than the tunnel interface.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Choose either of the following methods to configure a route passing through a tunnel interface:

    • Run ip route-static ip-address { mask | mask-length } { nexthop-address | tunnel interface-number [ nexthop-address ] } [ description text ]

      A static route is configured.

    • Configure a dynamic routing protocol. Dynamic routing can be implemented using Interior Gateway Protocol (IGP) or Exterior Gateway Protocol (EGP), such as Open Shortest Path First (OSPF) and Routing Information Protocol (RIP). For details on how to configure a dynamic routing protocol, see S2720, S5700, and S6700 V200R019C10 Configuration Guide - IP Unicast Routing Configuration Guide.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >