{"id":1128,"date":"2019-12-15T09:04:16","date_gmt":"2019-12-15T08:04:16","guid":{"rendered":"http:\/\/blogperso.union31.fr\/?p=1128"},"modified":"2019-12-21T12:02:11","modified_gmt":"2019-12-21T11:02:11","slug":"packet-tracer-demarrage","status":"publish","type":"post","link":"https:\/\/blogperso.union31.fr\/?p=1128","title":{"rendered":"Packet tracer : d\u00e9marrage avec un switch"},"content":{"rendered":"\n<p>Commandes initiales pour configurer un switch cisco ou le manager<\/p>\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=1128\/#I_Premiere_connexion\" >I Premi\u00e8re connexion<\/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=1128\/#II_Premiere_modification_dun_switch_changement_du_nom_du_switch\" >II Premi\u00e8re modification d&rsquo;un switch : changement du nom du switch<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blogperso.union31.fr\/?p=1128\/#III_Sauvegarde_et_redemarrage\" >III Sauvegarde et red\u00e9marrage<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blogperso.union31.fr\/?p=1128\/#IV_Reinitialiser_la_configuration_du_switch\" >IV R\u00e9initialiser la configuration du switch<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"I_Premiere_connexion\"><\/span>I Premi\u00e8re connexion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Pour connaitre les commandes ou sous commandes\/param\u00e8tres il faut utiliser le \u00ab\u00a0?\u00a0\u00bb. Exemple \u00e0 la premi\u00e8re connexion sur un switch :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch>?\nExec commands:\n  connect     Open a terminal connection\n  disable     Turn off privileged commands\n  disconnect  Disconnect an existing network connection\n  enable      Turn on privileged commands\n  exit        Exit from the EXEC\n  logout      Exit from the EXEC\n  ping        Send echo messages\n  resume      Resume an active network connection\n  show        Show running system information\n  telnet      Open a telnet connection\n  terminal    Set terminal line parameters\n  traceroute  Trace route to destination<\/code><\/pre>\n\n\n\n<p>Ainsi pour connaitre les possibilit\u00e9s de la commande show :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch>show ?\n  arp                Arp table\n  cdp                CDP information\n  clock              Display the system clock\n  crypto             Encryption module\n  dtp                DTP information\n  etherchannel       EtherChannel information\n  flash:             display information about flash: file system\n  history            Display the session command history\n  interfaces         Interface status and configuration\n  ip                 IP information\n  lldp               LLDP information\n  mac                MAC configuration\n  mac-address-table  MAC forwarding table\n...<\/code><\/pre>\n\n\n\n<p>Et ainsi de suite : show vlan &#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch>show vlan ?\n  brief  VTP all VLAN status in brief\n  id     VTP VLAN status by VLAN id\n  name   VTP VLAN status by VLAN name\n  &lt;cr><\/code><\/pre>\n\n\n\n<p>Ce qui donne au passage :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch>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<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"II_Premiere_modification_dun_switch_changement_du_nom_du_switch\"><\/span>II Premi\u00e8re modification d&rsquo;un switch : changement du nom du switch<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Au d\u00e9marrage, les commandes disponibles ne permettent pas de modifier les caract\u00e9ristiques du switch. Pour cela il faut passer dans un mode qui donne plus de privil\u00e8ges. Ainsi il faut utiliser la commande \u00ab\u00a0enable\u00a0\u00bb :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch>enable\nSwitch#?\nExec commands:\n  clear       Reset functions\n  clock       Manage the system clock\n  configure   Enter configuration mode\n  connect     Open a terminal connection\n  copy        Copy from one file to another\n  debug       Debugging functions (see also 'undebug')\n  delete      Delete a file\n  dir         List files on a filesystem\n  disable     Turn off privileged commands\n  disconnect  Disconnect an existing network connection\n  enable      Turn on privileged commands\n  erase       Erase a filesystem\n  exit        Exit from the EXEC\n  logout      Exit from the EXEC\n  more        Display the contents of a file\n  no          Disable debugging informations\n  ping        Send echo messages\n  reload      Halt and perform a cold restart\n  resume      Resume an active network connection\n  setup       Run the SETUP command facility\n  show        Show running system information\n --More-- <\/code><\/pre>\n\n\n\n<p>Un \u00ab\u00a0#\u00a0\u00bb s&rsquo;est ajout\u00e9 au nom du swicth. Cela indique que les commandes \u00ab\u00a0\u00e0 privil\u00e8ges\u00a0\u00bb sont disponibles.<\/p>\n\n\n\n<p>Nous allons maintenant modifier le nom du Switch. Pour cela il faut entrer dans le mode \u00ab\u00a0config terminal\u00a0\u00bb : configure terminal<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch#configure terminal \nEnter configuration commands, one per line.  End with CNTL\/Z.\nSwitch(config)#<\/code><\/pre>\n\n\n\n<p>Il est possible d&rsquo;utiliser un raccourci : conf t<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch#conf t\nEnter configuration commands, one per line.  End with CNTL\/Z.\nSwitch(config)#<\/code><\/pre>\n\n\n\n<p>Et dans ce mode, pour connaitre les commandes disponibles il faut toujours utiliser \u00ab\u00a0?\u00a0\u00bb :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch(config)#?\nConfigure commands:\n  access-list        Add an access list entry\n  banner             Define a login banner\n  boot               Boot Commands\n  cdp                Global CDP configuration subcommands\n  clock              Configure time-of-day clock\n  crypto             Encryption module\n  default            Set a command to its defaults\n  do                 To run exec commands in config mode\n  enable             Modify enable password parameters\n  end                Exit from configure mode\n  exit               Exit from configure mode\n  hostname           Set system's network name\n  interface          Select an interface to configure\n  ip                 Global IP configuration subcommands\n  line               Configure a terminal line\n  lldp               Global LLDP configuration subcommands\n  logging            Modify message logging facilities\n  mac                MAC configuration\n  mac-address-table  Configure the MAC address table\n  mls                mls global commands\n  monitor            SPAN information and configuration\n --More-- <\/code><\/pre>\n\n\n\n<p>Dans notre cas nous allons utiliser la commande hostname :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch(config)#hostname ?\n  WORD  This system's network name<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Switch(config)#hostname Mon_Switch0\nMon_Switch0(config)#<\/code><\/pre>\n\n\n\n<p>On remarque que le nom du switch \u00ab\u00a0Switch\u00a0\u00bb a bien chang\u00e9 en \u00ab\u00a0Mon_Switch0\u00a0\u00bb.<\/p>\n\n\n\n<p>Pour sortir du mode \u00ab\u00a0config\u00a0\u00bb il faut taper \u00ab\u00a0end\u00a0\u00bb ou \u00ab\u00a0exit\u00a0\u00bb :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Mon_Switch0(config)#end\nMon_Switch0#\n%SYS-5-CONFIG_I: Configured from console by console\n\nMon_Switch0#<\/code><\/pre>\n\n\n\n<p>A ce stade nous sommes revenus au mode principal. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"III_Sauvegarde_et_redemarrage\"><\/span>III Sauvegarde et red\u00e9marrage<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Mais attention car le switch est bien configur\u00e9 mais <strong>pas sauvegard\u00e9<\/strong>. Au prochain d\u00e9marrage les modification seront donc perdues. Nous allons donc sauvegarder la configuration par la commande \u00ab\u00a0write\u00a0\u00bb ou \u00ab\u00a0w\u00a0\u00bb :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Mon_Switch0#write \nBuilding configuration...\n[OK]\nMon_Switch0#<\/code><\/pre>\n\n\n\n<p>Pour tester on va red\u00e9marrer le switch : \u00ab\u00a0reload\u00a0\u00bb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Mon_Switch0#reload\nProceed with reload? [confirm]\nC2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4)\nCisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory.\n2960-24TT starting...\nBase ethernet MAC Address: 00D0.BCA9.8493\nXmodem file system is available.\nInitializing Flash...\nflashfs[0]: 2 files, 0 directories\nflashfs[0]: 0 orphaned files, 0 orphaned directories\nflashfs[0]: Total bytes: 64016384\nflashfs[0]: Bytes used: 4416006\nflashfs[0]: Bytes available: 59600378\nflashfs[0]: flashfs fsck took 1 seconds.\n...done Initializing Flash.\n\nBoot Sector Filesystem (bs:) installed, fsid: 3\nParameter Block Filesystem (pb:) installed, fsid: 4\n\n\nLoading \"flash:\/c2960-lanbase-mz.122-25.FX.bin\"...\n###########################################<\/code><\/pre>\n\n\n\n<p>Ainsi au red\u00e9marrage nous voyons bien que nos modifications sont bien pr\u00e9sentes :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Press RETURN to get started!\n\nMon_Switch0><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"IV_Reinitialiser_la_configuration_du_switch\"><\/span>IV R\u00e9initialiser la configuration du switch<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>En mode privil\u00e8ge, il faut utiliser la commande \u00ab\u00a0erase\u00a0\u00bb :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Mon_Switch0#erase startup-config \nErasing the nvram filesystem will remove all configuration files! Continue? [confirm]\n[OK]\nErase of nvram: complete\n%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram\nMon_Switch0#<\/code><\/pre>\n\n\n\n<p>Ensuite, on red\u00e9marre le switch :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Mon_Switch0#reload\nProceed with reload? [confirm]\nC2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4)\nCisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory.\n2960-24TT starting...\nBase ethernet MAC Address: 00D0.BCA9.8493\nXmodem file system is available.\nInitializing Flash...\nflashfs[0]: 2 files, 0 directories\nflashfs[0]: 0 orphaned files, 0 orphaned directories\nflashfs[0]: Total bytes: 64016384\nflashfs[0]: Bytes used: 4415537\nflashfs[0]: Bytes available: 59600847\nflashfs[0]: flashfs fsck took 1 seconds.\n...done Initializing Flash.\n\nBoot Sector Filesystem (bs:) installed, fsid: 3\nParameter Block Filesystem (pb:) installed, fsid: 4\n\n\nLoading \"flash:\/c2960-lanbase-mz.122-25.FX.bin\"...\n########################################################################## [OK]<\/code><\/pre>\n\n\n\n<p>Ainsi \u00e0 l&rsquo;invite :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Press RETURN to get started!\n\nSwitch><\/code><\/pre>\n\n\n\n<p>Le nom du switch a repris sa valeur par d\u00e9faut dans notre cas. Il restera n\u00e9anmoins la d\u00e9finition des vlan (fichier vlan.dat) qui reste. Il faudra l&rsquo;effacer manuellement.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Commandes initiales pour configurer un switch cisco ou le manager I Premi\u00e8re connexion Pour connaitre les commandes ou sous commandes\/param\u00e8tres il faut utiliser le \u00ab\u00a0?\u00a0\u00bb. Exemple \u00e0 la premi\u00e8re connexion sur un switch : Ainsi pour connaitre les possibilit\u00e9s de<\/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-1128","post","type-post","status-publish","format-standard","hentry","category-_systeme"],"_links":{"self":[{"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/posts\/1128","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=1128"}],"version-history":[{"count":19,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions"}],"predecessor-version":[{"id":1214,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions\/1214"}],"wp:attachment":[{"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogperso.union31.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}