1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Static IP mandrake linux

Discussion in 'Linux and Unix' started by Fyzbo, Sep 14, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. Fyzbo

    Fyzbo Thread Starter

    Joined:
    Feb 6, 2002
    Messages:
    1,683
    I'm in charge of a linux box running mandrake linux in my school's computer science lab. After installing mandrake the ip set up automatically as DHCP with an IP ending in 130. I was asked to change the IP to everything the same only ending in 17. I was told that it should support a static IP, but I can't get it to work. Can anyone possibly list the steps I should take to make this change?

    Thank you in advance.
     
  2. 5mi11er

    5mi11er

    Joined:
    Aug 11, 2004
    Messages:
    521
    Well, without further information, we're going to be shooting in the dark...

    But, assuming you've been able to use the ifconfig command correctly, and have the ip address, and mask set correctly, more than likely you're default gateway entry is now missing.

    Something along the lines of:
    Code:
    route add default gw 1.2.3.4
    where 1.2.3.4 is replaced by the address of the router's interface that is serving that network, should do the trick.

    Hope this helps,
    -Scott
     
  3. tsunam

    tsunam

    Joined:
    Sep 14, 2003
    Messages:
    1,240
    you should have a /etc/conf.d/net (or something similar, its what your /etc/init.d/net.eth0 calls from to boot up eth0) section. if you edit that it'll allow you to change the gateway, dhcp to static etc.
     
  4. dago

    dago

    Joined:
    Sep 12, 2004
    Messages:
    57
    Fyzbo,
    I don't know Mandrake, but assuming the thing is RedHat based, I think you should have the folder

    /etc/sysconfig/network/
    or
    /etc/sysconfig/network-scripts/

    Look for file ifcfg-eth0 and take a look on it
    As root change
    IPADDR=nnn.nnn.nnn.17

    If you need gateway, just place
    GATEWAY=nnn.nnn.nnn.nnn

    Then execute (root)
    ifdown eth0
    ifup eth0

    Hope it helps.
     
  5. Fyzbo

    Fyzbo Thread Starter

    Joined:
    Feb 6, 2002
    Messages:
    1,683
    Alright so I was able to change the IP address. Now the computer is on the campus network, other computers can ssh/telnet to it without a problem. However when on the linux box itself can't search the net. I open mozilla and it can't get to any webpages. Any thoughts on this?
     
  6. dago

    dago

    Joined:
    Sep 12, 2004
    Messages:
    57
    probably DNS problem.
    Do you know DNS server IP address?

    If so, execute
    but change AA.BB.CC.DD for that IP
     
  7. tsunam

    tsunam

    Joined:
    Sep 14, 2003
    Messages:
    1,240
    also do a route to see where its going on its path to get out. if you don't have anything under it then its a dns/gateway issue. you can try doing a route add gw 10.128.1.30 <--whatever the address is that'd probably get you out as well. Its probably not talking with the dhcp server correctly.
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/273909

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice