Oh my friend, you really are confused! :-) (Please, no offence meant, we all need to start somewhere. I'm glad to be able to help!)
Quote:
Originally Posted by AlexBoter
After changing permission of ifcfg-eth0 file I managed to change the parameters as follows:
|
Quote:
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.
|
So you are not doing this as root or using 'sudo'.
You see, these files under /etc/sysconfig/ are meant to be changeable by root only, that's because they are a bit sensitive and ordinary users should never need to write into them. I can't go deep into details, but in Linux ordinary users never have the right to change system files. Only the "administrator", which in linux is named "root", is allowed to do that. So in order to change anything about your system, such as the file "/etc/sysconfig/network-scripts/ifcfg-eth0", you need root privileges.
One way is to login as root, another is to login as a user and then switch to root, a third approach is to use 'sudo' which roughly means "do this as root" - for this, the user account must have been granted rights to use sudo.
Maybe you know this already, maybe not. I just want to make it clear.
So, let's look into your problem:
The interface configuration for eth0 & eth1 was not in place. (= the files "/etc/sysconfig/network-scripts/ifcfg-eth0" & ifcfg-eth1 do not exist, or they have the wrong content.)
Troubleshoot:
The file "/etc/udev/rules.d/70-persistent-net.rules" keeps parameters for network cards.
You can see in your output from that file that the system knows about two nic's:
eth0 with HWADDR="ATTR{address}=="00:0c:29:4b:ff:29""
eth1 with HWADDR="ATTR{address}=="00:0c:29:4b:ff:33""
One of these should actually be usable - maybe both, but it depends. For instance, let's say you have only eth0 to start with, then when you clone or copy a system the HWADDR (which is also called "mac address") changes. Since there is a nic with a different HWADDR the system recognizes it a second nic, and assign the name "eth1" to it.
The file /etc/sysconfig/network-scripts/ifcfg-eth1 does not exist, I know. That's why I wanted you to copy /etc/sysconfig/network-scripts/ifcfg-eth0 to /etc/sysconfig/network-scripts/ifcfg-eth1, and then change DEVICE & HWADDR in the latter file.
Please do that now.
You need to do everything mentioned here in a terminal - it could be done using a GUI but it's a lot more difficult to guide you then.
Command to copy: "sudo cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1".
Then edit /etc/sysconfig/network-scripts/ifcfg-eth1 as described.
Use DHCP for now, it's good to start with since you will know for sure if the config is correct (if not you don't get an ip).
Now type:
sudo ifdown eth0
sudo ifdown eth1
sudo ifup eth0
sudo ifup eth1
Any result?
What does command "ifconfig" say? (Or, if this is CentOS 7. then "ifconfig" doesn't exist, use "ip addr" instead.)
If you still canät get it to work, please post
complete command chain including the prompt!