HI Peter, <br><br>Interesting in deed. You say that You can add a second route and weight it as follows:<br><br>ip route add equalize <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.2.0/24" target="_blank">
192.168.2.0/24</a> scope global nexthop via<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.0.254/" target="_blank">192.168.0.254</a> dev eth0 weight 1 nexthop via <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.0.250/" target="_blank">
192.168.0.250</a> dev eth0 weight 1<br><br>I want to know whether I can use the above command , when the below command exists .<br><span class="q" id="q_10fd03920abf4f07_0"><br>ip route add <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.2.0/24" target="_blank">
192.168.2.0/24</a> via <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.0.254/" target="_blank">192.168.0.254 </a><br><br>Then I want to know about your second answer which is </span>"To achieve the goal of primary path only, you can heavily weight one path over the other, some traffic will still spill into the other, you
<br>can remove the equalize parameter to disable this behaviour " <br><br>herein, what is this "you can heavily weight one path over the other" <br><br>When weight 1 and weight 1 , Both paths are equal. If I use weight 1 and weight 100 , what would be the primary path ? Is it weight 1 ?
<br><br>Is it the lower number which becomes primary ?<br><br>Then , in my case, is the following coomad is right? <br><br>ip route add <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.2.0/24" target="_blank">
192.168.2.0/24</a> scope global nexthop via<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.0.254/" target="_blank">192.168.0.254</a> dev eth0 weight 1 nexthop via <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.0.250/" target="_blank">
192.168.0.250</a> dev eth0 weight 100<br><br>I guess with the above command that traffc will flow via primary, when it fails , traffic will flow via secondary. <br><br>That is what I need.<br><br> Am I right ? Then can I acheive this goal ?
<br><br>Thanks <br>Indunil <br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Aleksandar Milivojevic</b> <<a href="mailto:alex@milivojevic.org">alex@milivojevic.org
</a>><br>Date: Dec 30, 2006 3:37 AM<br>Subject: Re: [CentOS] Fwd: How to add a route to a network via 2 gateways.<br>To: <a href="mailto:centos@centos.org">centos@centos.org</a><br><br></span>Quoting Indunil Jayasooriya <
<a href="mailto:indunil75@gmail.com">indunil75@gmail.com</a>>:<br><br>> Hi ,<br>><br>> I have a network to reach which is <a href="http://192.168.2.0/24">192.168.2.0/24</a>. It is a branch of the<br>> company. I have currently added a route to that network via one gateway (
<br>> <a href="http://192.168.0.254">192.168.0.254</a>) in following way.<br>><br>> ip route add <a href="http://192.168.2.0/24">192.168.2.0/24</a> via <a href="http://192.168.0.254">192.168.0.254</a><br>><br>
> Now, We got another gateway which is <a href="http://192.168.0.250">192.168.0.250</a>. Now I want to add a<br>> route to the same network which is <a href="http://192.168.2.0/24">192.168.2.0/24</a> via this gateway
<br>> (<a href="http://192.168.0.250">192.168.0.250</a>)<br>> as well.<br>><br>> Then I will have 2 paths to the same network. One path should be primary and<br>> the other path should be backup. everything should go via primary path.
<br>><br>> if the primary path goes down, the backup path should be active.<br>><br>> That is the purpose of doing this.<br>><br>> Pls let me know whether it is possible or not?<br>><br>> if possible, How can I achieve this goal.
<br><br>One possible solution is to enable one of the routing protocols on<br>your routers, instead of using static routing. For example BGP or<br>OSPF. The routers will than discover which paths to every of the<br>networks you have exist and will dynamically change routing rules
<br>(instead of using static set of rules) as the network connections go<br>up and down. In the way you requested in your question. It might be<br>an overkill for simple network. But if your network becomes more<br>complex in the future, you'll have infrastructure to handle it.
<br>Another advantage of using standard routing protocol is that they tend<br>to be platform independent. You want to replace that Cisco router<br>with Linux router or Linux router with Cisco router. Guess what, you<br>
can use BGP or OSPF on both Linux and Cisco based router and your<br>configuration is not specific to single type of router anymore.<br><br><br>_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">
CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a><br><br clear="all"><br>-- <br>Thank you<br>Indunil Jayasooriya<br>