LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-05-2002, 09:39 AM   #1
chaste
LQ Newbie
 
Registered: Aug 2002
Posts: 16

Rep: Reputation: 0
Red face Ping - Surely this should be simple????


This is probably a really dumb question, but.....

I've got a RedHat 7.3 machine with two NIC's installed.

eth0 has a fixed ip address of 192.168.1.2
eth1 has a fixed ip address of 192.168.67.1

The two cards are connected to one another with a CAT 5 cross-over network cable.

I'm trying the following ping commands....

ping -I eth0 192.168.67.1 and
ping -I eth1 192.168.1.2

Both fail. Am I missing something basic? Does the machine require additional routing information? I have already turned on IP forwarding.

Any help appreciated!

-Chris
 
Old 08-05-2002, 09:55 AM   #2
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
post the output of ifconfig and netstat -ar please

By the way, are you trying to create some sort of endless packet loop?
 
Old 08-05-2002, 10:42 AM   #3
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
I tried your command on my setup and it failed also, I think ping -I (a capital letter i) expects an interface address, not an interface name. Try:

ping -I 192.168.1.2 192.168.67.1

and vice-versa.

-Bob
 
Old 08-05-2002, 12:29 PM   #4
chaste
LQ Newbie
 
Registered: Aug 2002
Posts: 16

Original Poster
Rep: Reputation: 0
Bob,

Thanks you're right. Specifying the interface as an IP address does the trick.

I've got an ADSL router on the 192.168.1.X network with an IP address of 192.168.1.1 when I ping this from the 192.168.1.2 interface I get replies OK, however if I ping it using the 192.168.67.1 interface I get nothing back. Any thoughts?

I've included the netstat output below.

[root@ph-firewall root]# netstat -ra
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 40 0 0 eth0
192.168.67.0 * 255.255.255.0 U 40 0 0 eth1
127.0.0.0 * 255.0.0.0 U 40 0 0 lo
default 192.168.1.1 0.0.0.0 UG 40 0 0 eth0
 
Old 08-05-2002, 12:46 PM   #5
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
Well, your default route may be overriding the interface specification in the ping command. Try deleting your default route while pinging on the "wrong" interface. Or better, put another machine on the .67.x net and ping it.

-Bob
 
Old 08-05-2002, 05:48 PM   #6
chaste
LQ Newbie
 
Registered: Aug 2002
Posts: 16

Original Poster
Rep: Reputation: 0
Bob,

If I put a machine on the 192.168.67.X network with an address of 192.168.67.10 and try and ping it from the 192.168.1.2 interface then that's OK.

If I delete the default route in the routing table I'm still not able to ping 192.168.1.1. This is now really starting to anoy me!

In summary then...
From eth0 (192.168.1.2) I can successfully ping the following addresses
192.168.1.1, 192.168.67.1, 192.168.67.10

From eth1 (192.168.67.1) I can successfully ping these addresses
192.168.67.10, 192.168.1.2

What will NOT work is pinging 192.168.1.1 from eth1.

Is it possible that it's some configuration of the router not responding to networks outside of the 192.168.1.0 network?

-Chris
 
Old 08-06-2002, 07:41 AM   #7
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
Yes, it's possible that the router is either
a) ignoring a ping originating from a private subnet it is not part of,
or
b) attempting to reply via a different route which does not return to the originator.
But, I have to say, I think your NICs appear to be working fine. Why are you trying so hard to route on the "wrong" subnets?

-Bob
 
Old 08-06-2002, 08:02 AM   #8
chaste
LQ Newbie
 
Registered: Aug 2002
Posts: 16

Original Poster
Rep: Reputation: 0
If you look at my other post a bit further down (regarding topology) you'll see that I'm trying to setup a home network.

The problem was that.... It didn't work! Whilst the Linux box connects quite happily to the internet the clients on the 192.168.67.X network were failing. This exercise was an attempt to break things down into manageable chunks in order to find out where the problem was.

I'm convinced that the problem is the router either a) It can't perform NAT for the .67 network or b) it doesn't know how to route the traffic back to the clients.

The topology I went for was based around the need to ensure that the network was firewalled by the Linux machine (firewall is not present at present in order to avoiding complicatiing things!) and I thought in order to do that I had to ensure that every IP packet passed through that machine.

I'm starting to wonder if this could have been achieved by having everything on the 192.168.1.X network and the use of routing tables? Any thoughts?

-Chris
 
Old 08-06-2002, 08:42 AM   #9
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
OK, I see your other thread. Maybe I'll chime in over there.

-Bob
 
  


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
Simple Ping problem bkesting Linux - Networking 11 11-30-2004 02:53 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
ungzipping/untarring to another directory? Surely! hamster Linux - Newbie 4 05-22-2003 06:22 PM

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

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