Hi,
My original message involved setting up a route between two Solaris
hosts using another as the router between them. My original message is
attached at the bottom. I would like to thank Sanjay Thamagundale,
Rajnish Gupta, and Jeffrey C. Keyser for responding and helping me.
The "problem" was two-fold. I had modified the routing table on Host B
(see diagram below) to use the machine "Router" as the router to reach
the le1 interface of "Host A", but hadn't modified the routing table
on the machien "Host A" to use the machine "Router" as the router to
reach "Host B". So while "traceroute" packets from Host A to le1 interface
on Host B did go through "Router", the response it received for the
final destination came through the le0 interface.
Secondly, my initial attempt to add a host route to the le1 interface
of Host A through hme1 on the machine "Router" was correct, the hop
count should indeed be zero. The latter attempt to use a hop count of
1 was guaranteed to end in failure.
BTW, none of the machines which were dual homed (Host A and Router) were
running a dynamic routing protocol such as routed, because they contain
"default" routes too, and the /etc/rc2.d/S69inet script will not start
in.routed in such a case (which is what I wanted).
Also, some of you had wondered about the need for such an awkward
routing scenario. The reason was to simulate a situation for customer
installation sites, in an environment where I do not have control
of the subnetting and Cisco routers in our intranet.
Saurabh
---- Original Message -------------
Here is my original message:
Hi IP routing gurus,
I am trying to setup a Solaris 2.6 box as a router for
one specific host via static routing table entries and am running into a
problem in that the box I want to act as a router can't forward IP
packets it to the destination host, even though it seems from the
routing
table that it should.
This is what the network topology looks like:
subnet 145.1.240.0
---------------------------------------------------
| | | 145.1.240.71
| (le0: primary interface) | | (hme0:primary interface)
| | |
Host A Host B Router
| (le1) | (hme1)
|145.1.172.80 | 145.1.172.26
| |
---------------------------------------------------
subnet 145.1.172.0
I want the Solaris box labelled "Router" to act as the router between
Host B and the le1 interface of Host A.
Here is what I did:
(Both Host A and Host B also have a default route set up, pointing to
a Cisco router on 145.1.240.0 subnet, , so by default
on boot they are not configured as routers)
On Host B
----------
#route add 145.1.172.80 145.1.240.71 2
On Host Router
--------------
#ndd -set /dev/ip ip_forwarding 1
I thought that this should be enough to make IP packets to Host A's le1
interface go through hme0 and then hme1 on its way from Host B to
Host A. However, the packets go to hme0 interface on Router which
sends them to le0 interface of Host A (which also has ip_forwarding
set to 1) and then on the way to the IP address corresponding to le1.
I then tried the following on Host Router in an attempt to force packets
to be sent via hme1:
#route add host 145.1.172.80 145.1.172.26 0
This still didn't prevent the above mentioned patch from being selected.
So I did the following, again on Host Router:
#rotue delete host 145.1.172.80 145.1.172.26
#route add host 145.1.172.80 145.1.172.26 1
Now, Host B can't reach Host A's le1 interface at all. "traceroute" on
Host B will just show an entry for the hme0 interface as the next
hop router and then stop. "ping" of Host A's le1 interface will show
an ICMP Network Unreachable error from the hme0 interface of host
Router.
For some reason, the Router host prefers to send out IP packets destined
to le1 on Host A via le0 of Host A instead of via hme1 on itself.
Now, currently both le0 and le1 have the same Ethernet address (Solaris
doesn't make them have different Ethernet addresses by default).
Should I try making le0 and le1 different Ethernet addresses and making
a permanent address in the arp cache for le1 on the Host Router?
Is there a basic misunderstandign in the way I am trying to set up
routing on Solaris?
Any input which you feel is relevant to the situation is highly
appreciated, even if you don't think it will necessarily solve
what I am trying to accomplish.
----- Finish Original Message ---------------
-- _______________________________________________________________________________ . . Saurabh Jang ... ... E-mail : jang@eis.comm.mot.com Senior Software Engineer ..... ..... Voice : (847) 576-2630 Motorola, iDEN .. ... .. Fax : (847) 538-5564 Schaumburg, IL . . . Mail Drop : Building IL02, Room 3346 _______________________________________________________________________________
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:45 CDT