Block all DHCP packets to exit an interface S5720S-28X-LI-24S-AC

Created Oct 13, 2018 04:46:56 176 0 0 0
 Issue Description

For some specific scenarios, we need to block DHCP broadcast packets (Discovery, Request) to exit a specific interface.

b43ae64853dc466c83083ba6cc9eb7a5

In this specific scenario, PC1 gets dynamic IP from DHCP server located on LSW2. LSW1 just forwards the discovery and request packets towards LSW2.

The requirement is to block these packets to exit GE0/0/3 on LSW1.

Solution

Solution: configure a traffic policy and apply it in outbound direction on the switch interface where you want to block the packets (in this case GE0/0/3 of LSW1)

The traffic classifier will use an advanced ACL to match the DHCP traffic, which is UDP traffic for ports 67 and 68.

The traffic behavior will be set to "deny" and, optionally to "statistic enable" to check afterwards if packets are dropped.

Configuration is as bellow:

acl number 3000

rule 5 permit udp destination-port eq bootps

rule 10 permit udp destination-port eq bootpc

#

traffic classifier c1 operator and

if-match acl 3000

#

traffic behavior b1

deny

statistic enable

#

traffic policy p1

classifier c1 behavior b1

#

interface GigabitEthernet0/0/3

port link-type trunk

port trunk allow-pass vlan 2 to 4094

traffic-policy p1 outbound

dhcp snooping enable

  • x
  • convention:

Responses

Reply
You need to log in to reply to the post Login | Register

Notice:To ensure the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but not limited to politically sensitive content, content concerning pornography, gambling, drug abuse and trafficking, content that may disclose or infringe upon others' intellectual properties, including commercial secrets, trade marks, copyrights, and patents, and personal privacy. Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see“ Privacy Policy.”
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top