Здравствуйте многоуважаемый Dlink , давно тут не появлялся пока не возникли проблемы которые просто так уже не решаются.
Для начала сама суть : сеть построена с разделением и ограничением доступа при помощи ACL еще со времён des 3526 , где существет пропуск и фильтрация определённого трафика , далее пропуск доверенных IP+MAC (PCF ACL) и последнее блокировка .
для наглядности выложу куски ACL
например старые на
3526 ,уже не пользуются из-за ограничения 200 правил на порт .
Код:
# разрешаем хождение DHCP & DNS
create access_profile ip destination_ip_mask 255.255.255.255 udp dst_port_mask 0xFFFF profile_id 1
config access_profile profile_id 1 add access_id 1 ip destination_ip 255.255.255.255 udp dst_port 67 port 1 permit priority 7 replace_priority
.......
config access_profile profile_id 1 add access_id 25 ip destination_ip 255.255.255.255 udp dst_port 67 port 25 permit priority 7 replace_priority
.......
config access_profile profile_id 1 add access_id 26 ip destination_ip 172.22.100.1 udp dst_port 53 port 1 permit
config access_profile profile_id 1 add access_id 26 ip destination_ip 172.22.100.1 udp dst_port 53 port 2 permit
.....
# Разрешаем доступ к некоторым ресурсам
create access_profile ip destination_ip_mask 255.255.255.255 tcp dst_port_mask 0xFFFF profile_id 2
config access_profile profile_id 2 add access_id 1 ip destination_ip 172.22.100.10 tcp dst_port 80 port 1 permit
.....
config access_profile profile_id 2 add access_id 10 ip destination_ip 172.22.100.10 tcp dst_port 80 port 25 permit
config access_profile profile_id 2 add access_id 26 ip destination_ip 172.22.255.206 tcp dst_port 80 port 1 permit
....
config access_profile profile_id 2 add access_id 61 ip destination_ip 172.22.100.1 tcp dst_port 80 port 1 permit
.....
# запрещаем флудить левым трафиком
create access_profile ethernet destination_mac FF-FF-FF-FF-FF-FF ethernet_type profile_id 3
config access_profile profile_id 3 add access_id 1 ethernet destination_mac FF-FF-FF-FF-FF-FF ethernet_type 0x800 port 1 deny
......
# Разрешаем ARP запросы
create access_profile ethernet ethernet_type profile_id 4
config access_profile profile_id 4 add access_id 1 ethernet ethernet_type 0x806 port 1 permit
.....
config access_profile profile_id 4 add access_id 24 ethernet ethernet_type 0x806 port 24 permit
# основной профиль PCF для разрешения ( IP+MAC)
create access_profile packet_content_mask offset_0-15 0x0 0xFFFF 0xFFFFFFFF 0x0 offset_16-31 0xFFFF0000 0x0 0x0 0xFFFF offset_32-47 0xFFFF0000 0x0 0x0 0x0 profile_id 100
config access_profile profile_id 100 add access_id 465 packet_content_mask offset_0-15 0x0 0x90E6 0xBAD41DD2 0x0 offset_16-31 0x8000000 0x0 0x0 0xAC16 offset_32-47 0x4C090000 0x0 0x0 0x0 port 18 permit
........
config access_profile profile_id 100 add access_id 8357 packet_content_mask offset_0-15 0x0 0x1F 0x1FDCB19C 0x0 offset_16-31 0x8000000 0x0 0x0 0xAC16 offset_32-47 0x4C0F0000 0x0 0x0 0x0 port 18 permit
# зпрещаем всё остальное
create access_profile ip source_ip_mask 0.0.0.0 destination_ip_mask 0.0.0.0 profile_id 200
config access_profile profile_id 200 add access_id 1 ip source_ip 0.0.0.0 destination_ip 0.0.0.0 port 9 deny
config access_profile profile_id 200 add access_id 2 ip source_ip 0.0.0.0 destination_ip 0.0.0.0 port 11 deny
config access_profile profile_id 200 add access_id 3 ip source_ip 0.0.0.0 destination_ip 0.0.0.0 port 13 deny
config access_profile profile_id 200 add access_id 4 ip source_ip 0.0.0.0 destination_ip 0.0.0.0 port 17 deny
config access_profile profile_id 200 add access_id 5 ip source_ip 0.0.0.0 destination_ip 0.0.0.0 port 18 deny
config access_profile profile_id 200 add access_id 6 ip source_ip 0.0.0.0 destination_ip 0.0.0.0 port 19 deny
т.е имели 6 профилей , далее перешли на DES 3200-10(18) Rev A1 (B1)
профили немного изменились но их цель осталась , пускать нужные вещи ( DHCP DNS ARP , доступ до некоторых сайтов , отдельные VALN ) , пускать людей через связку IP+MAC , ненужное запрещать .
для
3200-10 rev A1 это выглядело примено так :
Код:
#тоже что и в 3526 разрешение dhcp&dns+сервера + блок лишнего через PCF
create access_profile packet_content_mask offset1 l3 16 0xFFFF offset2 l3 18 0xFFFF offset3 l4 2 0xFFFF profile_id 1
config access_profile profile_id 1 add access_id 1 packet_content offset1 0xffff offset2 0xffff offset3 0x0043 port 1-9 permit priority 7 replace_priority replace_dscp_with 63
config access_profile profile_id 1 add access_id 2 packet_content offset1 0xac16 offset2 0x6401 offset3 0x0035 port 1-10 permit priority 6 replace_priority replace_dscp_with 60
config access_profile profile_id 1 add access_id 3 packet_content offset1 0xac16 offset2 0x640a offset3 0x0050 port 1-10 permit priority 6 replace_priority replace_dscp_with 50
config access_profile profile_id 1 add access_id 4 packet_content offset1 0xac16 offset2 0xffce offset3 0x0050 port 1-10 permit priority 6 replace_priority replace_dscp_with 50
config access_profile profile_id 1 add access_id 5 packet_content offset1 0xac16 offset2 0x6401 offset3 0x0050 port 1-9 permit priority 6 replace_priority replace_dscp_with 59
config access_profile profile_id 1 add access_id 200 packet_content offset3 0x0087 port 1-10 deny
config access_profile profile_id 1 add access_id 201 packet_content offset3 0x0089 port 1-10 deny
config access_profile profile_id 1 add access_id 202 packet_content offset3 0x008a port 1-10 deny
config access_profile profile_id 1 add access_id 203 packet_content offset3 0x01bd port 1-10 deny
# разрешаем ARP и доп VLAN
create access_profile packet_content_mask destination_mac FF-FF-FF-FF-FF-FF c_tag 0xffff offset1 l2 0 0xFFFF profile_id 3
config access_profile profile_id 3 add access_id 1 packet_content offset1 0x0806 port 1-10 permit
config access_profile profile_id 3 add access_id 2 packet_content destination_mac FF-FF-FF-FF-FF-FF offset1 0x0800 port 1-9 deny
config access_profile profile_id 3 add access_id 3 packet_content offset1 0x86dd port 1-10 deny
config access_profile profile_id 3 add access_id 10 packet_content c_tag 0x01 port 9 permit
config access_profile profile_id 3 add access_id 104 packet_content c_tag 0x68 port 5,9 permit
config access_profile profile_id 3 add access_id 105 packet_content c_tag 0x69 port 5,9 permit
config access_profile profile_id 3 add access_id 129 packet_content c_tag 0x81 port 5,9 permit
# основное для клиентов связка IP+MAC
create access_profile packet_content_mask source_mac FF-FF-FF-FF-FF-FF offset1 l3 12 0xFFFF offset2 l3 14 0xFFFF profile_id 100
config access_profile profile_id 100 add access_id 1 packet_content source_mac 00-E0-91-0B-2B-D3 port 1-9 permit
config access_profile profile_id 100 add access_id 56 packet_content source_mac 90-E6-BA-01-51-33 offset1 0xac16 offset2 0x0c14 port 9 permit
config access_profile profile_id 100 add access_id 322 packet_content source_mac 00-24-1D-C0-85-57 offset1 0xac16 offset2 0x2412 port 1-4 permit
......
# deny all
create access_profile packet_content_mask offset1 l2 0 0x0 profile_id 200
config access_profile profile_id 200 add access_id 1 packet_content port 1-4 deny
config access_profile profile_id 200 add access_id 2 packet_content port 9 deny
т.е. как можно было заметить в 3200 более гибкие правила ACL PCF где можно было в профиле задать значения которые проверяются но упускать в самих правилах , при этом правила действуют на все указаные порты в отличии от 3526 где одно правило на один порт .
Всё было хорошо пока не получили еще партию 3200 но уже REV. C1 , думал перекину правила - привяжу к билингу и всё заработает как и раньше . Но тут меня ждала засада
ACL профили полностью отличаются , в них теперь не offset l2 ... , а offset_chunk как в 3627 и им подобным при этом появилось ограничение в виде
всего 4 ACL профиля , т.е. переделывать на вид как в 3526 профилей не хватает , переделать как 3200 но через offset_chunk думаю влипну в ограничения количества самих chunk'oв ( вроде такое на каких-то моделей уже было ) и неизвестно можно ли выборочно смешывать правила в профиле , т.е. как это было в предыдущих ревизиях где можно было в профиль закинуть проверку c_tag , ip , pcf , port - но в самом правиле использовать что необходимо.
Я понимаю производители хотят экономить переходя на новые чипы снижая энергопотребление и прочие мелочи , но по факту получилось урезания функционала замечательной железки т.к. REV C1 полностью отличается от предыдущих на аппаратном уровне . Лучше бы назвали модель 3201-18 а 3200 rev A1&B1 оставили как была
