E chegou o momento de aprender um pouco de Switchs e Routers, cair dentro da console do Switch e desenrolar, então aqui alguns comandos base para iniciarmos os trabalhos.
Modos de operações em Switchs, primeiro precisamos entrar em modo de usuário privilegiado com "enable", e para editar temos o "configure t OU conf t":
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
enable Turn on privileged commands configure Enter configuration mode SW03-CISCO>enable SW03-CISCO#conf t Enter configuration commands, one per line. End with CNTL/Z. SW03-CISCO(config)#exit SW03-CISCO# %SYS-5-CONFIG_I: Configured from console by console SW03-CISCO#disable SW03-CISCO> |
Verificar informações da caixa, como modelo, release do rom:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
Switch#show version Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by Cisco Systems, Inc. Compiled Wed 12-Oct-05 22:05 by pt_team ROM: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4) System returned to ROM by power-on Cisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory. 24 FastEthernet/IEEE 802.3 interface(s) 2 Gigabit Ethernet/IEEE 802.3 interface(s) 63488K bytes of flash-simulated non-volatile configuration memory. Base ethernet MAC Address : 00E0.A3ED.12AA Motherboard assembly number : 73-9832-06 Power supply part number : 341-0097-02 Motherboard serial number : FOC103248MJ Power supply serial number : DCA102133JA Model revision number : B0 Motherboard revision number : C0 Model number : WS-C2960-24TT System serial number : FOC1033Z1EY Top Assembly Part Number : 800-26671-02 Top Assembly Revision Number : B0 Version ID : V02 CLEI Code Number : COM3K00BRA Hardware Board Revision Number : 0x01 Switch Ports Model SW Version SW Image ------ ----- ----- ---------- ---------- * 1 26 WS-C2960-24TT 12.2 C2960-LANBASE-M Configuration register is 0xF |
Manipular configurações em switchs gerenciáveis são diferentes das habituais configurações feitas em SO ao qual edita o conf salva e reinicia o serviço, todo comando é carregado em memoria e vigorado e após salvamos para que no próximo reboot da caixa a configuração seja carregada, portando mandou o comando ele já é vigorado, então tome cuidado em produção, abaixo o comando para listar as configurações atuais:
1 2 3 4 5 6 7 8 9 10 11 |
Switch#show running-config Building configuration... Current configuration : 1076 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch |
Após editar, abaixo comando para salvar:
1 2 3 4 |
SW03-CISCO#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] |
Listar ARP Table e limpar caso necessário
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Switch#show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0001.97c5.52aa DYNAMIC Fa0/2 1 0010.11a8.8a01 DYNAMIC Fa0/3 1 00e0.b0bd.ad83 DYNAMIC Fa0/1 Switch#clear mac address-table dynamic Switch#show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- |
Referências: