router_switch_2pcs.png

Comandos de Cisco

Reset del router por software

Router>enable
Router#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
Router#reload
Proceed with reload? [confirm]

Cambiar nombre al router

Router>enable
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname NombreRouter
NombreRouter(config)#exit
NombreRouter#
%SYS-5-CONFIG_I: Configured from console by console
NombreRouter#exit

Configurar la ip y dhcp en el puerto g0/0 del router (el que conecta a un switch)

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface g0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#ip dhcp pool vlan1
Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#dns-server 8.8.8.8
Router(dhcp-config)#exit
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ip dhcp excluded-address 192.168.1.1
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#exit

Crear vlan en el router

Router>enable
Router#vlan database
% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.
Router(vlan)#vlan 10 name Ciencias
VLAN 10 added:
    Name: Ciencias
Router(vlan)#vlan 20 name Matematicas
VLAN 20 added:
    Name: Matematicas
Router(vlan)#vlan 39 name Lengua
VLAN 39 added:
    Name: Lengua
Router(vlan)#exit
APPLY completed.
Exiting....
Router#exit