CoA: различия между версиями
Sirmax (обсуждение | вклад) |
Sirmax (обсуждение | вклад) |
||
Строка 67: | Строка 67: | ||
− | Соответвенно, |
+ | Соответвенно, сервисы ы радиусе будут выглядеть следующим образом: |
+ | <PRE> |
||
− | |||
+ | WORLD_1_MBIT Password == "cisco" |
||
− | |||
+ | Cisco-AVPair += "ip:traffic-class=in access-group 192 priority 10", |
||
− | |||
+ | Cisco-AVPair += "ip:traffic-class=out access-group 192 priority 10", |
||
+ | Cisco-Account-Info += "QU;1024000;512000;D;1024000;512000" |
||
+ | </PRE> |
||
+ | <PRE> |
||
+ | WORLD_2_MBIT Password == "cisco" |
||
+ | Cisco-AVPair += "ip:traffic-class=in access-group 192 priority 10", |
||
+ | Cisco-AVPair += "ip:traffic-class=out access-group 192 priority 10", |
||
+ | Cisco-Account-Info += "QU;2048000;1024000;D;2048000;1024000" |
||
+ | </PRE> |
||
+ | <PRE> |
||
+ | UA-IX_2_MBIT Password == "cisco" |
||
+ | Cisco-AVPair += "ip:traffic-class=in access-group 193 priority 10", |
||
+ | Cisco-AVPair += "ip:traffic-class=out access-group 193 priority 10", |
||
+ | Cisco-Account-Info += "QU;2048000;1024000;D;2048000;1024000" |
||
+ | </PRE> |
||
+ | <PRE> |
||
+ | UA-IX_4_MBIT Password == "cisco" |
||
+ | Cisco-AVPair += "ip:traffic-class=in access-group 193 priority 10", |
||
+ | Cisco-AVPair += "ip:traffic-class=out access-group 193 priority 10", |
||
+ | Cisco-Account-Info += "QU;4096000;2048000;D;4096000;2048000" |
||
+ | </PRE> |
||
+ | <PRE> |
||
+ | KH-IX_5_MBIT Password == "cisco" |
||
+ | Cisco-AVPair += "ip:traffic-class=in access-group 194 priority 10", |
||
+ | Cisco-AVPair += "ip:traffic-class=out access-group 194 priority 10", |
||
+ | Cisco-Account-Info += "QU;5120000;2048000;D;5120000;2048000" |
||
+ | </PRE> |
||
+ | <PRE> |
||
+ | KH-IX_10_MBIT Password == "cisco" |
||
+ | Cisco-AVPair += "ip:traffic-class=in access-group 194 priority 10", |
||
+ | Cisco-AVPair += "ip:traffic-class=out access-group 194 priority 10", |
||
+ | Cisco-Account-Info += "QU;10240000;5120000;D;10240000;5120000" |
||
+ | </PRE> |
||
Версия 12:57, 12 января 2009
CoA - Change Of Authorization
Назначение CoA
Цитата: (cisco.com)
ISG offers a standard RADIUS interface that is typically used in a pulled model where the request originates from ISG and the response come from the queried servers. ISG also supports the RADIUS Change of Authorization (CoA) extensions defined in RFC 3576 that are typically used in a pushed model and allow for the dynamic reconfiguring of services from external authentication, authorization, and accounting (AAA) or policy servers.
Использование CoA
Настройка поддержки CoA на Cisco 7201
Поддержка CoA настраивается очень просто
aaa server radius dynamic-author client 172.16.30.144 server-key 7 1511021F07257C737F client 172.16.30.50 server-key 7 0822455D0A16524045 auth-type any ignore session-key ignore server-key !
Можно указать сколько угодно клиентов, каждый из которых сможет посылать CoA-пакеты со своими ключами.
Тестирование CoA
Тестирование переключения тарифов
создание нескольких тарифов
Для тестирования я решил создать 6 различных сервисов - KH-IX с 2 скоростями (5 и 10 мбит), UA-IX с 2 скоростями (2 и 4 мбита) и "мир" с 2 скоростями (1 и 2 мбита). Тарифы можно применять к пользователю в любых сочитаниях.
Траффик входящий разделяю по TOS, исходящий - никак не разделяю. Маркирую на пограничном маршрутизаторе в зависимости от того с какого интерфейсп получен пакет
# UA-IX -A PREROUTING --in-interface eth1.XXX1 -j TOS --set-tos 0x04 # KH-IX -A PREROUTING --in-interface eth1.XXX2 -j TOS --set-tos 0x02 # Peer -A PREROUTING --in-interface eth1.XXX2 -j TOS --set-tos 0x02 # World -A PREROUTING -j TOS --set-tos 0x08 COMMIT *nat
Соответвие "имен" и значений:
max-reliability Match packets with max reliable TOS (2) max-throughput Match packets with max throughput TOS (4) min-delay Match packets with min delay TOS (8) min-monetary-cost Match packets with min monetary cost TOS (1) normal Match packets with normal TOS (0)
"Мир":
access-list 192 remark world access-list 192 permit ip any any tos min-delay access-list 192 permit ip any any
"Украина":
access-list 193 remark UA-IX access-list 193 permit ip any any tos max-throughput
"Харьков":
access-list 194 remark KH-IX access-list 194 permit ip any any tos max-reliability
Соответвенно, сервисы ы радиусе будут выглядеть следующим образом:
WORLD_1_MBIT Password == "cisco" Cisco-AVPair += "ip:traffic-class=in access-group 192 priority 10", Cisco-AVPair += "ip:traffic-class=out access-group 192 priority 10", Cisco-Account-Info += "QU;1024000;512000;D;1024000;512000"
WORLD_2_MBIT Password == "cisco" Cisco-AVPair += "ip:traffic-class=in access-group 192 priority 10", Cisco-AVPair += "ip:traffic-class=out access-group 192 priority 10", Cisco-Account-Info += "QU;2048000;1024000;D;2048000;1024000"
UA-IX_2_MBIT Password == "cisco" Cisco-AVPair += "ip:traffic-class=in access-group 193 priority 10", Cisco-AVPair += "ip:traffic-class=out access-group 193 priority 10", Cisco-Account-Info += "QU;2048000;1024000;D;2048000;1024000"
UA-IX_4_MBIT Password == "cisco" Cisco-AVPair += "ip:traffic-class=in access-group 193 priority 10", Cisco-AVPair += "ip:traffic-class=out access-group 193 priority 10", Cisco-Account-Info += "QU;4096000;2048000;D;4096000;2048000"
KH-IX_5_MBIT Password == "cisco" Cisco-AVPair += "ip:traffic-class=in access-group 194 priority 10", Cisco-AVPair += "ip:traffic-class=out access-group 194 priority 10", Cisco-Account-Info += "QU;5120000;2048000;D;5120000;2048000"
KH-IX_10_MBIT Password == "cisco" Cisco-AVPair += "ip:traffic-class=in access-group 194 priority 10", Cisco-AVPair += "ip:traffic-class=out access-group 194 priority 10", Cisco-Account-Info += "QU;10240000;5120000;D;10240000;5120000"