Het beste is een vaste ip adress maken, dan wisselt dit niet meer.
In je nas of pc een vaste ip maken,
eerst je automatische ip waarden opschrijven, dus hoe nu de instellingen tav je ip is en dns servers, bij je netwerk icoon staat dit info. bijv 192.168.178.44, dns servers hier staan 2 nummers, subnetmask 255.255.255.0
Dat wat je gevonden en opgeschreven hebt, nu met static ip(vaste ip) ingeven, rebooten, en kijken of bijv internet werkt of netwerk.
(toevallig heb ik dit zelf gehad dat een ip wijzigde, heb nu ook op mijn media pc een vaste ip).
Enigste wat kan wijzigen is nu de dns server, die staat bij de provider, dus indien je internet weg valt, controleer dit, in je router.
host file moet je niet doen, maar als het netwerk slecht werkt, kan dit helpen.
host file staat in etc/ en host is en file.
hostname staat ook in etc/, hier staat de naam van je pc.
In je host file daar kun je de namen van je pc's in zetten met ip nummers, dan vind je pc, misschien je netwerk beter(je pc's).
dus ip en naam kun je hier in zetten, wat er al in staat laten staan.
Bijv,
10.16.8.77 back
dit voor de backup server erbij zetten.
Ook altijd een lijst maken met alle ip's en naam van de pc's die je hebt, dan kun je ook zien of het gewijzigd is, of als je iets moet instellen dan weet je de info.
Hier staat hoe je een vaste verbinding maakt.
https://wiki.ubuntu.com/MountWindowsSharesPermanentlycifs-utils via synaptic installeren, anders werkt het niet.
Maak een map aan waar jij je netwerk nas op wilt hebben gekoppeld.
Dan wijzig je fstab,
dit kun je testen zonder te rebooten,
open terminal, en typ
sudo mount -a
(mount spatie -a dus)
bij geen foutmelding dan werkt het.
Reboot om te testen.
Mount password protected network folders
The quickest way to auto-mounting a password-protected share is to edit /etc/fstab (with root privileges), to add this line:
//servername/sharename /media/windowsshare cifs username=msusername,password=mspassword,iocharset=utf8,sec=ntlm 0 0
This is not a good idea however: /etc/fstab is readable by everyone and so is your Windows password in it. The way around this is to use a credentials file. This is a file that contains just the username and password.
Using a text editor, create a file for your remote servers logon credential:
gedit ~/.smbcredentials
Enter your Windows username and password in the file:
username=msusername
password=mspassword
Save the file, exit the editor.
Change the permissions of the file to prevent unwanted access to your credentials:
chmod 600 ~/.smbcredentials
Then edit your /etc/fstab file (with root privileges) to add this line (replacing the insecure line in the example above, if you added it):
//servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
Save the file, exit the editor.
Finally, test the fstab entry by issuing:
sudo mount -a
If there are no errors, you should test how it works after a reboot. Your remote share should mount automatically.