lartc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mihai <m@mokalife.ro>
To: lartc@vger.kernel.org
Subject: Fwd: Kernel Routing tabel
Date: Tue, 16 Mar 2021 11:22:40 +0000	[thread overview]
Message-ID: <CANk_n4b07XW3Zyw5zH01BgPcDCGoUNwJz=vBs4SdieY36nSAnw@mail.gmail.com> (raw)

Hello,

I have 2 NIC with ips
eth1: 10.100.1.2/30
eth2: 10.200.1.2/30
both of them must reach IP: 172.16.16.1

what i've done so far:
eth1:
ip route add 10.100.1.0/30 dev eth1 src 10.100.1.2 scope link table 100
ip route add default via 10.100.1.1 dev eth1 table 100
ip rule add from 10.100.1.0/30 dev eth1 table 100
ip rule add to 10.100.1.0/30 dev eth1 table 100
ip rule add to 172.16.16.1 lookup 100

eth2:
ip route add 10.200.1.0/30 dev eth1 src 10.200.1.2 scope link table 200
ip route add default via 10.200.1.1 dev eth2 table 200
ip rule add from 10.200.1.0/30 dev eth2 table 200
ip rule add to 10.200.1.0/30 dev eth2 table 200
ip rule add to 172.16.16.1 lookup 200

It kinda works if I ping with source interface, but i have the problem:
 - that the packet goes on the interface with the lowest priority
between eth1 and eth2.

How can I make it work so that when the packet originates from eth1 it
goes through eth1 and so on.?

             reply	other threads:[~2021-03-16 11:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 11:22 Mihai [this message]
2021-03-16 11:50 ` Fwd: Kernel Routing tabel Marco Gaiarin
2021-03-16 19:23 ` Grant Taylor
2021-03-16 19:53 ` Nicolas Piatto
2021-03-16 20:13 ` Grant Taylor
2021-03-17 11:52 ` Marco Gaiarin
2021-03-17 23:13 ` Grant Taylor

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='CANk_n4b07XW3Zyw5zH01BgPcDCGoUNwJz=vBs4SdieY36nSAnw@mail.gmail.com' \
    --to=m@mokalife.ro \
    --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 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 read-only IMAP folder(s) and NNTP newsgroup(s).