Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

Robin.Lin
Dear all,

When I enable two Ethernet cards support of Intel i82559 for Intel
IXDP465 platform, I get some problems.
If I set the both IP address in the same domain, such as 192.168.0.1 and
192.168.0.2, subnet mask is 255.255.255.0 and default gateway is
192.168.0.254.
It seems work fine. But actually, when I ping the first Ethernet card, I
get reply packet from the first Ethernet card. And then I ping the
second Ethernet card, I ALSO get reply packet from the first Ethernet
card. If I unplug the second Ethernet card, I can't ping the second
Ethernet card. And if I unplug the first Ethernet card, I can't ping
BOTH Ethernet card. The same situation can reproduce on Ix86 platform.
It's weird.
So, if I want the Ethernet card send reply packet through the incoming
Ethernet card, what should I do?
Any reply or suggestion would be good.

Best regards,

Robin Lin


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

clemens fischer-2
Robin.Lin in <[hidden email]>:

>  When I enable two Ethernet cards support of Intel i82559 for Intel
>  IXDP465 platform, I get some problems.

>  If I set the both IP address in the same domain, such as 192.168.0.1
>  and 192.168.0.2, subnet mask is 255.255.255.0 and default gateway is
>  192.168.0.254.

>  It seems work fine. But actually, when I ping the first Ethernet
>  card, I get reply packet from the first Ethernet card. And then I
>  ping the second Ethernet card, I ALSO get reply packet from the first
>  Ethernet card.

could be the ARP protocol decided that the first ethernet card is the
best route.  can you use "etherreal" to watch your net?  "ping" is not
the best tool for layer-2 protocols.

clemens


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

Matt Jerdonek
In reply to this post by Robin.Lin
I'm not sure that the behavior you describe is
incorrect.  From the IP stack's viewpoint, it is
trying to forward an ICMP response, and it'll take the
shortest path.  If the IP stack's route to the subnet
is via eth0, then it'll use eth0 regardless of what
interface the packet was received on.  This is
especially true for ICMP traffic since it isn't bound
to an IP address.

You might consider writing some TCP code and using
bind(...) to specify the source ip address you'd like
to use.  That might provide different results.

-- Matt

--- "Robin.Lin" <[hidden email]> wrote:

> Dear all,
>
> When I enable two Ethernet cards support of Intel
> i82559 for Intel
> IXDP465 platform, I get some problems.
> If I set the both IP address in the same domain,
> such as 192.168.0.1 and
> 192.168.0.2, subnet mask is 255.255.255.0 and
> default gateway is
> 192.168.0.254.
> It seems work fine. But actually, when I ping the
> first Ethernet card, I
> get reply packet from the first Ethernet card. And
> then I ping the
> second Ethernet card, I ALSO get reply packet from
> the first Ethernet
> card. If I unplug the second Ethernet card, I can't
> ping the second
> Ethernet card. And if I unplug the first Ethernet
> card, I can't ping
> BOTH Ethernet card. The same situation can reproduce
> on Ix86 platform.
> It's weird.
> So, if I want the Ethernet card send reply packet
> through the incoming
> Ethernet card, what should I do?
> Any reply or suggestion would be good.
>
> Best regards,
>
> Robin Lin
>
>
> --
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
>
>



               
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Re: Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

Andrew Lunn-2
In reply to this post by clemens fischer-2
On Mon, Dec 26, 2005 at 06:37:34PM +0100, clemens fischer wrote:

> Robin.Lin in <[hidden email]>:
>
> >  When I enable two Ethernet cards support of Intel i82559 for Intel
> >  IXDP465 platform, I get some problems.
>
> >  If I set the both IP address in the same domain, such as 192.168.0.1
> >  and 192.168.0.2, subnet mask is 255.255.255.0 and default gateway is
> >  192.168.0.254.
>
> >  It seems work fine. But actually, when I ping the first Ethernet
> >  card, I get reply packet from the first Ethernet card. And then I
> >  ping the second Ethernet card, I ALSO get reply packet from the first
> >  Ethernet card.

This is correct behaviour. If it did anything else, it would be
broken.  Why do you think it should do something different?

        Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

Robin.Lin
In reply to this post by Robin.Lin
Thanks for the replies from Matt, Clemens, and Andrew.
I have written a TCP application to test and the behavior was the same.
I have used sniffer to catch the packets to verify. I know the default
behavior is correct. But when I unplug the first Ethernet card's cable,
it should not make the second Ethernet card fail. It will take the first
Ethernet card as the best route path, but when the path is broken, it
can't rebuild the route path. That's the problem.
I don't know how to fix the problem. Should I modify the driver of Intel
i82559? Or what else I can try? Could anyone give me the direction?

Robin

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Re: Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

Matt Jerdonek

What is likely happening is that the route for the
subnet is associated with eth0.  When eth0 goes down,
the subnet needs to be reassigned to eth1.  This
doesn't happen automatically.

You can view the current list of network routes by
invoking show_network_tables(...) in
packages/net/bsd_tcpip/current/src/ecos/support.c.

Then you'd have to write some code to delete the route
pointing at eth0 and replace it with the route
pointing at eth1.  An example of that code can be
found in the ppp stack in dodefaultroute(...) in
packages/net/ppp/current/src/sys-ecos.c

Hope this helps,
-- Matt


--- "Robin.Lin" <[hidden email]> wrote:

> Thanks for the replies from Matt, Clemens, and
> Andrew.
> I have written a TCP application to test and the
> behavior was the same.
> I have used sniffer to catch the packets to verify.
> I know the default
> behavior is correct. But when I unplug the first
> Ethernet card's cable,
> it should not make the second Ethernet card fail. It
> will take the first
> Ethernet card as the best route path, but when the
> path is broken, it
> can't rebuild the route path. That's the problem.
> I don't know how to fix the problem. Should I modify
> the driver of Intel
> i82559? Or what else I can try? Could anyone give me
> the direction?
>
> Robin



       
               
__________________________________
Yahoo! for Good - Make a difference this year.
http://brand.yahoo.com/cybergivingweek2005/

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Re: Dual Ethernet Cards of Intel i82559 for Intel IXDP465 platform

Andrew Lunn-2
On Tue, Dec 27, 2005 at 07:02:39AM -0800, Matt Jerdonek wrote:

>
> What is likely happening is that the route for the
> subnet is associated with eth0.  When eth0 goes down,
> the subnet needs to be reassigned to eth1.  This
> doesn't happen automatically.
>
> You can view the current list of network routes by
> invoking show_network_tables(...) in
> packages/net/bsd_tcpip/current/src/ecos/support.c.
>
> Then you'd have to write some code to delete the route
> pointing at eth0 and replace it with the route
> pointing at eth1.  An example of that code can be
> found in the ppp stack in dodefaultroute(...) in
> packages/net/ppp/current/src/sys-ecos.c

Just to add to that.

eCos has no concept of link state, ie plugged in or not. You would
have to add an ioctl call to detect this and a "user" space thread
which polled this ioctl to detect if the state has changed. If it has
you can then delete all routes via the interface.

The other option is to port a routing daemon. The routing daemon would
notice the lack of routing packets over an interface and change the
routes.

        Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss