Network not reachable after ifdown and ifup of interfaces?

Issues related to configuring your network
Post Reply
akhilr
Posts: 3
Joined: 2021/03/18 12:15:55

Network not reachable after ifdown and ifup of interfaces?

Post by akhilr » 2021/03/18 12:36:37

Hi Team,

I had came up with one issue in centos7, in my centos7 server i have 2 interfaces (ens0,ens1), i did ifdown of ens1, i can reach my machine and it is as expected. now i did ifdown on ens0, both the interfaces are down and so i cant reach my machine as expected, now i did ifup ens0, still not able to reach my machine :( , i did ifup on ens1 still not able to reach the machine which is not expected!!

i did network restart and then i am able to reach my machine back, i want to understand why was my machine not reachable after bringing up the ports.

please throw some light buddies!! 8-)

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

Re: Network not reachable after ifdown and ifup of interfaces?

Post by tunk » 2021/03/18 23:11:38

How are the two interfaces setup?

akhilr
Posts: 3
Joined: 2021/03/18 12:15:55

Re: Network not reachable after ifdown and ifup of interfaces?

Post by akhilr » 2021/03/19 04:33:12

Hi please find my network config:

cat ens51

DEVICE=ens51
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
PEERDNS=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
ETHTOOL_OPTS="--config-ntuple $DEVICE rx-flow-hash udp4 sdfn; -G $DEVICE rx 2048 tx 2048"
MTU=9050

cat ens50

DEVICE=ens50
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
PEERDNS=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
ETHTOOL_OPTS="--config-ntuple $DEVICE rx-flow-hash udp4 sdfn; -G $DEVICE rx 2048 tx 2048"
MTU=9050

Thanks and Regards
Akhil

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Network not reachable after ifdown and ifup of interfaces?

Post by jlehtone » 2021/03/19 08:16:16

In first post you did mention two interfaces: ens0 and ens1. You also mention CentOS 7, although you have posted to CentOS 8 Forum.
Now you show three differently named interfaces: ens50, ens51, and bond0

If you have a bond with two slaves and you turn off both slaves, then the bond turns off too.
If you restart the slaves but not the bond, it probably stays off.

akhilr
Posts: 3
Joined: 2021/03/18 12:15:55

Re: Network not reachable after ifdown and ifup of interfaces?

Post by akhilr » 2021/03/19 09:24:07

Hello Jlehtone,

i meantioned ens0 and ens1 as an example, sorry for that if it is confusing, yah ihad noticed that bond0 is not up and if i make it up then i am able to ping it. thanks for the support :)

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Network not reachable after ifdown and ifup of interfaces?

Post by TrevorH » 2021/03/19 09:33:02

Your bond status can be seen by reading cat /proc/net/bonding/bond0
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply