ibm 刀片 BladeCenter H22 背板交换机链路聚合配置bnt和nt

折腾了几天,刀片终于上架了,开始了网络配置,通过管理口登录管理刀箱,但开始配置,之前从来没有碰过刀片,居然以为插上电简单配置一下就可以通了,谁知道一个刀箱上居然有两个交换机需要配置,到ibm官方网站上去查,居然有3个牌子的手册,据说是找cisco、北电、博科三家厂商oem的,我都不知道看那个,全部下载下来研究吧。

最后发现这个应该是北电的,好像是博科把北电收购了,上面的标貌似博科。哈哈,看的差不多了就开始配置了(当然有高手在,我自己的话估计够呛)。

由于项目需求,需要把带万兆光口的交换机(ibm 刀箱背板上的交换机)和博科 rx-16做爽端口绑定,就是我们常说的链路聚合(目的当然是冗余和加大带宽)。当然在配置中遇到了不少问题,2天之中从博科交换机到ibm交换机,再到ibm刀箱背板交换机。都是以前没用过的。

bnt用于计算网络

nt用于管理网

我们需要把背板上的bnt交换机的两个万兆口做聚合与博客交换机的连接,当然博客交换机上也是配置聚合,nt交换机就比较简单了,把tag标签去掉。纯2层模式就可以了。

一、配置前检查

bnt进入交换机

进交换机之前先检查交换机是否是干净的状态。
info进 入主菜单输入info,这里面是查看信息的地方
首先检查port
然后检查lacp 动态聚合
可以检查vlan
如果有可以删除,之后才继续安装。

二、配置

1、取消tag标签
cfg进入配置模式
port 1-14 (不能批量,只能一个一个的敲)
tag d把tag改为untag模式(与cisco的trunk到access类似,但是cisco默认为access口)

apply
info
port

2、配置trunk
cfg
trunk
ena
选择 1
add ext1
add ext2 将口放入trunk
apply
diff

nt交换机配置用步骤1就修改为纯2层模式了

下面为具体是配置:

>> Main# info
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# port
Alias Port Tag Fast Lrn Fld PVID NAME VLAN(s)
----- ---- --- ---- --- ---- -------------- -------------------------------
INT1 1 y n e e 1 INT1 1 4095
INT2 2 y n e e 1 INT2 1 4095
INT3 3 y n e e 1 INT3 1 4095
INT4 4 y n e e 1 INT4 1 4095
INT5 5 y n e e 1 INT5 1 4095
INT6 6 y n e e 1 INT6 1 4095
INT7 7 y n e e 1 INT7 1 4095
INT8 8 y n e e 1 INT8 1 4095
INT9 9 y n e e 1 INT9 1 4095
INT10 10 y n e e 1 INT10 1 4095
INT11 11 y n e e 1 INT11 1 4095
INT12 12 y n e e 1 INT12 1 4095
INT13 13 y n e e 1 INT13 1 4095
INT14 14 y n e e 1 INT14 1 4095
MGT1 15 y n e e 4095*MGT1 4095
MGT2 16 y n e e 4095*MGT2 4095
EXT1 17 n n e e 1 EXT1 1
EXT2 18 n n e e 1 EXT2 1
EXT3 19 n n e e 1 EXT3 1
EXT4 20 n n e e 1 EXT4 1
EXT5 21 n n e e 1 EXT5 1
EXT6 22 n n e e 1 EXT6 1
EXT7 23 n n e e 1 EXT7 1
EXT8 24 n n e e 1 EXT8 1
EXT9 25 n n e e 1 EXT9 1
* = PVID is tagged.

>> Information# ls
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# l2
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# lacp
------------------------------------------------------------
[LACP Menu]
aggr - Show LACP aggregator information for the port
port - Show LACP port information
dump - Show all LACP ports information

