实验目的
MPLS VPN Extranet场景
实验过程
1.AS345底层ospf连通,LSP使能MPLS LDP
2.R3.R4分别和R5建立IBGP邻居,和MP-IBGP邻居,VPNv4隧道
3.通过RT值实现R1.R2都能访问R6,彼此不能互访
R3配置举例
ospf 1 router-id 3.3.3.3
area 0.0.0.0
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
bgp 345
router-id 3.3.3.3
peer 5.5.5.5 as-number 345
peer 5.5.5.5 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 5.5.5.5 enable
#
ipv4-family v4
policy -target
peer 5.5.5.5 enable
ASBR建立VPN实例
R3
ip -instance 16
ipv4-family
route-distinguisher 100:1
-target 1:6 export-extcommunity
-target 6:1 import-extcommunity
interface GigabitEthernet0/0/0
ip binding -instance 16
ip address 192.168.13.3 255.255.255.0
ipv4-family -instance 16
peer 192.168.13.1 as-number 100
R4
ip -instance 26
ipv4-family
route-distinguisher 200:2
-target 2:6 export-extcommunity
-target 6:2 import-extcommunity
interface GigabitEthernet0/0/0
ip binding -instance 26
ip address 192.168.24.4 255.255.255.0
ipv4-family -instance 26
peer 192.168.24.2 as-number 200
R5
ip -instance 12
ipv4-family
route-distinguisher 600:6
-target 6:1 6:2 export-extcommunity
-target 1:6 2:6 import-extcommunity
interface GigabitEthernet0/0/0
ip binding -instance 12
ip address 192.168.56.5 255.255.255.0
ipv4-family -instance 12
peer 192.168.56.6 as-number 600
此时路由符合设计,R1.R2上有R6路由,彼此没有