Здравствуйте.
Имеется DES-3526, H/V : A4, F/V: 6.20.B18 (6.20.B12).
Производятся следующие операции:
1. Командой "upload cfg_toTFTP ip_address filename.cfg" выгружается конфигурация с этого коммутатора на tftp-сервер.
#-------------------------------------------------------------------
# DES-3526 Configuration
#
# Firmware: Build 6.20.B18
# Copyright(C) 2011 D-Link Corporation. All rights reserved.
#-------------------------------------------------------------------
# BASIC
config serial_port baud_rate 9600 auto_logout 10_minutes
enable telnet 23
disable web
config terminal_line default
enable clipaging
debug error_log auto_reboot enabled
disable broadcast_ping_reply
# ACCOUNT LIST
create account admin admin encrypt sha_1 *@&Q9vhQtp1qUvJX/+KSSZ6hckw6Mf6CO1j
create account operator support encrypt sha_1 *@&PX/NSngYQAUqUetLqEyAy53gDH8mFoXk
# PASSWORD ENCRYPTION
enable password encryption
# COMMAND LOGGING
enable command logging
# PASSWORD RECOVERY
enable password_recovery
# BNR
config command_prompt testsw1_DES-3526
# STORM
config traffic control_trap none
config traffic control 1-5 broadcast disable multicast disable unicast disable action drop threshold 128000
# GM
config sim candidate
disable sim
config sim dp_interval 30
config sim hold_time 100
# SYSLOG
enable syslog
config system_severity trap information
config system_severity log information
create syslog host 1 ipaddress 10.90.90.95 severity all facility local5 udp_port 514 state enable
# QOS
config scheduling 0 max_packet 0 max_latency 0
config scheduling 1 max_packet 0 max_latency 0
config scheduling 2 max_packet 0 max_latency 0
config scheduling 3 max_packet 0 max_latency 0
config 802.1p user_priority 0 1
config 802.1p user_priority 1 0
config 802.1p user_priority 2 0
config 802.1p user_priority 3 1
config 802.1p user_priority 4 2
config 802.1p user_priority 5 2
config 802.1p user_priority 6 3
config 802.1p user_priority 7 3
config 802.1p default_priority 1-26 0
config bandwidth_control 1-26 rx_rate no_limit tx_rate no_limit
# MIRROR
disable mirror
# TRAF-SEGMENTATION
config traffic_segmentation 1-26 forward_list 1-26
# PORT
config ports 1-24 speed auto flow_control disable mdix auto learning enable state enable trap enable
config ports 25-26 medium_type copper speed auto flow_control disable mdix auto learning enable state enable trap enable
config ports 25-26 medium_type fiber speed auto flow_control disable learning enable state enable trap enable
# DDM
config ddm trap disable
config ddm log enable
config ddm ports 25-26 state enable
config ddm ports 25-26 shutdown none
# PORT_LOCK
disable port_security trap_log
config port_security ports 1-26 admin_state disable max_learning_addr 1 lock_address_mode DeleteOnReset
# 8021X
disable 802.1x
config 802.1x auth_protocol radius_eap
config radius parameter timeout 5 retransmit 2
config 802.1x capability ports 1-26 none
config 802.1x auth_parameter ports 1-26 direction both port_control auto quiet_period 60 tx_period 30 supp_timeout 30 server_timeout 30 max_req 2 reauth_period 3600 enable_reauth disable
# SNMPv3
delete snmp community public
delete snmp community private
delete snmp user initial
delete snmp group initial
delete snmp group ReadGroup
delete snmp group WriteGroup
delete snmp view restricted all
delete snmp view CommunityView all
config snmp engineID 800000ab03001cf0a89c86
create snmp view restricted 1.3.6.1.2.1.1 view_type included
create snmp view restricted 1.3.6.1.2.1.11 view_type included
create snmp view restricted 1.3.6.1.6.3.10.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.11.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.15.1.1 view_type included
create snmp view CommunityView 1 view_type included
create snmp view CommunityView 1.3.6.1.6.3 view_type excluded
create snmp view CommunityView 1.3.6.1.6.3.1 view_type included
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
config snmp coldstart_traps disable
config snmp warmstart_traps disable
enable snmp linkchange traps
# Firm
config configuration trap save disable
config configuration trap upload disable
config configuration trap download disable
# MANAGEMENT
disable snmp traps
disable snmp authenticate traps
config snmp system_name testsw1
disable rmon
# VLAN
disable asymmetric_vlan
config vlan default delete 1-26
config vlan default add forbidden 1-26
config vlan default advertisement disable
create vlan vl10.2.5 tag 55
config vlan vl10.2.5 add tagged 25-26
config vlan vl10.2.5 advertisement disable
create vlan vl10.12.123 tag 123
config vlan vl10.12.123 add tagged 25-26
config vlan vl10.12.123 add untagged 1-24
config vlan vl10.12.123 advertisement disable
disable gvrp
config gvrp 1-26 state disable ingress_checking enable acceptable_frame admit_all pvid 1
# FDB
config fdb aging_time 300
config multicast port_filtering_mode 1-26 filter_unregistered_groups
# LOOP_DETECT
enable loopdetect
config loopdetect recover_timer 60
config loopdetect interval 10
config loopdetect mode port-based
config loopdetect ports 1-24 state enabled
config loopdetect ports 25-26 state disabled
# MAC_ADDRESS_TABLE_NOTIFICATION
config mac_notification interval 1 historysize 1
disable mac_notification
config mac_notification ports 1-26 disable
# STP
config stp version rstp
config stp maxage 20 maxhops 20 forwarddelay 15 txholdcount 6 fbpdu enable
config stp priority 32768 instance_id 0
config stp hellotime 2
config stp mst_config_id name 00:1C:F0:A8:9C:86 revision_level 0
config stp trap new_root enable topo_change enable
config stp ports 25-26 state enable
config stp ports 1-24 state disable
enable stp
config stp ports 1-24 externalCost auto edge true p2p auto
config stp ports 1-24 fbpdu disable
config stp ports 1-24 restricted_role true
config stp ports 1-24 restricted_tcn true
config stp mst_ports 1-26 instance_id 0 internalCost auto priority 128
config stp ports 25-26 externalCost auto edge false p2p auto
config stp ports 25-26 fbpdu enable
config stp ports 25-26 restricted_role false
config stp ports 25-26 restricted_tcn false
# MULTI FILTER
config max_mcast_group vlanid 1,55,123 action drop
config max_mcast_group vlanid 1,55,123 max_group infinite
config max_mcast_group ports 1-26 action drop
config max_mcast_group ports 1-26 max_group infinite
# SSH
config ssh server maxsession 8
config ssh server contimeout 300
config ssh server authfail 2
config ssh server rekey never
config ssh server port 22
disable ssh
config ssh user admin authmode password
config ssh user support authmode password
# SSL
disable ssl
enable ssl ciphersuite RSA_with_RC4_128_MD5
enable ssl ciphersuite RSA_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite DHE_DSS_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite RSA_EXPORT_with_RC4_40_MD5
config ssl cachetimeout timeout 600
# DNS_RESOLVER
disable dns_resolver
config name_server timeout 3
# SAFE_GUARD
config safeguard_engine state disable cpu_utilization rising_threshold 90 falling_threshold 50 trap_log disable
# TIMERANGE
# security_ACL
config address_binding ip_mac ports 1-24 state enable
enable dhcp_relay
enable address_binding dhcp_snoop
disable address_binding acl_mode
disable dhcp_local_relay
config pppoe circuit_id_insertion state disable
disable address_binding arp_inspection
# ACL
disable cpu_interface_filtering
# IPBIND
config address_binding ip_mac ports 1-24 allow_zeroip enable
config address_binding ip_mac ports 25-26 forward_dhcppkt disable
disable address_binding trap_log
config address_binding dhcp_snoop max_entry ports 1-26 limit 5
config address_binding ip_mac ports 1-24 stop_learning_threshlod 5
# FILTER
# PPPoE_Circuit_ID_Insertion
config pppoe circuit_id_insertion ports 1-26 state disable circuit_id ip
# ROUTE
create iproute default 10.90.90.91 1
# SNOOP
enable igmp_snooping
create igmp_snooping multicast_vlan iptv 3005
config igmp_snooping multicast_vlan iptv state enable replace_source_ip 172.26.5.251 member_port 1-24 source_port 25-26
config igmp_snooping iptv host_timeout 260 router_timeout 260 leave_timer 2 state enable
config igmp_snooping querier iptv query_interval 125 max_response_time 10 robustness_variable 2
config igmp_snooping querier iptv last_member_query_interval 1 state disable
config router_ports iptv add 25-26
config limited_multicast_addr ports 1-26 access permit state disable
config igmp access_authentication ports 1-26 state disable
# LACP
config link_aggregation algorithm mac_source
config lacp_port 1-26 mode passive
# GVLAN
# IP
config ipif System vlan vl10.2.5 ipaddress 10.90.90.90/24 state enable
disable autoconfig
config autoconfig timeout 50
config ipif System dhcp_option12 state disable
# ARP
config arp_aging time 1200
config gratuitous_arp send ipif_status_up enable
config gratuitous_arp send dup_ip_detected enable
config gratuitous_arp learning enable
# LLDP
disable lldp
config lldp message_tx_interval 30
config lldp tx_delay 2
config lldp message_tx_hold_multiplier 4
config lldp reinit_delay 2
config lldp notification_interval 5
config lldp ports 1-26 notification disable
config lldp ports 1-26 admin_status tx_and_rx
# ACCESS_AUTHENTICATION_CONTROL
config authen_login default method local
config authen_enable default method local_enable
config authen application console login default
config authen application console enable default
config authen application telnet login default
config authen application telnet enable default
config authen application ssh login default
config authen application ssh enable default
config authen application http login default
config authen application http enable default
config authen parameter response_timeout 0
config authen parameter attempt 3
config authen enable_admin all state enable
config authen enable_operator all state enable
disable authen_policy
config admin local_enable
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
config operator local_enable
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
# DHCP_RELAY
config dhcp_relay hops 4 time 0
config dhcp_relay option_82 state enable
config dhcp_relay option_82 check disable
config dhcp_relay option_82 policy replace
config dhcp_relay option_82 remote_id default
config dhcp_relay option_60 state disable
config dhcp_relay option_60 default mode drop
config dhcp_relay option_61 state disable
config dhcp_relay option_61 default drop
config dhcp_relay add ipif System 10.90.90.55
# DHCP_LOCAL_RELAY
config dhcp_local_relay option_82 remote_id default
config dhcp_local_relay option_82 ports 1-26 policy keep
#-------------------------------------------------------------------
# End of configuration file for DES-3526
#-------------------------------------------------------------------
2. Командой "download cfg_fromTFTP ip_address filename" загружаем на этот же коммутатор
только что выгруженную конфигурацию.
3. Повторяем пункт 1 с заменой имени выгружаемого файла.
#-------------------------------------------------------------------
# DES-3526 Configuration
#
# Firmware: Build 6.20.B18
# Copyright(C) 2011 D-Link Corporation. All rights reserved.
#-------------------------------------------------------------------
# BASIC
config serial_port baud_rate 9600 auto_logout 10_minutes
enable telnet 23
disable web
config terminal_line default
enable clipaging
debug error_log auto_reboot enabled
disable broadcast_ping_reply
# ACCOUNT LIST
create account admin admin encrypt sha_1 *@&Q9vhQtp1qUvJX/+KSSZ6hckw6Mf6CO1j
create account operator support encrypt sha_1 *@&PX/NSngYQAUqUetLqEyAy53gDH8mFoXk
# PASSWORD ENCRYPTION
enable password encryption
# COMMAND LOGGING
enable command logging
# PASSWORD RECOVERY
enable password_recovery
# BNR
config command_prompt testsw1_DES-3526
# STORM
config traffic control_trap none
config traffic control 1-5 broadcast disable multicast disable unicast disable action drop threshold 128000
# GM
config sim candidate
disable sim
config sim dp_interval 30
config sim hold_time 100
# SYSLOG
enable syslog
config system_severity trap information
config system_severity log information
create syslog host 1 ipaddress 10.90.90.95 severity all facility local5 udp_port 514 state enable
# QOS
config scheduling 0 max_packet 0 max_latency 0
config scheduling 1 max_packet 0 max_latency 0
config scheduling 2 max_packet 0 max_latency 0
config scheduling 3 max_packet 0 max_latency 0
config 802.1p user_priority 0 1
config 802.1p user_priority 1 0
config 802.1p user_priority 2 0
config 802.1p user_priority 3 1
config 802.1p user_priority 4 2
config 802.1p user_priority 5 2
config 802.1p user_priority 6 3
config 802.1p user_priority 7 3
config 802.1p default_priority 1-26 0
config bandwidth_control 1-26 rx_rate no_limit tx_rate no_limit
# MIRROR
disable mirror
# TRAF-SEGMENTATION
config traffic_segmentation 1-26 forward_list 1-26
# PORT
config ports 1-24 speed auto flow_control disable mdix auto learning enable state enable trap enable
config ports 25-26 medium_type copper speed auto flow_control disable mdix auto learning enable state enable trap enable
config ports 25-26 medium_type fiber speed auto flow_control disable learning enable state enable trap enable
# DDM
config ddm trap disable
config ddm log enable
config ddm ports 25-26 state enable
config ddm ports 25-26 shutdown none
# PORT_LOCK
disable port_security trap_log
config port_security ports 1-26 admin_state disable max_learning_addr 1 lock_address_mode DeleteOnReset
# 8021X
disable 802.1x
config 802.1x auth_protocol radius_eap
config radius parameter timeout 5 retransmit 2
config 802.1x capability ports 1-26 none
config 802.1x auth_parameter ports 1-26 direction both port_control auto quiet_period 60 tx_period 30 supp_timeout 30 server_timeout 30 max_req 2 reauth_period 3600 enable_reauth disable
# SNMPv3
delete snmp community public
delete snmp community private
delete snmp user initial
delete snmp group initial
delete snmp group ReadGroup
delete snmp group WriteGroup
delete snmp view restricted all
delete snmp view CommunityView all
config snmp engineID 800000ab03001cf0a89c86
create snmp view restricted 1.3.6.1.2.1.1 view_type included
create snmp view restricted 1.3.6.1.2.1.11 view_type included
create snmp view restricted 1.3.6.1.6.3.10.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.11.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.15.1.1 view_type included
create snmp view CommunityView 1 view_type included
create snmp view CommunityView 1.3.6.1.6.3 view_type excluded
create snmp view CommunityView 1.3.6.1.6.3.1 view_type included
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
config snmp coldstart_traps disable
config snmp warmstart_traps disable
enable snmp linkchange traps
# Firm
config configuration trap save disable
config configuration trap upload disable
config configuration trap download disable
# MANAGEMENT
disable snmp traps
disable snmp authenticate traps
config snmp system_name testsw1
disable rmon
# VLAN
disable asymmetric_vlan
config vlan default delete 1-26
config vlan default add forbidden 1-26
config vlan default advertisement disable
create vlan vl10.2.5 tag 55
config vlan vl10.2.5 add tagged 25-26
config vlan vl10.2.5 advertisement disable
create vlan vl10.12.123 tag 123
config vlan vl10.12.123 add tagged 25-26
config vlan vl10.12.123 add untagged 1-24
config vlan vl10.12.123 advertisement disable
disable gvrp
config gvrp 1-26 state disable ingress_checking enable acceptable_frame admit_all pvid 1
# FDB
config fdb aging_time 300
config multicast port_filtering_mode 1-26 filter_unregistered_groups
# LOOP_DETECT
enable loopdetect
config loopdetect recover_timer 60
config loopdetect interval 10
config loopdetect mode port-based
config loopdetect ports 1-24 state enabled
config loopdetect ports 25-26 state disabled
# MAC_ADDRESS_TABLE_NOTIFICATION
config mac_notification interval 1 historysize 1
disable mac_notification
config mac_notification ports 1-26 disable
# STP
config stp version rstp
config stp maxage 20 maxhops 20 forwarddelay 15 txholdcount 6 fbpdu enable
config stp priority 32768 instance_id 0
config stp hellotime 2
config stp mst_config_id name 00:1C:F0:A8:9C:86 revision_level 0
config stp trap new_root enable topo_change enable
config stp ports 25-26 state enable
config stp ports 1-24 state disable
enable stp
config stp ports 1-24 externalCost auto edge true p2p auto
config stp ports 1-24 fbpdu disable
config stp ports 1-24 restricted_role true
config stp ports 1-24 restricted_tcn true
config stp mst_ports 1-26 instance_id 0 internalCost auto priority 128
config stp ports 25-26 externalCost auto edge false p2p auto
config stp ports 25-26 fbpdu enable
config stp ports 25-26 restricted_role false
config stp ports 25-26 restricted_tcn false
# MULTI FILTER
config max_mcast_group vlanid 1,55,123 action drop
config max_mcast_group vlanid 1,55,123 max_group infinite
config max_mcast_group ports 1-26 action drop
config max_mcast_group ports 1-26 max_group infinite
# SSH
config ssh server maxsession 8
config ssh server contimeout 300
config ssh server authfail 2
config ssh server rekey never
config ssh server port 22
disable ssh
config ssh user admin authmode password
config ssh user support authmode password
# SSL
disable ssl
enable ssl ciphersuite RSA_with_RC4_128_MD5
enable ssl ciphersuite RSA_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite DHE_DSS_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite RSA_EXPORT_with_RC4_40_MD5
config ssl cachetimeout timeout 600
# DNS_RESOLVER
disable dns_resolver
config name_server timeout 3
# SAFE_GUARD
config safeguard_engine state disable cpu_utilization rising_threshold 90 falling_threshold 50 trap_log disable
# TIMERANGE
# security_ACL
config address_binding ip_mac ports 1-24 state enable
enable dhcp_relay
enable address_binding dhcp_snoop
disable address_binding acl_mode
disable dhcp_local_relay
config pppoe circuit_id_insertion state disable
disable address_binding arp_inspection
# ACL
disable cpu_interface_filtering
# IPBIND
config address_binding ip_mac ports 1-24 allow_zeroip enable
config address_binding ip_mac ports 25-26 forward_dhcppkt disable
disable address_binding trap_log
config address_binding dhcp_snoop max_entry ports 1-26 limit 5
config address_binding ip_mac ports 1-24 stop_learning_threshlod 5
# FILTER
# PPPoE_Circuit_ID_Insertion
config pppoe circuit_id_insertion ports 1-26 state disable circuit_id ip
# ROUTE
create iproute default 10.90.90.91 1
# SNOOP
enable igmp_snooping
create igmp_snooping multicast_vlan iptv 3005
config igmp_snooping multicast_vlan iptv state enable replace_source_ip 172.26.5.251 member_port 1-24 source_port 25-26
config igmp_snooping iptv host_timeout 260 router_timeout 260 leave_timer 2 state enable
config igmp_snooping querier iptv query_interval 125 max_response_time 10 robustness_variable 2
config igmp_snooping querier iptv last_member_query_interval 1 state disable
config router_ports iptv add 25-26
config limited_multicast_addr ports 1-26 access permit state disable
config igmp access_authentication ports 1-26 state disable
# LACP
config link_aggregation algorithm mac_source
config lacp_port 1-26 mode passive
# GVLAN
# IP
config ipif System vlan vl10.2.5 ipaddress 10.90.90.90/24 state enable
disable autoconfig
config autoconfig timeout 50
config ipif System dhcp_option12 state disable
# ARP
config arp_aging time 1200
config gratuitous_arp send ipif_status_up enable
config gratuitous_arp send dup_ip_detected enable
config gratuitous_arp learning enable
# LLDP
disable lldp
config lldp message_tx_interval 30
config lldp tx_delay 2
config lldp message_tx_hold_multiplier 4
config lldp reinit_delay 2
config lldp notification_interval 5
config lldp ports 1-26 notification disable
config lldp ports 1-26 admin_status tx_and_rx
# ACCESS_AUTHENTICATION_CONTROL
config authen_login default method local
config authen_enable default method local_enable
config authen application console login default
config authen application console enable default
config authen application telnet login default
config authen application telnet enable default
config authen application ssh login default
config authen application ssh enable default
config authen application http login default
config authen application http enable default
config authen parameter response_timeout 0
config authen parameter attempt 3
config authen enable_admin all state enable
config authen enable_operator all state enable
disable authen_policy
config admin local_enable
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
config operator local_enable
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
*@&2jmj7l5rSw0yVb/vlWAYkK/YBwmwMs6D
# DHCP_RELAY
config dhcp_relay hops 4 time 0
config dhcp_relay option_82 state disable
config dhcp_relay option_82 check disable
config dhcp_relay option_82 policy replace
config dhcp_relay option_82 remote_id default
config dhcp_relay option_60 state disable
config dhcp_relay option_60 default mode drop
config dhcp_relay option_61 state disable
config dhcp_relay option_61 default drop
# DHCP_LOCAL_RELAY
config dhcp_local_relay option_82 remote_id default
config dhcp_local_relay option_82 ports 1-26 policy keep
#-------------------------------------------------------------------
# End of configuration file for DES-3526
#-------------------------------------------------------------------
4. Сравниваем файлы полученные в первом и третьем пункте.
localhost tftp # diff 1.cfg 3.cfg
366c366
< config dhcp_relay option_82 state enable
---
> config dhcp_relay option_82 state disable
374d373
< config dhcp_relay add ipif System 10.90.90.55
Как видно, при загрузке конфигурации не происходит включения "dhcp_relay option_82" и не задаётся ip DHCP-сервера. Опытным путём было выяснено, что если переместить разделы #ROUTE и # IP в конец конфигурационного файла, то загрузка конфигурации происходит без проблем. Получается, что без танцев с бубном восстанавливать рабочие конфигурации из, например, бэкапов несколько затруднительно.
Возможно ли как-то решить данную проблему?
Также замечено что три команды: "disable greeting_message", "enable command logging", "config command_history 40" невозможно выгрузить в конфигурационный файл. Это баг или фича?
И ещё - не сочтите за занудство, но почему во всех командах включения/выключения различного функционала пишется "enable/disable", в то время как, в двух случаях используется
d в конце слова: "debug error_log auto_reboot enable
d/disable
d" и "config loopdetect ports all state enable
d/disable
d"?
Спасибо.