>> LACP# dump
port lacp adminkey operkey selected prio attached trunk
aggr
----------------------------------------------------------------------------
INT1 off 1 1 no 32768 -- --
INT2 off 2 2 no 32768 -- --
INT3 off 3 3 no 32768 -- --
INT4 off 4 4 no 32768 -- --
INT5 off 5 5 no 32768 -- --
INT6 off 6 6 no 32768 -- --
INT7 off 7 7 no 32768 -- --
INT8 off 8 8 no 32768 -- --
INT9 off 9 9 no 32768 -- --
INT10 off 10 10 no 32768 -- --
INT11 off 11 11 no 32768 -- --
INT12 off 12 12 no 32768 -- --
INT13 off 13 13 no 32768 -- --
INT14 off 14 14 no 32768 -- --
EXT1 off 17 17 no 32768 -- --
EXT2 off 18 18 no 32768 -- --
EXT3 off 19 19 no 32768 -- --
EXT4 off 20 20 no 32768 -- --
EXT5 off 21 21 no 32768 -- --
EXT6 off 22 22 no 32768 -- --
EXT7 off 23 23 no 32768 -- --
EXT8 off 24 24 no 32768 -- --
EXT9 off 25 25 no 32768 -- --

>> LACP# cd ..
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# ls
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# cd ..
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# l2
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# vlan
VLAN Name Status Ports
---- -------------------------------- ------ -------------------------
1 Default VLAN ena INT1-INT14 EXT1-EXT9
4095 Mgmt VLAN ena INT1-INT14 MGT1 MGT2

>> Layer 2# lacp
------------------------------------------------------------
[LACP Menu]
aggr - Show LACP aggregator information for the port
port - Show LACP port information
dump - Show all LACP ports information

>> LACP# port
Usage: port <port INT1-14,EXT1-9>

>> LACP# cd ..
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information


>> Layer 2# cd /
------------------------------------------------------------
[Main Menu]
info - Information Menu
stats - Statistics Menu
cfg - Configuration Menu
oper - Operations Command Menu
boot - Boot Options Menu
maint - Maintenance Menu
diff - Show pending config changes [global command]
apply - Apply pending config changes [global command]
save - Save updated config to FLASH [global command]
revert - Revert pending or applied changes [global command]
exit - Exit [global command,always available]

>> Main# cfg
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port
Enter port (INT1-14,MGT1-2,EXT1-9): 1
------------------------------------------------------------
[Port INT1 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT1# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT1 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT1# apply
------------------------------------------------------------------
Apply complete; don't forget to "save" updated configuration.

>>
Jan 2 8:47:54 170.120.116.224 INFO mgmt: new configuration applied
Port INT1# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 2
------------------------------------------------------------
[Port INT2 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT2# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT2 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT2# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 3
------------------------------------------------------------
[Port INT3 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT3# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT3 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT3# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 4
------------------------------------------------------------
[Port INT4 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT4# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT4 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT4# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 5
------------------------------------------------------------
[Port INT5 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT5# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT5 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT5# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 6
------------------------------------------------------------
[Port INT6 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT6# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT6 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT6# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 7
------------------------------------------------------------
[Port INT7 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT7# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT7 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT7# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 8
------------------------------------------------------------
[Port INT8 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT8# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT8 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT8# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 9
------------------------------------------------------------
[Port INT9 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT9# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT9 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT9# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 10
------------------------------------------------------------
[Port INT10 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT10# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT10 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT10# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 11
------------------------------------------------------------
[Port INT11 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT11# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT11 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT11# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 12
------------------------------------------------------------
[Port INT12 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT12# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT12 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT12# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 13
------------------------------------------------------------
[Port INT13 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT13# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT13 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT13# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# port 14
------------------------------------------------------------
[Port INT14 Menu]
gig - Gig Phy Menu
aclqos - Acl/Qos Configuration Menu
8021ppri - Set default 802.1p priority
pvid - Set default port VLAN id
name - Set port name
dscpmrk - Enable/disable DSCP remarking for port
learn - Enable/Disable FDB Learning for port
tag - Enable/disable VLAN tagging for port
tagpvid - Enable/disable tagging on pvid
fastfwd - Enable/disable Port Fast Forwarding mode
floodblk - Enable/disable Port flood blocking
ena - Enable port
dis - Disable port
cur - Display current port configuration

>> Port INT14# tag d
Current VLAN tag support: enabled
New VLAN tag support: disabled
Port INT14 will be removed from all VLANs except its PVID.
Confirm removing this port from all VLANs [y/n]: y
TAG flag reset

>> Port INT14# apply
------------------------------------------------------------------
Apply complete; don't forget to "save" updated configuration.

>>
Jan 2 8:50:23 170.120.116.224 INFO mgmt: new configuration applied
Port INT14# save
Request will first copy the FLASH "active" config to "backup",
then overlay FLASH "active" with new config.
Confirm saving to FLASH [y/n]: y
New config successfully saved to FLASH.
Switch is currently set to use factory default config block on next boot.

Jan 2 8:50:39 170.120.116.224 INFO mgmt: new configuration saved from AOS
Confirm change that to the active config block [y/n]: y
Next boot will use active config block.

>>
Jan 2 8:50:47 170.120.116.224 NOTICE mgmt: boot config block changed
Port INT14# cd ..
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# cd ..
------------------------------------------------------------
[Main Menu]
info - Information Menu
stats - Statistics Menu
cfg - Configuration Menu
oper - Operations Command Menu
boot - Boot Options Menu
maint - Maintenance Menu
diff - Show pending config changes [global command]
apply - Apply pending config changes [global command]
save - Save updated config to FLASH [global command]
revert - Revert pending or applied changes [global command]
exit - Exit [global command,always available]

>> Main# info
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# port
Alias Port Tag Fast Lrn Fld PVID NAME VLAN(s)
----- ---- --- ---- --- ---- -------------- -------------------------------
INT1 1 n n e e 1 INT1 1
INT2 2 n n e e 1 INT2 1
INT3 3 n n e e 1 INT3 1
INT4 4 n n e e 1 INT4 1
INT5 5 n n e e 1 INT5 1
INT6 6 n n e e 1 INT6 1
INT7 7 n n e e 1 INT7 1
INT8 8 n n e e 1 INT8 1
INT9 9 n n e e 1 INT9 1
INT10 10 n n e e 1 INT10 1
INT11 11 n n e e 1 INT11 1
INT12 12 n n e e 1 INT12 1
INT13 13 n n e e 1 INT13 1
INT14 14 n n e e 1 INT14 1
MGT1 15 y n e e 4095*MGT1 4095
MGT2 16 y n e e 4095*MGT2 4095
EXT1 17 n n e e 1 EXT1 1
EXT2 18 n n e e 1 EXT2 1
EXT3 19 n n e e 1 EXT3 1
EXT4 20 n n e e 1 EXT4 1
EXT5 21 n n e e 1 EXT5 1
EXT6 22 n n e e 1 EXT6 1
EXT7 23 n n e e 1 EXT7 1
EXT8 24 n n e e 1 EXT8 1
EXT9 25 n n e e 1 EXT9 1
* = PVID is tagged.

>> Information# cd /
------------------------------------------------------------
[Main Menu]
info - Information Menu
stats - Statistics Menu
cfg - Configuration Menu
oper - Operations Command Menu
boot - Boot Options Menu
maint - Maintenance Menu
diff - Show pending config changes [global command]
apply - Apply pending config changes [global command]
save - Save updated config to FLASH [global command]
revert - Revert pending or applied changes [global command]
exit - Exit [global command,always available]

>> Main#
Jan 2 8:56:08 170.120.116.224 ALERT stg: Port EXT2,putting port into blocking state


>> Main# cfg
------------------------------------------------------------
[Configuration Menu]
sys - System-wide Parameter Menu
port - Port Menu
pmirr - Port Mirroring Menu
l2 - Layer 2 Menu
l3 - Layer 3 Menu
qos - QOS Menu
acl - Access Control List Menu
setup - Step by step configuration set up
dump - Dump current configuration to script file
ptcfg - Backup current configuration to FTP/TFTP server
gtcfg - Restore current configuration from FTP/TFTP server
cur - Display current configuration

>> Configuration# l2
------------------------------------------------------------
[Layer 2 Menu]
8021x - 802.1x Menu
mrst - Multiple Spanning Tree/Rapid Spanning Tree Menu
stg - Spanning Tree Menu
fdb - FDB Menu
trunk - Trunk Group Menu
thash - IP Trunk Hash Menu
lacp - Link Aggregation Control Protocol Menu
failovr - Failover Menu
vlan - VLAN Menu
pvstcomp - Enable/Disable PVST+ compatibility mode
bpdugrd - Enable/disable BPDU Guard
macnotif - Enable/disable MAC address notification
upfast - Enable/disable Uplink Fast
update - UplinkFast station update rate
cur - Display current layer 2 parameters

>> Layer 2# trunk/
Enter trunk group number: (1-16) 1
------------------------------------------------------------
[Trunk group 1 Menu]
add - Add port to trunk group
rem - Remove port from trunk group
ena - Enable trunk group
dis - Disable trunk group
del - Delete trunk group
cur - Display current Trunk Group configuration

>> Trunk group 1# add
Enter port (INT1-EXT9): ext1
Port EXT1 added.
Reminder: Trunk 1 needs to be enabled.

>> Trunk group 1# add ext2
Port EXT2 added.
Reminder: Trunk 1 needs to be enabled.

>> Trunk group 1# apply
------------------------------------------------------------------
Apply complete; don't forget to "save" updated configuration.

>>
Jan 2 8:57:46 170.120.116.224 INFO mgmt: new configuration applied
Trunk group 1# cd /
------------------------------------------------------------
[Main Menu]
info - Information Menu
stats - Statistics Menu
cfg - Configuration Menu
oper - Operations Command Menu
boot - Boot Options Menu
maint - Maintenance Menu
diff - Show pending config changes [global command]
apply - Apply pending config changes [global command]
save - Save updated config to FLASH [global command]
revert - Revert pending or applied changes [global command]
exit - Exit [global command,always available]

>> Main# info
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# l2
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# dump
------------------------------------------------------------------

upfast disabled,update 40

BPDU Guard disabled

Pvst+ compatibility mode enabled

------------------------------------------------------------------
Spanning Tree Group 1: On (STP/PVST+)
VLANs: 1

Current Root: Path-Cost Port Hello MaxAge FwdDel
ffff 34:40:b5:60:c5:00 2 EXT1 2 20 15

Parameters: Priority Hello MaxAge FwdDel Aging
65535 2 20 15 300

Port Priority Cost FastFwd State Designated Bridge Des Port
---- -------- ---- -------- ---------- --------------------- --------
INT1 0 0 n FORWARDING *
INT2 0 0 n FORWARDING *
INT3 0 0 n FORWARDING *
INT4 0 0 n FORWARDING *
INT5 0 0 n FORWARDING *
INT6 0 0 n FORWARDING *
INT7 0 0 n FORWARDING *
INT8 0 0 n FORWARDING *
INT9 0 0 n FORWARDING *
INT10 0 0 n FORWARDING *
INT11 0 0 n FORWARDING *
INT12 0 0 n FORWARDING *
INT13 0 0 n FORWARDING *
INT14 0 0 n FORWARDING *
EXT1 128 2 n FORWARDING ffff-34:40:b5:60:c5:00 8012
EXT2 128 2 n BLOCKING ffff-34:40:b5:6f:f4:00 8011
EXT3 128 2 n DISABLED
EXT4 128 0! n DISABLED
EXT5 128 0! n DISABLED
EXT6 128 0! n DISABLED
EXT7 128 0! n DISABLED
EXT8 128 0! n DISABLED
EXT9 128 0! n DISABLED
* = STP turned off for this port.
! = Automatic path cost.

------------------------------------------------------------------
Spanning Tree Group 128: On (STP/PVST+)
VLANs: 4095

Current Root: Path-Cost Port Hello MaxAge FwdDel
ffff 34:40:b5:70:62:00 0 2 20 15

Parameters: Priority Hello MaxAge FwdDel Aging
65535 2 20 15 300

Port Priority Cost FastFwd State Designated Bridge Des Port
---- -------- ---- -------- ---------- --------------------- --------
MGT1 0 0 n FORWARDING *
MGT2 0 0 n DISABLED *
* = STP turned off for this port.

VLAN Name Status Ports
---- -------------------------------- ------ -------------------------
1 Default VLAN ena INT1-INT14 EXT1-EXT9
4095 Mgmt VLAN ena MGT1 MGT2

Trunk group 1: Disabled
Reminder: Trunk group 1 needs to be enabled.
Protocol - Static
port state:
EXT1: STG 1 forwarding
EXT2: STG 1 BLOCKING


Current priority to COS queue information:
Priority COSq Weight
-------- ---- ------
0 0 1
1 0 1
2 0 1
3 0 1
4 1 2
5 1 2
6 1 2
7 1 2

Current port priority information:
Port Priority COSq Weight
----- -------- ---- ------
INT1 0 0 1
INT2 0 0 1
INT3 0 0 1
INT4 0 0 1
INT5 0 0 1
INT6 0 0 1
INT7 0 0 1
INT8 0 0 1
INT9 0 0 1
INT10 0 0 1
INT11 0 0 1
INT12 0 0 1
INT13 0 0 1
INT14 0 0 1
MGT1 0 0 1
MGT2 0 0 1
EXT1 0 0 1
EXT2 0 0 1
EXT3 0 0 1
EXT4 0 0 1
EXT5 0 0 1
EXT6 0 0 1
EXT7 0 0 1
EXT8 0 0 1
EXT9 0 0 1

Forwarding database information:
MAC address VLAN Port Trnk State Permanent
----------------- ---- ---- ---- ----- ---------
00:25:90:61:17:0f 1 EXT1 FWD
00:25:90:61:c8:75 1 EXT1 FWD
00:25:90:61:ca:85 1 EXT1 FWD
34:40:b5:60:c5:00 1 EXT1 FWD
34:40:b5:64:85:00 1 EXT1 FWD
5c:f3:fc:ef:5b:c7 4095 MGT1 FWD

802.1x Operational Info:
------------------------------------------------------------------
System capability : Authenticator
System status : disabled
Protocol version : 1
Guest VLAN status : disabled
Guest VLAN : none
Authenticator Backend
Port Auth Mode Auth Status PAE State Auth State
----- ------------ ------------ -------------- ----------
INT1 force-auth unauthorized initialize initialize
INT2 force-auth unauthorized initialize initialize
INT3 force-auth unauthorized initialize initialize
INT4 force-auth unauthorized initialize initialize
INT5 force-auth unauthorized initialize initialize
INT6 force-auth unauthorized initialize initialize
INT7 force-auth unauthorized initialize initialize
INT8 force-auth unauthorized initialize initialize
INT9 force-auth unauthorized initialize initialize
INT10 force-auth unauthorized initialize initialize
INT11 force-auth unauthorized initialize initialize
INT12 force-auth unauthorized initialize initialize
INT13 force-auth unauthorized initialize initialize
INT14 force-auth unauthorized initialize initialize
EXT1 force-auth unauthorized initialize initialize
EXT2 force-auth unauthorized initialize initialize
*EXT3 force-auth unauthorized initialize initialize
*EXT4 force-auth unauthorized initialize initialize
*EXT5 force-auth unauthorized initialize initialize
*EXT6 force-auth unauthorized initialize initialize
*EXT7 force-auth unauthorized initialize initialize
*EXT8 force-auth unauthorized initialize initialize
*EXT9 force-auth unauthorized initialize initialize
------------------------------------------------------------------
* - Port down or disabled


STP uplink fast mode : disabled


>> Layer 2# cd ..
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# l2
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# trunk
Trunk group 1: Disabled
Reminder: Trunk group 1 needs to be enabled.
Protocol - Static
port state:
EXT1: STG 1 forwarding
EXT2: STG 1 BLOCKING


>> Layer 2# trunk
Trunk group 1: Disabled
Reminder: Trunk group 1 needs to be enabled.
Protocol - Static
port state:
EXT1: STG 1 forwarding
EXT2: STG 1 BLOCKING


>> Layer 2# cd ..
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# l2
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# trunk
Trunk group 1: Disabled
Reminder: Trunk group 1 needs to be enabled.
Protocol - Static
port state:
EXT1: STG 1 forwarding
EXT2: STG 1 BLOCKING


>> Layer 2# cd ..
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information#

>> Information#

>> Information#

>> Information# l2
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# trunk
Trunk group 1: Disabled
Reminder: Trunk group 1 needs to be enabled.
Protocol - Static
port state:
EXT1: STG 1 forwarding
EXT2: STG 1 BLOCKING


>> Layer 2# cd /
------------------------------------------------------------
[Main Menu]
info - Information Menu
stats - Statistics Menu
cfg - Configuration Menu
oper - Operations Command Menu
boot - Boot Options Menu
maint - Maintenance Menu
diff - Show pending config changes [global command]
apply - Apply pending config changes [global command]
save - Save updated config to FLASH [global command]
revert - Revert pending or applied changes [global command]
exit - Exit [global command,always available]

>> Main# info
------------------------------------------------------------
[Information Menu]
sys - System Information Menu
l2 - Layer 2 Information Menu
l3 - Layer 3 Information Menu
qos - QoS Menu
acl - Show ACL information
link - Show link status
port - Show port information
transcvr - Show Port Transceiver status
dump - Dump all information

>> Information# l2
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# lacp
------------------------------------------------------------
[LACP Menu]
aggr - Show LACP aggregator information for the port
port - Show LACP port information
dump - Show all LACP ports information

>> LACP# dump
port lacp adminkey operkey selected prio attached trunk
aggr
----------------------------------------------------------------------------
INT1 off 1 1 no 32768 -- --
INT2 off 2 2 no 32768 -- --
INT3 off 3 3 no 32768 -- --
INT4 off 4 4 no 32768 -- --
INT5 off 5 5 no 32768 -- --
INT6 off 6 6 no 32768 -- --
INT7 off 7 7 no 32768 -- --
INT8 off 8 8 no 32768 -- --
INT9 off 9 9 no 32768 -- --
INT10 off 10 10 no 32768 -- --
INT11 off 11 11 no 32768 -- --
INT12 off 12 12 no 32768 -- --
INT13 off 13 13 no 32768 -- --
INT14 off 14 14 no 32768 -- --
EXT1 off 17 17 no 32768 -- --
EXT2 off 18 18 no 32768 -- --
EXT3 off 19 19 no 32768 -- --
EXT4 off 20 20 no 32768 -- --
EXT5 off 21 21 no 32768 -- --
EXT6 off 22 22 no 32768 -- --
EXT7 off 23 23 no 32768 -- --
EXT8 off 24 24 no 32768 -- --
EXT9 off 25 25 no 32768 -- --

>> LACP# cd ..
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# trunk
Trunk group 1: Disabled
Reminder: Trunk group 1 needs to be enabled.
Protocol - Static
port state:
EXT1: STG 1 forwarding
EXT2: STG 1 BLOCKING


>> Layer 2# apply
No apply needed.

>> Layer 2#
Jan 2 9:11:36 170.120.116.224 ALERT stg: Port EXT1,putting port into blocking state

Jan 2 9:11:36 170.120.116.224 ALERT stg: Port EXT2,putting port into blocking state

Jan 2 9:11:36 170.120.116.224 ALERT stg: Port EXT1,putting port into blocking state

Jan 2 9:12:03 170.120.116.224 ALERT stg: STG 1,topology change detected

Jan 2 9:12:03 170.120.116.224 ALERT stg: Port EXT2,putting port into blocking state


>> Layer 2#

>> Layer 2#

>> Layer 2#

>> Layer 2#

>> Layer 2#

>> Layer 2# ls
------------------------------------------------------------
[Layer 2 Menu]
fdb - Forwarding Database Information Menu
lacp - Link Aggregation Control Protocol Menu
8021x - Show 802.1x information
stg - Show STP information
cist - Show CIST information
trunk - Show Trunk Group information
vlan - Show VLAN information
dump - Dump all layer 2 information

>> Layer 2# trunk
Trunk group 1: Disabled
Reminder: Trunk group 1 needs to be enabled.
Protocol - Static
port state:
EXT1: STG 1 forwarding
EXT2: STG 1 BLOCKING


>> Layer 2#
Jan 2 9:13:19 170.120.116.224 ALERT stg: STG 1,topology change detected

我上面出现ext2 blocking 是因为我配置了trunk 没有enable,所以出现这个情况

database群:119224876(db china联盟) 虚拟化方面群:229845401(虚拟化-云计算-物联网)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


什么是设计模式一套被反复使用、多数人知晓的、经过分类编目的、代码 设计经验 的总结;使用设计模式是为了 可重用 代码、让代码 更容易 被他人理解、保证代码 可靠性;设计模式使代码编制  真正工程化;设计模式使软件工程的 基石脉络, 如同大厦的结构一样;并不直接用来完成代码的编写,而是 描述 在各种不同情况下,要怎么解决问题的一种方案;能使不稳定依赖于相对稳定、具体依赖于相对抽象,避免引
单一职责原则定义(Single Responsibility Principle,SRP)一个对象应该只包含 单一的职责,并且该职责被完整地封装在一个类中。Every  Object should have  a single responsibility, and that responsibility should be entirely encapsulated by t
动态代理和CGLib代理分不清吗,看看这篇文章,写的非常好,强烈推荐。原文截图*************************************************************************************************************************原文文本************
适配器模式将一个类的接口转换成客户期望的另一个接口,使得原本接口不兼容的类可以相互合作。
策略模式定义了一系列算法族,并封装在类中,它们之间可以互相替换,此模式让算法的变化独立于使用算法的客户。
设计模式讲的是如何编写可扩展、可维护、可读的高质量代码,它是针对软件开发中经常遇到的一些设计问题,总结出来的一套通用的解决方案。
模板方法模式在一个方法中定义一个算法的骨架,而将一些步骤延迟到子类中,使得子类可以在不改变算法结构的情况下,重新定义算法中的某些步骤。
迭代器模式提供了一种方法,用于遍历集合对象中的元素,而又不暴露其内部的细节。
外观模式又叫门面模式,它提供了一个统一的(高层)接口,用来访问子系统中的一群接口,使得子系统更容易使用。
单例模式(Singleton Design Pattern)保证一个类只能有一个实例,并提供一个全局访问点。
组合模式可以将对象组合成树形结构来表示“整体-部分”的层次结构,使得客户可以用一致的方式处理个别对象和对象组合。
装饰者模式能够更灵活的,动态的给对象添加其它功能,而不需要修改任何现有的底层代码。
观察者模式(Observer Design Pattern)定义了对象之间的一对多依赖,当对象状态改变的时候,所有依赖者都会自动收到通知。
代理模式为对象提供一个代理,来控制对该对象的访问。代理模式在不改变原始类代码的情况下,通过引入代理类来给原始类附加功能。
工厂模式(Factory Design Pattern)可细分为三种,分别是简单工厂,工厂方法和抽象工厂,它们都是为了更好的创建对象。
状态模式允许对象在内部状态改变时,改变它的行为,对象看起来好像改变了它的类。
命令模式将请求封装为对象,能够支持请求的排队执行、记录日志、撤销等功能。
备忘录模式(Memento Pattern)保存一个对象的某个状态,以便在适当的时候恢复对象。备忘录模式属于行为型模式。 基本介绍 **意图:**在不破坏封装性的前提下,捕获一个对象的内部状态,并在该
顾名思义,责任链模式(Chain of Responsibility Pattern)为请求创建了一个接收者对象的链。这种模式给予请求的类型,对请求的发送者和接收者进行解耦。这种类型的设计模式属于行为
享元模式(Flyweight Pattern)(轻量级)(共享元素)主要用于减少创建对象的数量,以减少内存占用和提高性能。这种类型的设计模式属于结构型模式,它提供了减少对象数量从而改善应用所需的对象结