CCIE LAB K2配置总结.docx
《CCIE LAB K2配置总结.docx》由会员分享,可在线阅读,更多相关《CCIE LAB K2配置总结.docx(39页珍藏版)》请在冰豆网上搜索。
![CCIE LAB K2配置总结.docx](https://file1.bdocx.com/fileroot1/2023-3/31/906687d4-9889-4212-9b13-ae5a61abf222/906687d4-9889-4212-9b13-ae5a61abf2221.gif)
CCIELABK2配置总结
SectionⅠ.Layer2Technologies
1.1TroubleshootingLayer2SwitchingNetwork
a.R1的vlan11的子接口上多了一个native参数,去掉即可
b.Sw3fa0/10被做了monitorsession,直接nomonitorsessionall即可
c.Loopback口要求是/32,但预配是/24,R4、R5要手工改成/32
switch(config)#controlplan
switch(config-plan)#service-police*去掉
1.2TmplementtheAccess-SwitchPorts
Sw1(config)#vlan10
Sw1(config-vlan)#nameMarketing
Sw1(config-vlan)#exit
Sw1(config)#vlan11
Sw1(config-vlan)#nameSales
Sw1(config-vlan)#exit
Sw1(config)#vlan20
Sw1(config-vlan)#nameEngineering
Sw1(config-vlan)#exit
Sw1(config)#vlan30
Sw1(config-vlan)#nameHR
Sw1(config-vlan)#exit
Sw1(config)#vlan33
Sw1(config-vlan)#nameBB3
Sw1(config-vlan)#exit
Sw1(config)#vlan42
Sw1(config-vlan)#nameISP42
Sw1(config-vlan)#exit
Sw1(config)#vlan51
Sw1(config-vlan)#nameISP51
Sw1(config-vlan)#exit
Sw1(config)#vlan54
Sw1(config-vlan)#nameISPBB
Sw1(config-vlan)#exit
Sw1(config)#vlan234
Sw1(config-vlan)#nameSupport
Sw1(config-vlan)#exit
Sw1(config)#vlan243
Sw1(config-vlan)#nameQA
Sw1(config-vlan)#exit
Sw1(config)#vlan300
Sw1(config-vlan)#nameAdmin
Sw1(config-vlan)#exit
*SW1、SW2、SW3、SW4都需要创建以上vlan,可以采用将sw1设置为server,其他交换机设置为client方式来进行vlan同步,然后再修改回去。
Sw1(config)#vtpmodetransparent
Sw2(config)#vtpmodetransparent
Sw3(config)#vtpmodetransparent
Sw4(config)#vtpmodetransparent
Switch#showvlanbrief
*1—1005vtp
1006—4094nonvtp
Vtptransparent:
1—1005:
vlan.dat(vlandatabase)&configuration
1006—4094:
configuration
Switch#showflash
Switch#showvtpstatus
Sw1#showspanning-treevlan1
Sw1(config)#spanning-treemoderapid-pvst
Sw2(config)#spanning-treemoderapid-pvst
Sw3(config)#spanning-treemoderapid-pvst
Sw4(config)#spanning-treemoderapid-pvst
Sw2(config)#interfacefa0/1
Sw2(config-if)#switchporttrunkencapsulationdot1q
Sw2(config-if)#switchportmodetrunk
Sw1(config)#interfacefa0/2
Sw1(config-if)#switchportmodeaccess
Sw1(config-if)#switchportaccessvlan20
Sw1(config-if)#interfacefa0/3
Sw1(config-if)#switchportmodeaccess
Sw1(config-if)#switchportaccessvlan30
Sw3(config)#interfacefa0/10
Sw3(config-if)#switchportmodeaccess
Sw3(config-if)#switchportaccessvlan33
Sw1(config)#interfacefa0/4
Sw1(config-if)#switchportmodeaccess
Sw1(config-if)#switchportaccessvlan42
Sw2(config)#interfacefa0/5
Sw2(config-if)#switchportmodeaccess
Sw2(config-if)#switchportaccessvlan51
Sw2(config-if)#interfacefa0/4
Sw2(config-if)#switchportmodeaccess
Sw2(config-if)#switchportaccessvlan54
Sw1(config)#interfacefa0/5
Sw1(config-if)#switchportmodeaccess
Sw1(config-if)#switchportaccessvlan54
Sw2(config)#interfacefa0/2
Sw2(config-if)#switchportmodeaccess
Sw2(config-if)#switchportaccessvlan234
Sw2(config-if)#interfacefa0/3
Sw2(config-if)#switchportmodeaccess
Sw2(config-if)#switchportaccessvlan300
Switch#showvlanbrief
Sw2#showinterfacetrunk
Sw1(config)#interfacerangefa0/2–5
Sw1(config-if-range)#spanning-treeportfast
Sw2(config)#interfacerangefa0/2–5
Sw2(config-if-range)#spanning-treeportfast
Sw2#showpanning-treeinterfacefa0/2portfast
Sw1(config)#spanning-treeportfastbpduguarddefault
Sw2(config)#spanning-treeportfastbpduguarddefault
Sw3(config)#spanning-treeportfastbpduguarddefault
Sw4(config)#spanning-treeportfastbpduguarddefault
Sw1(config)#interfacerangefa0/19–24
Sw1(config-if-range)#udldportaggressive
*aggressive是主动udld,如不输入此项,代表是被动协商udld
Sw2(config)#interfacerangefa0/19–24
Sw2(config-if-range)#udldportaggressive
Sw3(config)#interfacerangefa0/19–24
Sw3(config-if-range)#udldportaggressive
Sw4(config)#interfacerangefa0/19–24
Sw4(config-if-range)#udldportaggressive
Switch#showspanning-treeinconsistentports
1.3Trunking,EtherChannelandSTPManipulations
Sw1(config)#interfacerangefa0/19–24
Sw1(config-if-range)#switchporttrunkencapsulationdot1q
Sw1(config-if-range)#switchportmodetrunk
Sw1(config-if-range)#switchportnonegotiate*关闭trunk的自动协商功能
Sw2(config)#interfacerangefa0/19–24
Sw2(config-if-range)#switchporttrunkencapsulationdot1q
Sw2(config-if-range)#switchportmodetrunk
Sw2(config-if-range)#switchportnonegotiate
Sw3(config)#interfacerangefa0/19–24
Sw3(config-if-range)#switchporttrunkencapsulationdot1q
Sw3(config-if-range)#switchportmodetrunk
Sw3(config-if-range)#switchportnonegotiate
Sw4(config)#interfacerangefa0/19–24
Sw4(config-if-range)#switchporttrunkencapsulationdot1q
Sw4(config-if-range)#switchportmodetrunk
Sw4(config-if-range)#switchportnonegotiate
Sw1(config)#port-channelload-balancedst-ip
Sw1(config)#doshowetherchannelload-balance
Sw1(config)#interfacerangefa0/19–20
Sw1(config-if-range)#channel-group13modeactive
Sw1(config-if-range)#interfacerangefa0/21–22
Sw1(config-if-range)#channel-group14modeactive
Sw1(config-if-range)#interfacerangefa0/23–24
Sw1(config-if-range)#channel-group12modeactive
Sw1(config-if-range)#doshowetherchannelsummary
Sw2(config)#port-channelload-balancedst-ip
Sw2(config)#doshowetherchannelload-balance
Sw2(config)#interfacerangefa0/19–20
Sw2(config-if-range)#channel-group24modeactive
Sw2(config-if-range)#interfacerangefa0/21–22
Sw2(config-if-range)#channel-group23modeactive
Sw2(config-if-range)#interfacerangefa0/23–24
Sw2(config-if-range)#channel-group12modeactive
Sw2(config-if-range)#doshowetherchannelsummary
Sw3(config)#port-channelload-balancedst-ip
Sw3(config)#doshowetherchannelload-balance
Sw3(config)#interfacerangefa0/19–20
Sw3(config-if-range)#channel-group13modeactive
Sw3(config-if-range)#interfacerangefa0/21–22
Sw3(config-if-range)#channel-group23modeactive
Sw3(config-if-range)#interfacerangefa0/23–24
Sw3(config-if-range)#channel-group34modeactive
Sw3(config-if-range)#doshowetherchannelsummary
Sw4(config)#port-channelload-balancedst-ip
Sw4(config)#doshowetherchannelload-balance
Sw4(config)#interfacerangefa0/19–20
Sw4(config-if-range)#channel-group24modeactive
Sw4(config-if-range)#interfacerangefa0/21–22
Sw4(config-if-range)#channel-group14modeactive
Sw4(config-if-range)#interfacerangefa0/23–24
Sw4(config-if-range)#channel-group34modeactive
Sw4(config-if-range)#doshowetherchannelsummary
Switch#showspanning-treevlan1
Sw2(config)#interfacefa0/1
Sw2(config-if)#switchporttrunkallowedvlan10,11
Sw2(config-if)#switchportnonegotiate
1.4SpanningTreeRootSwitch
Sw1(config)#spanning-treevlan1-4094priority0
Sw1(config)#doshowspanning-treevlan10
Sw1(config)#interfafceportchannel14
Sw1(config-if)#spanning-treeguardroot
Sw2(config)#interfafceportchannel24
Sw2(config-if)#spanning-treeguardroot
Sw3(config)#interfafceportchannel34
Sw3(config-if)#spanning-treeguardroot
Switch#showspanning-treeinconsistentports*查看是否出现根不一致
Switch#showspanning-treeinconsistentports
*查看是否出现根不一致,因为sw4的mac地址比sw2的好,所以会发现sw2出现根不一致,需解决
Sw2#showspanning-treeinterfaceportchannel24detail
Sw2#showspanning-treebridge
Sw2(config)#spanning-treevlan1-4094priority8192
1.5Mac–addressagingtime
Sw1(config)#macaddress-tableaging-time150vlan20
Sw2(config)#macaddress-tableaging-time150vlan20
Sw3(config)#macaddress-tableaging-time150vlan20
Sw4(config)#macaddress-tableaging-time150vlan20
1.6PortMirroring(SPAN)
Sw3(config)#doshowmonitorsession1
Sw3(config)#nomonitorsessionall
Sw3(config)#monitorsession1sourceinterfacefa0/1–8,port13both
Sw3(config)#monitorsession1destinationinterfacefa0/11
Sw3(config)#doshowmonitorsession1
1.7ImplementtheFrameRelay
*此题需与后面的4.1feature相结合配置,否则单按此题要求配置是错误的
R5(config)#noipdomain-loopup
R5(config)#frame-relayswitching
R5(config)#doshowcontrollerss0/0
R5(config-if)#noipaddress
R5(config-if)#encapsulationframe-relay
R5(config-if)#frame-relayintf-typedce
R5(config-if)#clockrate64000
R5(config-if)#frame-relaylmi-typecisco
R5(config-if)#frame-relayroute231interfaces0/1233
R5(config-if)#noshutdown
R5(config-if)#interfaces0/1
R5(config-if)#noipaddress
R5(config-if)#encapsulationframe-relay
R5(config-if)#frame-relayintf-typedce
R5(config-if)#frame-relaylmi-typecisco
R5(config-if)#clockrate64000
R5(config-if)#frame-relayroute233interfaces0/0231
R5(config-if)#noshutdown
R5(config-if)#doshowframe-relayroute
R1(config)#interfaceloopback0
R1(config-if)#ipaddress1.1.1.1255.255.255.0
R1(config-if)#interfacemultilink1
R1(config-if)#ipunnumberedloopback0*地址借用loopback口
R1(config-if)#doshowrunnmultilink1
R1(config-if)#interfacevirtual-template1
R1(config-if)#noipaddress
R1(config-if)#pppmultilinkgroup1
R1(config-if)#doshowrunninterfacevirtuali-template1
R1(config-if)#interfaces0/1
R1(config-if)#noipaddress
R1(config-if)#encapsulationframe-relay
R1(config-if)#noframe-relayinverse-arp
R1(config-if)#noarpframe-relay
R1(config-if)#doshowframe-relaymap
R1(config-if)#interfaces0/1.231point-to-point
R1(config-subif)#frame-relayinterface-dlci231pppvirtual-template1
R1(config-subif)#exit
R1(config-if)#noshutdown
R3(config)#interfaceloopback0
R3(config-if)#ipaddress1.1.3.3255.255.255.0
R3(config-if)#interfacemultilink1
R3(config-if)#ipunnumberedloopback0*地址借用loopback口
R3(config-if)#doshowrunnmultilink1
R3(config-if)#interfacevirtual-template1
R3(config-if)#noipaddress
R3(config-if)#pppmultilinkgroup1
R3(config-if)#doshowrunninterfacevirtuali-template1
R3(config-if)#interfaces0/0
R3(config-if)#noipaddress
R3(config-if)#encapsulationframe-relay
R3(config-if)#noframe-relayinverse-arp
R3(config-if)#noarpframe-relay
R3(config-if)#doshowframe-relaymap
R3(config-if)#interfaces0/1.233point-to-point
R3(config-subif)#frame-relayinterface-dlci233pppvirtual-template1
R3(config-subif)#e