Tremaday5lt
Upcoming SlideShare
Loading in...5
×
 

Tremaday5lt

on

  • 122 views

Trema day #5 LT

Trema day #5 LT

Statistics

Views

Total Views
122
Views on SlideShare
122
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Tremaday5lt Tremaday5lt Presentation Transcript

  • エクストリームな ネットワーク機器テスト環境の実現 Yohei Kuga @sora_workwork Trema Day #5 LT
  • 今日の話 • • ネットワークテスタHWが持つ高精度な試験機能をネッ トワークSWツールに適応したい 実装はNIC(FPGA+PCIe) + Linux device driver Ixia Chassis http://www.ixiacom.jp/products/chassis/ixia-chassis-family-quick-reference-sheet
  • アプローチ 1: Userspace Dataplane Control plane Control plane Data plane software Data plane Device hardware Device Existing hardware tester Our approach
  • アプローチ 2: Timing API • • • パケット送受信タイミング管理をNICにOffload Userspaceからパケットごとに送信タイミングを指定 精度は8ns, 相対時間と絶対時間をサポート Scheduled TX using timestamp RX w/ timestamp on the hardware traffic Userspace read(2) NIC write(2)
  • 2つの時間の指定方法 NIC内にPHYと同じClock sourceを用いた48 bit counterを用意 各パケットのRX timestamp && TX Timing 制御に利用 • • Global mode (絶対時刻を指定) o App: forwarding, dummynet Local mode (相対時刻を指定) o 最初の送信パケットからの相対的な遅延を指定 o App: Network testing
  • アプローチ 3: Programmable Interface • Ethernet Character device [HotSDN13] • Fileでパケットシナリオを保存 -> `cat`でreplay
  • アプローチ 3: Programmable Interface Packet sending $ echo “0000000000000000 FFFFFFFFFFFF 0022CF63967B 8899 23 …“ >/dev/ethpipe/0 Port mirroring $ cat /dev/ethpipe/0 | tee /dev/ethpipe/0 > /dev/ethpipe/1 MAC address filtering $ grep ‘FFFFFFFFFFFF’ /dev/ethpipe/0 > /dev/ethpipe/1 VLAN untagging $ sed -e 's/8100 00 01 //' < /dev/ethpipe/0 > /dev/ethpipe/1
  • サンプルシナリオ PC1 Userspace nsping.sh NIC (FPGA) PC2 NIC (FPGA) Userspace 10ms.sh
  • 1 #!/bin/bash $ ./10ms.sh < /dev/ethpipe/0 2 3 delay=$(( 10000000 / 8 )); # 10ms 4 while true; do 5 read pkt; 6 if [[ $pkt =~ ^[0-9A-F]{16} ]]; then 7 recv_ts=${pkt:0:16}; 8 frame=${pkt:16}; 9 10 printf "%016X$framen" 11 12 $(( 16#$recv_ts + 10#$delay )) > /dev/ethpipe/1; fi 13 done
  • ... PING_REQ=“9000000000000000 ${ETH_HDR} ${IP_HDR} ${ICMP_HDR} ${PING_ID} …” while true; do PING_NO=$(( ${PING_NO} + 1 )) PING_NO_TMP=`printf "%04dn" ${PING_NO}` echo $PING_REQ >/dev/ethpipe/0 # Sending while true; do read pkt if [[ $pkt =~ "${PING_ID} ${PING_NO_TMP:0:2} ${PING_NO_TMP:2:4}" ]]; then TX_TIME=`cat /sys/kernel/ethpipe/local_time1` RX_TIME=${pkt:0:16} printf "RTT: %d nsn" $(( (0x${RX_TIME} - 0x${TX_TIME}) * 8 )) break fi done sleep 1 done $ ./nsping.sh < /dev/ethpipe/0
  • アプリケーション 送受信タイミングを制御できると色々遊べる • • • Middlebox o latency emulation “Extreme” network testing o RFC2544, Cable checker, Infer the underlay topology, E2E bandwidth estimation Generic purpose network IO o Order of packet receiving, Jitter and congestion control, packet pacing
  • おしまい