As shown in Figure 1, the IP address of VLANIF 100 on the Switch is 10.110.1.1/16, and the IP address of the NetBIOS-NS server is 10.2.1.1/16. The Switch and NetBIOS-NS server are on different network segments, and a reachable route exists between them. The PCs need to access each other using host names.
The configuration roadmap is as follows:
Relay the UDP packets with destination port 137 and destination address 255.255.255.255 and the UDP packets with destination address 10.110.255.255 to the specified NetBIOS-NS server.
When the Switch receives a broadcast NetBIOS-NS Register packet, it changes the destination IP address in the IP header of the broadcast packet to the IP address of the NetBIOS-NS server and forwards the packet to the NetBIOS-NS server.
After UDP helper is enabled on the Switch, the Switch relays the broadcast packets with UDP destination port 137 by default. The UDP port number, therefore, does not need to be configured in this example.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] udp-helper enable
[Switch] vlan 100 [Switch-vlan100] quit [Switch] interface vlanif 100 [Switch-Vlanif100] ip address 10.110.1.1 16 [Switch-Vlanif100] udp-helper server 10.2.1.1 [Switch-Vlanif100] quit [Switch] quit
The destination server configured on VLANIF 100 is the NetBIOS-NS server.
<Switch> display udp-helper server interface vlanif 100
vlan-interface Server-Ip packet-num
Vlanif100 10.2.1.1 0