0
1

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 5 years have passed since last update.

linux tc(Traffic Control)コマンド

Last updated at Posted at 2018-04-11

送信先IP、送信元ポートを指定してパケットをロスさせる方法

tc qdisc add dev [NIC] root handle 1: prio
tc filter add dev [NIC] protocol ip parent 1: prio 2 u32 match ip dst 0.0.0.0/0 flowid 1:2
tc qdisc add dev [NIC] parent 1:1 handle 10: netem loss 100%
tc filter add dev [NIC] protocol ip parent 1: prio 1 u32 match ip dst [送信先IP]/32 match ip sport [送信元ポート] 0xffff flowid 1:1

むずかしい。

設定されている内容を一覧表示する

tc qdisc show dev [NIC]

設定されている内容を削除する

tc qdisc del dev [NIC] root
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?