3层交换机基本配置

上传人:woxinch****an2018 文档编号:38982514 上传时间:2018-05-10 格式:DOC 页数:7 大小:40KB
返回 下载 相关 举报
3层交换机基本配置_第1页
第1页 / 共7页
3层交换机基本配置_第2页
第2页 / 共7页
3层交换机基本配置_第3页
第3页 / 共7页
3层交换机基本配置_第4页
第4页 / 共7页
3层交换机基本配置_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《3层交换机基本配置》由会员分享,可在线阅读,更多相关《3层交换机基本配置(7页珍藏版)》请在金锄头文库上搜索。

1、基本配置 S enable 进入特权模式 S# configure terminal 进入全局配置模式 S(config)# hostname name 改变交换机名称 S(config)# enable password level level_# password 设置用户口令 (level_#=1)或特权口令(level_#=15) S(config)# line console 0 进入控制台接口 S(config-line)# password console_password 接上一条命令,设置控制台口 令 S(config)# line vty 0 15 进入虚拟终端 S(con

2、fig-line)# password telnet_password 接上一条命令,设置 Telnet 口 令 S(config-line)# login 允许 Telnet 登录 S(config)# enable password|secret privilege_password 配置特权口令(加 密或不加密) S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式 S(config-if)# no shutdown 关闭或启用该接口(默认启用) S(config)# ip a

3、ddress IP_address sunbet_mask 指定 IP 地址 S(config)# ip default-gateway routers_IP_address 指定哪台路由器地址 为默认网关 S# show running-config 查看当前的配置 S# copy running-config startup-config 将 RAM 中的当前配置保存到 NVRAM 中 S show interface type slot_#/port_# 查看所有或指定接口的信息 S show ip 显示交换机的 IP 配置(只在 1900 系列上可用) S show version 查

4、看设备信息 S# show ip interface brief 验证 IP 配置 S(config-if)# speed 10|100|auto 设置接口速率 S(config-if)# duplex auto|full|half 设置接口双工模式 S show mac-address-table 查看 CAM 表 S# clear mac-address-table 清除 CAM 表中的动态条目 1900(config)# mac-address-table permanent MAC_address type slot_#/port_# 在 CAM 表中创建静态条目 2950(confi

5、g)# mac-address-table static MAC_address vlan VLAN_# interface type slot_#/ port_# 在 CAM 表中创建静态条目 1900(config)# mac-address-table restricted static MAC_address source_port list_of_allowed_interface 设置静态端口安全措施 1900(config-if)# port secure 启用粘性学习 1900(config-if)# port secure max-mac-count value 设置粘性学习

6、特性能够 学到的地址数量(默认 132,取值范围是 1-132) 1900(config)# address-violation suspend|ignore|disable 改变安全选项 1900 show mac-address-table security 验证端口安全措施 2950(config)# switchport mode access 定义接口为主机端口而不是中继端口2950(config)# switchport port-security 启用端口安全措施 2950(config)# switchport port-security maximum value 指定可与此

7、接口相 关的设备的最大数量 2950(config)# switchport port-security violation protect|restrict|shutdown 指定出现安全违规时应该发生的事 2950(config)# switchport port-security mac-address MAC_address 指定允 许与此接口相关的确切的 MAC 地址 2950(config)# switchport port-security mac-address sticky 启用粘性学 习特性 2950(config)# show port interface type sl

8、ot_#/ port_# 验证接口配置 2950(config-if) description name 设置接口描述信息 2950# show buffers 查看系统缓存的大小 1900# copy nvram tftp:/ IP_address_of_TFTP_server/ file_name 将配置 文件备份到 TFTP 服务器上 1900# copy tftp:/ IP_address_of_TFTP_server/ file_name nvram 从 TFTP 服务器上恢复配置到 NVRAM 1900# delete nvram 删除配置文件 2950# erase startu

