ACL访问控制实验与NAT实验

ACL访问控制实验

在这里插入图片描述
在这里插入图片描述

SW1代码:

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys LSW1
[LSW1]
Apr 13 2021 16:55:52-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 4, the 
change loop count is 0, and the maximum number of records is 4095.
[LSW1]undo inf	
[LSW1]undo info-center e	
[LSW1]undo info-center enable 
Info: Information center is disabled.
[LSW1]int e0/0/1
[LSW1-Ethernet0/0/1]p l a
[LSW1-Ethernet0/0/1]p d v 10   //给1接口打上vlan10
Error: The VLAN does not exist.
[LSW1-Ethernet0/0/1]q
[LSW1]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]int e0/0/1
[LSW1-Ethernet0/0/1]p l a
[LSW1-Ethernet0/0/1]p d v 10   //1接口打上vlan10
[LSW1-Ethernet0/0/1]int e0/0/3
[LSW1-Ethernet0/0/3]p l a
[LSW1-Ethernet0/0/3]p d v 10   //3接口打上vlan10
[LSW1-Ethernet0/0/3]int e0/0/2
[LSW1-Ethernet0/0/2]p l a
[LSW1-Ethernet0/0/2]p d v 20       //2接口打上vlan20
[LSW1-Ethernet0/0/2]int e0/0/4
[LSW1-Ethernet0/0/4]p l a
[LSW1-Ethernet0/0/4]p d v 20         //4接口打上vlan20
[LSW1-Ethernet0/0/4]
<LSW1>
<LSW1>sys
Enter system view, return user view with Ctrl+Z.
[LSW1]int e0/0/5 
[LSW1-Ethernet0/0/5]p l t
[LSW1-Ethernet0/0/5]p t a v a       //给5接口打通隧道
[LSW1-Ethernet0/0/5]int e0/0/1
[LSW1-Ethernet0/0/1]q
[LSW1]acl num 2000                  //使用编号创建一个基本acl 
[LSW1-acl-basic-2000]rule 5 source 192.168.1.0 0.0.0.255
                            ^
Error: Unrecognized command found at '^' position.
[LSW1-acl-basic-2000]rule 5 deny source 192.168.1.0 0.0.0.255   //创建一个规则
[LSW1-acl-basic-2000]q
[LSW1]int e0/0/2
[LSW1-Ethernet0/0/2]traffi	
[LSW1-Ethernet0/0/2]traffic-f	
[LSW1-Ethernet0/0/2]traffic-filter out	
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值