0% found this document useful (0 votes)
5 views

Cisco Commands

The document provides a comprehensive guide on configuring various networking protocols and settings on routers and switches, including IPv4 and IPv6 configurations, DHCP, EIGRP, OSPF, and access control lists. It includes commands for setting up router names, passwords, interface configurations, and routing protocols, as well as details on advanced features like HSRP and GLBP. Additionally, it covers security measures such as password encryption and SSH access, along with VLAN and EtherChannel configurations.

Uploaded by

azerbigi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Cisco Commands

The document provides a comprehensive guide on configuring various networking protocols and settings on routers and switches, including IPv4 and IPv6 configurations, DHCP, EIGRP, OSPF, and access control lists. It includes commands for setting up router names, passwords, interface configurations, and routing protocols, as well as details on advanced features like HSRP and GLBP. Additionally, it covers security measures such as password encryption and SSH access, along with VLAN and EtherChannel configurations.

Uploaded by

azerbigi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

IPv4

Change the router Name : mot de passe de routeur:


Rx(config)# Hostname smiya Rx(config)# Enable Password ******

mot de passe de routeur crypté: désactiver la recherche DNS:


Rx(config)# Enable Secret ****** Rx(config)# No Ip Domain-Lookup

Afficher la Configuration et les mot de passe:


Rx# Show Running-Config

Afficher un méssage au démarrage de routeur ou ajouter une banière:


Rx(config)# Banner Motd *chi message hna*

Ajouter un mot de passe sur le mode console :


Rx(config)# Line Consol 0

Rx(config-Line)# Password ********

Rx(config-line)# Loggin synchronous

Rx(config-line)# Loggin

Le routage statique par la table de commande prompt :


C:/> Ip Config ( address ip ) ( Masque ) ( Gateway )

Telnet (Accée a Distance )


Configuration Des Interfaces :
 Awl haja Kadir Password lmode Privilége

Rx(config)# Enable Password ******

 hadchi howa telnet

Rx(config)# Line VTY 0 4

Rx(config-Line)# Password ******

Rx(config-Line)# Logging synchronous

Rx(config-Line)# login

 Now go to PC Prompt and Type: Telnet ( router address )


crypter touts les mot de passe :
Rx(config)# Service Password-Encryption

Pour sauvegarder les donnes si le routeur rédimarer :


Rx(config)# Do wr OU Rx(config)# Copy Running-config Startup-Config

Protocole SSH ( Accée a distance )


R(config)# Hostname R1

R(config)# Enable Password ******

R(config)# Ip Domain-name ista.ma

R(config)# Username ****** Password ******

R(config)# Ip SSH version 2

R(config)# Crypto Key generate RSA  Kadkhl wahd r9am mora hadi

R(config)# Line VTY 0

R1(config-line)# Transport Input SSH

R1(config-line)# login local

R1(config-line)# Ip SSH timeout 120  Hadi kadir dik time out fach kadoz 120s

C:\Users\PC > ssh -l (username) (Gateway)  f Cmd d PC

Protocole HSRP :
R1(config)# Int f0/0

R1(config)# Standby 10 Ip X.X.X.X (Virtual Router Address)

R1(config)# Standby 10 Priority 150

R1(config)# Standby Preempt

R2(config)# Int g0/0

R2(config)# Standby 1 Ip X.X.X.X (Virtual Router Address)

R2(config)# Standby 1 priority 110

Protocole GLBP :
R1(config)# Int f0/0
R1(config-if)# Standby 10 Ip X.X.X.X (Virutal Router Address)

R1(config-if)# Standby 10 Priority 150

R1(config-if)# Standby 10 Preempt

R1(config)# Standby 10 Load-Balancing Round-Robin

La Bande Passante :
R1(config)# Bande-width 512  Katkon b Kilobits (kb)

Configuration de DHCP:
R1(config)# Ip Dhcp Pool ISTA

R1(config-Dhcp)# Network 192.168.1.0 255.255.255.0 (add reseau + Masque)

R1(config-Dhcp)#Default-Router 192.168.1.1 (Gateway)

R1(config-Dhcp)#Dns-Server 8.8.8.8

R1(config)# IP Dhcp Excluded-Address (Ip Ad) (Masque)

Agent de relais DHCP:


R2(config)# Ip Helper-Address 192.168.1.0 (Routeur li gadina fih DHCP)

