首页 map[addtime:<nil> column:0 data:{"status":0,"msg":"","data":{"data":{"banner":[{"image":"/assets/upload/2024/10/09/8321b9b943cd4f57fe891334012bebb1.png","t1":"感恩有你,未来可期","t2":"","t3":"/p/2802"}],"name1":"新闻资讯"}}} data2:<nil> description:16年IT服务经验-全国服务电话:400-017-5181 featured: id:1 illustrate:新闻资讯 keywords:同创双子公司新闻, 同创双子,同创双子怎么样,同创双子公司,成都同创双子,北京同创双子,同创双子最新新闻 name:新闻资讯 orders:1 state:true tag:<nil> templateslist:{ "controls": [ { "name": "data.name1", "label": "简单标题", "type": "input-text" }, { "type": "combo", "name": "data.banner", "label": "轮播", "multiple": true, "draggable": true, "items": [ { "name": "t1", "label": "标题", "type": "input-text" }, { "name": "t2", "label": "时间", "type": "input-text" }, { "name": "t3", "label": "连接", "type": "input-text" }, { "type": "input-image", "name": "image", "label": "配图", "receiver": "./api/upload?rich=2" } ] } ] } templatespage:{ "controls": [ { "label": "推荐等级", "type": "select", "name": "featured", "options": [ { "label": "不推荐", "value": 0 }, { "label": "首页推荐", "value": 1001 } ] }, { "type": "group", "body": [ { "name": "data.listimg", "label": "列表图片", "receiver": "./api/upload?rich=2", "type": "input-image" }, { "name": "data.img", "label": "首页图片", "receiver": "./api/upload?rich=2", "type": "input-image" } ] }, { "type": "input-rich-text", "name": "data.body", "label": "文章内容1", "receiver": "post:./api/upload?rich=1" } ] } title:新闻资讯-同创双子(北京)信息技术股份有限公司 tmpllist:list tmplpage:page url:news] > 新闻资讯 map[addtime:<nil> column:1 data:{"status":0,"msg":"","data":{"data":{"banner":[{"image":"/assets/upload/2023/12/13/3e1643bd17c60956f27ddf735eb3048d.png","t1":"桌面运维是什么?外包好还是自招好","t3":"https://www.itgemini.net/p/2613"},{"image":"/assets/upload/2023/12/13/d52a5f367538356cbcbfbbf727a5e0a7.png","t1":"什么是系统集成?同创双子可以做哪些系统集成服务","t3":"https://www.itgemini.net/p/2611"}],"name1":"干货分享"}}} data2:<nil> description:16年IT服务经验-全国服务电话:400-017-5181 featured: id:3 illustrate:干货分享 keywords:同创双子公司新闻, 同创双,同创双子公司,成都同创双子,北京同创双子,同创双子最新新闻,电脑卡顿,电脑故障,网络故障 name:干货分享 orders:1 state:true tag:<nil> templateslist:{ "controls": [ { "name": "data.name1", "label": "简单标题", "type": "input-text" }, { "type": "combo", "name": "data.banner", "label": "轮播", "multiple": true, "draggable": true, "items": [ { "name": "t1", "label": "标题", "type": "input-text" }, { "name": "t2", "label": "时间", "type": "input-text" }, { "name": "t3", "label": "连接", "type": "input-text" }, { "type": "input-image", "name": "image", "label": "配图", "receiver": "./api/upload?rich=2" } ] } ] } templatespage:{ "controls": [ { "label": "推荐等级", "type": "select", "name": "featured", "options": [ { "label": "不推荐", "value": 0 }, { "label": "首页推荐", "value": 1001 } ] }, { "type": "group", "body": [ { "name": "data.listimg", "label": "列表图片", "receiver": "./api/upload?rich=2", "type": "input-image" }, { "name": "data.img", "label": "首页图片", "receiver": "./api/upload?rich=2", "type": "input-image" } ] }, { "type": "input-rich-text", "name": "data.body", "label": "文章内容", "receiver": "post:./api/upload?rich=1" } ] } title:干货分享-IT技巧-同创双子(北京)信息技术股份有限公司 tmpllist:list tmplpage:page url:share] > 干货分享
交换机端口安全之安全粘贴MAC地址

