martes, 22 de octubre de 2013

Configuración de vlan en Switch Cisco

Creando VLAN en Catalyst Switch Cisco


Para el aprendizaje de como crear vlan en un switch Cisco, por ejemplo switch 2950, 2960, etc., usaremos el siguiente diagrama:

creacion-de-vlan-con-cisco-packet-tracer


Para la simulación usaremos Cisco Packet Tracer, y realizaremos las siguientes tareas:

1. Esta topología de red, va a manejar dos segmentos de redes con sus respectivas VLAN asignadas:

Vlan 10 --> Segmento de red 192.168.1.0 / 255.255.255.0 --> Vlan name: red-10
Vlan 20 --> Segmento de red 192.168.2.0 /255.255.255.0 --> Vlan name: red-20

2. PC-red-10, se le asignará la IP 192.168.1.1 / 255.255.255.0, asignado a la VLAN 10
    PC-red-20, se le asignará la IP 192.168.2.1 / 255.255.255.0, asignado a la VLAN 20
    
    Server 1, se le asignará la IP 192.168.1.100 / 255.255.255.0, asignado a la VLAN 10
    Server 0, se le asignará la IP 192.168.2.200 / 255.255.255.0, asignado a la VLAN 20

3. Switch 0, se crearán las VLAN 10 y 20, e interfaz trunk
    Switch 1, se crearán las VLAN 10 y 20, e interfaz trunk.

   Switch 0, f0/1, asignado a VLAN 10
   Switch 0, f0/2, asignado a VLAN 20
   Switch 0, G1/1, interfaz trunk

   Switch 1, f0/1, asignado a VLAN 10
   Switch 1, f0/2, asignado a VLAN 20
   Switch 1, G1/1, interfaz trunk



Comprobación de creación de VLAN


1. show vlan:

Switch0#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/12, Fa0/13, Fa0/14
                                                Fa0/15, Fa0/16, Fa0/17, Fa0/18
                                                Fa0/19, Fa0/20, Fa0/21, Fa0/22
                                                Fa0/23, Fa0/24, Gig1/2
10   red-10                           active    Fa0/1
20   red-20                           active    Fa0/2
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
10   enet  100010     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

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


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------
Switch0#


2. show int f0/1 switchport

Switch0#show int f0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 10 (red-10)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
Switch0#


3. show int f0/2 switchport

Switch0#show int f0/2 switchport
Name: Fa0/2
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 20 (red-20)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none


4. show int g1/1 switchport:

Switch0#show int g1/1 switchport
Name: Gig1/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false

Appliance trust: none


Resultados:


1. Ping desde PC-red-10 a Server 1, OK:

PC>ping 192.168.1.100

Pinging 192.168.1.100 with 32 bytes of data:

Reply from 192.168.1.100: bytes=32 time=0ms TTL=128
Reply from 192.168.1.100: bytes=32 time=0ms TTL=128
Reply from 192.168.1.100: bytes=32 time=0ms TTL=128
Reply from 192.168.1.100: bytes=32 time=0ms TTL=128

Ping statistics for 192.168.1.100:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

2. Ping desde PC-red-10 a Server 0, falla:

PC>ping 192.168.2.100

Pinging 192.168.2.100 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.2.100:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


3. Ping desde PC-red-20 a Server 1, falla:

PC>ping 192.168.1.100

Pinging 192.168.1.100 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.100:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


4. Ping desde PC-red-20 a Server 0, OK

PC>ping 192.168.2.100

Pinging 192.168.2.100 with 32 bytes of data:

Reply from 192.168.2.100: bytes=32 time=0ms TTL=128
Reply from 192.168.2.100: bytes=32 time=0ms TTL=128
Reply from 192.168.2.100: bytes=32 time=0ms TTL=128
Reply from 192.168.2.100: bytes=32 time=0ms TTL=128

Ping statistics for 192.168.2.100:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms


Conclusiones:


1. Dentro de un switch podemos tener varias VLAN creadas, esta se comunicaran con otros, en la media que:
  • Los equipos que intentan conectarse pertenescan al mismo Vlan ID
  • Los equipos están dentro del mismo segmento IP
  • Los puertos de los switch estén asignados a las respectivas VLAN que comunican con el equipo final
  • Los switch estén configurados para transportar distintas VLAN (interfaz trunk)
2. No hay comunicación entre los segmentos 192.168.1.0/24 y 192.168.2.0/24, debido a que no hay un router o un switch layer 3. Esto lo veremos en otro artículo


Lo puedes ver en Video también