Configuración del Ethernet Switch (ESW3)

1. Creación y definición de las VLANs 

ESW3#vlan database
ESW3(vlan) #vlan 10 name finanzas
ESW3(vlan) #vlan 20 name produccion
ESW3(vlan) #vlan 30 name ventas
ESW3(vlan) #exit

2. Configuración de los puertos como Switchport y configuración de los puertos para permitir el acceso a las redes VLANs 

ESW3 #configure terminal
ESW3(config) #interface range f1/0 - 15
ESW3(config-if-range) #switchport
ESW3(config-if-range) #exit

ESW3(config) #interface f1/0
ESW3(config-if) #switchport mode trunk
ESW3(config-if) #switchport trunk encapsulation dot1q
ESW3(config-if) #switchport trunk allowed vlan add 10,20,30
ESW3(config-if) #exit

ESW3(config) #interface f1/1
ESW3(config-if) #switchport mode access
ESW3(config-if) #switchport access vlan 10
ESW3(config-if) #exit

ESW3(config) #interface f1/2
ESW3(config-if) #switchport mode access
ESW3(config-if) #switchport access vlan 20
ESW3(config-if) #exit

ESW3(config) #interface f1/3
ESW3(config-if) #switchport mode access
ESW3(config-if) #switchport access vlan 30
ESW3(config-if) #exit
ESW3(config) #exit

3. Guardar las configuraciones 

ESW3# copy running-config startup-config

Verificación de la configuración con el comando: show vlan-switch




Verificación de la configuración con el comando: show interfaces trunk


Configuración del Router (R3)

1.Configuración para definir las subinterfaces para las VLANs 

R3#configure terminal
R3(config) #interface f0/0
R3(config-if) #no shutdown
R3(config-if) #end

R3#configure terminal
R3(config) #interface f0/0.10
R3(config-subif) #encapsulation dot1Q 10
R3(config-subif) #ip address 192.168.1.193 255.255.255.192
R3(config-subif) #no shutdown
R3(config-subif) #exit

R3(config) #interface f0/0.20
R3(config-subif) #encapsulation dot1Q 20
R3(config-subif) #ip address 192.168.2.1 255.255.255.192
R3(config-subif) #no shutdown
R3(config-subif) #exit

R3(config) #interface f0/0.30
R3(config-subif) #encapsulation dot1Q 30
R3(config-subif) #ip address 192.168.2.64 255.255.255.192
R3(config-subif) #no shutdown
R3(config-subif) #exit

2. Servicio DHCP para asignación de ip de forma dinámica 

R3(config) #ip dhcp pool finanzas
R3(dhcp-config) #network 192.168.1.192 255.255.255.192
R3(dhcp-config) #default-router 192.168.1.193
R3(dhcp-config) #lease 1
R3(dhcp-config) #dns-server 192.168.2.131
R3(dhcp-config) #exit
R3(config) #ip dhcp excluded-address 192.168.1.193

 
R3(config) #ip dhcp pool produccion
R3(dhcp-config) #network 192.168.2.0 255.255.255.192
R3(dhcp-config) #default-router 192.168.2.1
R3(dhcp-config) #lease 1
R3(dhcp-config) #dns-server 192.168.2.131
R3(dhcp-config) #exit
R3(config) #ip dhcp excluded-address 192.168.2.1

 
R3(config) #ip dhcp pool ventas
R3(dhcp-config) #network 192.168.2.64 255.255.255.192
R3(dhcp-config) #default-router 192.168.2.65
R3(dhcp-config) #lease 1
R3(dhcp-config) #dns-server 192.168.2.131
R3(dhcp-config) #exit
R3(config) #ip dhcp excluded-address 192.168.2.65

3.Configuración de subinterfaces y listas de acceso para controlar el tráfico de las subinterfaces 

R3(config) #interface f0/0.10
R3(config-subif) #ip nat inside
R3(config-subif) #exit

 
R3(config) #interface f0/0.20
R3(config-subif) #ip nat inside
R3(config-subif) #exit

R3(config) #interface f0/0.30
R3(config-subif) #ip nat inside
R3(config-subif) #exit

R3(config) #access-list 10 permit 192.168.1.192 0.0.0.63
R3(config) #access-list 20 permit 192.168.2.0 0.0.0.63
R3(config) #access-list 30 permit 192.168.2.64 0.0.0.63

4. Configuración para establecer el protocolo OSPF en el router 

R3(config) #router ospf 100
R3(config-router) #network 192.168.157.0 0.0.0.255 area 0
R3(config-router) #network 192.168.1.192 0.0.0.63 area 0
R3(config-router) #network 192.168.2.0 0.0.0.63 area 0
R3(config-router) #network 192.168.2.64 0.0.0.63 area 0
R3(config-router) #end

5. Conexión Router 3 - Cloud 3

R3#configure terminal
R3(config) #interface fastEthernet 0/0
R3(config-if) #ip address dhcp
R3(config-if) #no shutdown
R3(config-if) #end 

6. Guardar las configuraciones 

R3#copy running-config startup-config

Verificación de la configuración con el comando: show ip interface br y show ip route


Configuración de PC (Ejemplo PC3)

PC3#ip dhcp