MPBGP邻居(VPNV4邻居)

MPBGP邻居(VPNV4邻居)

在这里插入图片描述
1.路由的传递:
CE2—PE2
(1)在PE设备创建相应的VPN-instance数量,并且绑定相应的端口

[PE1]int g0/0/0
[PE1-GigabitEthernet0/0/0]ip add 192.168.1.2 24
[PE1]ip vpn-instance  1	
[PE1-vpn-instance-1]route-distinguisher 1:1
[PE1-vpn-instance-1-af-ipv4]vpn-target 1:1 export-extcommunity    
[PE1-vpn-instance-1-af-ipv4]vpn-target 2:2 import-extcommunity    
[PE1]int g0/0/0	
[PE1-GigabitEthernet0/0/0]ip binding  vpn-instance 1	
[PE1-GigabitEthernet0/0/0]ip address  192.168.1.2 24

(2)CE和PE的VPN-ianstance建立邻居

[CE1]ospf 1 
[CE1-ospf-1]a 0	
[CE1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0	
[CE1-ospf-1-area-0.0.0.0]network  1.1.1.1 0.0.0.0

[PE1]ospf 1 vpn-instance 1
[PE1-ospf-1]a 0	
[PE1-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0

CE2—PE2
(1)在PE设备创建相应的VPN-instance数量,并且绑定相应的端口

[PE2]int g0/0/0
[PE2-GigabitEthernet0/0/0]ip add 192.168.2.2 24
[PE2]ip vpn-instance  1	
[PE2-vpn-instance-1]route-distinguisher 1:1
[PE2-vpn-instance-1-af-ipv4]vpn-target 1:1 import-extcommunity   
[PE2-vpn-instance-1-af-ipv4]vpn-target 2:2 export-extcommunity     
[PE2]int g0/0/0	
[PE2-GigabitEthernet0/0/0]ip binding  vpn-instance 1	
[PE2-GigabitEthernet0/0/0]ip address  192.168.2.2 24

(2)CE和PE的VPN-ianstance建立邻居

[CE2]ospf 1 
[CE2-ospf-1]a 0	
[CE2-ospf-1-area-0.0.0.0]network 192.168.2.1 0.0.0.0	
[CE2-ospf-1-area-0.0.0.0]network  2.2.2.2 0.0.0.0

[PE2]ospf 1 vpn-instance 1
[PE2-ospf-1]a 0	
[PE2-ospf-1-area-0.0.0.0]network 192.168.2.2 0.0.0.0

2.在PE设备之间需要建立MPBGP邻居
PE1----PE2

[PE1-ospf-11]dis this
ospf 11 
 area 0.0.0.0 
  network 3.3.3.3 0.0.0.0 
  network 10.1.34.3 0.0.0.0 
[P-ospf-11]dis this
ospf 11 
 area 0.0.0.0 
  network 4.4.4.4 0.0.0.0 
  network 10.1.34.4 0.0.0.0 
  network 10.1.45.4 0.0.0.0 
[PE2-ospf-11]dis this
ospf 11 
 area 0.0.0.0 
  network 5.5.5.5 0.0.0.0 
  network 10.1.45.5 0.0.0.0 
[PE1]bgp 100
[PE1-bgp]router-id 3.3.3.3
[PE1-bgp]pee 5.5.5.5 as 100
[PE1-bgp]pee 5.5.5.5 c l0
[PE1-bgp]ipv4-family vpnv4
[PE1-bgp-af-vpnv4]peer 5.5.5.5 enable 
[PE2]bgp 100
[PE2-bgp]router-id 5.5.5.5
[PE2-bgp]pee 3.3.3.3 as 100
[PE2-bgp]pee 3.3.3.3 c l0
[PE2-bgp]ipv4-family vpnv4	
[PE2-bgp-af-vpnv4]pee 3.3.3.3 enable 

查看MPBGP邻居

[PE1]dis bgp vpnv4 all  peer  

3.在opsf 和BGP之间路由互相引入

[PE1]bgp 100 
[PE1-bgp]ipv4-family vpn-instance 1
[PE1-bgp-1]import-route ospf 1
[PE1]ospf 1 vpn-instance  1
[PE1-ospf-1]import-route bgp 

[PE2-bgp]ipv4-family vpn-instance 1
[PE2-bgp-1]import-route ospf 1
[PE2-bgp-1]qu
[PE2-bgp]ospf 1
[PE2]ospf 1 vpn-instance 1
[PE2-ospf-1]import-route bgp

4.公网标签,运行LDP协议

[PE1]mpls lsr-id  3.3.3.3
[PE1]mpls 
Info: Mpls starting, please wait... OK!
[PE1-mpls]mpls ldp 
[PE1]int g0/0/2
[PE1-GigabitEthernet0/0/2]mpls
[PE1-GigabitEthernet0/0/2]mpls ldp 
[P]mpls ls	
[P]mpls lsr-id  4.4.4.4
[P]mpls
Info: Mpls starting, please wait... OK!
[P-mpls]mpls ldp 
[P]int g0/0/2
[P-GigabitEthernet0/0/2]mpls
[P-GigabitEthernet0/0/2]mpls ldp 
[P]int g0/0/0
[P-GigabitEthernet0/0/0]mpls
[P-GigabitEthernet0/0/0]mpls ldp 
[PE2]mpls lsr-id  5.5.5.5
[PE2]
[PE2]mpls
Info: Mpls starting, please wait... OK!
[PE2-mpls]mpls ldp 
[PE2-mpls-ldp]qu
[PE2]int g0/0/0
[PE2-GigabitEthernet0/0/0]mpls
[PE2-GigabitEthernet0/0/0]mpls ldp

实验测试:
在这里插入图片描述
在这里插入图片描述

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页