Sync Line Console :


R2(config)# Line Console 0

R2(config)# loggin Synchronise

Config De L’agrégation :
Switch(config)# Int range f0/0-6

Switch(config)# Switchport Mode Trunk

!!! Ila Kan 3ndna Vlan Natif !!!


Switch(config)# switchport trunk native vlan 100

Config Inter Vlan :


R(config)# int f0/0.15 ==> 0.15 dyal vlan 15 dakchi 3la 7sab smit vlan li drti

R(config-subif)# encapsulation dot1q 15 ==> dik 15 dyal vlan 15

R(config-subif)# ip add (gateway + masque) ==> gateway d vlan 15

Bhal 192.168.1.0 l gateway dyalha hya 192.168.1.1


!!! Fach tdir hado katmchi l switch o trdo mod trunk !!!
Switch(config)# switchport trunk native vlan 100 ==> hadi katzidha ila 3ndk vlan natif

Protocole OSPF IPv4 (Etat de Lien) :


R2(config)# Router OSPF 10

R2(config-router)# Network 192.168.1.0 0.0.0.255 Area 0  Masque generique

Afficher Les Information Voisin OSPF :


Rx# Show Ip Ospf Neighbor

Afficher La Priorité OSPF :


R2(config)# Show Ip OSPF int 0/0

Configurer Router-ID :
R2(config)# Router OSPF 10

R2(config)# Router-id 1.1.1.1

VTP (Virtual Trunking Protocole) :


Permet D’échanger les Informations Des Vlan

R2(config)# Vtp Mode Server R2(config)# Vtp Mode Client

R2(config)# Vtp Domain IDOSR.ma R2(config)# Vtp Domain IDOSR.ma

R2(config)# Vtp Password R2(config)# Vtp Password

R2(config)# Vtp Version 2 R2(config)# Vtp Version 2

Config De Route par Default :


R2(config)# IP Route 0.0.0.0 0.0.0.0 192.168.1.2  Address Router li gdamo

Activer L’interface LoopBack :


R2(config)# Int Loopback 0

R2(config)# Ip Add 192.168.3.1 255.255.255.0

R2(config)# No Shutdown

Config De la Propagation de la Route Rip :


R2(config)# Router Rip
R2(config)# Default-Information Originate

Modifier La distance Administrative :


R2(config)# Router Rip

R2(config)# Distance 70

ACL (Access Control List):


!!! ACL Standard Numeroté !!!
R2(config)# Access-List ID Action Source

 ID = Standart(1-99) OR Extended(100-199)

 Action = Deny OR Permit

 Source OR Destination = for a Subnet  (Addresse réseau) (Masque Générique)

= For a Single Address  host 192.168.1.23

= For Everthing  Any

!!! ACL Etendue Numeroté !!!


R2(config)# Access-List ID Action Protocole Source Destination

 ID = Standart(1-99) OR Extended(100-199)

 Action = Deny OR Permit

 Protocole = Ip , tcp , udp , icmp …

 Source OR Destination = for a Subnet  (Addresse réseau) (Masque Générique)

= For a Single Address  host 192.168.1.23

= For Everthing  Any

!!! ACL Standard Nommées !!!


R2(config)# Ip Access-List Standart “ID or Name”

