天天看點

MPLS LAB 2 - MPLS ×××

本實驗是根據廣州wolf lab CCNP 的課程和實驗整理出來的,承接上一MPLS LAB1 - MPLS BGP Interaction。

MPLS LAB 2 - MPLS ×××

圖1:描述了MPLS ××× 的一些專用術語。

MPLS LAB 2 - MPLS ×××

圖2:大緻描述了MPLS ××× 的架構和工作原理,具體細節可以參考《CCNP_ISCW_Student_Guide_Version_1.0_Vol.1》p208 - 215。

MPLS LAB 2 - MPLS ×××

圖3:本實驗拓撲,用DynamipsGUI 建構,IOS 為c3640-js-mz.124-10,跟LAB1的一樣。

實驗步驟如下:

1.在Core裡面運作IGP,ospf

2.在Core裡面運作MPLS

3.在兩個PE之間運作MP-BGP

4.在兩個PE建立虛拟路由器VRF

5.把相關的接口放進VRF

6.在PE和CE運作IGP

7.在PE上把PE和CE間的路由協定和MP-BGP要雙向重分布

Step 1: Config R2/3/4/5 with OSPF

參考《MPLS LAB1 - MPLS BGP Interaction》

Step 2: Config R2/3/4/5 with MPLS Step 3: Config R2/5 runnng MP-BGP R2#

router bgp 10

no bgp default ipv4-unicast

address-family vpnv4

nei 5.5.5.5 activate

R5#

nei 2.2.2.2 activate

sh ip bgp summ

//No neighborship between R2 and R5

show ip bgp vpnv4 all sum

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

5.5.5.5 4 10 122 122 1 0 0 00:06:47 0

2.2.2.2 4 10 125 125 1 0 0 00:09:31 0

address-family ipv4

neighbor 5.5.5.5 activate

neighbor 5.5.5.5 next-hop-self

neighbor 24.0.0.4 activate

no auto-summary

no synchronization

exit-address-family

neighbor 2.2.2.2 activate

neighbor 2.2.2.2 next-hop-self

neighbor 56.0.0.6 activate

sh ip bgp sum

2.2.2.2 4 10 138 138 24 0 0 00:02:05 2

56.0.0.6 4 200 119 125 24 0 0 01:52:14 4

//We can see the neighbor now.

Step 4: 在兩個 PE 建立虛拟路由器 VRF

ip vrf ABC

rd 10:2

route-target 10:2

rd 10:5

route-target 10:5

Step 5: 把相關的接口放進

int s0/1

ip vrf forwarding ABC

ip add 24.0.0.2 255.255.255.0

sh ip ro

//No more 24.0.0.0/24 route

sh ip ro vrf ABC

Gateway of last resort is not set

24.0.0.0/24 is subnetted, 1 subnets

C 24.0.0.0 is directly connected, Serial0/1

ip add 56.0.0.5 255.255.255.0

56.0.0.0/24 is subnetted, 1 subnets

C 56.0.0.0 is directly connected, FastEthernet2/0

R4#

ping 24.0.0.2 !!!!!

ping 24.0.0.4.....

ping vrf ABC 24.0.0.4 !!!!!

telnet 24.0.0.4 /vrf ABC

Password required, but none set

Step 6: CE 運作 IGP

router os 100

router-id 4.4.4.4

net 4.4.4.4 0.0.0.0 a 0

net 24.0.0.0 0.0.0.255 a 0

router os 100 vrf ABC

4.0.0.0/32 is subnetted, 1 subnets

O 4.4.4.4 [110/65] via 24.0.0.4, 00:04:18, Serial0/1

R6#

router os 200

router-id 6.6.6.6

net 6.6.6.6 0.0.0.0 a 0

net 56.0.0.0 0.0.0.255 a 0

router os 200 vrf ABC

6.0.0.0/32 is subnetted, 1 subnets

O 6.6.6.6 [110/2] via 56.0.0.6, 00:00:55, FastEthernet2/0

Step 7: 上把 間的路由協定和 MP-BGP 要雙向重分布

address-family ipv4 vrf ABC

redistribute ospf 100

sh ip bgp vpnv4 all

Network Next Hop Metric LocPrf Weight Path

Route Distinguisher: 10:2 (default for vrf ABC)

*> 4.4.4.4/32 24.0.0.4 65 32768 ?

