当前位置:   article > 正文

使用华为ensp搭建MPLS实验_ensp mpls ldp实验

ensp mpls ldp实验

具体配置要求:

一、 基础接口及环回接口配置如下:

二、R1

[R1]ip route-static 0.0.0.0 0 192.168.2.2

三、R2

  1. [R2]ospf 1 router-id 2.2.2.2
  2. [R2-ospf-1]area 0
  3. [R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
  4. [R2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0
  5. MPLS
  6. [R2]mpls lsr-id 2.2.2.2
  7. [R2]mpls
  8. [R2-mpls]mpls ldp
  9. [R2-mpls-ldp]int g0/0/2
  10. [R2-GigabitEthernet0/0/2]mpls
  11. [R2-GigabitEthernet0/0/2]mpls ldp
  12. MPLS VPN
  13. [R2]ip vpn-instance A1
  14. [R2-vpn-instance-A1]ipv4-family
  15. [R2-vpn-instance-A1-af-ipv4]route-distinguisher 1:1
  16. [R2-vpn-instance-A1-af-ipv4]vpn-target 1:1
  17. [R2-vpn-instance-A1-af-ipv4]int g0/0/1
  18. [R2-GigabitEthernet0/0/1]ip binding vpn-instance A1
  19. [R2-GigabitEthernet0/0/1]ip add 192.168.2.2 24
  20. [R2]ip vpn-instance B1
  21. [R2-vpn-instance-B1]ipv4-family
  22. [R2-vpn-instance-B1-af-ipv4]route-distinguisher 2:2
  23. [R2-vpn-instance-B1-af-ipv4]vpn-target 2:2
  24. [R2-vpn-instance-B1-af-ipv4]int g0/0/0
  25. [R2-GigabitEthernet0/0/0]ip binding vpn-instance B1
  26. [R2-GigabitEthernet0/0/0]ip add 192.168.2.2 24
  27. BGP
  28. [R2]bgp 2
  29. [R2-bgp]router-id 2.2.2.2
  30. [R2-bgp]peer 4.4.4.4 as-number 2
  31. [R2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
  32. [R2-bgp]peer 4.4.4.4 next-hop-local
  33. [R2-bgp]ipv4-family vpnv4
  34. [R2-bgp-af-vpnv4]peer 4.4.4.4 enable
  35. 静态宣告
  36. [R2]ip route-static vpn-instance B1 192.168.1.0 24 192.168.2.1
  37. [R2]bgp 2
  38. [R2-bgp]ipv4 vpn-instance B1
  39. [R2-bgp-B1]import-route direct
  40. [R2-bgp-B1]import-route static
  41. 动态宣告
  42. [R2]rip 1 vpn-instance A1
  43. [R2-rip-1]ver 2
  44. [R2-rip-1]network 192.168.2.0
  45. [R2-rip-1]import-route bgp
  46. [R2-rip-1]q
  47. [R2]bgp 2
  48. [R2-bgp]ipv4-family vpn-instance A1
  49. [R2-bgp-A1]import-route rip 1

四、R3

  1. [R3]ospf 1 router-id 3.3.3.3
  2. [R3-ospf-1]area 0
  3. [R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
  4. [R3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
  5. [R3-ospf-1-area-0.0.0.0]network 23.1.1.2 0.0.0.0
  6. MPLS
  7. [R3]mpls lsr-id 3.3.3.3
  8. [R3]mpls
  9. [R3-mpls]mpls ldp
  10. [R3-mpls-ldp]int g0/0/0
  11. [R3-GigabitEthernet0/0/0]mpls
  12. [R3-GigabitEthernet0/0/0]mpls ldp
  13. [R3-GigabitEthernet0/0/0]int g0/0/1
  14. [R3-GigabitEthernet0/0/1]mpls
  15. [R3-GigabitEthernet0/0/1]mpls ldp

五、R4

  1. OSPF配置
  2. [R4]ospf 1 router-id 4.4.4.4
  3. [R4-ospf-1]area 0
  4. [R4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
  5. [R4-ospf-1-area-0.0.0.0]network 47.1.1.2 0.0.0.0
  6. [R4-ospf-1-area-0.0.0.0]network 34.1.1.2 0.0.0.0
  7. MPLS
  8. [R4]mpls lsr-id 4.4.4.4
  9. [R4]mpls
  10. [R4-mpls]mpls ldp
  11. [R4-mpls-ldp]int g0/0/0
  12. [R4-GigabitEthernet0/0/0]mpls
  13. [R4-GigabitEthernet0/0/0]mpls ldp
  14. [R4-GigabitEthernet0/0/0]int g0/0/1
  15. [R4-GigabitEthernet0/0/1]mpls
  16. [R4-GigabitEthernet0/0/1]mpls ldp
  17. MPLS VPN
  18. [R4]ip vpn-instance B2
  19. [R4-vpn-instance-B2]ipv4-family
  20. [R4-vpn-instance-B2-af-ipv4]route-distinguisher 2:2
  21. [R4-vpn-instance-B2-af-ipv4]vpn-target 2:2
  22. [R4-vpn-instance-B2-af-ipv4]int g4/0/0
  23. [R4-GigabitEthernet4/0/0]ip binding vpn-instance B2
  24. [R4-GigabitEthernet4/0/0]ip add 192.168.3.2 24
  25. [R4]ip vpn-instance A2
  26. [R4-vpn-instance-A2]ipv4-family
  27. [R4-vpn-instance-A2-af-ipv4]route-distinguisher 1:1
  28. [R4-vpn-instance-A2-af-ipv4]vpn-target 1:1
  29. [R4-vpn-instance-A2-af-ipv4]int g0/0/2
  30. [R4-GigabitEthernet0/0/2]ip binding vpn-instance A2
  31. [R4-GigabitEthernet0/0/2]ip add 192.168.3.2 24
  32. BGP
  33. [R4]bgp 2
  34. [R4-bgp]router-id 4.4.4.4
  35. [R4-bgp]peer 2.2.2.2 as-number 2
  36. [R4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
  37. [R4-bgp]peer 2.2.2.2 next-hop-local
  38. [R4-bgp]ipv4-family vpnv4
  39. [R4-bgp-af-vpnv4]peer 2.2.2.2 enable
  40. 静态宣告
  41. [R4]ip route-static vpn-instance B2 192.168.4.0 24 192.168.3.1
  42. [R4]bgp 2
  43. [R4-bgp]ipv4 vpn-instance B2
  44. [R4-bgp-B2]import-route direct
  45. [R4-bgp-B2]import-route static
  46. 动态宣告
  47. [R4]ospf 2 vpn-instance A2
  48. [R4-ospf-2]area 0
  49. [R4-ospf-2-area-0.0.0.0]network 192.168.3.2 0.0.0.0
  50. [R4-ospf-2-area-0.0.0.0]q
  51. [R4-ospf-2]import-route bgp
  52. [R4-ospf-2]q
  53. [R4]bgp 2
  54. [R4-bgp]ipv4-family vpn-instance A2
  55. [R4-bgp-A2]import-route ospf 2

六、R5

[R5]ip route-static 0.0.0.0 0 192.168.3.2

七、R6

  1. RIP
  2. [R6]rip 1
  3. [R6-rip-1]ver 2
  4. [R6-rip-1]network 192.168.2.0
  5. [R6-rip-1]network 192.168.1.0

八、R7

  1. OSPF
  2. [R7]ospf 1
  3. [R7-ospf-1]area 0
  4. [R7-ospf-1-area-0.0.0.0]network 192.168.4.2 0.0.0.0
  5. [R7-ospf-1-area-0.0.0.0]network 192.168.3.1 0.0.0.0
  6. [R7]ip route-static 0.0.0.0 0 47.1.1.2
  7. NAT
  8. [R7]acl 2000
  9. [R7-acl-basic-2000]rule permit source 192.168.4.2 0.0.0.0
  10. [R7-acl-basic-2000]int g0/0/0
  11. [R7-GigabitEthernet0/0/0]nat outbound 2000

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

闽ICP备14008679号