Acerca de Linux, BSD y notas personales

Archives for Cisco category

cisco 1841 password recovery

 Dear you find the detail password recovery procedue for Cisco 1841 router from the below link

http://www.cisco.com/en/US/customer/products/hw/routers/ps221/products_password_recovery09186a0080094773.shtml
 or else follow the below steps

Read more… »

vlans cisco 2950


Configuración básica de VLAN

Para crear VLANs, el switch debe estar en modo VTP “Server”, o “Transparent”. “Server” es el default.

 

show vtp status

show vlan

vlan database

vtp server

vlan 2 name admin (crear la VLAN)

vlan 3 name contabil

exit

show vlan

configure terminal

interface f0/1

switchport access vlan 2 (asigna el puerto a la VLAN 2)

interface f0/2

end

Ver también: interface range, para configurar varias interfaces a la vez.

Para borrar una vlan:

vlan database

no vlan 2 (borrar la VLAN especificada)

 

Para quitar la asignación de VLAN a un puerto:

configure terminal

interface f0/1

no switchport access vlan 2

 

Para volver todo el switch al default de fábrica (ver http://www.cisco.com/warp/public/473/156.html):

erase startup-config (borra configuración, excepto VLAN)

delete flash:vlan.dat (borra la información de VLAN)

reload

 

Enrutamiento entre VLANs

Ejemplo: Configurar un solo switch con dos diferentes VLANs (con los comandos de arriba). Conmutar el tráfico entre las dos VLANs con un router.

Una troncal del switch se conectará a una interface FastEthernet del router, la cual se subdivide en dos sub-interfaces (una para cada VLAN).

Comandos para el switch:

vtp mode transparent

o también: vtp mode server

(El default es “server”, que sirve para este ejercicio.)

interface F0/5

switchport mode trunk

(comandos para encapsulación)

switchport trunk allow vlan all

El switch 2950 sólo soporta un encapsulamiento, y no soporta comandos para cambiar el encapsulamiento. Sin embargo, es importante recordar que en otros switches posiblemente se tenga que seleccionar el encapsulamiento correcto (dot1q, o isl).

Comandos para el router:

interface F0 (o: F0/0)

no shutdown

interface F0.2 (o: F0/0.2) (selecciona una sub-interface)

encapsulation dot1q 2

ip address …

interface F0.3

encapsulation dot1q 3

ip address …

(Repetir para cada VLAN.)

 

Comandos para los hosts:

Obviamente, aparte de configurar el router y el switch, también se deben configurar los hosts conectados. Específicamente, se tiene que asignar:

·      La dirección IP. Se debe recordar que (1) la dirección IP debe estar en la misma subred que la sub-interfaz correspondiente del router, y (2) para la configuración de VLANs en general, diferentes VLANs corresponden a diferentes subredes.

·      La máscara de subred.

·      La puerta de enlace, que debe apuntar a la sub-interfaz correspondiente de router.

 

Referencias:

VLANS en general: http://www.cisco.com/warp/public/793/lan_switching/3.html

Switching entre VLANs: http://www.cisco.com/en/US/tech/tk389/tk390/technologies_configuration_example09186a00800949fd.shtml

Para otros switches o routers, por favor buscar en la documentación de Cisco Systems. (Una búsqueda en Internet es muy útil en este caso.)

useful shorcurts

tips

1) Para desplegar los mensajes de monitoreo sin que molesten:

line con 0
logging synchronous

line vty 0 4
logging synchronous

2) Para prolongar los 5 minutos a 30 minutos de que te saca el sistema:

exec-timeout 30 0

 

3) Para evitar que busque dominios cuando te equivocas al dar un comando

no ip domain-lookup

4) Crear aliases
alias exec s show ip interface brief
 

Configuring Switch Security

enable password:

switch>en
switch#conf t
switch(config)#enable secret cisco

Protect COM port
switch>en
switch#conf t
switch(config)#line console 0
password cisco
login

( needs login to ask the password for the COM port)

renember copy the running-config to startup-config

COM password

line con 0  
 password cisco
 login   

Telnet password

line vty 0 4
 password cisco
 login   
line vty 5 15
 password cisco
 login   
———————————————-
To encrypt passwords
———————————————-

switch(config)#service password-encryption

line con 0
 password 7 DGASDFSDFSFD
 login
line vty 0 4
 password 7 0EGGRGEGAGA1D
 login
