UDP broadcast forwarding

Overview

Some applications rely on client requests sent as limited IP broadcasts addressed to a UDP application port. If a server for the application receives such a broadcast, the server can reply to the client. Since typical router behavior, by default, does not allow broadcast forwarding, a client's UDP broadcast requests cannot reach a target server on a different subnet unless the router is configured to forward client UDP broadcasts to that server.

A switch with routing enabled includes optional per-VLAN UDP broadcast forwarding that allows up to 256 server and/or subnet entries on the switch (16 entries per-VLAN.) If an entry for a particular UDP port number is configured on a VLAN, and an inbound UDP broadcast packet with that port number is received on the VLAN, the switch routes the packet to the appropriate subnet. (Each entry can designate either a single device or a single subnet. The switch ignores any entry that designates multiple subnets.)


[NOTE: ]

NOTE: The number of UDP broadcast forwarding entries supported is affected by the number of IP helper addresses configured to support DHCP relay. See Operating notes for UDP broadcast forwarding.


A UDP forwarding entry includes the desired UDP port number and can be either an IP unicast address or an IP subnet broadcast address for the subnet the server is in. Thus, an incoming UDP packet carrying the configured port number will be:

  • Forwarded to a specific host if a unicast server address is configured for that port number.

  • Broadcast on the appropriate destination subnet if a subnet address is configured for that port number.

A UDP forwarding entry for a particular UDP port number is always configured in a specific VLAN and applies only to client UDP broadcast requests received inbound on that VLAN. If the VLAN includes multiple subnets, the entry applies to client broadcasts with that port number from any subnet in the VLAN.

For example, VLAN 1 (15.75.10.1) is configured to forward inbound UDP packets as shown in Example of a UDP packet-forwarding environment.

Example of a UDP packet-forwarding environment

Interface IP address Subnet mask Forwarding address UDP port Notes
VLAN 1 15.75.10.1 255.255.255.0

15.75.11.43

1188

Unicast address for forwarding inbound UDP packets with UDP port 1188 to a specific device on VLAN 2.

15.75.11.255

1812

Broadcast address for forwarding inbound UDP packets with UDP port 1812 to any device in the 15.75.11.0 network.

15.75.12.255

1813

Broadcast address for forwarding inbound UDP packets with UDP port 1813 to any device in the 15.75.12.0 network.

VLAN 2 15.75.11.1 255.255.255.0 None N/A

Destination VLAN for UDP 1188 broadcasts from clients on VLAN 1. The device identified in the unicast forwarding address configured in VLAN 1 must be on this VLAN.

Also the destination VLAN for UDP 1812 from clients on VLAN 1.

VLAN 3 15.75.12.1 255.255.255.0 None N/A

Destination VLAN for UDP 1813 broadcasts from clients on VLAN 1.


[NOTE: ]

NOTE: If an IP server or subnet entry is invalid, a switch will not try to forward UDP packets to the configured device or subnet address.


Subnet masking for UDP forwarding addresses

The subnet mask for a UDP forwarding address is the same as the mask applied to the subnet on which the inbound UDP broadcast packet is received. To forward inbound UDP broadcast packets as limited broadcasts to other subnets, use the broadcast address that covers the subnet you want to reach. For example, if VLAN 1 has an IP address of 15.75.10.1/24 (15.75.10.1 255.255.255.0), you can configure the following unicast and limited broadcast addresses for UDP packet forwarding to subnet 15.75.11.0:

Forwarding destination type IP address
UDP unicast to a single device in the 15.75.11.0 subnet 15.75.11.X
UDP broadcast to subnet 15.75.11.0 15.75.11.255

Configuring and enabling UDP broadcast forwarding

To configure and enable UDP broadcast forwarding on the switch:

  1. Enable routing.

  2. Globally enable UDP broadcast forwarding.

  3. On a per-VLAN basis, configure a forwarding address and UDP port type for each type of incoming UDP broadcast you want routed to other VLANs.

Globally enabling UDP broadcast forwarding

Syntax:

[no] ip udp-bcast-forward

Enables or disables UDP broadcast forwarding on the routing switch. Routing must be enabled before executing this command.

Using the no form of this command disables any ip forward protocol udp commands configured in VLANs on the switch.

Default: Disabled

Configuring UDP broadcast forwarding on individual VLANs

This command routes an inbound UDP broadcast packet received from a client on the VLAN to the unicast or broadcast address configured for the UDP port type.

Syntax:

[no] ip forward-protocol udp <ip-address> <port-number | port-name>

Used in a VLAN context to configure or remove a server or broadcast address and its associated UDP port number. You can configure a maximum of 16 forward-protocol udp assignments in a given VLAN. The switch allows a total of 256 forward-protocol udp assignments across all VLANs.

