SUMMARY: routing problem with a multihomed host

From: Christopher L. Barnard <cbar44_at_tsg.cbot.com>
Date: Thu Aug 15 2002 - 11:28:11 EDT
I asked:

> I have a server with two interfaces: hme0 to talk to most servers, and
> hme1 to do backups and talk to the backup server.  My problem is getting
> this server to use hme1 when talking to a server on that segment.
> 
> details:
> 30 cms1!/ >> ifconfig -a
> lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
>         inet 127.0.0.1 netmask ff000000 
> hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
>         inet 172.31.2.5 netmask ffffff00 broadcast 172.31.2.255
>         ether a:0:20:1f:2:5 
> hme1: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
>         inet 172.31.14.84 netmask ffffff00 broadcast 172.31.14.255
>         ether a:0:20:1f:e:54 
> 
> The 172.31.2 interface is the default; the 172.31.14 interface is only to
> talk to boxes on the 172.31.14 network.  As the ifconfig shows, the netmasks
> are correct.
> 
> 31 cms1!/ >> netstat -nr
> 
> Routing Table:
>   Destination           Gateway           Flags  Ref   Use   Interface
> -------------------- -------------------- ----- ----- ------ ---------
> 172.31.2.0           172.31.2.5            U        3  10986  hme0
> 172.31.14.0          172.31.14.84          U        2      0  hme1
> 224.0.0.0            172.31.2.5            U        3      0  hme0
> default              172.31.2.7            UG       0 415611  
> 127.0.0.1            127.0.0.1             UH       0   1134  lo0
> 
> A netstat shows that local traffic to the 172.31.2 network goes out the
> 172.31.2 interface, local traffic to the 172.31.14 network goes out the
> 172.31.14 interface, and everything else goes out the 172.31.2 interface
> to the default router.
> 
> I am using IP numbers on traceroute to show that this is not a DNS issue.
> 
> When I do a traceroute to a machine on the 172.31.2 network, everything
> is fine.
> 37 cms1!/ >> traceroute 172.31.2.2
> traceroute: Warning: Multiple interfaces found; using 172.31.2.5 @ hme0
> traceroute to 172.31.2.2 (172.31.2.2), 30 hops max, 40 byte packets
>  1  cmstst.cbot.com (172.31.2.2)  1.215 ms  0.291 ms  0.318 ms
> 
> When I do a tracetroute to a machine that is not on any directly-connected
> network, packets go to the default router as they should.
> 39 cms1!/ >> traceroute 164.74.19.193
> traceroute: Warning: Multiple interfaces found; using 172.31.2.5 @ hme0
> traceroute to 164.74.19.193 (164.74.19.193), 30 hops max, 40 byte packets
>  1  Router-172-31-2.infra.cbot.com (172.31.2.7)  0.625 ms  0.428 ms  0.415 ms
>  2  192.168.130.2 (192.168.130.2)  0.477 ms  0.448 ms  0.433 ms
>  3  192.168.13.11 (192.168.13.11)  0.537 ms  0.469 ms  0.445 ms
>  4  shalmaneser.tsg.cbot.com (164.74.19.193)  0.547 ms  0.527 ms  0.462 ms
> 
> However, when I do a traceroute to a machine on the 172.31.14 interface,
> the machine is *still* telling me that it is using the 172.31.2 interface!
> 38 cms1!/ >> traceroute 172.31.14.11
> traceroute: Warning: Multiple interfaces found; using 172.31.2.5 @ hme0
> traceroute to 172.31.14.11 (172.31.14.11), 30 hops max, 40 byte packets
>  1  netbacker.cbot.com (172.31.14.11)  0.565 ms  0.318 ms  0.405 ms
> 
> Does anyone have any suggestions of what else to try to get this machine to
> use its dedicated 172.31.14 interface for machines on the 172.31.14 network?
> TIA, and I will summarize.

The answer:

Traceroute is doing just what it is supposed to do.  It is using the
dedicated interface as needed.  On a multihomed host, traceroute just uses
in its output the name of the first interface in the list that ifconfig
generates.  It is still using the correct interface, however.  A series of
snoops in different windows confirms that it is doing what I want.  So there
was never a problem, just my misinterpreting the output of traceroute.

Thanks to:

"Safdar Mirza" <SMRZ44@cbot.com>
Very Pinguin <dt1649651@yahoo.com>
Al Hopper <al@logical-approach.com>
Steve Sandau <ssandau@bath.tmac.com>
Roy Culley <tgdcuro1@gd2.swissptt.ch>
Michael Maciolek <mikem@world.std.com>
Simon-Bernard Drolet <sxi@sympatico.ca>
David Morley <dmorley@boothnewspapers.com>
Mike van der Velden <mvanderv@redback.com>
Rahul Parasnis <rahul.parasnis@creditlyonnais.fr>
"McAlister, Bruce" <Bruce.McAlister@irl.xerox.com>

+-----------------------------------------------------------------------+
| Christopher L. Barnard         O     When I was a boy I was told that |
| cbarnard@tsg.cbot.com         / \    anybody could become president.  |
| (312) 347-4901               O---O   Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard                --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Aug 15 11:34:16 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:52 EST