Re: route setting
- From: Peter <one2001boy@xxxxxxxxx>
- Date: Wed, 19 Mar 2008 13:51:08 GMT
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.
.
- References:
- route setting
- From: Peter
- Re: route setting
- From: Moe Trin
- route setting
- Prev by Date: Re: route setting
- Next by Date: Re: route setting
- Previous by thread: Re: route setting
- Next by thread: Re: route setting
- Index(es):
Relevant Pages
|