3层交换机基本配置.docx

上传人:b****1 文档编号:2268836 上传时间:2023-05-03 格式:DOCX 页数:9 大小:18.61KB
下载 相关 举报
3层交换机基本配置.docx_第1页
第1页 / 共9页
3层交换机基本配置.docx_第2页
第2页 / 共9页
3层交换机基本配置.docx_第3页
第3页 / 共9页
3层交换机基本配置.docx_第4页
第4页 / 共9页
3层交换机基本配置.docx_第5页
第5页 / 共9页
3层交换机基本配置.docx_第6页
第6页 / 共9页
3层交换机基本配置.docx_第7页
第7页 / 共9页
3层交换机基本配置.docx_第8页
第8页 / 共9页
3层交换机基本配置.docx_第9页
第9页 / 共9页
亲,该文档总共9页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

3层交换机基本配置.docx

《3层交换机基本配置.docx》由会员分享,可在线阅读,更多相关《3层交换机基本配置.docx(9页珍藏版)》请在冰点文库上搜索。

3层交换机基本配置.docx

3层交换机基本配置

根本配置

S>enable进入特权模式

S#configureterminal 进入全局配置模式

S(config)#hostnamename改变交换机名称

S(config)#enablepasswordlevellevel_#password设置用户口令〔level_#=1)或特权口令〔level_#=15)

S(config)#lineconsole0进入控制台接口

S(config-line)#passwordconsole_password接上一条命令,设置控制台口令

S(config)#linevty015进入虚拟终端

S(config-line)#passwordtelnet_password接上一条命令,设置Telnet口令

S(config-line)#login允许Telnet登录

S(config)#enablepassword|secretprivilege_password配置特权口令〔加密或不加密〕

S(config)#interfaceethernet|fastethernet|gigabitethernetslot_#/port_#进入接口子配置模式

S(config-if)#[no]shutdown关闭或启用该接口〔默认启用〕

S(config)#ipaddressIP_addresssunbet_mask指定IP地址

S(config)#ipdefault-gatewayrouter's_IP_address指定哪台路由器地址为默认网关

S#showrunning-config查看当前的配置

S#copyrunning-configstartup-config将RAM中的当前配置保存到NVRAM中

