Date: Tue, 24 Oct 2000 11:41:54 +0300 From: Ruslan Ermilov <ru@sunbay.com> To: Mike Nowlin <mike@argos.org> Cc: freebsd-net@FreeBSD.ORG Subject: Re: src IP addr w/multiple ifaces Message-ID: <20001024114154.B67369@sunbay.com> In-Reply-To: <Pine.LNX.4.21.0010240230560.9980-100000@jason.argos.org>; from mike@argos.org on Tue, Oct 24, 2000 at 02:39:54AM -0400 References: <Pine.LNX.4.21.0010240230560.9980-100000@jason.argos.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 24, 2000 at 02:39:54AM -0400, Mike Nowlin wrote: > > I have a system here that has four different ethernet interfaces (dc0, > dc1, dc2, and fxp0), each on a different IP address: > > dc0 10.220.134.162/30 <-- Link to outside world > dc1 1.2.3.4/27 <-- Subnet assigned by my ISP > dc2 10.98.1.1/16 > fxp0 10.97.1.1/16 > > The machines "assigned" IP is the 1.2.3.4 addr, but anytime I try > and make an outgoing connection, it uses a src IP of 10.220.134.162, not > 1.2.3.4. (We had to do it this way so that the ISP could route the /27 > block via 10.220.134.162.) > > How is this source IP chosen in the kernel - by order of > interfaces? (The order listed above is the order probed during > bootup.) Is there any way to force it to use the 1.2.3.4 addr instead of > 10.220.134.162? I imagine I could figure it out with NATD, but I see that > as being a little ugly... > See the output of the "route -vn get default" command, it will show you the IFP (interface pointer), and IFA (interface address). If you would have the 1.2.3.4 as an alias address on the dc0 interface, you could change it with "route change default -ifa 1.2.3.4". But you happen to have it on dc1. -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001024114154.B67369>