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 07-26-2012, 03:41 PM   #1
langou00
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Rep: Reputation: Disabled
Unable to ping between two interfaces on the same box


There are multiple eth interfaces on my box. I connected two of them directly back-to-back using a fiber cable. But I could not ping from one to the other successfully.

(1) The two interfaces are:

eth1 Link encap:Ethernet HWaddr 00:1B:21:A2:73:8C
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::21b:21ff:fea2:738c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:165 errors:0 dropped:0 overruns:0 frame:0
TX packets:670 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25574 (24.9 KiB) TX bytes:46748 (45.6 KiB)

eth7 Link encap:Ethernet HWaddr 00:1B:21:5C:FD:E8
inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::21b:21ff:fe5c:fde8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:651 errors:0 dropped:0 overruns:0 frame:0
TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:53068 (51.8 KiB) TX bytes:24290 (23.7 KiB)


(2) The ping output:
# ping 10.0.0.1 -I eth7
PING 10.0.0.1 (10.0.0.1) from 10.0.0.2 eth7: 56(84) bytes of data.
From 10.0.0.2 icmp_seq=2 Destination Host Unreachable
From 10.0.0.2 icmp_seq=3 Destination Host Unreachable
From 10.0.0.2 icmp_seq=4 Destination Host Unreachable
^C
--- 10.0.0.1 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4000ms
pipe 3
# ping 10.0.0.2 -I eth1
PING 10.0.0.2 (10.0.0.2) from 10.0.0.1 eth1: 56(84) bytes of data.
From 10.0.0.1 icmp_seq=2 Destination Host Unreachable
From 10.0.0.1 icmp_seq=3 Destination Host Unreachable
From 10.0.0.1 icmp_seq=4 Destination Host Unreachable
^C
--- 10.0.0.2 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2999ms
pipe 3

(3) The ARP output:
# arp
Address HWtype HWaddress Flags Mask Iface
10.0.0.1 (incomplete) eth7
10.0.0.2 ether 00:1b:21:5c:fd:e8 C eth1
10.126.135.254 ether 00:04:96:1e:4f:50 C eth0

(4) I added the ARP entry manually, but still failed to ping:
# arp -s 10.0.0.1 00:1B:21:A2:73:8C -i eth7
# arp
Address HWtype HWaddress Flags Mask Iface
10.0.0.1 ether 00:1b:21:a2:73:8c CM eth7
10.0.0.2 ether 00:1b:21:5c:fd:e8 C eth1
10.126.135.254 ether 00:04:96:1e:4f:50 C eth0

# ping 10.0.0.1 -I eth7
PING 10.0.0.1 (10.0.0.1) from 10.0.0.2 eth7: 56(84) bytes of data.
^C
--- 10.0.0.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms


# tcpdump -i eth7
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth7, link-type EN10MB (Ethernet), capture size 65535 bytes
13:16:38.417302 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 56000, seq 8, length 64
13:16:39.417289 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 56000, seq 9, length 64
13:16:40.417367 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 56000, seq 10, length 64


Just don't know why it did not work??!

Any help will be appreciated.

Last edited by langou00; 07-26-2012 at 03:46 PM.
 
Old 07-26-2012, 04:18 PM   #2
whizzit
Member
 
Registered: Aug 2004
Location: UK
Distribution: Gentoo, OpenBSD, Debian, FreeBSD, RHEL, CentOS
Posts: 65

Rep: Reputation: 24
When connecting two interfaces directly together you will need a cross over cable. Are you sure you're using the right kind of cable?
 
Old 07-26-2012, 04:35 PM   #3
langou00
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi whizzit,

Thanks. I may not use the right cable. But the tcpdump on the receiver side showed the ICMP request was received.

For example, when "# ping 10.0.0.1 -I eth7",
On the sender interface:
Quote:
# tcpdump -i eth7
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth7, link-type EN10MB (Ethernet), capture size 65535 bytes
13:47:43.696289 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 58192, seq 9, length 64
13:47:44.696307 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 58192, seq 10, length 64
13:47:45.696294 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 58192, seq 11, length 64
On the receiver interface:
Quote:
# tcpdump -i eth1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
13:47:55.696369 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 58192, seq 21, length 64
13:47:56.696346 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 58192, seq 22, length 64
13:47:57.696330 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 58192, seq 23, length 64
 
Old 07-27-2012, 10:20 AM   #4
Harryrat
LQ Newbie
 
Registered: Jul 2012
Posts: 7

Rep: Reputation: Disabled
I guess the problem is, that you try to use two local IPs. Try tcpdump -i any, there you should see the response to the requests...The problem is, that you cannot (?) enforce the answer to go through the cable again. Instead it will be normally routed, which will end up in the local routing table and thus no packet will leave the box.
 
  


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
Unable To Ping Win XP Box from RH9 Box ganesh raorane Linux - Networking 3 10-15-2010 06:03 PM
Unable to ping Linux box Fritz_Monroe Linux - Newbie 3 05-19-2005 07:12 AM
Unable to ping Linux box from Windows westone Linux - Networking 5 07-14-2004 04:41 PM
Unable to ping internet through RH7.3 box w/ 2nics dc78 Linux - Networking 3 02-07-2004 07:56 PM

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

All times are GMT -5. The time now is 04:59 AM.

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