cisco 交换机的基本配置
2010-07-30 12:05
369 查看
1.进入特权模式:
Switch>enable 进入特权模式
Switch#
2.进入全配置模式:
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
3. 修改交换机的名称为s2:
Switch(config)#hostname s2
s2(config)#
s2(config)#exit 退出此模式
4. 设置交换机enable密码:
s2(config)#enable password 123456 设置明文密码为:123456
s2(config)#enable secret 123 设置密文密码为:123
注:密文密码的优先级高于明文密码,同时设定密文生效
5.进入line的配置 模式:
s2(config)#line console 0 进入console口的配置
s2(config-line)#
s2(config)#exit 退出此模式
6.设置交换机console密码:
s2(config-line)#password 123 给console口设置密码为:123
s2(config-line)#login 激活设置的密码
s2(config)#exit 退出此模式
7.进入接口配置模式:
s2(config)#interface f0/24 进入端口(f0/24)
s2(config-if)#
s2(config)#exit 退出此模式
8.创建vlan:
1).在vlan数据库模式下创建:
s2#vlan database 进入vlan数据库
s2(vlan)#vlan 40 name jishu 创建名为:技术的vlan
VLAN 40 modified:
Name: jishu 表示成功创建vlan 40名为jishu
s2(vlan)#no vlan 40 name jishu 删除名为:技术的vlan 40
s2(vlan)#exit 保存并退出vlan数据库模式
2).在全局配置模式下创建:
Switch(config)# vlan 10 创建vlan 10
Switch(config)# no vlan 10 删除vlan 10
9.配置trunk接口:
s2(config)#interface f0/24 进入要设置的端口(f0/24)
s2(config-if)#switchport mode trunk 将端口进行trunk设置
s2(config-if)#no shutdown 激活此端口
switchport mode trunk 将端口进行trunk设置
注:trunk为了实现不同交换机的同一vlan相互通信
10.为交换机设置网关:
s2(config)#ip default-gateway 192.168.1.1 设置网关(注:网关的ip必须和路由器的内接口一致)
11. 保存配置
s2#copy running-config startup-config 将配置保存与wr效果一样!
Destination filename [startup-config]?
Building configuration...
[OK] 表示已经保存
本文出自 “让我们一起成长!” 博客,请务必保留此出处http://goutao.blog.51cto.com/1917611/363398
Switch>enable 进入特权模式
Switch#
2.进入全配置模式:
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
3. 修改交换机的名称为s2:
Switch(config)#hostname s2
s2(config)#
s2(config)#exit 退出此模式
4. 设置交换机enable密码:
s2(config)#enable password 123456 设置明文密码为:123456
s2(config)#enable secret 123 设置密文密码为:123
注:密文密码的优先级高于明文密码,同时设定密文生效
5.进入line的配置 模式:
s2(config)#line console 0 进入console口的配置
s2(config-line)#
s2(config)#exit 退出此模式
6.设置交换机console密码:
s2(config-line)#password 123 给console口设置密码为:123
s2(config-line)#login 激活设置的密码
s2(config)#exit 退出此模式
7.进入接口配置模式:
s2(config)#interface f0/24 进入端口(f0/24)
s2(config-if)#
s2(config)#exit 退出此模式
8.创建vlan:
1).在vlan数据库模式下创建:
s2#vlan database 进入vlan数据库
s2(vlan)#vlan 40 name jishu 创建名为:技术的vlan
VLAN 40 modified:
Name: jishu 表示成功创建vlan 40名为jishu
s2(vlan)#no vlan 40 name jishu 删除名为:技术的vlan 40
s2(vlan)#exit 保存并退出vlan数据库模式
2).在全局配置模式下创建:
Switch(config)# vlan 10 创建vlan 10
Switch(config)# no vlan 10 删除vlan 10
9.配置trunk接口:
s2(config)#interface f0/24 进入要设置的端口(f0/24)
s2(config-if)#switchport mode trunk 将端口进行trunk设置
s2(config-if)#no shutdown 激活此端口
switchport mode trunk 将端口进行trunk设置
注:trunk为了实现不同交换机的同一vlan相互通信
10.为交换机设置网关:
s2(config)#ip default-gateway 192.168.1.1 设置网关(注:网关的ip必须和路由器的内接口一致)
11. 保存配置
s2#copy running-config startup-config 将配置保存与wr效果一样!
Destination filename [startup-config]?
Building configuration...
[OK] 表示已经保存
本文出自 “让我们一起成长!” 博客,请务必保留此出处http://goutao.blog.51cto.com/1917611/363398
相关文章推荐
- Cisco 2950交换机基本配置命令
- Cisco路由器&交换机基本配置(不定时补充)
- Cisco 交换机基本配置命令
- Cisco 的基本配置实例之四----vlan的规划及配置(接入交换机)
- Cisco 的基本配置实例之五----交换机的路由功能与DHCP 功能
- Cisco 交换机配置的基本命令
- 【cisco实验】练习 2.3.8: 配置基本交换机管理
- 第2章,Cisco Packet Tracer系列之--交换机的基本配置与管理
- CISCO路由器的基本初始配置
- 配置基本的Cisco MPLS Using OSPF
- CISCO 交换机 VLAN配置思路
- 交换机的基本配置
- 交换机vlan基本配置
- 交换机的基本配置与管理
- cisco路由器基本实验之二 默认路由的配置(Boson NetSim)
- CISCO学习笔记(一)各种线缆介绍及路由基本配置
- cisco 交换机端口默认配置是可以与trunk口形成trunk的
- cisco路由器基本实验之一 静态路由的配置(Boson NetSim)