You can configure UDP broadcast forwarding addresses regardless of whether UDP broadcast forwarding is globally enabled on the switch. However, the feature does not operate unless globally enabled.

<ip-address>

This can be either of the following:

  • The unicast address of a destination server on another subnet. For example: 15.75.10.43.

  • The broadcast address of the subnet on which a destination server operates. For example, the following address directs broadcasts to All hosts in the 15.75.11.0 subnet: 15.75.11.255.


[NOTE: ]

NOTE: The subnet mask for a forwarded UDP packet is the same as the subnet mask for the VLAN (or subnet on a multinetted VLAN) on which the UDP broadcast packet was received from a client.


<udp-port-#> Any UDP port number corresponding to a UDP application supported on a device at the specified unicast address or in the subnet at the specified broadcast address. For more information on UDP port numbers, see TCP/UDP port number ranges.
<port-name>

Allows use of common names for certain well-known UDP port numbers. You can type in the specific name instead of having to recall the corresponding number:

dns

Domain name service (53)

netbios-ns

NetBIOS name service (137)

netbios-dgm

NetBIOS datagram service (138)

radius

Remote authentication dial-in user service (1812)

radius-old

Remote authentication dial-in user service (1645)

rip

Routing information protocol (520)

snmp

Simple network management protocol (161)

snmp-trap

Simple network management protocol (162)

tftp

Trivial file transfer protocol (69)

timep

Time protocol (37)

Example:

The following command configures the routing switch to forward UDP broadcasts from a client on VLAN 1 for a time protocol server:

HP Switch(vlan-1)# ip forward-protocol udp 15.75.11.155 timep

Viewing the current IP forward-protocol configuration

Syntax:

show ip forward-protocol [vlan <vid>]

Displays the current status of UDP broadcast forwarding and lists the UDP forwarding addresses configured on all static VLANS in the switch or on a specific VLAN.

Displaying global IP forward-protocol status and configuration shows the global display showing UDP broadcast forwarding status and configured forwarding addresses for inbound UDP broadcast traffic for all VLANs configured on the routing switch.

Displaying global IP forward-protocol status and configuration

HP Switch(config)# show ip forward-protocol

 IP Forwarder Addresses

    UDP Broadcast Forwarding: Disabled

 VLAN: 1
  IP Forward Addresses UDP Port
  -------------------- --------
  15.75.11.43          37
  15.75.11.255         53
  15.75.12.255         1813

 VLAN: 2
  IP Forward Addresses UDP Port
  -------------------- --------
  15.75.12.255         1812

Displaying IP forward-protocol status and per-VLAN configuration shows the display of UDP broadcast forwarding status and the configured forwarding addresses for inbound UDP broadcast traffic on VLAN 1.

Displaying IP forward-protocol status and per-VLAN configuration

HP Switch(config)# show ip forward-protocol vlan 1

 IP Forwarder Addresses

    UDP Broadcast Forwarding: Disabled

 IP Forward Addresses UDP Port
 -------------------- --------
 15.75.11.43          37
 15.75.11.255         53
 15.75.12.255         1813

Operating notes for UDP broadcast forwarding

Maximum number of entries

The number of UDP broadcast entries and IP helper addresses combined can be up to 16 per VLAN, with an overall maximum of 2048 on the switch. (IP helper addresses are used with the switch's DHCP relay operation.)

For example, if VLAN 1 has 2 IP helper addresses configured, you can add up to 14 UDP forwarding entries in the same VLAN.

TCP/UDP port number ranges

There are three ranges:

  • Well-known ports: 0 to 1023

  • Registered ports: 1024 to 49151

  • Dynamic and/or private ports: 49152 to 65535

For more information, including a listing of UDP/TCP port numbers, go to the Internet Assigned Numbers Authority (IANA) website at: www.iana.org.

Click on:

Protocol Number Assignment Services

P (Under "Directory of General Assigned Numbers" heading)

Port Numbers

Messages related to UDP broadcast forwarding

Message Meaning
udp-bcast-forward: IP Routing support must be enabled first.
Appears in the CLI if an attempt to enable UDP broadcast forwarding has been made without IP routing being enabled first. Enable IP routing, then enable UDP broadcast forwarding.
UDP broadcast forwarder feature enabled
UDP broadcast forwarding has been globally enabled on the router. Appears in the Event Log and, if configured, in SNMP traps.
UDP broadcast forwarder feature disabled
UDP broadcast forwarding has been globally disabled on the routing switch. This action does not prevent you from configuring UDP broadcast forwarding addresses, but does prevent UDP broadcast forwarding operation. Appears in the Event Log and, if configured, in SNMP traps.
UDP broadcast forwarder must be disabled first.
Appears in the CLI if you attempt to disable routing while UDP forwarding is enabled on the switch.