Find the answer to your Linux question:
Results 1 to 7 of 7
I have installed Mandrake 2005LE, Network card is a 3com 905 on eth0. If I set a static IP on the machine I can ping my gateway/firewall/DHCP server both its ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    40

    Static IP not working


    I have installed Mandrake 2005LE, Network card is a 3com 905 on eth0.
    If I set a static IP on the machine I can ping my gateway/firewall/DHCP server both its inside IP and outside IP, however I cannot get beyond that. Websites are not found.

    If I set it to DHCP everything works fine. I have over 100 windoze machines and several Linux boxes running static IP's that connect fine. I need to set a static IP on this station.

    I have swapped out NICs, used a variety of static IP's in my range, all with no results.

    Any Ideas??

  2. #2
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    You need to add a gateway to your network config. I think it would be
    Code:
    route add default gw <IP_address_of_gateway>
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    40
    That works, however the effects are not permanent. On a reboot the static IP fails.
    Which file does this write to?
    I looked at the eth0 config file under /etc/sysconfig/network-scripts and compared it to another Mandrake station and they were the same, except for the static number.
    If I go into drakconf and set the static IP I am setting the gateway, just as I did on the install however, when I click apply, the gateway disappears.

  4. #4
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    I think it uses /proc/net/route to store it, but if I remember correctly, the syntax is a bit rough. For a quick and dirty fix, you could add the route command I gave you earlier to /etc/rc.local and it will run every time you boot.
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  5. #5
    Just Joined!
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    40
    Thank You!

    That solved the problem adding the line to the rc.local file.

  6. #6
    unknown
    Guest
    Can you post that network config file, I'm having troubles as well and I would like to use it as a point of reference. Thanks.

  7. #7
    Just Joined!
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    40
    Quote Originally Posted by unknown
    Can you post that network config file, I'm having troubles as well and I would like to use it as a point of reference. Thanks.
    Not sure if this is what you are after, this is my ifcfg-eth0 file:
    Code:
    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=172.16.15.33
    NETMASK=255.255.0.0
    NETWORK=172.16.0.0
    BROADCAST=172.16.255.255
    ONBOOT=yes
    METRIC=10
    MII_NOT_SUPPORTED=no

Posting Permissions

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