From owner-freebsd-hackers Tue Oct 24 11:12:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gate.tellurian.net (gate.tellurian.net [216.182.1.1]) by hub.freebsd.org (Postfix) with ESMTP id 8A28D37B4CF; Tue, 24 Oct 2000 11:12:06 -0700 (PDT) Received: from tellurian.com (unverified [208.59.162.242]) by gate.tellurian.net (Rockliffe SMTPRA 4.2.4) with ESMTP id ; Tue, 24 Oct 2000 14:12:15 -0400 Message-ID: <39F5D14E.806B7BA9@tellurian.com> Date: Tue, 24 Oct 2000 14:13:35 -0400 From: Marko Ruban X-Mailer: Mozilla 4.61 [en] (Win98; I) X-Accept-Language: en,uk MIME-Version: 1.0 To: Nick Rogness Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: gateway on different subnet References: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG IT WORKED ! the arp way is the true way hehehe I edited /sbin/dhclient-script to automate the process: - removed the code that was supposed to add the default gateway - added following lines in its place: arp -s 208.59.162.1 00:20:cd:02:f1:59 # MAC address of cable modem gateway route add default 208.59.162.1 Later I'll have to figure out a way to take the $new_ip_address variable and modify it into my dummy gateway, so that the script would handle any IP my provider throws at it. And to make it work with any modem, I'd need an automatic way to get the MAC based on gateway IP (10.17.56.12). Any standard way to do this ? Thanks to everyone who has replied with suggestions, especially to Nick whose suggestion was the answer I needed :) Nick Rogness wrote: > On Mon, 23 Oct 2000, Les Biffle wrote: > > > > Hm -- how about using proxy-arp style routing? > > > > Here's what I've done in the past: > > > > 1. Have a friend out in the net ping your address 208.59.162.242 > > > > 2. Run tcpdump and look for someone ARPing for you. That someone > > will very likely be your default gateway as seen from your site. > > If that router is in your subnet, set your default to it and you're > > done. If not, continue at the next step. > > > > 3. Pick an IP Address in your cable subnet that feels like a really > > good router address to you. Make something up. 208.59.162.1 perhaps? > > > > 4. Use "arp -s 208.59.162.1 xx:xx:xx:xx:xx:xx" to install an arp > > entry in your route table for this made-up address. That will keep > > you from ARPing for 208.59.162.1 and discovering the device that > > really owns that address. > > > > 5. Set your default gateway to 208.59.162.1. > > If that doesn't work (it should), you could also look into the > ipfw fwd option. > > I would like to know when you get it to work... > > Nick Rogness > - Drive defensively. Buy a tank. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message