Networking Forums

Networking Forums > Computer Networking > Linux Networking > hping multiple interface issue

Reply
Thread Tools Display Modes

hping multiple interface issue

 
 
data
Guest
Posts: n/a

 
      05-05-2004, 12:01 AM
Hi,

My setup is like this:

eth0 = 10.10.5.5/24
eth1 = 192.168.5.5/24

When i try to send a hping to a host via eth1:

/usr/sbin/hping 10.10.5.8 -1 -I eth1 -c 2

the ICMP requests go through eth0, but the ICMP reply is received on
the eth1 interface.
- How to forcibly send the packet via eth1?
- Is there a way to bypass the linux routing table?

TIA.
 
Reply With Quote
 
 
 
 
David Efflandt
Guest
Posts: n/a

 
      05-06-2004, 04:51 AM
On 4 May 2004 17:01:23 -0700, data <(E-Mail Removed)> wrote:
> Hi,
>
> My setup is like this:
>
> eth0 = 10.10.5.5/24
> eth1 = 192.168.5.5/24
>
> When i try to send a hping to a host via eth1:
>
> /usr/sbin/hping 10.10.5.8 -1 -I eth1 -c 2
>
> the ICMP requests go through eth0, but the ICMP reply is received on
> the eth1 interface.
> - How to forcibly send the packet via eth1?
> - Is there a way to bypass the linux routing table?


Sounds like hping is not working per its man page. Either add the desire
route to 10.10.5.8 using dev eth1 (host route or using whatever gateway),
or read Adv-Routing HOWTO.

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      05-06-2004, 03:32 PM
(E-Mail Removed) (data) wrote in message news:<(E-Mail Removed) om>...
> Hi,
>
> My setup is like this:
>
> eth0 = 10.10.5.5/24
> eth1 = 192.168.5.5/24
>
> When i try to send a hping to a host via eth1:
>
> /usr/sbin/hping 10.10.5.8 -1 -I eth1 -c 2
>
> the ICMP requests go through eth0, but the ICMP reply is received on
> the eth1 interface.
> - How to forcibly send the packet via eth1?
> - Is there a way to bypass the linux routing table?
>
> TIA.


This is "standard" Linux behavior -- the IPs attach to the host (main
route table), not to the interface, so Linux uses the "handiest"
interface. You pinged 10.10.5.8/24 so it sent out through the
interface on the same subnet. But you told hping to use eth1 -- which
is where the reply came. Sounds like the handiest route to 10.10.5.8
was via the interface on 10.10.5.0 -- are you really surprised?

As D.E. suggests, look at the lartc howto and several others to get a
good picture of how Linux handles IP. It's possible to associate an
interface with a particular route table, but maintainence is no fun
unless you really need it. See policy routing.

hth,
prg
email above disabled
 
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
Multiple MACs from same Interface OR MAC/VLAN NATting nikhil.subscribed@gmail.com Linux Networking 0 08-28-2006 10:02 AM
Multiple External interface device >>Smith Windows Networking 10 04-17-2006 12:59 AM
Odd dual interface issue Ryan Lovett Linux Networking 2 10-18-2004 09:52 PM
assigning multiple IP address to one interface via dhcpd Nejat AYDIN Linux Networking 4 06-07-2004 12:26 AM
Multiple IP addresses (or hosts) on one LAN interface Patrick Lam Linux Networking 5 07-22-2003 03:35 PM



1 2 3 4 5 6 7 8 9 10 11