19
Configuración de VLANs estáticas con más de un Switch, Modos Server y Cliente. Publicado el 30 octubre 2009 por admin La configuración de VLANs estaticas en un Switch es relativamente sencilla, así como la configuración de interVLANs (Interconexión entre VLAN). Entre las varias ventajas que tienen el uso de VLAN, es la permitir agrupar de formar logica grupos de usuarios, independientemente de su ubicacion fisica. Como se puede ilustrar de forma general con el siguiente esquema: Tomando en cuenta como base la siguiente topología implementada.

Configuración de VLANs estáticas con más de un Switch

Embed Size (px)

Citation preview

Page 1: Configuración de VLANs estáticas con más de un Switch

Configuración de VLANs estáticas con más de un Switch, Modos Server y Cliente.Publicado el 30 octubre 2009 por admin

La configuración de VLANs estaticas en un Switch es relativamente sencilla, así como la configuración de interVLANs (Interconexión entre VLAN).

Entre las varias ventajas que tienen el uso de VLAN, es la permitir agrupar de formar logica grupos de usuarios, independientemente de su ubicacion fisica. Como se puede ilustrar de forma general con el siguiente esquema:

Tomando en cuenta como base la siguiente topología implementada.

 

Nos propusimos configurar VLAN en más de un Switch con el fin de poder conectar usuarios en diferentes VLAN. Hemos tomado en cuenta que cada Switch está en un piso diferente, y existen

Page 2: Configuración de VLANs estáticas con más de un Switch

usuarios en la red de la VLAN 10 (Ventas), VLAN 30 (Marketing), distribuidos en diferentes pisos.  Para lo cual es necesario conectar usuario de VLAN diferentes a un equipo Switch en los diferentes pisos.

Para lograr esto de acuerdo a la documentación revisada, se debe configurar uno de los Switch en modo Server y el (los) otro(s) en modo cliente. En este caso, el Switch0 ha sido configurado como server, con dominio “UATF”, y password “cisco”, y el Switch1 como cliente y con los mismos datos del dominio y la password.

Paso a resumir los pasos a seguir para configurar lo mencionado:

 

CONFIGURAR VLAN CON MODOS VTP SERVER Y VTP CLIENT

 

SWITCH0 es el Switch Principal, debe estar en modo Server,y es donde se debn configurar las VLANs

SWITCH1 es el Switch Secundario, debe estar en modo Cliente (asignar interfaces a cada VLAN)

 

===== CONFIGURACION DEL SERVIDOR (Switch 0) ======

 

Paso 1.  Configurar SWITCH0 a modo Server.

SWITCH0(config)#vtp mode serverDevice mode already VTP SERVER.SWITCH0(config)#

Paso 2. Configurar el nombre del dominio VTP.

SWITCH0(config)#vtp domain UATFChanging VTP domain name from NULL to UATFSWITCH0(config)#

Paso 3. Configurar contraseña para el dominio VTP.

SWITCH0(config)#vtp password tauroSetting device VLAN database password to tauroSWITCH0(config)#

Page 3: Configuración de VLANs estáticas con más de un Switch

Step 4. Verificar los cambios realizados.

SWITCH0#show vtp statusVTP Version : 2onfiguration Revision : 0Maximum VLANs supported locally : 64Number of existing VLANs : 5VTP Operating Mode : ServerVTP Domain Name : UATFVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x8C 0×29 0×40 0xDD 0x7F 0x7A 0×63Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

SWITCH0#show vtp passwordVTP Password: tauroSWITCH0#

 

===== CONFIGURACION DEL CLIENTE (Switch1) ======

Paso 1. Configurar el modo VTP a Cliente.Paso 2. Configurar el nombre del dominio VTP (en este caso el mismo, UATF).Paso 3. Configurar las password del dominio VTP. (La misma password que en el Switch Server)Paso 4. Verificar los cambios realizados.

SWITCH1#show vtp statusVTP Version : 2Configuration Revision : 0Maximum VLANs supported locally : 64Number of existing VLANs : 5VTP Operating Mode : Client…………………………….

SWITCH1#show vtp passwordVTP Password: tauroSWITCH1#

 

===== CONFIGURACION DE PUERTO TRONCALES ======

Page 4: Configuración de VLANs estáticas con más de un Switch

Configurar los puertos conectados entre los Switch en modo troncal, en este caso caso los puestos fa0/24 de cada Switch. Se ha creado una vlan 300 admin, y se ha configurado en modo “trunk native” para cada interface troncal.

interface FastEthernet0/24 switchport trunk native vlan 300 switchport mode trunk

  Verificar el estado de VTP

show vtp status ((en el Switch Cliente))

 Switch1#sh vtp statusVTP Version                     : 2Configuration Revision          : 1Maximum VLANs supported locally : 255Number of existing VLANs        : 9VTP Operating Mode              : ClientVTP Domain Name                 : UATFVTP Pruning Mode                : DisabledVTP V2 Mode                     : DisabledVTP Traps Generation            : DisabledMD5 digest                      : 0xE8 0×59 0×05 0xB4 0xDD 0×29 0xFF 0×54Configuration last modified by 192.168.1.2 at 3-1-93 00:13:16Switch1#

show vlan brief (en el Switch Cliente)

 Switch1#sh vlan brief

 VLAN Name                             Status    Ports—- ——————————– ——— ——————————-1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/5                                                Fa0/6, Fa0/7, Fa0/8, Fa0/9                                                Fa0/11, Fa0/12, Fa0/13, Fa0/14                                                Fa0/15, Fa0/16, Fa0/17, Fa0/18                                                Fa0/19, Fa0/20, Fa0/21, Fa0/22                                                Fa0/2310   Ventas                           active    Fa0/420   Engenieria                       active   30   Marketing                        active    Fa0/10300  admin                            active   1002 fddi-default                     active   1003 token-ring-default               active   1004 fddinet-default                  active   

Page 5: Configuración de VLANs estáticas con más de un Switch

1005 trnet-default                    active   Switch1#

 ===== ASIGNAR PUERTOS A VLAN EN EL SWITCH CLIENTE ======

 Una verificado que el Switch Cliente ha aprendido las VLAN configurdas desde Switch Server, usando el comando switchport mode access y switchport access vlan vlan-id para asignar puerto a cada VLAN.

 Pruebas de Conexión:

Realizando pruebas de conexión desde el hosts conectados al Switch1 (que está en modo cliente) hasta la IP de loopback en el router, tenemos respuesta sin problemas.

A una estación de trabajo en la misma VLAN, pero conectado al otro Switch.

Espero pueda ayudarles el pequeño aporte sobre configuración de VLANs, InterVLAN, y modo Server y Client con más de un Switch.

Saludos

Page 6: Configuración de VLANs estáticas con más de un Switch

Usando VTP: Configurando Servers y Clientes Todos los Switches cisco están configurados por defecto como servidores VTP. Para configurar VTP (VLAN Trunking Protocol), primero necesitamos configurar el nombre de dominio, seguido por el modo de funcionamiento del Switch (Modo Server, Modo Cliente, Modo Transparente), establecer una contraseña a VTP (opcional pero si recomendado), todo esto desde configuración global.

En resumen los pasos para configurar VTP, son las siguientes:Paso 1: Lo primero es configurar que los Switches estén en modo Trunk.Paso 2: Configurar el Configurar el nombre de dominioPaso 3: Configurar el modo de funcionamiento del Switch (mode server, mode client, mode tranparent)Paso 4: Configurar una contraseña (Opcional)Paso 5: Configurar VTP Pruning en el Servidor (Opcional)Paso 6: Habilitar VTP versión 2 (Opcional)

En este ejemplo configuraremos tres Switches. El primero lo pondremos en Modo Server, el segundo en Modo Transparente y el tercero en Modo Cliente. Tal como se muestra en la siguiente imagen.

Modos VTP (VLAN Trunking Protocol).

Lo primero es configurar las interfaces donde tenemos conectados los Switches en modo Trunk.

Page 7: Configuración de VLANs estáticas con más de un Switch

