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
jimmycherAsked:
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?
0
Joshua GrantomSenior Systems AdministratorCommented:
Have you tried to editing your interface file?

/etc/network/interfaces

delete this if exists
iface eth0 inet dhcp

add this
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
0

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 192.168.0.1
# NOTE:  NAMESERVERS ARE NOT DEFINED HERE.
# Nameservers are defined in /etc/resolv.conf
#
iface eth0 inet static
address 192.168.0.201
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

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.
#
search testbed.com
nameserver 192.168.0.1

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

Open in new window

0
gheistCommented:
edit /etc/sysconfig/network-scripts ifcfg-eth0

make sure
BOOTPROTO=none (other options are bootp and dhcp)
0
jimmycherAuthor Commented:
Thanks.
0
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.