{"id":190,"date":"2023-11-29T22:53:12","date_gmt":"2023-11-29T21:53:12","guid":{"rendered":"https:\/\/mokrane-assam.com\/?p=190"},"modified":"2026-11-29T22:53:51","modified_gmt":"2026-11-29T21:53:51","slug":"adresse-mac-les-bases-apprentissage-inondation-et-port-security","status":"publish","type":"post","link":"https:\/\/mokrane-assam.com\/index.php\/2023\/11\/29\/adresse-mac-les-bases-apprentissage-inondation-et-port-security\/","title":{"rendered":"Adresse MAC \u2014 Les bases : apprentissage, inondation et port security"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Une adresse MAC ressemble \u00e0 un bout d&#8217;hexad\u00e9cimal anodin imprim\u00e9 sur une \u00e9tiquette, mais c&#8217;est le pivot de tout r\u00e9seau commut\u00e9 : c&#8217;est ainsi qu&#8217;un commutateur d\u00e9cide o\u00f9 va une trame, et c&#8217;est la surface d&#8217;attaque que vise un nombre surprenant d&#8217;exploits de niveau 2. Ce parcours va des 48 bits et de leur sens jusqu&#8217;au d\u00e9bordement de table CAM et au port security qui l&#8217;arr\u00eate.<\/p><p class=\"wp-block-paragraph\"><em>Cet article conserve volontairement les termes techniques standards en anglais (ceux que l&#8217;on retrouve dans la CLI, la documentation et les RFC). Pour ne pas vous surprendre \u00e0 l&#8217;int\u00e9rieur d&#8217;un texte en fran\u00e7ais, en voici la traduction&nbsp;:<\/em><\/p><figure class=\"mkz-gloss\" style=\"margin:20px auto;max-width:920px\"><table style=\"width:100%;border-collapse:collapse;font-family:'Segoe UI',Roboto,Arial,sans-serif;font-size:14px;border:1px solid #e2e8f0\"><thead><tr style=\"background:#17263f;color:#fff\"><th style=\"text-align:left;padding:10px 14px;border:1px solid #0f172a\">Terme (anglais)<\/th><th style=\"text-align:left;padding:10px 14px;border:1px solid #0f172a\">Sens en fran\u00e7ais<\/th><\/tr><\/thead><tbody><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>MAC address<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Adresse MAC : identifiant de niveau 2 sur 48 bits d&#8217;une interface r\u00e9seau.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>OUI (Organizationally Unique Identifier)<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Identifiant unique d&#8217;organisation : les 24 premiers bits, attribu\u00e9s au constructeur par l&#8217;IEEE.<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>NIC<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Carte r\u00e9seau ; les 24 derniers bits identifient l&#8217;interface.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>I\/G bit<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Bit individuel\/groupe : 0 = unicast, 1 = multicast\/broadcast.<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>U\/L bit<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Bit universel\/local : 0 = adresse grav\u00e9e (OUI r\u00e9elle), 1 = d\u00e9finie par logiciel.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Unicast \/ Multicast \/ Broadcast<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Vers un h\u00f4te \/ un groupe \/ tous (FF:FF:FF:FF:FF:FF).<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>CAM table \/ MAC address table<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Table d&#8217;adresses MAC : associe chaque MAC apprise \u00e0 un port.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Learning \/ Forwarding<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Apprentissage (depuis la source) \/ acheminement (vers la destination).<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Flooding<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Inondation : diffuser une trame sur tous les ports sauf celui d&#8217;entr\u00e9e.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Unknown unicast<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Unicast inconnu : destination non apprise -> inond\u00e9e.<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Aging timer<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Temporisateur de vieillissement : purge une entr\u00e9e inactive (300 s par d\u00e9faut).<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>CAM overflow<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">D\u00e9bordement de table : saturer la table MAC pour forcer l&#8217;inondation.<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Port security<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Fonction qui limite le nombre de MAC apprises par port.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Sticky<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Apprentissage \u00ab collant \u00bb : fige l&#8217;adresse l\u00e9gitime dans la configuration.<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Violation (protect \/ restrict \/ shutdown)<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Actions sur d\u00e9passement : ignorer \/ journaliser \/ d\u00e9sactiver le port.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>MAC spoofing<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Usurpation : un attaquant copie une MAC l\u00e9gitime.<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>DHCP snooping<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Construit une table de confiance MAC\/IP\/port.<\/td><\/tr><tr style=\"background:#f1f5f9\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Dynamic ARP Inspection (DAI)<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">Rejette les r\u00e9ponses ARP qui ne respectent pas cette table.<\/td><\/tr><tr style=\"background:#ffffff\"><td style=\"padding:8px 14px;border:1px solid #e2e8f0;white-space:nowrap\"><strong>Err-disable<\/strong><\/td><td style=\"padding:8px 14px;border:1px solid #e2e8f0;color:#334155\">\u00c9tat o\u00f9 un port est d\u00e9sactiv\u00e9 automatiquement apr\u00e8s une violation.<\/td><\/tr><\/tbody><\/table><\/figure><h2 class=\"wp-block-heading\">1. Ce qu&#8217;est vraiment une adresse MAC<\/h2><p class=\"wp-block-paragraph\">Une adresse MAC fait <strong>48 bits<\/strong> \u2014 six octets, \u00e9crits en hexad\u00e9cimal comme <code>00:1A:2B:3C:4D:5E<\/code>. Elle se coupe nettement en deux : les 24 premiers bits sont l&#8217;<strong>OUI<\/strong> (Organizationally Unique Identifier), attribu\u00e9 par l&#8217;IEEE \u00e0 un constructeur, et les 24 derniers sont choisis par ce constructeur pour \u00eatre uniques par appareil. Ensemble, ils sont cens\u00e9s \u00eatre uniques au monde \u2014 ce qui les rend utiles comme identit\u00e9 de niveau 2 stable, et ce qui rend puissante leur usurpation.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 200\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Structure d'une adresse MAC\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"200\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Structure d&#8217;une adresse MAC<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"100\" width=\"400\" height=\"56\" rx=\"10\" fill=\"#e0f2fe\" stroke=\"#0A66C2\"\/><text x=\"260\" y=\"128\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"13\" font-weight=\"700\">OUI \u2014 24 premiers bits<\/text><text x=\"260\" y=\"147\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">attribu\u00e9 par l&#8217;IEEE au constructeur<\/text><rect x=\"470\" y=\"100\" width=\"390\" height=\"56\" rx=\"10\" fill=\"#dcfce7\" stroke=\"#166534\"\/><text x=\"665\" y=\"128\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"13\" font-weight=\"700\">Appareil \u2014 24 derniers bits<\/text><text x=\"665\" y=\"147\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10.5\">choisis par le constructeur, uniques par carte<\/text><text x=\"460\" y=\"182\" text-anchor=\"middle\" fill=\"#64748b\" font-size=\"11\">48 bits au total \u00b7 ex. 00:1A:2B : 3C:4D:5E \u00b7 unique au monde par conception<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">2. Les deux bits cach\u00e9s dans le premier octet<\/h2><p class=\"wp-block-paragraph\">Deux bits du tout premier octet changent le sens d&#8217;une MAC. Le <strong>I\/G bit<\/strong> (bit de poids faible de l&#8217;octet 1) dit unicast (0) ou <strong>multicast\/groupe<\/strong> (1) \u2014 c&#8217;est pourquoi une adresse tout en un, <code>FF:FF:FF:FF:FF:FF<\/code>, est un broadcast. Le <strong>U\/L bit<\/strong> (deuxi\u00e8me bit de poids faible) dit si l&#8217;adresse est <strong>universelle<\/strong> \u2014 la vraie OUI grav\u00e9e \u2014 ou <strong>locale<\/strong>, c&#8217;est-\u00e0-dire pos\u00e9e par logiciel. Une MAC de t\u00e9l\u00e9phone randomis\u00e9e bascule le U\/L bit ; une MAC usurp\u00e9e aussi.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 210\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Les bits I\/G et U\/L\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"210\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Les bits I\/G et U\/L<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"90\" width=\"800\" height=\"40\" rx=\"9\" fill=\"#eef2ff\" stroke=\"#c7d2fe\"\/><text x=\"460\" y=\"115\" text-anchor=\"middle\" fill=\"#3730a3\" font-size=\"12.5\" font-weight=\"700\">Premier octet \u2014 les deux bits de poids faible portent du sens<\/text><rect x=\"120\" y=\"145\" width=\"340\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"290\" y=\"170\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"700\">I\/G bit (bit 0)<\/text><text x=\"290\" y=\"190\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">0 = unicast \u00b7 1 = multicast\/broadcast<\/text><rect x=\"480\" y=\"145\" width=\"340\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#166534\"\/><text x=\"650\" y=\"170\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"12\" font-weight=\"700\">U\/L bit (bit 1)<\/text><text x=\"650\" y=\"190\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">0 = universel (grav\u00e9) \u00b7 1 = local (logiciel)<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">3. Comment un commutateur apprend les adresses MAC<\/h2><p class=\"wp-block-paragraph\">Un commutateur n&#8217;est pas configur\u00e9 avec l&#8217;emplacement des appareils \u2014 il <strong>apprend<\/strong>. \u00c0 l&#8217;arriv\u00e9e d&#8217;une trame, il lit sa MAC <strong>source<\/strong> et note \u00ab cette MAC est sur ce port \u00bb dans la <strong>table d&#8217;adresses MAC<\/strong> (la table CAM). Il le fait pour chaque trame, en continu, donc la table refl\u00e8te qui a parl\u00e9 r\u00e9cemment et depuis o\u00f9. L&#8217;apprentissage se fait depuis la source ; l&#8217;acheminement depuis la destination \u2014 gardez ces deux id\u00e9es s\u00e9par\u00e9es et la commutation devient limpide.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 210\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Apprentissage MAC\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"210\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Apprentissage MAC<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"100\" width=\"150\" height=\"50\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"135\" y=\"130\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">H\u00f4te A<\/text><rect x=\"380\" y=\"90\" width=\"160\" height=\"70\" rx=\"10\" fill=\"#0f172a\"\/><text x=\"460\" y=\"118\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"12\" font-weight=\"700\">Commutateur<\/text><text x=\"460\" y=\"138\" text-anchor=\"middle\" fill=\"#94a3b8\" font-size=\"10\">table MAC (CAM)<\/text><line x1=\"210\" y1=\"125\" x2=\"380\" y2=\"125\" stroke=\"#166534\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><text x=\"295\" y=\"116\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"10.5\">trame, src = A<\/text><rect x=\"620\" y=\"100\" width=\"260\" height=\"50\" rx=\"10\" fill=\"#dcfce7\" stroke=\"#166534\"\/><text x=\"750\" y=\"122\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"11.5\" font-weight=\"600\">appris : A -> port 1<\/text><text x=\"750\" y=\"140\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10\">not\u00e9 depuis la MAC SOURCE<\/text><line x1=\"540\" y1=\"125\" x2=\"620\" y2=\"125\" stroke=\"#0A66C2\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><\/svg><\/figure><h2 class=\"wp-block-heading\">4. La d\u00e9cision d&#8217;acheminement<\/h2><p class=\"wp-block-paragraph\">Une fois la table construite, chaque trame d\u00e9clenche l&#8217;un de trois r\u00e9sultats selon sa <strong>destination<\/strong>. Un <strong>unicast connu<\/strong> (destination dans la table) part sur ce seul port \u2014 efficace, tout l&#8217;int\u00e9r\u00eat d&#8217;un commutateur. Un <strong>unicast inconnu<\/strong> (destination pas encore apprise) est <strong>inond\u00e9<\/strong> sur tous les ports sauf celui d&#8217;entr\u00e9e, en esp\u00e9rant que le propri\u00e9taire r\u00e9ponde et soit appris. Un <strong>broadcast ou multicast<\/strong> est inond\u00e9 par conception. L&#8217;inondation est normale \u00e0 petites doses et un signal d&#8217;alarme \u00e0 grandes doses.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 230\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"La d\u00e9cision d'acheminement\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"230\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">La d\u00e9cision d&#8217;acheminement<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"40\" y=\"90\" width=\"270\" height=\"110\" rx=\"10\" fill=\"#ecfdf5\" stroke=\"#166534\"\/><text x=\"175\" y=\"118\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"12\" font-weight=\"700\">Unicast connu<\/text><text x=\"175\" y=\"142\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10.5\">destination dans la table<\/text><text x=\"175\" y=\"162\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10.5\">-> sur un seul port<\/text><text x=\"175\" y=\"182\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"10\">efficace<\/text><rect x=\"325\" y=\"90\" width=\"270\" height=\"110\" rx=\"10\" fill=\"#fff7ed\" stroke=\"#f59e0b\"\/><text x=\"460\" y=\"118\" text-anchor=\"middle\" fill=\"#9a3412\" font-size=\"12\" font-weight=\"700\">Unicast inconnu<\/text><text x=\"460\" y=\"142\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10.5\">destination non apprise<\/text><text x=\"460\" y=\"162\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10.5\">-> inonde les autres ports<\/text><text x=\"460\" y=\"182\" text-anchor=\"middle\" fill=\"#9a3412\" font-size=\"10\">jusqu&#8217;\u00e0 r\u00e9ponse<\/text><rect x=\"610\" y=\"90\" width=\"270\" height=\"110\" rx=\"10\" fill=\"#fef2f2\" stroke=\"#C8102E\"\/><text x=\"745\" y=\"118\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"12\" font-weight=\"700\">Broadcast \/ multicast<\/text><text x=\"745\" y=\"142\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10.5\">FF:FF:&#8230; ou groupe<\/text><text x=\"745\" y=\"162\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10.5\">-> inonde par conception<\/text><text x=\"745\" y=\"182\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"10\">normal, mais born\u00e9<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">5. Le vieillissement \u2014 pourquoi la table oublie<\/h2><p class=\"wp-block-paragraph\">Les entr\u00e9es MAC ne vivent pas \u00e9ternellement. Chacune a un <strong>temporisateur de vieillissement<\/strong> (300 secondes \/ 5 minutes par d\u00e9faut sur la plupart des commutateurs) qui se r\u00e9arme chaque fois que cette MAC est revue comme source. Si un appareil se tait pendant tout l&#8217;intervalle, son entr\u00e9e est retir\u00e9e \u2014 donc une trame ult\u00e9rieure vers lui inonde jusqu&#8217;\u00e0 ce qu&#8217;il reparle. Le vieillissement garde la table \u00e0 jour et born\u00e9e ; trop agressif il cause des inondations inutiles, trop lent il garde des entr\u00e9es p\u00e9rim\u00e9es apr\u00e8s qu&#8217;un appareil a chang\u00e9 de port.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 190\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Vieillissement MAC\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"190\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Vieillissement MAC<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"95\" width=\"360\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"240\" y=\"120\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"700\">MAC revue (comme source)<\/text><text x=\"240\" y=\"140\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"10.5\">timer r\u00e9arm\u00e9 -> entr\u00e9e conserv\u00e9e<\/text><rect x=\"500\" y=\"95\" width=\"360\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#C8102E\"\/><text x=\"680\" y=\"120\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"12\" font-weight=\"700\">silence 300s (d\u00e9faut)<\/text><text x=\"680\" y=\"140\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">entr\u00e9e purg\u00e9e -> trame suivante inonde<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">6. D\u00e9bordement de table CAM \u2014 quand le commutateur \u00e9choue ouvert<\/h2><p class=\"wp-block-paragraph\">Voici le danger de niveau expert. La table MAC est finie. Un attaquant peut inonder le commutateur de trames portant des milliers de <strong>MAC sources bidon<\/strong>, remplissant compl\u00e8tement la table. Une fois pleine, le commutateur ne peut plus apprendre les vraies adresses \u2014 et pour chaque destination inconnue, il <strong>inonde<\/strong>. Le commutateur devient de fait un hub, et l&#8217;attaquant renifle le trafic destin\u00e9 aux autres. Le mode de d\u00e9faillance est \u00ab \u00e9chec ouvert \u00bb, ce qui le rend dangereux et justifie l&#8217;existence du port security.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 210\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Attaque par d\u00e9bordement de table CAM\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"210\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Attaque par d\u00e9bordement de table CAM<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"80\" y=\"95\" width=\"200\" height=\"56\" rx=\"10\" fill=\"#fef2f2\" stroke=\"#C8102E\"\/><text x=\"180\" y=\"120\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"12\" font-weight=\"700\">Attaquant<\/text><text x=\"180\" y=\"140\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">inonde de MAC sources bidon<\/text><rect x=\"360\" y=\"90\" width=\"200\" height=\"66\" rx=\"10\" fill=\"#0f172a\"\/><text x=\"460\" y=\"116\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"12\" font-weight=\"700\">table MAC PLEINE<\/text><text x=\"460\" y=\"138\" text-anchor=\"middle\" fill=\"#fca5a5\" font-size=\"10\">ne peut plus apprendre<\/text><rect x=\"640\" y=\"95\" width=\"200\" height=\"56\" rx=\"10\" fill=\"#fff7ed\" stroke=\"#f59e0b\"\/><text x=\"740\" y=\"120\" text-anchor=\"middle\" fill=\"#9a3412\" font-size=\"12\" font-weight=\"700\">inonde tout<\/text><text x=\"740\" y=\"140\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">l&#8217;attaquant renifle le tout<\/text><line x1=\"280\" y1=\"123\" x2=\"360\" y2=\"123\" stroke=\"#C8102E\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><line x1=\"560\" y1=\"123\" x2=\"640\" y2=\"123\" stroke=\"#f59e0b\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><\/svg><\/figure><h2 class=\"wp-block-heading\">7. Port security \u2014 borner ce qu&#8217;un port apprend<\/h2><p class=\"wp-block-paragraph\">Le <strong>port security<\/strong> est la r\u00e9ponse directe au d\u00e9bordement CAM et aux appareils pirates. Il plafonne combien de MAC un port peut apprendre (souvent 1 pour un port d&#8217;acc\u00e8s), et peut <strong>apprendre en \u00ab sticky \u00bb<\/strong> l&#8217;adresse l\u00e9gitime pour qu&#8217;elle survive \u00e0 un red\u00e9marrage. Au d\u00e9passement de la limite, une <strong>action de violation<\/strong> configurable se d\u00e9clenche : <em>protect<\/em> ignore silencieusement l&#8217;exc\u00e8s, <em>restrict<\/em> l&#8217;ignore et le journalise, <em>shutdown<\/em> d\u00e9sactive enti\u00e8rement le port. Sur les ports d&#8217;acc\u00e8s utilisateurs, shutdown est le d\u00e9faut s\u00fbr.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 210\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Actions du port security\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"210\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Actions du port security<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"30\" y=\"90\" width=\"270\" height=\"90\" rx=\"10\" fill=\"#e0f2fe\" stroke=\"#0A66C2\"\/><text x=\"165\" y=\"118\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"700\">Max MAC + sticky<\/text><text x=\"165\" y=\"140\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">plafonne le nombre (souvent 1)<\/text><text x=\"165\" y=\"158\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">fige l&#8217;adresse l\u00e9gitime<\/text><rect x=\"325\" y=\"90\" width=\"270\" height=\"90\" rx=\"10\" fill=\"#fff7ed\" stroke=\"#f59e0b\"\/><text x=\"460\" y=\"118\" text-anchor=\"middle\" fill=\"#9a3412\" font-size=\"12\" font-weight=\"700\">protect \/ restrict<\/text><text x=\"460\" y=\"140\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">ignore l&#8217;exc\u00e8s (silencieux \/ journalis\u00e9)<\/text><text x=\"460\" y=\"158\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">garde le port actif<\/text><rect x=\"620\" y=\"90\" width=\"270\" height=\"90\" rx=\"10\" fill=\"#fef2f2\" stroke=\"#C8102E\"\/><text x=\"755\" y=\"118\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"12\" font-weight=\"700\">shutdown<\/text><text x=\"755\" y=\"140\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">d\u00e9sactive le port (err-disable)<\/text><text x=\"755\" y=\"158\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">d\u00e9faut s\u00fbr en acc\u00e8s<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">8. L&#8217;usurpation de MAC, et les d\u00e9fenses autour<\/h2><p class=\"wp-block-paragraph\">Parce qu&#8217;une MAC n&#8217;est qu&#8217;une valeur que le logiciel peut poser, un attaquant peut <strong>usurper<\/strong> l&#8217;adresse d&#8217;un appareil l\u00e9gitime pour contourner des filtres ou intercepter son trafic. Le port security \u00e9l\u00e8ve la barre, mais la d\u00e9fense compl\u00e8te est une pile : le <strong>DHCP snooping<\/strong> construit une carte de confiance de quelle MAC\/IP est sur quel port, et la <strong>Dynamic ARP Inspection<\/strong> rejette ensuite les r\u00e9ponses ARP qui ne correspondent pas \u00e0 cette carte \u2014 comblant l&#8217;\u00e9cart entre une MAC usurp\u00e9e et l&#8217;IP qu&#8217;elle tente de revendiquer. L&#8217;identit\u00e9 MAC seule n&#8217;est jamais un contr\u00f4le de s\u00e9curit\u00e9 ; c&#8217;est un identifiant que les fonctions environnantes doivent valider.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 200\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Usurpation de MAC et d\u00e9fenses\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"200\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Usurpation de MAC et d\u00e9fenses<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"95\" width=\"240\" height=\"70\" rx=\"10\" fill=\"#fef2f2\" stroke=\"#C8102E\"\/><text x=\"180\" y=\"124\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"12\" font-weight=\"700\">Usurpation de MAC<\/text><text x=\"180\" y=\"146\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">l&#8217;attaquant copie une MAC<\/text><rect x=\"340\" y=\"95\" width=\"240\" height=\"70\" rx=\"10\" fill=\"#e0f2fe\" stroke=\"#0A66C2\"\/><text x=\"460\" y=\"124\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"700\">DHCP snooping<\/text><text x=\"460\" y=\"146\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">carte de confiance MAC\/IP\/port<\/text><rect x=\"620\" y=\"95\" width=\"240\" height=\"70\" rx=\"10\" fill=\"#ecfdf5\" stroke=\"#166534\"\/><text x=\"740\" y=\"124\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"12\" font-weight=\"700\">Dynamic ARP Inspection<\/text><text x=\"740\" y=\"146\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">rejette l&#8217;ARP qui casse la carte<\/text><line x1=\"300\" y1=\"130\" x2=\"340\" y2=\"130\" stroke=\"#64748b\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><line x1=\"580\" y1=\"130\" x2=\"620\" y2=\"130\" stroke=\"#64748b\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><\/svg><\/figure><h2 class=\"wp-block-heading\">\u00c0 retenir<\/h2><p class=\"wp-block-paragraph\">Une adresse MAC fait 48 bits \u2014 OUI du constructeur plus identifiant d&#8217;appareil, avec deux bits porteurs de sens \u2014 et tout le commutateur repose sur l&#8217;apprentissage depuis la source et l&#8217;acheminement vers la destination, avec le vieillissement pour rester \u00e0 jour. Tout ce qui est risqu\u00e9 en d\u00e9coule d&#8217;un fait : la table est finie et l&#8217;identit\u00e9 est falsifiable, donc le port security, le DHCP snooping et la Dynamic ARP Inspection sont les couches qui rendent le niveau 2 digne de confiance.<\/p>","protected":false},"excerpt":{"rendered":"<p>Une adresse MAC ressemble \u00e0 un bout d&#8217;hexad\u00e9cimal anodin imprim\u00e9 sur une \u00e9tiquette, mais c&#8217;est le pivot de tout r\u00e9seau commut\u00e9 : c&#8217;est ainsi qu&#8217;un commutateur d\u00e9cide o\u00f9 va une trame, et c&#8217;est la surface d&#8217;attaque que vise un nombre surprenant d&#8217;exploits de niveau 2. Ce parcours va des 48 bits et de leur sens<\/p><\/div>\n<div class=\"blog-btn\"><a href=\"https:\/\/mokrane-assam.com\/index.php\/2023\/11\/29\/adresse-mac-les-bases-apprentissage-inondation-et-port-security\/\" class=\"home-blog-btn\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-basic"],"_links":{"self":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":1,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":191,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts\/190\/revisions\/191"}],"wp:attachment":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}