Results 1 to 3 of 3
I've been trying to get a static internal IP for my linux based webserver so that the dhcp server on my router won't constantly change it. I am running Trustix ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-11-2005 #1Just Joined!
- Join Date
- May 2004
- Location
- Hamilton, Canada
- Posts
- 13
DHCP vs static
I've been trying to get a static internal IP for my linux based webserver so that the dhcp server on my router won't constantly change it. I am running Trustix on the webserver.
I edited the ifcfg-eth0 configuration file to:
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.110
NETMASK=255.255.255.0
ONBOOT=yes
I changed the Listen addresses in my httpd and ssh servers accordingly and changed the IPs in the port forwarding section of my router configuration.
The servers work fine. However, I can not ping any computers from the linux machine, even ones within my local network.
Trying to ping local network computers just makes the ping command hang.
Trying to ping external computers (www.google.com) gives me the message:
ping: unknown host www.google.com
Other programs that do not work are lynx, swup (software update, similar to apt-get) and wget. All of this leads me to believe there is a problem with the way I set up the ifcfg-eth0.
When I change the ifcfg-eth0 back to using dhcp instead of a static IP, everything works fine.
I thought it was a problem with the DNS, but /etc/resolv.conf has the same DNS nameservers as my windows machines. Do I need to manually load resolv.conf when I am using a static IP as opposed to dhcp?
Usually this wouldn't be a problem since this machine is a server, but it also will not update my dynamic DNS to dyndns.org.
Does anyone have any suggestions?
- 05-12-2005 #2Just Joined!
- Join Date
- Apr 2005
- Posts
- 40
Did you set up gateway?
- 05-13-2005 #3Just Joined!
- Join Date
- May 2004
- Location
- Hamilton, Canada
- Posts
- 13
Yeah I figured it out yesterday. That was the problem. Thanks.


Reply With Quote
