terça-feira, 22 de agosto de 2017

3 - VLANS PARTE 4

VTP e DHCP


Usaremos a técnica do VTP para gerenciar Vlans e aprenderemos a configurar um servidor DHCP a partir de um switch.

Versão do Cisco Packet Tracer usada:
7.1.0.0222

Equipamentos necessários:
3 - Switches-PT-Empty

Módulos dos switches:
4 - PT-SWITCH-NM-1FGE
6 - PT-SWITCH-NM-1CGE
1 - Router 2911


Topologia:

 O VTP (Vlan Trunk Protocol) é um protocolo que trabalha na camada 2 e ajuda muito quando se administra uma rede com vários switches e vlans. 
 Podemos utilizar três modos no VTP:
  • Server - Permite criar Vlans e é servidor para os clients
  • Client - Não permite criar Vlans e recebe as vlans dos servers
  • Transparent - Não participa do domínio VTP e permite criação de Vlans
 Podemos utilizar as versões 1, 2 e 3. A única diferença significativa entre as vesões está na versão 3.
 A v3 suporta vlans extendidas, PVLAN e MST.
 Também é necessário configurar um domínio no VTP e muito importante por questões de segunça a senha do VTP.


Na topologia cada switch está configurado em um modo para maior entendimento.

Para faciltar as próximas topologias e iremos aprender a configurar um servidor dhcp básico no switch.

 Let's go...


 Entre os switches iremos configurar um trunk passando todas as vlans para demonstrar que o trunks não está filtrando as vlans.

 As portas conectadas ao Pc serão configuradas como portas de acesso com vlans diferente. Os Pcs irão receber Ips via DHCP.

 Modos VTP:
Switch1 - Client
Switch2 - Server
Switch3 - Transparent

Configuração VTP Switch2:
Switch2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch2(config)#vtp domain NetInfraBR
Switch2(config)#vtp version 2
Switch2(config)#vtp password Senha123
Switch2(config)#vtp mode server

Configuração VTP Switch1:
Switch1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch1(config)#vtp domain NetInfraBR
Switch1(config)#vtp version 2
Switch1(config)#vtp password Senha123
Switch1(config)#vtp mode client

Configuração VTP Switch3:
Switch3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch3(config)#vtp domain NetInfraBR
Switch3(config)#vtp version 2
Switch3(config)#vtp password Senha123
Switch3(config)#vtp mode transparent

Após a configuração, precisamos verificar se está tudo ok, se dermos show running-config, não conseguiremos veremos os comandos. Então precisamos utilizar os comandos abaixo:

Switch2#show vtp password
VTP Password: Senha123
Switch2#show vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 255
Number of existing VLANs : 9
VTP Operating Mode : Server
VTP Domain Name : NetInfraBR
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0xDD 0xA1 0x92 0xC4 0x91 0xE4 0x44 0x01
Configuration last modified by 192.168.100.2 at 3-1-93 00:07:26

Local updater ID is 192.168.100.2 on interface Vl100 (lowest numbered VLAN interface found)

Switch1#show vtp password
VTP Password: Senha123
Switch1#
Switch1#show vtp status
VTP Version : 2
Configuration Revision : 5
Maximum VLANs supported locally : 255
Number of existing VLANs : 9
VTP Operating Mode : Client
VTP Domain Name : NetInfraBR
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0x4A 0x09 0xCD 0x3C 0x0C 0xB0 0xBE 0x4A

Configuration last modified by 192.168.100.1 at 3-1-93 00:26:11

Switch3#show vtp password
VTP Password: Senha123
Switch3#show vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 255
Number of existing VLANs : 7
VTP Operating Mode : Transparent
VTP Domain Name : NetInfraBR
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0x79 0xD3 0x4B 0x52 0xEE 0xA7 0x87 0x8F

Configuration last modified by 0.0.0.0 at 3-1-93 01:09:38

Temos todas as informações necessárias para verificar o VTP. Importante resaltar que se houver mais de um VTP server o client irá atualizar sempre pelo que a configuration revision mais alta 

Configuração interfaces:
Switch1:
interface GigabitEthernet3/1
switchport access vlan 120
switchport mode access
!
interface GigabitEthernet4/1
switchport access vlan 110
switchport mode access
!
interface GigabitEthernet5/1
switchport access vlan 100

switchport mode access

Switch2:
interface GigabitEthernet0/1
switchport access vlan 100
switchport mode access
!
interface GigabitEthernet1/1
switchport access vlan 110
switchport mode access
!
interface GigabitEthernet2/1
switchport access vlan 120

switchport mode access


Iremos configurar 3 pools DHCP e também iremos excluir alguns IPs que não queremos que os clientes recebam.

Configuração DHCP:

ip dhcp pool VLAN100
network 192.168.100.0 255.255.255.0
default-router 192.168.100.1
dns-server 192.168.100.254

ip dhcp pool VLAN110
network 192.168.110.0 255.255.255.0
default-router 192.168.110.1
dns-server 192.168.110.254

ip dhcp pool VLAN120
network 192.168.120.0 255.255.255.0
default-router 192.168.120.1

dns-server 192.168.120.254

ip dhcp excluded-address 192.168.100.0 192.168.100.10
ip dhcp excluded-address 192.168.100.250 192.168.100.255
ip dhcp excluded-address 192.168.110.250 192.168.110.255
ip dhcp excluded-address 192.168.110.0 192.168.110.10
ip dhcp excluded-address 192.168.120.0 192.168.120.10
ip dhcp excluded-address 192.168.120.250 192.168.120.255
!
PC com DHCP ativado:

Teste de conectividade:

C:\>ping 192.168.100.12

Pinging 192.168.100.12 with 32 bytes of data:

Reply from 192.168.100.12: bytes=32 time=34ms TTL=127
Reply from 192.168.100.12: bytes=32 time=38ms TTL=127
Reply from 192.168.100.12: bytes=32 time=12ms TTL=127
Reply from 192.168.100.12: bytes=32 time=26ms TTL=127

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

Minimum = 12ms, Maximum = 38ms, Average = 27ms


Nenhum comentário:

Postar um comentário