LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2013, 05:02 PM   #1
georgewhr
Member
 
Registered: Nov 2012
Location: SF Bay Area
Posts: 47

Rep: Reputation: Disabled
can't ping to different interface


Hello. I have a host1 with 3 ethernet interface eth0, eth1, eth2, and a host2 with only eth0. All of 4 interfaces are in a same subnet 192.168.1.0/24, eth0 is 192.168.1.5/24, eth1 is 192.168.1.8/24, eth2 is 192.168.1.12/24(host1). eth0 on host2 is 192.168.1.2/24. When I connect eth0(host2) and eth1(host1) together they can ping each other, however when I connect eth2(host) and eth0(host1) or eth2(host) together they will NOT ping each other. Any idea what's goning on? I guesss eth1 on host1 occupy some ports but I m not sure..
 
Old 08-12-2013, 08:33 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,284

Rep: Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661
Ping to localhost isn't a very good test. Putting 4 ip's on the same subnet will foul some of the other rules of tcp/ip. Use new subnets for each but I'd consider other tools also.
 
Old 08-13-2013, 10:53 PM   #3
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
Quote:
Originally Posted by georgewhr View Post
however when I connect eth2(host) and eth0(host1) or eth2(host) together they will NOT ping each other.
Just to clarify, which port are you connecting to which?

Quote:
Originally Posted by jefro View Post
Putting 4 ip's on the same subnet will foul some of the other rules of tcp/ip. Use new subnets for each but I'd consider other tools also.
I don't think this statement is accurate enough; subnets consist of IP's which belong to a single logical group. There's no reason why he can't put all IP's under the same subnet, provided that this logical topology is consistent with his physical layout.
 
Old 08-14-2013, 04:54 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,284

Rep: Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661Reputation: 3661
I may have missed that up. I was thinking he was wanting a different deal such as ping across a host.

If one had a switch or even a hub where all 4 nics connected to the same time and they had firewall open for icmp and they forced ping to go from a nic ip and they didn't have any gateway or hosts file issue or using fqdn or name deal it should ping. But, we are kind of back to why are you using ping.
 
Old 08-17-2013, 02:08 AM   #5
MikeDeltaBrown
Member
 
Registered: Apr 2013
Location: Arlington, WA
Distribution: Slackware
Posts: 96

Rep: Reputation: 10
Check your routing table (`route -n`).

The last interface configured on the 3-interface host will probably be the interface that packets will be sent out of for the entire subnet. If that interface isn't plugged in, then you won't receive your ICMP "Echo reply" packet.
 
Old 08-24-2013, 12:51 PM   #6
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
If you put the same subnet on 4 interfaces you will end up with 4 possible routes out fo the host for that subnet.
I beleive that linux picks the first route it finds in the table as the next hop for the subnet, so while you may receive packets on all four interfaces it is mnost likely that all the replies will exit out of a single one.

If all your interfaces are sitting in the same vlan on the same switch you probably won't have a problem, however if you have physically split the subnet without splitting is logically, i.e. subnettting it, then you will run into problems as all your traffic for the subnet will all exit via one interface.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't ping through wireless interface shamoo Linux - Wireless Networking 1 07-13-2013 10:20 PM
[SOLVED] Disable ping on 1 interface but allow on another? tara Linux - Networking 2 08-14-2010 05:21 AM
ping through a specific interface ALInux Linux - Networking 9 02-11-2010 12:52 PM
can't ping virtual interface vortmax Linux - Networking 1 02-01-2010 01:53 PM
2 interface, ping error ! Mycado Linux - Networking 9 06-07-2006 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration