Skip to content

giovana-git/cisco.ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 

Repository files navigation

Comandos gerais Cisco IOS (Switches e Routers)

TROCAR HOSTNAME DOS ESQUIPAMENTOS

>enable
#configure terminal 
(config)#hostname <hostname> 

CONFIGURAR UM BANNER

>enable
#configure terminal 
(config)#banner motd "texto"

EX: (config)#banner motd "Acesso apenas para o Departamento de TI" 

CONFIGURAR SENHA NA CONSOLE


>enable
#configure terminal
(config)#line console 0
(config-line)#password <senha>
(config-line)#login (NÃO ESQUECER O LOGIN, CASO CONTRÁRIO A SENHA NÃO SERÁ HABILITADA) 

CONFIGURAR SENHA NA ENABLE

>enable
#configure terminal 
(config)#enable secret (UTILIZAR SECRET POIS VEM CRIPTOGRAFADA) 

VERIFICAR AS CONFIGURAÇÕES QUE ESTÃO RODANDO NO EQUIPAMENTO

>enable 
#show running-config 

HABILITAR SERVIÇO DE CRIPTOGRAFIA

>enable
#configure terminal
(config)#service password-encryption 

DESFAZER UM COMANDO NO IOS

Digitar NO antes do comando!!! 

DESATIVAR UMA INTERFACE

>enable
#configure terminal
(config)#interface <nomenclatura-da-interface>
(config-if)#shutdown 

EX: (config)#interface g0/0 

DESATIVAR/ATIVAR VÁRIAS INTERFACES DE UMA VEZ

>enable
#configure terminal
(config)#interface range <intervalo> 

EX: 
>enable
#configure terminal
(config)#interface range g0/0-2 
(config-if-range)#shutdown 

VER RESUMO DAS INTERFACES

>enable
#show ip interface brief 

SALVAR CONFIGURAÇÕES

>enable
#write memory 
ou 
#copy running-config startup-config 

RESETAR EQUIPAMENTO

>enable 
#write erase 

CONFIGURAR IP NA INTERFACE

>enable
#configure terminal
(config)#interface <nome-da-interface> 
(config)#ip address <ip> + <máscara-de-subrede-em-decimal> 

COLOCAR DESCRIÇÃO EM UMA INTERFACE

>enable 
#configure terminal 
(config)#interface <nome> 
(config-if)#description <descrição> 

SSH

DEFINIR NOME DE DOMÍNIO

>enable 
#configure terminal 
(config)#ip domain-name <nome-de-domínio> 

GERAR CHAVE DE CRIPTOGRAFIA

>enable 
#configure terminal 
(config)#crypto key generate rsa general-keys modulus <tamanho-de-bits> <360-4000> 

CRIAR USUÁRIOS

>enable 
#configure terminal 
(config)#username <usuário> privilege <privilégio> secret <senha-do-usuário> 

EX - (config)#username Giovana privilege 15 secret Senha*Segura 

ATIVAR SSH NAS LINHAS DE VTY

>enable 
#configure terminal 
(config)#line vty 0 15 
(config-line)#transport input ssh 
(config-line)#login local 

ATIVAR LOGIN LOCAL NA CONSOLE

>enable 
#configure terminal 
(config)#line console 0 
(config-line)#login local 

Configurar as VTY para usar TELNET

>enable
#configure terminal
(config)#line vty 0 15
(config-line)#password <senha>
(config-line)#login

CONFIGURAÇÕES EXCLUSIVAS PARA O ROTEADOR

VISUALIZAR TABELA DE ROTEAMENTO

>enable 
#show ip route 

LEGENDAS DA TABELA: 
C = REDE QUE ELE ESTÁ CONECTADO 
L = ENDEREÇO QUE ELE ESTÁ USANDO NA REDE 
/32 = IP DE UM HOST
S = ROTA ESTÁTICA 
S* = ROTA PADRÃO 

CONFIGURAR SUBINTERFACES

>enable
#configure terminal 
(config)#interface <nome-da-subinterface> 

  EX - (config)#interface g0/0.10 
  10 = NÚMERO DA VLAN ATRELADA 

(config)#interface <nome-da-subinterface>
(config-subif)#encapsulation dot1q <número-da-vlan> 
(config-subif)#ip address <ip> + <máscara> 

CONFIGURAR UMA ROTÁ ESTÁTICA (IPv4)

>enable
#configure terminal 
(config)#ip route <id-da-rede-de-destino> + <máscara-da-rede-de-destino> <ip-do-roteador-que-conhece-a-rede> 

EX - (config)#ip route 192.168.0.10 255.255.255.128 200.200.100.2

CONFIGURAR UMA ROTA PADRÃO (IPv4)

>enable
#configure terminal 
(config)#ip route 0.0.0.0 0.0.0.0 <nome-da-interface-de-saída> 

EX - (config)#ip route 0.0.0.0 0.0.0.0 s0/0/0 

ATIVAR O ROTEAMENTO IPv6

>enable
#configure terminal 
(config)#ipv6 unicast-routing 

INSERIR IPv6 EM UMA INTERFACE

>enable
#configure terminal 
(config)#interface <nome-da-interface>
(config-if)#ipv6 address <endereço>/<prefixo> 

Configurações exclusivas do Switch

CRIAR VLANS

>enable
#configure terminal
(config)#vlan [número-da-vlan]

NOMEAR A VLAN

>enable
#configure terminal
(config)#vlan 10
(config-vlan)# name [nome-da-vlan]

COLOCAR INTERFACE EM UMA VLAN (ACCESS)

>enable
#configure terminal
(config)#interface [nome-dainterface]
(config-if)# switchport mode access
(config-if)# switchport access vlan [nº-da-vlan]

VERIFICAR VLANS DO EQUIPAMENTO

>enable
#show vlan brief

CONFIGURAR UMA INTERFACE PARA O MODO TRUNK

>enable
#configure terminal
(config)#interface [nome-dainterface]
(config-if)# switchport mode trunk

CONFIGURAR A VLAN NATIVA NA INTERFACE TRUNK

>enable
#configure terminal
(config)#interface [nome-dainterface]
(config-if)# switchport mode trunk
(config-if)# switchport trunk native vlan [nº-da-vlan-nativa]

LIBERAR VLANS NA INTERFACE TRUNK

>enable
#configure terminal
(config)#interface [nome-dainterface]
(config-if)# switchport trunk allowed vlan [lista das vlans separadas por vírgulas]

EX: (config-if)# switchport trunk allowed vlan 10,20,30

CONFIGURAR IP NO SWITCH

>enable
#configure terminal
(config)# interface vlan [nº-da-vlan]
(config)#ip address <ip> + <máscara-de-subrede-em-decimal> 

About

Comandos gerais

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors