交换机的基本配置

2025-05-25 06:09:37

1、设备命名Switch>enab 特权模式Switch#conf t 全局配置模式Switch(config)#host SWITCH-A 配置主机名SWITCH-A(config)#no host 恢复系统默认名称Switch(config)#

交换机的基本配置

2、Console口密码配置Switch(config)#line console 0 进放console 0接口线配置模式Switch(config-line)#password 123 为conslole 接口配置密码“123”Switch(config-line)#login 允许通过本地登录,如果没有这此命令则口令不生效Switch(config-line)#no password 清除conslole 0接口密码

交换机的基本配置

3、特权密码Switch(config)#enable password 123 配置交换机特权密码为“123” 明文形式保存Swit艘早祓胂ch(config)#no enab password 删除特权明文密码Switch(config)#enab secret 123 配置交换机特权密码为“123”以密文形式保存Switch(config)#no enab secret 123 删除特权密文密码Switch(config)#Service password-encryption 加密码系统所有口令

4、IP地址配置Switch(config)#inter酆璁冻嘌face vlan 1 进入vlan 1虚拟接口Switc茑霁酌绡h(config-if)#ip address 192.168.1.1 255.255.255.0 配置交换机IP地址为:192.168.1.1Switch(config-if)#no shutdown 打开交换机vlan 1接口, IP地址生效Switch(config-if)#no ip address 删除vlan 1配置的IPSwitch(config-if)#exit 返回上一级特权模式Switch#show vlan id 30 查看vlan 30的状态Switch#show vlan 查看交换机里全部的vlan

5、网关配置Switch(config)#ip default-gateway 192.168.1.254 配置交换机的默认网关Switch(config)#no ip default-gateway 删除网关地址Switch# show ip def 查看交换机的默认网关

6、交换机端口模式和速度配置Switch(config)#interface f0/1 进入F0/1接口配置模式Switch(config-if)#duplex full 配置双工模式为全双工Switch(config-if)#speed 100 配置速度为100双工模式:auto:自动协商模式 full:全双工 half:半双工端口速率:Auto:自动协商 10Mb/s 100Mb/s

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