Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: DHCP vs static

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2004
    Hamilton, Canada

    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:


    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 ( gives me the message:

    ping: unknown host

    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

    Does anyone have any suggestions?

  2. #2
    Did you set up gateway?

  3. #3
    Just Joined!
    Join Date
    May 2004
    Hamilton, Canada
    Yeah I figured it out yesterday. That was the problem. Thanks.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts