Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2000 14:13:35 -0400
From:      Marko Ruban <marko@tellurian.com>
To:        Nick Rogness <nick@rapidnet.com>
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: gateway on different subnet
Message-ID:  <39F5D14E.806B7BA9@tellurian.com>
References:  <Pine.BSF.4.21.0010231720130.3434-100000@rapidnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39F5D14E.806B7BA9>