Re: route setting



On Tue, 18 Mar 2008, in the Usenet newsgroup comp.os.linux, in article
<IyHDj.23890$R84.453@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Peter wrote:

to connect the machine 217.32.163.247 via a special gateway
217.32.163.2, which is different default gateway.

"different default gateway". The 'default' is used in the programming
sense of the word - meaning that if NO other route is suitable, then use
this one. Thus, using two (or more) default gateways is going to be a
major problem unless you are doing something exotic as described in the
Advanced Routing HOWTO

-rw-rw-r-- 1 gferg ldp 297491 Sep 4 2003 Adv-Routing-HOWTO

When there are two (or more) ways to reach the same destination (and
0.0.0.0/0 or the 'default' is a destination in this meaning), and the
metric is the same, then the kernel uses the LAST one you defined as
it assumes you changed your mind and haven't bothered to delete the
older (useless) route.

I tried the following command:

route add 216.32.163.247 216.32.163.2
or
route add 216.32.163.247 gw 216.32.163.2

both no working and returned with the error:
SIOCADDRT: No such device

The second command is correct, but the error message suggests you are
there are multiple interfaces. The address of the gateway MUST be on
the local wire, and if you've made the gross error of having two (or
more) interfaces that can supposedly reach the same destination, you
also need to tell the route command which interface you are talking
about.

any suggestions?

What is the output of '/sbin/ifconfig -a' and /'/sbin/route -n' now?

By the way, you'd also have better luck posting to a "real" newsgroup
such as 'comp.os.linux.networking', rather than 'comp.os.linux' which
is a bogus newsgroup only carried on news server than like to claim they
have more newsgroups than anyone else.

Old guy
.



Relevant Pages

  • Re: works on two ethernet adapter
    ... whose first in the route table. ... interfaces based on reachability, or changes your routes based on ... The only way two gateways is useful is in the case of Dead Gateway ... AND SECOND OF HIGH SPEED ISP USE. ...
    (microsoft.public.win2000.networking)
  • Re: Which network?
    ... It's tricky to read route tables when the interfaces are numbered so similarly, so excuse me if I miss something here. ... You do have two distinct interfaces, and they're correctly routing packets to two different nets. ... Is there a specific gateway, or does it use the default? ...
    (microsoft.public.vb.general.discussion)
  • Re: W2K RRAS Routing Question
    ... Use the route add command ... >> Do the hosts in network A know to route packets to network B through the ... are they using their default gateway? ... >> Please reply to the newsgroup so that others may benefit. ...
    (microsoft.public.win2000.networking)
  • Re: FC1 multiple ethernet interface issue
    ... >>why do you want to manually bounce the interfaces? ... I suspect you will have a single default gateway listed, ... expect that route to go away. ...
    (Fedora)
  • RE: Two interfaces on the same network
    ... I didn't set default gateway (if that's what you meant "default route") ... I just bring up two interfaces with: ... no more route or other commands. ...
    (RedHat)