Routeur Cisco 1841 - Découverte

Liste du matériel et logiciel pour communiquer avec le routeur

  • Cable console (série): à connecter dans le port console du routeur.

  • Adaptateur USB <–> Série: pour relier le cable console à mon ordi, car celui-ci ne dispose pas de port série.

  • Pilote de l’adaptateur USB <–> Série (à installé sur mon ordinateur).

  • Emulateur de terminal: logiciel minicom (à installer sur mon ordinateur).

  • Configuration de la liaison série:

    :9600 baud rate
    :No parity
    :8 data bits
    :1 stop bit
    :No flow control
    

Note

  • Utilisation d’une machine Mac pour dialoguer avec le routeur.
  • Référence adaptateur: ES-U-1001-R10 (USB to RS232 adapter).

Connexion au routeur

Cablage

Les différents éléments étant disponibles, il reste à faire le cablage pour relier le routeur (port console) à l’ordinateur (avec minicom) en utilisant l’adaptateur Série <–> USB.

Config minicom

A la première utilisation de minicom: taper minicom -s (pour la configuration de la liason série) puis sauvegarder dans le fichier dfl (fichier par défault) puis quitter la config avec Exit.

Note

on trouve le nom du périphérique à utiliser en tapant la commande ls /dev/cu.* dans une fenêtre console.

  • Taper une première fois (sans l’adaptateur).
  • Taper une seconde fois avec l’adaptateur inséré dans le port USB. A ce moment un nouveau périphérique doit apparaître, celui qui vient d’être inséré. Dans mon cas il s’appelle: /dev/cu.usbserial-FTB3LQKN.

Trace de la commande ls /dev/cu.*

mac-book:~ laurent$ ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port     /dev/cu.SerialPort              /dev/cu.usbserial-FTB3LQKN
/dev/cu.Bluetooth-Modem             /dev/cu.SerialPort-1
mac-book:~ laurent$

Démarrage du routeur

System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2004 by cisco Systems, Inc.
PLD version 0x10
GIO ASIC version 0x127
c1841 processor with 131072 Kbytes of main memory
Main memory is configured to 64 bit mode with parity disabled


...............
...............

Cisco 1841 (revision 5.0) with 116736K/14336K bytes of memory.
Processor board ID FCZ092622PR
2 FastEthernet interfaces
2 Low-speed serial(sync/async) interfaces
DRAM configuration is 64 bits wide with parity disabled.
191K bytes of NVRAM.
31360K bytes of ATA CompactFlash (Read/Write)

Press RETURN to get started!

...............
...............

*Jan  1 00:01:13.627: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state ton
*Jan  1 00:01:13.663: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state ton
*Jan  1 00:01:13.703: %LINK-5-CHANGED: Interface Serial0/0/0, changed state to admn
*Jan  1 00:01:13.735: %LINK-5-CHANGED: Interface Serial0/0/1, changed state to admn
Routeur1>

Note

Au bout d’un certain temps le prompt du routeur apparaît Routeur1.

Quelques commandes générales

Changer le nom du routeur

Routeur1>enable
Routeur1#conf
Routeur1#configure ter
Routeur1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Routeur1(config)#hostname router1
router1(config)#

Note

Pour obtenir la commande complète, on tape son début par ex: conf, puis une tabulation ce qui complète conf en configure, puis pareil pour terminal (ter+TAB).

Warning

Pour changer le nom du routeur (2 étapes depuis le prompt initial)

  1. commande enable: passe en mode privilégié.
  2. commande configure terminal: pour passer en mode configuration.
  3. commande hostname router1: la commande pour donner au routeur le nom router1.

Trace écran:

Routeur1>enable
Routeur1#conf
Routeur1#configure ter
Routeur1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Routeur1(config)#hostname router1
router1(config)#

Obtenir des informations: show

Warning

Pour utiliser la commande show (1 seule étape depuis le prompt initial)

  1. commande enable: pour passer en mode privilégié.
  2. commande show: pour obtenir les informations souhaitées (en ajoutant les paramètres appropriés).

show running-config:

router1#show running-config
Building configuration...

