netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: netdev@vger.kernel.org
Subject: Question on advanced routing and/or virtual routers.
Date: Mon, 08 Jan 2007 09:08:08 -0800	[thread overview]
Message-ID: <45A27A78.8010200@candelatech.com> (raw)

Hello!

I am curious if a single machine can be made to look like several 
routers.  Please consider the following
configuration:

Linux Router-A has 4 ethernet interfaces.  PC-A is connected to eth0 and 
has IP 192.168.0.2.
eth0 on Router-A has IP 192.168.0.1/24
eth1 has IP 192.168.1.1/24, and eth1 is connected directly to eth2
eth2 has IP 192.168.2.1/24
eth3 is connected 'upstream' and has IP 192.168.3.1/24

I would like for PC-A to be able to ping 192.168.0.1 and 192.168.1.1 as 
normal.
The part I'm not sure how to make work is that I want to be able to ping 
192.168.2.1 and
have the packet route out of eth1 and into eth2 (PC-A -> eth0 -> eth1 -> 
eth2), and have the return packet follow the
eth2 -> eth1 -> eth0 -> PC-A path.  A trace-route from PC-A should show 
each of these hops (or, at least eth0 and eth2.)

The eventual goal is to have arbitrary numbers of 'routers' in a single 
Linux machine for emulation
purposes.

I was thinking that I might could accomplish this using multiple routing 
tables and perhaps
specific subnet routes for each each virtual router, specifying which 
interface the packets should
leave in order to find the next hop.

Has anyone tried something similar to this or have ideas for how to best 
proceed?

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com



             reply	other threads:[~2007-01-08 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 17:08 Ben Greear [this message]
2007-01-08 18:23 ` Question on advanced routing and/or virtual routers Brendan Cully
2007-01-10  2:53   ` Ben Greear
2007-01-20 22:41   ` Ben Greear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45A27A78.8010200@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).