博达 - S3528 - 基础配置命令

更新时间:2024-03-11 17:24:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

#保存配置

Switch#write //管理模式下 或者

Switch_config#write //全局模式下

#tftp上传

Switch _config#tftp-server //tftp功能使能 Switch #copy tftp flash

Source file name[]?main.bin

Remote-server ipaddress[]?192.168.255.8 //同网段才可以上传 Destination file name[main.bin]?switch.bin

#更改AAA认证登录的用户名和密码

switch_config#aaa authentication login default local switch_config#usernamedahua password dahua

#更改当前设备IP

monitor#ip address 171.2.2.247 255.255.0.0 switch_config#interfacevlan 1

switch_config_v1#ip address 171.2.2.247 255.255.0.0 switch_config_v1#quit

#更改telnet参数 //telnet默认打开

Switch _config#ip telnet source-interface vlan1 //telnet 连接均使用 vlan1 接口

Switch _config#ip telnet listen-port 3001 3005 //除23外,3001到3005的所有端口上接收telnet连接 Switch _config#ip telnet script s1 ‘login:’switch ‘Password:’ test //配置s1的登录脚本

#VTY配置

switch_config# line vty2 3 //进入VTY的2至3号线路配置态 switch_config_line#attach-port 3005 //将3005侦听端口绑定到 line vty 2 3 switch#clear line vty2 //清除指定的线路

#SSH配置

switch_config# ip access-list standard ssh-acl //配置名为ssh-acl的访问控制列表

switch_config_std#permit 192.168.0.7

switch_config#aaa authentication login ssh-auth local //设置认证方式 switch_config#ipsshdauth-method ssh-auth //设置认证方法列表 switch_config#ipsshd access-class ssh-acl //为ssh server配置访问控制列表 switch_config#ipsshd enable

#设置登录密码认证

switch_config#aaa authentication login default local switch_config#usernamedahua password dahua

#显示异常中断信息 switch#show break

#显示日志

switch# show logging

#显示当前配置

Switch#show running-config 可适当过滤

Switch#show running-config | include interface //显示当前配置中与端口有关的信息 Switch#show running-config | include ip //显示当前配置中与ip有关的信息

#显示当前配置文件

Switch#show configuration

#显示动态MAC地址表

Switch_config#show mac address-table

#显示动态ARP表

Switch_config#show arp

#VLAN操作

创建/删除vlan

Switch_config#vlan word Switch_config#novlan word

配置交换机端口

Switchportpvidvlanid配置交换机端口的vlan id

Switchport mode 配置交换机的端口模式,博达交换机以太口默认的模式是access Switchport trunk vlan-allowed 端口允许通过vlan的范围 Switichport trunk vlan-untagged 端口untag的范围

创建/删除vlan接口 Interface vlanvlan-id No interface vlanvlan-id

Switch>enable Switch#config

Switch_config#vlan 2

Switch_config_vlan2#quit

Switch_config#interfacefastEthernet 0/2

//Switch_config_f0/2#switchport mode access //Switch_config_f0/2#switchport pvid 2 Switch_config_f0/2#switchport mode trunk Switch_config_f0/2#switchport pvid 2

Switch_config_f0/2#Switchport trunk vlan-allowed 3 - 5 //输入的 list 以‘,’和‘-’作分隔 Switch_config_f0/2#switchport trunk vlan-untagged 3

#SNMP操作 Switch>enable Switch#config

Switch_config#snmp-server view mib2 mib-2 included Switch_config#snmp-server view mib2 mib-2.atexcluded

本文来源:https://www.bwwdw.com/article/g908.html

Top