How do I turn off a linux server from recieveing a DHCP address

I want to manually configure an interface address; I use ifconfig.   But when ever I plug that interface into the switch, it picks up a DHCP address (i think) .   How do I stop it so I can only use manually config ip addresses
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joshua GrantomSenior Systems AdministratorCommented:
What line did you use for ifconfig?
Joshua GrantomSenior Systems AdministratorCommented:
Have you tried to editing your interface file?


delete this if exists
iface eth0 inet dhcp

add this
iface eth0 inet static

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dr. KlahnPrincipal Software EngineerCommented:
This is the /etc/networks/interfaces from the linux server on my LAN.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0

# The following section is for use when on a 192.168.0 LAN
# with a gateway at
# Nameservers are defined in /etc/resolv.conf
iface eth0 inet static

Open in new window

As the file notes, nameservers are not defined in /etc/networks/interfaces,
but instead in /etc/resolv.conf

The /etc/resolv.conf from the same system.  Note that if
the system runs pdnsd or other caching DNS resolver, the
requests should be redirected to 127.0.01 rather than to the
real nameservers.  On your system this will probably not be
the case and you should use the real nameserver.  That is
probably the router itself.

# This section is for use when running on a 192.168 LAN.
# without pdnsd or other caching DNS resolver.

# This section is for use when pdnsd is resolving requests
#  nameserver

Open in new window

edit /etc/sysconfig/network-scripts ifcfg-eth0

make sure
BOOTPROTO=none (other options are bootp and dhcp)
jimmycherAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.