From owner-freebsd-net Tue Oct 24 8:50:18 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 0D55437B479 for ; Tue, 24 Oct 2000 08:50:16 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id LAA62447; Tue, 24 Oct 2000 11:48:40 -0400 (EDT) (envelope-from wollman) Date: Tue, 24 Oct 2000 11:48:40 -0400 (EDT) From: Garrett Wollman Message-Id: <200010241548.LAA62447@khavrinen.lcs.mit.edu> To: Mike Nowlin Cc: freebsd-net@FreeBSD.ORG Subject: src IP addr w/multiple ifaces In-Reply-To: References: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > How is this source IP chosen in the kernel If the source address is ``bound'' (either by the socket or by the protocol if there is no socket), then that source address will always be used. Otherwise, the source address is chosen to be the interface address associated with the route to the destination, or the interface address of the interface the destination is attached to if routing is disabled. This algorithm was chosen so that the Right Thing happens on multi-homed hosts where not all communication partners have routes to all addresses. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message