首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >H3C交换机DHCP分配地址与接口ID绑定

H3C交换机DHCP分配地址与接口ID绑定

作者头像
网络技术联盟站
发布于 2023-03-13 21:28:00
发布于 2023-03-13 21:28:00
1.3K0
举报
1组网及说明

如图所示,交换机S1作为dhcp服务器,S2/S3/S4为dhcp客户端,

服务器分配的地址为10.1.1.0/24网段,其接口下的设备获取的地址为与该接口的id值相同,即S2地址为10.1.1.1,S3地址为10.1.1.4.S4地址为10.1.1.10.

2配置步骤

代码语言:javascript
复制
dhcp  enable

dhcp snooping enable 

#

dhcp class port1     //配置port1规则

    if-match rule 1 option 82 hex 706f727431 offset 2 length 5

dhcp class port4 

    if-match rule 1 option 82 hex 706f727434 offset 2 length 5

dhcp class port8 

    if-match rule 1 option 82 hex 706f727438 offset 2 length 5

dhcp class port10 

    if-match rule 1 option 82 hex 706f72743130 offset 2 length 6

# 

dhcp server ip-pool 10 

  gateway-list 10.1.1.254 

  network 10.1.1.0 mask 255.255.255.0 

  class port1 range 10.1.1.1 10.1.1.1   

  class port4 range 10.1.1.4 10.1.1.4 

  class port8 range 10.1.1.8 10.1.1.8 

  class port10 range 10.1.1.10 10.1.1.10 

# 

interface GigabitEthernet1/0/1    //接口需要获取dhcp snooping信息

      dhcp snooping information enable 

     dhcp snooping information circuit-id string port1   //绑定dhcp class信息

# 

interface GigabitEthernet1/0/4 

      dhcp snooping information enable 

     dhcp snooping information circuit-id string port4 

# 

interface GigabitEthernet1/0/8 

      dhcp snooping information enable 

     dhcp snooping information circuit-id string port8 

# 

interface GigabitEthernet1/0/10

      dhcp snooping information enable 

     dhcp snooping information circuit-id string port10

#

结果

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2021-09-16,如有侵权请联系 cloudcommunity@tencent.com 删除
目录
  • 2配置步骤
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档