h3c dhcp snooping

1. 组网需求
Switch B通过以太网端口Ethernet1/1连接到DHCP服务器,通过以太网端口Ethernet1/2Ethernet1/3连接到DHCP客户端。要求:
l
DHCP服务器相连的端口可以转发DHCP服务器的响应报文,而其他端口不转发DHCP服务器的响应报文。
l
记录DHCP-REQUEST和信任端口收到的DHCP-ACK广播报文中DHCP客户端IP地址及MAC地址的绑定关系。
 
配置步骤
使能DHCP Snooping功能。
<SwitchB> system-view
[SwitchB] dhcp-snooping
配置Ethernet1/1端口为信任端口。
[SwitchB] interface ethernet 1/1
[SwitchB-Ethernet1/1] dhcp-snooping trust
[SwitchB-Ethernet1/1] quit



支持Option 82配置举例
1. 组网需求l
Switch B上使能DHCP Snooping功能,并支持Option 82功能;
l
对包含Option 82的请求报文的处理策略为replace
l
Ethernet1/2上配置Ciruict ID填充内容为company001Remote ID填充内容为device001
l
Ethernet1/3上配置以verbose模式填充Option 82,接入节点标识为sysname,填充格式为ASCII格式。
l
Switch B将添加Option 82DHCP请求报文转发给DHCP服务器Switch A,使得DHCP客户端可以获取到IP地址。
 
3. 配置步骤使能DHCP Snooping功能。
<SwitchB> system-view
[SwitchB] dhcp-snooping
配置Ethernet1/1端口为信任端口。
[SwitchB] interface ethernet 1/1
[SwitchB-Ethernet1/1] dhcp-snooping trust
[SwitchB-Ethernet1/1] quit
Ethernet1/2上配置DHCP Snooping支持Option 82功能。
[SwitchB] interface ethernet 1/2
[SwitchB-Ethernet1/2] dhcp-snooping information enable
[SwitchB-Ethernet1/2] dhcp-snooping information strategy replace
[SwitchB-Ethernet1/2] dhcp-snooping information circuit-id string company001
[SwitchB-Ethernet1/2] dhcp-snooping information remote-id string device001
[SwitchB-Ethernet1/2] quit
在端口Ethernet1/3上配置DHCP Snooping支持Option 82功能。
[SwitchB] interface ethernet 1/3
[SwitchB-Ethernet1/3] dhcp-snooping information enable
[SwitchB-Ethernet1/3] dhcp-snooping information strategy replace
[SwitchB-Ethernet1/3] dhcp-snooping information format verbose node-identifier sysname
[SwitchB-Ethernet1/3] dhcp-snooping information circuit-id format-type ascii
[SwitchB-Ethernet1/3] dhcp-snooping information remote-id format-type ascii

转载于:https://www.cnblogs.com/bethal/p/5800670.html

解决IP地址冲突的完美方法--DHCP SNOOPING 使用的方法是采用DHCP方式为用户分配IP,然后限定这些用户只能使用动态IP的方式,如果改成静态IP的方式则不能连接上网络;也就是使用了DHCP SNOOPING功能。 例子: version 12.1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption service compress-config ! hostname C4-2_4506 ! enable password xxxxxxx! clock timezone GMT 8 ip subnet-zero no ip domain-lookup ! ip dhcp snooping vlan 180-181 // 对哪些VLAN 进行限制 ip dhcp snooping ip arp inspection vlan 180-181 ip arp inspection validate src-mac dst-mac ip errdisable recovery cause udld errdisable recovery cause bpduguard errdisable recovery cause security-violation errdisable recovery cause channel-misconfig errdisable recovery cause pagp-flap errdisable recovery cause dtp-flap errdisable recovery cause link-flap errdisable recovery cause l2ptguard errdisable recovery cause psecure-violation errdisable recovery cause gbic-invalid errdisable recovery cause dhcp-rate-limit errdisable recovery cause unicast-flood errdisable recovery cause vmps errdisable recovery cause arp-inspection errdisable recovery interval 30 spanning-tree extend system-id ! ! interface GigabitEthernet2/1 // 对该端口接入的用户进行限制,可以下联交换机 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/2 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/3 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/4 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 --More-- 编者注:对不需要明确地址的所有人的时候是一个很好的解决办法。另外,可以查看www.cisco.com的 IP Source Guard Similar to DHCP snooping, this feature is enabled on a DHCP snooping untrusted Layer 2 port. Initially, all IP traffic on the port is blocked except for DHCP packets that are captured by the DHCP snooping process. When a client receives a valid IP address from the DHCP server, or when a static IP source binding is configured by the user, a per-port and VLAN Access Control List (PACL) is installed on the port. This process restricts the client IP traffic to those source IP addresses configured in the binding; any IP traffic with a source IP address other than that in the IP source binding will be filtered out. This filtering limits a host&#39;s ability to attack the network by claiming neighbor host&#39;s IP address.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值