LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2014, 08:13 AM   #1
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Rep: Reputation: Disabled
No DHCPOFFERS received


Helo,

In order to solve the problem I tried as root to open /etc/sysconfig/network-scripts/ifcfg-eth0 and there to configure static IP as following:

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes

but the terminal couldn't complete the ifcfg-eth0 part.

How can I solve it?
 
Old 12-10-2014, 09:41 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Add
TYPE=Ethernet
You might also want to add a gateway

If that doesn't help, please post complete error message and log ouput.
 
Old 12-10-2014, 12:07 PM   #3
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank u for reply.
The terminal doesn't complete "ifcfg-eth0", it completes until
/etc/sysconfig/network-scripts/
It doesn't have the option of "ifcfg-eth0", therefore i cannot reach the file in order to configure IP parameters.
 
Old 12-10-2014, 12:46 PM   #4
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Rep: Reputation: 18
Which distro are you using?
 
Old 12-10-2014, 01:41 PM   #5
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
VMware@Workstation
Centos
10.0.3 build 1895310

10X
 
Old 12-11-2014, 02:51 AM   #6
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Ok, now I understand what you mean.
So what ifcfg-files do you have? ("ls /etc/sysconfig/network-scripts/ifcfg-*") You see, "eth0" is just a name and could be anything - although eth0 is probably the most common.

If there is no ifcfg-file at all there is some other problem, we'll look into it then. You could start with checking the file "/etc/udev/rules.d/70-persistent-net.rules"
Is this a vmware guest?

Last edited by pingu; 12-11-2014 at 02:53 AM. Reason: Spelling
 
Old 12-11-2014, 07:47 AM   #7
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hi,

I managed to write "cat /etc/sysconfig/network-scripts/ifcfg-eth0" and got the following parameters:

DEVICE=eth0
HWADDR=00:0C:29:4B:FF:29
TYPE=Ethernet
UUID=...
ONBOOT=no
NM_CONTROLLED=yes
BOOTPOTO=dhcp

however when I (root) write the path "/etc/sysconfig/network-scripts/ifcfg-eth0" I get the message "Permission denied".

What should I do?
 
Old 12-11-2014, 08:06 AM   #8
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
You are not very clear, I'm not sure what you're actually doing.
What do you mean with "write the path "/etc/sysconfig/network-scripts/ifcfg-eth0"?
Please post output of:
ls -l /etc/sysconfig/network-scripts/
cat /etc/udev/rules.d/70-persistent-net.rules
 
Old 12-11-2014, 12:57 PM   #9
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
No DHCPOFFERS received

Pingu,

Please find attched files with the information u asked.

Thanks
 
Old 12-11-2014, 01:01 PM   #10
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
I can't see any files?
It's also better to just copy-paste the output directly into your post, makes it easier to follow the thread.
 
Old 12-11-2014, 02:05 PM   #11
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
results of ls -l /etc/sysconfig/network-scripts/

-rw-r--r--. 1 root root 136 Jun 22 06:40 ifcfg-eth0
-rw-r--r--. 1 root root 254 Oct 10 2013 ifcfg-lo
lrwxrwxrwx. 1 root root 20 Sep 7 17:00 ifdown -> ../../../sbin/ifdown
-rwxr-xr-x. 1 root root 627 Oct 10 2013 ifdown-bnep
-rwxr-xr-x. 1 root root 5430 Oct 10 2013 ifdown-eth
-rwxr-xr-x. 1 root root 781 Oct 10 2013 ifdown-ippp
-rwxr-xr-x. 1 root root 4168 Oct 10 2013 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Sep 7 17:00 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1481 Oct 10 2013 ifdown-post
-rwxr-xr-x. 1 root root 1064 Oct 10 2013 ifdown-ppp
-rwxr-xr-x. 1 root root 835 Oct 10 2013 ifdown-routes
-rwxr-xr-x. 1 root root 1465 Oct 10 2013 ifdown-sit
-rwxr-xr-x. 1 root root 1434 Oct 10 2013 ifdown-tunnel
lrwxrwxrwx. 1 root root 18 Sep 7 17:00 ifup -> ../../../sbin/ifup
-rwxr-xr-x. 1 root root 12444 Oct 10 2013 ifup-aliases
-rwxr-xr-x. 1 root root 859 Oct 10 2013 ifup-bnep
-rwxr-xr-x. 1 root root 10556 Oct 10 2013 ifup-eth
-rwxr-xr-x. 1 root root 11971 Oct 10 2013 ifup-ippp
-rwxr-xr-x. 1 root root 10490 Oct 10 2013 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Sep 7 17:00 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 727 Oct 10 2013 ifup-plip
-rwxr-xr-x. 1 root root 954 Oct 10 2013 ifup-plusb
-rwxr-xr-x. 1 root root 2364 Oct 10 2013 ifup-post
-rwxr-xr-x. 1 root root 4154 Oct 10 2013 ifup-ppp
-rwxr-xr-x. 1 root root 1925 Oct 10 2013 ifup-routes
-rwxr-xr-x. 1 root root 3289 Oct 10 2013 ifup-sit
-rwxr-xr-x. 1 root root 2488 Oct 10 2013 ifup-tunnel
-rwxr-xr-x. 1 root root 3770 Oct 10 2013 ifup-wireless
-rwxr-xr-x. 1 root root 4623 Oct 10 2013 init.ipv6-global
-rwxr-xr-x. 1 root root 1219 Sep 3 09:02 net.hotplug
-rw-r--r--. 1 root root 13449 Sep 3 09:02 network-functions
-rw-r--r--. 1 root root 29853 Oct 10 2013 network-functions-ipv6

