LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-03-2004, 11:39 AM   #1
jonathanztaub
LQ Newbie
 
Registered: May 2004
Posts: 14

Rep: Reputation: 0
How to set the IP and which configuration files?


I want to configure manually my NICs.
I know I need to edit the "ifcfg-eth[X]" file(s).
However, there are three location which they are present:
- "/etc/sysconfig/networking/devices"
- "/etc/sysconfig/network-scripts"
- "etc/sysconfig/networking/profiles/default"

I think the file I shoud edit are the ones in the "/etc/sysconfig/network-scripts" directory
but want to be absolutely sure.



Secondly, I wish to set my computer's IP.
I followed the instructions in "htt p://linuxguide.automatedshops.com/LinuxGuide/linux-ethernet.html"
but it didn't help.

The following is the contents of each file:
---> /etc/sysconfig/network-scripts/ifcfg-eth0 <---
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=Ethernet
IPADDR=10.1.1.137
NETMASK=255.255.255.0

---> /etc/sysconfig/network <---
NETWORKING=yes
HOSTNAME=nlayers.il.nlayers.com
GATEWAYDEV=eth0
GATEWAY=10.1.1.254

---> /etc/hosts <---
127.0.0.1 nlayers.il.nlayers.com nlayers localhost.localdomain localhost
10.1.1.137 nlayers.il.nlayers.com nlayers

After doing "service network restart" or even rebooting, the computer stays with its previously 10.1.1.88 assigned address from DHCP.
I suspect it may still get its IP from there although I haven't found or don't know where to look for files which will confirm this.

P.S.
I'm using Redhat linux 9 with 4 NICs.
 
Old 05-03-2004, 01:08 PM   #2
mermxx
Member
 
Registered: Apr 2004
Location: Wales
Distribution: rh9, winxp
Posts: 411

Rep: Reputation: 30
I am posting the contents of my /etc/sysconfig/network-scripts/ifcfg-eth0 so u can compare them to urs to see if there is any changes u think u need to make

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.0.10
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
HWADDR=00:07:95:be:bd:50
GATEWAY=192.168.0.1(my winxp addy)

/etc/sysconfig/network-scripts/eth0.route
GATEWAY0=192.168.0.1
NETMASK0=255.255.255.0
ADDRESS0=192.168.0.1

in the /etc/sysconfig/network
I only have
NETWORKING=yes
HOSTNAME=

/etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.1

I have a winxp machine with an adsl modem which i connect to with my linux box through a hub
 
Old 05-04-2004, 05:28 AM   #3
jonathanztaub
LQ Newbie
 
Registered: May 2004
Posts: 14

Original Poster
Rep: Reputation: 0
I managed to get it.
I've changed the ifcfg-eth0 file residing under /etc/sysconfig/networking/profiles/default.
All other files don't change anything.

This is strange since in the /etc/rc.d/init.d/network file the system scans for interfaces inside the /etc/sysconfig/network-scripts directory.

Anyway it works now (Wushhh...).
 
  


Reply


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
configuration files max_sipos Programming 13 09-30-2004 01:44 PM
configuration files dryhte Slackware 5 06-03-2003 10:12 AM
How to find text in a set of files? concoran Linux - General 2 06-01-2003 07:36 PM
How to set Password for Configuration Access in Mandrake? lava Linux - Security 2 02-27-2003 02:33 AM
Where are programs files and configuration files stored? nutshell Linux - General 2 03-09-2002 10:24 AM

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

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