4
respostas

Hora da Prática

Estrutura física da rede com laboratórios: A, B e C

Cada PC terá acesso a um departamento diferente nos laboratórios.

Insira aqui a descrição dessa imagem para ajudar na acessibilidade

Criação das VLANs

  1. SWITCH-LAB-A > CLI
    1. Entrando no terminal:
      Switch>enable
      Switch#configure terminal
      Enter configuration commands, one per line.  End with CNTL/Z.
      Switch(config)#
      
    2. Definindo os nomes da VLANs (departamentos):
      Switch(config)#vlan 10
      Switch(config-vlan)#name departamento_a
      Switch(config-vlan)#exit
      Switch(config)#vlan 20
      Switch(config-vlan)#name departamento_b
      Switch(config-vlan)#exit
      Switch(config)#vlan 30
      Switch(config-vlan)#name departamento_c
      Switch(config-vlan)#
      
    3. Verificando as VLANs criadas e nomeadas:
      Switch>show vlan brief
      
      VLAN Name                                           Status      Ports
      ------ -------------------------------- --------- -------------------------------
              ...
      10       departamento_a                         active    
      20      departamento_b                         active    
      30      departamento_c                         active    
              ...
      
    4. Vinculando as VLANs às interfaces
      Switch(config)#interface Fa0/1
      Switch(config-if)#switchport mode access
      Switch(config-if)#switchport access vlan 10
      Switch(config-if)#exit
      
    5. Após realizar esse processo nas interfaces Fa0/2 e Fa0/3, ficou assim
      VLAN Name                                           Status      Ports
      ------ -------------------------------- --------- -------------------------------
              ...
      10       departamento_a                          active      Fa0/1
      20       departamento_b                         active      Fa0/2
      30       departamento_c                         active      Fa0/3
              ...
      
  2. SWITCH-LAB-B > CLI
    • Verificando as VLANs
      Switch#show vlan brief
      
      VLAN Name                                           Status     Ports
      ---- -------------------------------- --------- -------------------------------
      1    default                   active      Fa0/6, Fa0/7, Fa0/8, Fa0/9
                                               Fa0/10, Fa0/11, Fa0/12, Fa0/13
                                               Fa0/14, Fa0/15, Fa0/16, Fa0/17
                                               Fa0/18, Fa0/19, Fa0/20, Fa0/21
                                               Fa0/22, Fa0/23, Fa0/24
      1002  fddi-default             active    
      1003  token-ring-default       active    
      1004  fddinet-default          active    
      1005  trnet-default            active    
      Switch#
      
    • Executei os passos 1.1, 1.2, 1.3, 1.4 e 1.5 anteriores
      Switch#show vlan brief
      
      VLAN Name                             Status    Ports
      ---- -------------------------------- --------- -------------------------------
              ...
      10   departamento_a                   active    Fa0/1
      20   departamento_b                   active    Fa0/2
      30   departamento_c                   active    Fa0/3
              ...
      
  3. SWITCH-LAB-C: Repeti aqui os passos 1.1, 1.2, 1.3, 1.4 e 1.5.
    Switch#show vlan brief
    
    VLAN Name                             Status    Ports
    ---- -------------------------------- --------- -------------------------------
            ...
    10   departamento_a                   active    Fa0/1
    20   departamento_b                   active    Fa0/2
    30   departamento_c                   active    Fa0/3
            ... 
    
  4. Testando a conectividade com IPs estáticos
    Cisco Packet Tracer PC Command Line 1.0
    C:\>ping 193.65.0.7
    Ping statistics for 193.65.0.7:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    
    C:\>ping 193.65.0.4
    Ping statistics for 193.65.0.4:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    
    C:\>ping 193.65.0.3
    Ping statistics for 193.65.0.3:
        Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
    
    Esses testes foram feitos entre o PC-1LAB-A (193.65.0.1) com:
    • PC-1LAB-C: 193.65.0.7 (Conectou) (Essa conectividade indica que os Switches já estão trabalhando no modo Trunk por padrão.)
    • PC-1LAB-B: 193.65.0.4 (conectou)
    • PC-3LAB-A: 193.65.0.3 (Falhou)
      Esses resultados sugerem que há conexão entre dispositivos no mesmo departamento. Mas não há conexão entre dispositivos em departamentos distintos; ou seja, sugere que os departamentos não estão desconectados ainda.

Matricule-se agora e aproveite até 50% OFF

