qshinoの日記

Powershell関係と徒然なこと

MTU/MSS

パケッサイズ

MTU/MSS

MTU: Maximum Transmission Unit

MSS: Maximum Segment Size

  • Max. Ethernet Frame Size: 1518
  • IP MTU : 1500
  • MSS :

Header/Trailer Size List

  • Ethernet: 14 +4 = 18
  • PPPoE header : 6
  • PPP : 2
  • IP : 20
  • TCP: 20
  • UDP : 8
  • IPsec esp tunnel mode: 36-65
  • L2TPv3 over ip : 8
  • L2TPv3 over udp:
  • EtherIP :

IPsec header

Tunnel mode

IPヘッダ: 20バイト
SPI: 4バイト
シーケンス番号: 4バイト
初期ベクトル: 8、または16バイト (DES-CBC、3DES-CBCでは8バイト、AES-CBCでは16バイト)
パディング: 0~7バイト (パケットの全長が8の倍数になるように付与する)
パディングの長さ: 1バイト
プロトコル: 1バイト
認証データ: 0、または12バイト (認証の設定がなければ0バイト、あれば12バイト)

Tunnel sample

IPヘッダ: 20バイト
SPI: 4バイト
シーケンス番号: 4バイト
初期ベクトル: 8バイト
パディング: 4バイト
パディングの長さ: 1バイト
プロトコル: 1バイト
認証データ: 12バイト

Ethernet Format

IP format

TCP format

[ether14][IP 20][TCP 20][Payload][ether fcs 4]

UDP format

[ether14][IP 20][UDP 8][Payload][ether fcs 4]

IPsec transport

[ether14][IP 20][esp ][TCP 20][Payload][ether fcs 4]

IPsec tunnel

[ether14][IP 20][esp ][IP 20][TCP 20][Payload][ether fcs 4]

L2TPv3 over ip

[ether14][IP 20][l2tp 8 ][ether14][IP 20][TCP 20][Payload][ether fcs 4][ether fcs 4]

l2tpv3 over ipsec transport

[ether14][IP 20][esp][l2tp 8 ][ether14][IP 20][TCP 20][Payload][ether fcs 4]/[ether fcs 4]

参考

ether/ip/tcp/ppp/pppoe

http://www.infraexpert.com/info/5adsl.htm

ipsec

http://www.rtpro.yamaha.co.jp/RT/FAQ/IPsec/faq_2_l.html

L2TPv3

http://www.rtpro.yamaha.co.jp/RT/docs/l2tpv3/

http://www.rtpro.yamaha.co.jp/RT/docs/l2tpv3/

https://tools.ietf.org/html/rfc3931

etherip