当前位置:   article > 正文

华为eNSP点到点IP隧道实验GRE--VPN_ensp gre隧道

ensp gre隧道

实验还原

配置如下

AR1

  1. [Huawei]un in en
  2. [Huawei]sys AR1
  3. [AR1]inte g0/0/0
  4. [AR1-GigabitEthernet0/0/0]ip ad 192.168.1.254 24
  5. [AR1-GigabitEthernet0/0/0]inte g0/0/1
  6. [AR1-GigabitEthernet0/0/1]ip ad 192.1.1.1 24
  7. [AR1-GigabitEthernet0/0/1]ospf
  8. [AR1-ospf-1]ar 1
  9. [AR1-ospf-1-area-0.0.0.1]net 192.1.1.0 0.0.0.255
  10. [AR1-ospf-1-area-0.0.0.1]inte tun0/0/1
  11. [AR1-Tunnel0/0/1]ip add 192.168.4.1 24
  12. [AR1-Tunnel0/0/1]tun gre
  13. [AR1-Tunnel0/0/1]so g0/0/1
  14. [AR1-Tunnel0/0/1]des 192.1.2.1
  15. [AR1-Tunnel0/0/1]keepalive
  16. [AR1-Tunnel0/0/1]rip
  17. [AR1-rip-1]ver 2
  18. [AR1-rip-1]un sum
  19. [AR1-rip-1]net 192.168.1.0
  20. [AR1-rip-1]net 192.168.4.0
  21. [AR1-rip-1]net 192.168.5.0
  22. [AR1]inte tun0/0/2
  23. [AR1-Tunnel0/0/2]ip add 192.168.5.1 24
  24. [AR1-Tunnel0/0/2]tun gre
  25. [AR1-Tunnel0/0/2]so g0/0/1
  26. [AR1-Tunnel0/0/2]des 192.1.3.1
  27. [AR1-Tunnel0/0/2]keepalive

AR2 

  1. <Huawei>sys
  2. [Huawei]un in en
  3. [Huawei]sys AR2
  4. [AR2]inte g0/0/0
  5. [AR2-GigabitEthernet0/0/0]ip ad 192.168.2.254 24
  6. [AR2-GigabitEthernet0/0/0]inte g0/0/1
  7. [AR2-GigabitEthernet0/0/1]ip ad 192.1.2.1 24
  8. [AR2-GigabitEthernet0/0/1]ospf
  9. [AR2-ospf-1]ar 1
  10. [AR2-ospf-1-area-0.0.0.1]net 192.1.2.0 0.0.0.255
  11. [AR2-ospf-1-area-0.0.0.1]inte tun0/0/1
  12. [AR2-Tunnel0/0/1]ip add 192.168.4.2 24
  13. [AR2-Tunnel0/0/1]tun gre
  14. [AR2-Tunnel0/0/1]so g0/0/1
  15. [AR2-Tunnel0/0/1]des 192.1.1.1
  16. [AR2-Tunnel0/0/1]keepalive
  17. [AR2-Tunnel0/0/1]inte tun0/0/3
  18. [AR2-Tunnel0/0/3]ip add 192.168.6.1 24
  19. [AR2-Tunnel0/0/3]tun gre
  20. [AR2-Tunnel0/0/3]so g0/0/1
  21. [AR2-Tunnel0/0/3]des 192.1.3.1
  22. [AR2-Tunnel0/0/3]keepalive
  23. [AR2-Tunnel0/0/3]rip
  24. [AR2-rip-1]ver 2
  25. [AR2-rip-1]un sum
  26. [AR2-rip-1]net 192.168.2.0
  27. [AR2-rip-1]net 192.168.4.0
  28. [AR2-rip-1]net 192.168.6.0

AR3

  1. <Huawei>sys
  2. [Huawei]un in en
  3. [Huawei]sys AR3
  4. [AR3]inte g0/0/1
  5. [AR3-GigabitEthernet0/0/1]ip ad 192.168.3.254 24
  6. [AR3-GigabitEthernet0/0/1]inte g0/0/0
  7. [AR3-GigabitEthernet0/0/0]ip ad 192.1.3.1 24
  8. [AR3-GigabitEthernet0/0/0]ospf
  9. [AR3-ospf-1]ar 1
  10. [AR3-ospf-1-area-0.0.0.1]net 192.1.3.0 0.0.0.255
  11. [AR3-ospf-1-area-0.0.0.1]inte tun0/0/2
  12. [AR3-Tunnel0/0/2]ip add 192.168.5.2 24
  13. [AR3-Tunnel0/0/2]tun gre
  14. [AR3-Tunnel0/0/2]so g0/0/0
  15. [AR3-Tunnel0/0/2]des 192.1.1.1
  16. [AR3-Tunnel0/0/2]keepalive
  17. [AR3-Tunnel0/0/2]inte tun0/0/3
  18. [AR3-Tunnel0/0/3]ip add 192.168.6.2 24
  19. [AR3-Tunnel0/0/3]tun gre
  20. [AR3-Tunnel0/0/3]so g0/0/0
  21. [AR3-Tunnel0/0/3]des 192.1.2.1
  22. [AR3-Tunnel0/0/3]keepalive
  23. [AR3-Tunnel0/0/3]rip
  24. [AR3-rip-1]ver 2
  25. [AR3-rip-1]un sum
  26. [AR3-rip-1]net 192.168.3.0
  27. [AR3-rip-1]net 192.168.5.0
  28. [AR3-rip-1]net 192.168.6.0

