-
Notifications
You must be signed in to change notification settings - Fork 3
use tbpoc-bfp shape ingress egress by ip #1
Comments
Hi, sorry I'm not sure what you mean. Do you mean applying the token bucket to just a given IP address, or do you mean applying it to all IPs but with a different rate for one given IP address? In both cases, you would have to check that your packets are IP, then compare the IP source or destination from IP header to that specific IP addess you want to process. And then, the rate to apply can be changed via the I hope this helps? |
Hi
i have small network for test and use static/dhcp/pppoe service
i have 3 services 1mb , 3mb, 5,mb
and have 2 network: 192.168.20.0/24 lan anf 192.178.21.0/24 pppoe
my idea is to set diff service for every ip in this pool
192.168.20.2 - 1mb
192.168.21.2 - 5mb
…On Wed, Oct 2, 2019, 16:50 Quentin Monnet ***@***.***> wrote:
Hi, sorry I'm not sure what you mean. Do you mean applying the token
bucket to just a given IP address, or do you mean applying it to all IPs
but with a different rate for one given IP address?
In both cases, you would have to check that your packets are IP, then
compare the IP source or destination from IP header to that specific IP
addess you want to process. And then, the rate to apply can be changed via
the TB_TOKEN_NB and TB_TOKEN_REGEN constants in
https://github.com/qmonnet/tbpoc-bpf/blob/master/tokenbucket.c.
I hope this helps?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=ADCWD5AQLJWJB6IVY47ECJLQMSRI7A5CNFSM4I4TVEWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAEZ4GI#issuecomment-537501209>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADCWD5G7MX3MP5S4PNGML7TQMSRI7ANCNFSM4I4TVEWA>
.
|
So you would have to filter on IP addresses, see how we get the source IP already. Compare the first three bytes of your IPs with the network prefixes you work with, and depending on the case, use the values associated to the desired rate. The simplest way to have this would be to hardcode network prefixes and rates in your code. The “clean” way would be instead to pass them via a dedicated eBPF map. |
please if have time
make a sample to see
how to set ip and speed
…On Wed, Oct 2, 2019, 21:01 Quentin Monnet ***@***.***> wrote:
So you would have to filter on IP addresses, see how we get the source IP
<https://github.com/qmonnet/tbpoc-bpf/blob/master/tokenbucket.c#L115>
already. Compare the first three bytes of your IPs with the network
prefixes you work with, and depending on the case, use the values
associated to the desired rate.
The simplest way to have this would be to hardcode network prefixes and
rates in your code. The “clean” way would be instead to pass them via a
dedicated eBPF map.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=ADCWD5ASCG5UDSN53GLBPTLQMTOYFA5CNFSM4I4TVEWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAFUVTA#issuecomment-537610956>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADCWD5ETKFTKCVOJPOYTFI3QMTOYFANCNFSM4I4TVEWA>
.
|
No sorry, I don't have time at the moment. You'll have to do your homework :) |
Thanks if i have questions i will write you.
M
На ср, 2.10.2019 г. в 21:23 ч. Quentin Monnet <[email protected]>
написа:
… No sorry, I don't have time at the moment. You'll have to do your homework
:)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=ADCWD5C76CY6YI64F5FE6OLQMTRINA5CNFSM4I4TVEWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAFWVLA#issuecomment-537619116>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADCWD5DJBA3C6AK4CS5ZJHTQMTRINANCNFSM4I4TVEWA>
.
|
Hi compile tbpoc-bfp and now i whan to test to set speed to one of ips in network for down/up
please write example how to set this ?
The text was updated successfully, but these errors were encountered: