Mudanças entre as edições de "Cisco 2960s"
De IFRS Campus Canoas
(Criou página com '.') |
(add lldp) |
||
| (14 revisões intermediárias pelo mesmo usuário não estão sendo mostradas) | |||
| Linha 1: | Linha 1: | ||
| − | . | + | === Comandos importantes === |
| + | Para acessar o switch após a conexão utilize o comando enable, usuário e senha serão solicitados: | ||
| + | Switch> enable | ||
| + | |||
| + | Salva as configurações realizadas na memória para o "disco" do switch: | ||
| + | # wr | ||
| + | ou | ||
| + | # copy running-config startup-config | ||
| + | |||
| + | Acessa o terminal de configuração, prefixo do terminal irá mudar para '''(config)#''' orientando o usuário que esta no terminal de configuração: | ||
| + | # configure terminal | ||
| + | ou | ||
| + | # conf t | ||
| + | |||
| + | Assim como o comando wr e conf t, todos os outros tem seu formato simplificado. | ||
| + | |||
| + | Reinicia o switch: | ||
| + | # reload | ||
| + | === Configurações básicas === | ||
| + | (config)# hostname NOME | ||
| + | (config)# no ip domain-lookup | ||
| + | |||
| + | === LLDP - 802.1AB === | ||
| + | Link Layer Discovery Protocol | ||
| + | (config)# lldp run | ||
| + | # show lldp neighbors | ||
| + | |||
| + | === Habilitar Autenticação === | ||
| + | Habilita a solicitação de usuário e senha para acessar o switch via porta serial e SSH | ||
| + | (config)# enable secret SENHA | ||
| + | (config-line)# line console 0 | ||
| + | (config-line)# password SENHA | ||
| + | (config-line)# exit | ||
| + | (config)# | ||
| + | (config-line)# line vty 0 5 | ||
| + | (config-line)# exec-timeout 10 30 | ||
| + | (config-line)# exit | ||
| + | (config)# service password-encryption | ||
| + | |||
| + | === Habilitar SSH === | ||
| + | |||
| + | # conf t | ||
| + | (config)# ip domain-name DOMINIO | ||
| + | (config)# crypto key generate rsa # Selecione 768 bits | ||
| + | (config)# ip ssh version 2 | ||
| + | (config)# ip ssh time-out 50 | ||
| + | (config)# ip ssh authentication-retries 3 | ||
| + | (config)# username ADMIN privilege 15 secret SENHA | ||
| + | (config)# line vty 0 4 | ||
| + | (config-line)# login local | ||
| + | (config-line)# transport input ssh | ||
| + | |||
| + | === Criar VLANS === | ||
| + | (config)# vlan ID # ID é um número referente a vlan | ||
| + | (config-vlan)# name NOME | ||
| + | (config-vlan)# exit | ||
| + | |||
| + | Para mostrar todas as vlans: | ||
| + | # sh vlan | ||
| + | |||
| + | === Configurar IPV4 e IPV6 === | ||
| + | É possível colocar endereço IP em uma interface (porta gi0/1 por exemplo) ou em VLANs: | ||
| + | # conf t | ||
| + | (config)# int VLANID | ||
| + | (config-if)# ip address 192.0.2.100 255.255.255.0 | ||
| + | (config-if)# ipv6 address 2001:DB8:2::100/64 | ||
| + | |||
| + | === Habilitar monitoração por SNMP === | ||
| + | (config)# snmp-server community COMMUNITY RO | ||
| + | (config)# snmp-server host IPV4 version 2c COMMUNITY | ||
| + | (config)# snmp-server host IPV6 version 2c COMMUNITY | ||
| + | |||
| + | === Upgrade IOS Firmware === | ||
| + | Download: | ||
| + | https://software.cisco.com/download/home/282867583/type/280805680/release/15.2.2E8?i=!pp&imageguid=18DA06986F1EFD28AC708FFFB2CC3DBAA1572287 | ||
| + | # copy tftp://SERVIDOR-TFTP/c2960s-universalk9-mz.152-2.E8.bin flash: | ||
| + | (conf t)# boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin | ||
| + | |||
| + | # wr mem | ||
| + | # reload | ||
| + | |||
| + | Para deletar a firmware antiga: | ||
| + | # delete /recursive /force flash:c2960s-universalk9-mz.122-55.SE7 | ||
Edição atual tal como às 18h50min de 26 de julho de 2020
Índice
Comandos importantes
Para acessar o switch após a conexão utilize o comando enable, usuário e senha serão solicitados:
Switch> enable
Salva as configurações realizadas na memória para o "disco" do switch:
# wr ou # copy running-config startup-config
Acessa o terminal de configuração, prefixo do terminal irá mudar para (config)# orientando o usuário que esta no terminal de configuração:
# configure terminal ou # conf t
Assim como o comando wr e conf t, todos os outros tem seu formato simplificado.
Reinicia o switch:
# reload
Configurações básicas
(config)# hostname NOME (config)# no ip domain-lookup
LLDP - 802.1AB
Link Layer Discovery Protocol
(config)# lldp run # show lldp neighbors
Habilitar Autenticação
Habilita a solicitação de usuário e senha para acessar o switch via porta serial e SSH
(config)# enable secret SENHA (config-line)# line console 0 (config-line)# password SENHA (config-line)# exit (config)# (config-line)# line vty 0 5 (config-line)# exec-timeout 10 30 (config-line)# exit (config)# service password-encryption
Habilitar SSH
# conf t (config)# ip domain-name DOMINIO (config)# crypto key generate rsa # Selecione 768 bits (config)# ip ssh version 2 (config)# ip ssh time-out 50 (config)# ip ssh authentication-retries 3 (config)# username ADMIN privilege 15 secret SENHA (config)# line vty 0 4 (config-line)# login local (config-line)# transport input ssh
Criar VLANS
(config)# vlan ID # ID é um número referente a vlan (config-vlan)# name NOME (config-vlan)# exit
Para mostrar todas as vlans:
# sh vlan
Configurar IPV4 e IPV6
É possível colocar endereço IP em uma interface (porta gi0/1 por exemplo) ou em VLANs:
# conf t (config)# int VLANID (config-if)# ip address 192.0.2.100 255.255.255.0 (config-if)# ipv6 address 2001:DB8:2::100/64
Habilitar monitoração por SNMP
(config)# snmp-server community COMMUNITY RO (config)# snmp-server host IPV4 version 2c COMMUNITY (config)# snmp-server host IPV6 version 2c COMMUNITY
Upgrade IOS Firmware
# copy tftp://SERVIDOR-TFTP/c2960s-universalk9-mz.152-2.E8.bin flash: (conf t)# boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
# wr mem # reload
Para deletar a firmware antiga:
# delete /recursive /force flash:c2960s-universalk9-mz.122-55.SE7