华三基础--清除配置、路由、SSH、VLAN、RSTP、ACL

清除配置

1、reset saved-configuration

The saved configuration file will be erased. Are you sure? [Y/N]:y 

保存的配置文件将被擦除。你确定吗?[Y / N]: Y

2、reboot   (重启才会生效)

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration may be lost after the reboot, save current configuration? [Y/N]:n

使用下一个启动配置文件开始检查配置,请等待.........DONE!

当前配置可能在重启后丢失,是否保存当前配置?[Y / N]: N

n   不保存配置

This command will reboot the device. Continue? [Y/N]:y

该命令将重新启动设备。继续吗?[Y / N]: Y

y  确认重启

保存配置

save 

y

清除某个接口配置

int g 1/0/1

default 

y

This command will restore the default settings. Continue? [Y/N]:y

此命令将恢复默认设置。继续吗?[Y / N]: Y

VLAN

1、创建vlan

2、添加IP

3、将端口添加到vlan中

vlan实验--基于端口:

PC_A:192.168.100.1/24
PC_B:192.168.100.2/24
PC_C:192.168.100.3/24
PC_D:192.168.100.4/24

未配置vlan前,均能ping通,配置后,同vlan通

SWA、SWB 配置均为

sy

vlan 100

port g 1/0/1

qu

vlan 200

port g 1/0/2

qu



int g 1/0/3

port link-t t

port tr per vlan 100 200

qu

查看

路由

1、静态路由

SW-B要去PC-12,静态路由怎么写

ip route-static 1.1.2.0   255.255.255.0   1.1.4.1

                        目的地址   掩码              下一跳

2、缺省路由

ip route-static 0.0.0.0   0.0.0.0   1.1.4.1

3、接口添加IP

4、查看

查看路由信息

display ip routing-table

查看Switch B的静态路由信息

 display ip routing-table protocol static

SSH

1、配置管理IP

int vlan 1

undo shutdown

ip add 192.168.3.66 24

qu

2、开启ssh服务,并创建秘钥

ssh server  enable

public-key local create rsa      

public-key local create dsa     

3、创建ssh用户密码、级别

local-user xy                                      

password simple aabbcc@123          

authorization-attribute user-role network-admin 

service-type ssh                                                                          

qu

authorization-attribute   授权属性

4、vty登录认证

user-interface vty 0 5            

authentication-mode scheme

protocol inbound ssh

qu

5、保存配置

save

6、验证

显示ssh会话   dis ssh server session

STP

1、默认是开了stp的,要先关了

undo stp global enable

dis stp  brief

2、在ping是不通的

3、在开启stp

stp mode rstp

stp global enable

4、在ping是通的

5、查看

dis stp bri

dis stp root

6、其他

① 修改优先级

stp priority 0

② 修改端口开销

int g 1/0/2

stp cost 50

③ 配置边缘端口

int g 1/0/3

stp edged-port

ACL

工作时间为每周工作日的8点到18点。通过配置,允许总裁办在任意时间、财务部在工作时间访问财务数据库服务器,禁止其它部门在任何时间、财务部在非工作时间访问该服务器

sy

time-range work_001  08:00 to 18:00  working-day



acl advanced 3000



rule permit ip source 192.168.1.0  0.0.0.255  destination   192.168.56.4  0



rule permit ip source 192.168.2.0  0.0.0.255  destination   192.168.56.4  0  time-range work_001



rule deny ip source any destination  192.168.56.4  0

qu



int g 1/0/10

packet-filter  3000 outbound

qu



查看

dis acl 3000

  • 3
    点赞
  • 59
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值