Comandos Switch
Comandos Switch
*CONFIGURACION BASICA
Switch>enable
Switch#configure terminal
Switch(config)#hostname MESA2
MESA2(config)#banner motd #SOLO PERSONAL AUTORIZADO#
MESA2(config)#enable secret cisco
MESA2(config)#line console 0
MESA2(config-line)#password cisco
MESA2(config-line)#login
MESA2(config-line)#exit
MESA2(config)#line vty 0 15
MESA2(config-line)#password cisco
MESA2(config-line)#login
MESA2(config-line)#exit
MESA2(config)#exit
MESA2#
*CREACION DE LA VLAN
MESA2#
MESA2(vlan)#vlan 2 name empresa1
VLAN 2 added:
Name: empresa1
MESA2(vlan)#vlan 3 name empresa2
VLAN 3 added:
Name: empresa2
MESA2(vlan)#vlan 4 name empresa3
VLAN 4 added:
Name: empresa3
MESA2(vlan)#exit
APPLY completed.
Exiting....
*ASIGNACION DE PUERTOS A LA VLAN
MESA2#configure terminal
MESA2(config)#interface range fastethernet 0/1 -4
MESA2(config-if-range)#switchport mode access
MESA2(config-if-range)#switchport access vlan 2
MESA2(config-if-range)#exit
MESA2(config)#interface range fastethernet 0/5 -8
MESA2(config-if-range)#switchport mode access
MESA2(config-if-range)#switchport access vlan 3
MESA2(config-if-range)#exit
MESA2(config)#interface range fastethernet 0/9 -12
MESA2(config-if-range)#switchport mode access
MESA2(config-if-range)#switchport access vlan 3
MESA2(config-if-range)#switchport access vlan 4
MESA2(config-if-range)#exit
MESA2(config)#interface range fastethernet 0/5 -8
MESA2(config-if-range)#switchport mode access
MESA2(config-if-range)#switchport access vlan 3
MESA2(config-if-range)#exit
MESA2(config)#exit
*DIRECCIONES MAC CONECTADAS DIRECTAMENTE
MESA2#show mac-address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
All 001a.6da9.40c0 STATIC CPU
All 0100.0ccc.cccc STATIC CPU
All 0100.0ccc.cccd STATIC CPU
All 0100.0cdd.dddd STATIC CPU
2 0013.d3de.1ebc DYNAMIC Fa0/9
2 0026.540e.8c50 DYNAMIC Fa0/10
Total Mac Addresses for this criterion: 6
*ASIGNAR DIRECCION MAC AL PUERTO
MESA2#configure terminal
MESA2(config)#$tic 0026.540e.8c50 interface fastethernet 0/10 vlan 2
MESA2(config)#$tic 0013.d3de.1ebc interface fastethernet 0/9 vlan 2
MESA2(config)#
MESA2#configure terminal
MESA2(config)#no mac-address-table static 0013.d3de.1ebc interface fastetherne$
MESA2(config)#exit
*VLAN CREADAS Y PUERTOS ASIGNADOS
MESA2#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24
2 empresa1 active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19
3 empresa2 active Fa0/5, Fa0/6, Fa0/7, Fa0/8
4 empresa3 active Fa0/9, Fa0/10, Fa0/11, Fa0/12
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
*ELIMINAR UNA VLAN
MESA2#vlan database
MESA2(vlan)#no vlan 2
Deleting VLAN 2...
MESA2(vlan)#exit
APPLY completed.
Exiting....
*ELIMINAR TODAS LAS VLANs.
MESA2#delete flash:vlan.dat
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]
*TRUNKING
MESA2#configure terminal
MESA2(config)#interface fastethernet 0/1
MESA2(config-if)#switchport modetrunk
MESA2(config-if)#switchport trunk allowed vlan all
MESA2(config-if)#