Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-2008, 10:03 PM
cwpbl
 
Posts: n/a
Redundancy using double interface & gateway

Hi,
I have the following configuration with 2 PC :

+------+ eth0 eth0 +------+
| PC1 +---------/--------+ PC2 | eth2
| | | +---------------(Device, IP3)
| +---------/--------+ |
+------+ eth1 eth1 +------+

I want to send IP packets to the device (with IP3 address) from PC1 and
using PC2 as a gateway. I have configured PC2 as a gateway for eth0 ->
eth2 and eth1 -> eth2.

But how can I set routes on PC1 ?
What I want is in fact redundancy between eth0 and eth1 :
Connecting to IP3 from PC1 use the link eth0<->eth0 if this link is up
and use the link eth1<->eth1 if eth0<->eth0 is down ?

I think I have to use ip route + nexthop but it's not very clear.
Someone can help me ?





Reply With Quote
  #2 (permalink)  
Old 03-18-2008, 10:09 PM
cwpbl
 
Posts: n/a
Re: Redundancy using double interface & gateway

cwpbl a écrit :

> I have the following configuration with 2 PC :
>
> +------+ eth0 eth0 +------+
> | PC1 +---------/--------+ PC2 | eth2
> | | | +---------------(Device, IP3)
> | +---------/--------+ |
> +------+ eth1 eth1 +------+
>
> I want to send IP packets to the device (with IP3 address) from PC1 and
> using PC2 as a gateway. I have configured PC2 as a gateway for eth0 ->
> eth2 and eth1 -> eth2.
> But how can I set routes on PC1 ?
> What I want is in fact redundancy between eth0 and eth1 :
> Connecting to IP3 from PC1 use the link eth0<->eth0 if this link is up
> and use the link eth1<->eth1 if eth0<->eth0 is down ?
> I think I have to use ip route + nexthop but it's not very clear.



Sorry, I forgot : I work under Linux 2.6 kernel based (Red Hat 4)
Reply With Quote
  #3 (permalink)  
Old 03-19-2008, 10:27 AM
David Schwartz
 
Posts: n/a
Re: Redundancy using double interface & gateway

On Mar 18, 2:03 pm, cwpbl <cw...@rf.oohay> wrote:
> Hi,
> I have the following configuration with 2 PC :
>
> +------+ eth0 eth0 +------+
> | PC1 +---------/--------+ PC2 | eth2
> | | | +---------------(Device, IP3)
> | +---------/--------+ |
> +------+ eth1 eth1 +------+
>
> I want to send IP packets to the device (with IP3 address) from PC1 and
> using PC2 as a gateway. I have configured PC2 as a gateway for eth0 ->
> eth2 and eth1 -> eth2.
>
> But how can I set routes on PC1 ?


Simply set two routes on PC1. They should both be to the address
assigned to the device. The first one should have a gateway of PC2/
eth0 address and the other should have a gateway of PC2/eth1 address.

This is the quick/kludgy way. There are more complex but more elegant
ways to do it. For example, you could assign both PC1 and PC2
'internal' addresses not assigned with any interface, add two routes
to PC2's 'internal' address to PC1, and then route IP3 to PC2's
internal address.

You can also use a routing protocol (such as OSPF) and have PC2
advertise its route to IP3 through both interfaces.

DS
Reply With Quote
  #4 (permalink)  
Old 03-19-2008, 11:44 AM
Pascal Hambourg
 
Posts: n/a
Re: Redundancy using double interface & gateway

Hello,

cwpbl a écrit :
> I have the following configuration with 2 PC :
>
> +------+ eth0 eth0 +------+
> | PC1 +---------/--------+ PC2 | eth2
> | | | +---------------(Device, IP3)
> | +---------/--------+ |
> +------+ eth1 eth1 +------+
>
> I want to send IP packets to the device (with IP3 address) from PC1 and
> using PC2 as a gateway. I have configured PC2 as a gateway for eth0 ->
> eth2 and eth1 -> eth2.
>
> But how can I set routes on PC1 ?
> What I want is in fact redundancy between eth0 and eth1 :
> Connecting to IP3 from PC1 use the link eth0<->eth0 if this link is up
> and use the link eth1<->eth1 if eth0<->eth0 is down ?
>
> I think I have to use ip route + nexthop but it's not very clear.
> Someone can help me ?


A multipath route (ip route + nexthop) only provides load balancing, not
redundancy. Multiple routes to the same destination provide neither
redundancy nor load balancing, because only the same one route will
always be used regardless of the link state. AFAIK Linux does not
natively support dead gateway detection.

Have you considered ethernet bonding in active-backup mode ?
Reply With Quote
  #5 (permalink)  
Old 03-19-2008, 12:21 PM
David Schwartz
 
Posts: n/a
Re: Redundancy using double interface & gateway

On Mar 19, 2:27 am, David Schwartz <dav...@webmaster.com> wrote:

> Simply set two routes on PC1. They should both be to the address
> assigned to the device. The first one should have a gateway of PC2/
> eth0 address and the other should have a gateway of PC2/eth1 address.
>
> This is the quick/kludgy way. There are more complex but more elegant
> ways to do it. For example, you could assign both PC1 and PC2
> 'internal' addresses not assigned with any interface, add two routes
> to PC2's 'internal' address to PC1, and then route IP3 to PC2's
> internal address.


Pascal is right, this won't work.

> You can also use a routing protocol (such as OSPF) and have PC2
> advertise its route to IP3 through both interfaces.


This is right.

DS
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:46 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Online Advertising | Mortgages | Mortgage Loans | Mortgage Calculator | Gas Suppliers



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114