results of cat /etc/udev/rules.d/70-persistent-net.rules

This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4b:ff:29", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4b:ff:33", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
 
Old 12-11-2014, 02:29 PM   #12
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
According to your udev output you have 2 nic's, eth0 and eth1. It could also be that you replaced a nic, in some occasions "eth0" is not replaced but a new nic "eth1" is created.
One important thing is whether this is a vmware guest or not, that question is still unanswered? If it is, we might need to look at vmware's config for the guest.

You could try to copy ifcfg-eth0 to ifcfg-eth1, see if you can bring up eth1 then.

And again, what exactly do you mean by "write the path "/etc/sysconfig/network-scripts/ifcfg-eth0""?
The file exists and is writable by root. What exactly did you do?
 
Old 12-11-2014, 03:12 PM   #13
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
I mean that the output of "/etc/sysconfig/network-scripts/ifcfg-eth0" is:
bash: /etc/sysconfig/network-scripts/ifcfg-eth0: Permission denied.


About the guest (I am not sure I understand the term) issue - I am using virtualized machine and CentOS is installed on it.

The following command:

ps ax|grep vmware

returns the following output:
3907 pts/2 S+ 0:00 grep vmware
 
Old 12-12-2014, 01:14 AM   #14
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Ah I see! You don't execute that file, it's read by system.
What you do to bring up the interface is command (as root or using sudo) "ifup eth0".
Maybe it's already in state up (can be even without ip) then you bring it down first "ifdown eth0".

In the file /etc/sysconfig/network-scripts/ifcfg-eth0, you can delete the line "UUID=..". Also HWADDR is not necessarily needed, you already have set DEVICE=eth0. No problem keeping it though.
If eth0 doesn't work as it should, try copying ifcfg-eth0 to ifcfg-eth1, change DEVICE=eth1 and HWADDR=00:0C:29:4B:FF:33
Then try "ifup eth1"
 
Old 12-12-2014, 11:52 AM   #15
AlexBoter
LQ Newbie
 
Registered: Dec 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hello,

After changing permission of ifcfg-eth0 file I managed to change the parameters as follows:

DEVICE=eth0
HWADDR=00:0C:29:4B:FF:29
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

In network-scripts directory was additional file named etho-lo, but I didn't find file of eth1, moreover the network-scripts directory doesn't permit to add/delete files.

Parameters of ifcfg-lo file:

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback


Thank u
 
  


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
No DHCPOFFERS received m0llbuz_ Linux - Networking 6 07-29-2010 02:08 PM
No DHCPOFFERS received ryedunn Linux - Wireless Networking 1 09-27-2008 01:22 PM
no DHCPOFFERS received. murrayfoss *BSD 9 02-09-2007 08:32 PM
No DHCPOFFERS received antonucc Linux - Networking 8 12-07-2006 04:06 AM
NO DHCPOFFERS received ekdya Debian 7 04-27-2006 04:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:16 PM.

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