Configurar la interface Fa0/1 en el Switch1.

Switch1#configure terminalSwitch1(config)#int fa0/1Switch1(config-if)#switchport mode trunkSwitch1(config-if)#endSwitch1#show int trunk

Port Mode Encapsulation Status Native vlanFa0/1 on 802.1q trunking 1

Port Vlans allowed on trunkFa0/1 1-4094

Port Vlans allowed and active in management domainFa0/1 1

Port Vlans in spanning tree forwarding state and not prunedFa0/1 1

Switch1#show run int fa0/1Building configuration...

Current configuration : 56 bytes!interface FastEthernet0/1switchport mode trunkendConfigurar Interfaces Fa0/1 y Fa0/2 en el Switch2.

Switch2#configure terminalSwitch2(config)#int fa0/1Switch2(config-if)#switchport mode trunkSwitch2(config-if)#exitSwitch2(config)#int fa0/2Switch2(config-if)#switchport mode trunkSwitch2(config-if)#endSwitch2#show int trunk

Port Mode Encapsulation Status Native vlanFa0/1 on 802.1q trunking 1Fa0/2 on 802.1q trunking 1

Port Vlans allowed on trunkFa0/1 1-4094Fa0/2 1-4094

Port Vlans allowed and active in management domainFa0/1 1Fa0/2 1

Port Vlans in spanning tree forwarding state and not prunedFa0/1 1Fa0/2 1

Page 8: Configuración de VLANs estáticas con más de un Switch

Switch2#show run int fa0/1Building configuration...

Current configuration : 56 bytes!interface FastEthernet0/1switchport mode trunkend

Switch2#show run int fa0/2Building configuration...

Current configuration : 56 bytes!interface FastEthernet0/2switchport mode trunkendConfigurar Interface Fa0/1 en el Switch3.

Switch3#configure terminalSwitch3(config)#int f0/1Switch3(config-if)#switchport mode trunkSwitch3(config-if)#endSwitch3#show int trunk

Port Mode Encapsulation Status Native vlanFa0/1 on 802.1q trunking 1

Port Vlans allowed on trunkFa0/1 1-4094

Port Vlans allowed and active in management domainFa0/1 1

Port Vlans in spanning tree forwarding state and not prunedFa0/1 1Switch3#show run int fa0/1Building configuration...

Current configuration : 56 bytes!interface FastEthernet0/1switchport mode trunkendConfigurar el nombre de dominio, Modo Server, un password y el VTP Pruning en el Switch1.

Switch1#configure terminalSwitch1(config)#vtp domain delfirosalesChanging VTP domain name from NULL to delfirosalesSwitch1(config)#vtp mode serverDevice mode already VTP SERVER.Switch1(config)#vtp password ciscoSetting device VLAN database password to ciscoSwitch1(config)#vtp pruningPruning switched on

Page 9: Configuración de VLANs estáticas con más de un Switch

Switch1(config)#endSwitch1#Verificamos la configuración de VTP en el Switch1

Switch1#show vtp statusVTP Version : 2Configuration Revision : 4Maximum VLANs supported locally : 128Number of existing VLANs : 8VTP Operating Mode : ServerVTP Domain Name : delfirosalesVTP Pruning Mode : EnabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x34 0xFC 0x71 0x0B 0x6F 0x86 0x1B 0x6DConfiguration last modified by 192.168.1.1 at 3-1-93 00:25:41Local updater ID is 192.168.1.1 on interface Vl1 (lowest numbered VLAN interface found)Switch1#Configurar un nombre de dominio, VTP en modo Transparente y un password en el Switch2.

Switch2#configure terminalSwitch2(config)#vtp domain delfirosalesDomain name already set to delfirosales.Switch2(config)#vtp mode transparentSetting device to VTP TRANSPARENT mode.Switch2(config)#vtp password ciscoSetting device VLAN database password to ciscoSwitch2(config)#endSwitch2#Verificamos la configuracion realizada en el Switch2.

