{"id":16149,"date":"2025-11-21T15:13:51","date_gmt":"2025-11-21T18:13:51","guid":{"rendered":"https:\/\/made4it.com.br\/mc-lag-em-roteadores-huawei\/"},"modified":"2025-11-21T15:22:33","modified_gmt":"2025-11-21T18:22:33","slug":"mc-lag-em-roteadores-huawei","status":"publish","type":"post","link":"https:\/\/made4it.com.br\/en\/mc-lag-em-roteadores-huawei\/","title":{"rendered":"MC-LAG on Huawei routers"},"content":{"rendered":"\n<p>How to configure MC-LAG on Huawei: E-Trunk, Eth-Trunk, LACP and BFD step by step.<\/p>\n\n\n\n<p>Learn MC-LAG in Huawei, today we show you why E-Trunk (multi-chassis), when to use Eth-Trunk (aggregation), how to adjust LACP for active\/backup ports and how BFD shortens MTTR. We include recommendations for hashing in MPLS scenarios and a test script to validate failure behavior. <\/p>\n\n\n\n<p id=\"bkmrk-o-link-aggregation-%28\">Link-aggregation (LAG), called <strong>Trunk<\/strong> at Huawei<strong>(Eth-Trunk<\/strong> when it&#8217;s Ethernet), is a technology that combines multiple physical interfaces into a single logical interface. With link-aggregation we win: <\/p>\n\n\n\n<ul id=\"bkmrk-aumento-de-banda-%28so\" class=\"wp-block-list\">\n<li>increase in bandwidth (sum of links),<\/li>\n\n\n\n<li>redundancy,<\/li>\n\n\n\n<li>and rapid convergence on interface\/link failures.<\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/limbo.made4it.com.br\/books\/protocolos-de-redes\/page\/mc-lag-em-roteadores-huawei\/edit?content-id=bkmrk-o-lag-tradicional-%C3%A9-&amp;content-text=O%20LAG%20tradicional%20%C3%A9%20sempre%20entre%20dois%20dispositivos\"><\/a>  Traditional LAG is always between two devices, point to point:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"348\" height=\"56\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk.png\" alt=\"\" class=\"wp-image-16085\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk.png 348w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-300x48.png 300w\" sizes=\"(max-width: 348px) 100vw, 348px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Types of LAG for Huawei<\/h2>\n\n\n\n<p id=\"bkmrk-de-forma-bem-simples\">Quite simply, at Huawei we have three main ways of using Eth-Trunk:<\/p>\n\n\n\n<ul id=\"bkmrk-manual-%28load-balanci\" class=\"wp-block-list\">\n<li><strong>Manual (manual load-balancing)<\/strong><\/li>\n\n\n\n<li><strong>Static LACP<\/strong><\/li>\n\n\n\n<li><strong>Manual 1:1 master\/backup<\/strong><\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-no-contexto-de-mc-la\">In the context of MC-LAG, what matters to us is basically:<\/p>\n\n\n\n<ul id=\"bkmrk-eth-trunk-manual-eth\" class=\"wp-block-list\">\n<li><strong>Eth-Trunk manual<\/strong><\/li>\n\n\n\n<li><strong>Eth-Trunk in LACP static<\/strong><\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-vamos-simplificar%3A\">Let&#8217;s make it simple:<\/p>\n\n\n\n<p><a href=\"https:\/\/limbo.made4it.com.br\/books\/protocolos-de-redes\/page\/mc-lag-em-roteadores-huawei\/edit?content-id=bkmrk-manual-voc%C3%AA-cria-o-e&amp;content-text=%0A%0AManual%0A%0A%0AVoc%C3%AA%20cria%20o%20Eth-Trunk%2C%20adiciona%20as%20inte\"><\/a><strong>  Manual<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You create Eth-Trunk, add the interfaces and you&#8217;re done.<\/li>\n\n\n\n<li>All trunk interfaces are active and forwarding traffic.<\/li>\n\n\n\n<li>There is no negotiation with the other side, so the &#8220;criterion&#8221; is just the configuration to beat (same number of ports, speed, duplex, etc.).<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Static LACP<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You also create Eth-Trunk and add the interfaces, but their status (active or backup) is decided by <strong>LACP<\/strong>.<\/li>\n\n\n\n<li>LACP exchanges messages (LACPDUs) between the two sides, decides which links can be part of the LAG and which will be active or backed up.<\/li>\n\n\n\n<li>Allows M:N (M active links, N in backup), minimum and maximum threshold of active links, etc.<\/li>\n<\/ul>\n\n\n\n<ul id=\"bkmrk-manual-voc%C3%AA-cria-o-e\" class=\"wp-block-list\">\n<li><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How Trunk balances traffic<\/h2>\n\n\n\n<p>Eth-Trunk doesn&#8217;t &#8220;add ports&#8221; like a giant door. The equipment decides <g id=\"gid_0\">which member to<\/g> send each flow <g id=\"gid_0\">through<\/g> using <g id=\"gid_1\">balancing algorithms<\/g>. This defines two main behaviors:  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hash-based load-balancing<\/h2>\n\n\n\n<p id=\"bkmrk-%C3%89-o-padr%C3%A3o-na-maiori\">It&#8217;s standard on most routers\/switches. It works like this: <\/p>\n\n\n\n<ol id=\"bkmrk-o-equipamento-pega-c\" class=\"wp-block-list\">\n<li>The device takes fields from the packet (MAC, IP, ports, MPLS, etc.).<\/li>\n\n\n\n<li>Calculates a <strong>hash<\/strong>.<\/li>\n\n\n\n<li>Use the result to choose one of the LAG links.<\/li>\n<\/ol>\n\n\n\n<p id=\"bkmrk-o-hash-pode-usar-v%C3%A1r\">The hash can use various criteria, for example:<\/p>\n\n\n\n<ul id=\"bkmrk-src-mac%2C-dst-mac%2C-sr\" class=\"wp-block-list\">\n<li><code>src-mac<\/code>, <code>dst-mac<\/code>,  <code>src-dst-mac<\/code><\/li>\n\n\n\n<li><code>src-ip<\/code>, <code>dst-ip<\/code>,  <code>src-dst-ip<\/code><\/li>\n\n\n\n<li>enhanced versions that add more entropy<\/li>\n\n\n\n<li>(in MPLS scenarios) <strong>MPLS labels<\/strong><\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-com-hash%2C-o-modo-pad\">With hash, the default mode is <strong>per-flow<\/strong>:<\/p>\n\n\n\n<ul id=\"bkmrk-per-flow%3A-todos-os-p\" class=\"wp-block-list\">\n<li><strong>Per-flow<\/strong>: all packets of the same flow go through the same link \u2192 guarantees order.<\/li>\n\n\n\n<li><strong>Per-packet<\/strong>: each packet can go via different links \u2192 uses more bandwidth, but breaks ordering (very rare in SP networks).<\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/limbo.made4it.com.br\/books\/protocolos-de-redes\/page\/mc-lag-em-roteadores-huawei\/edit?content-id=bkmrk-hash-tem-uma-consequ&amp;content-text=Hash%20tem%20uma%20consequ%C3%AAncia%20importante%3A\"><\/a>  Hash has an important consequence:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>It <strong>doesn&#8217;t always distribute bandwidth evenly.<\/strong><br>Depending on the distribution of flows (hash), one member may be at the bottleneck while another has almost no traffic. This is normal. <\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Dynamic load-balance<\/h2>\n\n\n\n<p id=\"bkmrk-alguns-equipamentos-\">Some devices support <strong>dynamic<\/strong> mode, which monitors the instantaneous load of each member and <strong>reallocates flows between links<\/strong> that are underutilized or overloaded.<\/p>\n\n\n\n<ul id=\"bkmrk-mant%C3%A9m-ordem-dos-flu\" class=\"wp-block-list\">\n<li>Maintains flow order,<\/li>\n\n\n\n<li>Corrects situations where the hash alone would leave one link &#8220;full&#8221; and another idle,<\/li>\n\n\n\n<li>It is more efficient in scenarios with few heavy flows.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-um-equipamento-que-u\">One device that uses this type of balancing is Datacom&#8217;s switches.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">And what can the chips use for hashing?<\/h2>\n\n\n\n<p id=\"bkmrk-esse-ponto-quase-nin\">Hardly anyone talks about this point, but it&#8217;s crucial.<\/p>\n\n\n\n<p id=\"bkmrk-dependendo-do-asic%2C-\">Depending on the ASIC, the router may look:<\/p>\n\n\n\n<ul id=\"bkmrk-somente-camada-2-%2B-c\" class=\"wp-block-list\">\n<li>only <strong>layer 2 + layer 3<\/strong> (MAC + IP + ports),<\/li>\n\n\n\n<li>and\/or <strong>MPLS labels<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-no-caso-de-mpls%3A\">In the case of MPLS:<\/p>\n\n\n\n<ul id=\"bkmrk-alguns-asics-s%C3%B3-cons\" class=\"wp-block-list\">\n<li>Some ASICs can only read <strong>the first label of<\/strong> the stack.<\/li>\n\n\n\n<li>Others can read <strong>the first 3 labels<\/strong>.<\/li>\n\n\n\n<li>More modern ASICs (recent NPs\/NPUs) read <strong>up to the 7th label<\/strong> to generate entropy in the hash.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-isso-importa-porque%3A\">This matters because:<\/p>\n\n\n\n<ul id=\"bkmrk-em-t%C3%BAneis-mpls%2C-quan\" class=\"wp-block-list\">\n<li>In MPLS tunnels, when everyone uses the same top label, the hash loses entropy.<\/li>\n\n\n\n<li>When the ASIC does not read deeply into the MPLS stack, several flows can fall on the <strong>same<\/strong> LAG <strong>link<\/strong>.<\/li>\n\n\n\n<li>More modern hardware can see internal labels (VPN, PW, etc.), giving the hash much more diversity.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-exemplos-pr%C3%A1ticos%3A\">Practical examples:<\/p>\n\n\n\n<ul id=\"bkmrk-vpls%2Fpwe3-%E2%86%92-usar-o-p\" class=\"wp-block-list\">\n<li>VPLS\/PWE3 \u2192 use the <strong>PW label<\/strong> as entropy (if the chip is deep enough).<\/li>\n\n\n\n<li>L3VPN \u2192 use the <strong>VPN label<\/strong>.<\/li>\n\n\n\n<li>Simple LDP traffic \u2192 almost always hash poor, as many flows share the same transport label.<\/li>\n\n\n\n<li>Use other techniques, such as <strong>flow-labeling <\/strong>in services.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>  In a nutshell:<\/p>\n<cite>The greater the MPLS depth that the ASIC sees, the better the distribution of MPLS flows in the LAG.<\/cite><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">What LACP does<\/h2>\n\n\n\n<p id=\"bkmrk-o-lacp-%28link-aggrega\"><strong>LACP<\/strong> (Link Aggregation Control Protocol, IEEE 802.3ad) is the guy who:<\/p>\n\n\n\n<ul id=\"bkmrk-negocia-se-um-conjun\" class=\"wp-block-list\">\n<li><strong>Negotiates<\/strong> whether or not a set of interfaces can form a LAG;<\/li>\n\n\n\n<li>Decides <strong>which<\/strong> interfaces in the group will be <strong>active<\/strong> and which will be <strong>backed up<\/strong>;<\/li>\n\n\n\n<li>Maintains LAG status: if a link goes down, it can activate another link that was on standby;<\/li>\n\n\n\n<li>Detects configuration\/mismatch problems (speed, duplex, mode, etc.) and avoids aggregating incompatible links.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-na-huawei%2C-quando-o-\">At Huawei, when Eth-Trunk is in <strong>static LACP<\/strong>, the member interfaces:<\/p>\n\n\n\n<ul id=\"bkmrk-trocando-lacpdus%2C-in\" class=\"wp-block-list\">\n<li>By exchanging <strong>LACPDUs<\/strong>, they report:\n<ul class=\"wp-block-list\">\n<li><strong>System priority<\/strong> (device priority),<\/li>\n\n\n\n<li><strong>System ID<\/strong> (usually the system MAC),<\/li>\n\n\n\n<li><strong>Interface priority<\/strong>,<\/li>\n\n\n\n<li><strong>Interface number<\/strong>,<\/li>\n\n\n\n<li><strong>Key<\/strong> (logical identifier of the LAG).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-o-lado-com-maior-pri\">The side with the <strong>highest system priority<\/strong> (lowest numerical value) becomes the <strong>Actor<\/strong>. From there: <\/p>\n\n\n\n<ul id=\"bkmrk-o-actor-decide-quais\" class=\"wp-block-list\">\n<li>The Actor decides which ports will be <strong>active<\/strong> (based on priority and policies \/ thresholds);<\/li>\n\n\n\n<li>The other side follows this decision to maintain consistency.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What needs to be &#8220;OK&#8221; for LAG to rise properly<\/h2>\n\n\n\n<p id=\"bkmrk-pra-um-eth-trunk-com\">For an Eth-Trunk with LACP to work as expected, certain points need to be aligned between the two sides:<\/p>\n\n\n\n<ul id=\"bkmrk-mesma-ideia-de-lag%2Fk\" class=\"wp-block-list\">\n<li>Same idea as <strong>LAG\/Key<\/strong> (the doors that will form the same Eth-Trunk on each side);<\/li>\n\n\n\n<li>Same <strong>speed<\/strong> and <strong>duplex<\/strong> on the physical ports;<\/li>\n\n\n\n<li>Same type of <strong>LACP mode<\/strong> (static LACP on both sides);<\/li>\n\n\n\n<li>Coherent limits of:\n<ul class=\"wp-block-list\">\n<li>minimum number of active links (lower threshold),<\/li>\n\n\n\n<li>maximum number of active links (upper threshold), if used;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Minimum compatibility in LACP timers (fast\/slow) and <strong>active\/passive<\/strong> mode (the two sides in passive do not negotiate).<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-o-que-o-lacp-faz-%C3%A9-u\">What LACP does is use <strong>system priority + system ID + interface priority + interface number<\/strong> to:<\/p>\n\n\n\n<ul id=\"bkmrk-decidir-quem-%C3%A9-o-act\" class=\"wp-block-list\">\n<li>Decide who the <strong>actor<\/strong> is;<\/li>\n\n\n\n<li>Choose which ports are <strong>active<\/strong> and which are <strong>backed up<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Entering MC-LAG<\/h2>\n\n\n\n<p id=\"bkmrk-at%C3%A9-aqui-falamos-de-\">So far we&#8217;ve been talking about &#8220;normal&#8221; LAG, i.e. <strong>between two devices<\/strong> only.<\/p>\n\n\n\n<p id=\"bkmrk-o-mc-lag-%28multi-chas\"><strong>MC-LAG<\/strong> (Multi-Chassis LAG) comes in when you want it:<\/p>\n\n\n\n<ul id=\"bkmrk-um-%C3%BAnico-lag-do-pont\" class=\"wp-block-list\">\n<li><strong>A single LAG from the customer&#8217;s point of view (CE)<\/strong>,<\/li>\n\n\n\n<li>But actually terminating in <strong>two different devices<\/strong> (for example, two PEs\/edge routers).<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-a-ideia-%C3%A9-simples%3A\">The idea is simple:<\/p>\n\n\n\n<ul id=\"bkmrk-do-lado-do-ce%2C-voc%C3%AA-\" class=\"wp-block-list\">\n<li>On the <strong>EC<\/strong> side, you can see <strong>a single Eth-Trunk<\/strong> with several doors;<\/li>\n\n\n\n<li>Physically, these ports go to <strong>two different PEs<\/strong>;<\/li>\n\n\n\n<li>On the operator&#8217;s side, these two PEs &#8220;combine&#8221; to look like a single device in terms of LACP.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-objetivo-principal-d\">MC-LAG&#8217;s main objective:<\/p>\n\n\n\n<ul id=\"bkmrk-se-um-pe-inteiro-mor\" class=\"wp-block-list\">\n<li>If <strong>an entire PE<\/strong> dies (equipment failure, reload, etc.),<\/li>\n\n\n\n<li>The <strong>other PE<\/strong> takes over and the CE continues with the same LAG, without changing IP, MAC, gateway etc.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-%C3%89-basicamente-levar-\">It&#8217;s basically taking the idea of redundancy from the port\/link level to the <strong>device<\/strong> level.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"502\" height=\"191\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-2.png\" alt=\"\" class=\"wp-image-16089\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-2.png 502w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-2-300x114.png 300w\" sizes=\"(max-width: 502px) 100vw, 502px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Active\/active vs active\/backup<\/h2>\n\n\n\n<p id=\"bkmrk-em-muitos-vendors-vo\">In many vendors you can find MC-LAG in two flavors:<\/p>\n\n\n\n<ul id=\"bkmrk-ativo%2Fativo%3A-os-dois\" class=\"wp-block-list\">\n<li><strong>Active\/active<\/strong>: both devices forward traffic at the same time;<\/li>\n\n\n\n<li><strong>Active\/backup<\/strong>: only one device is the &#8220;owner&#8221; of the LAG at any given time; the other is backed up.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-na-huawei%2C-para-esse\">At <strong>Huawei<\/strong>, for this specific scenario with E-Trunk\/mLACP, the behavior is <strong>active\/backup<\/strong>:<\/p>\n\n\n\n<ul id=\"bkmrk-um-lado-%C3%A9-o-master-%28\" class=\"wp-block-list\">\n<li>One side is the <strong>master<\/strong> (active),<\/li>\n\n\n\n<li>The other side is <strong>backup<\/strong> (the links are logical down from the EC&#8217;s point of view),<\/li>\n\n\n\n<li>On failure, there is a <strong>switchover<\/strong> from the master role to the other device.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">MC-LAG at Huawei: E-Trunk vs mLACP<\/h2>\n\n\n\n<p id=\"bkmrk-na-huawei%2C-existem-d\">In Huawei, there are two main ways of implementing MC-LAG:<\/p>\n\n\n\n<ol id=\"bkmrk-e-trunk-%28enhanced-tr\" class=\"wp-block-list\">\n<li><strong>E-Trunk (Enhanced Trunk)<\/strong><\/li>\n\n\n\n<li><strong>mLACP (Multi-chassis LACP)<\/strong><\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Both have the same goal:<\/p>\n<cite>&#8220;Trick&#8221; the CE into thinking it&#8217;s talking to just <strong>one<\/strong> device, even though there are two PEs behind it.<\/cite><\/blockquote>\n<\/blockquote>\n\n\n\n<p id=\"bkmrk-a-diferen%C3%A7a-est%C3%A1-no-\">The difference lies in <strong>the control mechanism<\/strong> between the PEs:<\/p>\n\n\n\n<ul id=\"bkmrk-e-trunk-usa-um-canal\" class=\"wp-block-list\">\n<li><strong>E-Trunk<\/strong>\n<ul class=\"wp-block-list\">\n<li>It uses its own channel (UDP) between the PEs, with <strong>Hello<\/strong> and <strong>timeout<\/strong>;<\/li>\n\n\n\n<li>Exchanges status information of the Eth-Trunks participating in that E-Trunk;<\/li>\n\n\n\n<li>Defines who is <strong>master<\/strong> and who is <strong>backup<\/strong> based on <strong>E-Trunk priority<\/strong> (lowest value = highest priority);<\/li>\n\n\n\n<li>Controls whether the local Eth-Trunk is <strong>up<\/strong> or <strong>down<\/strong> according to the role (master\/backup) and status of the peer.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>mLACP<\/strong>\n<ul class=\"wp-block-list\">\n<li>It uses <strong>ICCP<\/strong> running over <strong>LDP<\/strong> between the PEs (RG &#8211; Redundancy Group);<\/li>\n\n\n\n<li>Synchronizes <strong>LACP configuration and status<\/strong> via ICCP;<\/li>\n\n\n\n<li>Define master\/backup using <strong>mLACP system priority<\/strong>, <strong>system ID<\/strong> and <strong>port priority<\/strong>;<\/li>\n\n\n\n<li>It integrates in a more &#8220;SP standard&#8221; way with other ICCP functions (VRRP, redundant VPNs, etc.).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-neste-artigo%2C-vamos-\">In this article, we&#8217;ll focus on <strong>E-Trunk<\/strong>, which is the &#8220;<strong>classic<\/strong>&#8221; form of MC-LAG in many PE-CE scenarios.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How E-Trunk works<\/h2>\n\n\n\n<p id=\"bkmrk-n%C3%A3o-confundir-e-trun\">Don&#8217;t confuse E-Trunk (the sync technology between chassis) with Eth-Trunk (the link-aggregation itself).<\/p>\n\n\n\n<p id=\"bkmrk-pensa-no-cen%C3%A1rio%3A\">Consider the following scenario:<\/p>\n\n\n\n<ul id=\"bkmrk-ce-dual-homed-em-doi\" class=\"wp-block-list\">\n<li>CE dual-homed in two PEs (PE1 and PE2);<\/li>\n\n\n\n<li>In the EC, you create <strong>a single Eth-Trunk<\/strong>, with the doors going to both PEs;<\/li>\n\n\n\n<li>In the EPs:\n<ul class=\"wp-block-list\">\n<li>You create the <strong>same Eth-Trunk ID<\/strong> on PE1 and PE2;<\/li>\n\n\n\n<li>Place the corresponding physical interfaces on each Eth-Trunk;<\/li>\n\n\n\n<li>Add this Eth-Trunk to an <strong>E-Trunk<\/strong> with the same <strong>E-Trunk ID<\/strong> on both sides.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-os-pes-ent%C3%A3o%3A\">The PEs then:<\/p>\n\n\n\n<ol id=\"bkmrk-criam-um-canal-e-tru\" class=\"wp-block-list\">\n<li>They create an E-Trunk (UDP) channel between themselves (using loopback IPs, usually);<\/li>\n\n\n\n<li>They exchange E-Trunk messages with:\n<ul class=\"wp-block-list\">\n<li><strong>E-Trunk ID<\/strong>,<\/li>\n\n\n\n<li><strong>E-Trunk priority<\/strong>,<\/li>\n\n\n\n<li>Information on Eth-Trunks members and their status;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>They define who is <strong>master<\/strong> and who is <strong>backup<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Lowest <strong>E-Trunk priority<\/strong> wins,<\/li>\n\n\n\n<li>If it draws, the smaller <strong>E-Trunk system ID<\/strong> wins.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p id=\"bkmrk-com-isso%3A\">With that:<\/p>\n\n\n\n<ul id=\"bkmrk-no-master%3A-o-eth-tru\" class=\"wp-block-list\">\n<li>On the <strong>master<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The local Eth-Trunk participating in E-Trunk is <strong>up<\/strong> and <strong>running<\/strong>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>No <strong>backup<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The equivalent Eth-Trunk is in a <strong>backup state<\/strong> (logical down for the EC or without forwarding traffic, depending on the mode);<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>The EC sees only one LAG, but in practice it is hanging from two PEs, with one of them active.<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-quando-acontece-uma-\">When a fault occurs:<\/p>\n\n\n\n<ul id=\"bkmrk-se-o-eth-trunk-maste\" class=\"wp-block-list\">\n<li>If the <strong>Eth-Trunk master<\/strong> or the <strong>PE master<\/strong> itself fails:\n<ul class=\"wp-block-list\">\n<li>The backup stops receiving <strong>Hello<\/strong> or receives a failure notification;<\/li>\n\n\n\n<li>The backup changes your Eth-Trunk to <strong>master<\/strong> and increases the LAG;<\/li>\n\n\n\n<li>Traffic from the EC is diverted to the other PE.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-opcionalmente%2C-voc%C3%AA-\">Optionally, you can:<\/p>\n\n\n\n<ul id=\"bkmrk-integrar-com-bfd-ent\" class=\"wp-block-list\">\n<li>Integrate with <strong>BFD<\/strong> between PEs for faster detection;<\/li>\n\n\n\n<li>Use a <strong>switchback delay<\/strong> to avoid master\/backup ping-pong.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">CE connectivity \u2194 PEs with E-Trunk<\/h2>\n\n\n\n<p id=\"bkmrk-alguns-pontos-import\">Some important design points:<\/p>\n\n\n\n<ul id=\"bkmrk-do-ponto-de-vista-do\" class=\"wp-block-list\">\n<li>From the EC&#8217;s point of view, the E-Trunk is <strong>invisible<\/strong>:\n<ul class=\"wp-block-list\">\n<li>It only sees a normal Eth-Trunk LACP.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>In PEs, if the Eth-Trunk is <strong>L3:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The Eth-Trunks of the two PEs usually use the <strong>same IP<\/strong> and <strong>MAC<\/strong>;<\/li>\n\n\n\n<li>Only the master announces a direct route; the backup does not (to avoid strange ECMP);<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Much more common is to use Eth-Trunk <strong>L2<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The PEs participate in a common VLAN\/L2 domain;<\/li>\n\n\n\n<li>The gateway is on another device (for example, a core\/agg).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Use cases<\/h2>\n\n\n\n<p id=\"bkmrk-na-topologia-abaixo%2C\">In the topology below, we&#8217;ll cover two use cases for MC-LAG (there are many others).<\/p>\n\n\n\n<ul id=\"bkmrk-protegendo-uma-entre\" class=\"wp-block-list\">\n<li>protecting a VPLS delivery to an end customer (dual approach with redundant POPs)  <\/li>\n\n\n\n<li>protecting a \/30 for the end customer (dual approach with redundant POPs)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"507\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-3-1024x507.png\" alt=\"\" class=\"wp-image-16092\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-3-1024x507.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-3-300x149.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-3-768x380.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-3.png 1056w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">1) MC-LAG protecting VPLS (layer 2)<\/h2>\n\n\n\n<p id=\"bkmrk-no-topo-do-desenho%2C-\">At the top of the drawing, <strong>CE1<\/strong> is multihomed to <strong>PE1<\/strong> and <strong>PE2<\/strong> using MC-LAG, all in the same <strong>VPLS-1<\/strong> instance.<br>On the network side, PE1\/PE2 close the VPLS with <strong>PE3<\/strong>, which delivers the same service to <strong>CE2<\/strong>.<\/p>\n\n\n\n<ul id=\"bkmrk-do-ponto-de-vista-do-1\" class=\"wp-block-list\">\n<li>From CE1&#8217;s point of view, there is <strong>only one LAG<\/strong> for the VPLS.<\/li>\n\n\n\n<li>In practice, traffic can leave via <strong>two different POPs<\/strong> (PE1 and PE2).<\/li>\n\n\n\n<li>If a POP or one of the PEs has a problem, the other continues to deliver the same VPLS to the client, without changing the VLAN, MAC or service.<\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-%C3%89-uma-prote%C3%A7%C3%A3o-l2-fi\">This is end-to-end <strong>L2<\/strong> protection for the VPLS, with equipment <strong>and<\/strong> POP redundancy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2) MC-LAG protecting \/30 L3 (layer 3)<\/h2>\n\n\n\n<p id=\"bkmrk-na-parte-de-baixo-do\">At the bottom of the drawing, <strong>CE3<\/strong> receives a <strong>\/30 L3<\/strong> via MC-LAG, dual-homed in <strong>PE2<\/strong> and <strong>PE3<\/strong>.<\/p>\n\n\n\n<ul id=\"bkmrk-o-ce3-enxerga-um-%C3%BAni\" class=\"wp-block-list\">\n<li>The CE3 sees a single LAG L3, with the same \/30, hanging from two POPs.<\/li>\n\n\n\n<li>Only the PE in <strong>master<\/strong> state announces the direct route to this \/30; the other is <strong>backed up<\/strong>.<\/li>\n\n\n\n<li>In the event of a link failure, PE or POP, there is a master\/backup switchover and \/30 is still accessible from the other side.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up the environment<\/h2>\n\n\n\n<p id=\"bkmrk-para-o-laborat%C3%B3rio%2C-\">Now that you know all the concepts behind MC-LAG, let&#8217;s go to the lab. We&#8217;re going to use the PNETLAB virtual environment, with the Huawei NE40 V22 image. <\/p>\n\n\n\n<p id=\"bkmrk-as-portas-f%C3%ADsicas-es\">The physical ports and connections between devices are described in the topology below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"543\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-4-1024x543.png\" alt=\"\" class=\"wp-image-16095\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-4-1024x543.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-4-300x159.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-4-768x407.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-4-1536x814.png 1536w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-4-2048x1086.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The configuration of the CEs is simple: a mikrotik (ROS 7.6) using bonding interfaces, with LACP fast (in 1s). CE3 is simply a physical interface with a VLAN. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CE1<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># configura o hostname\n\/system identity set name=CE1\n\n# cria o LAG bond2 usando LACP entre as portas ether1 e ether2\n\/interface bonding add lacp-rate=1sec mode=802.3ad name=bond2 slaves=ether1,ether2\n\n# adiciona a vlan 10 , utilizada no VPLS, ligada no LAG bond2\n\/interface vlan add interface=bond2 mtu=1488 name=vlan10 vlan-id=10\n\n# configura o IP na vlan10\n\/ip address add address=10.10.10.1\/24 interface=vlan10 network=10.10.10.0<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">CE2<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># configura o hostname\n\/system identity set name=CE2\n\n# adiciona a vlan 10 , utilizada no VPLS, ligada diretamente na ether1\n\/interface vlan add interface=ether1 name=vlan10 vlan-id=10\n\n# configura o IP na vlan10\n\/ip address add address=10.10.10.2\/24 interface=vlan10 network=10.10.10.0<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">CE3<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># configura o hostname\n\/system identity set name=CE3\n\n# cria o LAG bond1 usando LACP entre as portas ether1 e ether2\n\/interface bonding add lacp-rate=1sec mode=802.3ad name=bond1 slaves=ether1,ether2\n\n# adiciona o IP \/30 direto na interface bond1\n\/ip address add address=10.23.23.2\/30 interface=bond1 network=10.23.23.0\n\n# configura o gateway default\n\/ip route add gateway=10.23.23.1<\/code><\/pre>\n\n\n\n<p>The configuration of the PEs includes the point-to-point interfaces, active with OSPF, MPLS. On the access interfaces, the LAG and e-trunk synchronization configurations. And in the service layer, we have set up the VPLS (VSI) and also the L3 gateway (with the mac-address and the same IP).  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PE1 &#8211; Core Layer<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># configura o hostname\nsysname PE1\n\n# habilita o bfd\nbfd\n\n# configura e ativa o mpls e o l2vpn\nmpls lsr-id 1.1.1.1\nmpls\nmpls l2vpn\nmpls ldp\n\n# configura o ospf e ativa a area 0\nospf 1 router-id 1.1.1.1\n opaque-capability enable\n area 0.0.0.0\n\n# configura a loopback \ninterface LoopBack1\n ip address 1.1.1.1 255.255.255.255\n ospf enable 1 area 0.0.0.0\n \n# configura as interfaces fisicas com o \/30 e ativando ospf\/mpls\ninterface Ethernet3\/0\/1\n description to_PE3\n undo shutdown\n ip address 10.1.3.1 255.255.255.0\n ospf cost 1000\n ospf network-type p2p\n ospf enable 1 area 0.0.0.0\n mpls\n mpls ldp\n undo dcn\n undo dcn mode vlan\n#\ninterface Ethernet3\/0\/2\n description to_PE2\n undo shutdown\n ip address 10.1.2.1 255.255.255.0\n ospf network-type p2p\n ospf enable 1 area 0.0.0.0\n mpls\n mpls ldp\n undo dcn mode vlan<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">MLAG and E-trunk service<\/h2>\n\n\n\n<p>This is where MLAG really comes into its own. We first create an ordinary Eth-Trunk, and then associate it with an e-trunk configuration, which makes the MLAG magic happen. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cria a Eth-Trunk10\ninterface Eth-Trunk10\n mode lacp-static\n lacp timeout fast\n\n# associa a interface ao eth-trunk\ninterface Ethernet3\/0\/3\n description to_CE1\n undo shutdown\n eth-trunk 10<\/code><\/pre>\n\n\n\n<p id=\"bkmrk-com-o-lag-criado%2C-ag\">With the LAG created, we now need to create the e-trunk configuration. To configure it, we need to: <\/p>\n\n\n\n<ul id=\"bkmrk-do-ip-de-peer-remoto\" class=\"wp-block-list\">\n<li>of the remote peer IP (the session is closed between loopbacks)<\/li>\n\n\n\n<li>set the priority between routers (lower is better)<\/li>\n\n\n\n<li>setting the timers (in multiples of 100ms)<\/li>\n\n\n\n<li>configure authentication for security<\/li>\n\n\n\n<li>add a description to e-trunk<\/li>\n\n\n\n<li>configure the system-id and priority of the e-trunk (these settings &#8220;trick&#8221; the remote peer into thinking it&#8217;s the same device)<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-no-nosso-laborat%C3%B3rio\">In our lab, we&#8217;ll close the loopback between PE1 and PE2 &#8211; these are part of the MLAG from CE1&#8217;s perspective. The master priority will be PE2, with priority 5. The timers configured are 9 for hello and 30 for hold-timer.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># configura os parametros de system-id e prioridade do e-trunk\nlacp e-trunk system-id 00e0-beba-cafe\nlacp e-trunk priority 1\n\n# cria a sessao BFD entre os peers PE1 e PE2\nbfd hello bind peer-ip 2.2.2.2 source-ip 1.1.1.1\n discriminator local 1\n discriminator remote 2\n\n# cria o etrunk-1\ne-trunk 1\n # a descricao\n description PE1_to_PE2\n \n # configura a prioridade\n priority 10\n \n # diz quais os peers da comunicacao\n peer-address 2.2.2.2 source-address 1.1.1.1\n \n # configura timers\n timer hello 9\n timer hold-on-failure multiplier 30\n \n # autenticacao\/senha\n authentication-mode enhanced-hmac-sha256\n security-key cipher %^%#dX@~~;axSXr!.(&amp;d&lt;4PYE)n7:!hcBBD-`2&gt;JeFa!%^%#\n\n # associa a sessao BFD com o e-trunk\n e-trunk track bfd-session session-name hello<\/code><\/pre>\n\n\n\n<p>Finally, it&#8217;s time to associate the LAG interface with e-trunk, thus creating an MLAG from CE1&#8217;s perspective.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># associa o e-trunk ao Eth-Trunk, criando assim o MLAG\ninterface Eth-Trunk10\n e-trunk 1<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">VPLS services<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># cria o VPLS chamado VPLS-1\nvsi VPLS-1 static\n pwsignal ldp\n  vsi-id 1\n  mac-withdraw enable\n  interface-status-change mac-withdraw enable\n  peer 3.3.3.3\n ignore-ac-state\n\n# cria a interface da vlan10 e associa o VPLS\ninterface Eth-Trunk10.10\n vlan-type dot1q 10\n l2 binding vsi VPLS-1<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">PE2 &#8211; Core Layer<\/h2>\n\n\n\n<p>The CORE and VPLS configurations of PE2 are similar to those of PE1<\/p>\n\n\n\n<p><strong>MLAG and E-trunk service<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># configura os parametros de system-id e prioridade do e-trunk\nlacp e-trunk system-id 00e0-beba-cafe\nlacp e-trunk priority 1\n\n# cria o lagg e associa a interface fisica de acesso\ninterface Eth-Trunk10\n mode lacp-static\n lacp timeout fast\n\ninterface Ethernet3\/0\/3\n description to_CE1\n undo shutdown\n eth-trunk 10\n\n# cria a sessao BFD \nbfd hello bind peer-ip 1.1.1.1 source-ip 2.2.2.2\n discriminator local 2\n discriminator remote 1\n\n# cria o etrunk1 com o PE1\ne-trunk 1\n priority 5\n peer-address 1.1.1.1 source-address 2.2.2.2\n timer hello 11\n timer hold-on-failure multiplier 33\n security-key cipher %^%#tv.DQ.!Y,C7ga=SnUvtMsT84Xld,eBTM\\\\6fSq#2%^%#\n e-trunk track bfd-session session-name hello\n authentication-mode enhanced-hmac-sha256\n description PE1_to_PE2\n \n# associa o e-trunk ao LAG\ninterface Eth-Trunk10\n e-trunk 1<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Redundant Gateway Services<\/h2>\n\n\n\n<p id=\"bkmrk-para-o-servi%C3%A7o-de-ga\">For the redundant gateway service for CE3, we will:<\/p>\n\n\n\n<ul id=\"bkmrk-estabelecer-um-lag-e\" class=\"wp-block-list\">\n<li>establish a LAG between PE2xCE3 and a lag between PE3xCE3<\/li>\n\n\n\n<li>activate e-trunk between PE2 and PE3 in the lag created<\/li>\n\n\n\n<li>configure e-trunk&#8217;s system-id and priority parameters<\/li>\n\n\n\n<li>configure the <strong>same IP address and mac-address <\/strong>on the Eth-trunk interface on both routers  <\/li>\n\n\n\n<li>add the interface to OSPF<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># configura os parametros de system-id e prioridade do e-trunk\nlacp e-trunk system-id 00e0-beba-cafe\nlacp e-trunk priority 1\n\n# cria o LAG Eth-Trunk23\ninterface Eth-Trunk23\n mode lacp-static\n lacp timeout fast\n\n# adiciona a interface ao LAG\ninterface Ethernet3\/0\/4\n description to_CE3\n eth-trunk 23\n\n# cria a sessao BFD entre o PE2 e PE3\nbfd peer_r2_r3 bind peer-ip 3.3.3.3 source-ip 2.2.2.2\n discriminator local 23\n discriminator remote 32\n\n# cria o e-trunk23 entre os roteadores\ne-trunk 23\n priority 5\n peer-address 3.3.3.3 source-address 2.2.2.2\n timer hold-on-failure multiplier 30\n security-key cipher %^%#tv.DQ.!Y,C7ga=SnUvtMsT84Xld,eBTM\\\\6fSq#2%^%#\n e-trunk track bfd-session session-name peer_r2_r3\n authentication-mode enhanced-hmac-sha256\n description PE2_to_PE3\n\n# associa o e-trunk ao Eth-Trunk, formando assim o MLAG\ninterface Eth-Trunk23\n e-trunk 23\n\n# finalmente, configura o endere\u00e7amento IP, mac e adiciona no OSPF a interface\ninterface Eth-Trunk23\n ip address 10.23.23.1 255.255.255.252\n ospf enable 1 area 0.0.0.0\n mac-address 00e0-beba-cafe<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">PE3 &#8211; Core Layer<\/h2>\n\n\n\n<p>PE3&#8217;s CORE configurations are similar to those of PE1.<\/p>\n\n\n\n<p><strong>VPLS services<\/strong><\/p>\n\n\n\n<p>Unlike PE1 and PE2, which have an MLAG with the CE, in this case PE3xCE2 communication takes place directly on the physical interface with vlan 10. The VPLS settings remain the same, the difference is in the peers, which close the VPLS with PE1 and PE2 at the same time. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cria o VPLS e adiciona os PE1 e PE2\nvsi VPLS-1 static\n pwsignal ldp\n  vsi-id 1\n  mac-withdraw enable\n  interface-status-change mac-withdraw enable\n  peer 1.1.1.1\n  peer 2.2.2.2\n ignore-ac-state\n \n# habilita a interface com o CE2\ninterface Ethernet3\/0\/3\n description to_CE2\n undo shutdown\n\n# cria a interface vlan 10 e associa ao VPLS\ninterface Ethernet3\/0\/3.10\n vlan-type dot1q 10\n l2 binding vsi VPLS-1<\/code><\/pre>\n\n\n\n<p><strong>Redundant Gateway Services<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># configura os parametros de system-id e prioridade do e-trunk\nlacp e-trunk system-id 00e0-beba-cafe\nlacp e-trunk priority 1\n\n# cria o LAG Eth-Trunk23\ninterface Eth-Trunk23\n mode lacp-static\n lacp timeout fast\n\n# adiciona a interface ao LAG\ninterface Ethernet3\/0\/4\n description to_CE3\n eth-trunk 23\n\n# cria a sessao BFD entre o PE2 e PE3\nbfd peer_r3_r2 bind peer-ip 2.2.2.2 source-ip 3.3.3.3\n discriminator local 32\n discriminator remote 23\n\n# cria o e-trunk23 entre os roteadores\ne-trunk 23\n priority 5\n peer-address 2.2.2.2 source-address 3.3.3.3\n timer hold-on-failure multiplier 30\n security-key cipher %^%#tv.DQ.!Y,C7ga=SnUvtMsT84Xld,eBTM\\\\6fSq#2%^%#\n e-trunk track bfd-session session-name peer_r2_r3\n authentication-mode enhanced-hmac-sha256\n description PE3_to_PE2\n\n# associa o e-trunk ao Eth-Trunk, formando assim o MLAG\ninterface Eth-Trunk23\n e-trunk 23\n\n# finalmente, configura o endere\u00e7amento IP, mac e adiciona no OSPF a interface\ninterface Eth-Trunk23\n ip address 10.23.23.1 255.255.255.252\n ospf enable 1 area 0.0.0.0\n mac-address 00e0-beba-cafe<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Validating configurations and redundancy<\/h2>\n\n\n\n<p><strong>MC-LAG between devices<\/strong><\/p>\n\n\n\n<p>In CE1&#8217;s view, it has two active ports in LAG bond2, the ether2 port &#8211; which talks to PE2 &#8211; being the main one. The other is ready for use, but with the flags of not forwarding traffic. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"114\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-5-1024x114.png\" alt=\"\" class=\"wp-image-16098\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-5-1024x114.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-5-300x33.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-5-768x85.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-5-1536x171.png 1536w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-5-2048x227.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>On the PE1 side, it finds Eth-Trunk1 with the UP state, but the DOWN protocol, with the cause E-TRUNK DOWN. This is because MLAG is active\/backup, so the router with the worst priority is in the backup state. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"181\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-6-1024x181.png\" alt=\"\" class=\"wp-image-16101\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-6-1024x181.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-6-300x53.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-6-768x136.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-6.png 1076w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We can see that on PE1, e-trunk is as a backup:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-7-1024x577.png\" alt=\"\" class=\"wp-image-16104\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-7-1024x577.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-7-300x169.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-7-768x433.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-7.png 1470w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p id=\"bkmrk-j%C3%A1-no-pe2%2C-vemos-a-i\">On PE2, we see the Eth-Trunk 10 interface as UP. And the Eth-trunk10.10 interface as UP. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"192\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-8-1024x192.png\" alt=\"\" class=\"wp-image-16107\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-8-1024x192.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-8-300x56.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-8-768x144.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-8.png 1036w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p id=\"bkmrk-podemos-ver-que-o-e-\">We can see that e-trunk is up, and as a master:  <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"582\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-9-1024x582.png\" alt=\"\" class=\"wp-image-16110\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-9-1024x582.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-9-300x171.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-9-768x437.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-9.png 1506w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">VPLS Service  <\/h2>\n\n\n\n<p id=\"bkmrk-para-o-teste-do-serv\">To test the VPLS service, let&#8217;s go:<\/p>\n\n\n\n<ul id=\"bkmrk-pingar-entre-os-ces-\" class=\"wp-block-list\">\n<li>ping between ECs<\/li>\n\n\n\n<li>validate which interface the traffic is passing through<\/li>\n\n\n\n<li>take down the main interface on PE2<\/li>\n\n\n\n<li>verify that the traffic immediately converged on the other link<\/li>\n<\/ul>\n\n\n\n<p id=\"bkmrk-trafego-pela-ether2%2C\">Traffic through ether2, with ping between the ECs:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"243\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-10-1024x243.png\" alt=\"\" class=\"wp-image-16113\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-10-1024x243.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-10-300x71.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-10-768x182.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-10-1536x365.png 1536w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-10-2048x487.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Dropping the access interface on PE2 (simulating a break), and at the same time checking the reconvergence:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"425\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-11-1024x425.png\" alt=\"\" class=\"wp-image-16116\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-11-1024x425.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-11-300x125.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-11-768x319.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-11-1536x638.png 1536w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-11-2048x851.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Virtually no losses! LACP\/LAG simply switched to the link from ether1 to PE1. In this case, the e-trunk was UP on PE1:  <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"604\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-12-1024x604.png\" alt=\"\" class=\"wp-image-16119\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-12-1024x604.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-12-300x177.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-12-768x453.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-12.png 1454w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Redundant gateway service<\/h2>\n\n\n\n<p id=\"bkmrk-o-servi%C3%A7o-de-gateway\">The redundant gateway service can be checked directly in CE3.<\/p>\n\n\n\n<p id=\"bkmrk-a-porta-ativa-no-ce3\">The active port on CE3 is ether2, connected to PE3:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"121\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-13-1024x121.png\" alt=\"\" class=\"wp-image-16122\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-13-1024x121.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-13-300x35.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-13-768x91.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-13-1536x181.png 1536w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-13-2048x242.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We have pinged the gateway and also the PE1 loopback. We also traceroute through PE3xPE2xPE1 (preferred path due to the cost handled in OSPF). <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"650\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-14-1024x650.png\" alt=\"\" class=\"wp-image-16125\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-14-1024x650.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-14-300x190.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-14-768x487.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-14.png 1500w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here we&#8217;ll bring down the physical interface on PE3, at the same time as a ping is run from CE2 to PE1&#8217;s loopback. And at the end we see the traceroute change. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"663\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-15-1024x663.png\" alt=\"\" class=\"wp-image-16128\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-15-1024x663.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-15-300x194.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-15-768x497.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-15-1536x994.png 1536w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-15.png 1622w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Change LACP to port ether1.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"117\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-16-1024x117.png\" alt=\"\" class=\"wp-image-16131\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-16-1024x117.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-16-300x34.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-16-768x88.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-16-1536x175.png 1536w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-16-2048x234.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Status of e-trunk in PE3 and PE2:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"601\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-17-1024x601.png\" alt=\"\" class=\"wp-image-16134\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-17-1024x601.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-17-300x176.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-17-768x450.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-17.png 1456w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-18-1024x575.png\" alt=\"\" class=\"wp-image-16137\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-18-1024x575.png 1024w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-18-300x168.png 300w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-18-768x431.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-18.png 1510w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p id=\"bkmrk-e-por-qu%C3%AA-desta-vez-\">And why wasn&#8217;t it &#8220;so&#8221; transparent this time? Why didn&#8217;t the VPLS service behave the same way? <\/p>\n\n\n\n<p id=\"bkmrk-a-resposta-est%C3%A1-em-u\">The answer lies in a new element: <strong>internal routing for the gateway block<\/strong>. For this scenario, the router that is active is the one that generates the route in OSPF: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"745\" height=\"1024\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-19-745x1024.png\" alt=\"\" class=\"wp-image-16140\" style=\"width:840px;height:auto\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-19-745x1024.png 745w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-19-218x300.png 218w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-19-768x1056.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-19-1117x1536.png 1117w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-19.png 1120w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><\/figure>\n\n\n\n<p id=\"bkmrk-o-pe3%2C-que-teve-a-in\">PE3, which has had its interface shut down, does not generate the route:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"1024\" src=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-20-746x1024.png\" alt=\"\" class=\"wp-image-16143\" style=\"width:840px;height:auto\" srcset=\"https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-20-746x1024.png 746w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-20-218x300.png 218w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-20-768x1055.png 768w, https:\/\/made4it.com.br\/wp-content\/uploads\/2025\/11\/eth-trunk-20.png 1002w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/figure>\n\n\n\n<p>So in answer, the delay is due to the fact that as well as switching LACP via e-trunk, the entire OSPF network had to recalculate the new route to the new router, adding a few seconds to the game (PE3 flooded the network with the LSA, bringing down the 10.23.23.0\/24 network, the entire network processed and recalculated the SPF, and then PE2, when reconverting the e-trunk\/lacp, generated the 10.23.23.0\/24 network again).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p id=\"bkmrk-o-mc-lag-%C3%A9-muito-%C3%BAti\">MC-LAG is very useful for ensuring the high availability not only of links, but also of devices and even POPs. It has proved viable for various types of service, both L2 and L3. Huawei&#8217;s e-trunk protocol is very light and versatile, and uses intelligent mechanisms such as BFD to make everything faster. Its big disadvantage is that we don&#8217;t have an Active\/Active MLAG, meaning that one of the circuits (or set of circuits) will always be idle.   <\/p>\n\n\n\n<p id=\"bkmrk-espero-que-tenham-go\">Did you know about MC-LAG? I hope you enjoyed the article, and if you need help, Made4it can help you. We specialize in networks with high availability and security.  <\/p>\n\n\n\n<!-- Montserrat Bold -->\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Montserrat:wght@700&#038;display=swap\" rel=\"stylesheet\"\/>\n\n<a href=\"https:\/\/wa.me\/5543984854013?text=QUERO%20TER%20ALTA%20DISPONIBILIDADE\" target=\"_blank\" rel=\"noopener\" style=\"background:#006aff;color:#ffffff;font-family:'Montserrat',Arial,Helvetica,sans-serif;font-weight:700;border:none;border-radius:20px;padding:10px 45px;display:inline-block;text-decoration:none;cursor:pointer;\">\n  I WANT HIGH AVAILABILITY\n<\/a>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to configure MC-LAG on Huawei: E-Trunk, Eth-Trunk, LACP and BFD step by step. Learn MC-LAG in Huawei, today we show you why E-Trunk (multi-chassis), when to use Eth-Trunk (aggregation), how to adjust LACP for active\/backup ports and how BFD shortens MTTR. We include recommendations for hashing in MPLS scenarios and a test script to [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":16157,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"postBodyCss":"","postBodyMargin":[],"postBodyPadding":[],"postBodyBackground":{"backgroundType":"classic","gradient":""},"footnotes":""},"categories":[530,1,296,531],"tags":[890,532,891,879,892],"class_list":["post-16149","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-huawei-en","category-nao-categorizado","category-network","category-routers","tag-config-en","tag-huawei-en","tag-mc-lag-en","tag-security-en","tag-vlan-en"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/posts\/16149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/comments?post=16149"}],"version-history":[{"count":2,"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/posts\/16149\/revisions"}],"predecessor-version":[{"id":16160,"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/posts\/16149\/revisions\/16160"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/media\/16157"}],"wp:attachment":[{"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/media?parent=16149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/categories?post=16149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/made4it.com.br\/en\/wp-json\/wp\/v2\/tags?post=16149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}