【old】mpls ldp neighbor targeted

noteから引っ越してきた記事

iosv-3がHub, iosv-1,2がSpoke

初期設定

・全I/FでOSPFとLDPを起動

Before

Hub#sh mpls ldp nei
Peer LDP Ident: 192.168.0.10:0; Local LDP Ident 192.168.2.1:0
TCP connection: 192.168.0.10.646 - 192.168.2.1.63475
State: Oper; Msgs sent/rcvd: 8/8; Downstream
Up time: 00:02:26
LDP discovery sources:
GigabitEthernet0/0, Src IP addr: 192.168.0.10
Addresses bound to peer LDP Ident:
192.168.0.10
Peer LDP Ident: 192.168.1.10:0; Local LDP Ident 192.168.2.1:0
TCP connection: 192.168.1.10.646 - 192.168.2.1.50005
State: Oper; Msgs sent/rcvd: 8/8; Downstream
Up time: 00:02:18
LDP discovery sources:
GigabitEthernet0/1, Src IP addr: 192.168.1.10
Addresses bound to peer LDP Ident:
192.168.1.10
Peer LDP Ident: 192.168.2.10:0; Local LDP Ident 192.168.2.1:0
TCP connection: 192.168.2.10.32787 - 192.168.2.1.646
State: Oper; Msgs sent/rcvd: 8/8; Downstream
Up time: 00:02:12
LDP discovery sources:
GigabitEthernet0/2, Src IP addr: 192.168.2.10
Addresses bound to peer LDP Ident:
192.168.2.10

iosv-0は全ルータとLDPネイバーになっている。

After(iosv-0)でMPLS設定を全部消す

Hub(config)#router ospf 1
Hub(config-router)#no mpls ldp auto
Hub(config-router)#
*Jul 17 01:21:31.984: %LDP-5-NBRCHG: LDP Neighbor 192.168.0.10:0 (1) is DOWN (LDP disabled on interface)
*Jul 17 01:21:31.986: %LDP-5-NBRCHG: LDP Neighbor 192.168.1.10:0 (2) is DOWN (LDP disabled on interface)
*Jul 17 01:21:31.987: %LDP-5-NBRCHG: LDP Neighbor 192.168.2.10:0 (3) is DOWN (LDP disabled on interface)
Hub(config-router)#
Hub(config-router)#do sh mpls ldp nei

mpls ldp neighbor [address] targeted ldp

spoke1(config)#mpls ldp neighbor 192.168.0.10 targeted ldp
spoke1(config)#
*Jul 17 01:26:17.845: %LDP-5-NBRCHG: LDP Neighbor 192.168.0.10:0 (1) is UP

iosv-3(config)#mpls ldp neighbor 192.168.1.10 targeted ldp 
iosv-3(config)#
*Jul 18 11:31:28.680: %LDP-5-NBRCHG: LDP Neighbor 192.168.1.10:0 (1) is UP

スタティックにネイバーのアドレスを指定してあげることで、直接つながっていないかつ間のルータでLDPが起動していなくてもLDPネイバーになることができる。

show mpls ldp neighbor

iosv-3#sh mpls ldp nei
    Peer LDP Ident: 192.168.1.10:0; Local LDP Ident 192.168.0.10:0
        TCP connection: 192.168.1.10.39694 - 192.168.0.10.646
        State: Oper; Msgs sent/rcvd: 6/6; Downstream
        Up time: 00:00:40
        LDP discovery sources:
          Targeted Hello 192.168.0.10 -> 192.168.1.10, active, passive
        Addresses bound to peer LDP Ident:
          192.168.1.10     

spoke1#sh mpls ldp nei
    Peer LDP Ident: 192.168.0.10:0; Local LDP Ident 192.168.1.10:0
        TCP connection: 192.168.0.10.646 - 192.168.1.10.39694
        State: Oper; Msgs sent/rcvd: 6/6; Downstream
        Up time: 00:00:11
        LDP discovery sources:
          Targeted Hello 192.168.1.10 -> 192.168.0.10, active, passive
        Addresses bound to peer LDP Ident:
          192.168.0.10    

どっちも”active, passive”(伏線)

mpls ip なくてもネイバー形成する

spoke1(config)#int gi0/0
spoke1(config-if)#no mpls ip
spoke1(config-if)#exit
spoke1(config)#mpls ldp neighbor 192.168.0.10 targeted ldp
spoke1(config)#
*Jul 17 01:40:45.223: %LDP-5-NBRCHG: LDP Neighbor 192.168.0.10:0 (1) is UP

iosv-3(config)#int gi0/0
iosv-3(config-if)#no mpls ip
iosv-3(config-if)#
*Jul 18 11:45:55.227: %LDP-5-NBRCHG: LDP Neighbor 192.168.1.10:0 (1) is UP

パケットキャプチャ(LDP Hello)

画像
iosv-1,0間パケットキャプチャ
LDP targetedの場合はユニキャスト
画像
iosv-1,0間パケットキャプチャ
interfaceにてmpls ipの場合はマルチキャスト

mpls ldp discovery targeted-hello accept

spoke1(config)#mpls ldp discovery targeted-hello accept
spoke1(config)#
*Jul 17 01:48:44.105: %LDP-5-NBRCHG: LDP Neighbor 192.168.0.10:0 (1) is UP

ネイバー両方にneighbor targetedを設定したときよりもUPが遅かった。
ちなみにこれもI/Fでのmpls ip不要。

show mpls ldp neighbor

iosv-3#sh mpls ldp nei  
    Peer LDP Ident: 192.168.1.10:0; Local LDP Ident 192.168.0.10:0
        TCP connection: 192.168.1.10.33571 - 192.168.0.10.646
        State: Oper; Msgs sent/rcvd: 8/8; Downstream
        Up time: 00:02:13
        LDP discovery sources:
          Targeted Hello 192.168.0.10 -> 192.168.1.10, active, passive
        Addresses bound to peer LDP Ident:
          192.168.1.10    

spoke1#sh mpls ldp nei
    Peer LDP Ident: 192.168.0.10:0; Local LDP Ident 192.168.1.10:0
        TCP connection: 192.168.0.10.646 - 192.168.1.10.33571
        State: Oper; Msgs sent/rcvd: 8/8; Downstream
        Up time: 00:02:21
        LDP discovery sources:
          Targeted Hello 192.168.1.10 -> 192.168.0.10, passive
        Addresses bound to peer LDP Ident:
          192.168.0.10 

iosv-1(spoke1)はpassiveになってる。(伏線回収)

追記(頭痛が痛い話)

mpls “ldp” neighbor address targeted “ldp”
めっちゃ頭痛が痛いからおかしいなと思ってた。
mpls ldp neighbor address targeted でも普通に入った。

参考

Chapter: MPLS Label Distribution Protocol

3.2 MPLS