Switch2#show vtp statusVTP Version : 2Configuration Revision : 0Maximum VLANs supported locally : 128Number of existing VLANs : 8VTP Operating Mode : TransparentVTP Domain Name : delfirosalesVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x6C 0x55 0x26 0x46 0x3B 0xBA 0xAD 0xA1Configuration last modified by 192.168.1.1 at 3-1-93 00:16:19Switch2#Configurar un nombre de dominio, vtp en Modo Cliente y un password en el Switch3.

Switch3#configure terminalSwitch3(config)#vtp domain delfirosalesDomain name already set to delfirosales.Switch3(config)#vtp mode clientSetting device to VTP CLIENT mode.Switch3(config)#vtp password ciscoSetting device VLAN database password to ciscoSwitch3(config)#endSwitch3#

Page 10: Configuración de VLANs estáticas con más de un Switch

Verificamos la configuración de VTP.

Switch3#show vtp statusVTP Version : 2Configuration Revision : 3Maximum VLANs supported locally : 128Number of existing VLANs : 8VTP Operating Mode : ClientVTP Domain Name : delfirosalesVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x84 0xA5 0x24 0x73 0x35 0x8C 0x3F 0x2CConfiguration last modified by 192.168.1.1 at 3-1-93 00:16:19Switch3#Hemos terminado de configurar los tres Switches, el primero en modo Server, el segundo en modo Tranparente y el tercero en modo Cliente. Ahora lo que aremos es verificar que VTP funcione correctamente, para esto debemos de saber que funciones realiza cada Switch.

Modo Server: El modo Server como lo mencione anteriormente, esta habilitado por defecto en los switches cisco, necesita al menos un servidor de dominio VTP para propagar la información de las VLANs a través de ese dominio. Un Switch en modo server puede crear, agregar y borrar VLANs. Cuando en un VTP Server se crean o borran las VLANs, esta información se envía a todos los switches conectados, asi que cualquier cambio realizado en un Switch en Modo Server se envia toda la información en todo el dominio VTP.

Modo Transparente: Un Switch en modo Transparente si recibe la información del dominio VTP, el detalle es que no ejecuta ninguna información recibida, mantiene su propia base de datos y solo envía la información de dominio VTP a todos los demas Switches.

Modo Cliente: Los Switches en Modo cliente si reciben la informacion de los servers de VTP, también envían información a los demás Switches, así que el comportamiento de este modo es parecido a los de modo Server. La diferencia es que en este modo no se pueden crear, modificar o borrar VLANs.

VTP Pruning: Habilitar VTP pruning nos da una forma de preservar el ancho de banda mediante la reduccion de paquetes broadcast, multicast y unicast. Lo que hace es darse cuenta que paquetes deben de avanzar hacia el siguiente Switch.

Crear una VLAN en el Switch1 (modo server), esto hará que el Switch2 reciba información de la creación de una VLAN pero no le hará caso, lo que hará es enviar la información al Switch3 (cliente) donde si se creara la VLAN. Vamos a verificar que VTP funcione correctamente.

Switch1#configure terminalSwitch1(config)#vlan 3Switch1(config-vlan)#name usersSwitch1(config-vlan)#endSwitch1#

Page 11: Configuración de VLANs estáticas con más de un Switch

Verficicamos el estado de VTP y las VLANs en el Switch1 (Modo Server)

Switch1#show vtp statusVTP Version : 2Configuration Revision : 5Maximum VLANs supported locally : 128Number of existing VLANs : 9VTP Operating Mode : ServerVTP Domain Name : delfirosalesVTP Pruning Mode : EnabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x68 0x34 0x28 0xF9 0xBC 0x11 0xFD 0x0DConfiguration last modified by 192.168.1.1 at 3-1-93 00:34:23Local updater ID is 192.168.1.1 on interface Vl1 (lowest numbered VLAN interface found)Switch1#Switch1#show vlan

VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/122 VLAN2 active3 users active101 VLAN101 active105 VLAN105 active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 015 enet 100015 1500 - - - - - 0 0101 enet 100101 1500 - - - - - 0 0

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------105 enet 100105 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - - 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs------------------------------------------------------------------------------

