1、控制层面
A、域内IGP B、LDP(外层标签)C、VPNV4(PE之间)D、eigrp、rip(重分布)
2、转发层面
A、FIB B、LFIB
我们使用R2 R3 R4 R5 R6 R7 R8:
MPLS(OSPF):
1、域内的IGP(R2 R3 R5) 使用EIGRP
通告环回口以及域内的接口
2、在域内运行LDP
为了方便观察MPLS range (分配标签的范围,可选命令)
在域内的物理接口去运行LDP
验证LSP通道:
3、PE设备运行VRF(虚拟路由转发)
R2(config)#ip vrf cisco
R2(config-vrf)#rd 25:25
R2(config-vrf)#route-target 25:25
R2(config)#interface serial 1/0
R2(config-if)#ip vrf forwarding cisco---连接客户的接口划为VRF
4、PE设备之间建立VPNV4邻居
R2(config)#router bgp 100
R2(config-router)#no bgp default ipv4-unicast
R2(config-router)#neighbor 55.1.1.1 remote-as 100
R2(config-router)#neighbor 55.1.1.1 update-source lo 0
R2(config-router)#address-family vpnv4
R2(config-router-af)#neighbor 55.1.1.1 activate
R2#show ip bgp vpnv4 all summary--验证VPNV4邻居:
5、引入客户路由和双向重分布
R2和R5配置一样,此处R2为例:
R2(config)#interface serial 1/0
R2(config-if)#ip ospf 110 area 0 ---使用OSPF和客户建立邻居关系
R2(config)#router ospf 110--接口S1/0已经配置OSPF并属于VRF直接进入OSPF进程即可
R2(config-router)#redistribute bgp 100 subnets ----重分布BGP到OSPF
R2(config)#router bgp 100
R2(config-router)#address-family ipv4 vrf cisco---进入BGP的IPv4 VRF地址族
R2(config-router-af)#redistribute ospf 110---重分布OSPF
R6(config)#interface lo 0
R6(config-if)#ip os 110 area 0
PE 作为ABR show ip ospf 110 database summary查看:
R5(config)#router os 110
R5(config-router)#domain-id 0.0.0.200 ---配置domain id 默认ID为ospf进程ID110
domain id在PE设备才有:
R2为默认的110
此时R5的domain和R2不一样,R8上我们看到的路由变为ospf外部路由:
为了方便演示效果,在R6增加一个环回口lo1,并引入直连,R2学到的外部路由允许注入BGP
R6(config)#int lo 1
R6(config-if)#ip add 6.6.6.6 255.255.255.255
R6(config)#router os 110
R6(config-router)#redistribute connected
R2(config)#router bgp 100
R2(config-router)#address-family ipv4 vrf cisco
R2(config-router-af)#redistribute ospf 110 match internal external nssa-external--需要允许注入外部路由到BGP,不加match默认只允许O的路由
欢迎关注和转发,更多精彩内容下期继续分享!
閱讀更多 專注分享網絡技術 的文章