您的当前位置:首页正文

交换机配置考点

来源:要发发知识网
1.配置交换机的系统信息:

配置交换机的主机名:Switch-3548(config)#hostname<新主机名> Switch-6509>(enable)set system name<新主机名>

配置超级用户口令:Switch-3548(config)#enable secret 5 zzz(加密口令) Switch-3548(config)#enable password zzz(明文口令) Switch-3548(config)#enable password 7 zzz(加密口令)

Switch-6509>(enable)set enablepass

远程登录系统口令:Switch-3548(config)#line vty 0 4

Switch-3548(config-line)#password zzz(明文口令) Swithc-3548(config-line)#password 7(加密口令)

Switch-6509>(enable)set password

系统时间的改变:Switch-3548(config)#clock set hh:mm:ss day month year

Swithc-6509>(enable)set time [day_of_week][mm/dd/yy][hh:mm:ss]

配置设备管理IP地址:

Switch-3548(config)#interface vlan1

Switch-3548(config-if)#ip address <子网掩码>

Switch-3548(config-if)#ip default-gateway<缺省路由的IP地址>

Swithc-6509>(enable)set interface sc0<子网掩码><子网的广播地址>

2.配置交换机的端口 (Cisco IOS交换机)

进入端口配置模式:switch(config)#interface<端口类型><槽位号/端口号>

配置端口描述:switch(config-if)#description<描述信息>

Switch6509>(enable)set port name<槽位号/端口号><描述信息>

启用和禁用端口:switch(config-if)#(no)shutdowm

Switch6509>(enable) set port enable<槽位号/端口号> Switch6509>(enable)set port disable<槽位号/端口号>

配置端口双工模式:switch(config-if)#duplex{auto|full|full-flow-control|half}

Switch6509>(enable)set port duplex<槽位号/端口号>{auto|full|half}

配置端口速率:switch(config-if)speed{10|100|1000|auto}

Switch(config-if)#set port speed<槽位号/端口号>{10|100|1000|auto}

交换机VLAN配置

1.配置VTP

(Cisco IOS):

①config t 进入全局配置状态

②vtp domain domain_name 配置交换机的VTP工作 ③vtp mode {server|client|tranparent} 模式,默认是Server模式

(CatOS系统)

①S6500>(enable)set vtp domain domain_name 配置VTP域的域名 ②S6500>(enable)set vtp mode{server|client|transparent|off}

配置交换机的VTP工作模式

2.创建VLAN

(Ciso IOS):

①configure terminal 进入全局配置状态 ②vlan vlan-id name vlan-name

(CatOS系统)

S6500>(enable)set vlanname

3.为交换机端口分配VLAN (Cisco IOS)

①configure terminal 进入全局配置模式 ②interface interface 进入端口配置模式

③switchport modeaccess 设置端口为access端口 ④switchportaccess vlan vlan-id 为端口指定vlan-id

(CatOS系统)

S6500>(enable)set vlan<槽位号/端口号>

4.VLAN Trunk的配置 (Cisco IOS)

①configure terminal 进入全局配置模式 ②interface interface-id 进入端口配置模式 ③switchport mode trunk 设置端口为trunk模式 ④switchport trunk encapsulation{is1|dot1 q|negotiate P}

⑤switchport trunk allowec vlan{add vlan-list|all|except vlan-list|

CatOS系统

①S6500>(enable)set trunk<槽位号/端口号>on {is1|dot1 q}

②S6500>(enable)set trunk<槽位号/端口号>vlan定义trunk允许的VLAN

交换机STP的配置

打开STP 关闭STP 根网桥 备份根网桥 生成树优先级 允许BackboneFast 不允backboneFast UplinkFast 许catalyst 3500 (Cisco ISO系统) spanning-tree vlan no spanning-tree vlan spanning-tree vlan root primary spanning-tree vlan root secondary spanning-tree priority<0-61440> vlan catalyst 6500 (CatOS系统) set spantree enable set spantree disable set spantree root set spantree root secondary set spantree priority set spantree backbonefast enable set spantree backbonefast disable set spantree uplinkfast enable set spantree uplinkfast enable rate spanning-tree backbonefast spanning-tree uplinkfast max-update-rate <0-32000> spanning-tree uplinkfast

因篇幅问题不能全部显示,请点此查看更多更全内容