bind ICMP to specific IP address

From: Stuart Kendrick (skendric_at_fhcrc.org)
Date: 11/30/03


Date: 30 Nov 2003 10:11:22 -0800

hi,

i'd like to run a number of ICMP intensive scripts from a single box.
in my experience, this is problematic ... ICMP doesn't support ports
the way TCP and UDP do, so the IP stack doesn't know to which process
to return the ICMP Echo Reply ... so process A can receive a response
to a ping which process B emitted ... neither process enjoys this ...
nor does the operator.

typically, /usr/sbin/ping supports the "-I" parameter, which allows it
to bind to a specified IP address ... that way, i can configure the box
with multiple IP addresses, bind each process' /usr/sbin/ping instance
to a different IP address ... and avoid stomping on myself.

but fping doesn't support the "-I" parameter. and i really like a number
of fping's features.

argh.

ok, so i can rewrite fping in Perl ... the Net::Ping module ships with
example code. and Net::Ping supports a 'bind' parameter, which allows
lets me specify the source IP address for the ICMP packet. but then,
i have to run my scripts as root or at least as setuid root ... neither
of which thrills me.

Net::Ping::External doesn't require root access to run, as it uses the
OS's ping binary. But ... it doesn't yet support binding to different
IP addresses (presumably, the "-I" parameter varies enough between OSes
that this is hard to support).

i think i'm stuck. i think i need more hardware -- one box per
ping-intensive app.

does anyone know of way around this?

--sk

Stuart Kendrick
FHCRC



Relevant Pages

  • binding ICMP to a specific IP address
    ... i'd like to run a number of ICMP intensive scripts from a single box. ... to bind to a specified IP address ... ... but fping doesn't support the "-I" parameter. ...
    (comp.lang.perl.misc)
  • WIZnet Chip W3100as TCP/IP Support
    ... that they are supporting TCP, UDP, IP, ICMP etc. ... But i want the detailed features what they support in TCP/IP. ... Time Exceeded, ICMP Echo Request or Reply, ICMP Address ...
    (comp.arch.embedded)
  • WIZZnet Chip W3100as TCP/IP Support
    ... that they are supporting TCP, UDP, IP, ICMP etc. ... But i want the detailed features what they support in TCP/IP. ... Time Exceeded, ICMP Echo Request or Reply, ICMP Address ...
    (comp.arch.embedded)
  • Re: Making ICMP the default traceroute protocol?
    ... IWFs tend to also block ICMP. ... UDP traceroutes that ICMP traceroutes. ... with SP2 installed have no support for UDP traceroutes either. ...
    (freebsd-net)
  • Re: binding ICMP to a specific IP address
    ... > i'd like to run a number of ICMP intensive scripts from a single box. ... You ping a specific host or IP, so unless 2 processes are pinging the ...
    (comp.lang.perl.misc)