Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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
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.
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?
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"
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.