*> 24.0.0.0/24 0.0.0.0 0 32768 ?

O 6.6.6.6 [110/2] via 56.0.0.6, 00:03:53, FastEthernet2/0

// There is no R2 routes

conf t

router-target import 10:2

B 4.4.4.4 [200/65] via 2.2.2.2, 00:00:06

O 6.6.6.6 [110/2] via 56.0.0.6, 00:05:00, FastEthernet2/0

B 24.0.0.0 [200/0] via 2.2.2.2, 00:00:06

// R2 routes inside.

Route Distinguisher: 10:2

*>i4.4.4.4/32 2.2.2.2 65 100 0 ?

*>i24.0.0.0/24 2.2.2.2 0 100 0 ?

Route Distinguisher: 10:5 (default for vrf ABC)

// bgp routes inside

sh ip route

// No relevant routes

conf t

redistribute bgp 10 subnets

rotuer bgp 10

address ipv4 vrf ABC

redistribute ospf 200

route-target import 10:5

O 4.4.4.4 [110/65] via 24.0.0.4, 00:18:59, Serial0/1

B 6.6.6.6 [200/2] via 5.5.5.5, 00:00:00

B 56.0.0.0 [200/0] via 5.5.5.5, 00:00:00

//R5 routes inside.

sh ip b vpnv4 all

*>i6.6.6.6/32 5.5.5.5 2 100 0 ?

*>i56.0.0.0/24 5.5.5.5 0 100 0 ?

Route Distinguisher: 10:5

C 4.4.4.4 is directly connected, Loopback4

O E2 6.6.6.6 [110/2] via 24.0.0.2, 00:00:10, Serial0/0

C 24.0.0.0 is directly connected, Serial0/0

O E2 56.0.0.0 [110/1] via 24.0.0.2, 00:00:11, Serial0/0

// Relevant routes inside

ping 6.6.6.6 !!!!!

traceroute 6.6.6.6

1 24.0.0.2 232 msec 24 msec 236 msec

2 12.0.0.1 [MPLS: Labels 103/

503

Exp 0] 980 msec 668 msec 880 msec

3 13.0.0.3 [MPLS: Labels 303/

Exp 0] 596 msec 684 msec 620 msec

4 56.0.0.5 [MPLS: Label

Exp 0] 592 msec 468 msec 300 msec

5 56.0.0.6 748 msec 876 msec *

// There are 2 labels:103 and 503.

show mpl forwarding-table

Local Outgoing Prefix Bytes tag Outgoing Next Hop

tag tag or VC or Tunnel Id switched interface

500 300 1.1.1.1/32 0 Se0/0 point2point

501 301 2.2.2.2/32 0 Se0/0 point2point

502 Pop tag 3.3.3.3/32 0 Se0/0 point2point

503 Untagged 6.6.6.6/32[V] 1812 Fa2/0 56.0.0.6

504 302 12.0.0.0/24 0 Se0/0 point2point

505 Pop tag 13.0.0.0/24 0 Se0/0 point2point

506 Aggregate 56.0.0.0/24[V] 2168

// Label 503 is for the packets to R6 Loopback 6 interface.

traceroute 4.4.4.4

1 56.0.0.5 24 msec 40 msec 68 msec

2 35.0.0.3 [MPLS: Labels 301/

203

Exp 0] 640 msec 352 msec 344 msec

3 13.0.0.1 [MPLS: Labels 101/

Exp 0] 428 msec 360 msec 312 msec

4 24.0.0.2 [MPLS: Label

Exp 0] 240 msec 240 msec 456 msec

5 24.0.0.4 384 msec 480 msec 408 msec

sh mpls forwarding-table

200 Pop tag 1.1.1.1/32 0 Se0/0 point2point

201 100 35.0.0.0/24 0 Se0/0 point2point

202 102 3.3.3.3/32 0 Se0/0 point2point

203 Untagged 4.4.4.4/32[V] 1568 Se0/1 point2point

204 Pop tag 13.0.0.0/24 0 Se0/0 point2point

205 103 5.5.5.5/32 0 Se0/0 point2point

206 Aggregate 24.0.0.0/24[V] 2212

由于時間關系,暫時還沒總結本實驗。希望下次可以抓包作更進一步的分析,以助了解。

繼續閱讀