0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

久しぶりにGNS3(その25:L2TPをWiresharkで確認)

Posted at

WiresharkでL2TPv3(+データ)を確認

こちら「久しぶりにGNS3(その9:L2トンネリング/ブリッジ)」の続き。Wiresharkで、L2TPv3上のデータを確認することができたので、その記録。

環境

Topology.png
末端のDHCPClientとDHCPServerとが同一セグメント(10.0.0.0/24)となるように、Router2とRouter3とにL2TPv3の設定を行う。

設定

Router2とRouter3では、前回と同じ設定ができなかったため(理由不明)、再度記載(関連する部分のみ)。

! Router2

pseudowire-class L2TP
 encapsulation l2tpv3
 ip local interface FastEthernet0/0

interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0

interface FastEthernet0/1
 no ip address
 xconnect 192.168.2.2 1 encapsulation l2tpv3 pw-class L2TP sequencing both

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
! Router3

pseudowire-class L2TP
 encapsulation l2tpv3
 ip local interface FastEthernet0/0

interface FastEthernet0/0
 ip address 192.168.2.2 255.255.255.0

interface FastEthernet0/1
 no ip address
 xconnect 192.168.1.2 1 encapsulation l2tpv3 pw-class L2TP sequencing both

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

検証

Wireshark設定

...としてデコード

「分析」→「...としてデコード」にて
としてデコード.png
としてデコード2.png
L2TPv3 payload typeを「Ethernet」に変更する(デフォルトは「CHDLC」)となっている。単純ではあるが、データ(Payload)がEthernetのため。

L2TPv3 Cookie Size

「プロトコル設定」→「Layer2 Tunneling Protocol」→「L2TPv3 Cookie Size」を「4 Byte Cookie」とする。
4byteCookie.png
どうも、Cookieサイズは環境により異なるらしい。今回の場合、L2TPv3の標準(RFC3931)およびWiresharkのデータから、4バイトと判断した。少なくとも、L2TPv3 Peerどうしで、同じサイズを用いる必要あり。

結果

Wireshark上で、DHCPシーケンスおよびICMP(ping)の状況は下記となる。
ARP&DHCP&ICMP.png
末端のDHCPClientおよびDHCPServer間のARP、DHCP、ICMPが正しくデコードされている。

L2TPv3シーケンス

Wireshark上で確認できた、L2TPv3シーケンスは下記となる。
シーケンス.png
シーケンスについては、「L2TPv3を用いたL2VPN」などに記事が見つかる。また、最初のSCCRQ/SCCRPにて、サポートするL2タイプを提示している。
Capability.png
Cookieサイズの提示も行われていると思ったが、Wireshark上のデータで見つけることはできず。ただし、L2TPv3の標準であるRFC3931には、「Assigned Cookie (ICRQ, ICRP, OCRQ, OCRP)」という記載があり、
The Assigned Cookie AVP, Attribute Type 65, contains the Cookie value being assigned to this session by the sender.
ネゴシエーションも可能のように思える。このあたりは、実装依存なのであろう。

終わりに

RFCなどの標準を理解(データ構造)した上で、Wiresharkを使いこなすのがベター。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?