Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to set up a static ip address on my network. And it did kind of work, but locked out my email which is Evolution, the web worked afterwards. TTrying to set static ip addresshis is on a LinuxMint 18.3 box. I need it to be static because it will be my samba server.
# interfaces(5) file used by ifup(8) and ifdowTrying to set static ip addressn(8)
auto lo
iface lo inet loopback
auto enp6s0
#iface enp6s0 inet static
#address 192.168.0.120
#netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 208.67.222.222
#dns-nameservers 208.67.220.220
#dns-search itzgeek.local
I took this file and commented out the fourth line and uncommented the lines below that. So I translatesdtranslatesid a little research. Going back to previous state my settings are:
IP Address: 192.168.0.14
Netmask: 255.255.255.0
Gateway: 192.168.0.1
DNS: 192.168.0.1
My Internet Provider is Mediacom and I think the router updates the gateway and dns server addresses to the local computer. I tried setting the dns-nameservers to 192.168.0.1, but that did not work. Any suggestions?Trying to set static ip address
Evolution is set to Defer to Desktop Settings
Trying to set static ip address
Thanks in advance, Terry
/etc/network/interfaces configuration file is typically used by debian and its derivatives.
/etc/sysconfig/network-scripts/ifcfg-xxxx is typically used by Red Hat,SuSE and their derivatives.
They are not interchangeable and therefore what you posted will not work for the OP. I assume that Network Manager is running which if not disabled will conflict with trying to setup a static IP address via the interfaces file. You should be able to setup a static IP address using Network Manager as well as an address reservation in your router's DHCP server.
Noted. I'm only familiar with Red Hat and it's derivatives (I use CentOS). I apologize for confusing the OP. Yes, they should probably use Network Manager. I've always done network setup by editing the ifcfg-* files, so can't help there.
You make an excellent point about the router's dhcp setup, however. One cannot establish a static IP address if the address being used is within the router's dynamic range, which I would expect 192.168.0.14 to be, by default.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.