{"id":1148,"date":"2019-12-15T10:38:55","date_gmt":"2019-12-15T09:38:55","guid":{"rendered":"http:\/\/blogperso.union31.fr\/?p=1148"},"modified":"2019-12-21T08:55:01","modified_gmt":"2019-12-21T07:55:01","slug":"packet-tracer-1ere-configuration-dun-switch","status":"publish","type":"post","link":"https:\/\/blogperso.union31.fr\/?p=1148","title":{"rendered":"Packet tracer : 1\u00e8re configuration d&rsquo;un switch"},"content":{"rendered":"\n<p>Il sera abord\u00e9 :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>la configuration de VLAN<\/li><li>l\u2019affectation de ports (nomm\u00e9es interfaces) \u00e0 un VLAN<\/li><li>l&rsquo;activation ou la d\u00e9sactivation des ports (interfaces)<\/li><li>L\u2019agr\u00e9gation de liens ou port channel<\/li><\/ul>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Sommaire<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#I_Visualiser_la_configuration_VLAN\" >I Visualiser la configuration VLAN<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#II_Premiere_configuration\" >II Premi\u00e8re configuration<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#II1_blocage_des_ports\" >II.1 blocage des ports<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#II2_Affection_de_2_ports_a_un_VLAN_specifique\" >II.2 Affection de 2 ports \u00e0 un VLAN sp\u00e9cifique<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#II3_Affection_des_autres_ports_a_un_autre_VLAN\" >II.3 Affection des autres ports \u00e0 un autre VLAN<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#III_Lagregation_de_liens_ou_port-channel\" >III L\u2019agr\u00e9gation de liens ou port-channel<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#III1_Creation_de_lagregation\" >III.1 Cr\u00e9ation de l&rsquo;agr\u00e9gation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#III2_Definition_du_trunk_sur_le_%C2%AB_port_channel_1_%C2%BB\" >III.2 D\u00e9finition du trunk sur le \u00ab\u00a0port channel 1\u00a0\u00bb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/blogperso.union31.fr\/?p=1148\/#III3_Verification\" >III.3 V\u00e9rification<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"I_Visualiser_la_configuration_VLAN\"><\/span>I Visualiser la configuration VLAN<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Pour visualiser les VLAN configur\u00e9s il faut utiliser la commande \u00ab\u00a0show vlan\u00a0\u00bb :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show vlan brief\n\nVLAN Name                             Status    Ports\n---- -------------------------------- --------- -------------------------------\n1    default                          active    Fa0\/1, Fa0\/2, Fa0\/3, Fa0\/4\n                                                Fa0\/5, Fa0\/6, Fa0\/7, Fa0\/8\n                                                Fa0\/9, Fa0\/10, Fa0\/11, Fa0\/12\n                                                Fa0\/13, Fa0\/14, Fa0\/15, Fa0\/16\n                                                Fa0\/17, Fa0\/18, Fa0\/19, Fa0\/20\n                                                Fa0\/21, Fa0\/22, Fa0\/23, Fa0\/24\n                                                Gig0\/1, Gig0\/2\n1002 fddi-default                     active    \n1003 token-ring-default               active    \n1004 fddinet-default                  active    \n1005 trnet-default                    active<\/code><\/pre>\n\n\n\n<p>Ainsi on remarque que la VLAN n\u00b01 contient par d\u00e9faut tous les ports du switch.<\/p>\n\n\n\n<p>Un port est nomm\u00e9 Fa0\/1, FA0\/2, etc&#8230; FA pour FastEthernet et 0\/1, 0\/2 &#8230; pour l&#8217;emplacement physique du port.<\/p>\n\n\n\n<p>Ainsi ce swicth poss\u00e8de :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>24 ports Ethernet<\/li><li>2 ports en Giga Ethernet<\/li><\/ul>\n\n\n\n<p>Et pour avoir un \u00e9tat des ports g\u00e9n\u00e9ral : show interfaces status<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show interfaces status\nPort      Name               Status       Vlan       Duplex  Speed Type\nFa0\/1                        connected    1          auto    auto  10\/100BaseTX\nFa0\/2                        connected    1          auto    auto  10\/100BaseTX\nFa0\/3                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/4                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/5                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/6                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/7                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/8                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/9                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/10                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/11                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/12                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/13                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/14                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/15                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/16                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/17                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/18                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/19                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/20                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/21                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/22                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/23                       notconnect   1          auto    auto  10\/100BaseTX\nFa0\/24                       notconnect   1          auto    auto  10\/100BaseTX\nGig0\/1                       connected    1          auto    auto  10\/100BaseTX\nGig0\/2                       connected    1          auto    auto  10\/100BaseTX\n<\/code><\/pre>\n\n\n\n<p>Donc en premi\u00e8re conclusion : le switch est utilisable sans configuration particuli\u00e8re. Tous les ports sont dans le VLAN 1 et communique entre eux.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"II_Premiere_configuration\"><\/span>II Premi\u00e8re configuration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Afin de maitriser la s\u00e9curit\u00e9 de son switch nous allons :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>d\u00e9sactiver tous les ports ;<\/li><li>cr\u00e9er un vlan d\u00e9di\u00e9 au PC de travail qui se nommera \u00ab\u00a0clients\u00a0\u00bb. Ensuite nous y affecterons 2 ports ;<\/li><li>cr\u00e9er un vlan de \u00ab\u00a0stockage\u00a0\u00bb autre que le VLAN 1.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"II1_blocage_des_ports\"><\/span>II.1 blocage des ports<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Blocage d&rsquo;un port :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01>enable\nSwitch_01#configure terminal\nEnter configuration commands, one per line.  End with CNTL\/Z.\nSwitch_01(config)#interface fastEthernet 0\/1\nSwitch_01(config-if)#<\/code><\/pre>\n\n\n\n<p>A ce stade nous sommes dans le mode de configuration d&rsquo;un port (ici le port FA0\/1)<\/p>\n\n\n\n<p>Les commandes disponibles sont les suivantes :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01(config-if)#?\n  cdp               Global CDP configuration subcommands\n  channel-group     Etherchannel\/port bundling configuration\n  channel-protocol  Select the channel protocol (LACP, PAgP)\n  description       Interface specific description\n  duplex            Configure duplex operation.\n  exit              Exit from interface configuration mode\n  ip                Interface Internet Protocol config commands\n  lldp              LLDP interface subcommands\n  mdix              Set Media Dependent Interface with Crossover\n  mls               mls interface commands\n  no                Negate a command or set its defaults\n  shutdown          Shutdown the selected interface\n  spanning-tree     Spanning Tree Subsystem\n  speed             Configure speed operation.\n  storm-control     storm configuration\n  switchport        Set switching mode characteristics\n  tx-ring-limit     Configure PA level transmit ring limit<\/code><\/pre>\n\n\n\n<p>Pour ne plus rendre utilisable le port FA0\/1 on utilisera la commande \u00ab\u00a0shutdown\u00a0\u00bb : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01(config-if)#shutdown\nSwitch_01(config-if)#end<\/code><\/pre>\n\n\n\n<p>V\u00e9rification :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show interfaces status\nPort      Name               Status       Vlan       Duplex  Speed Type\nFa0\/1                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/2                        connected    1          auto    auto  10\/100BaseTX\nFa0\/3                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/4                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/5                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/6                        notconnect   1          auto    auto  10\/100BaseTX\nFa0\/7                        notconnect   1          auto    auto  10\/100BaseTX\n...<\/code><\/pre>\n\n\n\n<p>Le port FA01 est bien d\u00e9sactiv\u00e9. Le PC branch\u00e9 dessus ne peux plus communiquer.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Pour pouvoir bloquer tous les ports en une seule fois il faudra utiliser la commande \u00ab\u00a0range\u00a0\u00bb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#conf t\nSwitch_01(config)# interface range FastEthernet 0\/1 - 24\nSwitch_01(config-if-range)#<\/code><\/pre>\n\n\n\n<p>A ce stade tous les ports de FA0\/1 \u00e0 FA0\/24 ont \u00e9t\u00e9 s\u00e9lectionn\u00e9s. Nous allons maintenant les d\u00e9sactiver : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01(config-if-range)#shutdown<\/code><\/pre>\n\n\n\n<p>V\u00e9rification :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01# show interfaces status \nPort      Name               Status       Vlan       Duplex  Speed Type\nFa0\/1                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/2                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/3                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/4                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/5                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/6                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/7                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/8                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/9                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/10                       disabled 1          auto    auto  10\/100BaseTX\n...<\/code><\/pre>\n\n\n\n<p>A ce stade tous les ports FastEthernet ne sont plus utilisables.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"II2_Affection_de_2_ports_a_un_VLAN_specifique\"><\/span>II.2 Affection de 2 ports \u00e0 un VLAN sp\u00e9cifique<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Avant d&rsquo;affecter un port \u00e0 un VLAN, il faut le cr\u00e9er. Il portera le num\u00e9ro (id) 20 et on le nommera \u00ab\u00a0clients\u00a0\u00bb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#configure terminal \nEnter configuration commands, one per line.  End with CNTL\/Z.\nSwitch_01(config)#vlan 20\nSwitch_01(config-vlan)#name \"Clients\"\nSwitch_01(config-vlan)#end<\/code><\/pre>\n\n\n\n<p>V\u00e9rification : show vlan brief<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01# show vlan brief\n\nVLAN Name                             Status    Ports\n---- -------------------------------- --------- -------------------------------\n1    default                          active    Fa0\/1, Fa0\/2, Fa0\/3, Fa0\/4\n                                                Fa0\/5, Fa0\/6, Fa0\/7, Fa0\/8\n                                                Fa0\/9, Fa0\/10, Fa0\/11, Fa0\/12\n                                                Fa0\/13, Fa0\/14, Fa0\/15, Fa0\/16\n                                                Fa0\/17, Fa0\/18, Fa0\/19, Fa0\/20\n                                                Fa0\/21, Fa0\/22, Fa0\/23, Fa0\/24\n                                                Gig0\/1, Gig0\/2\n20   Clients                          active    \n1002 fddi-default                     active    \n1003 token-ring-default               active    \n1004 fddinet-default                  active    \n1005 trnet-default                    active   <\/code><\/pre>\n\n\n\n<p>Le VLAN 20 est bien cr\u00e9\u00e9.<\/p>\n\n\n\n<p>Nous allons maintenant associ\u00e9 les 2 premiers ports au VLAN 20. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#configure terminal \nSwitch_01(config)#interface range fastEthernet 0\/1 - 2\nSwitch_01(config-if-range)#switchport ?\n  access         Set access mode characteristics of the interface\n  mode           Set trunking mode of the interface\n  nonegotiate    Device will not engage in negotiation protocol on this\n                 interface\n  port-security  Security related command\n  priority       Set appliance 802.1p priority\n  protected      Configure an interface to be a protected port\n  trunk          Set trunking characteristics of the interface\n  voice          Voice appliance attributes\nSwitch_01(config-if-range)#switchport access vlan 20\nSwitch_01(config-if-range)#end\nSwitch_01#<\/code><\/pre>\n\n\n\n<p>A ce stade les ports sont dans le VLAN 20 mais non utilisables :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show vlan brief\n\nVLAN Name                             Status    Ports\n---- -------------------------------- --------- -------------------------------\n1    default                          active    Fa0\/3, Fa0\/4, Fa0\/5, Fa0\/6\n                                                Fa0\/7, Fa0\/8, Fa0\/9, Fa0\/10\n                                                Fa0\/11, Fa0\/12, Fa0\/13, Fa0\/14\n                                                Fa0\/15, Fa0\/16, Fa0\/17, Fa0\/18\n                                                Fa0\/19, Fa0\/20, Fa0\/21, Fa0\/22\n                                                Fa0\/23, Fa0\/24, Gig0\/1, Gig0\/2\n20   Clients                          active    Fa0\/1, Fa0\/2\n1002 fddi-default                     active    \n1003 token-ring-default               active    \n1004 fddinet-default                  active    \n1005 trnet-default                    active    \n\nSwitch_01#show interfaces status \nPort      Name               Status       Vlan       Duplex  Speed Type\nFa0\/1                        disabled 20         auto    auto  10\/100BaseTX\nFa0\/2                        disabled 20         auto    auto  10\/100BaseTX\nFa0\/3                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/4                        disabled 1          auto    auto  10\/100BaseTX\n...<\/code><\/pre>\n\n\n\n<p>Il ne reste plus qu&rsquo;\u00e0 activer les 2 ports :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#conf t\nSwitch_01(config)#interface range FastEthernet 0\/1 -2\nSwitch_01(config-if-range)#end<\/code><\/pre>\n\n\n\n<p>Apr\u00e8s v\u00e9rification :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show interfaces status \nPort      Name               Status       Vlan       Duplex  Speed Type\nFa0\/1                        connected    20         auto    auto  10\/100BaseTX\nFa0\/2                        connected    20         auto    auto  10\/100BaseTX\nFa0\/3                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/4                        disabled 1          auto    auto  10\/100BaseTX\nFa0\/5                        disabled 1          auto    auto  10\/100BaseTX<\/code><\/pre>\n\n\n\n<p>A ce stade tous les ports sont bloqu\u00e9s sauf 2 qui sont dans le VLAN 20.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"II3_Affection_des_autres_ports_a_un_autre_VLAN\"><\/span>II.3 Affection des autres ports \u00e0 un autre VLAN <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Maintenant nous allons cr\u00e9er un VLAN 30 nomm\u00e9 inactifs et nous y associerons les ports FA non utilis\u00e9s.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#conf t\nEnter configuration commands, one per line.  End with CNTL\/Z.\nSwitch_01(config)#vlan 30\nSwitch_01(config-vlan)#name \"inactifs\"\nSwitch_01(config-vlan)#exit\nSwitch_01(config)#interface range fastEthernet 0\/3 -24\nSwitch_01(config-if-range)#switchport access vlan 30\nSwitch_01(config-if-range)#exit\nSwitch_01(config)#exit\nSwitch_01#<\/code><\/pre>\n\n\n\n<p>V\u00e9rification :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show vlan brief\n\nVLAN Name                             Status    Ports\n---- -------------------------------- --------- -------------------------------\n1    default                          active    Gig0\/1, Gig0\/2\n20   Clients                          active    Fa0\/1, Fa0\/2\n30   inactifs                         active    Fa0\/3, Fa0\/4, Fa0\/5, Fa0\/6\n                                                Fa0\/7, Fa0\/8, Fa0\/9, Fa0\/10\n                                                Fa0\/11, Fa0\/12, Fa0\/13, Fa0\/14\n                                                Fa0\/15, Fa0\/16, Fa0\/17, Fa0\/18\n                                                Fa0\/19, Fa0\/20, Fa0\/21, Fa0\/22\n                                                Fa0\/23, Fa0\/24\n1002 fddi-default                     active    \n1003 token-ring-default               active    \n1004 fddinet-default                  active    \n1005 trnet-default                    active    \nSwitch_01#<\/code><\/pre>\n\n\n\n<p>Au final nous avons :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>tous les ports non utilis\u00e9s qui sont bloqu\u00e9s et rang\u00e9s dans le VLAN 30, nomm\u00e9 \u00ab\u00a0inactifs\u00a0\u00bb<\/li><li>Les ports branch\u00e9s associ\u00e9s au VLAN \u00ab\u00a0clients\u00a0\u00bb et qui sont activ\u00e9s.<\/li><\/ul>\n\n\n\n<p>Il reste les ports Gigabit \u00e0 g\u00e9rer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"III_Lagregation_de_liens_ou_port-channel\"><\/span>III L\u2019agr\u00e9gation de liens ou port-channel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Cela permet d&rsquo;utiliser plusieurs ports ou c\u00e2bles r\u00e9seaux qui seront vu comme un seul. C&rsquo;est utilis\u00e9 soit pour augmenter la bande passante soit dans le cadre de le redondance en cas de panne (coupure c\u00e2ble).<\/p>\n\n\n\n<p> Dans notre cas nous allons utiliser 2 switchs :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>switch_01<\/li><li>switch_02<\/li><\/ul>\n\n\n\n<p>Les ports Gig0\/1 et Gig0\/2 du switch_01 seront connect\u00e9s respectivement sur les m\u00eames port du switch_02<\/p>\n\n\n\n<p>Enfin une fois l&rsquo;agr\u00e9gation r\u00e9alis\u00e9e, elle devra supporter le mode \u00ab\u00a0trunk\u00a0\u00bb pour permettre la communication des vlans entre les 2 switchs<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"III1_Creation_de_lagregation\"><\/span>III.1 Cr\u00e9ation de l&rsquo;agr\u00e9gation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Les \u00e9tapes sont les suivantes :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>s\u00e9lection des ports : ici ce sera les 2 ports en gigabit<\/li><li>cr\u00e9ation d&rsquo;un channel group \u00ab\u00a01\u00a0\u00bb et d\u00e9finition du type de fonctionnement (mode active)<\/li><li>d\u00e9finition du protocole \u00e0 utiliser (LACP)<\/li><\/ul>\n\n\n\n<p>Ce qui donne :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#conf t\nSwitch_01(config)#interface range gigabitEthernet 0\/1 -2\nSwitch_01(config-if-range)#channel-group 1 mode active\nSwitch_01(config-if-range)#\nCreating a port-channel interface Port-channel 1\nSwitch_01(config-if-range)#channel-protocol lacp\nSwitch_01(config-if-range)#exit<\/code><\/pre>\n\n\n\n<p>A faire sur l&rsquo;autre switch.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"III2_Definition_du_trunk_sur_le_%C2%AB_port_channel_1_%C2%BB\"><\/span>III.2 D\u00e9finition du trunk sur le \u00ab\u00a0port channel 1\u00a0\u00bb<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>L&rsquo;agr\u00e9gation est faite sur les 2 swicths. Il faut maintenant faire passer les vlan. C&rsquo;est au niveau de l&rsquo;interface \u00ab\u00a0port-channel 1\u00a0\u00bb que cela va se faire.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01(config)#interface port-channel 1\nSwitch_01(config-if)#switchport mode trunk\nSwitch_01(config-if)#no shutdown\nSwitch_01(config-if)#exit<\/code><\/pre>\n\n\n\n<p>A faire sur le Switch_02<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"III3_Verification\"><\/span>III.3 V\u00e9rification<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>En listant les vlan, on s&rsquo;apercoit que les ports gigabits ont disparu du Vlan 1 :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show vlan brief\n\nVLAN Name                             Status    Ports\n---- -------------------------------- --------- -------------------------------\n1    default                          active    \n20   Clients                          active    Fa0\/1, Fa0\/2\n30   inactifs                         active    Fa0\/3, Fa0\/4, Fa0\/5, Fa0\/6\n                                                Fa0\/7, Fa0\/8, Fa0\/9, Fa0\/10\n                                                Fa0\/11, Fa0\/12, Fa0\/13, Fa0\/14\n                                                Fa0\/15, Fa0\/16, Fa0\/17, Fa0\/18\n                                                Fa0\/19, Fa0\/20, Fa0\/21, Fa0\/22\n                                                Fa0\/23, Fa0\/24\n1002 fddi-default                     active    \n1003 token-ring-default               active    \n1004 fddinet-default                  active    \n1005 trnet-default                    active    <\/code><\/pre>\n\n\n\n<p>Pour voir la liste des groupes il faut lancer la commande suivante :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_02#show etherchannel summary \nFlags:  D - down        P - in port-channel\n        I - stand-alone s - suspended\n        H - Hot-standby (LACP only)\n        R - Layer3      S - Layer2\n        U - in use      f - failed to allocate aggregator\n        u - unsuitable for bundling\n        w - waiting to be aggregated\n        d - default port\n\n\nNumber of channel-groups in use: 1\nNumber of aggregators:           1\n\nGroup  Port-channel  Protocol    Ports\n------+-------------+-----------+----------------------------------------------\n\n1      Po1(SU)           LACP   Gig0\/1(P) Gig0\/2(P) <\/code><\/pre>\n\n\n\n<p>On remarque qu&rsquo;il y une agr\u00e9ation de liens sur les 2 ports gigabits.<\/p>\n\n\n\n<p>La commande suivante permet d&rsquo;obtenir plus de d\u00e9tails :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch_01#show etherchannel port-channel \n                Channel-group listing:\n                ----------------------\n\nGroup: 1\n----------\n                Port-channels in the group:\n                ---------------------------\n\nPort-channel: Po1    (Primary Aggregator)\n------------\n\nAge of the Port-channel   = 00d:00h:23m:42s\nLogical slot\/port   = 2\/1       Number of ports = 2\nGC                  = 0x00000000      HotStandBy port = null\nPort state          = Port-channel \nProtocol            =   LACP\nPort Security       = Disabled\n\nPorts in the Port-channel:\n\nIndex   Load   Port     EC state        No of bits\n------+------+------+------------------+-----------\n  0     00     Gig0\/2   Active             0\n  0     00     Gig0\/1   Active             0\nTime since last port bundled:    00d:00h:14m:01s    Gig0\/1<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Il sera abord\u00e9 : la configuration de VLAN l\u2019affectation de ports (nomm\u00e9es interfaces) \u00e0 un VLAN l&rsquo;activation ou la d\u00e9sactivation des ports (interfaces) L\u2019agr\u00e9gation de liens ou port channel I Visualiser la configuration VLAN Pour visualiser les VLAN configur\u00e9s il<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1148","post","type-post","status-publish","format-standard","hentry","category-_systeme"],"_links":{"self":[{"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/posts\/1148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1148"}],"version-history":[{"count":26,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/posts\/1148\/revisions"}],"predecessor-version":[{"id":1182,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/posts\/1148\/revisions\/1182"}],"wp:attachment":[{"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}