今天初始化了一下cisco交换机,记录一下过程:
使用console线连上交换机,我用的SCRT连接
有密码的情况下:
1.进入enable模式
2.输入erase startconfig命令,初始化交换机
3.输入reload命令重新读取配置文件重启
没密码的情况下:
1.关闭交换机,按住mode键,插上电源
2.等到SCRT有显示,松开mode键
P.S.网上有说需要执行flash_init命令,我这没有。。。直接开始了初始化
Would you like to enter the initial configuration dialog? [yes/no]
这里建议选择yes,选择yes以后,后面会要求你输入一些东西,方便了不少,省的一个个去配置。具体如下
Enter a hostname for the device. 输入一个名字
Enter an enable secret password. 输入一个进入enable模式的密码
Enter an enable password that is different from the enable secret password. 这个密码貌似忘记enable模式密码的时候用到的
Enter a virtual terminal password. 除了console口登陆都要输入这个密码
SNMP 选择no
Enter interface name used to connect to the management network from the above interface summary 我选择了vlan1,就是默认的
Configure IP on this interface? 必须要配置IP啊,不然怎么登陆
Subnet mask for this interface [255.255.0.0] : netmask,按自己网络配
Would you like to enable as a cluster command switch? 集群模式
最后有一个保存配置选项,忘记复制下来了,反正选择2.。。。T-T
一些常用的交换机命令,都是我这经常用的,仅供参考:
1.查看所有端口情况
show ip int brief
2.通过IP地址查端口,网口插满的情况下,没做标签就靠这了
show arp | include 192.168.0.54
show mac address-table | include 9a9e.21d7
3.划分vlan
inter Gi1/0/X
switchport access vlan XX
批量划分vlan
interface range gigabitEthernet 1/0/1-24
switchport access vlan XX
划分完记得退出config,wr保存配置
4.telnet登录
line vty 0 4
password **
login
5.查看vlan
show vlan brief