AR4

  1. <Huawei>sys
  2. [Huawei]un in en
  3. [Huawei]sys AR4
  4. [AR4]inte g0/0/1
  5. [AR4-GigabitEthernet0/0/1]ip ad 192.1.4.1 24
  6. [AR4-GigabitEthernet0/0/1]inte g0/0/0
  7. [AR4-GigabitEthernet0/0/0]ip ad 192.1.1.2 24
  8. [AR4-GigabitEthernet0/0/0]inte g0/0/2
  9. [AR4-GigabitEthernet0/0/2]ip ad 192.1.6.1 24
  10. [AR4-GigabitEthernet0/0/2]ospf
  11. [AR4-ospf-1]ar 1
  12. [AR4-ospf-1-area-0.0.0.1]net 192.1.4.0 0.0.0.255
  13. [AR4-ospf-1-area-0.0.0.1]net 192.1.1.0 0.0.0.255
  14. [AR4-ospf-1-area-0.0.0.1]net 192.1.6.0 0.0.0.255

AR5

  1. <Huawei>sys
  2. [Huawei]un in en
  3. [Huawei]sys AR5
  4. [AR5]inte g0/0/1
  5. [AR5-GigabitEthernet0/0/1]ip ad 192.1.4.2 24
  6. [AR5-GigabitEthernet0/0/1]inte g0/0/0
  7. [AR5-GigabitEthernet0/0/0]ip ad 192.1.2.2 24
  8. [AR5-GigabitEthernet0/0/0]inte g0/0/2
  9. [AR5-GigabitEthernet0/0/2]ip ad 192.1.5.1 24
  10. [AR5-GigabitEthernet0/0/2]ospf
  11. [AR5-ospf-1]ar 1
  12. [AR5-ospf-1-area-0.0.0.1]net 192.1.4.0 0.0.0.255
  13. [AR5-ospf-1-area-0.0.0.1]net 192.1.2.0 0.0.0.255
  14. [AR5-ospf-1-area-0.0.0.1]net 192.1.5.0 0.0.0.255

AR6

  1. <Huawei>sys
  2. [Huawei]un in en
  3. [Huawei]sys AR6
  4. [AR6]inte g0/0/1
  5. [AR6-GigabitEthernet0/0/1]ip ad 192.1.5.2 24
  6. [AR6-GigabitEthernet0/0/1]inte g0/0/0
  7. [AR6-GigabitEthernet0/0/0]ip ad 192.1.6.2 24
  8. [AR6-GigabitEthernet0/0/0]inte g0/0/2
  9. [AR6-GigabitEthernet0/0/2]ip ad 192.1.3.2 24
  10. [AR6-GigabitEthernet0/0/2]ospf
  11. [AR6-ospf-1]ar 1
  12. [AR6-ospf-1-area-0.0.0.1]net 192.1.3.0 0.0.0.255
  13. [AR6-ospf-1-area-0.0.0.1]net 192.1.5.0 0.0.0.255
  14. [AR6-ospf-1-area-0.0.0.1]net 192.1.6.0 0.0.0.255

 整个实验ospf是将公网打通,rip是打通隧道内的路由,一般情况下写gre都是采用静态,这里用的是动态路由,我们要学会举一反三哦,灵活运用

ospf验证

蓝色区域中运行ospf,打通公网路由,以下是ar4、ar5、ar6的ospf邻居

ar1-ar2为隧道1

ar1-ar3为隧道2

ar2-ar3为隧道3

两两之间建立rip,并且将业务也宣告进rip中,保证隧道流量的网络可达

rip邻居验证

AR1

AR2

AR3

路由验证

每台边界路由器都能通过rip学习到私网路由

业务测试

通过抓包,也可以到gre的封装

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/567666
推荐阅读
相关标签
  

闽ICP备14008679号