Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2001 20:42:30 -0600 (CST)
From:      Nick Rogness <nick@rogness.net>
To:        Placi Flury <flury@tik.ee.ethz.ch>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: static routing (Freebsd 4.2)
Message-ID:  <Pine.BSF.4.21.0102122020330.61398-100000@cody.jharris.com>
In-Reply-To: <Pine.GSO.4.21.0102121333130.6445-100000@kom25>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 Feb 2001, Placi Flury wrote:

Hello again, comments below.

[snip]
> 
> The interfaces of router RC are: RC->RA on xl0, 
> 			 	 RC->RB on xl1,
> 				 RC->...on xl2 (to another subnet)
> 
> The subnet in which HA2, RA, RB and RC are, is 129.132.57.32/32. 

	What is the rest of your IP address scheme.  The above is not a
	valid subnet range. A /32 is a single IP.

> My intention consists in defining eplicitely the routes packets have to
> use (e.g. traffic from HA2 should take the longer way to reach BA2,
> i.e. route HA2->RA-->RC-->RB->BA2, but traffic from BA2 to HA2 the
> shorter,i.e. route  BA2->RB->RA->HA2). For these purpose I first deleted
> the routing tables and started to set up static routes. The problem I got
> was, that FreeBSD assigned different (wrong) netinterfaces to the routes,
> e.g. at Router RC (suppose only the localhost route is defined
> yet (first entry in routing table above)) I typed the following commands
> to add route RB_RC:
> 	
> 	> route add -host RB_RC -iface xl1  # add route RB_RC (ok)
> 	> arp -s RB_RC  0:50:da:47:43:67    # set correct MAC-address
>        

	You should not have to add an ARP entry for this.  The interface
	should have an IP subnet range already assigned and in the routing
	table on RC.

> This worked properly and is as I suppose correct (cf. routing table
> above second entry). Next I tried to specify the route packets from RC
> have to take, when the destination is HA2. I defined, that they have to
> take route: RC->RB->RA->HA2. So I entered following command (on RC):
> 
> 	> route add -host HA2 RB_RC   # the gateway is thus router RB
> 	
> The resulting entry in the routing table is shown above (third entry). As
> one can see, the FreeBSD assigned the netinterface "xl2" to the route,
> which is wrong, since the route to RB_RC needs to use the netinterface
> "xl1". 

	All you should have to do is:

	ON RC:

	# route add -host BA2 IP_RB
	(where IP_RB is the IP on RB that is connected to xl1)

	ON RA:

	# route add -host BA2 IP_RC
	(where IP_RC is the IP on RC that is connected to xl0)

	ON RB:

	# route add -host HA2 IP_RA
	(where IP_RA is the IP on RA that is connected to RB)

	My guess would be that there is an IP subnet range duplicated
	somewhere whithin your network and The FreeBSD machine is
	suggesting a directly connected interface xl2...hence the routing
	table entry.

Nick Rogness <nick@rogness.net>
- Keep on routing in a Free World...  
  "FreeBSD: The Power to Serve!"



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?Pine.BSF.4.21.0102122020330.61398-100000>