配置文档:3COM 4200 3C17300A配置文件,可与WAYOS、ROS、海蜘蛛多WAN对接

近期老是有网友在网上问我,3COM交换机如何配置,由于问得多了,我估计这个交换机性价比较高,而且手上刚好有一款3COM 4200 3C17300A,所以我特将他的配置代码保存下来给大家使用!

使用方法:

1、请将下面的代码保存到一个文件里面:如3comvlan

2、用COM线进入3COm配置

3、点restore命令,还原这个文件到交换机,重启后即可

配置文件说明:

1、恢复后,IP为192.168.1.254,可通过Telnet来连接

2、恢复后,用户名为admin,密码admin或者空,忘记了

3、恢复后,1-25口分别为vlan 1-25,26口接WAYOS、HZZ、ROS的WAN口网卡

下面的这个交换机图片,其他的可以大同小异:

请将下面的代码复制到文件,下面开始到结束,所有代码都是:

#<header>3Com_DEVICE</header>
#<key>3C17300M1:</key>
#<version>1</version>
#<description>IP address 192.168.1.254, 3Com SuperStack 3, lome-vlan</description>
#<usernotes></usernotes>
#<mode>ERROR_CHECK_ON</mode>

#
# WARNING: This file is automatically generated and follows specific
# command ordering rules.  Users may add or alter commands in this file
# but must do so with caution as it may affect the ability to restore the
# configuration of the device.
#
# The following items are not automatically saved by the system to avoid
# breaches of security and to avoid disconnection during restore
# operations:-
# - User details (including Password, SSH keys*, SNMP community strings)
# - Device management IP address and VLAN*
# - SSH user authentication method*
# - RADIUS Shared Secret*
# - RIP password*
# - OSPF password*
#  (* applicable to certain products only)
#
# If commands to configure these items are to be added please add them to
# the end of the file.
#

#--------------------------------------------------------------
#  PRODUCT  INFORMATION  SECTION
#--------------------------------------------------------------
# Unit Number  : 1
# Description  : Switch 4200
# Product Number : 3C17300A
# MAC Address  : 00:1a:c1:b9:bc:20
# Serial Number  : L3ZV8LKB9BC20
# Software Version : 3.00
# Hardware Version : 04.01.01
#

#--------------------------------------------------------------
#  FEATURE SAFE BACKUP  SECTION
#--------------------------------------------------------------
bridge spanningTree stpState enable
bridge port lacpState 1:25-1:26 disable
bridge linkAggregation modify partnerID 1 0x8000 none
bridge linkAggregation modify partnerID 2 0x8000 none
bridge linkAggregation modify partnerID 3 0x8000 none
bridge linkAggregation modify partnerID 4 0x8000 none

#--------------------------------------------------------------
#  BRIDGE  PORT  SECTION
#--------------------------------------------------------------
bridge port stpCost 1:1-1:26,AL1-AL4 auto
bridge port linkTrap 1:1-1:26 enable
bridge port linkTrap AL1-AL4 disable
bridge port stpFastStart 1:1-1:24 auto
bridge port stpFastStart 1:25-1:26 disable
bridge port stpFastStart AL1-AL4 disable

#--------------------------------------------------------------
#  PHYSICALINTERFACE  ETHERNET  SECTION
#--------------------------------------------------------------
physicalInterface ethernet flowControl 1:1-1:26 on
physicalInterface ethernet portMode 1:1-1:26 enable 100half
physicalInterface ethernet portState 1:1-1:26 enable
physicalInterface ethernet smartAutoSense enable

#--------------------------------------------------------------
#  BRIDGE  VLAN  SECTION
#--------------------------------------------------------------
bridge vlan create 2 "VLAN 2"
bridge vlan create 3 "VLAN 3"
bridge vlan create 4 "VLAN 4"
bridge vlan create 5 "VLAN 5"
bridge vlan create 6 "VLAN 6"
bridge vlan create 7 "VLAN 7"
bridge vlan create 8 "VLAN 8"
bridge vlan create 9 "VLAN 9"
bridge vlan create 10 "VLAN 10"
bridge vlan create 11 "VLAN 11"
bridge vlan create 12 "VLAN 12"
bridge vlan create 13 "VLAN 13"
bridge vlan create 14 "VLAN 14"
bridge vlan create 15 "VLAN 15"
bridge vlan create 16 "VLAN 16"
bridge vlan create 17 "VLAN 17"
bridge vlan create 18 "VLAN 18"
bridge vlan create 19 "VLAN 19"
bridge vlan create 20 "VLAN 20"
bridge vlan create 21 "VLAN 21"
bridge vlan create 22 "VLAN 22"
bridge vlan create 23 "VLAN 23"
bridge vlan create 24 "VLAN 24"
bridge vlan create 25 "VLAN 25"
bridge vlan create 26 "VLAN 26"

