Feb 04

IP Helper / DHCP Relay

The IP Helper address forwards a broadcast to a single specified IP. Before using the IP Helper command, you must first change the interface to prepare the router to relay broadcasts.

The command is as follows:

Switch# conf t
Switch(config)#interface Fa0/1
Switch(config-if)#ip helper-address
Switch#wr mem

This will configure the router to forward several UDP protocols, like DNS and BOOTP.
You can prevent the router from forwarding traffic by using the ip forward-protocol to block any or all UDP ports:

Switch(config)#conf t
Switch(config)#ip forward-protocol udp 517
Switch(config)#no ip forward-protocol udp 37
Switch(config)#no ip forward-protocol udp 49
Switch(config)#no ip forward-protocol udp 137
Switch(config)#no ip forward-protocol udp 138
Switch' wr mem

All these commands need to be typed in Global Configuration interface. You can block all services to block forwarding completely, or you can block a few and keep a few open, according to your needs.

Supported UDP services

By default, the IP Helper address command forwards 8 UDP services:

  • Time on port number 37
  • DNS on port number 53
  • TACACS on port number 49
  • BOOTP DHCP Client on port number 68
  • BOOTP DHCP Server on port number 67
  • NetBIOS Name on port number 137
  • TFTP on port number 69
  • NetBIOS Datagram service on port number 138

  • What if you need a service that isn’t included in these default 8 UDP services? You can use the ip forward-protcol command, along with the port number, to create a new UDP service. For example, if your UDP service was located on port 139, you can use the following command:

    Switch#conf t
    Switch(config)#ip forward-protocol udp 139

    Follow me!

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>