S>showinterface[typeslot_#/port_#]查看所有或指定接口的信息

S>showip 显示交换机的IP配置〔只在1900系列上可用〕

S>showversion查看设备信息

S#showipinterfacebrief验证IP配置

S(config-if)#speed10|100|auto设置接口速率

S(config-if)#duplexauto|full|half设置接口双工模式

S>showmac-address-table查看CAM表

S#clearmac-address-table去除CAM表中的动态条目

1900(config)#mac-address-tablepermanentMAC_addresstype[slot_#/]port_#在CAM表中创立静态条目

2950(config)#mac-address-tablestaticMAC_addressvlanVLAN_#interfacetype[slot_#/]port_#在CAM表中创立静态条目

1900(config)#mac-address-tablerestrictedstaticMAC_addresssource_portlist_of_allowed_interface设置静态端口平安措施

1900(config-if)#portsecure启用粘性学习

1900(config-if)#portsecuremax-mac-countvalue设置粘性学习特性能够学到的地址数量〔默认132,取值范围是1-132〕

1900(config)#address-violationsuspend|ignore|disable改变平安选项

1900>showmac-address-tablesecurity验证端口平安措施

2950(config)#switchportmodeaccess定义接口为主机端口而不是中继端口

2950(config)#switchportport-security启用端口平安措施

2950(config)#switchportport-securitymaximumvalue指定可与此接口相关的设备的最大数量

2950(config)#switchportport-securityviolationprotect|restrict|shutdown指定出现平安违规时应该发生的事

2950(config)#switchportport-securitymac-addressMAC_address指定允许与此接口相关确实切的MAC地址

2950(config)#switchportport-securitymac-addresssticky启用粘性学习特性

2950(config)#showportinterfacetype[slot_#/]port_#验证接口配置

2950(config-if)descriptionname设置接口描述信息

2950#showbuffers查看系统缓存的大小

1900#copynvramtftp:

//IP_address_of_TFTP_server/file_name将配置文件备份到TFTP效劳器上

1900#copytftp:

//IP_address_of_TFTP_server/file_namenvram 从TFTP效劳器上恢复配置到NVRAM

1900#deletenvram删除配置文件

2950#erasestartup-config删除配置文件

3550#showtcamqosTCAM_IDstatistics查看TCAM剩余容量

4000>enable进入特权模式

4000>(enable)setpassword设置用户模式密码

4000>(enable)setenablepass设置授权密码

4000>(enable)setinterfacesc0IP_addressmask配置IP地址

4000>(enable)setportenable|disableslot_#/port_#启用/禁用接口

4000>(enable)showport[slot_#/port_#]显示接口信息

4000>(enable)setportnameslot_#/port_#name设置交换机接口描述信息

4000>(enable)setportspeedslot_#/port_#4|10|16|100|auto设置交换机接口速率

4000>(enable)setportduplexslot_#/port_#full|half设置交换机接口双工模式

4000>(enable)clearconfigall删除NVRAM中的配置信息

4000>(enable)eraseall删除FLASH中的内容

4000>(enable)showflash显示FLASH中的内容

4000>(enable)showcam[count]dynamic|static|permanent|system[vlan_#]显示CAM表

VLAN1900(config)#vtpdomainVTP_domain_name定义交换机域名

1900(config)#vtpserver|client|transparent定义交换机VTP模式〔默认效劳器〕

1900(config)#vtppasswordVTP_password配置VTP口令

1900(config)#vtppruningenable|disable启用/禁用修剪〔默认启用〕

1900(config)#vtptrapenable启用SNMP陷阱〔默认启用〕

1900#showvtp验证VTP配置

2950#vtpdatabase访问VLAN和VTP配置〔以下均是在IOS12.1前用,12.1后全是在全局配置模式下〕

2950(vlan)#vtpdomainVTP_domain_name定义交换机域名

2950(vlan)#vtpserver|client|transparent定义交换机VTP模式〔默认效劳器〕

2950(vlan)#vtppasswordVTP_password配置VTP口令

2950(vlan)#vtppruning启用/禁用修剪〔默认启用〕

2950(config)#snmp-serverenabletrapsvtp启用SNMP陷阱〔默认启用〕

2950#showvtpstatus检查VTP配置

2950#showvtpcounters显示与VTP消息发送与接收相关的VTP统计信息

1900(config-if)#trunkon|off|desirable|auto指定中继类型

1900#showtrunkA|B验证接口中继〔A是fa0/26,B是fa0/27〕

2950(config-if)#switchportmodetrunk|dynamicdesirable|dynamicauto|nonegotiate指定中继类型(默认自动协商〕

2950(config-if)#switchporttrunknative|allowed|pruningvlanVLAN_#配置中继

2950(config-if)#switchporttrunkpruningvlanremoveVLAN_#去除不希望消减的VLAN

2950#showinterfaces[type0/port_#]switchport|trunk验证接口中继

1900(config)#vlanVLAN_#[nameVLAN_name]创立VLAN

1900(config-if)#vlan-membershipstaticVLAN_#将该接口静态地分配给一个VLAN

1900#showvlan验证VLAN

1900#showvlan-membership查看VLAN成员关系

1900#showspantree[VLAN_#]查看VLAN的STP信息

2950#vlandatabase进入VLAN数据库〔ISO12.1前用〕

2950(vlan)#vlanVLAN_#[nameVLAN_name]创立VLAN

2950(config)#vlanVLAN_#进入VLAN数据库〔ISO12.1后用〕

2950(config-vlan)#nameVLAN_name创立VLAN

2950(config-if)#switchportmodeaccess指定连接是接入链路连接

2950(config-if)#switchportaccessvlanVLAN_#指定VLAN是接入链路连接

4000>(enable)setvlanVLAN_#nameVLAN_name配置VLAN

4000>(enable)setvlanVLAN_#slot_#/port_#-port_#为VLAN分配端口

4000>(enable)settrunkslot_#/port_#[on|off|desirable|auto|nonegotiate][VLAN_#][isl|dot1q|dot10|lane|negotiate]配置中继

4000>(enable)cleartrunkslot_#/port_#VLAN_#删除VLAN

4000>(enable)showtrunkslot_#/port_#验证中继端口

4000>(enable)setvtpv2enable配置VTPv2

4000>(enable)setvtp[domainname][modeclient|server|transparent][passwdpassword][pruningenable|disable][v2enable|disable]设置VTP

4000>(enable)showvtpdomain验证VTP域的信息

4000>(enable)showvtpstatistics显示发出或收到的VTP通告信息的摘要内容

4000>(enable)setvtppruneeligibleVLAN_#设置VTP消减

4000>(enable)clearvtppruneeligibleVLAN_#去除不希望消减的VLAN

                      

STP4000>(enable)setspantreeenable|disableVLAN_#启用/禁用STP〔默认启用〕

2950(config)#[no]spanning-treevlanVLAN_#启用/禁用STP〔默认启用〕

4000>(enable)showspantree[VLAN_#]验证STP状态

2950#showspanning-tree验证STP状态

4000>(enable)setspantreeroot[secondary]VLAN_#[dianetwork_diameter][hellohello_time]设置主根节点桥、备份节点桥、最大桥数量〔2-7〕、持续时间〔1-10,默认2〕

4000>(enable)setspantreeportcostslot_#/port_#cost_#设置端口开销

2950(config-if)#spanning-treecostcost_#设置端口开销

4000>(enable)setspantreeportprislot_#/port_#priority_#设置端口优先级

4000>(enable)setspantreeportvlanprislot_#/port_#priority_#[VLAN_#]改变VLAN的优先级设置

2950(config-if)#spanning-treevlanVLAN_#port-prioritypriority_#设置端口优先级

4000>(enable)setspantreefwddelaydelay_#[VLAN_#]设置从侦听状态到学习状态再到转发状态的时间间隔〔默认15秒,取值范围是4-30秒〕

4000>(enable)setspantreehellointerval_time[VLAN_#]设置根节点交换机发送BPDU的时间间隔〔默认2秒,取值范围是1-10秒〕

4000>(enable)setspantreemaxageagingtime[VLAN_#]设置交换机持有BPDU的时间〔默认20秒,取值范围是6-40秒〕

2950(config)#spanning-treevlanVLAN_#forward-timeforward_time设置从侦听状态到学习状态再到转发状态的时间间隔〔默认15秒,取值范围是4-30秒〕

2950(config)#spanning-treevlanVLAN_#hello-timehello_time设置根节点交换机发送BPDU的时间间隔〔默认2秒,取值范围是1-10秒〕

2950(config)#spanning-treevlanVLAN_#max-agemaxage设置交换机持有BPDU的时间〔默认20秒,取值范围是6-40秒〕

4000>(enable)setportchannelslot_#/port_#on建立以太通道集合

4000>(enable)showportcapabilitiesslot_#/port_#查看端口的配置

4000>(enable)showportchannel验证以太通道集合的配置

2950(config-if)#channel-groupgroup_numbermodeauto|desirable|on建立以太通道集合

2950#showetherchannelgroup_number|brief|detail|load-balance|port|port-channel|summary验证以太通道集合的配置

4000>(enable)setspantreeportfastslot_#/port_#enable配置PortFast

2950(config-if)#spanning-treeportfast配置PortFast

4000>(enable)setspantreeuplinkfastenable|disable[ratestation_update_rate][all-protocolsoff|on]启用/禁用UplinkFast

4000>(enable)showspantreeuplinkfast验证UplinkFast配置

2950(config)#spanning-treeuplinkfast[max_update_rate]启用/禁用UplinkFast

2950#showspanning-treeuplinkfast验证UplinkFast配置

4000>(enable)setspantreebackbonefastenable|disable启用/禁用BackboneFast

4000>(enable)showspantreebackbonefast验证BackboneFast配置

2950(config)#spanning-treebackbonefast启用BackboneFast

虚拟网间路由

2600(config)#interfacetypeslot_#/port_#.subint_number配置子接口

2600(config-subif)#encapsulationdot1q|isl|sde|tr-islVLAN_#配置封装类型

4000>(enable)showmodule查看交换机的硬件配置

4000>(enable)sessionmodule_#访问L3SM

L3SM(config-if)#mac-addressmac_address分配MAC地址

MLS2600(config)#mlsrpip 启动MLS

2600(config-if)#mlsrpvtp-domaindomain_name分配路由器接口到VTP域中

2600(config-if)#mlsrpvlan-idVLAN_#向接口分配VLAN

2600(config-if)#mlsrpmanagement-interface指定该接口为管理接口

2600#showmlsrp提供全局MLS信息

2600#showmlsrpinterfacetypeslot_#/port_#提供指定接口的MLS信息

2600#showmlsrpvtp-domaindomain_name提供VTP域的MLS信息

6500>(enable)setmlsenable在MLS-SE上启动MLS

6500>(enable)setmlsincluderp_ip_address告诉交换机哪一个IP地址是正确的

6500>(enable)showmlsinclude显示外部路由处理器的IP地址列表

6500>(enable)setmlsflow[destination|destination-source|full]告诉MLS交换机要缓存候选数据包的哪些信息

6500>(enable)showmlsentry显示第三层缓存表

6500>(enable)setmlsagingtimeaging_time改变缓存的衰老时间〔默认256秒,取值范围是8-2032秒中的8的倍数值〕

6500>(enable)setmlsagingtimefastfast_aging_timepkt_threshold改变快速衰老周期和数据包门限值

6500>(enable)showmlsip验证MLS-SE的配置

6500>(enable)clearmlsentry[destinationIP_address][sourceIP_address][flowprotocol][source_port][destination_port][all]删除所有或指定MLS缓存记录

3550(config)#iprouting启动IP路由

3550(config)#ipcef启动CEF

3550(config-if)#noswitchport将第二层接口转换为第三层接口

3550(config-if)#iproute-cachecef在接口上启动CEF

3550#showipcef验证CEF

组播

3640(config)#ipmulticast-routing启动路由器上的组播效劳

3640(config-if)#ippimdense-mode将接口设置为PIM密集模式

3640(config-if)#ippimsparse-mode将接口设置为PIM稀疏模式

3640(config-if)#ippimsparsed-dense-mode将接口设置为PIM稀疏-密集模式

3640(config)#ippimrp-addressIP_addressgroup_ACL_#[override]手工配置RP

3640(config)#ippimsend-rp-announcetypeslot_#/port_#scopettl_valuegroup-listACL_#通告RP组的分配

3640(config)#ippimsend-rp-discoveryscopettl_value配置RP映射代理

3640(config-if)#ipmulticastttl-thresholdttl_value设置TTL门限值

3640(config-if)#ipigmpjoin-groupgroup_address参加组播组

3640#showipmroute查看组播信息

3640#ping验证RP之间或其他组播路由器之间的连接

3640#mtracesource_IP_address[destination_IP_address][group]组播traceroute

3640(config-if)#ipcgmp配置CGMP路由器

4000>(enable)setcgmpenable启动CGMP

4000>(enable)showcgmp

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 初中教育 > 语文

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2