#--------------------------------------------------------------
#  BRIDGE VLAN MODIFY  SECTION
#--------------------------------------------------------------
bridge vlan modify removePort 1 1:2-1:25
bridge vlan modify addPort 1 1:26 tagged
bridge vlan modify addPort 2 1:2 untagged
bridge vlan modify addPort 2 1:26 tagged
bridge vlan modify addPort 3 1:3 untagged
bridge vlan modify addPort 3 1:26 tagged
bridge vlan modify addPort 4 1:4 untagged
bridge vlan modify addPort 4 1:26 tagged
bridge vlan modify addPort 5 1:5 untagged
bridge vlan modify addPort 5 1:26 tagged
bridge vlan modify addPort 6 1:6 untagged
bridge vlan modify addPort 6 1:26 tagged
bridge vlan modify addPort 7 1:7 untagged
bridge vlan modify addPort 7 1:26 tagged
bridge vlan modify addPort 8 1:8 untagged
bridge vlan modify addPort 8 1:26 tagged
bridge vlan modify addPort 9 1:9 untagged
bridge vlan modify addPort 9 1:26 tagged
bridge vlan modify addPort 10 1:10 untagged
bridge vlan modify addPort 10 1:26 tagged
bridge vlan modify addPort 11 1:11 untagged
bridge vlan modify addPort 11 1:26 tagged
bridge vlan modify addPort 12 1:12 untagged
bridge vlan modify addPort 12 1:26 tagged
bridge vlan modify addPort 13 1:13 untagged
bridge vlan modify addPort 13 1:26 tagged
bridge vlan modify addPort 14 1:14 untagged
bridge vlan modify addPort 14 1:26 tagged
bridge vlan modify addPort 15 1:15 untagged
bridge vlan modify addPort 15 1:26 tagged
bridge vlan modify addPort 16 1:16 untagged
bridge vlan modify addPort 16 1:26 tagged
bridge vlan modify addPort 17 1:17 untagged
bridge vlan modify addPort 17 1:26 tagged
bridge vlan modify addPort 18 1:18 untagged
bridge vlan modify addPort 18 1:26 tagged
bridge vlan modify addPort 19 1:19 untagged
bridge vlan modify addPort 19 1:26 tagged
bridge vlan modify addPort 20 1:20 untagged
bridge vlan modify addPort 20 1:26 tagged
bridge vlan modify addPort 21 1:21 untagged
bridge vlan modify addPort 21 1:26 tagged
bridge vlan modify addPort 22 1:22 untagged
bridge vlan modify addPort 22 1:26 tagged
bridge vlan modify addPort 23 1:23 untagged
bridge vlan modify addPort 23 1:26 tagged
bridge vlan modify addPort 24 1:24 untagged
bridge vlan modify addPort 24 1:26 tagged
bridge vlan modify addPort 25 1:25 tagged

#--------------------------------------------------------------
#  BRIDGE  ADDRESSDATABASE  SECTION
#--------------------------------------------------------------
bridge addressDatabase agingTime 300

#--------------------------------------------------------------
#  BRIDGE  LINKAGGREGATION  SECTION
#--------------------------------------------------------------
bridge linkAggregation modify linkState 1 enable
bridge linkAggregation modify linkState 2 enable
bridge linkAggregation modify linkState 3 enable
bridge linkAggregation modify linkState 4 enable
bridge port lacpState 1:25-1:26 disable

#--------------------------------------------------------------
#  BRIDGE  SPANNINGTREE  SECTION
#--------------------------------------------------------------
bridge spanningTree stpVersion 2
bridge spanningTree stpDefaultPathCost 1
bridge spanningTree stpPriority 32768
bridge spanningTree stpHelloTime 2
bridge spanningTree stpMaxAge 20
bridge spanningTree stpForwardDelay 15
bridge spanningTree stpState enable

#--------------------------------------------------------------
#  BRIDGE  MULITICASTFILTER  IGMP  SECTION
#--------------------------------------------------------------
bridge multicastFilter igmp queryMode disable
bridge multicastFilter igmp snoopMode disable
bridge multicastFilter igmp modify fastLeave disable

#--------------------------------------------------------------
#  BRIDGE  MULTICASTFILTER  ROUTERPORT  SECTION
#--------------------------------------------------------------
bridge multicastFilter routerPort autoDiscovery enable

#--------------------------------------------------------------
#  BRIDGE  BROADCASTSTORMCONTROL  SECTION
#--------------------------------------------------------------
bridge broadcastStormCtrl disable

#--------------------------------------------------------------
#  PROTOCOL  IP  INTERFACE  SECTION
#--------------------------------------------------------------

#--------------------------------------------------------------
#  PROTOCOL  IP  ROUTE  SECTION
#--------------------------------------------------------------

