R1# configure terminal
R1(config)# interface fa0/0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface fastEthernet 0/0.1
R1(config-subif)# encapsulation dot1Q 2
R1(config-subif)# ip address 192.168.100.1 255.255.255.248
R1(config-subif)# exit
R1(config)#
Continuando a configuração no roteador 1, segue a configuração da Vlan 3 no roteador R1:
R1(config)# interface fa0/1
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface fastEthernet 0/1.1
R1(config-subif)# encapsulation dot1Q 3
R1(config-subif)# ip address 192.168.10.1 255.255.255.240
R1(config-subif)# exit
Continuando a configuração no roteador 1, segue a configuração de DHCP no roteador R1 para as vlans 2 e 3 :
R1(config)# ip dhcp pool redevlan2
R1(dhcp-config)# network 192.168.100.0 255.255.255.248
R1(dhcp-config)# default-router 192.168.100.1
R1(dhcp-config)# exit
R1(config)# ip dhcp pool redevlan3
R1(dhcp-config)# network 192.168.10.0 255.255.255.240
R1(dhcp-config)# default-router 192.168.100.1
R1(dhcp-config)# end
R1(config)# write
Configuração do Switch1
Switch> enable
Switch# configure terminal
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan all
Switch(config-if)# exit
Switch(config)# interface fa0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 3
Switch(config-if)# end
Switch# write
Configuração do Switch2
Switch# configure terminal
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan all
Switch(config-if)# exit
Switch(config)# interface fa0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 2
Switch(config-if)# end
Switch# write
Nos desktops, é necessário alterar o IP Configuration para a opção de DHCP.