All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] routing C class with route2
Date: Thu, 13 Feb 2003 21:12:50 +0000	[thread overview]
Message-ID: <marc-lartc-104517081912542@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104516877309515@msgid-missing>

Martin,

I am guessing that you are asking:

  Can an IP in a subnet defined on one interface can be used on a
  separate interface on the same linux box?

The short answer is yes.

 : ip addr add 99.some.ip.198/32 dev eth0 (eth0 is the interface on witch
 : the IPs come in - the whole class) ip addr add C.class.ip.1/22 dev eth1
 : ip route add 99.some.ip.gateway

If the IPs for the entire class C are available on locally connected
networks:

# ip addr add 99.xx.xx.198/32 dev eth0    # -- for your own IP address
# ip route add yy.yy.yy.yy/32 dev eth0    # -- your ISPs router
# ip addr add 99.xx.xx.1/24 dev eth1      # -- for your internal network

If the IPs for the class C are available via some internal router:

# ip addr add 99.xx.xx.198/32 dev eth0    # -- for your own IP address
# ip route add yy.yy.yy.yy/32 dev eth0    # -- your ISPs router
# ip addr add zz.zz.zz.zz/?? dev eth1     # -- for your internal network
# ip route add 99.xx.xx.0/24 via zz.zz.zz.zz

But, I'm not sure I completely understood your attempt to describe your
network.

You may find it handy to read up on route selection in my document.  The
quick and dirty rule is that the most specific route is always selected
first.

  http://linux-ip.net/html/routing-selection.html

(formerly http://plorf.net/linux-ip/)

-Martin

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

      reply	other threads:[~2003-02-13 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-13 20:39 [LARTC] routing C class with route2 Tester
2003-02-13 21:12 ` Martin A. Brown [this message]

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=marc-lartc-104517081912542@msgid-missing \
    --to=mabrown-lartc@securepipe.com \
    --cc=lartc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.