Archive for March 2nd, 2008
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 Part 2
Posted by carlosap in Blog Personal on March 2nd, 2008
switch>en
switch#show ip inter brief
switch>show ip interface brief
Interface IP-Address OK? Method Status Protocol
Vlan1 192.168.1.253 YES TFTP up up
GigabitEthernet0/1 unassigned YES unset up up
GigabitEthernet0/2 unassigned YES unset up up
GigabitEthernet0/3 unassigned YES unset up up
GigabitEthernet0/4 unassigned YES unset up up
GigabitEthernet0/5 unassigned YES unset up up
GigabitEthernet0/6 unassigned YES unset down down
GigabitEthernet0/7 unassigned YES unset up up
GigabitEthernet0/8 unassigned YES unset down down
SWITCH_SSY#show mac address-table
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
All 0100.0ccc.cccc STATIC CPU
All 0100.0ccc.cccd STATIC CPU
All ffff.ffff.ffff STATIC CPU
1 000c.2967.a317 DYNAMIC Gi0/4
1 0014.d139.b230 DYNAMIC Gi0/15
1 0016.3e14.9258 DYNAMIC Gi0/3
Total Mac Addresses for this criterion: 32
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