LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 07-04-2013, 12:09 PM   #1
vidhyaa
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
Setting Static IP ADDRESS in Linux: eth0 config missing


Hi All...

I have just set up linux on VMware on my system.
I am trying to set up static ip address for it but eth0 and eth1 config interface files are missing...

please if someone cud help me it..!

Regards,
Vidhyaa.

(I am unable to attach attachments..)
 
Old 07-05-2013, 05:18 AM   #2
gauravgoel1989
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
By default the interface configuration files are not present in linux. You need to create them manually. You can create them in the directory "/etc/sysconfig/network-script/".
 
Old 07-05-2013, 11:35 AM   #3
vidhyaa
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi..

Thank you gauravgoel for the reply.
I created the interface file in "/etc/sysconfig/network-script/" with the name "ifcfg-eth0".
after that when i run

#service network restart

the output is:

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.

Can you help me with it..!! I am also attaching the screenshot of the #ifconfig output.
Attached Images
File Type: jpg screenshot1.jpg (192.5 KB, 15 views)
 
Old 07-05-2013, 06:39 PM   #4
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 123

Rep: Reputation: 5
Can you please show the contents of your /etc/sysconfig/network-scripts/ifcfg-eth0 file?

This might give some answers into the problem.
 
Old 07-06-2013, 03:47 AM   #5
gauravgoel1989
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
You could give something like below..

DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=none
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
BROADCAST=xxxx
IPADDR=xxxx
NETMASK=xxxx
NETWORK=xxxx
ONBOOT=yes

once the interface file is configured. Run ifup eth0 and then restart network service.
 
Old 07-06-2013, 05:11 PM   #6
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 123

Rep: Reputation: 5
I am using bridging on my test network, but here are by configs (eth0 and the bridge [br0]):

vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:1B:78:09:20:FB
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
BRIDGE=br0

vi /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
DNS1=192.168.1.5
DNS2=192.168.1.1
IPADDR=192.168.1.5
NETMASK=255.255.255.0
ONBOOT=yes
SEARCH="sddomain.local"

Hope it helps. Also, it would be goog to see your eth0 config & to know what type of Linux yer using. Oh, and a screenshot of the error might be a good clue, too.
 
Old 07-09-2013, 02:40 AM   #7
gauravgoel1989
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
I am also using bridged network on my VMware. You don't need to configure the bridge interface specifically. Just configure the ehternet interface (eth0).

DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=none(static) or dhcp
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
BROADCAST=xxxx
IPADDR=xxxx
NETMASK=xxxx
NETWORK=xxxx
ONBOOT=yes

once the interface file is configured. Run ifup eth0 and then restart network service.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another host using IP address, Linux server Static config, DHCP. nnenna@stuydy.beds.ac.uk Linux - Newbie 2 03-22-2012 11:31 PM
setting static IP on linux PCs with no static IP address from internet provider? solvetek Linux - Networking 1 10-22-2011 08:04 AM
static ifcfg-eth0 config but no IP-address jonaskellens Linux - Newbie 2 06-19-2009 03:19 PM
Setting a static IP address, but dynamically obtaining DNS config from a router bgoodr Linux - Hardware 3 09-28-2008 12:33 PM
Eth0 set up for Static, obtaining DHCP address?! IndustrialGeek Linux - Networking 2 01-03-2005 12:39 AM


All times are GMT -5. The time now is 05:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration