【ACCESS精品源码栏目提醒】:网学会员为广大网友收集整理了,计算机网络实验程序源代码 - 其它资料,希望对大家有所帮助!
1.交换机端口与 mac 地址绑定SwitchenSwitchconfigConfiguring from terminal memory or network terminalEnter configuration commands one per line. End with CNTL/Z.SwitchconfigSwitchconfigint vlan 1Switchconfig-ifip add 192.168.1.1 255.255.255.0Switchconfig-ifno shLINK-5-CHANGED: Interface Vlan1 changed state to upSwitchconfig-ifLINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1 changed state to upSwitchconfig-ifexitSwitchconfig-ifswitchport mode accessSwitchconfig-ifswitchport port-securitySwitchconfig-ifswitchport port-security mac-address 0007.EC41.68E0Switchsh port-security address Secure Mac Address Table-------------------------------------------------------------------------------Vlan Mac Address Type Ports Remaining Age mins---- ----------- ---- ----- -------------1 0007.EC41.68E0 SecureConfigured FastEthernet0/1 -------------------------------------------------------------------------------Total Addresses in System excluding one mac per port :0Max Addresses limit in System excluding one mac per port : 1024Switch2.用交换机划分 vlan 并添加端口SwitchenSwitchconfigConfiguring from terminal memory or network terminalEnter configuration commands one per line. End with CNTL/Z.Switchconfigvlan 2Switchconfig-vlanexitSwitchconfigvlan 3Switchconfig-vlanexitSwitchconfigint range f0/1-2Switchconfig-if-rangesw mod accSwitchconfig-if-rangesw acc vlan 2Switchconfig-if-rangeexitSwitchconfigint range f0/3-4Switchconfig-if-rangesw mod accSwitchconfig-if-rangesw acc vlan 3Switchconfig-if-rangeexitSwitchconfigint vlan 2LINK-5-CHANGED: Interface Vlan2 changed state to upSwitchconfig-ifLINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2 changed state to upSwitchconfig-ifno shSwitchconfig-ifexitSwitchconfigint vlan 3LINK-5-CHANGED: Interface Vlan3 changed state to upSwitchconfig-ifLINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3 changed state to upSwitchconfig-ifno shSwitchconfig-ifZSwitchSYS-5-CONFIG_I: Configured from console by consoleSwitchsh vlanVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/5 Fa0/6 Fa0/7 Fa0/8 Fa0/9 Fa0/10 Fa0/11 Fa0/12 Fa0/13 Fa0/14 Fa0/15 Fa0/16 Fa0/17 Fa0/18 Fa0/19 Fa0/20 Fa0/21 Fa0/22 Fa0/23 Fa0/242 VLAN0002 active Fa0/1 Fa0/23 VLAN0003 active Fa0/3 Fa0/41002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - - 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0Remote SPAN VLANs------------------------------------------------------------------------------Primary Secondary Type Ports------- --------- ----------------- ------------------------------------------Switch3.相同 vlan 的跨交换机通信SwitchSwitchenSwitchconfigConfiguring from terminal memory or network terminalEnter configuration commands one per line. End with CNTL/Z.Switchco