mpls-vpn实验(H3C)

拓扑:
如图:
R1,R5为ce
R2,R4为pe路由器
R3为p路由器
mpls vpn配置:
①公网igp协议
[R2]int e0/0/1
[R2-Ethernet0/0/1]ip add 23.1.1.2 255.255.255.0
[R2-Ethernet0/0/1]un sh
[R2-Ethernet0/0/1]int loo 0
[R2-LoopBack0]ip add 2.2.2.2 255.255.255.255
[R2-LoopBack0]int e0/0/0
[R2-Ethernet0/0/0]ip add 12.1.1.2 255.255.255.0
[R2-Ethernet0/0/0]un sh
[R3]int loo 0
[R3-LoopBack0]ip add 3.3.3.3 255.255.255.255
[R3-LoopBack0]int e0/0/0
[R3-Ethernet0/0/0]ip add 23.1.1.3 255.255.255.0
[R3-Ethernet0/0/0]un sh
[R3-Ethernet0/0/0]int e0/0/1
[R3-Ethernet0/0/1]ip add 34.1.1.3 255.255.255.0
[R3-Ethernet0/0/1]un sh
[R3-Ethernet0/0/1]q
[R4]int loo 0
[R4-LoopBack0]ip add 4.4.4.4 255.255.255.255
[R4-LoopBack0]q
[R4]int e0/0/0
[R4-Ethernet0/0/0]ip add 34.1.1.4 255.255.255.0
[R4-Ethernet0/0/0]un sh
[R4-Ethernet0/0/0]q
查看ospf neighbor
[R3]dis ospf peer bri
        OSPF Process 1 with Router ID 3.3.3.3
                  Peer Statistic Information
----------------------------------------------------------------------------
Area Id          Interface                        Neighbor id      State   
0.0.0.0          Ethernet0/0/0                    2.2.2.2          Full
0.0.0.0          Ethernet0/0/1                    4.4.4.4          Full
----------------------------------------------------------------------------
启用mpls转发机制和ldp协议
[R2]mpls lsr-id 2.2.2.2    >设定mpls ldp的route-id
[R2]mpls                >全局启用mpls转发机制
Info: Mpls starting, OK!
[R2]mpls ldp        ####全局启用ldp信令协议
[R2-mpls-ldp]q
[R2]int e0/0/1
[R2-Ethernet0/0/1]mpls        ###接口启用mpls
[R2-Ethernet0/0/1]mpls ldp        >#接口启用mpls ldp
[R3]mpls lsr-id 3.3.3.3
[R3]mpls
Info: Mpls starting, OK!
[R3-mpls]q
[R3]mpls ldp
[R3-Ethernet0/0/0]mpls
[R3-Ethernet0/0/0]mpls ldp
[R3-Ethernet0/0/0]int e0/0/1
[R3-Ethernet0/0/1]mpls
[R3-Ethernet0/0/1]mpls ldp
[R4]mpls lsr 4.4.4.4
[R4]mpls
Info: Mpls starting, OK!
[R4-mpls]mpls ldp
[R4-mpls-ldp]q
[R4]int e0/0/0
[R4-Ethernet0/0/0]mpls
[R4-Ethernet0/0/0]mpls ldp
③定义vpn-instance和vpn-instance的接口
[R2]ip vpn-instance site1
[R2-vpn-instance-site1]route-distinguisher 1:1        >定义RD
[R2-vpn-instance-site1-af-ipv4]q 
[R2-vpn-instance-site1]vpn-target 1:2 export-extcommunity        ###定义rt
EVT Assignment result:
Info: VPN-Target assignment is successful.
[R2-vpn-instance-site1]vpn-target 2:1 im
IVT Assignment result:
Info: VPN-Target assignment is successful.
[R2-vpn-instance-site1]q
[R2]int e0/0/0
[R2-Ethernet0/0/0]ip binding vpn-instance site1        ####把接口加入到vpn-instance
[R2-Ethernet0/0/0]ip add 12.1.1.2 255.255.255.0
[R4]ip vpn-instance site2
[R4-vpn-instance-site2]route-distinguisher 2:2
[R4-vpn-instance-site2-af-ipv4]q
[R4-vpn-instance-site2]vpn-target 1:2 import-extcommunity
IVT Assignment result:
Info: VPN-Target assignment is successful.
[R4-vpn-instance-site2]vpn-target 2:1 export
[R4]int e0/0/1
[R4-Ethernet0/0/1]ip binding vpn-instance site2
④启用pe-ce路由协议
CE配置
[R1]ospf 1 rou 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]net 10.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]net 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]net 12.1.1.1 0.0.0.0
[R5]ospf 1 rou 5.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]net 5.5.5.5 0.0.0.0
[R5-ospf-1-area-0.0.0.0]net 45.1.1.0 0.0.0.255
[R5-ospf-1-area-0.0.0.0]net 10.1.2.0 0.0.0.255
PE配置
[R2]ospf 2 vpn site1
[R2-ospf-2]area 0     
[R2-ospf-2-area-0.0.0.0]net 12.1.1.2 0.0.0.0
[R2-ospf-2-area-0.0.0.0]q
[R4]ospf 2 vpn-instance site2
[R4-ospf-2]area 0
[R4-ospf-2-area-0.0.0.0]net 45.1.1.4 0.0.0.0
查看ospf邻居
[R1]dis ospf peer b
        OSPF Process 1 with Router ID 1.1.1.1
                  Peer Statistic Information
----------------------------------------------------------------------------
Area Id          Interface                        Neighbor id      State   
0.0.0.0          Ethernet0/0/0                    12.1.1.2Full
----------------------------------------------------------------------------
[R5]      dis ospf peer
        OSPF Process 1 with Router ID 5.5.5.5
                Neighbors
Area 0.0.0.0 interface 45.1.1.5(Ethernet0/0/0)'s neighbors
Router ID: 45.1.1.4        Address: 45.1.1.4       
  State: Full  Mode:Nbr is  Master  Priority: 1
  DR: 45.1.1.5  BDR: 45.1.1.4  MTU: 0   
  Dead timer due in 40  sec
  Retrans timer interval: 5
  Neighbor is up for 00:21:19   

本文发布于:2024-09-22 12:29:11,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/1/380293.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:启用   协议   全局
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议