多语言展示
当前在线:1132今日阅读:179今日分享:36

交换机的基本配置

1.设备命名2.密码设置3.IP地址配置4.默认网关配置5.端口速率配置
工具/原料
1

电脑

2

思科模拟器

方法/步骤
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” 明文形式保存Switch(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)#interface vlan 1       进入vlan 1虚拟接口Switch(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

推荐信息