Skip to contentSkip to conversation

incoming interface + ifb0

DISCUSSION Denys Fedoryshchenko 2 participants 4 messages Jul 29, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Sorry that i am asking in kernel maillist, probably it is wrong. Maybe right place is lartc only, but probably kernel lacking something too :-)

Question is:
I have plenty pppX interfaces. I want to shape traffic coming over this interfaces. Before i was doing over m_ipt and MARK, then redirect to ifb0 and there was doing filter by fwmark. But m_ipt seems needs serious rewrite, and plus it is not very clean way to do (performance wise).

Alternative way is to shape on outgoing interface, but it is not clean, in case if there is multiple outgoing interfaces. I tried to filter on ifb by ematch - rt_iif, dev - no luck. by route fromif - no luck. Is there some way i miss?

#1 lore raw
Quoted 9 lines · Denys Fedoryshchenko

Sorry that i am asking in kernel maillist, probably it is wrong. Maybe right place is lartc only, but probably kernel lacking something too :-)

Question is:
I have plenty pppX interfaces. I want to shape traffic coming over this interfaces. Before i was doing over m_ipt and MARK, then redirect to ifb0 and there was doing filter by fwmark. But m_ipt seems needs serious rewrite, and plus it is not very clean way to do (performance wise).

Alternative way is to shape on outgoing interface, but it is not clean, in case if there is multiple outgoing interfaces. I tried to filter on ifb by ematch - rt_iif, dev - no luck. by route fromif - no luck. Is there some way i miss?

I didn't use this nor checked enough, so I can be wrong, but since ingress with ifb0 is in prerouting, you probably can't use rt_iif. You shouldn't filter at ifb on "dev" neither - it's "ifb" at the moment. You need to match skb->iif with something (flow?).

Jarek P.

#2 lore raw
Quoted 4 lines · Jarek Poplawski

I didn't use this nor checked enough, so I can be wrong, but since ingress with ifb0 is in prerouting, you probably can't use rt_iif. You shouldn't filter at ifb on "dev" neither - it's "ifb" at the moment. You need to match skb->iif with something (flow?).

Yes
I want to create on outgoing device or ifb(preffered) - tree of flows. Cause each interface = customer - i need to classify customers by flows.

Since customer can have multiple/spoofed ip's - i cannot filter by ip for now. So iif only my choice seems.

Maybe if i do redirect on outgoing to ifb on outgoing device it will work?

Quoted 6 lines

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 6 lines · Denys Fedoryshchenko
Quoted 4 lines · Jarek Poplawski

I didn't use this nor checked enough, so I can be wrong, but since ingress with ifb0 is in prerouting, you probably can't use rt_iif. You shouldn't filter at ifb on "dev" neither - it's "ifb" at the moment. You need to match skb->iif with something (flow?).

Quoted 8 lines

Yes
I want to create on outgoing device or ifb(preffered) - tree of flows. Cause each interface = customer - i need to classify customers by flows.

Since customer can have multiple/spoofed ip's - i cannot filter by ip for now. So iif only my choice seems.

Maybe if i do redirect on outgoing to ifb on outgoing device it will work?

I doubt you can do something like this - or I miss something. IMHO, you could try with this flow filter on ifb as a replacement for ipt
+ fw. Otherwise, if you can schedule on outgoing devs, you can use e.g. cls_route. On the other hand ppp usually enables controlling of clients, so maybe you should better try to use this more.

Jarek P.