Но при конфиге(ниже) получается, что всем кто попадает в аксесс лист, а юзверей там может быть до 2к, скорость нарезается совместно. Тоесть допустим есть скорость 80мбит, на ней 100 человек. Значит не у всех в отдельности будет по 80, а на всех сразу 80мбит.
Код: Выделить всё
mls qos
!
class-map match-any shape10out
match access-group name shape10out
class-map match-any shape55out
match access-group name shape55out
class-map match-any shape30out
match access-group name shape30out
class-map match-any shape20out
match access-group name shape20out
class-map match-any shape05out
match access-group name shape05out
class-map match-any shape80out
match access-group name shape80out
class-map match-any shape1out
match access-group name shape1out
class-map match-any shape2out
match access-group name shape2out
class-map match-any shape4out
match access-group name shape4out
class-map match-any shape1in
match access-group name shape1in
class-map match-any shape2in
match access-group name shape2in
class-map match-any shape4in
match access-group name shape4in
class-map match-any shape80in
match access-group name shape80in
class-map match-any shape55in
match access-group name shape55in
class-map match-any shape10in
match access-group name shape10in
class-map match-any shape20in
match access-group name shape20in
class-map match-any shape30in
match access-group name shape30in
class-map match-any shape05in
match access-group name shape05in
!
!
policy-map shapeout
class shape05out
police 512000 conform-action transmit exceed-action drop
class shape1out
police 1000000 conform-action transmit exceed-action drop
class shape2out
police 2000000 conform-action transmit exceed-action drop
class shape10out
police 10000000 conform-action transmit exceed-action drop
class shape20out
police 20000000 conform-action transmit exceed-action drop
class shape30out
police 30000000 conform-action transmit exceed-action drop
class shape55out
police 55000000 conform-action transmit exceed-action drop
class shape80out
police 80000000 conform-action transmit exceed-action drop
class shape4out
police 4000000 conform-action transmit exceed-action drop
policy-map shapein
class shape05in
police 512000 conform-action transmit exceed-action drop
class shape1in
police 1000000 conform-action transmit exceed-action drop
class shape2in
police 2000000 conform-action transmit exceed-action drop
class shape10in
police 10000000 conform-action transmit exceed-action drop
class shape20in
police 20000000 conform-action transmit exceed-action drop
class shape30in
police 30000000 conform-action transmit exceed-action drop
class shape55in
police 55000000 conform-action transmit exceed-action drop
class shape80in
police 80000000 conform-action transmit exceed-action drop
class shape4in
police 4000000 conform-action transmit exceed-action drop
!
!
interface TenGigabitEthernet1/1
switchport
switchport trunk allowed vlan 1234,5678,9123
switchport mode trunk
switchport nonegotiate
mls qos vlan-based
!
interface Vlan1234
ip address zzz.zzz.zzz.zzz 255.255.255.252
ip access-group in in
ip access-group out out
service-policy input shapein
service-policy output shapeout
ip flow ingress
!
Extended IP access list shape05in
Extended IP access list shape05out
Extended IP access list shape10in
10 permit ip any host xxx.xxx.xxx.xxx
20 permit ip any host yyy.yyy.yyy.yyy
...
Extended IP access list shape10out
10 permit ip host xxx.xxx.xxx.xxx any
20 permit ip host yyy.yyy.yyy.yyy any
...
И так далее все аксесс листы
Как и писал выше, скорость для адресов xxx.xxx.xxx.xxx и yyy.yyy.yyy.yyy получается общая в 10мбит. А должно быть у каждого по 10мбит.
Пошел дальше и попробовал переделать по другому:
Код: Выделить всё
!
class-map match-all shape1in
match access-group name shape1in
class-map match-all shape2in
match access-group name shape2in
class-map match-all shape4in
match access-group name shape4in
class-map match-all shape80in
match access-group name shape80in
class-map match-all shape55in
match access-group name shape55in
class-map match-all shape10in
match access-group name shape10in
class-map match-all shape20in
match access-group name shape20in
class-map match-all shape30in
match access-group name shape30in
class-map match-all shape05in
match access-group name shape05in
!
policy-map shapein
class shape05in
police flow mask dest-only 512000 1000 conform-action transmit exceed-action drop
class shape1in
police flow mask dest-only 1000000 1000 conform-action transmit exceed-action drop
class shape2in
police flow mask dest-only 2000000 1000 conform-action transmit exceed-action drop
class shape4in
police flow mask dest-only 4000000 2000 conform-action transmit exceed-action drop
class shape10in
police flow mask dest-only 10000000 5000 conform-action transmit exceed-action drop
class shape20in
police flow mask dest-only 20000000 10000 conform-action transmit exceed-action drop
class shape30in
police flow mask dest-only 30000000 15000 conform-action transmit exceed-action drop
class shape55in
police flow mask dest-only 55000000 27500 conform-action transmit exceed-action drop
class shape80in
police flow mask dest-only 80000000 40000 conform-action transmit exceed-action drop
!
!
interface TenGigabitEthernet1/1
switchport
switchport trunk allowed vlan 1234,5678,9123
switchport mode trunk
switchport nonegotiate
mls qos vlan-based
!
interface Vlan1234
ip address zzz.zzz.zzz.zzz 255.255.255.252
ip access-group in in
ip access-group out out
service-policy input shapein
ip flow ingress
!
Тоже ничего не изменилось. Пошел дальше.
Т.к. class-map с match-all(логическое И) для вланов не работает, и класс-мапы создаются с match-any(логическое ИЛИ), о чем говорит документация:
"The router does not support the match-all keyword for VLAN-based classification."
Была придумана затычка через жопу.
Для каждого абонента создаем 1 аксес лист.
Код: Выделить всё
Extended IP access list shape_xxx.xxx.xxx.xxx
10 permit ip any host xxx.xxx.xxx.xxx
20 permit ip host xxx.xxx.xxx.xxx any
Создаем class-map:
Код: Выделить всё
Class Map match-any xxx.xxx.xxx.xxx (id 2)
Match access-group name shape_xxx.xxx.xxx.xxx
Добавляем в policy-map:
Код: Выделить всё
cisco6509#show policy-map
Policy Map shapeout
Class xxx.xxx.xxx.xxx
police cir 10000000 bc 312500
conform-action transmit
exceed-action drop
Policy Map shapein
Class xxx.xxx.xxx.xxx
police cir 10000000 bc 312500
conform-action transmit
exceed-action drop
Тоесть для каждого пользователя создаем свой аксес-лист, клас-мап и добавляем класс-мап в полиси-мап.
Проверил, работает для нескольких пользователей и все красиво режет.
Однако при нагрузке в 5к юзеров уперся опять в 2 проблемы:
1. число class-map ограничено 4095.
2. При таком количестве класс-мапов нагрузка на циску 100% и циска практически перестает отвечать.
Кто сталкивался с нарезкой скорости на влане в циске? Подскажите что еще можно попробовать?
Нужно ограничить скорость для каждого отдельного юзера на данном влане.