LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-10-2005, 01:04 PM   #1
ashley75
Member
 
Registered: Aug 2003
Posts: 232

Rep: Reputation: 30
assign static IP to the server


I want to assign static IP to the server, I think I can change it in
/ect/hosts file.

So what is the differences between the step above and adding IP by using netconfig command???
 
Old 03-10-2005, 03:20 PM   #2
caps_phisto
Member
 
Registered: Sep 2004
Location: NH
Distribution: FC6, FC1-4, RH9, Gentoo 2006.0/1, Slackware 10.1/2,11, Vector SOHO 5.0.1
Posts: 237

Rep: Reputation: 30
When you use the netconfig command you are not editing /etc/hosts. Instead you are editing /etc/sysconfig/network-scripts/ifcfg-ethX (where X is the interface number).

If you want to setup an interface by editing this file and not using netconfig this is what it should look like:

Code:
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.0.10
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
Hope this helps!
 
Old 03-10-2005, 03:47 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: assign static IP to the server

Quote:
Originally posted by ashley75
I want to assign static IP to the server, I think I can change it in
/ect/hosts file.

So what is the differences between the step above and adding IP by using netconfig command???
netconfig like in Slackware?


/etc/hosts is NOT the place to change the machines
IP number, it's the place where you tell your machine
about loop-back and about OTHER machines.

In Slack look at /etc/rc.d/rc.inet1.conf


Cheers,
Tink
 
  


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 On
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
Manually configuring DHCP for static IP -- cannot assign IP tristanlee85 Linux - Networking 3 10-16-2005 01:34 AM
assign static ip allelopath Linux - Software 1 04-27-2005 07:04 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 - General

All times are GMT -5. The time now is 07:24 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