Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2001 19:15:38 +0300
From:      Vlad Skvortsov <vss@smarts-gsm.ru>
To:        freebsd-questions@freebsd.org
Subject:   Re: route add <host> -interface
Message-ID:  <20011128191538.O11977@smarts-gsm.ru>
In-Reply-To: <20011128140919.A42977@sunbay.com>; from ru@FreeBSD.org on Wed, Nov 28, 2001 at 02:09:19PM %2B0200
References:  <20011128143913.M11977@smarts-gsm.ru> <20011128140919.A42977@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 28, 2001 at 02:09:19PM +0200, Ruslan Ermilov wrote:

	[Please CC: any answers back to me, I'm not on the list !]

> >                 Internal router                     Peer
> >       ===============================            ===========
> > ----> | 192.168.1.2 | | 192.168.2.1 | -- sbni -> | 2.3.4.1 |
> >       ===============================            ===========
> > 
> > 	ISP forwards a block of addresses, say, 2.3.4.0/30 to 1.2.3.5. Cisco
> > router forwards them to some internal servers. My task is to forward one
> > address, 2.3.4.1, to peer.
> > 	The problem is that I cannot setup internal router to properly
> > forward this address to peer. Peer cannot set 192.168.2.x address on his end
> > of sbni interface (windows there ...). So I configure my end this way:
> > 
> > 	# ifconfig sbni1 192.168.2.1 netmask 0xffffffff
> > 	# route add 2.3.4.1 -interface sbni1
> > 
> > 	Pinging 2.3.4.1 fails with redirect FROM MY END 192.168.2.1
> > (redirected to 2.3.4.1). When I start exploring the situation, it reveals
> > that ARP table contains record with MY MAC address and IP of PEER. When I
> > see netstat -nr output I discover that there is an entry containing PEER's
> > ip address and MY ip address (though with proper interface specified).
> > 
> > 	Is this a bug in sbni driver or is this a misbehaviour of freebsd
> > route add command ? I run FreeBSD 4.2.
> > 
> So, your purpose is to resolve the 2.3.4.1 address through the ARP on
> the sbni1 attached ethernet-type network, right?  You can do this in
> two ways.
> 
> 1.  The standard way.
> Configure your sbni1 interface with netmask other than 255.255.255.255
> and give the peer an address in the 192.168.2 network, say 192.168.2.2.
> Then, the following command will DTRT:
> route add -host 2.3.4.1 192.168.2.2

	This can't be accomplished due to peer's configuration. There is
windows router there and in order to NAT their network they have to set real
ip (2.3.4.1) on sbni interface. Having eliminated this fact would greatly
simplify the situation.

> 2.  A magnician's way.
> Bring your sbni1 interface up, without even configuring any IP address
> on it!  Then the following command should DTRT:
> route add -net 2.3.4.1/32 -iface sbni1 -cloning
> This tells your kernel that it should resolve 2.3.4.1/32 addresses
> through the ARP on the sbni1 attached network.

	I MUST have some ARP-resolvable address on my end to allow windows
to route packets to my ip rather than through the interface.

-- 
Vlad Skvortsov, vss@smarts-gsm.ru, vss@high.net.ru

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011128191538.O11977>