Configuração de vlan em switch
1. sudo apt-get install vlan → instala o programa vlan 2. sudo apt-get install screen → instala o screen 3. sudo screen /dev/ttyS0 38400 → entrar no switch pela porta serial → USB: /dev/ttyUSB0 4. initialize → deleta a configuração e começa tudo de novo 5. ipsetup ip-address 10.0.150.2 255.255.0.0 6. summary → mostra o IP 7. sudo service network-manager stop → para o gerenciador de rede pra sem fio nõ ficar insistindo 8. sudo ifconfig eth0 10.0.150.1 netmask 255.255.0.0 up 9. ping 10.0.150.2 → pra ver se ta ok (ip do switch) 10. entra no switch via browser 11. Menu network >> submenu vlan >> create >> vlans id's: (nome: 1, 2 , 3) 12. Seleciona vlan 2 >> modified >> untagged (9-16) >> apply(só faz parte de uma vlan) 13. Seleciona vlan 3 >> modified >> untagged (17-24) >> apply
14. Menu network >> Submenu vlan interface >> create >> vlan 2 >> desmarca ipv6 >> ipv4 address
>> manual = 192.168.10.2 255.255.255.0 >> apply
15. Menu network >> Submenu vlan interface >> create >> vlan 3 >> desmarca ipv6 >> ipv4 address >>
manual = 192.168.11.2 255.255.255.0 >> apply
16. sudo modprobe 8021q (insere o modulo no kernel) 17. sudo sh -c 'grep -q 8021q /etc/modules || echo 8021q >> /etc/modules' 18. sudo nano /etc/network/interfaces (configura esse arquivo)
auto lo iface lo inet loobback
auto eth0 iface eth0 192.168.12.1 netmask 255.255.255.0
auto eth0.1 iface eth0.1 inet static address 10.0.150.1 netmask 255.255.255.0 network 10.0.0.0 gateway 10.0.0.1 dns-nameservers 8.8.8.8
auto eth0.2 iface eth0.2 inet static address 192.168.10.1 netmask 255.255.255.0
auto eth0.3 iface eth0.3 inet static address 192.168.11.1
netmask 255.255.255.0
19. Menu network >> Submenu vlan >> vlan 1 >> modify vlan >> vlan 1 >> tagged >> porta 1 >> apply
(vai na interface e coloca interface 1 pra ser tagueada)
20. ping 10.0.150.2 (não pinga) 21. sudo vconfig add eth0 1 22. sudo vconfig add eth0 2 23. sudo vconfig add eth0 3 24. sudo ifconfig eth0