【正文】
ddress S3500A(configif)no shutdown S3500A(configif)exit將 f0/3 配置為 trunk:S3500A(config)int f0/3S3500A(configif)switchport mode trunk配置 ACL:S3500A(config)timerange tm0S3500A(configtimerange) periodic weekend 8:00 to 18:00S3500A(config)accesslist 101 permit tcp any timerange tm0S3500A(configif) ip accessgroup 101 out配置 DHCP 中繼:S3500A (config) service dhcpS3500A (config) ip dhcp relay information optionS3500A (config) interface vlan 10S3500A (configif) ip address S3500A (configif) ip helperaddress S3500A (configif) exit配置 MSTP:S3500A(config) spanningtree mst configurationS3500A(config)revision 5S3500A(config)name region 1S3500A(configmst)instance 1 vlan 10S3500A(configmst)instance 2 vlan 20S3500A(configmst)exit//設(shè)置此交換機(jī)為 instance1 的生成樹根S3500A(config)spanningtree mst 1 root primary/priotity 0 //設(shè)置此交換機(jī)是 instance2 的生成樹備份根S3500A(config)spanningtree mst 2 root secondary/priotity 4096 S3500B 的配置:配置 VTP、trunk、VLAN:SwitchenSwitchconfig tEnter configuration mands, one per line. End with CNTL/Z.Switch(config)hostname S3500BS3500B(config)vtp mode client Setting device to VTP CLIENT mode.S3500B(config)vtp domain serverChanging VTP domain name from NULL to serverS3500B(config)int range f0/510S3500B(configifrange)switchport mode accessS3500B(configifrange)switchport access vlan 10S3500B(configifrange)exitS3500B(config)int range f0/1115S3500B(configifrange)switchport mode access S3500B(configifrange)switchport access vlan 20S3500B(configifrange)exitS3500B(config)int f0/24S3500B(configif)switchport mode trunk %LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/24, changed state to down%LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/24, changed state to upS3500B(configif)配置鏈路聚合:S3500B(configif)int f0/1S3500B(configif)channelgroup 1 mode on %LINK5CHANGED: Interface Portchannel 1, changed state to up%LINEPROTO5UPDOWN: Line protocol on Interface Portchannel 1, changed state to up%LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/1, changed state to down%LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/1, changed state to upS3500B(configif)int f0/2S3500B(configif)channelgroup 1 mode on %LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/2, changed state to down%LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/2, changed state to upS3500B(configif)S3500B(configif)int f0/1S3500B(configif)no switchport %LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/1, changed state to down%LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/1, changed state to upS3500B(configif)S3500B(configif)channelgroup 1 mode on S3500B(configif)int f0/2S3500B(configif)no switchport %LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/2, changed state to down%LINEPROTO5UPDOWN: Line protocol on Interface FastEther0/2, changed state to upS3500B(configif)S3500B(configif)channelgroup 1 mode on S3500B(configif)exitS3500B(config)int portchannel 1S3500B(configif)no switchport %LINEPROTO5UPDOWN: Line protocol on Interface Portchannel 1, changed state to down%LINEPROTO5UPDOWN: Line protocol on Interface Portchannel 1, changed state to upS3500B(configif)S3500B(configif)ip address 配置 OSPF:S3500B(config)router ospf 100S3500B(configrouter)work area 0配置 MSTP:S3500A(config) spanningtree mst configurationS3500A(config)revision 5S3500A(config)name region 1S3500A(configmst)instance 1 vlan 10S3500A(configmst)instance 2 vlan 20S3500A(configmst)exit//設(shè)置此交換機(jī)為 instance1 的生成樹根S3500A(config)spanningtree mst 1 root primary/priotity 0 //設(shè)置此交換機(jī)是 instance2 的生成樹備份根S3500A(config)spanningtree mst 2 root secondary/priotity 4096 S2900 的配置:配置 VTP、trunk、VLAN:SwitchenSwitchconfig tEnter configuration mands, one per line. End with CNTL/Z.Switch(config)hostname S2900S2900(config)vtp mode clientSetting device to VTP CLIENT mode.S2900(config)int range f0/510S2900(configifrange)switchport mode access S2900(configifrange)switchport access vlan 10S2900(configifrange)exitS2900(config)int range f0/1115S2900(configifrange)switchport mode access S2900(configifrange)switchport access vlan 20S2900(configifrange)exitS2900(config)int f0/3S2900(configif)switchport mode trunk S2900(configif)int f0/24S2900(configif)switchport mode trunk配置 MSTP:S2900(config) spanningtree mst configurationS2900(config)revision 5S2900(config)name region 1S2900(configmst)instance 1 vlan 10S2900(configmst)instance 2 vlan 20S2900(configmst)exit配置端口安全:S2900(configif)int vlan 10S2900(configif)switchport portsecurity maximum 2S2900(configif)switchport portsecurity violation shut在 R1800 上輸入命令:(1)show ip interface briefR1800show ip interface brief Interface IPAddress OK? Method Status Protocol FastEther0/0 YES manual up up FastEther1/0 YES manual up up Serial2/0 unassigned YES manual administratively down down Serial3/0 unassigned YES manual administratively down down FastEther4/0 unassigned YES manual administratively down downFastEther5/0 unassigned YES manual administratively down down(2) show ip routeR1800show ip route Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2 E1 OSPF external type 1, E2 OSPF external type 2, E EGP i ISIS, L1 ISIS