思科交换机常用命令及配置
1:进入特权模式enable
switch> enable
switch#
2:进入全局配置模式configure terminal
switch> enable
switch#configure terminal
switch(conf)#
3:交换机命名hostname name 以cisco001 为例
switch> enable
switch#c onfigure terminal
switch(conf)#hostname cisco001
cisco001(conf)#
4:配置使能口令(未加密)enable password cisco 以cisco 为例
switch> enable
switch#configure terminal
cisco001(conf)# enable password cisco
5:配置使能密码(加密)enable secret ciscolab 以cicsolab 为例
switch> enable
switch#configure terminal
switch(conf)# enable secret ciscolab
6:设置虚拟局域网vlan 1 interface vlan 1
switch> enable
switch#configure terminal
switch(conf)# interface vlan 1
switch(conf)# ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码
switch (conf-if)#no shut 激活端口
switch (conf-if)#exit
switch (conf)#ip default-gateway 192.168.254 设置网关地址
7: >>查看全文