Vous êtes sur la page 1sur 4

COMANDOS DO PACKET – 8.3.1.

NO ROTEADOR (R1):
R1> enable
R1# config t
R1(config)# ip dhcp excluded-address 172.31.10.1 172.31.10.10
R1(config)# ip dhcp excluded-address 172.31.20.1 172.31.20.10
R1(config)# ip dhcp excluded-address 172.31.30.1 172.31.30.10
R1(config)# ip dhcp excluded-address 172.31.40.1 172.31.40.10
R1(config)# ip dhcp pool VLAN_10
R1(dhcp-config)# network 172.31.10.0 255.255.255.224
R1(dhcp-config)# default-router 172.31.10.1
R1(dhcp-config)# dns-server 209.165.201.14
R1(dhcp-config)# exit
R1(config)# ip dhcp pool VLAN_20
R1(dhcp-config)# network 172.31.20.0 255.255.255.240
R1(dhcp-config)# default-router 172.31.20.1
R1(dhcp-config)# dns-server 209.165.201.14
R1(dhcp-config)# exit
R1(config)# ip dhcp pool VLAN_30
R1(dhcp-config)# network 172.31.30.0 255.255.255.128
R1(dhcp-config)# default-router 172.31.30.1
R1(dhcp-config)# dns-server 209.165.201.14
R1(dhcp-config)# exit
R1(config)# ip dhcp pool VLAN_40
R1(dhcp-config)# network 172.31.40.0 255.255.255.192
R1(dhcp-config)# default-router 172.31.40.1
R1(dhcp-config)# dns-server 209.165.201.14
R1(dhcp-config)# exit
R1(config)# interface GigabitEthernet0/0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface GigabitEthernet0/0.10
R1(config-subif)# encapsulation dot1Q 10
R1(config-subif)# ip address 172.31.10.1 255.255.255.224
R1(config-subif)# exit
R1(config)# interface GigabitEthernet0/0.20
R1(config-subif)# encapsulation dot1Q 20
R1(config-subif)# ip address 172.31.20.1 255.255.255.240
R1(config-subif)# exit
R1(config)# interface GigabitEthernet0/0.30
R1(config-subif)# encapsulation dot1Q 30
R1(config-subif)# ip address 172.31.30.1 255.255.255.128
R1(config-subif)# exit
R1(config)# interface GigabitEthernet0/0.40
R1(config-subif)# encapsulation dot1Q 40
R1(config-subif)# ip address 172.31.40.1 255.255.255.192
R1(config-subif)# exit
R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip address dhcp
R1(config-if)# no shutdown
R1(config-if)# end

NO SWITCH 2 (S2):
S2> enable
S2# config t
S2(config)# interface range fa0/1-4
S2(config-if-range)# switchport mode trunk
S2(config-if-range)# exit
S2(config)# vlan 10
S2(config-vlan)# name Sales
S2(config-vlan)# exit
S2(config)# vlan 20
S2(config-vlan)# name Production
S2(config-vlan)# exit
S2(config)# vlan 30
S2(config-vlan)# name Marketing
S2(config-vlan)# exit
S2(config)# vlan 40
S2(config-vlan)# name HR
S2(config-vlan)# exit
S2(config)# interface range fa0/5-24
S2(config-if-range)# switchport mode access
S2(config-if-range)# exit
S2(config)# interface fa0/5
S2(config-if)# switchport access vlan 10
S2(config-if)# exit
S2(config)# interface fa0/12
S2(config-if)# switchport access vlan 20
S2(config-if)# exit
S2(config)# interface fa0/15
S2(config-if)# switchport access vlan 30
S2(config-if)# exit
S2(config)# interface fa0/20
S2(config-if)# switchport access vlan 40
S2(config-if)# end
NOS PCs:
Endereço IP: Atribuído por DHCP
Máscara de sub-rede: Atribuído por DHCP
Gateway Padrão: Atribuído por DHCP

Vous aimerez peut-être aussi