Use this command to configure the relay of certain UDP broadcast packets received on a specific interface or range of interfaces. This command can be invoked multiple times on a routing interface, either to specify multiple server addresses for a given port number or to specify multiple port numbers handled by a specific server.
| Default | No helper addresses are configured. |
| Format | ip helper-address {server-address | discard} [dest-udp-port | dhcp | domain | isakmp | mobile ip | nameserver | netbios-dgm | netbios-ns | ntp | pim-auto-rp | rip | tacacs | tftp | time] |
| Mode | Interface Config |
| Parameter | Description |
|---|---|
| server-address | The IPv4 unicast or directed broadcast address to which relayed UDP broadcast packets are sent. The server address cannot be in a subnet on the interface where the relay entry is configured, and cannot be an IP address configured on any interface of the local router. |
| discard | Matching packets should be discarded rather than relayed, even if a global ip helper-address configuration matches the packet. |
| dest-udp-port | A destination UDP port number from 0 to 65535. |
| port-name | The destination UDP port may be optionally specified by its name. Whether a port is specified by its number or its
name has no effect on behavior. The names recognized are as follows:
|
Example: To relay DHCP packets received on interface 1/0/2 to two DHCP servers, 192.168.10.1 and 192.168.20.1, use the following commands:
(switch)#config (switch)(config)#interface 1/0/2 (switch)(interface 1/0/2)#ip helper-address 192.168.10.1 dhcp (switch)(interface 1/0/2)#ip helper-address 192.168.20.1 dhcp
Example: To relay both DHCP and DNS packets to 192.168.30.1, use the following commands:
(switch)#config (switch)(config)#interface 1/0/2 (switch)(interface 1/0/2)#ip helper-address 192.168.30.1 dhcp (switch)(interface 1/0/2)#ip helper-address 192.168.30.1 dns
Example: This command takes precedence over an ip helper-address command given in global configuration mode. With the following configuration, the relay agent relays DHCP packets received on any interface other than 1/0/2 and 1/0/17 to 192.168.40.1, relays DHCP and DNS packets received on 1/0/2 to 192.168.40.2, relays SNMP traps (port 162) received on interface 1/0/17 to 192.168.23.1, and drops DHCP packets received on 1/0/17:
(switch)#config (switch)(config)#ip helper-address 192.168.40.1 dhcp (switch)(config)#interface 1/0/2 (switch)(interface 1/0/2)#ip helper-address 192.168.40.2 dhcp (switch)(interface 1/0/2)#ip helper-address 192.168.40.2 domain (switch)(interface 1/0/2)#exit (switch)(config)#interface 1/0/17 (switch)(interface 1/0/17)#ip helper-address 192.168.23.1 162 (switch)(interface 1/0/17)#ip helper-address discard dhcp