LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-08-2016, 01:29 AM   #1
hardikgohil1988
Member
 
Registered: Sep 2014
Posts: 63

Rep: Reputation: Disabled
ping on-board Ethernet port


I am working on Embedded Board running on Linux 3.2.

There are two on-board Ethernet Ports eth0 and eth1.

I have a requirement to ping eth0 to eth1.

eth0 192.168.82.111
eth1 192.168.82.99

ping -I 192.168.82.111 192.168.82.99

There is a response but doesn’t matter whether eth0---eth1 connected or not.

How to make this work ?
 
Old 03-08-2016, 01:50 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
You don't have to make it work, as it allready does. If you did not block it with iptables or alike connections on the same machine will work. Like walking from the kitchen to the bathroom will work if no doors are locked.

What you are really up to?
 
Old 03-08-2016, 01:52 AM   #3
OregonJim
Member
 
Registered: Feb 2016
Posts: 98

Rep: Reputation: Disabled
Quote:
Originally Posted by hardikgohil1988 View Post
eth0 192.168.82.111
eth1 192.168.82.99

ping -I 192.168.82.111 192.168.82.99

How to make this work ?
You have two separate interfaces, but they are configured for the same subnet - 192.168.82.x. I don't understand how this would even be routable, unless I'm missing something here...
 
Old 03-08-2016, 02:08 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
You can route things with a bit of magic. Check out the advanced routing guide on the linux documentation program. Also if not applied can lead to some unpredicted behaviour. Like packages going in on eth0 and out of eth1. Thus screwing connections due to wrong IP's and MAC's.
 
Old 03-08-2016, 04:51 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Use telnet instead.

Actually be sure to change out subnets too.
 
Old 03-09-2016, 02:37 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Why do you prefer telnet over gopher?
 
Old 03-09-2016, 02:51 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
I prefer telnet over ping for this rather useless test. Ping isn't a very good diag tool in my thinking. When onboard nic's are tested sometimes the ip stack actually fools us.
 
Old 03-10-2016, 01:47 AM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Maybe traceroute come in handy.
 
Old 03-14-2016, 06:00 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
I'm not quite sure what you expected to happen, but it superficially seems to me that you are never asking the ping request to "actually leave the box." Therefore, indeed it would not matter whether an Ethernet cable were plugged-in to the interface or not. If you attempt to ping one address, which is "this box," from another address which is also "this box," then the traffic never has to leave the computer ... and so, it never does.
 
Old 03-21-2016, 03:21 AM   #10
hardikgohil1988
Member
 
Registered: Sep 2014
Posts: 63

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
You don't have to make it work, as it allready does. If you did not block it with iptables or alike connections on the same machine will work. Like walking from the kitchen to the bathroom will work if no doors are locked.

What you are really up to?
cannot ping

I have connected eth0<----->eth1 using cable

root@CPU7001:~ ip route
default via 192.168.82.251 dev eth0
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.1
192.168.82.0/24 dev eth0 proto kernel scope link src 192.168.82.111
192.168.82.0/24 dev eth1 proto kernel scope link src 192.168.82.99
 
  


Reply



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
continue of thread (Ping on one of ethernet port is not happening) utkarshrawat Linux - Networking 1 07-26-2014 04:35 PM
Ping on one of ethernet port is not happening utkarshrawat Linux - Networking 3 07-25-2014 04:53 AM
[SOLVED] Ethernet Port not detected after Mother Board Replacement 1991sudarshan Linux - Wireless Networking 4 01-28-2013 08:48 AM
dual ethernet port ping problem rani_162 Linux - Networking 2 12-11-2005 10:05 PM
x86 board PCM 6892 with dual ethernet port.eth1 doesnt ping if eth0 cable removed rani_162 Linux - Newbie 0 07-23-2005 12:29 PM

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

All times are GMT -5. The time now is 03:44 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