9、p-config 删除配置文件 3550# show tcam qos TCAM_ID statistics 查看 TCAM 剩余容量 4000 enable 进入特权模式 4000(enable) set password 设置用户模式密码 4000(enable) set enablepass 设置授权密码 4000(enable) set interface sc0 IP_address mask 配置 IP 地址 4000(enable) set port enable|disable slot_#/port_# 启用/禁用接口 4000(enable) show port slot_

10、#/port_# 显示接口信息 4000(enable) set port name slot_#/port_# name 设置交换机接口描述信息 4000(enable) set port speed slot_#/port_# 4|10|16|100|auto 设置交换 机接口速率 4000(enable) set port duplex slot_#/port_# full|half 设置交换机接口 双工模式 4000(enable) clear config all 删除 NVRAM 中的配置信息 4000(enable) erase all 删除 FLASH 中的内容 4000(en

11、able) show flash 显示 FLASH 中的内容 4000(enable) show cam count dynamic|static|permanent|system vlan_# 显示 CAM 表 VLAN 1900(config)# vtp domain VTP_domain_name 定义交换机域名 1900(config)# vtp server|client|transparent 定义交换机 VTP 模式(默认 服务器) 1900(config)# vtp password VTP_password 配置 VTP 口令 1900(config)# vtp prunin

12、g enable|disable 启用/禁用修剪(默认启用) 1900(config)# vtp trap enable 启用 SNMP 陷阱(默认启用) 1900# show vtp 验证 VTP 配置 2950# vtp database 访问 VLAN 和 VTP 配置(以下均是在 IOS12.1 前用,12.1 后全是在全局配置模式下)2950(vlan)# vtp domain VTP_domain_name 定义交换机域名 2950(vlan)# vtp server|client|transparent 定义交换机 VTP 模式(默认服 务器) 2950(vlan)# vtp p

13、assword VTP_password 配置 VTP 口令 2950(vlan)# vtp pruning 启用/禁用修剪(默认启用) 2950(config)# snmp-server enable traps vtp 启用 SNMP 陷阱(默认启用) 2950# show vtp status 检查 VTP 配置 2950# show vtp counters 显示与 VTP 消息发送与接收相关的 VTP 统计信息 1900(config-if)# trunk on|off|desirable|auto 指定中继类型 1900# show trunk A|B 验证接口中继(A 是 fa0

14、/26,B 是 fa0/27) 2950(config-if)# switchport mode trunk|dynamic desirable|dynamic auto|nonegotiate 指定中继类型(默认自动协商) 2950(config-if)# switchport trunk native|allowed|pruning vlan VLAN_# 配置中继 2950(config-if)# switchport trunk pruning vlan remove VLAN_# 清除不希 望消减的 VLAN 2950# show interfaces type 0/port_# s

15、witchport|trunk 验证接口中继 1900(config)# vlan VLAN_# name VLAN_name 创建 VLAN 1900(config-if)# vlan-membership static VLAN_# 将该接口静态地分配给一 个 VLAN 1900# show vlan 验证 VLAN 1900# show vlan-membership 查看 VLAN 成员关系 1900# show spantree VLAN_# 查看 VLAN 的 STP 信息 2950# vlan database 进入 VLAN 数据库(ISO12.1 前用) 2950(vlan)

16、# vlan VLAN_# name VLAN_name 创建 VLAN 2950(config)# vlan VLAN_# 进入 VLAN 数据库(ISO12.1 后用) 2950(config-vlan)# name VLAN_name 创建 VLAN 2950(config-if)# switchport mode access 指定连接是接入链路连接 2950(config-if)# switchport access vlan VLAN_# 指定 VLAN 是接入链路连 接 4000(enable) set vlan VLAN_# name VLAN_name 配置 VLAN 4000(enable) set vlan VLAN_# slot_#/port_#-port_# 为 VLAN 分配端口 4000(enable) set trunk slot_#/port_# on|off|desirable|auto|nonegotiate VLAN_#

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号