En el router asignaremos las sub-interfaces fastethernet 0/0.X, y las relacionaremos con
una VLAN. Por ejemplo,
VLAN 2 tendrá como sub-interfaz en el router la direccion IP 192.168.1.1, por defecto,
la VLAN 3 con IP 192.168.2.1.
*Nótese que las sub-interfaces se encuentran en diferentes subredes, para cada VLAN.
*La conexión física del router hacia el switch es por la interfaz F0/0
Host
Los host pertenecientes a una VLAN deben tener como dirección IP la misma direccion
de subred, siendo diferente para cada VLAN.
Y con referente al GATEWAY debe ser la misma direccion IP de la subinterface a la
que pertenece su VLAN configurado en el router.
Ejemplo:
Host A (IP 192.168.1.11) pertenece al VLAN 2, entonces el GATEWAY es
192.168.1.1, y el host B (IP 192.168.2.12) pertence al VLAN 3,
entonces su GATEWAY es 192.168.2.1.
Switch 2960
La configuracion del switch es importante para la creación de VLANs, los cuales no se
van a ver.
También hay que tomar en cuenta que el modo TRUNK en la interfaz F0/1.
Switch>enable
Switch#config t
Switch(config)#vlan 2
Switch(config-vlan)#name Electronica
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#name Economia
Switch(config-vlan)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allow vlan all
Switch(config-if)#exit
Switch(config)#exit
Switch#copy run start