您好,欢迎访问深圳市王网科技有限公司官网!
18923788188
国威赛纳 威谱 Grandstream 潮流网络 IP程控电话交换机 IP电话机 IPPBX语音网关 视频会议 深圳市王网科技有限公司
联系我们

国威赛纳 威谱 Grandstream 潮流网络 IP程控电话交换机 IP电话机 IPPBX语音网关 视频会议 深圳市王网科技有限公司

地址: Buji Street, Longgang District, Shenzhen, Guangdong
手机:

咨询热线18923788188

H3C路由器单连 MPLS VPN配置案例

发布时间:2020-03-23 17:24人气:

H3C路由器单连 MPLS VPN配置案例

MPLS VPN有三大组件(MPLS/MP-BGP/vpn-instance)
1、在MPLS域内配置OSPF(传递标签和建立BGP邻居)
RT1、RT2、RT3、RT6上的共同配置:
sys
ospf 100 (router-id 10.1.1.1可以不写,这里不传数据,只传标签)
area 0
network 10.0.0.0 0.255.255.255
quit
display ospf peer
display ip router-table pro o
1-2、RT1、RT2、RT3、RT6之间启用MPLS标签转发
mpls lsr-id 10.1.1.1
mpls
mpls ldp
int gi 0/0/0
mpls
mpls ldp

int gi 0/0/1
mpls
mpls ldp
-----------
mpls lsr-id 10.2.2.2
mpls
mpls ldp
int gi 0/0/0
mpls
mpls ldp

int gi 0/0/1
mpls
mpls ldp
------------
mpls lsr-id 10.3.3.3
mpls
mpls ldp
int gi 0/0/0
mpls
mpls ldp

int gi 0/0/1
mpls
mpls ldp
------------
mpls lsr-id 10.6.6.6
mpls
mpls ldp
int gi 0/0/0
mpls
mpls ldp

int gi 0/0/1
mpls
mpls ldp
quit
dis mpls ldp peer
display current-configuration
-----------
H3C开启tracert功能
ip unreachables enable
ip ttl-expires enable
------------------
2、配置MP-BGP  开启2、3的BGP(邻居要启在vpnv4 上面)
[RT2-bgp]dis this
#
bgp 1236
undo default ipv4-unicast
undo synchronization
peer 10.3.3.3 as-number 1236
peer 10.3.3.3 connect-interface LoopBack0
#
ipv4-family vpnv4
peer 10.3.3.3 enable
#
return
------------------
[RT3-bgp]dis this
#
bgp 1236
undo default ipv4-unicast
undo synchronization
peer 10.2.2.2 as-number 1236
peer 10.2.2.2 connect-interface LoopBack0
#
ipv4-family vpnv4
peer 10.2.2.2 enable
#
return
查看命令:dis bgp vpnv4 all peer
------------------------
3、创建VRF(vpn-instance)
[RT2-vpn-instance-RED]dis this
#
ip vpn-instance RED
rout-distinguisher 1236:100
vpn-target 1236:100 export-extcommunity
vpn-target 1236:100 import-extcommunity
#
return
------------------------
[RT3-vpn-instance-RED]dis this
#
ip vpn-instance RED
rout-distinguisher 1236:100
vpn-target 1236:100 export-extcommunity
vpn-target 1236:100 import-extcommunity
#
return
绑定接口
[RT2-GigabitEthernet0/0/2]dis this
#
interface GigabitEthernet0/0/2
port link-mode route
ip binding vpn-instance RED
ip address 100.35.1.2 255.255.255.0
#
return

-----------
[RT3-GigabitEthernet0/0/2]dis this
#
interface GigabitEthernet0/0/2
port link-mode route
ip binding vpn-instance RED
ip address 200.35.1.2 255.255.255.0
#
return
quit

4、配置PE-CE路由协议(在这个案例中使用OSPF,因为OSPF简单,多实例才用BGP)
[RT2-ospf-2345]dis this
#
ospf2345 vpn-instance RED
area 0.0.0.0
network 100.35.1.0 0.0.0.255
#
return
-----------
[RT2-ospf-2345]dis this
#
ospf2345 vpn-instance RED
area 0.0.0.0
network 200.35.1.0 0.0.0.255
#
return
--------------------
[RT4-ospf-2345]dis this
#
ospf2345
area 0.0.0.0
network 100.35.1.0 0.0.0.255
network 192.168.35.1 0.0.0.0
#
return
----------------------
[RT4-ospf-2345]dis this
#
ospf2345
area 0.0.0.0
network 100.35.1.0 0.0.0.255
network 192.168.35.1 0.0.0.0
#
return
----------------
[RT5-ospf-2345]dis this
#
ospf2345
area 0.0.0.0
network 200.35.1.0 0.0.0.255
network 172.16.35.1 0.0.0.0
#
return
--------------------------
5、在PE上做OSPF和BGP的双向重分发(PE和CE启用BGP时就不用重分发了)
[RT2]ospf 2435
[RT2-ospf-2435]import bgp
[RT2-ospf-2435]bgp 1236
[RT2-bgp]ipv4-family vpn-instance RED
[RT2-bgp-ipv4-RED]import ospf 2435
[RT2-bgp-ipv4-RED]import-route direct
return
-------------------
[RT3]ospf 2435
[RT3-ospf-2435]import bgp
[RT3-ospf-2435]bgp 1236
[RT3-bgp]ipv4-family vpn-instance RED
[RT3-bgp-ipv4-RED]import ospf 2435
return
dis ip routing-table
[RT3-bgp-ipv4-RED]import-route direct

推荐资讯