MPLS inter-as ××× Option3:multihop mp-ebgp

還是這張圖,但是BGP是配置在環回口上的!

R4(config)#router bgp 10

R4(config-router)#no  neighbor 45.45.45.5 remote-as 20

R4(config-router)#nei 5.5.5.5 remote 20

R4(config-router)#nei 5.5.5.5 up lo 0

R4(config-router)#add v 

R4(config-router-af)#nei 5.5.5.5 ac

R4(config-router-af)#nei 5.5.5.5 e

R5(config)#router bgp 20

R5(config-router)#no  neighbor 45.45.45.4 remote-as 10

R5(config-router)#nei 4.4.4.4 remote 10

R5(config-router)#nei 4.4.4.4 up lo 0

R5(config-router)#add v

R5(config-router-af)#nei 4.4.4.4 ac 

R5(config-router-af)#nei 4.4.4.4 e

然而4.4.4.4,5.5.5.5都是不可達的所以要寫一條靜態路由!

R4(config)#ip route 5.5.5.5 255.255.255.255 45.45.45.5

R5(config)#ip route 4.4.4.4 255.255.255.255  45.45.45.4

並且R4R5使用next-hop-self

R1#show ip route ospf

     8.0.0.0/32 is subnetted, 1 subnets

O IA    8.8.8.8 [110/11] via 12.12.12.2, 00:01:18, FastEthernet0/0

     78.0.0.0/24 is subnetted, 1 subnets

O IA    78.78.78.0 [110/11] via 12.12.12.2, 00:01:18, FastEthernet0/0

R8#show ip route ospf

     1.0.0.0/32 is subnetted, 1 subnets

O IA    1.1.1.1 [110/11] via 78.78.78.7, 00:01:39, FastEthernet0/0

     12.0.0.0/24 is subnetted, 1 subnets

O IA    12.12.12.0 [110/11] via 78.78.78.7, 00:01:39, FastEthernet0/0

現在學習到了路由,但是Ping的通嘛?

R1#traceroute 8.8.8.8

  1 12.12.12.2 72 msec 8 msec 56 msec

  2  *  *  * 

  3 

顯然Ping不通,這是什麼原因呢?

R2#show ip cef vrf abc 8.8.8.8 detail 

8.8.8.8/32, version 10, epoch 0, cached adjacency 23.23.23.3

0 packets, 0 bytes

  tag information set

    local tag: 205

    fast tag rewrite with Fa0/1, 23.23.23.3, tags imposed: {301 406}

  via 4.4.4.4, 0 dependencies, recursive

    next hop 23.23.23.3, FastEthernet0/1 via 4.4.4.4/32

    valid cached adjacency

tag rewrite with Fa0/1, 23.23.23.3, tags imposed: {301 406}

301是頂層標籤目的是爲了發到下一跳,406是底層標籤是由R4分配的,然後在R4上看。

R4#show mpls forwarding-table 

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    

tag    tag or VC   or Tunnel Id      switched   interface              

400    Pop tag     3.3.3.3/32        0          Fa0/0      34.34.34.3   

401    300         2.2.2.2/32        0          Fa0/0      34.34.34.3   

402    Pop tag     23.23.23.0/24     0          Fa0/0      34.34.34.3   

403    Untagged    5.5.5.5/32        0          Fa0/1      45.45.45.5   

404    204         10:2:12.12.12.0/24    \

                                     0          Fa0/0      34.34.34.3   

405    203         10:2:1.1.1.1/32   0          Fa0/0      34.34.34.3   

木有406!!!!!

而且看到這一條路由它是Untagged的!很顯然的發現R4R5之間沒有標籤的交換,它無法到達下一跳!

R4R5之間建立LDP鄰居關係之後:

R4#show mpls forwarding-table 

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    

tag    tag or VC   or Tunnel Id      switched   interface              

400    Pop tag     3.3.3.3/32        0          Fa0/0      34.34.34.3   

401    300         2.2.2.2/32        0          Fa0/0      34.34.34.3   

402    Pop tag     23.23.23.0/24     0          Fa0/0      34.34.34.3   

403    Pop tag     5.5.5.5/32        0          Fa0/1      45.45.45.5   

404    204         10:2:12.12.12.0/24    \

                                     0          Fa0/0      34.34.34.3   

405    203         10:2:1.1.1.1/32   0          Fa0/0      34.34.34.3   

406    505         10:7:8.8.8.8/32   0          Fa0/1      45.45.45.5   

407    504         10:7:78.78.78.0/24    \

                                     0          Fa0/1      45.45.45.5  

406出現啦!!!!

R1#traceroute 8.8.8.8

  1 12.12.12.2 124 msec 32 msec 64 msec

  2 23.23.23.3 [MPLS: Labels 301/406 Exp 0] 248 msec 208 msec 100 msec

  3 34.34.34.4 [MPLS: Label 406 Exp 0] 60 msec 176 msec 88 msec

  4 45.45.45.5 [MPLS: Label 505 Exp 0] 88 msec 40 msec 176 msec

  5 56.56.56.6 [MPLS: Labels 601/703 Exp 0] 156 msec 204 msec 104 msec

  6 78.78.78.7 [MPLS: Label 703 Exp 0] 64 msec 172 msec 36 msec

  7 78.78.78.8 132 msec *  240 msec

下一跳改變了三次所以底層標籤改變3次!

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章