发布日期:2019/01/10 08:00:00

  要求

  1、 外来电脑未经允许禁止访问内网

  2、 内网用户随意变动位置不能访问内网

  实验拓扑如下:

交换机端口安全

  操作步骤

  LSW1详细配置如下:

  //更改设备名称

  [Huawei]sysname LSW1

  //开启dhcp功能

  [LSW1]dhcp enable

  //划分内网vlan10

  [LSW1]vlan 10

  [LSW1-vlan10]quit

  //配置虚拟接口地址

  [LSW1]inter vlan 10

  [LSW1-Vlanif10]ip add 192.168.10.254 24

  [LSW1-Vlanif10]dhcp select global //设置全局地址池

  [LSW1-Vlanif10]quit

  //配置dhcp地址池

  [LSW1]ip pool vlan10

  [LSW1-ip-pool-vlan10]gateway-list 192.168.10.254

  [LSW1-ip-pool-vlan10]network 192.168.10.0 mask 24

  [LSW1-ip-pool-vlan10]excluded-ip-address 192.168.10.1 192.168.10.100

  [LSW1-ip-pool-vlan10]excluded-ip-address 192.168.10.200 192.168.10.253

  [LSW1-ip-pool-vlan10]lease day 0 hour 8

  [LSW1-ip-pool-vlan10]dns-list 61.139.2.69

  [LSW1-ip-pool-vlan10]quit

  //配置用户接口

  [LSW1-Ethernet0/0/1]port link-type access

  [LSW1-Ethernet0/0/1]port default vlan 10

  [LSW1-Ethernet0/0/1]port-security enable // 打开端口安全功能

  [LSW1-Ethernet0/0/1]port-security mac-address sticky //打开安全粘贴MAC功能

  [LSW1-Ethernet0/0/1]port-security max-mac-num 1 //限制安全MAC地址最大数量为1个

  [LSW1-Ethernet0/0/1]port-security protect-action restrict // 阻止其他非安全mac地址并发出警告

  //配置设备间接口

  [LSW1-Ethernet0/0/1]inter g0/0/1

  [LSW1-GigabitEthernet0/0/1]port link-type trunk

  [LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10

  [LSW1-GigabitEthernet0/0/1]undo port trunk allow-pass vlan 1

  [LSW1-GigabitEthernet0/0/1]inter g0/0/2

  [LSW1-GigabitEthernet0/0/2]port link-type trunk

  [LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10

  [LSW1-GigabitEthernet0/0/2]undo port trunk allow-pass vlan 1

  LSW2配置如下:

  #

  sysname LSW2

  #

  vlan batch 10

  #

  interface Ethernet0/0/1

  port link-type access

  port default vlan 10

  port-security enable

  port-security mac-address sticky

  #

  interface GigabitEthernet0/0/2

  port link-type trunk

  undo port trunk allow-pass vlan 1

  port trunk allow-pass vlan 10

  #

  LSW3配置如下:

  #

  sysname LSW3

  #

  vlan batch 10

  #

  interface Ethernet0/0/1

  port link-type access

  port default vlan 10

  port-security enable

  port-security mac-address sticky

  #

  interface GigabitEthernet0/0/1

  port link-type trunk

  undo port trunk allow-pass vlan 1

  port trunk allow-pass vlan 10

  #

  测试结果如下:

  内网用户正常获取ip,并能互访

交换机端口安全

  将外网用户接入内网用户1接口,不能获取ip地址,交换机产生警告信息

交换机端口安全

交换机端口安全

交换机端口安全

  将内网用户2接入内网用户1接口,也不能获取ip地址,交换机产生警告信息

交换机端口安全

交换机端口安全

  如果内用用户2经过允许连接LSW3,只需在LSW3 接口interface Ethernet0/0/1关闭粘贴功能,再打开即可

  配置如下:

  [LSW3]inter e0/0/1

  [LSW3-Ethernet0/0/1]undo port-security mac-address sticky

  [LSW3-Ethernet0/0/1]port-security mac-address sticky

  正确获取ip并入内网用户3正常通信

交换机端口安全


同创双子为企业保驾护航

专注数字化方案建设,推动智慧企业生态圈的升级发展