MAC与VLAN绑定实现安全组网

目录

组网需求

组网拓扑

配置文件

测试结果


基于MAC划分vlan

组网需求

实现MAC与vlan绑定,防止私接设备访问:

  • CE1下联PC2,3配置Hybird接口

  • 配置untag vlan 100,禁止vlan 1

  • 接口开启mac-vlan

  • 绑定mac与vlan

组网拓扑

配置文件

bash 复制代码
!
mac-vlan mac-address 0050.7966.6802 vlan 100 priority 0
mac-vlan mac-address 0050.7966.6803 vlan 100 priority 0
!
interface GigabitEthernet 0/1
 switchport mode hybrid
 switchport hybrid allowed vlan only tagged 2-99,101-4094
 switchport hybrid allowed vlan add untagged 100
 mac-vlan enable
!
interface GigabitEthernet 0/2
 switchport mode hybrid
 switchport hybrid allowed vlan only tagged 2-99,101-4094
 switchport hybrid allowed vlan add untagged 100
 mac-vlan enable
!

测试结果

bash 复制代码
VPCS> ping 1.1.1.2

84 bytes from 1.1.1.2 icmp_seq=1 ttl=64 time=1.568 ms
84 bytes from 1.1.1.2 icmp_seq=2 ttl=64 time=1.767 ms
84 bytes from 1.1.1.2 icmp_seq=3 ttl=64 time=1.793 ms
84 bytes from 1.1.1.2 icmp_seq=4 ttl=64 time=1.542 ms
84 bytes from 1.1.1.2 icmp_seq=5 ttl=64 time=1.838 ms

VPCS> ping 1.1.1.4

host (1.1.1.4) not reachable
相关推荐
知乎的哥廷根数学学派1 小时前
基于多尺度注意力机制融合连续小波变换与原型网络的滚动轴承小样本故障诊断方法(Pytorch)
网络·人工智能·pytorch·python·深度学习·算法·机器学习
好多渔鱼好多1 小时前
【流媒体协议】RTSP / RTP / RTCP 协议全景介绍
网络·网络协议·rtp·rtsp·rtcp·ipc摄像头
映秀小子2 小时前
Wireshark加减显示列
网络·测试工具·wireshark
捷米研发三部2 小时前
EtherNet/IP转CAN协议转换网关实现罗克韦尔 PLC与压力传感器通讯在轮胎压力监测系统的应用案例
服务器·网络
飞睿科技2 小时前
UWB技术在机器人领域的创新应用与前景
网络·人工智能·机器人·定位技术·uwb技术
石像鬼₧魂石2 小时前
80 端口(Web 服务)渗透测试完整总结(含踩坑 + 绕过 + 实战流程)
linux·运维·服务器·前端·网络·阿里云
MrTung.2 小时前
ensp VARP
网络
Boyle. Z3 小时前
校园网环境中iKuai 二级路由联网与 DNS 优化指南
网络·智能路由器
五仁火烧3 小时前
HTTP 服务器
服务器·网络·网络协议·http
sww_10263 小时前
TCP协议
服务器·网络·tcp/ip