#--------------------------------------------------------------
#  SECURITY  RADIUS  SECTION
#--------------------------------------------------------------
security radius authentication modify 0.0.0.0 1812 0.0.0.0 1812
security radius accounting modify 0.0.0.0 1813 0.0.0.0 1813 reject
security radius retries 4 2
security radius pollTime 120

#--------------------------------------------------------------
#  SECURITY  DEVICE  ACCESS  SECTION
#--------------------------------------------------------------
security device access modify monitor enable enable enable enable
security device access modify manager enable enable enable enable
security device access modify security enable enable enable enable
#--------------------------------------------------------------
#  SECURITY  DEVICE  USER  SECTION
#--------------------------------------------------------------

#--------------------------------------------------------------
#  SECURITY NETWORK ACCESS  SECTION
#--------------------------------------------------------------
security network access systemMode enable
security network access portSecurity 1:1-1:26 noSecurity   1   noAction 

#--------------------------------------------------------------
#  SECURITY NETWORK ACCESS SECUREADDRESSES  SECTION
#--------------------------------------------------------------
security network access secureAddresses remove 1:1 all
security network access secureAddresses remove 1:2 all
security network access secureAddresses remove 1:3 all
security network access secureAddresses remove 1:4 all
security network access secureAddresses remove 1:5 all
security network access secureAddresses remove 1:6 all
security network access secureAddresses remove 1:7 all
security network access secureAddresses remove 1:8 all
security network access secureAddresses remove 1:9 all
security network access secureAddresses remove 1:10 all
security network access secureAddresses remove 1:11 all
security network access secureAddresses remove 1:12 all
security network access secureAddresses remove 1:13 all
security network access secureAddresses remove 1:14 all
security network access secureAddresses remove 1:15 all
security network access secureAddresses remove 1:16 all
security network access secureAddresses remove 1:17 all
security network access secureAddresses remove 1:18 all
security network access secureAddresses remove 1:19 all
security network access secureAddresses remove 1:20 all
security network access secureAddresses remove 1:21 all
security network access secureAddresses remove 1:22 all
security network access secureAddresses remove 1:23 all
security network access secureAddresses remove 1:24 all
security network access secureAddresses remove 1:25 all
security network access secureAddresses remove 1:26 all

#--------------------------------------------------------------
#  SYSTEM  MANAGEMENT  SECTION
#--------------------------------------------------------------
system management name "lome-vlan"
system management location ""
system management contact ""
system management remoteAccess enable

#--------------------------------------------------------------
#  SYSTEM  MANAGEMENT  SNMP  TRAP  SECTION
#--------------------------------------------------------------

#--------------------------------------------------------------
#  SYSTEM  MANAGEMENT  ALERT  SECTION
#--------------------------------------------------------------

#--------------------------------------------------------------
#  SYSTEM MANAGEMENT MONITOR  SECTION
#--------------------------------------------------------------
system management monitor modify systemDevice off none none
system management monitor modify port 1:1-1:26 off none none

#--------------------------------------------------------------
#  TRAFFICMANAGEMENT  QOS  CLASSIFIER  SECTION
#--------------------------------------------------------------
trafficManagement qos classifier modify 3 "3Com NBX Voice-IP"  46
trafficManagement qos classifier modify 7 "Internetwork Control"  48
trafficManagement qos classifier modify 8 "Network Control"  56

#--------------------------------------------------------------
#  TRAFFICMANAGEMENT QOS PROFILE  SECTION
#--------------------------------------------------------------
trafficManagement qos profile modify 1 "No Classifiers"
trafficManagement qos profile modify 2 "Default"
trafficManagement qos profile addClassifier 2 3 5
trafficManagement qos profile addClassifier 2 7 6
trafficManagement qos profile addClassifier 2 8 7
trafficManagement qos profile assign 1:1-1:26 2
trafficManagement qos trafficQueue holProtection QOS yes

#
# End of automatically generated configuration.
# You can enter further commands, if they are supported on the product, after these comments:
#
# Note: If you restore RADIUS configuration you can add the shared secret below.
#       You can also change the authentication mode to RADIUS with the following
#       command:
#  security device authentication systemMode RADIUS yes yes
#
# Examples:
#  physical ethernet portCapabilities 1:1 10h
#  protocol ip basicConfig manual 10.16.25.26 255.255.255.0 10.16.25.250
#  protocol ip rip authentication 10.16.25.32 password "my rip password" "my rip password"
#  security device user create "my name" monitor "my password" "my password" "my community"
#  security device user modify admin "secret" "secret" "private"
#  security radius sharedSecret "this is my shared secret"
#  system management snmp community "private" "manager" "public"

#----------------- End of configuration file ------------------

原文地址:https://www.cnblogs.com/lome/p/2161990.html