line vty 5 15
 password 7 020ERG23WFAB
 login
!
end

!!!!!False security:!!!!
 Don’t use the old type 7 passwords anymore. Use the new “secret” keyword only.
http://www.ifm.net.nz/cookbooks/passwordcracker.html

weaker with password 7
 but is faster!
less process overhead!

SWITCH_cisco(config)#banner ?
  LINE            c banner-text c, where ‘c’ is a delimiting character
  exec            Set EXEC process creation banner
  incoming        Set incoming terminal line banner
  login           Set login banner
  motd            Set Message of the Day banner
  prompt-timeout  Set Message for login authentication timeout
  slip-ppp        Set Message for SLIP/PPP

SWITCH_CISCO(config)#banner mod ]
Enter TEXT message.  End with the character ‘m’.
***********************************
DO NOT LOG ON
***********************************

DONT USE TELNET
CONFIGURATION SSH

Primero configurar usuario y password
SWITCH_CISCO(config)#username admin password cisco

Después necesitamos un nombre de dominio para generar un certificado
SWITCH_CISCO(config)#ip domain-name miempresa.com

generar el certificado
SWITCH_CISCO(config)#crypto key generate rsa

How many bits in the modulus[512]:1024

SWITCH_CISCO(config)#ip ssh version 2

SWITCH_CISCO(config)# line vty 0 4 
SWITCH_CISCO(config-line)#transport input ssh

 

Cisco Initial Switch Configuration

Switch>enable
Switch#configure terminal
Switch(config)#hostname switchPedrito
switchPedrito(config)#
switchPedrito(config)#interface vlan 1

switchPedrito(config-if)#ip address 192.168.1.253 255.255.255.0 ?
secondary Make this IP address a secondary addres
<cr>

switchPedrito(config-if)#ip address 192.168.1.253 255.255.255.0
switchPedrito(config-if)#end
switchPedrito(config)#

switchPedrito#show interfaces vlan 1

Vlan1 is administratively down, line protocol is down
  Hardware is EtherSVI, address is 001d.e6e1.8e40 (bia 001d.e6e1.8e40)
  Internet address is 192.168.1.253/24
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:00, output 00:00:30, output hang never
  Last clearing of “show interface” counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     304702 packets input, 25120045 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     139614 packets output, 138045113 bytes, 0 underruns
     0 output errors, 0 interface resets
     0 output buffer failures, 0 output buffers swapped out

By default all interfaces are administratively down
its means that the interface is shutdown, so you have to negate

switchPedrito#conf t
switchPedrito(config)#int vlan 1
switchPedrito(config-if)#no shutdown

00:20:56: %LINK-3–UPDOWN: Interface Vlan1, changed state to up
switchPedrito(config-if)#exit

Default Gateway ( It has to be Global Configuration )
switchPedrito(config)#ip default-gateway 192.168.1.254

Everything is in RAM so you have to save it. Its in running-config
switchPedrito#show running-config

#show running-config
Building configuration…

Current configuration : 2838 bytes
!
File Attachment: show running-config (2 KB)

!!!!!!!IMPORTANT TO SAVE CONFIGURATION TO SOMETHING MORE STABLE TO START-CONFIG!!!!!!!!

switchPedrito#copy running-config startup-config

 

Cisco Lights

 

SYSTEM Green good ( amber bad)
RPS ( Redundant Power Supply)
Stat ( Status of the port )
Util ( Utilization: show the current utilization of the switch )
Duplex ( Duplex: Working in full duplex mode )
Speed ( Speed: 100mb or 1000mb )

 

Clock Set

clock set 13:16:30 march 02 2008

Switch> User Mode (user exec)
Switch# Priviliged Mode ( Priviliged Exec)
Switch(config)# Global Configuration Mode

to go to Priviliged Mode:
Switch> enable
Switch#

Global Configuration Mode:
Switch#configure terminal
Switch(config)#hostname carlos_switch

show history

Navigation:
ctrl a move the cursor to the start of the line
ctrl e move the cursor to the end of the line

 

Connecting to the Cisco Switch

HyperTerm
TeraTerm
MiniCOM
SecureCRT
Putty

Set It to Connect via COM port with:

Baud Rate: 9600
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control: None

 

Cisco Catalyst 2960G-48TC 44

Cisco Catalyst 2960G-48TC 44