Current configuration : 840 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname router1
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
dot11 syslog
ip source-route
!
!
!
!
ip cef
multilink bundle-name authenticated
!
!
!
!
!
archive
 log config
  hidekeys
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0/0
 no ip address
 shutdown
 no fair-queue
 clock rate 125000
!
interface Serial0/0/1
 no ip address
 shutdown
 clock rate 125000
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
 login
!
scheduler allocate 20000 1000
end

router1#

show version:

router1#show version
Cisco IOS Software, 1841 Software (C1841-IPBASEK9-M), Version 12.4(24)T1, RELEASE SOF)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Fri 19-Jun-09 14:07 by prod_rel_team

ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)

router1 uptime is 51 minutes
System returned to ROM by power-on
System image file is "flash:c1841-ipbasek9-mz.124-24.T1.bin"


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Cisco 1841 (revision 5.0) with 116736K/14336K bytes of memory.
Processor board ID FCZ092622PR
2 FastEthernet interfaces
2 Low-speed serial(sync/async) interfaces
DRAM configuration is 64 bits wide with parity disabled.
191K bytes of NVRAM.
31360K bytes of ATA CompactFlash (Read/Write)

Configuration register is 0x2102

router1#

show ip interface:

router1#show ip interface
FastEthernet0/0 is administratively down, line protocol is down
  Internet protocol processing disabled
FastEthernet0/1 is administratively down, line protocol is down
  Internet protocol processing disabled
Serial0/0/0 is administratively down, line protocol is down
  Internet protocol processing disabled
Serial0/0/1 is administratively down, line protocol is down
  Internet protocol processing disabled
router1#

show ip interface brief:

router1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down
FastEthernet0/1            unassigned      YES NVRAM  administratively down down
Serial0/0/0                unassigned      YES NVRAM  administratively down down
Serial0/0/1                unassigned      YES NVRAM  administratively down down
router1#

Configuration de l’interface Fastethernet 0/0

Apperçu du réseau

 -------------                                       --------------
|             |                                     | Machine      |
|   serveur   |                                     | de bureau... |
|    dhcp     |                                     | MacBook Pro  |
 -------------                                       --------------
   |_____| eth0                                         |_____| eth0
      ||   (192.168.1.1)                                   ||   (192.168.1.11)
      ||                                                   ||
      \/                                                   \/
    ---------------------------------------------------------------------
   ()               Réseau local     (Switch aurillac)                    )
    ---------------------------------------------------------------------
                   /\
                   ||
                   || fa0/0 (192.168.1.254)
              ------------
             |            |
             |   router1  |
             |            |
              ------------
                   || fa0/1  (10.10.10.254)
                   ||
                   \/

Warning

Pour configurer une interface du routeur (3 étapes depuis le prompt initial)

  1. commande enable: passe en mode privilégié.
  2. commande configure terminal: pour accéder au mode configuration.
  3. commande interface FastEthernet0/0: pour choisir l’ interface FastEthernet0/0.
  4. commande ip address 192.168.1.254 255.255.255.0: puis la commande de configuration pour initialiser son adresse IP.
  5. commande description “interface cote reseau local”: pour rajouter une description sur l’interface.
  6. commande no shutdown: Pour activer l’interface (inactif par défaut).

La configuration

router1>enable
router1#conf ter
router1#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
router1(config)#interface FastEthernet 0/0
router1(config-if)#ip address 192.168.1.254 255.255.255.0
router1(config-if)#description "interface cote reseau local"
router1(config-if)#no shutdown
router1(config-if)#
*Jan  1 01:45:33.763: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Jan  1 01:45:34.763: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0p
router1(config-if)#

Note

A partir de ce moment, l’interface est active comme le montre le message affiché à la suite de la commande no shutdown. De même les 3 LEDs associées à l’interface sont au Vert (FDX, 100, LINK).

Observation de l’interface

Warning

Revenir à la première étape, pour utiliser la commande show (Mode privilégié).

Le descriptif:

router1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.1.254   YES manual up                    up
FastEthernet0/1            unassigned      YES NVRAM  administratively down down
Serial0/0/0                unassigned      YES NVRAM  administratively down down
Serial0/0/1                unassigned      YES NVRAM  administratively down down
router1#

La table de routage:

router1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, FastEthernet0/0
router1#

Comment revenir en arrière?

