Настройка коммутатора D-Link DES-3200
Для примера возьму коммутатор D-Link DES-3200-18 С1 с прошивкой 4.36.B012. Команды аналогичны для коммутаторов с разным количеством портов, они могут немного отличатся лишь при разной версии прошивки и ревизии.
Создадим аккаунт администратора: create account admin ИМЯ config admin local_enable
Включение шифрования пароля: enable password encryption
Включение возможности восстановления пароля: enable password_recovery
Параметры serial порта: config serial_port baud_rate 115200 auto_logout never
Включения доступа через web интерфейс: enable web 80
Отключение управления коммутатором по SSH: disable ssh
Включение доступа по telnet: enable telnet 23
Включение отображения в постраничном режиме: enable clipaging
Настройка ширины окна терминала: config terminal width 80
Настройка количества отображаемых строк терминала: config terminal_line default
Отключение логирования вводимых команд: disable command logging
Удаление стандартного VLAN: config vlan default delete 1-18 config vlan default advertisement enable
Создание отдельного VLAN для управления коммутатором: create vlan core tag 50 config vlan core add tagged 25,26 advertisement disable
Создание VLAN для пользователей: create vlan local_smart tag 51 config vlan local_smart add tagged 25,26 config vlan local_smart add untagged 1-24 advertisement disable
Отключение инкапсуляции тегов VLAN в теги VLAN второго уровня: disable qinq
Отключение авто настройки VLAN и назначение всем портам PVID клиентского VLAN: disable gvrp config port_vlan 1-24 gvrp_state disable ingress_checking enable acceptable_frame admit_all pvid 51
Назначение IP адресе коммутатору в VLAN для управления: config ipif System ipaddress 192.168.1.100/24 vlan core config ipif System dhcp_option12 state disable disable autoconfig config autoconfig timeout 50
Добавление шлюза по умолчанию: create iproute default 192.168.1.1 1 primary
Включение ограничения broadcast трафика для всех портов: config traffic control 1-24 broadcast enable multicast disable unicast disable action drop threshold 100 countdown 0 time_interval 5 config traffic control auto_recover_time 0 config traffic trap none config traffic control log state enable
На всякий случай отключеним зеркалирование портов: disable mirror
Настройка логов: config log_save_timing on_demand disable syslog config system_severity trap information config system_severity log information
Настройка сегментации трафика, запрет хождения между портами: config traffic_segmentation 1-24 forward_list 25,26 config traffic_segmentation 25-26 forward_list all
Разрешение больших jumbo frame пакетов и настройка портов: enable jumbo_frame config ports 1-24 speed auto flow_control disable learning enable state enable mdix auto config ports 25,26 medium_type copper speed auto flow_control disable learning enable state enable mdix auto config ports 25,26 medium_type fiber speed auto flow_control disable learning enable state enable
Разрешение управлением коммутатора только с указанных IP адресов:
1 2 create trusted_host network 192.168.1.1/24 snmp telnet ssh http https ping create trusted_host network 172.16.100.100/32 snmp telnet ssh http https ping Настройка snmp трапов:
1 2 3 4 5 6 7 8 disable snmp traps disable snmp authenticate_traps disable snmp linkchange_traps config snmp linkchange_traps ports 1-18 disable config snmp coldstart_traps enable config snmp warmstart_traps enable config rmon trap rising_alarm enable config rmon trap falling_alarm enable Включение и пример настройки SNMP:
1 2 3 4 5 6 7 8 9 10 11 12 13 enable snmp config snmp system_contact [email protected] delete snmp community public delete snmp community private delete snmp user initial delete snmp group initial create snmp group public v1 read_view CommunityView notify_view CommunityView create snmp group public v2c read_view CommunityView notify_view CommunityView create snmp community public view CommunityView read_only create snmp group комьюнити v1 read_view CommunityView write_view CommunityView notify_view CommunityView create snmp group комьюнити v2c read_view CommunityView write_view CommunityView notify_view CommunityView create snmp community комьюнити view CommunityView read_write disable community_encryption Отключение IGMP MULTICAST VLAN:
1 2 disable igmp_snooping multicast_vlan config igmp_snooping multicast_vlan forward_unmatched disable Включение автоматического назначения PVID портам (стандартно включено):
1 enable pvid auto_assign Настройка и отключение PORT SECURITY:
1 2 3 config port_security system max_learning_addr no_limit disable port_security trap_log config port_security ports 1-18 admin_state disable max_learning_addr 32 lock_address_mode deleteonreset Время хранения (сек) mac адреса в таблице:
1 2 config fdb aging_time 300 config block tx ports 1-18 unicast disable Разрешим нулевые IP для связки адресов mac + ip:
1 config address_binding ip_mac ports 1-18 allow_zeroip enable Можно включить фильтрацию NetBios на портах, так сказать запретить доступ к расшареным дискам:
1 2 config filter netbios 1-18 state enable config filter extensive_netbios 1-18 state enable Настройка фильтрации вредных DoS пакетов:
1 2 3 4 5 6 7 8 9 10 config dos_prevention dos_type land_attack action drop state enable config dos_prevention dos_type blat_attack action drop state enable config dos_prevention dos_type tcp_null_scan action drop state enable config dos_prevention dos_type tcp_xmasscan action drop state enable config dos_prevention dos_type tcp_synfin action drop state enable config dos_prevention dos_type tcp_syn_srcport_less_1024 action drop state enable config dos_prevention dos_type ping_death_attack action drop state enable config dos_prevention dos_type tcp_tiny_frag_attack action drop state enable config dos_prevention trap disable config dos_prevention log disable Блокировка DHCP серверов на всех портах кроме входящего:
1 2 3 4 config filter dhcp_server ports all state disable config filter dhcp_server ports 1-16,18 state enable config filter dhcp_server illegal_server_log_suppress_duration 30min config filter dhcp_server trap_log enable Защита от BPDU флуда:
1 2 3 4 5 6 enable bpdu_protection config bpdu_protection recovery_timer 300 config bpdu_protection trap none config bpdu_protection log attack_detected config bpdu_protection ports 1-16,18 state enable config bpdu_protection ports 1-18 mode drop Включение функции SAFEGUARD ENGINE:
1 config safeguard_engine state enable utilization rising 98 falling 90 trap_log enable mode fuzzy Отключение отправки сообщений на электронную почту по SMTP:
1 disable smtp Настройка SNTP параметров времени:
1 2 3 4 enable sntp config time_zone operator + hour 2 min 0 config sntp primary 192.168.1.1 secondary 0.0.0.0 poll-interval 40000 config dst disable Отключение управлением мультикаст трафиком и немного стандартных параметров:
1 2 disable igmp_snooping disable mld_snooping Параметры ARP:
1 2 3 4 config arp_aging time 20 config gratuitous_arp send ipif_status_up enable config gratuitous_arp send dup_ip_detected enable config gratuitous_arp learning enable Настройка уведомлений о изменении температуры:
1 2 3 4 config temperature threshold high 79 config temperature threshold low 11 config temperature trap state disable config temperature log state enable Сохранение конфигурации:
1 save all







