配置DHCP地址池
dhcp server ip-pool temp //配置名为temp的地址池
gateway-list 192.168.1.254 //设置DHCP网关
network 192.168.1.0 mask 255.255.255.0 //设置DHCP地址池
dns-list 114.114.114.114 223.5.5.5 //设置DHCP dns服务器
static-bind ip-address 192.168.1.10 hardware-address 1111-1111-1111 //配置IP MAC静态绑定
配置vlanif地址
Vlan 10 //先在交换机中添加vlan 10
Interface Vlan-interface 10 // 进入Vlanif 10接口
Ip address 192.168.1.254 255.255.255.0 //设置Vlanif 10的地址,也是DHCP服务器下发地址的网关
全局下开启DHCP
Dhcp enable //全局下开启DHCP服务。
全局下使用MAC-VLAN绑定MAC到VLAN
mac-vlan mac-address 2222-2222-2222 vlan 10 //将mac为2222-2222-2222的终端绑定到vlan 10 中
端口配置
interface GigabitEthernet1/0/1
port link-mode bridge
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 10 untagged
port-security port-mode secure //确保只有在端口进行IP MAC绑定
暂无评论内容