Skip to contentSkip to conversation

tc filter expression

LARTC Niels Vorgaard Christensen 2 participants 4 messages Oct 9, 2003 – Oct 16, 2003

lore
Share & tools
lore
#0 lore raw

Hi.

I am working on a router with three interfaces. eth2 and eth0 are connected to two different Internet providers. The interface eth1 are connected to an internal network. Now I need a tc filter expression that will determine which interface the packet was routed in through to be able classify packets going out eth1 based on provider. I know I could mark packets with netfilter, but if it is possible to construct a tc filter expression to do the job I would much prefere that.

Regards,
Niels V. Christensen
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 9 lines · Niels Vorgaard Christensen

Hi.

I am working on a router with three interfaces. eth2 and eth0 are connected to two different Internet providers. The interface eth1 are connected to an internal network. Now I need a tc filter expression that will determine which interface the packet was routed in through to be able classify packets going out eth1 based on provider. I know I could mark packets with netfilter, but if it is possible to construct a tc filter expression to do the job I would much prefere that.

I think you can use ingress + policy + ds to mark packets (DSCP IP field) on eth0 and eth2. Then on eth1 you can classify base on this field.

Quoted 8 lines

Regards,
Niels V. Christensen
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

---
Catalin(ux) BOIE
[email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Niels Vorgaard Christensen
Quoted 12 lines · Catalin BOIE
Quoted 9 lines · Niels Vorgaard Christensen

Hi.

I am working on a router with three interfaces. eth2 and eth0 are connected to two different Internet providers. The interface eth1 are connected to an internal network. Now I need a tc filter expression that will determine which interface the packet was routed in through to be able classify packets going out eth1 based on provider. I know I could mark packets with netfilter, but if it is possible to construct a tc filter expression to do the job I would much prefere that.

Quoted 2 lines

I think you can use ingress + policy + ds to mark packets (DSCP IP field) on eth0 and eth2. Then on eth1 you can classify base on this field.

Could you give me an example of how this could be done? The DSMARK documentation that I have found is a bit difficult. I can't find any examples of marking in ingress, and if I understand you right, you think that it is possible to mark all packets in ingress on let's say eth0 (provider 1), and then classify based on that mark in egress of eth1 (internal iface).

Regards,
Niels V. Christensen
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to Niels Vorgaard Christensen
Quoted 9 lines
Quoted 2 lines

I think you can use ingress + policy + ds to mark packets (DSCP IP field) on eth0 and eth2. Then on eth1 you can classify base on this field.

Could you give me an example of how this could be done? The DSMARK documentation that I have found is a bit difficult. I can't find any examples of marking in ingress, and if I understand you right, you think that it is possible to mark all packets in ingress on let's say eth0 (provider 1), and then classify based on that mark in egress of eth1 (internal iface).

Hi, Niels!

I have no working example.
I said that in theory. I didn't tried myself.

[10 minutes passed]

I check a little more and seems it's not possible to set the mark using ingress.
Stef, am I wrong?

Quoted 5 lines

Regards,
Niels V. Christensen

---
Catalin(ux) BOIE
[email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/