Listes des commandes Packet Tracer

listes des commandes Packet Tracer en pratique
...
Phase 1 Étape 1
Combien de sous-réseaux faut-il pour ce réseau ? → Il faut 4 sous-réseaux, de 64 hôtes chacun.
Quel est le masque de sous-réseau de ce réseau au format décimal ?
→ Le masque de sous-réseau est 255.255.255.192 car « 1100.0000 » donc, les 2 premiers bits correspondent à 192.
Quel est le masque de sous-réseau au format avec barres obliques (CIDR) ?
→ Le masque est de /18 car le masque par défaut sous CIDR est de 24. Dans ce cas, nous avons ôter au 24, les 6 derniers bits.
Combien d'hôtes utilisables compte chaque sous-réseau ?
→ Chaque sous-réseau dispose de 62 hôtes car on enlève 2 hôtes à chacun pour l'adresse de broadcast et de réseau.
Etape 2
- Affectation pour le sous-réseau R1 :
- Adresse de réseau : 192.168.1.64
- Première adresse : 192.168.1.65
- Dernière adresse : 192.168.1.126
- Adresse de broadcast : 192.168.1.127
- Affectation pour le sous-réseau de la liaison entre R1 et R2 :
- Adresse de réseau : 192.168.1.128
- Première adresse : 192.168.1.129
- Dernière adresse : 192.168.1.190
- Adresse de broadcast : 192.168.1.191
- Affectation pour le sous-réseau R3 :
- Adresse réseau : 192.168.1.192
- Première adresse : 192.168.1.193
- Dernière adresse : 192.168.1.254
- Adresse de broadcast : 192.168.1.255
Phase 2 Étape 1
Affectation de la première adresse à l'interface local sur R1.
R1(config-if)#ip address 192.168.1.65 255.255.255.192 R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Digeon -Foucart SISR2-TP6 – Configuration de routeur sous Cisco Packet Tracer
BTS SIO 08/03/2013
Affectation de la dernière adresse d'hôte valide du deuxième sous-réseau à PC1.
La passerelle 192.168.1.65 à été ajouté au PC1.
Affectation de la première adresse d'hôte du troisième sous-réseau à l'interface du réseau étendu sur
R1.
R1(config-if)#interface serial0/0/0
R1(config-if)#ip address 192.168.1.129 255.255.255.192 R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Affectation de la dernière adresse d'hôte du troisième sous-réseau à l'interface du réseau étendu sur
R2.
R2>enable
R2#configure terminal
Digeon -Foucart SISR2-TP6 – Configuration de routeur sous Cisco Packet Tracer
BTS SIO 08/03/2013
Enter configuration commands, one per line. End with CNTL/Z. R2(config)#interface serial0/0/0
R2(config-if)#ip address 192.168.1.190 255.255.255.192 R2(config-if)#no shutdown
R2(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
Affectation de la première adresse d'hôte valide du quatrième sous-réseau à l'interface du réseau local de R2.
R2(config-if)#interface fastethernet0/0
R2(config-if)#ip address 192.168.1.193 255.255.255.192 R2(config-if)#no shutdown
R2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Affectation de la dernière adresse d'hôte valide du quatrième sous-réseau à PC2.
La passerelle 192.168.1.193 à été ajouté au PC2.
Étape 2
Adresse IP Masque Passerelle
PC1 192.168.1.126 255.255.255.192 192.168.1.65
PC2 192.168.1.254 255.255.255.192 192.168.1.193
R1 –
Fastethernet0/0 192.168.1.65 255.255.255.192
R1 – Serial0/0/0 192.168.1.129 255.255.255.192
R2 –
Fastethernet0/0 192.168.1.193 255.255.255.192
R2 – Serial0/0/0 192.168.1.190 255.255.255.192
Phase 3
Table de routage de R1 :
Réseau Masque Passerelle Interface
192.168.1.64 255.255.255.192 192.168.1.65 192.168.1.65
192.168.1.128 255.255.255.192 192.168.1.190 192.168.1.129
192.168.1.192 255.255.255.192 192.168.1.190 192.168.1.129
Table de routage de R2 :
Réseau Masque Passerelle Interface
192.168.1.192 255.255.255.192 192.168.2.193 192.168.2.193
192.168.1.128 255.255.255.192 192.168.1.129 192.168.1.190
192.168.1.64 255.255.255.192 192.168.1.129 192.168.1.190
Ajout de deux tables de routages dans les routeurs R1 et R2 :
R1
R1(config)#ip route 192.168.1.192 255.255.255.192 192.168.1.190
R2
R2(config)#ip route 192.168.1.64 255.255.255.192 192.168.1.129
Digeon -Foucart SISR2-TP6 – Configuration de routeur sous Cisco Packet Tracer
BTS SIO 08/03/2013
Phase 4
Est-il possible d'effectuer une commande ping sur la passerelle par défaut depuis l'hôte connecté à
R1 ?
PC>ping 192 .168.1.65
Pinging 192 .168.1.65 with 32 bytes of data:
Reply from 192.168.1.65: bytes=32 time=40ms TTL=255 Reply from 192.168.1.65: bytes=32 time=40ms TTL=255 Reply from 192.168.1.65: bytes=32 time=40ms TTL=255
Ping statistics for 192.168.1.65:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:
Minimum = 40ms, Maximum = 40ms, Average = 40ms
Est-il possible d’exécuter une commande ping sur la passerelle par défaut depuis l'hôte connecté à
R2 ?
Est-il possible d’exécuter une commande ping sur l'interface série 0/0/0 de R2 depuis le routeur R1 ?
R1>enable
R1#ping 192.168.1.190
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.190, timeout is 2
seconds:
11111
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/20/20 ms
Est-il possible d’exécuter une commande ping sur l'interface série 0/0/0 de R1 depuis le routeur R2 ?
R2>enable
R2#ping 192.168.1.129
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.129, timeout is 2 seconds:
11111
Success rate is 100 percent (5/5), round-trip min/avg/max = 13/18/20 ms
Schéma logique final
…
…
ACL NOMMEES :
router1(config)#ip access-list extended/standed (name)
router1(config-ext-nacl)#permit/deny protocole source msk générique destination msk générique opérateur port
STP
_Spanning-tree{identifiant de vlan}root:designer le commutateur racine
_Spanning-tree{identifiant de vlan}{priority}:changer le niveau de priorité
_Spanning-tree cost{coût}:modifie le cout STP
_Debug spanning-tree:affiche les informations de changement topologique STP
COMMUTATEURS
Reinitialisation de la config du commutateur et rechargement
SW #delete flash :vlan.dat
SW #erase startup-config
SW #reload
SW #delete nvram
Configuration @mac statiques
SW (config)#mac-address-tablestatic(@mac de hote)interface fast Ethernet {n°}vlan{nom vlan}
Configuration de la securité des ports
SW (config)#interface fastethernet 0/2
SW (config-if)#switchport port-security
> enable
# configure terminal
(config)# hostname SW
SW (config)# enable password cisco
SW (config)# interface vlan1
SW (config-if)# ip address 197.10.1.99 255.255.255.0
SW (config-if)# no shutdown
SW (config-if)# exit
SW (config)# ip default-gateway 197.10.1.1
SW (config)# mac-address-table static 4444-4444-4444 vlan 1 int fa0/5
SW (config)# exit
SW # show mac-address-table
SW (config)# interface fa0/9
SW (config-if)# switchport port-security
SW (config-if)# switchport port-security maximum 1
@ IP DE COMMUTATEURS
2950sw3(config)# interface vlan1
2950sw3(config-if)# ip address 197.10.1.99 255.255.255.0
2950sw3(config-if)# no shutdown
2950sw3(config-if)# exit
NAT
Statique
router1(config)# ip nat inside source static {@local}{@global}
router1(config)# interface ethernet0
router1(config-if)# ip nat inside
router1(config-if)# interface serial0
router1(config-if)# ip nat outside
router1(config-if)# no shut
dynamique
router1(config)# ip nat pool {nom pool}{@
router1(config)# ip nat pool pool1 169.10.1.50 169.10.1.100 netmask 255.255.255.0
router1(config)# ip nat inside source list {n°acl} pool {nom pool}
router1(config)# access-list {n°acl} permit{source}{msk generique}
R (config)# interface Ethernet 0
R (config-if)# ip address 160.10.1.1 255.255.255.0
R (config-if)# ip nat inside
R (config-if)# interface serial 0
R (config-if)# ip nat outside
PAT
R (config)# access-list 1 permit 160.10.1.0 0.0.0.255
R (config)# ip nat inside source list 1 interface serial0 overload
R (config)# ip nat pool {nom pool}{@ debut}{@fin}netmask {msk}
R (config)# interface Ethernet 0
R (config-if)# ip address 160.10.1.1 255.255.255.0
R (config-if)# ip nat inside
R (config-if)# interface serial 0
R (config-if)# ip nat outside
R (config-if)# exit
show ip nat translations
show ip nat statistics
DHCP :
R (config)#ip DHCP pool{nom }
R(config)# ip DHCP pool TOTO
R (dhcp-config)#network{@ reso}{msk}
R(config)#ip dhcp excluded-address{@debut}{@fin}
R (dhcp-config)#lease time {definer duré de bail}
ex:
==========================================================
R(config)#ip dhcp pool subnet 12
R(dhcp-config)#network 172.16.20.0
R (dhcp-config)#default-router 172.16.12.254
R (dhcp-config)#dns-server 172.16.1.2
R (dhcp-config)#netbios-name-server 172.16.1.3
==========================================================
PPP
une authentification unidirectionnelle.
Lab_A (config-if)# encapsulation ppp

Lab_A (config-if)# ppp authentication pap callin
Lab_A (config-if)# ppp pap sent-username Lab_A password password_pap
Lab_B (config)# username Lab_A password password_pap
Lab_B (config-if)# encapsulation ppp
Lab_B (config-if)# ppp authentication pap
Pour une authentification bidirectionnelle, il suffit de procéder comme suit
Lab_A (config)# username Lab_B password password_pap
Lab_A (config-if)# encapsulation ppp
Lab_A (config-if)# ppp authentication pap
Lab_A (config-if)# ppp pap sent-username Lab_A password password_pap
Lab_B (config)# username Lab_A password password_pap
Lab_B (config-if)# encapsulation ppp
Lab_B (config-if)# ppp authentication pap
Lab_B (config-if)# ppp pap sent-username Lab_B password password_pap
CHAP
Lab_A (config)# username Lab_B password password_chap
Lab_A (config-if)# encapsulation ppp
Lab_A (config-if)# ppp authentication chap
Lab_B (config)# username Lab_A password password_chap
Lab_B (config-if)# encapsulation ppp
Lab_B (config-if)# ppp authentication chap
FRAME RELAY
Routeur LAB A
interface Serial0/0
no ip address
encapsulation frame-relay
interface Serial0/0.1 point-to-point
ip address 10.1.1.1 255.255.255.0
frame-relay interface-dlci 100
!
interface Serial0/0.2 multipoint
ip address 10.1.2.1 255.255.255.0
frame-relay interface-dlci 101
frame-relay interface-dlci 102
!
router rip
network 10.0.0.0
ROUTEUR LAB D
interface Serial0/0
ip address 10.1.1.2 255.255.255.0
encapsulation frame-relay
frame-relay interface-dlci 200
router rip
network 10.0.0.0
ROUTEUR B
interface Serial0/0
ip address 10.1.2.2 255.255.255.0
encapsulation frame-relay
frame-relay interface-dlci 300
router rip
network 10.0.0.0
ROUTEUR C
interface Serial0/0
ip address 10.1.2.3 255.255.255.0
encapsulation frame-relay
frame-relay interface-dlci 400
router rip
network 10.0.0.0
ISDN BRI-BRI using Legacy DDR
router1(config)# isdn switch-type basic-ni
router1(config)# dialer-list 1 protocol ip permit
router1(config)# username router2 password cisco
router1(config)# interface bri0
router1(config-if)# encap ppp
router1(config-if)# ip address 200.10.1.1 255.255.255.0
router1(config-if)# isdn spid1 32177820010100
router1(config-if)# dialer-group 1
router1(config-if)# dialer map ip 200.10.1.2 name router2 broadcast 7782002
router1(config-if)# ppp authentication chap
router1(config-if)# no shut
ISDN BRI-BRI using Dialer Profiles
router1(config)# isdn switch-type basic-ni
router1(config)# dialer-list 1 protocol ip permit
router1(config)# username router2 password cisco
router1(config)# interface bri0
router1(config-if)# encap ppp
router1(config-if)# ppp authentication chap
router1(config-if)# isdn spid1 32177820010100
router1(config-if)# dialer pool-member 1
router1(config-if)# no shut
router1(config-if)# interface dialer 1
router1(config-if)# no shut
router1(config-if)# ip address 200.10.1.1 255.255.255.0
router1(config-if)# encap ppp
router1(config-if)# dialer-group 1
router1(config-if)# dialer pool 1
router1(config-if)# dialer remote-name router2
router1(config-if)# dialer string 7782002
router1(config-if)# ppp authentication chap
ISDN PRI using Dialer Profiles
router1(config)# isdn switch-type basic-ni
router1(config)# dialer-list 1 protocol ip permit
router1(config)# username router2 password cisco
router1(config)# interface bri0/0
router1(config-if)# encap ppp
router1(config-if)# ppp authentication chap
router1(config-if)# isdn spid1 32177820010100
router1(config-if)# dialer pool-member 1
router1(config-if)# no shut
router1(config-if)# interface dialer 2
router1(config-if)# no shut
router1(config-if)# ip address 201.10.1.1 255.255.255.0
router1(config-if)# encap ppp
router1(config-if)# dialer-group 1
router1(config-if)# dialer pool 1
router1(config-if)# dialer remote-name router2
router1(config-if)# dialer string 7782002
router1(config-if)# ppp authentication chap
router2(config)# isdn switch-type primary-5esss
router2(config)# dialer-list 1 protocol ip permit
router2(config)# username router1 password cisco
router2(config)# controller t1 0/0
router2(config-controller)# framing esf
router2(config-controller)# linecode b8zs
router2(config-controller)# pri-group timeslots 1-24
router2(config-controller)# exit
router2(config)# interface serial0/0:23
router2(config-if)# encapsulation ppp
router2(config-if)# ppp authentication chap
router2(config-if)# dialer pool-member 2
router2(config-if)# no shut
router2(config-if)# interface dialer 2
router2(config-if)# ip address 201.10.1.2 255.255.255.0
router2(config-if)# encapsulation ppp
router2(config-if)# dialer-group 1
VLAN
Configuration du switch_A
Création des VLANs
SW_A# vlan database
SW _A(vlan)# vlan 2 name VLAN_2
SW _A(vlan)# vlan 3 name VLAN_3
SW _A(vlan)# vlan 4 name VLAN_4
SW _A(vlan)# vtp domain cisco
SW _A(vlan)# vtp server
SW _A(vlan)# exit
Création des trunk
SW _A(config)# interface fastEthernet 0/1
SW _A(config-if)# switchport mode trunk
SW _A(config-if)# switchport trunk allowed vlan 2-4
SW _A(config-if)# exit
SW _A(config)# interface fastEthernet 0/8
SW _A(config-if)# switchport mode trunk
SW _A(config-if)# switchport trunk allowed vlan 2-4
SW _A(config-if)# exit
Configuration du switch_A
Attribution des VLANs aux ports
SW _A(config)# interface fastEthernet 0/2
SW _A(config-if)# switchport mode access
SW _A(config-if)# switchport access vlan 2
SW _A(config-if)# exit
SW _A(config)# interface fastEthernet 0/3
SW _A(config-if)# switchport mode access
SW _A(config-if)# switchport access vlan 3
SW _A(config-if)# exit
SW _A(config)# interface fastEthernet 0/4
SW _A(config-if)# switchport mode access
SW _A(config-if)# switchport access vlan 4
SW _A(config-if)# exit
Configuration du switch_B
Création des VLANs
Adhésion au domaine cisco
SW _B# vlan database
SW _B(vlan)# vtp domain cisco
SW _B(vlan)# vtp client
SW _B(vlan)# exit
Création du trunk
SW _B(config)# interface fastEthernet 0/1
SW _B(config-if)# switchport mode trunk
SW _B(config-if)# switchport trunk allowed vlan 2-4
SW _B(config-if)# exit
Configuration du switch_B
Attribution des VLANs aux ports
SW _B(config)# interface fastEthernet 0/2
SW _B(config-if)# switchport mode access
SW _B(config-if)# switchport access vlan 2
SW _B(config-if)# exit
SW _B(config)# interface fastEthernet 0/3
SW _B(config-if)# switchport mode access
SW _B(config-if)# switchport access vlan 3
SW _B(config-if)# exit
SW _B(config)# interface fastEthernet 0/4
SW _B(config-if)# switchport mode access
SW _B(config-if)# switchport access vlan 4
SW _B(config-if)# exit
Configuration du Routeur R1
R1(config)# interface fastEthernet 0/0
R1(config-if)# ip address 200.0.0.1 255.255.255.0
R1(config-if)# exit
R1(config)# interface fastEthernet 0/0.2
R1(config-subif)# encapsulation dot1q 2
R1(config-subif)# ip address 10.0.0.1 255.255.255.0
R1(config-subif)# exit
R1(config)# interface fastEthernet 0/0.3
R1(config-subif)# encapsulation dot1q 3
R1(config-subif)# ip address 172.16.0.1 255.255.255.0
R1(config-subif)# exit
R1(config)# interface fastEthernet 0/0.4
R1(config-subif)# encapsulation dot1q 4
R1(config-subif)# ip address 192.168.0.1 255.255.255.0
R1(config-subif)# exit