Re: route setting



Moe Trin wrote:
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.


my purpose is to access 217.32.163.247 via gateway 217.32.163.2,
not default way. since 217.32.163.2 is not accessible, thus achieve
the purpose of blocking 217.32.163.247 from my machine.


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.

yes, I have eth0 and eth1. eth1 is disabled
after add eth0, it now works.

here is the output of "route -n"

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.10.100 10.10.10.3 255.255.255.255 UGH 0 0 0 eth0
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.10.10.1 0.0.0.0 UG 0 0 0 eth0

10.10.10.1 is the default gw, but 10.10.10.3 is used as gw for 10.10.10.100. 10.10.10.3 is not accessible, thus it blocks the access to 10.10.10.100.
basically, I have two NIS servers. 10.10.10.100 and 10.10.10.99
I have configured my machines to change from 10.10.10.100 to 10.10.10.99 as NIS server for login. but I don't know why it always tried to reach 10.10.10.100,
if I disable the connection to 10.10.10.100, it failed in authenticating login. when I enable the connection to 10.10.10.100,
the login works. running the command ypwhich returns the machine 10.10.10.99.

tcpdump -i eth0 host 10.10.10.100
doesn't show up anything related to my machine.

do you know if there is a better way to find out the problem?



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.

will try networking group next time.

many thanks.
.



Relevant Pages

  • RE: whats the meaning of the 0.0.0.0?
    ... But in other situations the 0.0.0.0 can be localhost or the ... > trying to identify the default gateway IP address. ... what's the meaning of the 0.0.0.0? ...
    (Security-Basics)
  • Re: confused routes with multiple nics
    ... meaning of the word is "that host that leads elsewhere" - virtually all ... I now understand the meaning of a gateway in this ... the 'route print' command (which shows a "gateway" for every route ...
    (comp.os.linux.networking)
  • Re: Did I miss the Era of GA?
    ... hairs of the meaning of "en route". ... I suspect the rest of ... the audience knew that my post didn't mean that pilots should get ...
    (rec.aviation.piloting)
  • Re: OT: Ethernet connection?
    ... reminded me of the third meaning of the word - as well as the journey ... sterne wind so loude gan to route That no wight other noyse mighte ... Belch (from the Old French "router") - as used by Langland in Piers ... Alle cristen folk been fled fro that contree. ...
    (uk.media.radio.archers)
  • Re: Basic routing problem
    ... >> Or maybe you can make B act like a bridge instead of a router ... > something seems to work...something meaning when I do dhclient on A it ... > After that I can however still not ping R. I get 'Destination Host ... A guess: you must set a route on machine A, ...
    (Debian-User)