O maior desconto do ano para você evoluir com a maior escola de tecnologia

QUERO APROVEITAR
4 respostas
  1. Definindo o modo Trunk nas VLANs (por precaução)
    1. SWITCH-LAB-A > CLI

      Switch>enable
      Switch#configure terminal 
      Enter configuration commands, one per line.  End with CNTL/Z.
      Switch(config)#interface Fa0/4
      Switch(config-if)#switchport mode trunk
      Switch(config-if)#exit
      Switch(config)#exit
      Switch#
      %SYS-5-CONFIG_I: Configured from console by console
      
      Switch#show interfaces trunk
      Port        Mode         Encapsulation  Status        Native vlan
      Fa0/4       on           802.1q         trunking      1
      
      Port        Vlans allowed on trunk
      Fa0/4       1-1005
      
      Port        Vlans allowed and active in management domain
      Fa0/4       1,10,20,30
      
      Port        Vlans in spanning tree forwarding state and not pruned
      Fa0/4       1,10,20,30
      
      Switch#
      
    2. SWITCH-LAB-B > CLI (Aqui são duas interfaces: Fa0/4 e Fa0/5)

      Switch#configure terminal 
      Enter configuration commands, one per line.  End with CNTL/Z.
      Switch(config)#interface Fa0/4
      Switch(config-if)#switchport mode trunk
      Switch(config-if)#exit
      Switch(config)#interface Fa0/5
      Switch(config-if)#switchport mode trunk
      Switch(config-if)#exit
      Switch(config)#exit
      Switch#
      %SYS-5-CONFIG_I: Configured from console by console
      
      Switch#show interfaces trunk 
      Port        Mode         Encapsulation  Status        Native vlan
      Fa0/4       on           802.1q         trunking      1
      Fa0/5       on           802.1q         trunking      1
      
      Port        Vlans allowed on trunk
      Fa0/4       1-1005
      Fa0/5       1-1005
      
      Port        Vlans allowed and active in management domain
      Fa0/4       1,10,20,30
      Fa0/5       1,10,20,30
      
      Port        Vlans in spanning tree forwarding state and not pruned
      Fa0/4       1,10,20,30
      Fa0/5       1,10,20,30
      
      Switch#
      
    3. SWITCH-LAB-C > CLI

      Switch>enable
      Switch#configure terminal 
      Enter configuration commands, one per line.  End with CNTL/Z.
      Switch(config)#interface F0/4
      Switch(config-if)#switchport mode trunk
      Switch(config-if)#^Z
      Switch#
      %SYS-5-CONFIG_I: Configured from console by console
      
      Switch#show interfaces trunk
      Port        Mode         Encapsulation  Status        Native vlan
      Fa0/4       on           802.1q         trunking      1
      
      Port        Vlans allowed on trunk
      Fa0/4       1-1005
      
      Port        Vlans allowed and active in management domain
      Fa0/4       1,10,20,30
      
      Port        Vlans in spanning tree forwarding state and not pruned
      Fa0/4       1,10,20,30
      
      Switch#
      
  2. Repeti os testes de conectividade entre PC-1LAB-A (193.65.0.1) e:
  • PC-1LAB-C: 193.65.0.7 (Conectou)
  • PC-1LAB-B: 193.65.0.4 (conectou)
  • PC-3LAB-A: 193.65.0.3 (Falhou)
    Os resultados são os mesmo de antes de estabelecer o modo trunk.

