目錄
【實驗題目】
【實驗思路】
【實驗記錄】
一、公網(wǎng)部分
二、客戶A的MPLS VPN
三、客戶B的MPLS VPN
四、配置R7缺省指向公網(wǎng)
【實驗題目】
【實驗思路】
由題目可知,實驗?zāi)康氖且獙⒖蛻鬉的站點1和站點2通過MPLS VPN連成一個私網(wǎng),將客戶B的站點1和站點2通過MPLS VPN連成另一個私網(wǎng),MPLS VPN骨干網(wǎng)絡(luò)和R4與R7之間的一條網(wǎng)線(這里假設(shè)是R4-GE4/0/0與R7-GE0/0/1這根網(wǎng)線)構(gòu)成公網(wǎng)部分。
那么,首先要將公網(wǎng)做通和配置MPLS和配置BGP,即配置IP地址 ——> 配置OSPF路由 ——> 配置BGP(建立R2/R4對等體關(guān)系)——> 配置MPLS?,然后在R2、R4上配置VRF,為VRF接口配置IP地址,再分別為客戶A和客戶B的私網(wǎng)部分配置IP地址、使用靜態(tài)或動態(tài)方式傳遞路由,最后在R2、R4上的各自VRF空間中通過雙向重發(fā)布或BGP路由發(fā)布(BGP需配置為MP-BGP)。
至于R7訪問R2/R3/R4的環(huán)回,在R7寫缺省路由即可。
【實驗記錄】
一、公網(wǎng)部分
1. 配置IP地址
[r2]interface g0/0/2
[r2-GigabitEthernet0/0/2]ip address 23.0.0.1 24
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 2.2.2.2 24
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 23.0.0.2 24
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 34.0.0.1 24
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 3.3.3.3 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 34.0.0.2 24
[r4]int g4/0/0
[r4-GigabitEthernet4/0/0]ip address 47.0.0.1 24
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 4.4.4.4 24
[r7]int g0/0/1
[r7-GigabitEthernet0/0/1]ip address 47.0.0.2 24
2. 配置OSPF
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]a 0
[r2-ospf-1-area-0.0.0.0]network 23.0.0.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 0
[r3-ospf-1-area-0.0.0.0]network 23.0.0.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]a 0
[r4-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 47.0.0.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
?3. 配置BGP
[r2]bgp 1
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 4.4.4.4 as 1
[r2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[r4]bgp 1
[r4-bgp]router-id 4.4.4.4
[r4-bgp]peer 2.2.2.2 as 1
[r4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
4. 配置MPLS
[r2]mpls lsr-id 2.2.2.2
[r2]mpls
Info: Mpls starting, please wait... OK!
[r2-mpls]mpls ldp
[r2-mpls-ldp]q
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]mpls
[r2-GigabitEthernet0/0/0]mpls ldp
[r3]mpls lsr-id 3.3.3.3
[r3]mpls
Info: Mpls starting, please wait... OK!
[r3-mpls]mpls ldp
[r3-mpls-ldp]q
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]mpls
[r3-GigabitEthernet0/0/0]mpls ldp
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]mpls
[r3-GigabitEthernet0/0/1]mpls ldp
[r4]mpls lsr-id 4.4.4.4
[r4]mpls
Info: Mpls starting, please wait... OK!
[r4-mpls]mpls ldp
[r4-mpls-ldp]q
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]mpls
[r4-GigabitEthernet0/0/0]mpls ldp
公網(wǎng)部分完成
二、客戶A的MPLS VPN
1. 創(chuàng)建VRF空間
[r2]ip vpn-instance a1
[r2-vpn-instance-a1]route-distinguisher 100:1
[r2-vpn-instance-a1-af-ipv4]vpn-target 100:1 both
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
[r4]ip vpn-instance a2
[r4-vpn-instance-a2]route-distinguisher 100:1
[r4-vpn-instance-a2-af-ipv4]vpn-target 100:1 both
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
2. 劃分接口到VRF并配置IP地址
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip binding vpn-instance a1
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ip binding vpn-instance a2
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r4-GigabitEthernet0/0/1]ip address 192.168.3.1 24
3. 客戶A私網(wǎng)配置IP地址并使用靜態(tài)方式傳遞路由
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[r1]int LoopBack 0
[r1-LoopBack0]ip address 192.168.1.1 24
[r1]ip route-static 192.168.3.0 24 192.168.2.2
[r1]ip route-static 192.168.4.0 24 192.168.2.2
[r2]ip route-static vpn-instance a1 192.168.1.0 24 192.168.2.1
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.3.2 24
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.4.1 24
[r5]ip route-static 192.168.1.0 24 192.168.3.1
[r5]ip route-static 192.168.2.0 24 192.168.3.1
[r4]ip route-static vpn-instance a2 192.168.4.0 24 192.168.3.2
4. 配置MP-BGP并發(fā)布路由
[r2]bgp 1
[r2-bgp]ipv4-family vpnv4
[r2-bgp-af-vpnv4]peer 4.4.4.4 enable
[r2-bgp-af-vpnv4]q
[r2-bgp]ipv4-family vpn-instance a1
[r2-bgp-a1]network 192.168.1.0 24
[r2-bgp-a1]network 192.168.2.0 24
[r4]bgp 1
[r4-bgp]ipv4-family vpnv4
[r4-bgp-af-vpnv4]peer 2.2.2.2 enable
[r4-bgp-af-vpnv4]q
[r4-bgp]ipv4-family vpn-instance a2
[r4-bgp-a2]network 192.168.3.0 24
[r4-bgp-a2]network 192.168.4.0 24
?客戶A的MPLS VPN私網(wǎng)完成
三、客戶B的MPLS VPN
1. 創(chuàng)建VRF空間
[r2]ip vpn-instance b1
[r2-vpn-instance-b1]route-distinguisher 200:1
[r2-vpn-instance-b1-af-ipv4]vpn-target 200:1 b
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
[r4]ip vpn-instance b2
[r4-vpn-instance-b2]route-distinguisher 200:1
[r4-vpn-instance-b2-af-ipv4]vpn-target 200:1 b
[r4-vpn-instance-b2-af-ipv4]vpn-target 200:1 both
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
2. 劃分接口到VRF并配置IP地址
[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip binding vpn-instance b1
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r2-GigabitEthernet0/0/1]ip address 172.10.2.2 24
[r4]interface g0/0/2
[r4-GigabitEthernet0/0/2]ip binding vpn-instance b2
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r4-GigabitEthernet0/0/2]ip address 172.10.3.1 24
3. 客戶B私網(wǎng)配置IP地址并使用動態(tài)方式傳遞路由
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip address 172.10.2.1 24
[r6]int LoopBack 0
[r6-LoopBack0]ip address 172.10.1.1 24
[r6]rip 1
[r6-rip-1]v 2
[r6-rip-1]network 172.10.0.0
[r2]rip 1 vpn-instance b1
[r2-rip-1]v 2
[r2-rip-1]network 172.10.0.0
[r7]interface g0/0/0
[r7-GigabitEthernet0/0/0]ip address 172.10.3.2 24
[r7]int LoopBack 0
[r7-LoopBack0]ip address 172.10.4.1 24
[r7]ospf 2 router-id 7.7.7.7
[r7-ospf-2]a 0
[r7-ospf-2-area-0.0.0.0]network 172.10.3.0 0.0.0.255
[r7-ospf-2-area-0.0.0.0]network 172.10.4.1 0.0.0.0
[r4]ospf 2 vpn-instance b2 router-id 4.4.4.4
[r4-ospf-2]a 0
[r4-ospf-2-area-0.0.0.0]network 172.10.3.0 0.0.0.255
4. 配置MP-BGP并雙向重發(fā)布路由
[r2]bgp 1
[r2-bgp]ipv4-family vpn-instance b1
[r2-bgp-b1]import-route rip 1
[r2]rip 1
[r2-rip-1]import-route bgp
[r4]bgp 1
[r4-bgp]ipv4-family vpn-instance b2
[r4-bgp-b2]import-route ospf 2
[r4]ospf 2 vpn-instance b2
[r4-ospf-2]import-route bgp
?客戶B的MPLS VPN私網(wǎng)完成
四、配置R7缺省指向公網(wǎng)
[r7]ip route-static 0.0.0.0 0 47.0.0.1
文章來源:http://www.zghlxwxcb.cn/news/detail-501544.html
至此,實驗全部完成!?文章來源地址http://www.zghlxwxcb.cn/news/detail-501544.html
到了這里,關(guān)于華為路由器MPLS VPN綜合實驗的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!