Static IP mandrake linux

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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.
 
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
 
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.
 
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.
 

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?
 
Joined
Sep 12, 2004
Messages
57
probably DNS problem.
Do you know DNS server IP address?

If so, execute
echo "nameserver AA.BB.CC.DD" >> /etc/resolv.conf
but change AA.BB.CC.DD for that IP
 
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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top