GRE(H3c)

 
 
RT1:
      [Quidway]interface Ethernet 0/0
      [Quidway-Ethernet 0/0]ip add 10.1.1.1 255.255.255.0
      [Quidway-Ethernet 0/0]undo shutdown
 
      [Quidway]interface Serial 1/0
      [Quidway-Serial 1/0]ip add 202.38.160.1 255.255.255.0
      [Quidway-Serial 1/0]undo shutdown
 
      [Quidway]interface tunnel 0//创建虚拟Tunnel接口,接口号范围为0~1023
      [Quidway-tunnel 0]ip add 1.1.1.1 255.255.255.0
      [Quidway-tunnel 0]source 202.38.160.1//指定Tunnel的源地址
      [Quidway-tunnel 0]destination 172.31.1.1//指定Tunnel的目的端
      [Quidway-tunnel 0]gre key 111//设置tunnel接口的识别关键字,tunnel两端的gre key要相同才能通过验证
 
      [Quidway]ip route-static 10.1.2.0 255.255.255.0 tunnel 0
 
 
 
RT2:
      [Quidway]interface Serial 1/0
      [Quidway-Serial 1/0]ip add 202.38.160.2 255.255.255.0
      [Quidway-Serial 1/0]undo shutdown
 
      [Quidway]interface Serial 1/1
      [Quidway-Serial 1/1]ip add 172.31.1.2 255.255.255.0
      [Quidway-Serial 1/1]undo shutdown
 
 
RT3:
      [Quidway]interface Ethernet 0/0
      [Quidway-Ethernet 0/0]ip add 10.1.2.2 255.255.255.0
      [Quidway-Ethernet 0/0]undo shutdown
     
      [Quidway]interface Serial 1/0
      [Quidway-Serial 1/0]ip add 172.31.1.1 255.255.255.0
      [Quidway-Serial 1/0]undo shutdown
      
      [Quidway]interface tunnel 0
      [Quidway-tunnel 0]ip add 1.1.1.2 255.255.255.0
      [Quidway-tunnel 0]source 172.31.1.1
      [Quidway-tunnel 0]destination 202.38.160.1
      [Quidway-tunnel 0]gre key 111
 
      [Quidway]ip route-static 0.0.0.0 0.0.0.0 172.31.1.2

你可能感兴趣的:(职场,休闲,gre)