network card cannot be up after change int0& int1 to eth1&eth0

Issues related to configuring your network
aprilwumh
Posts: 2
Joined: 2017/09/06 12:56:28

network card cannot be up after change int0& int1 to eth1&eth0

Postby aprilwumh » 2017/09/06 13:15:25

Hi,

As cloud server default network configure int0 as private network int1 as public network.
But client's application must run public network on eth0 and private network on eth1.
I changed /etc/sysconfig/network-scripts/ifcfg-int0 to ifcfg-eth1
and changed /etc/sysconfig/network-scripts/ifcfg-int1 to ifcfg-eth0

Verified "biosdevname=0 net.ifnames=0" is configured to GRUB_CMDLINE_LINUX in the file of /etc/sysconfig/grub.

Changed /etc/udev/rules.d/70-persistent-ipoib.rules
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", ATTR{address}=="0c:c4:7a:89:0a:af", KERNEL=="eth*", NAME="eth0"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", ATTR{address}=="0c:c4:7a:89:0a:ae", KERNEL=="eth*", NAME="eth1"

But after reboot, the eth0 & eth1 cannot be up.

Try to run ifup ifcfg-eth0 manually, then get error as below
ERROR:[/etc/sysconfig/network-scripts/ifup-eth] Device eth0 has different MAC address than expected, ignoring.

Who can help to give some advice?
Thanks.

User avatar
TrevorH
Forum Moderator
Posts: 20332
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: network card cannot be up after change int0& int1 to eth1&eth0

Postby TrevorH » 2017/09/06 13:42:59

This sounds like a question for your provider as nothing I know of calls network interfaces "intX".
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

aprilwumh
Posts: 2
Joined: 2017/09/06 12:56:28

Re: network card cannot be up after change int0& int1 to eth1&eth0

Postby aprilwumh » 2017/09/06 14:25:48

TrevorH wrote:This sounds like a question for your provider as nothing I know of calls network interfaces "intX".

do you have any suggestion how to change these name?

User avatar
TrevorH
Forum Moderator
Posts: 20332
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: network card cannot be up after change int0& int1 to eth1&eth0

Postby TrevorH » 2017/09/06 17:00:36

No since I do not know how they made them appear with such names, hence the suggestion to ask them.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

hunter86_bg
Posts: 701
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: network card cannot be up after change int0& int1 to eth1&eth0

Postby hunter86_bg » 2017/09/07 04:11:33

By the way, after making those changes, have you rebuild your initramfs ?
If not - do it.

tunk
Posts: 135
Joined: 2017/02/22 15:08:17

Re: network card cannot be up after change int0& int1 to eth1&eth0

Postby tunk » 2017/09/07 09:58:58

I had to change from emN to ethN, and the advice I found was slightly different:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:11:22:33:44:55", ATTR {type}=="1", KERNEL=="eth*", NAME="public"
You may also want to check that the names and mac addresses in ifcfg-ethN are correct.