Page 1 of 1

Enable Ping on all Ports Simultaneously

Posted: 2019/03/11 10:23:23
by xtdz32
<t>Greetings,<br/>
Please, i have a challenge i am facing, i have installed CentOS and configured IP .10, .11, .12 and .13 respectively, but i cannot ping the gateway from the individual ports.<br/>
ping -I Eth1 10.161.37.1<br/>
<br/>
i get a ping response successfully.<br/>
<br/>
then i type ping -I eht2 10.161.37.1 and i don't get a ping response.<br/>
but if i turn off the other lan ports, it automatically begins to ping successfully.<br/>
How do i configure that all ports can ping Default GW simultaneously?</t>

Re: Enable Ping on all Ports Simultaneously

Posted: 2019/03/11 10:48:42
by TrevorH
It's almost always a bad idea to have multiple interfaces with ip addresses that are in the same subnet as each other.

Oh, and Eth1 is not the same thing as eth1. Almost everything in linux is case sensitive.

Re: Enable Ping on all Ports Simultaneously

Posted: 2019/03/11 11:04:59
by tyler2016
TrevorH wrote:
2019/03/11 10:48:42
It's almost always a bad idea to have multiple interfaces with ip addresses that are in the same subnet as each other.

Oh, and Eth1 is not the same thing as eth1. Almost everything in linux is case sensitive.
Have you considered setting up bonding https://www.serverlab.ca/tutorials/linu ... -centos-6/ and setting up sub interfaces on the bonded interface if you need multiple IP addresses? You might need to modify your switch configuration to do load balancing efficiently, but even if you don't do any kind of load balancing, you will be protected from a failed NIC or switch port.

Re: Enable Ping on all Ports Simultaneously

Posted: 2019/03/11 11:07:02
by xtdz32
TrevorH wrote:
2019/03/11 10:48:42
It's almost always a bad idea to have multiple interfaces with ip addresses that are in the same subnet as each other.

Oh, and Eth1 is not the same thing as eth1. Almost everything in linux is case sensitive.
Ooh, ok, let me explain the scenario better.
server has 4 lan port.
on port 1 i configured 10.161.37.10
port 2 10.161.37.11/24
port 3 10.161.37.12/24
port 4 10.161.37.13/24

all having the same DF GW.

i can successfully ping default GW from port 1 by using the command "ping -I eno1 10.161.37.1"
but i cant ping GW successfully when i do the same for eno2, eno3 and eno4
i don't get a response.

but then if i turn off eno1, eno3 and eno4; eno2 will begin to ping successfully.

Re: Enable Ping on all Ports Simultaneously

Posted: 2019/03/11 11:13:34
by TrevorH
Yes, that's exactly the behaviour you can expect if you configure more than one interface with an ip address in the same subnets like that. Best advice is don't do that.

Re: Enable Ping on all Ports Simultaneously

Posted: 2019/03/11 11:15:52
by xtdz32
Ok Bro. Thanks. I was thinking it is abnormal