Upload
javier-molina
View
219
Download
0
Embed Size (px)
Citation preview
7/23/2019 Trabajo Prctico - DHCP + VLANs
1/9
Laboratorio DHCP + VLANs
1
Configuracin de DHCP con VLANs
Objetivos
Realizar la configuracin de un router para que funcione como servidor DHCP para mltiples VLANs, de mo-
do que pueda asignar direcciones IPs de manera dinmica a los hosts que lo soliciten.
Preparacin
Construya la topologa de red que se detalla a continuacin.
SW_PB 2950
SW_Labo1
SW_AGR
SW_Piso1
WR_Labo1
WiFi_PubWR_PIso2AP_Piso2
Gi1/1
Gi1/2
Gi1/3
Gi1/4
Gi1/5
Gi1/6
Fa0/1
Fa0/24Fa0/24
Fa0/12
Fa0/11
VLAN 50 WIFI 192.168.50.0/24
VLAN 40 WIFI_Pub
192.168.40.0/24
VLAN 1 Gestin de Red
VLAN 10 Administracin
VLAN 20 Ventas
VLAN 30 Compras
VLAN 40 RRHH
VLAN 10 Labo1 192.168.10.0/24
VLAN 1 Gestin de Red
VLAN 10 Administracin
VLAN 20 Ventas
VLAN 30 Compras
VLAN 40 RRHH
7/23/2019 Trabajo Prctico - DHCP + VLANs
2/9
Laboratorio DHCP + VLANs
2
Configuracin Switch Laboratorio1
Realice la configuracin del switch que ser utilizado para el laboratorio 1.
Switch> enable
Switch#configure terminal
Switch(config)#hostname SW_LABO1SW_LABO1(config)#exitSW_LABO1(config)#line console 0SW_LABO1(config-line)#password consolaSW_LABO1(config-line)#login
SW_LABO1(config-line)#exitSW_LABO1(config-line)#line vty 0 15
SW_LABO1(config-line)#password vty123SW_LABO1(config-line)#login
SW_LABO1(config-line)#exitSW_LABO1(config)#enable secret redes1SW_LABO1(config)#service password-encryptionSW_LABO1(config)#exit
SW_LABO1#SW_LABO1#configure terminalSW_LABO1(config)#interface range fa0/1 - 10SW_LABO1(config-if-range)#speed 100SW_LABO1(config-if-range)#duplex full
SW_LABO1(config-if-range)#switchport mode access
SW_LABO1(config-if-range)#exitSW_LABO1(config)#interface fa0/11SW_LABO1(config-if)#switchport mode trunk
SW_LABO1(config-if)#exit
SW_LABO1(config)#interfacefa0/12SW_LABO1(config-if)#description "InterfaceSW_AGRSW_LABO1(config-if)#switchport mode trunk
SW_LABO1(config-if)#exitSW_LABO1(config)#exit
SW_LABO1#
SW_LABO1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
SW_LABO1#
Configuracin Switch Planta Baja
Realice la configuracin del switch que ser utilizado para la Planta BajaSwitch> enable
Switch#configure terminal
Switch(config)#hostname SW_PBSW_PB(config)#exitSW_PB(config)#line console 0SW_PB(config-line)#password consolaSW_PB(config-line)#login
SW_PB(config-line)#exitSW_PB(config-line)#line vty 0 15SW_PB(config-line)#password vty123SW_PB(config-line)#loginSW_PB(config-line)#exitSW_PB(config)#enable secret redes1SW_PB(config)#service password-encryptionSW_PB(config)#exit
SW_PB#
SW_PB#configure terminalSW_PB(config)#interface range fa0/1 - 22SW_PB(config-if-range)#speed 100SW_PB(config-if-range)#duplex full
SW_PB(config-if-range)#switchport mode accessSW_PB(config-if-range)#exit
SW_PB(config)#interface fa0/23SW_PB(config-if)#switchport mode trunkSW_PB(config-if)#exit
7/23/2019 Trabajo Prctico - DHCP + VLANs
3/9
Laboratorio DHCP + VLANs
3
SW_PB(config)#interfacefa0/24SW_PB(config-if)#description "InterfaceSW_AGRSW_PB(config-if)#switchport mode trunkSW_PB(config-if)#exitSW_PB(config)#exit
SW_PB#
SW_PB#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
SW_PB#
Configuracin de VLANs en SW_PB
Utilizar la siguiente informacin para llevar a cabo la configuracin de las VLANs.
VLAN Vlan ID Interfaces
Gestion de Red 1 Vlan 1
Administracin 10 Fa0/1 - Fa0/5
Ventas 20 Fa0/6 - Fa0/10
Compras 30 Fa0/11 - Fa0/15
RRHH 40 Fa0/16 - Fa0/20
SW_PB>enableSW_PB#vlan databaseSW_PB(config)#vlan 10
SW_PB(config-vlan)#name AdministracionSW_PB(config-vlan)#exitSW_PB(config)#vlan 20SW_PB(config-vlan)#name VentasSW_PB(config-vlan)#exitSW_PB(config)#vlan 30SW_PB(config-vlan)#name ComprasSW_PB(config-vlan)#exitSW_PB(config)#vlan 40SW_PB(config-vlan)#name RRHHSW_PB(config-vlan)#exitSW_PB(config)#exit
SW_PB#
SW_PB#configure terminalSW_PB(config)#interfacerange fa0/1 - 5SW_PB(config-if-range)#switchport access vlan 10
SW_PB(config-if-range)#exit
SW_PB(config)#interface range fa0/6 - 10SW_PB(config-if-range)#switchport access vlan 20SW_PB(config-if-range)#exit
SW_PB(config)#interface range fa0/11 - 15
SW_PB(config-if-range)#switchport access vlan 30SW_PB(config-if-range)#exitSW_PB(config)#interface range fa0/16 - 20SW_PB(config-if-range)#switchport access vlan 40
SW_PB(config-if-range)#exitSW_PB(config)#exit
SW_PB#
Configuracin Switch Primer Piso
Realice la configuracin del switch que ser utilizado para el Piso 1
Switch> enable
Switch#configure terminalSwitch(config)#hostname SW_PISO1
SW_PISO1(config)#exitSW_PISO1(config)#line console 0SW_PISO1(config-line)#password consolaSW_PISO1(config-line)#login
SW_PISO1(config-line)#exitSW_PISO1(config-line)#line vty 0 15SW_PISO1(config-line)#password vty123
SW_PISO1(config-line)#loginSW_PISO1(config-line)#exitSW_PISO1(config)#enable secret redes1
7/23/2019 Trabajo Prctico - DHCP + VLANs
4/9
Laboratorio DHCP + VLANs
4
SW_PISO1(config)#service password-encryption
SW_PISO1(config)#exit
SW_PISO1#SW_PISO1#configure terminalSW_PISO1(config)#interface range fa0/1 - 22
SW_PISO1(config-if-range)#speed 100SW_PISO1(config-if-range)#duplex fullSW_PISO1(config-if-range)#switchport mode accessSW_PISO1(config-if-range)#exitSW_PISO1(config)#interface fa0/23SW_PISO1(config-if)#switchport mode trunkSW_PISO1(config-if)#exit
SW_PISO1(config)#interfacefa0/24SW_PISO1(config-if)#description "InterfaceSW_AGRSW_PISO1(config-if)#switchport mode trunkSW_PISO1(config-if)#exitSW_PISO1(config)#exit
SW_PISO1#
SW_PISO1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
SW_PISO1#
Configuracin de VLANs en SW_Piso1
Utilizar la siguiente informacin para llevar a cabo la configuracin de las VLANs.
VLAN Vlan ID Interfaces
Gestion de Red 1 Vlan 1
Administracin 10 Fa0/1 - Fa0/5
Ventas 20 Fa0/6 - Fa0/10
Compras 30 Fa0/11 - Fa0/15
RRHH 40 Fa0/16 - Fa0/20
SW_PISO1>
SW_PISO1>enableSW_PISO1#vlan databaseSW_PISO1(config)#vlan 10SW_PISO1(config-vlan)#name AdministracionSW_PISO1(config-vlan)#exitSW_PISO1(config)#vlan 20SW_PISO1(config-vlan)#name VentasSW_PISO1(config-vlan)#exit
SW_PISO1(config)#vlan 30SW_PISO1(config-vlan)#name ComprasSW_PISO1(config-vlan)#exitSW_PISO1(config)#vlan 40SW_PISO1(config-vlan)#name RRHHSW_PISO1(config-vlan)#exitSW_PISO1(config)#exit
SW_PISO1#
SW_PISO1#configure terminalSW_PISO1(config)#interfacerange fa0/1 - 5SW_PISO1(config-if-range)#switchport access vlan 10SW_PISO1(config-if-range)#exitSW_PISO1(config)#interface range fa0/6 - 10
SW_PISO1(config-if-range)#switchport access vlan 20
SW_PISO1(config-if-range)#exit
SW_PISO1(config)#interface range fa0/11 - 15SW_PISO1(config-if-range)#switchport access vlan 30SW_PISO1(config-if-range)#exit
SW_PISO1(config)#interface range fa0/16 - 20SW_PISO1(config-if-range)#switchport access vlan 40SW_PISO1(config-if-range)#exit
SW_PISO1(config)#exit
SW_PISO1#
7/23/2019 Trabajo Prctico - DHCP + VLANs
5/9
Laboratorio DHCP + VLANs
5
Configuracin Bsica del Router Cisco 1841
Router> enable
Router#configure terminalRouter(config)#hostname R1
R1(config)#exitR1(config)#line console 0R1(config-line)#password consolaR1(config-line)#loginR1(config-line)#exit
R1(config-line)#line vty 0 15R1(config-line)#password vty123R1(config-line)#login
R1(config-line)#exitR1(config)#enable secret redes1
R1(config)#service password-encryptionR1(config)#exit
R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#
Configuracin de SubInterfaces IP en el Router
De acuerdo a la siguiente tabla realizaremos la configuracin de las interfaces del router, de modo que exista
una interfaz en cada VLAN que pueda ser utilizada como default-gateway por los Hosts, en caso de que deban
enviar informacin a otras redes.
VLAN Vlan ID Interfaces SubRed IP Mscara Default-Gateway
Gestion de Red 1 Fastethernet1/0.1 192.168.1.0/24 255.255.255.0 192.168.1.1/24
Administracin 10 Fastethernet1/0.10 192.168.10.0/24 255.255.255.0 192.168.10.1/24
Ventas 20 Fastethernet1/0.20 192.168.20.0/24 255.255.255.0 192.168.20.1/24
Compras 30 Fastethernet1/0.30 192.168.30.0/24 255.255.255.0 192.168.30.1/24
RRHH 40 Fastethernet1/0.40 192.168.40.0/24 255.255.255.0 192.168.40.1/24
WiFi 50 Fastethernet1/0.50 192.168.50.0/24 255.255.255.0 192.168.50.1/24
R1(config)#interface fa0/1.10R1(config-subif)#encapsulation dot1q 10R1(config-subif)#ip address 192.168.10.1 255.255.255.0R1(config-subif)#exit
R1(config)#interface fa0/1.20R1(config-subif)#encapsulation dot1q 20R1(config-subif)#ip address 192.168.20.1 255.255.255.0
R1(config-subif)#exit
7/23/2019 Trabajo Prctico - DHCP + VLANs
6/9
Laboratorio DHCP + VLANs
6
R1(config)#interface fa0/1.30R1(config-subif)#encapsulation dot1q 30R1(config-subif)#ip address 192.168.30.1 255.255.255.0R1(config-subif)#exitR1(config)#interface fa0/1.40R1(config-subif)#encapsulation dot1q 40
R1(config-subif)#ip address 192.168.40.1 255.255.255.0R1(config-subif)#exitR1(config)#interface fa0/1.50R1(config-subif)#encapsulation dot1q 50
R1(config-subif)#ip address 192.168.50.1 255.255.255.0
R1(config-subif)#exit
Finalmente habilitamos administrativamente la interface fsica fa0/1 para que queden operativas todas las inter-
faces lgicas.
R1#configure terminalR1(config)#interface fa0/1R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/1.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.1, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/1.10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.10, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/1.20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.20, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/1.30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.30, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/1.40, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.40, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/1.50, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.50, changed state to up
R1(config-if)#exit
R1(config)#exit
R1#
Verificamos el estado y la configuracin de las interfaces con el siguiente comando.
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES manual up up
FastEthernet0/1.1 192.168.1.1 YES manual up up
FastEthernet0/1.10 192.168.10.1 YES manual up up
FastEthernet0/1.20 192.168.20.1 YES manual up up
FastEthernet0/1.30 192.168.30.1 YES manual up up
FastEthernet0/1.40 192.168.40.1 YES manual up up
FastEthernet0/1.50 192.168.50.1 YES manual up up
R1#
Paso 5. Configure el Pool de direcciones de DHCP para cada VLAN
Configure el Pool de direcciones IP para la VLAN 10, con los siguientes comandos:
7/23/2019 Trabajo Prctico - DHCP + VLANs
7/9
Laboratorio DHCP + VLANs
7
Ahora continuamos con la configuracin de los POOLs de direcciones IPs para el resto de lasVLANs, exluyendo las primeras 5 direcciones IP de cada subred IP, de modo que queden reser-vadas.
R1(config)#ip dhcp excluded-address 192.168.20.1 192.168.20.5R1(config)#ip dhcp excluded-address 192.168.30.1 192.168.30.5
R1(config)#ip dhcp excluded-address 192.168.40.1 192.168.40.5R1(config)#ip dhcp excluded-address 192.168.50.1 192.168.50.5
R1(config)#ip dhcp pool VLAN20R1(dhcp-config)#network 192.168.20.0 255.255.255.0R1(dhcp-config)#default-router 192.168.20.1R1(dhcp-config)#exit
R1(config)#
R1(config)#ip dhcp pool VLAN30R1(dhcp-config)#network 192.168.30.0 255.255.255.0R1(dhcp-config)#default-router 192.168.30.1R1(dhcp-config)#exit
R1(config)#
R1(config)#ip dhcp pool VLAN40R1(dhcp-config)#network 192.168.40.0 255.255.255.0R1(dhcp-config)#default-router 192.168.40.1R1(dhcp-config)#exit
R1(config)#R1(config)#ip dhcp pool VLAN50R1(dhcp-config)#network 192.168.50.0 255.255.255.0R1(dhcp-config)#default-router 192.168.50.1R1(dhcp-config)#exit
R1(config)#
7/23/2019 Trabajo Prctico - DHCP + VLANs
8/9
Laboratorio DHCP + VLANs
8
Configuracin de direccin IP y Default Gateway para Gestin
Realice la configuracin de las direcciones IP de Gestin en cada equipo segn la siguiente tabla.
Equipo Interface IP Address Mscara
Router fa0/1.1 192.168.1.1 255.255.255.0SW_AGR vlan 1 192.168.1.2 255.255.255.0
SW_Labo1 vlan 1 192.168.1.3 255.255.255.0
SW_PB vlan 1 192.168.1.4 255.255.255.0
SW_Piso1 vlan 1 192.168.1.5 255.255.255.0
WR_Piso2 LAN 192.168.1.6 255.255.255.0
AP_Piso2 LAN 192.168.1.7 255.255.255.0
WiFiPub LAN 192.168.1.8 255.255.255.0
WR_Labo1 LAN 192.168.1.9 255.255.255.0
Configuracin de la IP de Gestin en los WR
A continuacin los comandos de ejemplo para el SW_AGR
SW_AGR>enbleSW_AGR#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW_AGR(config)#interface vlan 1
SW_AGR(config-if)#ip address 192.168.1.2 255.255.255.0SW_AGR(config-if)#no shutdown
SW_AGR(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
SW_AGR(config-if)#exitSW_AGR(config)#ip default-gateway 192.168.1.1
SW_AGR(config)#exit
SW_AGR#
Ahora verifique la conectividad al router con el comando Ping.
SW_AGR#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/4/17 ms
SW_AGR#
7/23/2019 Trabajo Prctico - DHCP + VLANs
9/9
Laboratorio DHCP + VLANs
9
Verifique el funcionamiento DHCP
En cada Host en la subred conectada directamente, configure las propiedades TCP/ IP de modo que la estacin
de trabajo obtenga una direccin IP y una direccin de servidor DNS del servidor DHCP.
a. Qu direccin IP se ha asignado al Host?b. Qu otra informacin se ha asignado automticamente?
Visualice la tabla de direcciones DHCP
Conectando un Host en cada VLAN podemos observar que los 4 POOLs de direcciones IP estn asignando
direcciones IPs para sus correspondientes VLANs.
R1#show ip dhcp binding