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?

Networkリアル環境でLink Aggregation+α

Posted at

リアルなネットワーク環境でLink Aggregationを体感

2台のL2 Switchを用いて、Ethernetラインを束ね、リアルなLink Aggregation(帯域増加)を体感する。+αとして、用いたL2 Switchの機能である帯域制御も実施。

環境

用いたL2 Switchは、TP-Link製のTL-SG105PEおよびTL-SG105Eである。環境は下記。

https___qiita-image-store.s3.ap-northeast-1.amazonaws.com_0_634816_3b1faf10-c179-1fd0-b1dd-95547a2de5db.png

https___qiita-image-store.s3.ap-northeast-1.amazonaws.com_0_634816_b55aec91-1e0e-43c2-f96b-c88dc09d41d3.png

L2 SwitchであるTL-SG105PEとTL-SG105Eとの間を2本のEthernetケーブルで接続し、末端のPC間でiperfを実行し、Aggregationを体感する。後述するが、1セットでiperfを実行するケース(上図)と2セットで実行するケース(下図)とがある。

設定

本L2 Switchでは、標準的なLACPをサポートしていない。LAG(Link Aggregationの略であろう)というメニューから設定する。

LAG設定1.png

ここでは、Port 2および3をLAG化している。設定状況は別画面でも確認できる。

Port設定1.png

Port 2および3に、LAG1が見える。

検証

Aggregation設定前の実力

まずは、Aggregation設定前の実力値を把握する。下記環境で実施。

https___qiita-image-store.s3.ap-northeast-1.amazonaws.com_0_634816_b2b4840a-4f25-98d8-6d2a-98f1dda739bf.png

$ iperf3 -c 192.168.2.44 -u -b 1100m -t 30
Connecting to host 192.168.2.44, port 5201
[  5] local 192.168.2.2 port 50161 connected to 192.168.2.44 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec   113 MBytes   945 Mbits/sec  81581  
[  5]   1.00-2.00   sec   113 MBytes   949 Mbits/sec  81927  

[  5]  28.00-29.00  sec   114 MBytes   954 Mbits/sec  82389  
[  5]  29.00-30.00  sec   114 MBytes   953 Mbits/sec  82328  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-30.00  sec  3.33 GBytes   954 Mbits/sec  0.000 ms  0/2469631 (0%)  sender
[  5]   0.00-30.04  sec  3.33 GBytes   952 Mbits/sec  0.009 ms  0/2469630 (0%)  receiver

iperf Done.

UDP帯域1100Mbpsを指定して実行、952Mbpsが実力値。ポートの設定はAutoになっており、接続先とのネゴの結果、1000Mbpsが実際の値。実力値としては適切。

Aggreagation

同一PC間(1セット)

まずは、同一PC間で2つのiperfを実行する。上述した最初の環境である。Server側で下記を実行。

$ iperf3 -s -B 192.168.2.3
$ iperf3 -s -B 192.168.2.3 -p 5202

結果その1。

$ iperf3 -c 192.168.2.3 -u -b 1100m -t 30        
Connecting to host 192.168.2.3, port 5201
[  5] local 192.168.2.1 port 60398 connected to 192.168.2.3 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec  63.3 MBytes   531 Mbits/sec  45863  
[  5]   1.00-2.00   sec  62.9 MBytes   527 Mbits/sec  45533  

[  5]  28.00-29.00  sec  80.9 MBytes   679 Mbits/sec  58600  
[  5]  29.00-30.00  sec   114 MBytes   952 Mbits/sec  82197  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-30.00  sec  1.89 GBytes   542 Mbits/sec  0.000 ms  0/1403705 (0%)  sender
[  5]   0.00-30.00  sec  1.73 GBytes   497 Mbits/sec  0.010 ms  0/1401716 (0%)  receiver

iperf Done.

結果その2(ポート番号5202)。

$ iperf3 -c 192.168.2.3 -u -b 1100m -p 5202 -t 30
Connecting to host 192.168.2.3, port 5202
[  5] local 192.168.2.1 port 55709 connected to 192.168.2.3 port 5202
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec   116 MBytes   974 Mbits/sec  84078  
[  5]   1.00-2.00   sec  78.8 MBytes   661 Mbits/sec  57049  

[  5]  28.00-29.00  sec  61.8 MBytes   518 Mbits/sec  44725  
[  5]  29.00-30.00  sec  63.3 MBytes   531 Mbits/sec  45841  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-30.00  sec  1.89 GBytes   543 Mbits/sec  0.000 ms  0/1405189 (0%)  sender
[  5]   0.00-30.00  sec  1.74 GBytes   497 Mbits/sec  0.053 ms  0/1404247 (0%)  receiver

iperf Done.

Client側が542-543Mbps、Server側の合計値は994Mbps(=2*497)となっており、Aggregationが行われていない。

本L2 SwitchのLAGは、Macアドレスによる制御(ポート振り分け)を行っていると判断。続く。

異なるPC間(2セット)

異なるPC間で2つのiperfを実行する。上述した2番目の環境。小生のServer側環境は、2枚のネットワークI/Fを装着しPC1台(当然、IPアドレスは2つ)となっている。よって、下記のように、異なるIPアドレスでも、異なる2つのポート番号(5201および5202)を用いて実行。

$ iperf3 -s -B 192.168.2.3 -p 5202
$ iperf3 -s -B 192.168.2.44

PC1での実行結果。

$ iperf3 -c 192.168.2.3 -u -b 1100m -p 5202 -t 30
Connecting to host 192.168.2.3, port 5202
[  5] local 192.168.2.1 port 55269 connected to 192.168.2.3 port 5202
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec   116 MBytes   976 Mbits/sec  84272  
[  5]   1.00-2.00   sec   113 MBytes   948 Mbits/sec  81863  

[  5]  28.00-29.00  sec   113 MBytes   950 Mbits/sec  82030  
[  5]  29.00-30.00  sec   114 MBytes   953 Mbits/sec  82234  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-30.00  sec  3.33 GBytes   953 Mbits/sec  0.000 ms  0/2467289 (0%)  sender
[  5]   0.00-30.00  sec  3.32 GBytes   952 Mbits/sec  0.009 ms  0/2465294 (0%)  receiver

iperf Done.

PC3での実行結果。

$ iperf3 -c 192.168.2.44 -u -b 1100m -t 30
Connecting to host 192.168.2.44, port 5201
[  5] local 192.168.2.2 port 59858 connected to 192.168.2.44 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec   114 MBytes   954 Mbits/sec  82398  
[  5]   1.00-2.00   sec   114 MBytes   954 Mbits/sec  82347


[  5]  28.00-29.00  sec   114 MBytes   955 Mbits/sec  82424  
[  5]  29.00-30.00  sec   114 MBytes   953 Mbits/sec  82334  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-30.00  sec  3.33 GBytes   953 Mbits/sec  0.000 ms  0/2469216 (0%)  sender
[  5]   0.00-30.04  sec  3.33 GBytes   952 Mbits/sec  0.010 ms  0/2469213 (0%)  receiver

iperf Done.

両方の結果とも952Mbpsとなり、LAGにより帯域が倍の約2000Mbps(=952+952)になっていることがわかる。結果として、本L2 SwitchのLAG制御は、Macアドレスによる経路選択であることがわかる。

おまけ(帯域制御)

TL-SG105PEおよびTL-SG105Eには、ポートごとに帯域制御(レート制限)をすることができるので、ついでに実施。

環境

下記のような単純なもの。

https___qiita-image-store.s3.ap-northeast-1.amazonaws.com_0_634816_e6cda555-50de-42f3-6ed2-29d540c3f55e.png

末端PC間でiperfを実行。

設定例

下記は、Port 1の入力を、600000Kbpsに制限するもの。Port 1は、iperf Client側PCが接続されているポートである。

Ingress600M.png

検証

上記設定での結果。

$ iperf3 -c 192.168.2.2 -u -b 1100m -t 20
Connecting to host 192.168.2.2, port 5201
[  5] local 192.168.2.1 port 51259 connected to 192.168.2.2 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec   116 MBytes   973 Mbits/sec  84020  
[  5]   1.00-2.00   sec   113 MBytes   944 Mbits/sec  81522  

[  5]  18.00-19.00  sec   113 MBytes   948 Mbits/sec  81831  
[  5]  19.00-20.00  sec   113 MBytes   948 Mbits/sec  81838  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-20.00  sec  2.21 GBytes   950 Mbits/sec  0.000 ms  0/1640534 (0%)  sender
[  5]   0.00-20.10  sec  1.38 GBytes   590 Mbits/sec  0.015 ms  615982/1640535 (38%)  receiver

iperf Done.

590Mbpsという結果であり、設定値600000Kbpsにほぼ近い。

Port 5のEgrees 7000000Kbps設定でもトライ。Port 5は、iperf Server側PCが接続されているポートである。

$ iperf3 -c 192.168.2.2 -u -b 1100m -t 20
Connecting to host 192.168.2.2, port 5201
[  5] local 192.168.2.1 port 56037 connected to 192.168.2.2 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec   116 MBytes   974 Mbits/sec  84130  
[  5]   1.00-2.00   sec   112 MBytes   943 Mbits/sec  81402


[  5]  18.00-19.00  sec   113 MBytes   948 Mbits/sec  81846  
[  5]  19.00-20.00  sec   113 MBytes   949 Mbits/sec  81962  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-20.00  sec  2.21 GBytes   951 Mbits/sec  0.000 ms  0/1641092 (0%)  sender
[  5]   0.00-20.00  sec  1.61 GBytes   690 Mbits/sec  0.013 ms  447658/1639044 (27%)  receiver

iperf Done.

期待値どおり。

EOF

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?