Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750926AbWIOHHT (ORCPT ); Fri, 15 Sep 2006 03:07:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750952AbWIOHHT (ORCPT ); Fri, 15 Sep 2006 03:07:19 -0400 Received: from hu-out-0506.google.com ([72.14.214.230]:24909 "EHLO hu-out-0506.google.com") by vger.kernel.org with ESMTP id S1750926AbWIOHHR (ORCPT ); Fri, 15 Sep 2006 03:07:17 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jVb/2sDx1AS7VyFPfOJYe57G4HeY3eGh4Qq6VReSGyd49PEcMraSCVeqSll/nWFYXDKc4oqUNhYCZa5xCNrB6wHEqxkt6W0V8SY0Blpc5KSvom4JKAERstkKVyeH05d68ZJuCE/cRZ+K2urffaXTZp0HsEKpYknx2Mo5gcQRlx0= Message-ID: Date: Fri, 15 Sep 2006 15:07:15 +0800 From: "xixi lii" To: "Jan Engelhardt" Subject: Re: UDP question. Cc: "Sven-Haegar Koch" , Linux-Kernel-Mailinglist In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1321 Lines: 35 2006/9/15, Jan Engelhardt : > > >> bind socket1.network adapter1... > >> bind socket2 network adapter2 > > > I am not really sure, but I think the bind to an adapter under linux only > > chooses the source ip, not really the adapter used to send the packets. > > To explicitly send things through a specific interface, you need to use > some magic, like PF_RAW. ping for example is one program that will do > this (-I option). > > > Did you check that the two destination ips have routes through different > > interfaces, and not go out through the same one? > > One cannot have the same subnet on multiple interfaces, because ARP > queries will only be sent through the first one. You need br0 (or bond0 > - depending on how you plan to plan your network) to make them one > interface. > > > Jan Engelhardt > -- My two adapters has two different IP address, and I bind one IP on one socket, do you mean that I alloc two socket and bind different IP is not helpful? In fact, all the packet sent from two socket is go out by one network adapter? xixi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/