实验目的
MPLS VPN 的Hub&Spoke架构
实验过程
- AS345内底层OSPF互通,使能MPLS LDP,35.45间建立MP-IBGP邻居
- 13.24建立EBGP邻居.R5建立实例
- 56子接口建立EBGP邻居,观察R1R2流量走向
1.
R5配置配置举例
int g0/0/0
ip ad 192.168.56.5 24
int g0/0/2
ip ad 192.168.45.5 24
os en 1 ar 0
mpls
mpls ldp
int g0/0/1
ip ad 192.168.35.5 24
os en 1 ar 0
mpls
mpls ldp
int l0
ip ad 5.5.5.5 32
os en 1 ar 0
ospf 1 r 5.5.5.5
ar 0
OSPF底层互通
MPLS LSP
IBGP邻居
sy
bgp 345
rou 5.5.5.5
pe 3.3.3.3 as 345
pe 3.3.3.3 connect-interface l0
pe 4.4.4.4 as 345
pe 4.4.4.4 connect-interface l0
MP-IBGP邻居
sy
bgp 345
ipv4-family vpnv4
peer 3.3.3.3 enable
peer 4.4.4.4 enable
2.
R3
sy
bgp 345
ipv4-family vpn-instance 1
peer 192.168.13.1 as-number 100
R4
sy
bgp 345
ipv4-family vpn-instance 2
peer 192.168.24.2 as-number 200
R5
sy
ip vpn-instance in
route-distinguisher 600:6
vpn-target 1:3 2:4 import-extcommunity
ip vpn-instance out
route-distinguisher 600:5
vpn-target 3:1 4:2 export-extcommunity
interface GigabitEthernet0/0/0.10
dot1q termination vid 10
ip binding vpn-instance in
ip address 10.10.56.5 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/0.20
dot1q termination vid 20
ip binding vpn-instance out
ip address 20.20.56.5 255.255.255.0
arp broadcast enable
此时OUT方向没有路由
3.R5R6子接口建立EBGP邻居
R5
ipv4-family vpn-instance in
peer 10.10.56.6 as-number 600
#
ipv4-family vpn-instance out
peer 20.20.56.6 as-number 600
R6
bgp 600
peer 10.10.56.5 as-number 345
peer 20.20.56.5 as-number 345
此时R5出方向依旧没有路由,在R6上查看路由属性发现AS号相同,放环机制丢弃了路由
在R5实例OUT上开启AS号忽略即可
[R5-bgp-out]peer 20.20.56.6 allow-as-loop
此时就从R6上学到了R1,R2路由。
流量走向符合设计