From owner-freebsd-questions Fri Jul 13 4:53:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailhub1.shef.ac.uk (mailhub1.shef.ac.uk [143.167.1.9]) by hub.freebsd.org (Postfix) with ESMTP id 871E737B403 for ; Fri, 13 Jul 2001 04:53:50 -0700 (PDT) (envelope-from m0th@dcs.shef.ac.uk) Received: from broadstone.shef.ac.uk ([143.167.23.251]) by mailhub1.shef.ac.uk with esmtp (Exim 3.22 #4) id 15L1W1-0001aG-00 for freebsd-questions@freebsd.org; Fri, 13 Jul 2001 12:53:49 +0100 Received: from BROADSTONE/SpoolDir by broadstone.shef.ac.uk (Mercury 1.48); 13 Jul 01 12:53:50 +0100 Received: from SpoolDir by BROADSTONE (Mercury 1.48); 13 Jul 01 12:53:50 +0100 Received: from smip (143.167.251.194) by broadstone.shef.ac.uk (Mercury 1.48); 13 Jul 01 12:53:49 +0100 Date: Fri, 13 Jul 2001 12:46:30 -0800 From: Tao Huang Reply-To: m0th@dcs.shef.ac.uk To: FreeBSD Subject: A question about how kernel choose the IP! X-mailer: FoxMail 3.1 [eg] Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <37CF5555FE9@broadstone.shef.ac.uk> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I have a question that how kernel choose the IP if there are more than one IP alias to one adaptor card? I try several test as follow. CASE 1: ifconfig xl0 inet 192.168.1.2 netmask 255.255.255.0 ifconfig xl0 inet 192.168.1.3 netmask 255.255.255.255 alias route -n add -net 0 192.168.1.1 I found that the kernel choose 192.168.1.2 as the source IP for communication CASE 2: ifconfig xl0 inet 192.168.2.2 netmask 255.255.255.0 ifconfig xl0 inet 192.168.1.3 netmask 255.255.255.0 alias route -n add -net 0 192.168.1.1 in this case, i found the kernel choose 192.168.1.3 as the source IP for communication. So, how does the kernel choose the source IP???????????? Cheers for your help. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message