Primary Secondary Type Ports------- --------- ----------------- ------------------------------------------

Page 12: Configuración de VLANs estáticas con más de un Switch

Como podemos observar, hemos creado la VLAN 3 llamada users, ahora verificaremos el Switch2, no tiene que tener la VLAN 3 ya que esta en modo transparente.

Verficicar el estado de VTP y las VLANs en el Switch2 (Modo Transparente).

Switch2#show vtp statusVTP Version : 2Configuration Revision : 0Maximum VLANs supported locally : 128Number of existing VLANs : 8VTP Operating Mode : TransparentVTP Domain Name : delfirosalesVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x6C 0x55 0x26 0x46 0x3B 0xBA 0xAD 0xA1Configuration last modified by 192.168.1.1 at 3-1-93 00:16:19Switch2#show vlan

VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/122 VLAN2 active101 VLAN101 active105 VLAN105 active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 0101 enet 100101 1500 - - - - - 0 0105 enet 100105 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - srb 0 01004 fdnet 101004 1500 - - - ieee - 0 0

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs------------------------------------------------------------------------------

Primary Secondary Type Ports------- --------- ----------------- ------------------------------------------Tal como se muestra no se creo ninguna VLAN, pero si debió de enviar la información al Switch3 donde tiene que haber creado la VLAN 3. Asi que vamos a ver que paso en el Switch3.

Page 13: Configuración de VLANs estáticas con más de un Switch

Verficicar el estado de VTP y las VLANs en el Switch3 (Modo Cliente).

Switch3#show vtp statusVTP Version : 2Configuration Revision : 5Maximum VLANs supported locally : 128Number of existing VLANs : 9VTP Operating Mode : ClientVTP Domain Name : delfirosalesVTP Pruning Mode : EnabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x68 0x34 0x28 0xF9 0xBC 0x11 0xFD 0x0DConfiguration last modified by 192.168.1.1 at 3-1-93 00:34:23Switch3#show vlan

VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/122 VLAN2 active3 users active101 VLAN101 active105 VLAN105 active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 0101 enet 100101 1500 - - - - - 0 0105 enet 100105 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 0

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1003 tr 101003 1500 - - - - srb 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs------------------------------------------------------------------------------

Primary Secondary Type Ports------- --------- ----------------- ------------------------------------------Como podemos observar el Switch3 ha creado la VLAN 3 llamada users creada desde el Switch1 Modo Server. Tambien podemos observar que el vtp pruning esta habilita en el Switch3 aunque lo hallamos habilitado desde el Switch1.

Page 14: Configuración de VLANs estáticas con más de un Switch

Ahora en el Switch3 si tratamos de crear vlans en el switch3, no podremos crearlas ni borrarlas.

Switch3#configure terminalSwitch3(config)#vlan 10VTP VLAN configuration not allowed when device is in CLIENT mode.Switch3(config)#En cambio en el Switch2 modo tranparente si podemos crear vlans, pero se quedan en su base de datos, no se envían la información a los demás Switches.

Switch2#configure terminalSwitch2(config)#vlan 20Switch2(config-vlan)#name VLAN20Switch2(config-vlan)#exitSwitch2(config)#endSwitch2#show vlan brief

VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/122 VLAN2 active20 VLAN20 active101 VLAN101 active105 VLAN105 active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupSwitch2#En el Switch1 y el Switch3 no se crea ninguna VLAN, ya que el modo tranparente no participa en el dominio VTP pero si recibe y envia la informacion a los diferentes Switches.

Switch1

Switch1#show vlan brief

VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/122 VLAN2 active3 users active101 VLAN101 active105 VLAN105 active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup

Page 15: Configuración de VLANs estáticas con más de un Switch

1005 trnet-default act/unsupSwitch1#Switch2

Switch3#show vlan brief

VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/122 VLAN2 active3 users active101 VLAN101 active105 VLAN105 active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupSwitch3#Si se te ha olvidado el password de VTP

Switch3#show vtp passwordVTP Password: ciscoSwitch3#