Ou plutôt comment annuler une erreur de configuration ou une commande au niveau du routeur?

Il suffit de:

  • Reprendre la commande erronée, ou à annuler
  • et taper no au début.
Exemple
Commande:ip address 192.168.1.254 255.255.255.0
Annulation:** no** ip address 192.168.1.254 255.255.255.0

Comme on le voit sur la trace écran ci-dessous:

[...]
router1(config)#interface FastEthernet 0/0
router1(config-if)#no ip address 192.168.1.254 255.255.255.0
router1(config-if)#

Ce qui permet, dans ce cas, de supprimer l’adresse réseau entrée précédemment.

Vérification d’accès

Note

Ping OK!

  1. Commande ping depuis la machine de bureau du réseau local:

    mac-book:pare-feu laurent$ ping -c3 192.168.1.254
    PING 192.168.1.254 (192.168.1.254): 56 data bytes
    64 bytes from 192.168.1.254: icmp_seq=0 ttl=255 time=10.837 ms
    64 bytes from 192.168.1.254: icmp_seq=1 ttl=255 time=4.190 ms
    64 bytes from 192.168.1.254: icmp_seq=2 ttl=255 time=4.446 ms
    
    --- 192.168.1.254 ping statistics ---
    3 packets transmitted, 3 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 4.190/6.491/10.837/3.075 ms
    mac-book:pare-feu laurent$
    
  2. Commande ping depuis router1:

    router1#ping 192.168.1.11
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.11, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/51/248 ms
    router1#
    

Mise en place de la route par défaut

Warning

Pour configurer une route par défaut (2 étapes depuis le prompt initial)

  1. commande enable: passe en mode privilégié.
  2. commande configure terminal: pour passer en mode configuration.
  3. commande ip route 0.0.0.0 0.0.0.0 192.168.1.1: la route par défaut envoie tous les paquets sur 192.168.1.1, qui joue aussi le rôle de passerelle pour l’accès internet.

Note

On parle au niveau du routeur de Gateway of last resort (Passerelle de dernier recours).

Ajout de la route par défaut

ip route 0.0.0.0 0.0.0.0 192.168.1.1:

router1>en
router1#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
router1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1
router1(config)#

Vérification

show ip route:

router1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 192.168.1.1
router1#

Configuration de l’interface Fastethernet 0/1

Cf. schéma présenté au paragraphe: Configuration de l’interface Fastethernet 0/0

Warning

Pour configurer une interface du routeur (3 étapes depuis le prompt initial)

  1. commande enable: passe en mode privilégié.
  2. commande configure terminal: pour accéder au mode configuration.
  3. commande interface FastEthernet0/1: pour choisir l’ interface FastEthernet0/0.
  4. commande ip address 10.10.10.254 255.255.255.0: puis la commande de configuration pour initialiser son adresse IP.
  5. commande description “interface cote reseau local”: pour rajouter une description sur l’interface.
  6. commande no shutdown: Pour activer l’interface (inactif par défaut).

La configuration

router1>en
router1#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
router1(config)#interface FastEthernet 0/1
router1(config-if)#ip address 10.10.10.254 255.255.255.0
router1(config-if)#description "interface cote dmz"
router1(config-if)#no shutdown
router1(config-if)#
*Jan  1 02:08:20.751: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
router1(config-if)#

Observation de l’interface

Warning

Il n’y a rien de connecté sur cette interface! On le remarque avec la commande ci-dessous, ou la colonne Protocol est marquée down.

Le descriptif:

router1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.1.254   YES NVRAM  up                    up
FastEthernet0/1            10.10.10.254    YES manual up                    down      <<<<<<<<
Serial0/0/0                unassigned      YES NVRAM  administratively down down
Serial0/0/1                unassigned      YES NVRAM  administratively down down
router1#

La table de routage:

router1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 192.168.1.1
router1#

Puis dès qu’un switch est connecté

On observe pour l’interface:

router1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.1.254   YES NVRAM  up                    up
FastEthernet0/1            10.10.10.254    YES manual up                    up      <<<<<<<<
Serial0/0/0                unassigned      YES NVRAM  administratively down down
Serial0/0/1                unassigned      YES NVRAM  administratively down down
router1#

La nouvelle route est bien prise en compte

