GRE configuration on S series switch

Publication Date:  2016-11-21 Views:  77 Downloads:  0
Issue Description
GRE configuration on S series switch
Solution
"Before configuring GRE, ensure that there is a reachable route between two ends of the tunnel.
In this example, the source address is 10.1.1.1/24 and the destination address is 10.2.1.1/24 (the source and destination addresses on the remote end are mirrored). The local end's subnet is 192.168.1.0/24, and the remote subnet is 192.168.2.0.The configurations on S series switches, except S1700 are as follows:
Local end:
[HUAWEI1] interface tunnel 1 //Create a tunnel interface.
[HUAWEI1-Tunnel1] tunnel-protocol gre //Configure the GRE tunnel.
[HUAWEI1-Tunnel1] ip address 172.16.1.1 255.255.255.0  //Configure IP addresses for the GRE tunnel for routing.
[HUAWEI1-Tunnel1] source 10.1.1.1  //Configure the source address for the GRE tunnel.
[HUAWEI1-Tunnel1] destination 10.2.1.1 //Configure the destination address for the GRE tunnel.
[HUAWEI1-Tunnel1] quit
[HUAWEI1] ip route-static 192.168.2.0 255.255.255.0 tunnel 1 //Configure connection between connected subnets through the GRE tunnel.
Remote device:
[HUAWEI2] interface tunnel 1 //Create a tunnel interface.
[HUAWEI2-Tunnel1] tunnel-protocol gre //Configure the GRE tunnel.
[HUAWEI2-Tunnel1] ip address 172.16.1.1 255.255.255.0  //Configure IP addresses for the GRE tunnel for routing.
[HUAWEI2-Tunnel1] source 10.2.1.1  //Configure the source address for the GRE tunnel.
[HUAWEI2-Tunnel1] destination 10.1.1.1 //Configure the destination address for the GRE tunnel.
[HUAWEI2-Tunnel1] quit
[HUAWEI2] ip route-static 192.168.1.0 255.255.255.0 tunnel 1 //Configure connection between connected subnets through the GRE tunnel."

END