MPLS TDPについてまとめます。殆どの設定はLDPと同じですので、このページにはLDPとTDPの違いのみを記載します。LDPとTDPは似ている部分が多いため、細かな仕様の説明はCisco IOS MPLS LDPの設定方法を参照ください。
TDPはCisco独自仕様であり、2020年時点の最新IOSではマニュアルにはTDPの記載はなくLDPに一本化されていることに留意ください。
TDP
必須設定
LDPではなくTDPを使用するには以下のコマンドを使用します。
Router(config-if)# mpls label protocol tdp
動作確認
以下の環境でMPLSの動作確認を行います。
なお、以下configに一部”ldp”という言葉がまぎれていますが、全く問題ありません。TDPを使用する場合でも、”mpls ldp router-id”, “mpls ldp password required”などldpという表記の設定を使用します。
e0/1 e0/0 e0/0 e0/1 e0/0 e0/1 e0/0 e0/1
.1+------+.1 .2+------+.2 .3+------+.3 .4+------+
----+ R1 +----------+ R2 +----------+ R3 +----------+ R4 +----
+------+ +------+ +------+ +------+
192.168.1.0/24 192.168.12.0/24 192.168.23.0/24 192.168.34.0/24 192.168.4.0/24
R1 Loopback0 R2 Loopback0 R3 Loopback0 R4 Loopback0
10.1.1.1/24 10.2.2.2/24 10.3.3.3/24 10.4.4.4/24
[R1] mpls label protocol tdp ! interface Loopback0 ip address 10.1.1.1 255.255.255.0 ip ospf network point-to-point ! interface Ethernet0/0 ip address 192.168.12.1 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.1.1 255.255.255.0 no keepalive ! router ospf 1 mpls ldp autoconfig network 0.0.0.0 255.255.255.255 area 0 ! mpls ldp router-id Loopback0 [R2] mpls label protocol tdp ! interface Loopback0 ip address 10.2.2.2 255.255.255.0 ip ospf network point-to-point ! interface Ethernet0/0 ip address 192.168.12.2 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.23.2 255.255.255.0 no keepalive ! router ospf 1 mpls ldp autoconfig network 0.0.0.0 255.255.255.255 area 0 ! mpls ldp router-id Loopback0 [R3] mpls label protocol tdp ! interface Loopback0 ip address 10.3.3.3 255.255.255.0 ip ospf network point-to-point ! interface Ethernet0/0 ip address 192.168.23.3 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.34.3 255.255.255.0 no keepalive ! router ospf 1 mpls ldp autoconfig network 0.0.0.0 255.255.255.255 area 0 ! mpls ldp router-id Loopback0 [R4] mpls label protocol tdp ! interface Loopback0 ip address 10.4.4.4 255.255.255.0 ip ospf network point-to-point ! interface Ethernet0/0 ip address 192.168.34.4 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.4.4 255.255.255.0 no keepalive ! router ospf 1 mpls ldp autoconfig network 0.0.0.0 255.255.255.255 area 0 ! mpls ldp router-id Loopback0
なお、設定全文は下記ファイルです。ルーティング等の設定は省略しますので、必要に応じて下記を参照下さい。
LIB, forwarding-tableの確認方法はLDPと全く同じです。
R1#show mpls ldp bindings
tib entry: 10.1.1.0/24, rev 4
local binding: tag: imp-null
remote binding: tsr: 10.2.2.2:0, tag: 16
tib entry: 10.2.2.0/24, rev 8
local binding: tag: 16
remote binding: tsr: 10.2.2.2:0, tag: imp-null
tib entry: 10.3.3.0/24, rev 12
local binding: tag: 18
remote binding: tsr: 10.2.2.2:0, tag: 18
tib entry: 10.4.4.0/24, rev 16
local binding: tag: 20
remote binding: tsr: 10.2.2.2:0, tag: 20
<omitted>
R1#show mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 10.2.2.0/24 0 Et0/0 192.168.12.2
17 Pop tag 192.168.23.0/24 0 Et0/0 192.168.12.2
18 18 10.3.3.0/24 0 Et0/0 192.168.12.2
19 19 192.168.34.0/24 0 Et0/0 192.168.12.2
20 20 10.4.4.0/24 0 Et0/0 192.168.12.2
21 21 192.168.4.0/24 0 Et0/0 192.168.12.2
R1#
LDP, TDPの違い
パケットの観察
TDP neighborを確立する様子を観察します。udp 711, tcp 711を使用してneighborを確立している事が分かります。また、LDPと異なりbroadcastを用いてneighborを発見している事が分かります。
No. Time Source Destination Protocol Info
92 58.885000 192.168.12.2 255.255.255.255 UDP Source port: cisco-tdp Destination port: cisco-tdp
93 60.775000 192.168.12.1 255.255.255.255 UDP Source port: cisco-tdp Destination port: cisco-tdp
94 61.508000 10.1.1.1 10.2.2.2 TCP cisco-tdp > 64086 [FIN, PSH, ACK] Seq=1 Ack=17 Win=3916 Len=0
95 61.561000 10.2.2.2 10.1.1.1 TCP 64086 > cisco-tdp [ACK] Seq=17 Ack=2 Win=3932 Len=0
96 61.569000 10.2.2.2 10.1.1.1 TCP 64086 > cisco-tdp [FIN, PSH, ACK] Seq=17 Ack=2 Win=3932 Len=0
97 61.635000 10.1.1.1 10.2.2.2 TCP cisco-tdp > 64086 [ACK] Seq=2 Ack=18 Win=3916 Len=0
98 63.130000 192.168.12.2 255.255.255.255 UDP Source port: cisco-tdp Destination port: cisco-tdp
100 65.416000 192.168.12.1 255.255.255.255 UDP Source port: cisco-tdp Destination port: cisco-tdp
101 65.504000 10.2.2.2 10.1.1.1 TCP 16134 > cisco-tdp [SYN] Seq=0 Win=4128 Len=0 MSS=536
102 65.561000 10.1.1.1 10.2.2.2 TCP cisco-tdp > 16134 [SYN, ACK] Seq=0 Ack=1 Win=4128 Len=0 MSS=536
103 65.593000 10.2.2.2 10.1.1.1 TCP 16134 > cisco-tdp [ACK] Seq=1 Ack=1 Win=4128 Len=0
104 65.596000 10.2.2.2 10.1.1.1 TCP 16134 > cisco-tdp [ACK] Seq=1 Ack=1 Win=4128 Len=20
105 65.620000 10.1.1.1 10.2.2.2 STUN Message: Binding Request
106 65.626000 10.2.2.2 10.1.1.1 TCP 16134 > cisco-tdp [ACK] Seq=21 Ack=37 Win=4092 Len=0
107 65.721000 10.2.2.2 10.1.1.1 TCP 16134 > cisco-tdp [ACK] Seq=21 Ack=37 Win=4092 Len=160
108 65.795000 10.1.1.1 10.2.2.2 TCP cisco-tdp > 16134 [ACK] Seq=37 Ack=181 Win=3948 Len=0
110 65.890000 10.1.1.1 10.2.2.2 TCP cisco-tdp > 16134 [ACK] Seq=37 Ack=181 Win=3948 Len=144
111 65.903000 10.2.2.2 10.1.1.1 TCP 16134 > cisco-tdp [ACK] Seq=181 Ack=181 Win=3948 Len=0
LDP, TDPの違い
LDP, TDPの違いをまとめると以下の通りです。
| 項目 | LDP | TDP |
|---|---|---|
| standard | IETF標準 | Cisco標準 |
| neighborの発見 | udp 646 multicast(224.0.0.2)送信 | udp 711 broadcast送信 |
| labelの交換 | tcp 646 unicast送信 | tcp 711 unicast送信 |
