umike Posted December 10, 2012 Posted December 10, 2012 переписываю правила на PCF, делаю по http://www.dlink.ru/ru/faq/62/954.html подопытный DES-3200-10 A1 немного заблудился в смещениях, поэтому пробую банальное "разрешить ether proto 0x800, 0x806, остальное запретить", все порты untagged в default vlan delete access_profile all create access_profile packet_content_mask offset1 l2 0 0xFFFF profile_id 400 config access_profile profile_id 400 add access_id 1 packet_content offset1 0x0800 port 1-10 permit config access_profile profile_id 400 add access_id 2 packet_content offset1 0x0806 port 1-10 permit create access_profile ethernet source_mac 00-00-00-00-00-00 profile_id 500 config access_profile profile_id 500 add access_id 500 ethernet source_mac 00-00-00-00-00-00 port 1-10 deny Срабатывает 500й профиль и блокируется всё. Что я делаю не так? Вставить ник Quote
umike Posted December 10, 2012 Author Posted December 10, 2012 При этом create access_profile packet_content_mask offset1 l2 0 0xFFFF profile_id 400 config access_profile profile_id 400 add access_id 1 packet_content offset1 0x0800 port 1-10 permit config access_profile profile_id 400 add access_id 2 packet_content offset1 0x0806 port 1-10 permit create access_profile packet_content_mask offset1 l2 0 0x0 profile_id 500 config access_profile profile_id 500 add access_id 2 packet_content offset1 0x0000 port 1-10 deny работает так, как ожидается. PCF профили отрабатывают последними несмотря на profile_id ? Вставить ник Quote
xcme Posted December 10, 2012 Posted December 10, 2012 Если один и тот же пакет попадает и под PCF ACL и под обычные ACL, то порядок следования правил не важен и приоритетным будет запрещающее правило. Вставить ник Quote
umike Posted December 10, 2012 Author Posted December 10, 2012 (edited) спасибо. Толкните в нужном направлении как работает mask внутри access_id для PCF профилей? То есть как, например, работает конструкция create access_profile packet_content_mask c_tag A profile_id 25 config access_profile profile_id 25 add access_id 100 packet_content c_tag B mask C... ? без маски понятно, это аналогично if( (c_tag && A) == B ), а с маской как? (c_tag && A) == (B && C) чтоли? Возможно ли сделать permit для tagged трафика? :) count enable подсказывает что для untagged c_tag=1. Подозреваю что как раз при помощи вышеприведенной конструкции с mask это должно получиться, как конкретно? Добавлено: если tagged разрешить не получится (жаль, нет отрицательных условий вида c_tag not 0x0001), то можно все правила переписать, указывая c_tag 0xFFFF и c_tag 0x0001 дабы они tagged трафик не торгали. Верно? Edited December 10, 2012 by umike Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.