{"id":907,"date":"2024-05-05T20:05:14","date_gmt":"2024-05-05T20:05:14","guid":{"rendered":"https:\/\/www.spktechfit.com\/?p=907"},"modified":"2024-06-14T03:21:05","modified_gmt":"2024-06-14T03:21:05","slug":"6-link-aggregation","status":"publish","type":"post","link":"https:\/\/www.spktechfit.com\/?p=907","title":{"rendered":"6. Link Aggregation"},"content":{"rendered":"<h1>Link Aggregation<\/h1>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Without link aggregation, if you used two links to connect two switches together, the two links would create a loop and STP would automatically block one of the ports.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">Link Aggregation fixes this issue by bundling multiple physical interfaces into a single logical interface. <\/span>Since STP sees this as a single interface there is no blocking.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-908 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.1.png\" alt=\"\" width=\"631\" height=\"291\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Advantages of Link Aggregation<\/p>\n<ul style=\"direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">More bandwidth because traffic is spread across multiple ports<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Better resiliency because if one member fails the remaining links carry the load<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Convergence is faster than STP because there is no need for an STP Topology Change notification<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">When you enable Link Aggregation on a switch the protocol creates a virtual interface. You then configure physical ports to be members of that virtual interface. In AOS-CX this is referred to as a LAG (Link Aggregation group).<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">NOTE: broadcast and multicast traffic sent across only physical link in the bundle. This ensures that Link Aggregation dose not create a Layer-2 Loop.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">Link Aggregation Requirements<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Interfaces that are mapped to the same LAG must be configures in a consistent manner. The following items must match:<\/p>\n<ul style=\"direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Duplex mode<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Link speed<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Media<\/span><\/li>\n<\/ul>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">Each LAG can have up to 8 individual ports<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">Static and Dynamic LAG<\/h2>\n<h3 style=\"margin: 0in; font-family: Calibri; font-size: 12.0pt; color: #5b9bd5;\">Static LAG<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-909 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.2.png\" alt=\"\" width=\"435\" height=\"306\" \/><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">In a static LAG devices do not exchange any control information. You configure the LAG independently on each peer. If the configuration is good, it works. However the switch peers have no knowledge of who they are connected to.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">This mode is not recommended because a misconfiguration on one side is not detected by the peer. This can lead to unexpected behaviour which is hard to troubleshoot.<\/p>\n<p>&nbsp;<\/p>\n<h3 style=\"margin: 0in; font-family: Calibri; font-size: 12.0pt; color: #5b9bd5;\">Configuring Layer-2 Static LAG<\/h3>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Create a LAG interface with an identifier between 1 and 256<\/p>\n<pre style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Interface LAG 1<\/span><\/pre>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Disable routing (Layer 3 capabilities). This step limits the LAG to only process Layer-2 frame headers<\/p>\n<pre style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">No routing<\/span><\/pre>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Map a port member to the LAG<\/p>\n<pre style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Interface 1\/1\/1\r\nLAG 1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-910 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.3.png\" alt=\"\" width=\"663\" height=\"247\" \/><\/p>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">Dynamic LAG or LACP<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Devices that use Dynamic LAG exchange control messages to establish and maintain the LAG. This will detect link failures and ensure that LAG port members terminate on the same device.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">The standard used to implement this is Link Aggregation Control Protocol. LACP exchanges periodic messages called LACP Data Units. These messages include:<\/p>\n<ul style=\"direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">System ID: this uniquely identifies the switch<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Operational key: this uniquely identifies the LAG<\/span><\/li>\n<\/ul>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Some other information in the LACP Data Units:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-911 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.4.png\" alt=\"\" width=\"323\" height=\"336\" \/><\/p>\n<p><b>Dynamic LAG or LACP is the recommended way to implement Link Aggregation to avoid unexpected network problems.<\/b><\/p>\n<p>&nbsp;<\/p>\n<h3>LACP Operation Modes<\/h3>\n<p><b>Passive Mode<br \/>\n<\/b>In this mode the device passively waits to receive LACP data unit messages from the peer, to dynamically create the LAG. The LAG is in a listening state waiting to hear from its peer. But if its peer is set in passive mode it is thinking the same thing so a functional LAG is never formed. At least one peer must be in Active mode<\/p>\n<p><b>Active\u00a0 Mode<\/b><\/p>\n<p>In this mode the device actively transmits LACP Data Units over its member ports saying &#8220;Hey lets form a LAG&#8221;. Whether the peer is in Passive or Active mode it responds, negotiation continues, and the AG is successfully formed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-912 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.5.png\" alt=\"\" width=\"607\" height=\"183\" \/><\/p>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">Configuring Layer-2 Dynamic LAG<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">The config is the same for a static LAG except for one extra line where you specify the LACP mode<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-913 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.6.png\" alt=\"\" width=\"650\" height=\"355\" \/><\/p>\n<h1 style=\"margin: 0in; font-family: Calibri; font-size: 16.0pt; color: #1e4e79;\">Load Sharing<\/h1>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">Load Balancing Algorithm<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Peer LAG devices use a <span style=\"font-weight: bold;\">hash<\/span> algorithm to balance the traffic load across multiple physical interfaces. A hash algorithm is a one way mathematical function (if you have the output, there is no way to derive the input).<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">The switches use packet header information as hash function inputs. Depending on the switch this could be:<\/p>\n<ul style=\"direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Layer 4 TCP\/UDP ports<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Layer 3 Source and Destination IP addresses<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Layer 2 Source and destination MAC addresses<\/span><\/li>\n<\/ul>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">In AOS-CX the default input information for the hash algorithm are the Layer 3 Source and Destination IP addresses<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-914 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.7.png\" alt=\"\" width=\"627\" height=\"322\" \/><\/p>\n<p>In this example the MAC source and destination addresses are used as inputs for the algorithm. The output is to use port1 for all packets with this source and destination MAC address combination. Only a link failure will cause port 2 to be used for these packet<\/p>\n<h2>Link Aggregation Load Balancing<\/h2>\n<p>In AOS-CX the default input information for the hash algorithm are the Layer 3 Source and Destination IP addresses. You can verify this by using the <b>show LACP aggregates <\/b>\u00a0command. In the example below you can see the highlighted hash information:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-915 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.8.png\" alt=\"\" width=\"627\" height=\"229\" \/><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">This means it uses Layer 3 Source and Destination IP addresses.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">You can change the input it uses for the algorithm. In the following example we change it to the Layer 2 inputs:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-916 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/6.9.png\" alt=\"\" width=\"592\" height=\"66\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Link Aggregation Without link aggregation, if you used two links to connect two switches together, the two links would create a loop and STP would automatically block one of the ports. Link Aggregation fixes this issue by bundling multiple physical interfaces into a single logical interface. Since STP sees this as a single interface there [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17,3],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/907"}],"collection":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=907"}],"version-history":[{"count":3,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/907\/revisions"}],"predecessor-version":[{"id":921,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/907\/revisions\/921"}],"wp:attachment":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}