logo

Cisco – Rotas entre vlans – aula 02 – Nivel: iniciante

Aula ministrada na faculdade tiradentes (FITS) em 27-10-2014

Obs.: Ao final deste post existe um laboratório pronto para ser configurado com os comandos sugeridos abaixo. Faça o download e configure-o!

Proposta de laboratorio cisco – aula pratica 27/12/2014

Cenário:

CONFIGURAÇÃO DO CENARIO

1) crie 3 vlans em sw_core, sendo:

vlan ID 10 – vlan_administrativo – rede: 192.168.1.0/24
vlan ID 20 – vlan_alunos – rede: 10.0.0.0/8
vlan ID 100 – vlan_reitoria – rede: 172.16.0.0/16

2) Portas:

vlan ID 10 – fastethernet 0/1 – 10
vlan ID 20 – fastethernet 0/11 – 20
vlan ID 100 – fastethernet 0/21 – 23

Passos de configuraçao:

SW_core

Passo 1) Configurando o ambiente de vlans em SW-core

Switch>enable
Switch#configure terminal
Switch(config)#vtp mode server
Device mode already VTP SERVER.
Switch(config)#vtp domain vtp_fits
Changing VTP domain name from NULL to vtp_fits
Switch(config)#vtp password s3nha
Setting device VLAN database password to s3nha
Switch(config)#vlan 10
Switch(config-vlan)#name vlan_administrativo
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name vlan_alunos
Switch(config-vlan)#exit
Switch(config)#vlan 100
Switch(config-vlan)#name vlan_reitoria
Switch(config-vlan)#exit
Switch(config)#do show vlan
Switch(config)#interface gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface gigabitEthernet 1/2
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/24
Switch(config-if)#switchport mode trunk

Sw_bloco-A

Passo 1) Configurando o ambiente de vlans em SW-bloco-A

Switch>enable
Switch#conf t
Switch(config)#interface gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#vtp domain vtp_fits
Changing VTP domain name from NULL to vtp_fits
Switch(config)#vtp password s3nha
Setting device VLAN database password to s3nha
Switch(config)#do show vlan

Passo 2) Vinculando as portas dw SW_bloco-A às respectivas vlans:

Switch(config)#interface range fastEthernet 0/1 – 10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#interface range fastEthernet 0/11 – 20
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#exit
Switch(config)#interface range fastEthernet 0/21 – 23
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 100
Switch(config-if-range)#exit
Switch(config)#

Sw_bloco-B

Passo 1) Configurando o ambiente de vlans em SW-bloco-B

Switch>enable
Switch#conf t
Switch(config)#interface gigabitEthernet 1/2
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#vtp domain vtp_fits
Changing VTP domain name from NULL to vtp_fits
Switch(config)#vtp password s3nha
Setting device VLAN database password to s3nha

Passo 2) Vinculando as portas dw SW_bloco-B às respectivas vlans:

Switch(config)#interface range fastEthernet 0/1 – 10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#interface range fastEthernet 0/11 – 20
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#exit
Switch(config)#interface range fastEthernet 0/21 – 23
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 100
Switch(config-if-range)#exit
Switch(config)#

RT_fits

Passo 01) Configurar as interfaces virtuais que servirão de rotas entre as vlans e o link entre o roteador e o switch

Router>enable
Router#conf t
Router(config)#interface gigabitEthernet 0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.1.254 255.255.255.0
Router(config-subif)#exit
Router(config)#interface gigabitEthernet 0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 10.254.254.254 255.0.0.0
Router(config-subif)#exit
Router(config)#interface gigabitEthernet 0/0.100
Router(config-subif)#encapsulation dot1Q 100
Router(config-subif)#ip address 172.16.254.254 255.255.0.0
Router(config-subif)#exit
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#no shutdown
Router(config-if)#
Router(config-if)#