当前位置:网站首页>Huawei Router: GRE Technology

Huawei Router: GRE Technology

2022-06-24 08:56:00 Rabbit king cool

The topology

 Insert picture description here

R1 Configured according to topology IP Address

It is omitted here .

R2 GRE Part of the configuration

# Configure according to the topology IP
ip route-static 0.0.0.0 0 10.10.10.2       # Add a route , Make two public networks IP Interworking 
[R2]interface Tunnel0/0/0                  # New tunnel 
[R2-Tunnel0/0/0]description to_jikong      # Tunnel description 
[R2-Tunnel0/0/0]tunnel-protocol gre        # Tunnel protocol 
[R2-Tunnel0/0/0]source 10.10.10.1          # source address 
[R2-Tunnel0/0/0]de?                        # Note that these two are easy to make mistakes , must do destination
  description  Specify interface description
  destination  Destination address of the tunnel interface
[R2-Tunnel0/0/0]destination 10.10.20.1     # Destination address , Note that these two are easy to make mistakes 
[R2-Tunnel0/0/0]ip add 192.168.254.1 24    # Configure the address for the tunnel 
[R2-Tunnel0/0/0]q
[R2]ip route-static 192.168.12.0 255.255.255.0 192.168.254.2   # Configure static routing for the tunnel 

It should be noted that :description( describe ) and destination( Destination address ), It's easy to type wrong .

R3 GRE Part of the configuration

ip route-static 0.0.0.0 0 10.10.20.2    
[R3]interface Tunnel0/0/0
[R3-Tunnel0/0/0]description to_office
[R3-Tunnel0/0/0]tunnel-protocol gre
[R3-Tunnel0/0/0]source 10.10.20.1
[R3-Tunnel0/0/0]destination 10.10.10.1
[R3-Tunnel0/0/0]ip add 192.168.254.1 24
[R3-Tunnel0/0/0]q
[R3]ip route-static 192.168.11.0 255.255.255.0 192.168.254.1

The verification results

PC>ping 192.168.12.1

Ping 192.168.12.1: 32 data bytes, Press Ctrl_C to break
From 192.168.12.1: bytes=32 seq=1 ttl=126 time=15 ms
From 192.168.12.1: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.12.1: bytes=32 seq=3 ttl=126 time=15 ms
From 192.168.12.1: bytes=32 seq=4 ttl=126 time=32 ms
From 192.168.12.1: bytes=32 seq=5 ttl=126 time=31 ms
PC>ping 192.168.11.1

Ping 192.168.11.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.11.1: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.11.1: bytes=32 seq=3 ttl=126 time=16 ms
From 192.168.11.1: bytes=32 seq=4 ttl=126 time=31 ms
From 192.168.11.1: bytes=32 seq=5 ttl=126 time=16 ms
原网站

版权声明
本文为[Rabbit king cool]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240707016719.html