router1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, FastEthernet0/1
C    192.168.1.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 192.168.1.1
router1#

Ajout d’un serveur DHCP sur l’interface Fastethernet 0/1 du routeur

Warning

Pour configurer le DHCP du routeur (3 étapes depuis le prompt initial)

  1. commande enable: passe en mode privilégié.
  2. commande configure terminal: pour accéder au mode configuration.
  3. commande ip dhcp pool poolDMZ: pour entrer dans la configuration du DHCP.
  4. commandes de paramétrage:
    • network 10.10.10.0 255.255.255.0.
    • default-router 10.10.10.254.
    • domain-name testdmz.perso.
    • dns-server 192.168.1.1.
    • exit pour remonter d’un niveau (sort du paramétrage général du DHCP).
  5. commandes d’exclusion de plage d’adresse du DHCP
    • ip dhcp excluded-address 10.10.10.1 10.10.10.10:
    • ip dhcp excluded-address 10.10.10.101 10.10.10.254:
  6. commande service dhcp: Activation du service DHCP.

Trace des commandes de configuration

router1>en
router1#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
router1(config)#ip dhcp pool poolDMZ
router1(dhcp-config)#network 10.10.10.0 255.255.255.0
router1(dhcp-config)#default-router 10.10.10.254
router1(dhcp-config)#domain-name testdmz.perso
router1(dhcp-config)#dns-server 192.168.1.1
router1(dhcp-config)#exit
router1(config)#ip dhcp excl
router1(config)#ip dhcp excluded-address 10.10.10.1 10.10.10.10
router1(config)#ip dhcp excluded-address 10.10.10.101 10.10.10.254
router1(config)#service dhcp
router1(config)#

Vérification avec la commande show running-config

Extrait de la réponse de la commande:

router1#show running-config
Building configuration...

Current configuration : 1245 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname router1
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
dot11 syslog
ip source-route
!
!
ip dhcp excluded-address 10.10.10.1 10.10.10.10
ip dhcp excluded-address 10.10.10.101 10.10.10.254
!
ip dhcp pool poolDMZ
   network 10.10.10.0 255.255.255.0
   default-router 10.10.10.254
   domain-name testdmz.perso
   dns-server 192.168.1.1
!
!
ip cef
multilink bundle-name authenticated
!
!

Tests d’accès au réseau 10.10.10.0 depuis la machine 192.168.1.11

  1. Tout d’abord: ajouter une route pour l’accès au nouveau réseau

    Sur le poste 192.168.1.11, on ajoute la route:

    mac-book:~ laurent$ sudo route add -net 10.10.10.0 192.168.1.254
    Password:
    add net 10.10.10.0: gateway 192.168.1.254
    mac-book:~ laurent$
    

Note

Pour supprimer cette route il faut taper la commande sudo route delete -net 10.10.10.0 192.168.1.254.

  1. Vérification de la nouvelle route

    Warning

    Commande netstat -nr sous Mac, pour visualiser la table de routage.

    mac-book:~ laurent$ netstat -nr
    Routing tables
    
    Internet:
    Destination        Gateway            Flags        Refs      Use   Netif Expire
    default            192.168.1.1        UGSc            4        0     en1
    10.10.10/24        192.168.1.254      UGSc            0        0     en1    <<<<<<<<<<<
    127                127.0.0.1          UCS             0        0     lo0
    127.0.0.1          127.0.0.1          UH              4   297244     lo0
    169.254            link#5             UCS             0        0     en1
    192.168.1          link#5             UCS             3        0     en1
    192.168.1.1        b0:75:d5:16:e2:88  UHLWIir         7     3718     en1   1186
    192.168.1.6        0:1b:a9:14:e1:6b   UHLWI           0      988     en1   1146
    192.168.1.11       127.0.0.1          UHS             0        0     lo0
    192.168.1.254      link#5             UHLWIi          1      121     en1
    
    Internet6:
    Destination                             Gateway                         Flags         Netif Expire
    ::1                                     ::1                             UHL             lo0
    fe80::%lo0/64                           fe80::1%lo0                     UcI             lo0
    fe80::1%lo0                             link#1                          UHLI            lo0
    fe80::%en1/64                           link#5                          UCI             en1
    fe80::6aa8:6dff:fe42:8974%en1           68:a8:6d:42:89:74               UHLI            lo0
    ff01::%lo0/32                           ::1                             UmCI            lo0
    ff01::%en1/32                           link#5                          UmCI            en1
    ff02::%lo0/32                           ::1                             UmCI            lo0
    ff02::%en1/32                           link#5                          UmCI            en1
    mac-book:~ laurent$
    
  2. TEST d’accès => OK:

    mac-book:~ laurent$ ping -c3 10.10.10.254
    PING 10.10.10.254 (10.10.10.254): 56 data bytes
    64 bytes from 10.10.10.254: icmp_seq=0 ttl=255 time=5.000 ms
    64 bytes from 10.10.10.254: icmp_seq=1 ttl=255 time=4.260 ms
    64 bytes from 10.10.10.254: icmp_seq=2 ttl=255 time=4.417 ms
    
    --- 10.10.10.254 ping statistics ---
    3 packets transmitted, 3 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 4.260/4.559/5.000/0.318 ms
    mac-book:~ laurent$
    

