cisco交换机初始化及一般命令

今天初始化了一下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

cisco交换机是网络中常用的设备之一,配置和维护它对于网络稳定和安全非常重要。以下是一些常用的cisco交换机配置和日常维护的命令: 1. 查看交换机配置: - show running-config:显示当前运行中的配置信息。 - show startup-config:显示启动配置文件中的配置信息。 - show vlan:显示VLAN的配置信息。 - show interfaces:显示接口的配置及状态信息。 - show ip interface brief:显示接口的IP地址和状态信息。 2. 配置交换机: - configure terminal:进入全局配置模式。 - interface interface_name:进入接口配置模式。 - switchport mode access/trunk:配置接口为访问端口或干道端口。 - switchport access vlan vlan_id:配置访问端口所属的VLAN。 - switchport trunk allowed vlan vlan_range:配置干道端口允许传送的VLAN范围。 - ip address ip_address subnet_mask:配置接口的IP地址和子网掩码。 - vlan vlan_id:创建或配置VLAN。 3. 日常维护: - shutdown:关闭接口。 - no shutdown:启用接口。 - reload:重新启动交换机。 - copy running-config startup-config:保存当前的配置到启动配置文件中。 - ping ip_address:测试与指定IP地址的连通性。 - traceroute ip_address:追踪到指定IP地址的网络路径。 以上只是一些常用的cisco交换机配置和日常维护的命令,根据实际需求和网络环境的不同,可能会有其他命令和配置操作。为了确保网络的可靠性和安全性,操作前请谨慎,并根据官方文档或专业人士的建议进行操作。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值