LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-26-2006, 05:55 AM   #1
betrussell23
LQ Newbie
 
Registered: Sep 2006
Posts: 16

Rep: Reputation: 0
How To Assign Static Ip?


hai everybody,

i am a newbie to linux and i am using FC5. i want to assign static ip to my machine. could anyone help me in this with commands detail would be of great help to me. i want details regarding what to chenage? and how to change? thanks a lot in advance.
 
Old 09-26-2006, 06:49 AM   #2
cybi
LQ Newbie
 
Registered: Feb 2006
Location: Poland
Distribution: slackware-current
Posts: 10

Rep: Reputation: 0
the easiest universal way would be (for eth0 intrerface):
su root
ifconfig eth0 down
ifconfig eth0 address IP/CIDR
ifconfig eth0 up
 
Old 09-26-2006, 07:48 AM   #3
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59
Blog Entries: 1

Rep: Reputation: 15
netconfig eth0

You can try the command

netconfig

OR netconfig eth0 depending on the number of NICs you have
 
Old 09-26-2006, 07:52 AM   #4
rbh123
LQ Newbie
 
Registered: May 2005
Distribution: Redhat
Posts: 25

Rep: Reputation: 15
I would try "netconfig -d eth0" and then configure static IP to my network interface.
 
Old 09-26-2006, 07:56 AM   #5
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
I also use FC5, you can use
[code]
system-config-network
[code]
or you can edit the file /etc/sysconfig/networking/devices/ifcfg-eth0 by hand so that it looks like this for e.g.

Quote:
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0F:1F:FD:5B:AC
ONBOOT=yes
TYPE=Ethernet
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
NETMASK=255.0.0.0
IPADDR=10.0.0.2
GATEWAY=10.0.0.1
 
Old 09-27-2006, 01:25 AM   #6
betrussell23
LQ Newbie
 
Registered: Sep 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you.............

Thank you very much I have assigned static IP to my machine following ur commands.
 
  


Reply



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
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 10:51 AM
assign static ip allelopath Linux - Software 1 04-27-2005 07:04 PM
assign static IP to the server ashley75 Linux - General 2 03-10-2005 03:47 PM
How do I assign a static IP to eth0 louisb Linux - Networking 4 02-19-2005 08:10 PM
Can't assign a static IPv6 address guzo Linux - Networking 0 02-11-2005 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:19 AM.

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