当前位置:   article > 正文

HCIE - 数通|MPLS虚拟专用网跨域实验_asbr设备

asbr设备

目录

一、前言

二、实验拓扑

三、实验需求

四、实验配置

(一)PE设备

① R2配置

② R7配置

③ R10配置

④ R11配置

(二)RR设备

① R3配置

② R6配置

(三)ASBR设备

① R4配置

② R5配置

五、实验效果

① R1到R8流量路径

② R9到R12流量路径


各位如果有学习python相关知识及相应算法的同学,推荐关注一下我的朋友:Neptune_yx


一、前言

        该实验是对MPLS虚拟专用网跨域的一次应用,通过该实验可以掌握相应的MPLS虚拟专用网跨域的有关配置,由于时间比较仓促,实验配置部分只说明设备的有关配置,不再按步骤进行说明,有关原理知识,可以参考前面的博文 MPLS虚拟专用网跨域(一)以及MPLS虚拟专用网跨域(二)

二、实验拓扑

三、实验需求

        ① AR3和AR6作为图中RR设备、AR2、AR9、AR7、AR10是PE设备;

        ② 通过MPLS VPN跨域option C1将AR1和AR8完成通信,AR11和AR12之间完成通信;

        ③ 各设备之间互访为最优路径。 

四、实验配置

(一)PE设备

① R2配置如下

  1. ip vpn-instance CE1
  2. ipv4-family
  3. route-distinguisher 2:2
  4. vpn-target 100:1 export-extcommunity
  5. vpn-target 100:1 import-extcommunity
  6. #
  7. mpls lsr-id 2.2.2.2
  8. mpls
  9. #
  10. mpls ldp
  11. #
  12. interface GigabitEthernet0/0/0
  13. ip binding vpn-instance CE1
  14. ip address 12.1.1.2 255.255.255.0
  15. #
  16. interface GigabitEthernet0/0/1
  17. ip address 23.1.1.2 255.255.255.0
  18. ospf enable 1 area 0.0.0.0
  19. mpls
  20. mpls ldp
  21. #
  22. interface LoopBack1
  23. ip address 2.2.2.2 255.255.255.255
  24. ospf enable 1 area 0.0.0.0
  25. #
  26. bgp 200
  27. peer 3.3.3.3 as-number 200
  28. peer 3.3.3.3 connect-interface LoopBack1
  29. #
  30. ipv4-family unicast
  31. undo synchronization
  32. peer 3.3.3.3 enable
  33. peer 3.3.3.3 label-route-capability
  34. #
  35. ipv4-family vpnv4
  36. policy vpn-target
  37. peer 3.3.3.3 enable
  38. #
  39. ipv4-family vpn-instance CE1
  40. peer 12.1.1.1 as-number 100
  41. #
  42. ospf 1
  43. area 0.0.0.0

② R7配置如下

  1. ip vpn-instance CE2
  2. ipv4-family
  3. route-distinguisher 7:7
  4. vpn-target 100:1 export-extcommunity
  5. vpn-target 100:1 import-extcommunity
  6. #
  7. mpls lsr-id 7.7.7.7
  8. mpls
  9. #
  10. mpls ldp
  11. #
  12. interface GigabitEthernet0/0/0
  13. ip address 67.1.1.7 255.255.255.0
  14. ospf enable 1 area 0.0.0.0
  15. mpls
  16. mpls ldp
  17. #
  18. interface GigabitEthernet0/0/1
  19. ip binding vpn-instance CE2
  20. ip address 78.1.1.7 255.255.255.0
  21. #
  22. interface LoopBack1
  23. ip address 7.7.7.7 255.255.255.255
  24. ospf enable 1 area 0.0.0.0
  25. #
  26. bgp 300
  27. peer 6.6.6.6 as-number 300
  28. peer 6.6.6.6 connect-interface LoopBack1
  29. #
  30. ipv4-family unicast
  31. undo synchronization
  32. peer 6.6.6.6 enable
  33. peer 6.6.6.6 label-route-capability
  34. #
  35. ipv4-family vpnv4
  36. policy vpn-target
  37. peer 6.6.6.6 enable
  38. #
  39. ipv4-family vpn-instance CE2
  40. peer 78.1.1.8 as-number 400
  41. #
  42. ospf 1
  43. area 0.0.0.0

