178-0444-1181

机房建设 机房装修 机房环控

机房知识

分享你我感悟

您当前位置>首页 >> 机房知识 >> 常见问题

锐捷ruijie交换机如何配置防止非法dhcp服务器接入

发表时间:2022-08-27 09:44:47

文章来源:超级管理员

浏览次数:627

一、组网要求

   防内网有人接入非法dhcp服务器,如自带的无线小路由器等,导致用户获取到错误的地址而上不了网或地址冲突。

二、组网拓扑

     

三、配置要点:

  • 在接入交换机上开启dhcp snooping功能

  • 上联口配置可信任口 

四、配置步骤:

注意:配置之前建议使用 Ruijie#show interface status查看接口名称,常用接口名称有FastEthernet(百兆)、GigabitEthernet(千兆)和TenGigabitEthernet(万兆),以下配置以百兆接口为例

    1)在接入交换机上开启dhcp snooping功能

Ruijie>enable 

Ruijie#configure terminal

       Ruijie(config)#ip dhcp snooping     ------>开启DHCP snooping功能

 

    2)连接DHCP服务器的接口配置为可信任口

       Ruijie(config)#int FastEthernet0/24

       Ruijie(config-FastEthernet 0/24)#ip dhcp snooping trust      --------开启DHCP snooping的交换机所有接口缺省为untrust口,交换机只转发从trust口收到的DHCP响应报文(offer、ACK、NAK)

     3 )保存配置

Ruijie(config-FastEthernet 0/24)#end

Ruijie#write   ------> 确认配置正确,保存配置

 

五、验证命令:

 查看dhcp snooping功能开启状态,enable即开启。

     Ruijie#sh ip dhcp snooping

     Switch DHCP snooping  status                    :   ENABLE

     DHCP snooping  Verification of hwaddr status    :   DISABLE

     DHCP snooping database write-delay time         :   0 seconds

     DHCP snooping option 82 status                  :   DISABLE

     DHCP snooping Support bootp bind status         :   DISABLE

     Interface                      Trusted       Rate limit (pps)

     ------------------------       -------       ----------------

     FastEthernet 0/24              YES           unlimited    

 

   查看dhcp snooping功能所形成的表项,包括用户mac +ip +释放时间+类型+vlan id+端口

     Ruijie(config)#show ip dhcp snooping binding  

     Total number of bindings: 1

     MacAddress         IpAddress       Lease(sec)   Type          VLAN  Interface

     ------------------ --------------- ------------ ------------- ----- --------------------

     bcae.c54b.ca8d     192.168.2.1     86341        dhcp-snooping 2     GigabitEthernet 0/24

注意点:

   1)连接DHCP服务器的端口一定要配置ip dhcp snoopint trust,否则会发现电脑都获取不到地址。


相关机房案例查看更多