Static IP not working

I made a samba file server using Opensuse 12.1 with the KDE4 desktop.
So far so long as I use the DHCP protocol given out by our router, the server has an internet connection and we are able to access the shares through the local network. However when I give it a static IP address is goes offline completely. No one can access any shares and there isn’t an internet connection.
Am I missing something??

You should of course explain exact what you changed. We can not guess that.

When you e.g. did only give it an IP address and no default gateway nor a DNS server, I would think you get problems.
Also when you give it an IP address outside the (sub)net your LAN has, you would loose connection.
In short there are to many prossibilities to make an error. And when you do not tell what you did and how we can not help.

My apologies… I gave it the same ip address as assigned by the DHCP server and the same subnet mask. I also specified the proper gateway and the DNS addresses. I just cannot think of a reason why it just didn’t work… puzzles me completely.

IP -
Subnet mask -
Gateway -

Am I missing something?

When you did not change anything in the DHCP server, IMHO it is not a good idea to use an IP address that belongs to the group of IP addresses the DHCP server leases. This could clash sooner or later.

Also we do not like story telling as prove of the situation. Thus beside telling what you think/guess/know/saw/initerpreted of what the parameters are, we like computer output that confirms it. Like:

/sbin/ifconfig -a


/sbin/route -n


cat /etc/resolv.conf | grep -v '^#'


sudo cat /etc/sysconfig/network/ifcfg-eth0

this last one when eth0 is the NIC you use, else replace with the correct name.

I apologize for the storytelling… I’m new to the Linux forum protocols… :slight_smile:

agree with hcvv you should not use the IP addresses from DHCP pool, check on router your pool and assign different IP but in the same subnet


exclude IP from DHCP pool and use it staticly
on cisco routers its something like:
Router(config)#ip dhcp excluded-address adres_from [adres_to]

use the gateway address for your dns address. “”

Solved… I not have a static IP address for the server.
When hcvv & loand mentioned about using an address from the DHCP protocol as a static IP, it got me thinking that there might be a clash in there somewhere… So what I did was have the DHCP server dish out addresses from onwards and used as the static IP for the fileserver. Worked brilliantly.

Thanks for the help… Really appreciate it. Now only if I cold find a way to get the thing to start downloading torrents via the terminal console interface…

Try rTorrent.

The libTorrent and rTorrent Project

Best regards,

not sure if my static ip setup is acting up on me, but I’m trying to upgrade the server to 12.2 and I keep getting messages that it cannot connect to the servers with the repos… It says cannot connect to the DNS…

on the local network, its fine. I can browse the files and connect via ssh. Any ideas?

Review Henk’s post with the Linux commands he requested you provide the output for. Can you ping an internet address okay?


If not, look at your routing (gateway assigned).

Has a valid name server has been specified?

cat /etc/resolv.conf | grep -v '^#'
DATAHUB:~ #  cat /etc/resolv.conf | grep -v '^#'

Will this help get me some answers?

Is that a valid gateway address? Can you ping it successfully? If not try using a public DNS (eg

That’s the one I see most. IP correct, netmask correct, DNS’s and and no gateway address or the one that belonged to a previously used router.

Actually, I was in a hurry to get to a meeting. I meant is that a valid name server? :slight_smile:

unless it disallows being pinged … it’s not :stuck_out_tongue:

Very True :smiley: