作家
登录

简述dhcp snooping的配置

作者: 来源: 2012-06-13 06:49:43 阅读 我要评论

前面的文章中我们阐述了dhcp snooping的网络拓扑结构,并加以说明。不知道大家是否清楚了。那么这里我们针对dhcp snooping的配置进行一下说明。希望对大家有所帮助。

配置

1、2918

Switch# configure terminal //全局配置模式

Switch(config)# interface range fa0/1 - 12

Switch(config-if-range)# switchport access vlan 100

Switch(config-if-range)# interface range fa0/13 - 24

Switch(config-if-range)# switchport access vlan 200

Switch(config-if-range)# interface gig0/1 //上连4506的端口

Switch(config-if)# //这里可不做配置,也可手工配置TRUNK

2、4506

Switch# configure terminal

Switch(config)# vtp version 2

Switch(config)# vtp mode client

Switch(config)# vtp domain gzy

Switch(config)# vtp password gzy123

Switch(config)# vlan 100

Switch(config)# vlan 200

Switch(config)# ip dhcp snooping //开启交换机的dhcp snooping功能

Switch(config)# ip dhcp snooping vlan 100,200 //在VLAN100和200中开启dhcp snooping功能

Switch(config)# no ip dhcp snooping information option //禁止在DHCP报文中嵌入和删除option 82信息

Switch(config)# ip dhcp snooping database tftp://192.168.200.1/snooping.dat

//将dhcp snooping database保存在tftp服务器(IP地址192.168.200.1)的snooping.dat文件中

Switch(config)# ip arp inspection vlan 100,200 //在VLAN100和200中开启DAI功能

Switch(config)# ip arp inspection validate src-mac ip //以源MAC和IP检测ARP包是否合法

Switch(config)# interface gig1/1 //上连6506的端口

Switch(config-if)# switchport trunk encapsulation dot1q

Switch(config-if)# switchport mode trunk

Switch(config-if)# ip dhcp snooping trust

Switch(config-if)# ip arp inspection trust

Switch(config-if)# interface gig2/2 //下连2918的端口

Switch(config-if)# switchport trunk encapsulation dot1q

Switch(config-if)# switchport mode trunk

Switch(config-if)# ip arp inspection limit none

Switch(config-if)# ip verify source vlan dhcp-snooping

Switch(config-if)# end

Switch(config)# copy run start

备注

写到后面越来越懒了,基本上就是这样了。6506上的配置不写了,很简单。因为2918不支持上述功能,因此只能在4506上做,但这样就只能在4506下连2918的端口上来启用这些功能,在2918上发生的欺骗就无法防止了。没办法,思科的做法很奇怪。现在很多国内厂家的接入层交换机都可以实现这些功能,比如Quidway、H3C、神洲数码、锐捷等。由于水平有限,写的不对的地方请高手指正。


  推荐阅读

  DHCP SNOOPING网络拓扑说明

对于搞组网的朋友来说,DHCP SNOOPING这个家伙大家肯定不会陌生。那么这里我们就针对这个知识点来进行一下讲解和说明。那么这里我们主要讲解一下网络拓扑。一、网络拓扑二、说明1、拓扑说明:汇聚层交换机为CATALYST>>>详细阅读


本文标题:简述dhcp snooping的配置

地址:http://www.17bianji.com/xieyi/4562.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)