LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-30-2008, 02:39 PM   #1
kradkins
LQ Newbie
 
Registered: Sep 2008
Posts: 3

Rep: Reputation: 0
Tcp/ip Dhcp


Our IT department recently swicthed to DHCP. Our Apache server is no longer responding. How does one switch to DHCP on linux box with Apache?
 
Old 09-30-2008, 02:47 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,319

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by kradkins View Post
Our IT department recently swicthed to DHCP. Our Apache server is no longer responding. How does one switch to DHCP on linux box with Apache?
Apache has nothing to do with DHCP.

What version/distro of Linux are you running? This page

http://www.yolinux.com/TUTORIALS/Lin...etworking.html

Has some pointers on getting a new address via DHCP, but for a web server, that wouldn't be a very good thing. When the address changes, the web server will be unavailable, until the new name/address gets put in your DNS server, so your users can find it. Tell your IT department to let you keep your static address.
 
Old 10-01-2008, 02:29 AM   #3
Caighil
LQ Newbie
 
Registered: Feb 2008
Posts: 22

Rep: Reputation: 15
Does your Linux box have a static IP set? You may have to reset the box to DHCP.

There is a couple of ways to do that. If your in a GUI option 1. Open a terminal and log in as root. Type setup, select network and chose the DHCP option. 2. Select Network from the Administrator tab. Select the Network Card (probable eth0) and then select edit. Chose the DHCP option here as well.

If your not in a GUI the instructions are the same as above.

If you are experienced in Linux and this seems over simplified I am sorry. It is the only answer I can think of atm.

Kyle Corey
 
Old 10-01-2008, 02:31 AM   #4
Caighil
LQ Newbie
 
Registered: Feb 2008
Posts: 22

Rep: Reputation: 15
Um yah, brain fart. You want a static ip for the server. so ignore my silly anwser.
 
Old 10-01-2008, 02:50 AM   #5
jmbrink26
Member
 
Registered: Aug 2006
Posts: 72

Rep: Reputation: 15
Yes, like Caighil just mentioned, no server should have a dynamic IP. You can get away with DHCP on servers SOMETIMES, but I wouldn't recommend it. Trying a reach a system entirely by DNS can be a mess w/ Linux unless you have SLED 10 or 11 since Novell seemed to of perfected it since their alliance with Microsoft.

So anyway, yeah unless you want to be adding static entries in your /etc/hosts file everytime the IP changes, then I'd just stick with static IP. Now, if you are meaning that client computers cannot reach the server over port 80 in their web browser, than that could be an entirely different issue... I suppose it all depends on which context of "Apache not responding" you are talking about.
 
Old 10-01-2008, 09:02 AM   #6
kradkins
LQ Newbie
 
Registered: Sep 2008
Posts: 3

Original Poster
Rep: Reputation: 0
We have Apache on a Linux box. Our IT department wants us to use DHCP due to security reasons. They indicate they will use reserve DHCP and assign us the same IP address each time the machine requests an IP address. It seems we need to set up Linux as a clinet to retrieve the IP address each time it is needed.

uname -a generates 2.4.18-bf2.4

cat /etc/issue generates Debian GNU/\s 3.0 \n \1

I have found a few files:

dhclient-script and dhclinet.conf

and a few config results from ifconfig and resolv.conf

But I'm still having a little difficulty understanding which files need to be changed and changed to what values.

If someone has a working example to post that would be a big help.

Last edited by kradkins; 10-01-2008 at 09:13 AM.
 
Old 10-02-2008, 12:43 AM   #7
jmbrink26
Member
 
Registered: Aug 2006
Posts: 72

Rep: Reputation: 15
If you plan on using dhcp with a reserved address for that system, that should be all at the dhcp server level.

Any dhcp configuration change at the dhcp client level would be made in the dhclient.conf file. The only thing resolv.conf is for DNS name resolution, which doesn't make any difference with this anyway.

You shouldn't have to make any additional changes on the server we are discussing unless you have a static ip set still, then just take the static ip out.

To test if it always gets the same address assuming the dhcp scope has been configured correctly on the dhcp server, just run /sbin/dhclient, and see what ip eth0(1, etc..) receives after a couple retries.

If any clients are having problems reaching that server via Apache, via their web browser, my first inclination is, have them clear their browser cache, because its probably caching the old ip, cookies, etc...
 
Old 10-05-2008, 10:28 AM   #8
kradkins
LQ Newbie
 
Registered: Sep 2008
Posts: 3

Original Poster
Rep: Reputation: 0
In our case the box in question is not the DHCP server, its a client.

An IT representative stopped by to help the cause. We went through a few things. In the end the interfaces file was changed to remove the static IP information.

From (addressing x'd out)
--------------------------------------------------------------------
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address xxx.xx.xxx.xx
netmask 255.255.255.0
network xxx.xx.xxx.x
broadcast xxx.xx.xxx.xxx
gateway xxx.xx.xxx.x
--------------------------------------------------------------------

To
--------------------------------------------------------------------
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet dhcp
--------------------------------------------------------------------

We then initiated the interfaces file to pick up the change and the web server started responding again.

Thank-you all for responding so quickly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing TCP flags in TCP packets on Linux using C !! vishamr2000 Programming 2 10-16-2006 10:46 AM
Linux change TCP kernel Parameter for TCP DELAY ACK TICKS linux_mando Linux - Networking 5 08-22-2006 09:20 AM
3C509B can not connect over TCP/IP (gets DHCP address though) RSpendl Linux - Hardware 4 10-31-2005 07:56 AM
Woody 3.0 Open Ports 1470/tcp/uaiact 1518/tcp/vpvd What for?How can I remove them? alexxxis Debian 5 07-05-2004 06:18 PM
DHCP, webmin, and TCP/IP ports mattrobbins Linux - Networking 5 10-14-2003 04:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration