03112024 - Configuração VLAN Switch

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

03112024 - Configuração VLAN Switch

SW1(config)#interface range fast 0/1-3


SW1(config-if-range)#switchport access vlan 10
SW1(config-if-range)#exit
SW1(config)#interface range fast 0/4-6
SW1(config-if-range)#switchport access vlan 20
SW1(config-if-range)#exit
SW1(config)#interface range fast 0/7-9
SW1(config-if-range)#switchport access vlan 30
SW1(config-if-range)#exit
SW1(config)#interface range fast 0/10-12
SW1(config-if-range)#switchport access vlan 40
SW1(config-if-range)#exit
SW1(config)#interface range fast 0/13-15
SW1(config-if-range)#switchport access vlan 50
SW1(config-if-range)#exit
SW1(config)#interface range fast 0/16-18
SW1(config-if-range)#switchport access vlan 60
SW1(config-if-range)#exit
SW1(config)#interface range fast 0/19-21
SW1(config-if-range)#switchport access vlan 70
SW1(config-if-range)#exit
SW1(config)#interface range fast 0/22-24
SW1(config-if-range)#switchport access vlan 80
SW1(config-if-range)#exit
SW1(config)#do show vlan

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Gig0/1, Gig0/2
10 Compras active Fa0/1, Fa0/2, Fa0/3
20 Logistica active Fa0/4, Fa0/5, Fa0/6
30 RH active Fa0/7, Fa0/8, Fa0/9
40 Marketing active Fa0/10, Fa0/11, Fa0/12
50 TI active Fa0/13, Fa0/14, Fa0/15
60 Vendas active Fa0/16, Fa0/17, Fa0/18
70 Gerencia active Fa0/19, Fa0/20, Fa0/21
80 Recepcao active Fa0/22, Fa0/23, Fa0/24
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1
Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
30 enet 100030 1500 - - - - - 0 0
40 enet 100040 1500 - - - - - 0 0
50 enet 100050 1500 - - - - - 0 0
60 enet 100060 1500 - - - - - 0 0
70 enet 100070 1500 - - - - - 0 0
80 enet 100080 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1
Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

Remote SPAN VLANs


------------------------------------------------------------------------------

Primary Secondary Type Ports


------- --------- ----------------- ------------------------------------------
SW1(config)#

============================================
==========================Configuração VLAN’s
Roteador

Router>enable
Router#clock set 12:06:00 03 november 2024
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#banner motd "Equipamento Monitorado"
R1(config)#banner login "Sua conexao esta com o IP gravado"
R1(config)#service password-encryption
R1(config)#enable secret redes
R1(config)#line console 0
R1(config-line)#password aula
R1(config-line)#login
R1(config-line)#line aux 0
R1(config-line)#password aula
R1(config-line)#login
R1(config-line)#line vty 0 4
R1(config-line)#password aula
R1(config-line)#login
R1(config-line)#session-limit 2
R1(config-line)#exit

R1(config)#interface giga 0/1


R1(config-if)#exit
R1(config)#interface giga 0/1.10
R1(config-subif)#encapsulation dot1q 10
R1(config-subif)#ip address 192.168.0.1 255.255.255.224
R1(config-subif)#exit

R1(config)#interface giga 0/1.20


R1(config-subif)#encapsulation dot1q 20
R1(config-subif)#ip address 172.16.0.1 255.255.255.240
R1(config-subif)#exit

R1(config)#interface giga 0/10.30


%Invalid interface type and number
R1(config)#interface giga 0/1.30
R1(config-subif)#encapsulation dot1q 30
R1(config-subif)#ip address 10.0.0.1 255.255.255.128
R1(config-subif)#exit

R1(config)#interface giga 0/1.40


R1(config-subif)#encapsulation dot1q 40
R1(config-subif)#ip address 192.168.1.1 255.255.255.0
R1(config-subif)#exit

R1(config)#interface giga 0/1.50


R1(config-subif)#encapsulation dot1q 50
R1(config-subif)#ip address 172.25.25.1 255.255.255.128
R1(config-subif)#exit

R1(config)#interface giga 0/1.60


R1(config-subif)#encapsulation dot1q 60
R1(config-subif)#ip address 10.10.10.1 255.255.255.192
R1(config-subif)#exit

R1(config)#interface giga 0/1.70


R1(config-subif)#encapsulation dot1q 70
R1(config-subif)#ip address 192.168.25.1 255.255.255.224
R1(config-subif)#exit
R1(config)#interface giga 0/1.80
R1(config-subif)#encapsulation dot1q 80
R1(config-subif)#ip address 172.30.0.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface giga 0/1
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,


changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.10, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.20, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.30, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.40, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.40, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.50, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.50, changed state to up
%LINK-5-CHANGED: Interface GigabitEthernet0/1.60, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.60, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.70, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.70, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.80, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.80, changed state to up

R1(config-if)#exit
R1(config)#ip dhcp excluded-address 192.168.0.1
R1(config)#ip dhcp pool dhcp-vlan10
R1(dhcp-config)#network 192.168.0.0 255.255.255.224
R1(dhcp-config)#default-router 192.168.0.1
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 172.16.0.1


R1(config)#ip dhcp pool dhcp-vlan20
R1(dhcp-config)#network 172.16.0.0 255.255.255.240
R1(dhcp-config)#default-router 172.16.0.1
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 10.0.0.1


R1(config)#ip dhcp pool dhcp-vlan30
R1(dhcp-config)#network 10.0.0.0 255.255.255.128
R1(dhcp-config)#default-router 10.0.0.1
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 192.168.1.1


R1(config)#ip dhcp pool dhcp-vlan40
R1(dhcp-config)#network 192.168.1.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.1.1
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 172.25.25.1


R1(config)#ip dhcp pool dhcp-vlan50
R1(dhcp-config)#network 172.25.25.0 255.255.255.128
R1(dhcp-config)#default-router 172.25.25.1
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 10.10.10.1


R1(config)#ip dhcp pool dhcp-vlan60
R1(dhcp-config)#network 10.10.10.0 255.255.255.192
R1(dhcp-config)#default-router 10.10.10.1
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 192.168.25.1


R1(config)#ip dhcp pool dhcp-vlan70
R1(dhcp-config)#network 192.168.25.0 255.255.255.224
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 172.30.0.1


R1(config)#ip dhcp pool dhcp-vlan80
R1(dhcp-config)#network 172.30.0.0 255.255.255.0
R1(dhcp-config)#default-router 172.30.0.1
R1(dhcp-config)#exit

R1(config)#interface giga 0/0


R1(config-if)#ip address 172.31.0.1 255.255.255.0
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0,


changed state to up

R1(config-if)#exit
R1(config)#ip dhcp excluded-address 172.31.0.1 172.31.0.5
R1(config)#ip dhcp pool dhcp-server
R1(dhcp-config)#network 172.31.0.0 255.255.255.0
R1(dhcp-config)#default-router 172.31.0.1
R1(dhcp-config)#exit

R1(config)#interface giga 0/1


R1(config-if)#ip address 172.26.26.1 255.255.255.0
R1(config-if)#exit

R1(config)#ip dhcp excluded-address 172.26.26.1


R1(config)#ip dhcp pool dhcp-router
R1(dhcp-config)#network 172.26.26.0 255.255.255.0
R1(dhcp-config)#default-router 172.26.26.1
R1(dhcp-config)#exit

R1(config)#

You might also like