Modification de la configuration de l’interface Fastethernet 0/1

  1. Tout d’abord désactiver l’interface, avant de modifier ses paramètres:

    router1>en
    router1#conf te
    Enter configuration commands, one per line.  End with CNTL/Z.
    router1(config)#interface FastEthernet 0/1
    router1(config-if)#shutdown                <<<<<<<<<<<<<<<<<<
    

    Warning

    A ce moment les LEDs de cette interface s’éteignent.

  2. On retire la configuration ip de l’interface:

    router1#conf te
    Enter configuration commands, one per line.  End with CNTL/Z.
    router1(config)#interface FastEthernet 0/1
    router1(config-if)#no ip address 10.10.10.254 255.255.255.0
    
  3. On met la nouvelle adresse ip, et on réactive l’interface:

    router1(config)#interface FastEthernet 0/1
    router1(config-if)#ip address 192.168.2.254 255.255.255.0
    router1(config-if)#no shutdown
    router1(config-if)#
    
  4. Observations

    • Commande show runnning-config, dont on donne l’extrait suivant relatif à l’ interface FastEthernet 0/1:

      !
      interface FastEthernet0/1
       description "interface cote dmz"
       ip address 192.168.2.254 255.255.255.0
       duplex auto
       speed auto
      !
      
    • Commande show ip route:

      router1#sh ip route
      Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
             D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
             N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
             E1 - OSPF external type 1, E2 - OSPF external type 2
             i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
             ia - IS-IS inter area, * - candidate default, U - per-user static route
             o - ODR, P - periodic downloaded static route
      
      Gateway of last resort is 192.168.1.1 to network 0.0.0.0
      
      C    192.168.1.0/24 is directly connected, FastEthernet0/0
      C    192.168.2.0/24 is directly connected, FastEthernet0/1
      S*   0.0.0.0/0 [1/0] via 192.168.1.1
      router1#
      

Sauvegarde des configurations

Note

Ceci permettra de retouver les modifications apportées au routeur, lors du prochain démarrage. Pour l’instant les modifications sont dans la mémoire volatile ram et porte le nom: running-config. Il faut donc les copier dans la mémoire non volatile nvram qui s’appelle: startup-config.

copy running-config startup-config:

router1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
router1#

Configurer un accès telnet au routeur

Commande:line vty 0 4

Warning

Un mot de passe est nécessaire pour utiliser telnet.

Note

Mise en place du mot de passe cisco pour l’accès distant au routeur par telnet.

  1. Configurer un mot de passe pour le terminal virtuel:

    router1#
    router1#conf ter
    Enter configuration commands, one per line.  End with CNTL/Z.
    router1(config)#line vty 0 4
    router1(config-line)#password cisco
    router1(config-line)#login
    router1(config-line)#exit
    router1(config)#
    
  2. Se connecter du poste distant 192.168.1.11 sur le routeur 192.168.1.254:

    mac-book:pare-feu laurent$ telnet 192.168.1.254 23
    Trying 192.168.1.254...
    Connected to 192.168.1.254.
    Escape character is '^]'.
    
    
    User Access Verification
    
    Password:     <<<<<<<< cisco
    router1>