思科模拟器DHCP snooping和DAI [动态ARP绑定]

在设备上开启dhcp中snopping功能,可以有效的防止dhcp非信任端口来的欺骗,使内部网络被攻击到,配置受信任端口是为了防止攻击者在局域网内伪装成一台DHCP服务器,对合法客户的DHCP请求做出响应,为客户提供虚假的IP地址和网关。

在思科中所有设备的端口默认都是非信任端口,都可以发送信息,在设置受信任端口之后,该端口就可以接收发送所有dhcp数据了,非法服务器因为是非信任端口,所以他的信息进不来;

验证方式:将信任端口的线断掉,重新加载一下电脑,看能不能接收到来自非法服务器发送过来的信息。

1.SW1(config)#ip dhcp snooping [开启dhcp snopping功能]

2.SW1(config-if)# ip dhcp snooping trust [配置端口为受信任的端口]

3.SW1(config-if)#ip dhcp snooping limit rate 15[设置端口报文接收速率]

这里将右侧服务器设置为信任端口,
在思科中,设备默认的都是非信任端口,非信任端口不能发送DHCP offer数据包

SW1(config)#ip dhcp snooping 开启DHCP snooping功能
SW1(config)#in f 0/4
SW1(config-if)#ip dhcp snooping trust 把f0/4设置为收信任端口

SW1(config)#in r f 0/1-3
SW1(config-if-range)#ip dhcp snooping limit rate 15  开启主机端口的dhcp侦听功能

SW1#show ip  dhcp snooping 
Switch DHCP snooping is enabled
DHCP snooping is configured on following VLANs:
none
Insertion of option 82 is enabled
Option 82 on untrusted port is not allowed
Verification of hwaddr field is enabled
Interface                  Trusted    Rate limit (pps)
-----------------------    -------    ----------------
FastEthernet0/2            no         15              
FastEthernet0/3            no         15              
FastEthernet0/4            yes        unlimited    不是受信任端口是不能发送信息的   
FastEthernet0/1            no         15              
SW1#

配置ARP检测是为了在用户发送ARP广播请求信息的时候,会有不法用户伪装成网关收到来自用户的数据,在设置DHCP snooping功能之后,用户可以在交换机中获取mac地址和自己的ip进行绑定,可以利用ARP检查,检查受信任端口的arp请求和响应,检查用户获得的mac地址是别人伪装的还是从局域网中交换机中获取到的,提供了安全性。

4.SW1(config-if)#ip arp inspection trust [开启ip ARP信任检查]

5.SW1(config)#ip arp inspection vlan 10[开启arp检查功能,并应用于vlan10上]

6.SW1(config)#ip arp inspection  validate src-mac dst-mac ip [开启ARP检查功能,并指定在验证ARP请求或响应时需要验证源MAC地址、目的MAC地址和IP地址]

在交换机上开启DHCP Snooping及DAI功能,使PC1所在VLAN中启用DHCP监听和ARP检测功能。
S1(config)#vlan 10
S1(config-vlan)#name dhcp
S1(config)#interface range FastEthernet 0/1-20
S1(config-if-range)#switchport mode access 
S1(config-if-range)#switchport access vlan 10
S1(config)#ip dhcp snooping  开启DHCP监听功能
S1(config)#interface GigabitEthernet 0/1
S1(config-if-range)#ip dhcp snooping trust G0/1为dhcp受信任的端口
S1(config-if-range)#ip arp inspection trust 开启动态ARP检查
S1(config-if-range)#exit
S1(config)#ip dhcp snooping vlan 10  vlan10为受信任的端口
S1(config)#ip arp inspection vlan 10  在vlan10中配置arp动态检测
S1(config)#ip arp inspection validate src-mac dst-mac ip  开启ARP检查功能,并指定在验证ARP请求或响应时需要验证源MAC地址、目的MAC地址和IP地址

猜你喜欢

转载自blog.csdn.net/weixin_59507792/article/details/129254623
今日推荐