All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cal Spadoni <cspadoni@cornerturn.com>
To: lartc@vger.kernel.org
Subject: [LARTC] General Traffic Control Question
Date: Wed, 08 Jun 2005 01:24:36 +0000	[thread overview]
Message-ID: <42A648D4.6030901@cornerturn.com> (raw)

Here's my situation:

I've got an Intel machine running a 2.6.9 linux kernel and this box has 
4 modems attached to it via a usb to serial port expander. In order to 
force data down each of the modems, some pretty simple rules are used 
and they are as follows:

iptables -t mangle -A OUTPUT -p tcp --dport $PORT1  -j MARK --set-mark 1
iptables -t mangle -A OUTPUT -p tcp --dport $PORT2  -j MARK --set-mark 2
iptables -t mangle -A OUTPUT -p tcp --dport $PORT3  -j MARK --set-mark 3
iptables -t mangle -A OUTPUT -p tcp --dport $PORT4  -j MARK --set-mark 4

ip rule add fwmark 1 table isp1
ip rule add fwmark 2 table isp2
ip rule add fwmark 3 table isp3
ip rule add fwmark 4 table isp4

ip route add default via $GWIPADDR dev ppp0 table isp1
ip route add default via $GWIPADDR dev ppp1 table isp2
ip route add default via $GWIPADDR dev ppp2 table isp3
ip route add default via $GWIPADDR dev ppp3 table isp4

$PORT1 thru $PORT4 are unique and $GWIPADDR is the same for all 4 ppp links.

Using these rules, data going out of my Intel box is shaped nicely based 
on looking at the transmit  columns in /proc/net/dev.

On the receive side, all of the traffic is coming down the only kernel 
default route, which is ppp0, and this is the problem.

Is there a way to use iptables to force answers for data going out a 
given ppp link to be returned using the same link?

Thanks in advance for your help!!

- Cal

cspadoni@cornerturn.com



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

             reply	other threads:[~2005-06-08  1:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08  1:24 Cal Spadoni [this message]
2005-06-08  2:41 ` [LARTC] General Traffic Control Question Jon
2005-06-08  2:55 ` Jody Shumaker

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=42A648D4.6030901@cornerturn.com \
    --to=cspadoni@cornerturn.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.