Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document.
Note: Even the most advanced machine translation cannot match the quality of professional translators.
Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).

Example for Configuring OSPF for GRE to Implement Interworking
Between IPv4 Networks

Example for Configuring OSPF for GRE to Implement Interworking
Between IPv4 Networks

Networking Requirements

SwitchA, SwitchB, and SwitchC communicate with each
other through a public network. (The OSPF protocol is used in this
example.)

PC1 and PC2 run the IPv4 proprietary protocol and
communicate with each other over the public network. Transmission
of private data must be reliable.

PC1 uses SwitchA and PC2 uses SwitchC as a default gateway.

Figure 2-12 Configuring a dynamic routing protocol for GRE

Configuration Roadmap

You can set up a directly
connected GRE tunnel between SwitchA and SwitchC and configure OSPF on tunnel interfaces and interfaces connected
to the private networks to allow PC1 to communicate with PC2. To monitor
tunnel link status, enable Keepalive detection on tunnel interfaces
on both ends of the GRE tunnel.

The configuration roadmap is
as follows:

Configure an IGP (OSPF process 1 in this example) to implement
interworking among devices.

Set up a GRE tunnel between devices connected to the PCs, enable
Keepalive detection, and run an IGP (OSPF process 2 in this example)
on the network segments connected to the PCs to transmit traffic between
PC1 and PC2 over the GRE tunnel.

# After the configuration is complete, run the display ip routing-table command on SwitchA
and SwitchC. The command
output shows that they have learned the OSPF route destined for the
network segment of the peer.

# After the configuration is complete, run the display
ip routing-table command on SwitchA and SwitchC. The routing table of each router contains the OSPF route from
the tunnel interface to the user-side network segment of the peer.
In addition, the next hop of the route to the destination physical
interface (30.1.1.0/24) of the tunnel is not a tunnel interface.