Re: Fwd: How to add a route to a network via 2 gateways.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



You can add a second route and weight it as follows:
ip route add equalize 192.168.2.0/24 scope global nexthop via 192.168.0.254 dev eth0 weight 1 nexthop via 192.168.0.250 dev eth0 weight 1

This assumes that:

both gateways are connected to eth0 on your linux box
You want equal traffic weight down each gateway to the remote network....

Regards

P.



Indunil Jayasooriya wrote:
Hi ,

I have a network to reach which is *MailScanner warning: numerical links are often malicious:* 192.168.2.0/24 <http://192.168.2.0/24>. It is a branch of the company. I have currently added a route to that network via one gateway ( *MailScanner warning: numerical links are often malicious:* 192.168.0.254 <http://192.168.0.254>) in following way.

ip route add *MailScanner warning: numerical links are often malicious:* 192.168.2.0/24 <http://192.168.2.0/24> via *MailScanner warning: numerical links are often malicious:* 192.168.0.254 <http://192.168.0.254>

Now, We got another gateway which is *MailScanner warning: numerical links are often malicious:* 192.168.0.250 <http://192.168.0.250>. Now I want to add a route to the same network which is *MailScanner warning: numerical links are often malicious:* 192.168.2.0/24 <http://192.168.2.0/24> via this gateway (*MailScanner warning: numerical links are often malicious:* 192.168.0.250 <http://192.168.0.250>) as well.

Then I will have 2 paths to the same network. One path should be primary and the other path should be backup. everything should go via primary path.

if the primary  path goes down, the backup path should be active.

That is the purpose of doing this.

Pls let me know whether it is possible or not?

if possible, How can I achieve this goal.






--
Thank you
Indunil Jayasooriya

--
This message has been scanned for viruses and
dangerous content by the *Enhancion* <http://www.enhancion.net/> system scanner,
and is believed to be clean.
------------------------------------------------------------------------

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


--
This message has been scanned for viruses and
dangerous content by the Enhancion system Scanner
and is believed to be clean.
http://www.enhancion.net

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux