From owner-freebsd-hackers Sat Dec 19 17:03:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA13500 for freebsd-hackers-outgoing; Sat, 19 Dec 1998 17:03:29 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA13493 for ; Sat, 19 Dec 1998 17:03:28 -0800 (PST) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.9.1/8.9.1) with ESMTP id UAA80379; Sat, 19 Dec 1998 20:03:22 -0500 (EST) (envelope-from louie@whizzo.transsys.com) Message-Id: <199812200103.UAA80379@whizzo.transsys.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Dru Nelson cc: Luis =?iso-8859-1?Q?Mu=F1oz?= , freebsd-hackers@FreeBSD.ORG From: "Louis A. Mamakos" Subject: Re: Source address References: In-reply-to: Your message of "Sat, 19 Dec 1998 16:51:15 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 19 Dec 1998 20:03:22 -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Except that in IOS, the "source-interface" commands cause the application in question (snmp trap generator, syslog generator, etc), to bind to a particular interface address on the router, rather than using whatever interface address is associated with the exit interface on the router. It doesn't smash an address in the packet on the way out, and neither should the FreeBSD kernel. There are a lot of applications that care about the end point addresses, and zapping something behind their back is probably going to manifest itself in interesting ways. Perhaps this is phrasing problem. If you were to add a sysctl to bias the operation of the socket code to choose a specified address of an interface, rather than the address of the outbound interface.. but then you have to worry about the interface being up and other details. It might be less surprising overall to simply fix the applications that you care about to bind to a particular interface address rather than having the kernel choose. As a benefit, you'd also solve the "virtual-host" problem too, where an interface has a bunch of alias addresses. louie > Not unless there is an ip address for the box. What this guy > is trying to get is the same functionality of IOS. That is, > if there is an ip address for the box, and not a particular > interface, then you can reach that box with that IP address. > You don't have to know the ip address of any particular interface > to reach the box (provided the routes update properly). > > Dru Nelson > Redwood City, California > > On Sat, 19 Dec 1998, Luis =?iso-8859-1?Q?Mu=F1oz?= wrote: > > > > > The source IP address is (or *should*) be set to the primary address > > of the interface through which the packet is sent. I have quite a > > few FreeBSD boxes with multiple NICs and this is exactly what we > > see here, though I still don't have any of them with multiple IP > > addresses on each interface. > > > > Regards. > > > > -lem > > > > At 03:12 AM 19/12/98 -0000, Dru Nelson wrote: > > > > > > > > >I think this is a great idea. > > > > > >> So. If there is no current solution to this problem, I'm > > >> thinking of doing the neccesary modifications to the kernel. I'm not a > > >> kernel hacker but this problem does'nt seem too hard to solve. > > >> > > >> So I'd like to get your oppinnions. I'm thinking of using the > > >> sysctl interface to the kernel. Introduce a new variable and if this > > >> variable is set outgoing packets are given source address described in > > >> this variable. This would be done just before the source address is > > >> set to the outgoing interface if it's not already set. (in ip_output.c) > > >> > > >> I really have no real clue if this is the right way to go it's > > >> just my first idea and I'd like to hear whay you think about it. Thanks. > > >> > > >> > > >> Jamie Bowden writes: > > >> > > >> > On Tue, 15 Dec 1998, Richard Smith wrote: > > >> > > > >> > > Antti Kaipila wrote: > > >> > > > > > >> > > > I have a interesting problem here. I have FreeBSD accting as a router > > >> > > > between our LAN and Internet. I have a ET5025 card as interface > > eth0 and > > >> > > > Intel EtherExpress as interface fxp0. > > >> > > > > > >> > > > eth0 has address 10.156.214.2 and remote ends address is > > 10.156.214.1. > > >> > > > fxp0 has address 195.74.8.138 > > >> > > > > > >> > > > So, now when I try to connect from this machine acting as router to > > >> > > > anywhere on the internet my source address get set to > > >> > > > 10.156.214.2. Which is not nice, because all routers are dropping my > > >> > > > packets thinking they should'nt be routed (that's the right thing to > > >> > > > do ofcourse). > > >> > > > > > >> > > > Is there any way around this? > > >> > > > > >> > > You need to run natd on your FBSD router, so that all packets 'appear' > > >> > > to > > >> > > originate from *it* (195.74.8.138). See man natd. > > >> > > > >> > Not quite. His ISP is using 1918 networks between routers. > > >> > > > >> > I do this as well. With Cisco you can set the primary IP of the router, > > >> > and all traffic appears to come from that IP, no matter which > > interface it > > >> > goes through. If there is a way to have FreeBSD always report the > > >> > connection as coming from it's usable IP, all that has to be done is > > to do > > >> > it, but I don't know if FreeBSD can do that. > > >> > > > >> > Jamie Bowden > > >> > > > >> > -- > > >> > Systems Administrator, iTRiBE.net > > >> > > > >> > If we've got to fight over grep, sign me up. But boggle can go. > > >> > -Ted Faber (on Hasbro's request for removal of /usr/games/boggle) > > >> > > > >> > > > >> > To Unsubscribe: send mail to majordomo@FreeBSD.org > > >> > with "unsubscribe freebsd-hackers" in the body of the message > > >> > > > >> > > >> -- > > >> Antti Kaipila > > >> > > >> To Unsubscribe: send mail to majordomo@FreeBSD.org > > >> with "unsubscribe freebsd-hackers" in the body of the message > > >> > > >> > > > > > > > > > > > >----- > > >See the original message at > > http://www.egroups.com/list/freebsd-hackers/?start=31780 > > > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org > > >with "unsubscribe freebsd-hackers" in the body of the message > > > > > > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message