Note que o PC-1LAB-A e o PC-3LAB-A não estão se comunicando, pois estão em VLANs diferentes. Para resolver isso vou estabelecer roteamento.

  1. Configurando o ROUTER
    1. Fiz uma conexão física entre o SWITCH-LAB-A (FastEthernet0/5) com o ROUTER (FastEthernet0/0) através de um cabo Strainght-Through
    2. Habilitando a interface do ROUTER com o SWITCH-LAB-A: ROUTER > CLI
      Router>enable
      Router#configure terminal
      Enter configuration commands, one per line.  End with CNTL/Z.
      Router(config)#interface Fa0/0
      Router(config-if)#no shutdown
      
      Router(config-if)#
      %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
      
      %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
      
      Router(config-if)#
      
    3. Configurando o DHCP (caso a rede precise receber mais computadores)
      Router>enable
      Router#configure terminal 
      Enter configuration commands, one per line.  End with CNTL/Z.
      
      1. VLAN 10
        Router(config)#ip dhcp pool vlan10
        Router(dhcp-config)#network 192.168.10.0 255.255.255.0
        Router(dhcp-config)#exit
        
      2. VLAN 20
        Router(config)#ip dhcp pool vlan20
        Router(dhcp-config)#network
        Router(dhcp-config)#network 192.168.20.0 255.255.255.0
        Router(dhcp-config)#exit
        
      3. VLAN 30
        Router(config)#ip dhcp pool vlan30
        Router(dhcp-config)#network 192.168.30.0 255.255.255.0
        Router(dhcp-config)#
        
        Até aqui ficam estabelecidos os pools das VLANs 10, 20 e 30 com seus respectivos endereços de rede.
  1. ...
    1. Fracionando as interfaces em subinterfaces, pois o SWITCH-LAB-A não é capaz de fornecer os dois pools DHCP para as três VLANs diferentes.

      Router>enable
      Router#configure terminal
      
      Router(config)#interface Fa0/0.1
      Router(config-subif)#
      %LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up
      
      %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to up
      
      Router(config-subif)#encapsulation dot1Q 10
      Router(config-subif)#ip address 192.168.10.1 255.255.255.0
      Router(config-subif)#exit
      
      Router(config)#interface Fa0/0.2
      Router(config-subif)#
      %LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
      
      %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up
      
      Router(config-subif)#encapsulation dot1Q 20
      Router(config-subif)#ip address 192.168.20.1 255.255.255.0
      Router(config-subif)#exit
      
      Router(config)#interface Fa0/0.3
      Router(config-subif)#
      %LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up
      
      %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up
      
      Router(config-subif)#encapsulation dot1Q 30
      Router(config-subif)#ip address 192.168.30.1 255.255.255.0
      Router(config-subif)#
      
    2. Definindo o portão de saída dessas sub-redes

      Router>enable
      Router#configure terminal
      Enter configuration commands, one per line.  End with CNTL/Z.
      
      Router(config)#ip dhcp pool vlan10
      Router(dhcp-config)#default-router 192.168.10.1
      Router(dhcp-config)#exit
      
      Router(config)#ip dhcp pool vlan20
      Router(dhcp-config)#default-router 192.168.20.1
      Router(dhcp-config)#exit
      
      Router(config)#ip dhcp pool vlan30
      Router(dhcp-config)#default-router 192.168.30.1
      Router(dhcp-config)#
      
  2. Definindo os IPs dinâmicos nos PC
    1. Fazendo requisição de DHCP em cada PC: PC-1LAB-A > Desktop > IP Configuration > DHCP
    2. Então, o PC-1LAB-A tem obteve os seguintes endereços definidos dinamicamente:
      C:\>ipconfig
      FastEthernet0 Connection:(default port)
         Connection-specific DNS Suffix..: 
         IPv4 Address....................: 192.168.10.2
         Subnet Mask.....................: 255.255.255.0
         Default Gateway.................: 192.168.10.1
      
  3. Teste de conectividade
    C:\>ping 192.168.10.4
    Ping statistics for 192.168.10.4:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    
    C:\>ping 192.168.10.3
    Ping statistics for 192.168.10.3:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    
    C:\>ping 192.168.30.2
    Ping statistics for 192.168.30.2:
        Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
    C:\>
    
    Esses teste foram realizados entre PC-1LAB-A (192.168.10.2) e:
    • PC-1LAB-C: 192.168.10.4 (Conectou)
    • PC-1LAB-B: 192.168.10.3 (conectou)
    • PC-3LAB-A: 193.168.30.2 (conectou)

É isso.

Olá amigo.
Nem vou comentar nada para não dizer que estou bajulando...
Mas não importa sua evolução é realmente incrível.
Obrigado por compartilhar seu aprendizado conosco.
O melhor da turma com certeza.
Está na area certa.
Bons estudos.
Até...

Muito obrigado pelo incentivo, Ronaldo.
Mas devo considerar o seguinte: notei que ainda não consigo visualizar com segurança o fracionamento necessário. Isso ocorre porque há um nível de abstração envolvido que ainda não estou totalmente familiarizado dentro desse contexto.
Mesmo conseguindo construir algoritmos com uma abstração considerável (para quem não tem praticado com frequência), no contexto de redes, ainda não consegui aplicar plenamente esse tipo de pensamento abstrato.
Acredito que só com mais de prática mesmo. Paciência.
Grato pelo feedback.