Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-24-2007, 02:34 PM   #1
LQ Newbie
Registered: May 2007
Posts: 4

Rep: Reputation: 0
How to set Static IP?

I am using Fedora Core 6 and I need to change my Ip from dynamic to static. I got static IP from my department but even after many atttempts, I am unable to use it. Each time I change IP using ifconfig <IP> netmask <> up, the network stops connecting to internet...Can anyone suggest me how should I go about it ? (I am pretty new to linux)
Old 05-24-2007, 03:22 PM   #2
Registered: Jul 2006
Location: VPN Tunnel, USA
Distribution: Slackware64
Posts: 930

Rep: Reputation: 113Reputation: 113
Info from Tutorials

Also, a tutorial from Yo Linux!

Computers may be assiged a static IP address or assigned one dynamically.

Static IP address assignment:

Choose one of the following methods:

* Command Line:

/sbin/ifconfig eth0 netmask broadcast

Network address by convention would be the lowest:
Broadcast address by convention would be the highest:
The gateway can be anything, but following convention:

Note: the highest and lowest addresses are based on the netmask. The previous example is based on a netmask of

* Red Hat / Fedora GUI tools:
o /usr/bin/neat Gnome GUI network administration tool. Handles all interfaces. Configure for Static IP or DHCP client.
(First available with Red Hat 7.2.)
o /usr/bin/netcfg (Handles all interfaces) (last available in Red Hat 7.1)

* Red Hat / Fedora Console tools:
o /usr/sbin/system-config-network-tui (Text User Interface)
o /usr/sbin/netconfig (Only seems to work for the first network interface eth0 but not eth1,...)

* Directly edit configuration files/scripts. See format below.

The ifconfig command does NOT store this information permanently. Upon reboot this information is lost. (Manually add the commands to the end of the file /etc/rc.d/rc.local to execute them upon boot.) The commands netcfg and netconfig make permanent changes to system network configuration files located in /etc/sysconfig/network-scripts/, so that this information is retained.

The IANA has allocated IP addresses in the range of to for private networks.
Hope that helped.
Old 05-24-2007, 03:24 PM   #3
Senior Member
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Assuming that you are running gnome: System->Administration->Network , highlight the correct nick, hit edit, click the statically set ip address dot and fill in. Save, restart network.
Old 05-24-2007, 03:31 PM   #4
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 76
Originally Posted by maverick_29
the network stops connecting to internet
What exactly do you mean by this statement? Can you ping your gateway? Can you ping internel addresses (if, in fact you’re using internal addresses)? Can you ping external addresses? Can you resolve hostnames to ip addresses? What are the outputs of the commands “route” and “ifconfig -a”.

P.S., a more appropriate method for using static IP addresses with red-hat style distros is changing the file /etc/sysconfig/network-scripts/ifcfg-XXXX (where XXXX is you interface). In this file, there are variables you can set such as DEVICE (set to XXXX), BOOTPROTO (set to “static”), ONBOOT, BROADCAST, IPADDR, NETMASK, NETWORK, GATEWAY, and GATEWAYDEV (set to whatever you need/want). Afterward, you enter your nameservers into /etc/resolv.conf.
Old 05-25-2007, 01:07 AM   #5
LQ Newbie
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
thank you all

I sincerely appreciate all of you who pooled in your comments and spend time...actually the IP that I was assigned by dept was wrong and thus all the ruckus...once again thank you are really the best guys


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tell whether IP is set as static or DHCP? loadedmind Fedora 6 11-09-2006 11:08 PM
How to set static IP in Suse 10 leupi SUSE / openSUSE 4 02-19-2006 09:50 PM
How to set a static IP address? dx0r515t Slackware 12 04-17-2005 01:33 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
How do i set a static ip in Linux SSBN Linux - Networking 1 04-29-2003 09:43 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration