Преобразование идет только для UNI портов. У вас на них будет или инкапсуляция или замена в зависимоти от vlan_translation. Описывать преобразования для всех VLAN'ов при режиме qinq не надо. NNI порт, насколько я понял, это по сути дела порт в режиме normal. Ниже выстраданный, рабочий пример конфига который сделает вам на 25 порту замену тегов 203,204,205 на 64,63,65 соответственно. В остальном свитч будет работать как с обычными vlan'ами. Причем порты 2,24,10 - untagged, а 21,4 tagged При настройке config gvrp acceptable_frame admit_all лучше оставить. А вот ingress_checking enable можно смело включать. Трафик корректно ходит, мусора тоже нет на портах.
# VLAN
enable pvid auto_assign config vlan default delete 1-27 config vlan default advertisement disable create vlan ttk tag 10 config vlan ttk add tagged 21 config vlan ttk add untagged 22 advertisement disable create vlan control tag 50 config vlan control add tagged 21 config vlan control add untagged 24 advertisement disable create vlan c-eth tag 61 config vlan c-eth add tagged 4,21 advertisement disable create vlan c-bgp tag 62 config vlan c-bgp add tagged 4,21 advertisement disable create vlan retn-2 tag 63 config vlan retn-2 add tagged 21,25 advertisement disable create vlan retn-1 tag 64 config vlan retn-1 add tagged 21,25 advertisement disable create vlan retn-3 tag 65 config vlan retn-3 add tagged 25 config vlan retn-3 add untagged 2 advertisement disable enable qinq disable gvrp disable vlan_trunk config gvrp 1,3-21,23,25-27 state disable ingress_checking enable acceptable_frame admit_all pvid 1 config gvrp 2 state disable ingress_checking enable acceptable_frame admit_all pvid 65 config gvrp 22 state disable ingress_checking enable acceptable_frame admit_all pvid 10 config gvrp 24 state disable ingress_checking enable acceptable_frame admit_all pvid 50
# QINQ
config qinq ports 1-24,26-27 role nni missdrop enable tpid 0x8100 config qinq ports 25 role uni missdrop enable tpid 0x8100 create vlan_translation ports 25 cvid 203 replace svid 64 create vlan_translation ports 25 cvid 204 replace svid 63 create vlan_translation ports 25 cvid 205 replace svid 65
И небольшой пример ограничения трафика на 4 порту для 2-х vlan'ов: c-bgp - 40 Mbps c-eth - 60 Mbps
# ACL
create access_profile profile_id 1 ethernet vlan config access_profile profile_id 1 add access_id 1 ethernet vlan c-bgp port 4 permit rx_rate 640 config access_profile profile_id 1 add access_id 2 ethernet vlan c-bgp port 21 permit rx_rate 640 config access_profile profile_id 1 add access_id 3 ethernet vlan c-eth port 4 permit rx_rate 960 config access_profile profile_id 1 add access_id 4 ethernet vlan c-eth port 21 permit rx_rate 960 disable cpu_interface_filtering
Порт 21 - это uplink. Если использовать правила только на 4 порту, то вы ограничите только ingress трафик. Кроме того некорректно делать запись портов так: create access_profile profile_id 1 ethernet vlan config access_profile profile_id 1 add access_id 1 ethernet vlan c-bgp port 4,21 permit rx_rate 640 config access_profile profile_id 1 add access_id 2 ethernet vlan c-eth port 4,21 permit rx_rate 960
В этом случаи шейп будет совместный на исходящий/входящий трафик.
|