dhcp snooping的配置如何?

6个月前 (10-01 10:49)阅读4回复0
lrj
lrj
  • 管理员
  • 注册排名2
  • 经验值146070
  • 级别管理员
  • 主题29214
  • 回复0
楼主

  配置1、2918Switch# configure terminal //全局配置模式Switch(config)# interface range fa0/1 - 12Switch(config-if-range)# switchport access vlan 100Switch(config-if-range)# interface range fa0/13 - 24Switch(config-if-range)# switchport access vlan 200Switch(config-if-range)# interface gig0/1 //上连4506的端口Switch(config-if)# //这里可不做配置,也可手工配置TRUNK2、4506Switch# configure terminalSwitch(config)# vtp version 2Switch(config)# vtp mode clientSwitch(config)# vtp domain gzySwitch(config)# vtp password gzy123Switch(config)# vlan 100Switch(config)# vlan 200Switch(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 dot1qSwitch(config-if)# switchport mode trunkSwitch(config-if)# ip dhcp snooping trustSwitch(config-if)# ip arp inspection trustSwitch(config-if)# interface gig2/2 //下连2918的端口Switch(config-if)# switchport trunk encapsulation dot1qSwitch(config-if)# switchport mode trunkSwitch(config-if)# ip arp inspection limit noneSwitch(config-if)# ip verify source vlan dhcp-snoopingSwitch(config-if)# endSwitch(config)# copy run start备注写到后面越来越懒了,基本上就是这样了。

  6506上的配置不写了,很简单。因为2918不支持上述功能,因此只能在4506上做,但这样就只能在4506下连2918的端口上来启用这些功能,在2918上发生的欺骗就无法防止了。没办法,思科的做法很奇特。现在很多国内厂家的接入层交换机都可以实现这些功能,比如Quidway、H3C、神洲数码、锐捷等。

  由于水平有限,写的不对的地方请高手指正。

0
回帖

dhcp snooping的配置如何? 期待您的回复!

取消