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的路由
標註5代表外部路由
歡迎關注和轉發,更多精彩內容下期繼續分享!