Junos Shaping 設定
Junos の Shaping 機能についてテストした際の備忘録です。スループット測定は iperf を使用しました。
iperf の準備
epel リポジトリインストール
# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm # wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm # rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
iperf インストール
# yum install -y iperf
iperf 起動(サーバ側:192.168.100.1)
# iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------
スループット測定
Shaping 設定前
# iperf -c 192.168.100.1 ------------------------------------------------------------ Client connecting to 192.168.100.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 3] local 100.64.1.1 port 38985 connected with 192.168.100.1 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 845 MBytes 708 Mbits/sec
Shaping(200Mbps)設定後
# iperf -c 192.168.100.1 ------------------------------------------------------------ Client connecting to 192.168.100.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 3] local 100.64.1.1 port 36607 connected with 192.168.100.1 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 221 MBytes 185 Mbits/sec
Junos Shaping 設定例
# set class-of-service interfaces ge-0/0/1 scheduler-map Smap_Shaping # set class-of-service scheduler-maps Smap_Shaping forwarding-class best-effort scheduler Shaping # set class-of-service scheduler-maps Smap_Shaping forwarding-class expedited-forwarding scheduler Shaping # set class-of-service scheduler-maps Smap_Shaping forwarding-class assured-forwarding scheduler Shaping # set class-of-service scheduler-maps Smap_Shaping forwarding-class network-control scheduler Shaping # set class-of-service schedulers Shaping shaping-rate 300m # set class-of-service schedulers Shaping priority low