Re: Bridging two subnets selectively using routing

Linux Advanced Routing and Traffic Control

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

 



On 10/31/07 19:50, Joshua Kwan wrote:
What am I doing wrong? Is this a job for iptables? I feel like I can do this with just routing table magic.

As Corey said, make sure that IP Forwarding is enabled on A1.

You are setting your self up for a very weird scenario. Probably what would be the easiest for long term would be to put a third network between your two routers, AR and BR. This way you end up with the following type of scenario:

               +----+               +----+
               | AI |               | BI |
               +-+--+               +--+-+
                 |                     |
               +-+--+               +--+-+
---( Net A )---+ AR +---( Net C )---+ BR +---( Net B )---
       |       +----+               +----+       |
       |                                         |
       |       +----+                            |
       +-------+ A1 +----------------------------+
               +----+

With this type of set up, you can configure both AR and BR that each can reach the others network via the other router on network C. I.e. AR can reach Net B via BR's IP on Net C. Likewise BR can reach Net A via AR's IP on Net C. This way, each and every computer on both networks A and B can reach any host they want to via their default gateway AR or BR respectively. This may be a little more work to set up initially, but it is very simple routing that will be very easy to maintain for a long time. In this scenario Net C can very simply be a cross over cable between routers AR and BR.

Another option is to enable routing on A1 and tell A2, A3, and A4 that they can reach B1 via A1 and likewise tell B1 that it can reach a2, A3, and A4 via A1. Thus you have a bi-directional routing set up between just the four additional hosts. The main disadvantage of this set up is that each and every host that wants to communicate across networks will have to have its own routing entries set up to pick the correct direction to route traffic to. So if you only have two or three hosts on each network and you can not do the additional network (C) between the two routers, this will work.

There are some other things that you can do to allow the hosts to communicate across the networks like bridging and / or proxy ARP. However seeing as how you have different subnets on Net A and Net B, you will very likely be doing routing or multi-homing on all hosts to support bridging and / or proxy ARP.

I think your best bet is to do the additional network (C) between the two routers AR and BR.



Grant. . . .
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux