Networking Forums

Networking Forums > Computer Networking > Linux Networking > ping doesn't use my network driver

Reply
Thread Tools Display Modes

ping doesn't use my network driver

 
 
Gregory S Topmiller
Guest
Posts: n/a

 
      02-18-2005, 11:09 AM
I've written a network driver that is eventually going to work with an
FPGA to send and
receive IP frames. I open it using "ifconfig ethfpga0 192.80.160.240".
I've written a test
program that opens a socket and binds the above address then I use ioctl
calls to send
and receive buffers which works appropriately. My problem is that when
I try
"ping -I192.80.160.240 10.10.52.154" it doesn't go through my driver.
The ping
does work though. I guess it's using the routing tables to find a path
to 10.10.52.154.
I'm using kernel 2.6.3 and have based my driver on the snull driver
example. I've
also tried pinging 192.80.160.240 and it works.

Is there a way to run ping to ensure the packets originate from a
certain IP address
and therefore go through my driver?

 
Reply With Quote
 
 
 
 
chris-usenet@roaima.co.uk
Guest
Posts: n/a

 
      02-18-2005, 02:10 PM
Gregory S Topmiller <(E-Mail Removed)> wrote:
> ifconfig ethfpga0 192.80.160.240


> "ping -I192.80.160.240 10.10.52.154" it doesn't go through my driver.
> The ping does work though. I guess it's using the routing tables to
> find a path to 10.10.52.154.


It has to, otherwise it can't get to 10.*

> Is there a way to run ping to ensure the packets originate from a
> certain IP address and therefore go through my driver?


You're doing that already - but you have to ensure that there's a route to
the destination via that interface. You either need a host that appears
to be on your 192.80.160 network or a router that can provide a route
to your 10 network.

You could try the -r flag, I suppose, but I've not been there
Chris
 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      02-18-2005, 03:50 PM
Gregory S Topmiller <(E-Mail Removed)> writes:

>I've written a network driver that is eventually going to work with an
>FPGA to send and
>receive IP frames. I open it using "ifconfig ethfpga0 192.80.160.240".
>I've written a test
>program that opens a socket and binds the above address then I use ioctl
>calls to send
>and receive buffers which works appropriately. My problem is that when
>I try
>"ping -I192.80.160.240 10.10.52.154" it doesn't go through my driver.
>The ping
>does work though. I guess it's using the routing tables to find a path
>to 10.10.52.154.


Of course. ALL network stuff uses the routing table. That is what the
routing table is for. So, change the routing table to tell all network
stuff to send stuff through your ethfpga0 All -I does, as I read it, is to
set the source address on the packet. It does not tell the network software
o
which interface to send the packet out on.

route add -host 10.10.52.154 ethfpga0
if ethfpga0 is directly connected to your computer by that port.


By the way, 10.10.52.154 is unroutable, so it will get dropped by the first
router along the way.


>I'm using kernel 2.6.3 and have based my driver on the snull driver
>example. I've
>also tried pinging 192.80.160.240 and it works.


>Is there a way to run ping to ensure the packets originate from a
>certain IP address
>and therefore go through my driver?


route them through the proper port.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
driver doesn't support WPA? johnny Wireless Internet 0 10-28-2006 10:08 PM
Dig and nslookup resolve; ping doesn't Mark Tunnell Linux Networking 1 07-14-2005 07:59 PM
pcnet32 driver doesn't work for AT2450-FTX? Runar J?rgensen Linux Networking 3 11-03-2004 08:11 AM
WZC doesn't know our driver is WPA capable...How to tell WZC? PingPong Wireless Networks 9 08-19-2004 09:42 PM
Peer to peer network with two machines, ping doesn't work linuxquestion@yahoo.com Linux Networking 11 02-02-2004 05:51 AM



1 2 3 4 5 6 7 8 9 10 11