はじめに
GNS3, SONiCを使用してLAGを構築する。
環境
- ホスト:Ubuntu 24.04
問題、課題
GNS3, SONiCを使用してLAGを構築する。
構築
ネットワーク構成
Browse Device間の通信速度
/ # ping 192.168.1.241 PING 192.168.1.241 (192.168.1.241): 56 data bytes 64 bytes from 192.168.1.241: seq=0 ttl=64 time=13.424 ms 64 bytes from 192.168.1.241: seq=1 ttl=64 time=11.335 ms 64 bytes from 192.168.1.241: seq=2 ttl=64 time=5.322 ms 64 bytes from 192.168.1.241: seq=3 ttl=64 time=5.477 ms 64 bytes from 192.168.1.241: seq=4 ttl=64 time=4.546 ms 64 bytes from 192.168.1.241: seq=5 ttl=64 time=6.109 ms 64 bytes from 192.168.1.241: seq=6 ttl=64 time=5.690 ms 64 bytes from 192.168.1.241: seq=7 ttl=64 time=7.125 ms 64 bytes from 192.168.1.241: seq=8 ttl=64 time=7.018 ms
LAGの配線
Ethernet4, 8 をSONiC1.1-1, SONiC1.1-2で行う。
以下のようにEthernet4, 8 をSONiC1.1-1, SONiC1.1-2で接続した
LAGの設定 https://support.edge-core.com/hc/en-us/articles/900000200683--Enterprise-SONiC-LAG-Link-Aggregation を参考に実施する。 疎通する2台以上のSONiC1.1-1, SONiC1.1-2にそれぞれ設定していく。
PortChannelを作成する。デフォルトでは、LACP fallbackはfalseである。
$ sudo config portchannel add PortChannel1
PortChannelに対象のインターフェイスを追加する。対象のインターフェイスがVlanに所属している場合は削除する。
$ show vlan brief +-----------+--------------+------------+----------------+-------------+-----------------------+ | VLAN ID | IP Address | Ports | Port Tagging | Proxy ARP | DHCP Helper Address | +===========+==============+============+================+=============+=======================+ | 1000 | | Ethernet0 | untagged | disabled | | | | | Ethernet4 | untagged | | | | | | Ethernet8 | untagged | | | | | | Ethernet12 | untagged | | | | | | Ethernet16 | untagged | | | | | | Ethernet20 | untagged | | | | | | Ethernet24 | untagged | | | | | | Ethernet28 | untagged | | | | | | Ethernet32 | untagged | | | +-----------+--------------+------------+----------------+-------------+-----------------------+ $ sudo config vlan member del 1000 Ethernet4 $ sudo config vlan member del 1000 Ethernet8 #追加 $ sudo config portchannel member add PortChannel1 Ethernet4 $ sudo config portchannel member add PortChannel1 Ethernet8 #確認 $ show interfaces portchannel Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports ----- ------------ ----------- ------------------------- 1 PortChannel1 LACP(A)(Up) Ethernet4(S) Ethernet8(S) #PortChannelをデフォルトのVLANに追加 $ sudo config vlan member add 1000 PortChannel1 --untagged #確認 $ show vlan brief +-----------+--------------+--------------+----------------+-------------+-----------------------+ | VLAN ID | IP Address | Ports | Port Tagging | Proxy ARP | DHCP Helper Address | +===========+==============+==============+================+=============+=======================+ | 1000 | | Ethernet0 | untagged | disabled | | | | | Ethernet12 | untagged | | | | | | Ethernet16 | untagged | | | | | | Ethernet20 | untagged | | | | | | Ethernet24 | untagged | | | | | | Ethernet28 | untagged | | | | | | Ethernet32 | untagged | | | | | | PortChannel1 | untagged | | | +-----------+--------------+--------------+----------------+-------------+-----------------------+ $ show interface status PortChannel1 Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC ------------ ------- ------- ----- ----- ------- ------ ------ ------- ------ ---------- PortChannel1 N/A 2G 9100 N/A N/A trunk up up N/A N/A #設定保存 $ sudo config save -y
Browse Device間の通信速度の再測定
pingだとネットワーク帯域の改善を確認できない。
/ # ping 192.168.1.241 PING 192.168.1.241 (192.168.1.241): 56 data bytes 64 bytes from 192.168.1.241: seq=0 ttl=64 time=6.781 ms 64 bytes from 192.168.1.241: seq=1 ttl=64 time=9.504 ms 64 bytes from 192.168.1.241: seq=2 ttl=64 time=9.417 ms 64 bytes from 192.168.1.241: seq=3 ttl=64 time=10.089 ms 64 bytes from 192.168.1.241: seq=4 ttl=64 time=5.774 ms 64 bytes from 192.168.1.241: seq=5 ttl=64 time=5.425 ms 64 bytes from 192.168.1.241: seq=6 ttl=64 time=5.291 ms 64 bytes from 192.168.1.241: seq=7 ttl=64 time=6.747 ms
iperfで実施する
# apk add iperf3
操作方法は省略する。速度は変わらず。
#LAGあり / # iperf3 -c 192.168.1.240 Connecting to host 192.168.1.240, port 5201 [ 5] local 192.168.1.241 port 44018 connected to 192.168.1.240 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 0.00 Bytes 0.00 bits/sec 15 2.83 KBytes [ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 11 2.83 KBytes [ 5] 2.00-3.00 sec 256 KBytes 2.10 Mbits/sec 58 2.83 KBytes [ 5] 3.00-4.00 sec 128 KBytes 1.05 Mbits/sec 46 2.83 KBytes [ 5] 4.00-5.00 sec 128 KBytes 1.05 Mbits/sec 46 2.83 KBytes [ 5] 5.00-6.00 sec 256 KBytes 2.10 Mbits/sec 52 2.83 KBytes [ 5] 6.00-7.00 sec 256 KBytes 2.10 Mbits/sec 52 2.83 KBytes [ 5] 7.00-8.00 sec 128 KBytes 1.05 Mbits/sec 46 2.83 KBytes [ 5] 8.00-9.00 sec 128 KBytes 1.05 Mbits/sec 44 2.83 KBytes [ 5] 9.00-10.00 sec 128 KBytes 1.05 Mbits/sec 44 2.83 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.38 MBytes 1.15 Mbits/sec 414 sender [ 5] 0.00-10.01 sec 1.38 MBytes 1.15 Mbits/sec receiver #LAGなし / # iperf3 -c 192.168.1.240 Connecting to host 192.168.1.240, port 5201 [ 5] local 192.168.1.241 port 35914 connected to 192.168.1.240 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 0.00 Bytes 0.00 bits/sec 15 2.83 KBytes [ 5] 1.00-2.00 sec 128 KBytes 1.05 Mbits/sec 21 2.83 KBytes [ 5] 2.00-3.00 sec 128 KBytes 1.05 Mbits/sec 46 2.83 KBytes [ 5] 3.00-4.00 sec 128 KBytes 1.05 Mbits/sec 30 2.83 KBytes [ 5] 4.00-5.00 sec 128 KBytes 1.05 Mbits/sec 43 2.83 KBytes [ 5] 5.00-6.00 sec 128 KBytes 1.05 Mbits/sec 42 1.41 KBytes [ 5] 6.00-7.00 sec 256 KBytes 2.10 Mbits/sec 53 2.83 KBytes [ 5] 7.00-8.00 sec 128 KBytes 1.05 Mbits/sec 53 1.41 KBytes [ 5] 8.00-9.00 sec 256 KBytes 2.10 Mbits/sec 51 2.83 KBytes [ 5] 9.00-10.00 sec 128 KBytes 1.05 Mbits/sec 50 2.83 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.38 MBytes 1.15 Mbits/sec 404 sender [ 5] 0.00-10.01 sec 1.25 MBytes 1.05 Mbits/sec receiver