锐捷三层交换机命令大全

  • 格式:docx
  • 大小:14.41 KB
  • 文档页数:5

下载文档原格式

  / 5
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

交换机>Enable 进入特权模式

#Exit 返回上一级操作模式

#E nd 返回到特权模式 #write memory 或 copy

running-config startup-config

#del flash:con fig.text

#erase startup-c onfig #del flash:vla n. dat

#Con figure termi nal (con fig)# host name switchA (con fig)#ba nner motd & (con fig)#e nable secret

level 1 0 star

(con fig)#e nable secret level 15 0 star

Level 1为普通用户级别,可选为1~15, 加密

(con fig)#e nable services web-server

Services 可选以下:web-server(WEB 管

理)、telnet-server(

远程登陆)等 查看信息

#show runnin g-co nfig 查看当前生效的配置信息

#show in terface fastethernet 0/3 查看 F0/3 端口信息

#show in terface serial 1/2 查看 S1/2 端口信息

#show in terface 查看所有端口信息

#show ip in terface brief 以简洁方式汇总查看所有端口信息

#show ip in terface 查看所有端口信息

#show version 查看版本信息

#show mac-address-table 查看交换机当前MAC 地址表信息

#show runnin g-co nfig 查看当前生效的配置信息

#show vlan 查看所有VLAN 言息

#show vlan id 10 查看某一 VLAN (如 VLAN10的信息

#show in terface fastethernet 0/1 switchport

查看某一端口模式 (如 F 0/1)

#show aggregateport 1 summary 查看聚合端口 AG1 的信息

#show spa nnin g-tree 查看生成树配置信息

#show spa nnin g-tree in terface fastethernet 0/1 查看该端口的生成树 状态

#show port-security 查看交换机的端口安全配置信息

#show port-security address 查看地址安全绑定配置信息

#show ip access-lists list name

查看名为list name 的列表的配置信息 #show access-lists

端口的基本配置 保存配置文件

删除配置文件(交换机及1700系列路由器) 删除配置文件(2500系列路由器) 删除Vian 配置信息(交换机)

进入全局配置模式 配置设备名称为switchA 配置每日提示信息&为终止符 配置远程登陆密码为star 配置特权密码为star 15为最高权限级别;0表示密码不 开启交换机WEB 管理功能

(config)#l nterface fastethernet 0/3 进入F0/3 的端口配置模式

(co nfig)# in terface ran ge fa 0/1-2,0/5,0/7-9 进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式

(co nfig-if)#speed 10 配置端口速率为10M,可选10,100,auto

(config-if)#duplex full 配置端口为全双工模式,可选full( 全双

工),half(半双式),auto(自适应)

(con fig-if)# no shutdow n 开启该端口

(config-if)#switchport access vlan 10 将该端口划入 VLAN10中,用于 VLAN

(config-if)#switchport mode trunk 将该端口设为 trunk 模式,用于 Tag vla n

可选模式为 access , trunk

(config-if)#port-group 1 将该端口划入聚合端口 AG1中,用于聚合端口 聚合端口的创建

(con fig)# in terface aggregateport 1

(con fig-if)# switchport mode trunk

(con fig)#i nt fO/23-24 (con fig-if-ra nge)#port-group 1 生成树

(con fig)#spa nnin g-tree 开启生成树协议

(config)#spanning-tree mode stp 指定生成树类型为 stp

可选模式 stp , rstp , mstp

(config)#spanning-tree priority 4096 设置交换机的优先级为 4096 ,优 先级值小为高。优先级可选值为 0, 4096, 8192,……,为4096的倍数。交换 机默认值为32768

VLAN 的基本配置

(config)#vlan 10 创建 VLAN10

(config-vlan)#name vlanname 命名 VLAN 为 vlanname

(config-if)#switchport access vlan 10 将该端口划入 VLAN1冲

某端口的接口配置模式下进行

(co nfig)# in terface vlan 10 进入 VLAN 10 的虚拟端口配置模式

(config-if)# ip address 192.168.1.1 255.255.255.0 为 VLAN10的虚拟 端口配置IP 及掩码,二层交换机只能配置一个IP ,此IP 是作为管理IP 使用, 例如,使用Telnet 的方式登录的IP 地址

(con fig-if)# no shutdow n 启用该端口

端口安全

(con fig)# in terface fastethernet 0/1 进入一个端口

(con fig-if)# switchport port-security 开启该端口的安全功能

1 •配置最大连接数限制

(con fig-if)# switchport port-secruity maxmum 1

配置端口的最大连接 数为1,最大连接数为128

(config-if)# switchport port-secruity violation shutdown

配置安全违例的处理方式为shutdown,可选为protect (当安全地址数满后, 将未知名地址丢弃)、restrict( 当违例时,发送一个 Trap 通知)、shutdown(当 违例时将端口关闭,并发送Trap 通知,可在全局模式下用errdisable recovery 来恢复)

2. IP 和MAC 地址绑定

(con fig-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 创建聚合接口 AG1 配置并保证AG1为trunk 模式

将端口(端口组)划入聚合端口 AG1中