All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Scherbaum <adsmail@htl.de>
To: linux-kernel@vger.rutgers.edu
Subject: Re: Do Routing-policies have effect on local-originated packets?
Date: Fri, 17 Dec 1999 18:34:22 +0100	[thread overview]
Message-ID: <385A741E.A58470F6@htl.de> (raw)
In-Reply-To: 199912171611.TAA01369@ms2.inr.ac.ru

> It was removed closer to the end of 2.1.xx.
> 
> > So what's the current status, are locally originated packets
> > policy-routed or aren't they,

Hei all,

so we have a little problem:
I have a machine with 4 network cards and a ip from the same subnet on
every card.
(Dont ask me, why we have 4 cards for it ;-)
Ok, here's my setup:

----- cut -----
IP=/usr/sbin/ip
ROUTE=/sbin/route

ROUTER="192.168.0.102"
IP0=192.168.0.200
IP1=192.168.0.201
IP2=192.168.0.202
IP3=192.168.0.203
NM="192.168.0.0/24"

# set up interfaces
$IP addr add $IP0 dev eth0
$IP addr add $IP1 dev eth1
$IP addr add $IP2 dev eth2
$IP addr add $IP3 dev eth3
$IP link set eth0 up
$IP link set eth1 up
$IP link set eth2 up
$IP link set eth3 up

# add rules
$IP rule add from $IP0/32 pref 100 table 10
$IP rule add from $IP1/32 pref 200 table 20
$IP rule add from $IP2/32 pref 300 table 30
$IP rule add from $IP3/32 pref 400 table 40
$ROUTE add -host $ROUTER dev eth0

# set routing tables
$IP route add $NM dev eth0 table 10
$IP route add default via $ROUTER table 10
$IP route add $NM dev eth1 table 20
$IP route add default via $ROUTER table 20
$IP route add $NM dev eth2 table 30
$IP route add default via $ROUTER table 30
$IP route add $NM dev eth3 table 40
$IP route add default via $ROUTER table 40 
$ROUTE add default gw $ROUTER
----- cut -----

Now i have the following problem:
All UDP packages are created with the right ip, but routed trough the
first network card.

Here's a tcpdump (sending a nameserver request to the second ip ...)
$ host 192.168.0.1 192.168.0.201

# tcpdump -p -i eth1:
18:13:59.988575 192.168.0.15.1128 > 192.168.0.201.domain: 34740+ (28)
18:14:00.036535 192.168.0.15.1128 > 192.168.0.201.domain: 34741+ (28)

# tcpdump -p -i eth0:
18:14:09.514938 192.168.0.201.domain > 192.168.0.15.1128: 16413 1/3/3
(161)
18:14:09.570556 192.168.0.201.domain > 192.168.0.15.1128: 16414 0/1/0
(81)

Why is the kernel sending this packages trough the first interface and
how can i change it to using the right interface?


Regards

-- 

                                  ads
                                  Andreas Scherbaum

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

           reply	other threads:[~1999-12-17 17:38 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <199912171611.TAA01369@ms2.inr.ac.ru>]

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=385A741E.A58470F6@htl.de \
    --to=adsmail@htl.de \
    --cc=linux-kernel@vger.rutgers.edu \
    /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.