Advertisement
VHFG22

DHCP estático

Mar 22nd, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. ::: TODOS OS COMANDOS EM SUDO
  2.  
  3. ifconfig
  4. (memorizar nome que aparece em baixo - normalmente "enp0s3" - este é o nome da interface)
  5.  
  6. nano /etc/netplan/01-netcfg.yaml
  7. (se não existir, usar o comando touch para criar o ficheiro)
  8. (colar o que está em baixo e editar - cuidado com os espaços)
  9.  
  10. # enable dhcp4 and comment out static IP related settings
  11.  
  12. network:
  13. version: 2
  14. renderer: networkd
  15. ethernets:
  16. enp0s3(nome interface):
  17. dhcp4: no(yes - dynamico, no - estático)
  18. addresses: [10.0.x.1/24]
  19. gateway4: 10.0.x.1
  20. #nameservers:
  21. # addresses: [10.0.0.10]
  22.  
  23. ::::
  24. netplan apply (comando para reiniciar a rede)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement