port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
ospf 1
area 0.0.0.0
network 20.1.1.0 0.0.0.255
network 30.1.1.0 0.0.0.255
#
return
l Configuration file of Switch C
#
sysname Switch-C
#
vlan batch 20 40
#
interface Vlanif20
ip address 30.1.1.2 255.255.255.0
#
interface Vlanif40
ip address 10.2.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface Tunnel1/0/1
ip address 40.1.1.2 255.255.255.0
tunnel-protocol gre
source 30.1.1.2
destination 20.1.1.1
#
ospf 1
area 0.0.0.0
network 30.1.1.0 0.0.0.255
#
ip route-static 10.1.1.0 255.255.255.0 Tunnel1/0/1
#
return
2.7.2 Example for Configuring the Dynamic Routing Protocol on the
GRE Tunnel
Networking Requirements
As shown in Figure 2-7, OSPF runs between Switch A, Switch B, and Switch C.
GRE is used between Switch A and Switch C to implement the interworking between PC1 and
PC2. OSPF is enabled on the tunnel interfaces.
PC1 and PC2 use Switch A and Switch C as their default gateways.
OSPF process 1 is enabled between Switch A, Switch B, and Switch C; OSPF process 2 is
enabled between Switch A and PC1 and between Switch C and PC2.
Quidway S7700 Smart Routing Switch
Configuration Guide - VPN 2 GRE Configuration
Issue 01 (2011-07-15) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
79