On Mon, Mar 22, 2010 at 8:24 PM, Pascal Hambourg <pascal.mail@xxxxxxxxxxxxxxx> wrote: > Hello, > > ratheesh k a écrit : >> >> i have two default routes , I used below two commands to add routes . >> >> route add default gw 192.168.1.1 dev eth0 metric 0 >> route add default gw 10.232.18.5 dev eth1 metric 1 >> >> So 10.232.18.5 will become the default route since it is added >> secondly . All packets are routed to this address. > > No. Lower metric wins regardless of route order, so the default gateway > is 192.168.1.1. You can check with "ip route get <destination>". > >> Suppose >> 10.232.18.5 machine is down , will the packets will use the next >> default route ? > > No, the kernel has no dead gateway detection AFAIK. > -- > To unsubscribe from this list: send the line "unsubscribe netfilter" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > Thanks a lot . I have a related question . suppose ip 8.8.8.8 is accessible thru gateway 10.232.18.5 and we configured the linux machine to accept icmp redirect messages ( if we set NET_IPV4_CONF_ACCEPT_REDIRECTS ) . Linux will send packet to 8.8.8.8 thru 192.168.1.1 as per default route . The gateway machine ( ip 192.168.1.1 ) will respond back with icmp redirect . (I think so ) . So our linux machine can use the other route ? thanks, ratheesh -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html