Chapter 1 UDP Helper Configuration
1.1 Introduction to UDP Helper
UDP Helper is
designed to relay specified broadcast UDP packets. It enables a device to
operate as a UDP packet relay. That is, it can convert broadcast UDP packets
into unicast packets and forward them to a specified server.
Normally, all the received broadcast UDP
packets are passed to the UDP module. With the UDP Helper function enabled, the
device checks the destination port numbers of the received broadcast UDP
packets and duplicates those with their destination port numbers being that
configured for UDP Helper to the UDP Helper module. The UDP-helper module in
turn modifies the destination IP addresses of the packets and then sends the
packet to the specified destination server.
The DHCP Relay
module uses UDP port 67 and 68 to relay BOOTP/DHCP broadcast packets, so do not
use port 67 and 68 as UDP Helper relay ports.
With UDP Helper enabled, the device relays
the broadcast UDP packets whose destination ports are one of the six UDP ports
list in Table 1-1 by default.
Table 1-1 List
of default UDP ports
|
Protocol
|
UDP port number
|
|
Domain name system (DNS)
|
53
|
|
NetBIOS datagram service (NetBIOS-DS)
|
138
|
|
NetBIOS name service (NetBIOS-NS)
|
137
|
|
TACACS (terminal access controller access
control system)
|
49
|
|
Trivial file transfer protocol (TFTP)
|
69
|
|
Time service
|
37
|
1.2 Configuring UDP Helper
Table 1-2 Configure UDP Helper
|
Operation
|
Command
|
Description
|
|
Enter system view
|
system-view
|
—
|
|
Enable UDP Helper
|
udp-helper enable
|
Required
UDP Helper is disabled by default
|
|
Specify a UDP port that broadcasts UDP
packets
|
udp-helper port { port-number | dns | netbios-ds | netbios-ns
| tacacs | tftp | time }
|
If the port is a default UDP port, you do
not need to configure it; otherwise you need to configure the port as
required.
With UDP Helper enabled, the six ports
with port number 53, 138, 137, 49, 69, and 37 are enabled to broadcast UDP
packets
|
|
Enter VLAN interface view
|
interface vlan-interface vlan-id
|
—
|
|
Configure the destination server to which
the UDP packets are to be forwarded
|
udp-helper server ip-address
|
Required
By default, no destination server is
configured
|
Caution:
l
You need to enable the UDP Helper function before
specifying a UDP Helper destination port.
l
The dns, netbios-ds, netbios-ns,
tacacs, tftp, and time keywords refers to the six default
UDP ports. You can configure a default port to be a UDP Helper destination port
by specifying the corresponding port number or the corresponding keyword. For
example, udp-helper port 53 and udp-helper port dns
specify the same port.
l
When you view the configuration information by
using the display current-configuration command, the UDP Helper
configuration on default UDP ports is not displayed. The UDP Helper
configuration of a default UDP port is displayed only when UDP Helper is
disabled on the port.
l
After UDP Helper is disabled, all the configured
UDP ports are cancelled, including the default ports.
l
You can configure up to 40 UDP ports as UDP
Helper destination ports on a device.
l
You can configure up to 20 destination servers
on a VLAN interface.
l
If the destination server is configured on a
VLAN interface, the broadcast UDP packets received from the ports in the VLAN
with specific UDP Helper destination ports are forwarded to the destination
server configured on the VLAN interface.
After performing the above configurations,
use the display command in any view to display the detonation server
information and the number of packets forwarded to the corresponding
destination server. Verify the configuration result through viewing the running
status of the UDP Helper configuration. You can use the reset command in
user view to clear statistics about packets forwarded by UDP Helper.
Table 1-3 Display and debug UDP Helper
configuration
|
Operation
|
Command
|
Description
|
|
View the information of the destination
server and the number of packets forwarded to the corresponding destination
server
|
display udp-helper server [ interface vlan-interface vlan-id ]
|
You can use the display command in
any view
|
|
Clear statistics about packets forwarded
by UDP Helper
|
reset udp-helper packet
|
You can use the reset command in
user view
|
1.4 UDP Helper Configuration Example
1.4.1 Network requirements
PC1 resides on network segment 192.168.1.1/24
and PC2 on 10.2.72.1/24; they are connected by two switches and are routable to
each other. It is required to configure UDP Helper on the switch, letting PC1
to search for PC2. (Broadcast packets through port 137 are used for searching.)

Figure 1-1 Network diagram for UDP
Helper configuration
# Enable UDP Helper on Switch1.
<H3C> system-view
[H3C] udp-helper enable
# Specify port 137 to be the UDP port for
forwarding broadcast UDP packets. Port 137 is the default UDP port, as prompted
in the command line.
[H3C] udp-helper port 137
Port has been configured. Please
check the port again.
# Specify the destination server to which
UDP packets are to be forwarded.
[H3C] interface Vlan-interface 20
[H3C-Vlan-interface20] udp-helper
server 10.2.72.1