Computing.Net > Forums > Linux > Setting up Static IP in Linux

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Setting up Static IP in Linux

Reply to Message Icon

Name: Johnny Blaze
Date: May 20, 2003 at 11:57:04 Pacific
OS: Red Hat 7.2
CPU/Ram: 1800+/512
Comment:

I have two questions:
1: I want to setup a Static IP address for the Linux box. I managed to assign an IP and subnet mask by changing the file ifcfg-eth0 but I still cannot connect to anything. I think my problem is not having set a default gateway and a DNS server. Please help.

2. For some reason, when I start my Linux box these days it goes straight to the console. How do I get the GDE?? and how do make sure the GDE is the default??

Thanks a million.

JB




Sponsored Link
Ads by Google

Response Number 1
Name: cupubboy
Date: May 21, 2003 at 04:25:59 Pacific
Reply:

Ok here it goes...
I don't have a linux box in front of me so maybe I won't be very precise
If you managed to edit your ifcfg-eth0 file with your ip's there... Well you should also change your dns in there. Also remember if you put dhcp on boot when you first configured them although I doubt that is the case.
About the grafical interface
when In comand line you can either
# startx
# xmd
or youcan edit the runlevel's file (as I have said I do not have the linux box in front of me...)I can't remember exactky where it is sorry... but remember you have to change defaul run levels
runlevel 3 is the comand prompt and 5 the graphical interface as I remember
Anyway I'll write back when I will remember
sorry....


0

Response Number 2
Name: 3Dave
Date: May 22, 2003 at 08:42:44 Pacific
Reply:

To set a static IP:
# ifconfig eth0 192.168.0.1 broadcast
192.168.0.255 netmask 255.255.255.0

Assuming that you are on a class C network.

To set up a gateway:
# route add -net default gw 192.168.0.254 netmask 0.0.0.0 metric 1

Add DNS servers to /etc/resolv.conf

For GDE, edit /etc/inittab and change:
id:3:initdefault:
to
id:5:initdefault:


0

Response Number 3
Name: Charlie
Date: May 28, 2003 at 18:45:46 Pacific
Reply:

One easy way is to go into internet setup wizard --> add --> select a ethernet

then it shows up a popup box, fill in
IP Address
subnet Mask
Default Gateway

You can get the three pareameters by
ipconfig in Windows
ifconfig in Linux.

Hope it would help.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Setting up Static IP in Linux

Setting up an IRC in Linux www.computing.net/answers/linux/setting-up-an-irc-in-linux/439.html

Setting up a Virtual modem Linux www.computing.net/answers/linux/setting-up-a-virtual-modem-linux/18772.html

setting static ip in gentoo www.computing.net/answers/linux/setting-static-ip-in-gentoo/16731.html