③ R10配置如下

  1. #
  2. ip vpn-instance CE3
  3. ipv4-family
  4. route-distinguisher 10:10
  5. vpn-target 200:1 export-extcommunity
  6. vpn-target 200:1 import-extcommunity
  7. #
  8. mpls lsr-id 10.10.10.10
  9. mpls
  10. #
  11. mpls ldp
  12. #
  13. interface GigabitEthernet0/0/0
  14. ip binding vpn-instance CE3
  15. ip address 109.1.1.10 255.255.255.0
  16. #
  17. interface GigabitEthernet0/0/1
  18. ip address 103.1.1.10 255.255.255.0
  19. ospf enable 1 area 0.0.0.0
  20. mpls
  21. mpls ldp
  22. #
  23. interface LoopBack1
  24. ip address 10.10.10.10 255.255.255.255
  25. ospf enable 1 area 0.0.0.0
  26. #
  27. bgp 200
  28. peer 3.3.3.3 as-number 200
  29. peer 3.3.3.3 connect-interface LoopBack1
  30. #
  31. ipv4-family unicast
  32. undo synchronization
  33. peer 3.3.3.3 enable
  34. peer 3.3.3.3 label-route-capability
  35. #
  36. ipv4-family vpnv4
  37. policy vpn-target
  38. peer 3.3.3.3 enable
  39. #
  40. ipv4-family vpn-instance CE3
  41. peer 109.1.1.9 as-number 500
  42. #
  43. ospf 1
  44. area 0.0.0.0

④ R11配置如下

  1. #
  2. ip vpn-instance CE4
  3. ipv4-family
  4. route-distinguisher 11:11
  5. vpn-target 200:1 export-extcommunity
  6. vpn-target 200:1 import-extcommunity
  7. #
  8. mpls lsr-id 11.11.11.11
  9. mpls
  10. #
  11. mpls ldp
  12. #
  13. #
  14. interface GigabitEthernet0/0/0
  15. ip binding vpn-instance CE4
  16. ip address 112.1.1.11 255.255.255.0
  17. #
  18. interface GigabitEthernet0/0/1
  19. ip address 116.1.1.11 255.255.255.0
  20. ospf enable 1 area 0.0.0.0
  21. mpls
  22. mpls ldp
  23. #
  24. interface LoopBack1
  25. ip address 11.11.11.11 255.255.255.255
  26. ospf enable 1 area 0.0.0.0
  27. #
  28. bgp 300
  29. peer 6.6.6.6 as-number 300
  30. peer 6.6.6.6 connect-interface LoopBack1
  31. #
  32. ipv4-family unicast
  33. undo synchronization
  34. peer 6.6.6.6 enable
  35. peer 6.6.6.6 label-route-capability
  36. #
  37. ipv4-family vpnv4
  38. policy vpn-target
  39. peer 6.6.6.6 enable
  40. #
  41. ipv4-family vpn-instance CE4
  42. peer 112.1.1.12 as-number 600
  43. #
  44. ospf 1
  45. area 0.0.0.0
  46. #

(二)RR设备

① R3配置如下

  1. #
  2. mpls lsr-id 3.3.3.3
  3. mpls
  4. #
  5. mpls ldp
  6. #
  7. #
  8. interface GigabitEthernet0/0/0
  9. ip address 23.1.1.3 255.255.255.0
  10. ospf enable 1 area 0.0.0.0
  11. mpls
  12. mpls ldp
  13. #
  14. interface GigabitEthernet0/0/1
  15. ip address 34.1.1.3 255.255.255.0
  16. ospf enable 1 area 0.0.0.0
  17. mpls
  18. mpls ldp
  19. #
  20. interface GigabitEthernet0/0/2
  21. ip address 103.1.1.3 255.255.255.0
  22. ospf enable 1 area 0.0.0.0
  23. mpls
  24. mpls ldp
  25. #
  26. interface LoopBack1
  27. ip address 3.3.3.3 255.255.255.255
  28. ospf enable 1 area 0.0.0.0
  29. #
  30. bgp 200
  31. peer 2.2.2.2 as-number 200
  32. peer 2.2.2.2 connect-interface LoopBack1
  33. peer 4.4.4.4 as-number 200
  34. peer 4.4.4.4 connect-interface LoopBack1
  35. peer 6.6.6.6 as-number 300
  36. peer 6.6.6.6 ebgp-max-hop 10
  37. peer 6.6.6.6 connect-interface LoopBack1
  38. peer 10.10.10.10 as-number 200
  39. peer 10.10.10.10 connect-interface LoopBack1
  40. #
  41. ipv4-family unicast
  42. undo synchronization
  43. peer 2.2.2.2 enable
  44. peer 2.2.2.2 reflect-client
  45. peer 2.2.2.2 label-route-capability
  46. peer 4.4.4.4 enable
  47. peer 4.4.4.4 reflect-client
  48. peer 4.4.4.4 label-route-capability
  49. peer 6.6.6.6 enable
  50. peer 10.10.10.10 enable
  51. peer 10.10.10.10 reflect-client
  52. peer 10.10.10.10 label-route-capability
  53. #
  54. ipv4-family vpnv4
  55. undo policy vpn-target
  56. peer 2.2.2.2 enable
  57. peer 2.2.2.2 next-hop-invariable
  58. peer 4.4.4.4 enable
  59. peer 6.6.6.6 enable
  60. peer 6.6.6.6 next-hop-invariable
  61. peer 10.10.10.10 enable
  62. peer 10.10.10.10 next-hop-invariable
  63. #
  64. ospf 1
  65. area 0.0.0.0
  66. #

② R6配置如下

  1. #
  2. mpls lsr-id 6.6.6.6
  3. mpls
  4. #
  5. mpls ldp
  6. #
  7. interface GigabitEthernet0/0/0
  8. ip address 56.1.1.6 255.255.255.0
  9. ospf enable 1 area 0.0.0.0
  10. mpls
  11. mpls ldp
  12. #
  13. interface GigabitEthernet0/0/1
  14. ip address 67.1.1.6 255.255.255.0
  15. ospf enable 1 area 0.0.0.0
  16. mpls
  17. mpls ldp
  18. #
  19. interface GigabitEthernet0/0/2
  20. ip address 116.1.1.6 255.255.255.0
  21. ospf enable 1 area 0.0.0.0
  22. mpls
  23. mpls ldp
  24. #
  25. interface LoopBack1
  26. ip address 6.6.6.6 255.255.255.255
  27. ospf enable 1 area 0.0.0.0
  28. #
  29. bgp 300
  30. peer 3.3.3.3 as-number 200
  31. peer 3.3.3.3 ebgp-max-hop 10
  32. peer 3.3.3.3 connect-interface LoopBack1
  33. peer 5.5.5.5 as-number 300
  34. peer 5.5.5.5 connect-interface LoopBack1
  35. peer 7.7.7.7 as-number 300
  36. peer 7.7.7.7 connect-interface LoopBack1
  37. peer 11.11.11.11 as-number 300
  38. peer 11.11.11.11 connect-interface LoopBack1
  39. #
  40. ipv4-family unicast
  41. undo synchronization
  42. peer 3.3.3.3 enable
  43. peer 5.5.5.5 enable
  44. peer 5.5.5.5 reflect-client
  45. peer 5.5.5.5 label-route-capability
  46. peer 7.7.7.7 enable
  47. peer 7.7.7.7 reflect-client
  48. peer 7.7.7.7 label-route-capability
  49. peer 11.11.11.11 enable
  50. peer 11.11.11.11 reflect-client
  51. peer 11.11.11.11 label-route-capability
  52. #
  53. ipv4-family vpnv4
  54. undo policy vpn-target
  55. peer 3.3.3.3 enable
  56. peer 3.3.3.3 next-hop-invariable
  57. peer 5.5.5.5 enable
  58. peer 7.7.7.7 enable
  59. peer 7.7.7.7 next-hop-invariable
  60. peer 11.11.11.11 enable
  61. peer 11.11.11.11 next-hop-invariable
  62. #
  63. ospf 1
  64. area 0.0.0.0
  65. #

(三)ASBR设备

① R4配置如下:

  1. #
  2. mpls lsr-id 4.4.4.4
  3. mpls
  4. #
  5. mpls ldp
  6. #
  7. interface GigabitEthernet0/0/0
  8. ip address 34.1.1.4 255.255.255.0
  9. ospf enable 1 area 0.0.0.0
  10. mpls
  11. mpls ldp
  12. #
  13. interface GigabitEthernet0/0/1
  14. ip address 45.1.1.4 255.255.255.0
  15. mpls
  16. #
  17. #
  18. interface LoopBack1
  19. ip address 4.4.4.4 255.255.255.255
  20. ospf enable 1 area 0.0.0.0
  21. #
  22. bgp 200
  23. peer 3.3.3.3 as-number 200
  24. peer 3.3.3.3 connect-interface LoopBack1
  25. peer 45.1.1.5 as-number 300
  26. #
  27. ipv4-family unicast
  28. undo synchronization
  29. network 2.2.2.2 255.255.255.255
  30. network 3.3.3.3 255.255.255.255
  31. network 10.10.10.10 255.255.255.255
  32. peer 3.3.3.3 enable
  33. peer 3.3.3.3 route-policy rr export
  34. peer 3.3.3.3 label-route-capability
  35. peer 45.1.1.5 enable
  36. peer 45.1.1.5 route-policy asbr export
  37. peer 45.1.1.5 label-route-capability
  38. #
  39. ipv4-family vpnv4
  40. undo policy vpn-target
  41. peer 3.3.3.3 enable
  42. #
  43. ospf 1
  44. area 0.0.0.0
  45. #
  46. route-policy asbr permit node 10
  47. apply mpls-label
  48. #
  49. route-policy rr permit node 10
  50. if-match mpls-label
  51. apply mpls-label
  52. #

② R5配置如下

  1. mpls lsr-id 5.5.5.5
  2. mpls
  3. #
  4. mpls ldp
  5. #
  6. interface GigabitEthernet0/0/0
  7. ip address 45.1.1.5 255.255.255.0
  8. mpls
  9. #
  10. interface GigabitEthernet0/0/1
  11. ip address 56.1.1.5 255.255.255.0
  12. ospf enable 1 area 0.0.0.0
  13. mpls
  14. mpls ldp
  15. #
  16. interface LoopBack1
  17. ip address 5.5.5.5 255.255.255.255
  18. ospf enable 1 area 0.0.0.0
  19. #
  20. bgp 300
  21. peer 6.6.6.6 as-number 300
  22. peer 6.6.6.6 connect-interface LoopBack1
  23. peer 45.1.1.4 as-number 200
  24. #
  25. ipv4-family unicast
  26. undo synchronization
  27. network 6.6.6.6 255.255.255.255
  28. network 7.7.7.7 255.255.255.255
  29. network 11.11.11.11 255.255.255.255
  30. peer 6.6.6.6 enable
  31. peer 6.6.6.6 route-policy rr export
  32. peer 6.6.6.6 label-route-capability
  33. peer 45.1.1.4 enable
  34. peer 45.1.1.4 route-policy asbr export
  35. peer 45.1.1.4 label-route-capability
  36. #
  37. ipv4-family vpnv4
  38. undo policy vpn-target
  39. peer 6.6.6.6 enable
  40. #
  41. ospf 1
  42. area 0.0.0.0
  43. #
  44. route-policy asbr permit node 10
  45. apply mpls-label
  46. #
  47. route-policy rr permit node 10
  48. if-match mpls-label
  49. apply mpls-label
  50. #

五、实验效果

① R1到R8流量路径如下

② R9到R12流量路径如下

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

闽ICP备14008679号