R2(config-ACL)# [Sequence#] Action Source

 [Sequence#]  Tartib (Optional)

!!! ACL Etendue Nommées !!!


R2(config)# Ip Access-List Extended “ID or Name”

R2(config-ACL)# [Sequence#] Action Protocole Source Destination

 [Sequence#]  Tartib (Optional)

Spanning Tree Protocole :


(Permet d’éviter les Boucle dans les Topologie redondantes)

R2(config)#Show Spanning-tree brief  Afficher les info STP

Activer le port de Peripherique : STP Mode Rapid Pvst+ :


R2(config)# int f0/0 R2(config)# Spanning-Tree Mode Rapid-Pvst

R2(config-fast)# Spanning-tree port-fast

Definir en tant que Switch Racine : Definir en tant que Switch Secondaire :
R2(config)#Spanning-Tree Vlan 1 Root Primary  R2(config)# …………. Root Secondary

Etherchannel
PAGP LACP On on OUI
On On on Desirable NON
Desirable Active Auto
Desirable Desirable OUI
Auto Passive
Desirable Auto OUI
Auto Desirable OUI
Auto Auto NON
R2(config)# int range f0/0-5

R2(config-range)# Channel-Group 1 Mode Désirable hadi katbdl 3la 7ssab ach 3ndk

R2(config)# int port-channel 1 (On , Auto , Passive , Active )

R2(config-channel)# Switch-Port mode Trunk

EIGRP IPv4 :
R2(config)# Router Eigrp 1

R2(config-config)# Network 192.168.1.0 0.0.0.255 (address li kay3rf + Masque Génerique )

R2(config-Config)# No auto-summary
R2(config-Config)# Eigrp Router-id 1.1.1.1

La Bande Passante de référence :


R2(config)# Router OSPF 10

R2(config)# Auto-cost Reference-Bandewidth 1000 (Mb/s)

La Bande Passante de L’interface : Réglage Du Cout OSPF :


R2(config)# int f0/0 R2(config)# ip OSPF Cost 156

R2(config)# Bandewidth 64 (Mb/s)

Config De La Recapitulation OSPF (ABR) :


R2(config)# Router OSPF 10

R2(config)# Area 1 Range 192.168.0.0 255.255.255.0

Config De La Recapitulation OSPD (ASBR) :


R2(config)# Router OSPF 10

R2(config)# Summary-address 192.168.0.0 255.255.255.0

Config De La Recapitulation Manuel EIGRP :


R2(config)#int f0/0

R2(config-int)# Ip Summary-Address EIGRP 10 192.168.0.0 255.255.255.0

Propager La route Par Default Dans EIGRP :


R2(config)# Router EIGRP 10

R2(config)# Redistribute Static

Config le Miniteur EIGRP :


R2(config)# int f0/0

R2(config-int)# IP Hello-interval EIGRP 10 (50sec)

R2(config-int)# IP Hold-time EIGRP 10 (150sec)

Sync Line Console :


R2(config)#

Sync Line Console :


R2(config)#
Sync Line Console :
R2(config)#

IPv6
Protocole RIP : Exclure une address :
Rx(config)# int f0/0 R2(config)# Ip DHCP Excluded-Address

R2(config)# Ipv6 rip Ista Enable Afficher les Liaisons DHCP :


DHCP Protocole : Rx# Show Ip dhcp Binding

Rx(config)# ip-Dhcp pool ISTA

Rx(config)# Network 192.168.1.0 255.255.255.0

Rx(config)# Default-Router 192.168.1.1

Rx(config)# Domain-Name ISTA.ma

Rx(config)# Dns-server 8.8.8.8

Config du Relais DHCP :


R2(config)# int f0/0

R2(config-int)# Ip Helper-Address 192.168.1.2  add dyal routeur li fih dhcp

EIGRP IPv6 :
R2(config)# ipv6 Router EIGRP 10

R2(config-routing)# Eigrp Router-ID 1.1.1.1

R2(config-routing)# No Shutdown

R2(config)# int f0/0 (S0/0)

R2(config)# Ipv6 Eigrp 10

DHCPv6
 Options Slaac : (n=0 ; o=0)
 Slaac + DHCPv6 (Sans états) (n=0 ; o=1) :
 DHCP avec états (Avec états) (n=1 ; o=x) :
Config DHCP Sans états : Config DHCP Avec états :
R2(config)# Ipv6 Dhcp pool ista R2(config)# ip Dhcp pool ista

# Dns-Server 2001:A:A:5 # Address Prefix xxxxx/64 lifetime infinite

# Domain-Name IDOSR.ma # Dns-server 2001:A:A:5

R2(config)# Int g0/0 # Domain-name IDOSR.ma

# Ipv6 nd Other-Config-Flag R2(config)# int g0/0

# No nd Ipv6 Managed-Config-Flag # Ipv6 nd Managed-config-flag

# Ipv6 Dhcp Server ista # Ipv6 Dhcp server ista

Config d’un routeur En tant que Client :


R2(config)#int f0/0 R2(config)# int f0/0

# Ipv6 enable # Ipv6 enable

# Ipv6 Address DHCP # Ipv6 address Autoconfig

Sync Line Console :


R2(config)#

Sync Line Console :


R2(config)#

Sync Line Console :


R2(config)#

Sync Line Console :


R2(config)#

Sync Line Console :


R2(config)#

Sync Line Console :


R2(config)#

You might also like