Sunday, November 16, 2014

CIFS/SMB Forwarding - Cisco IOS Helper (Fix for VLANs/Subnets with a WDTV Media Player)

Summary

Cisco IOS provides a mechanism to forward UDP broadcasts from one interface to another.  This is typically used for forwarding DHCP requests, but comes in handy with some media players as well for accessing non-local network shares.  

For example, the Western Digital media player (WDTV) is 'challenged' with accessing network shares in a subnet'ed environment.  For both CIFS (SMB) and NFS, that media player provides no mechanism in its GUI to specify the IP address of the CIFS/NFS server.  Instead, it expects that server to be on the same subnet as the media player.  For CIFS, it will send a NETBIOS broadcast (port 137) on the media player's subnet.  By default,  broadcasts aren't propagated across VLAN's. The IOS helper functionality can be utilized to allow the media player to access CIFS shares on non-local subnets.

Implementation

It's pretty darn simple:  just specify the ip address of your network storage server as a 'helper' on the interface that would receive the broadcast from the media player.  On a router, that's likely a trunk interface to the Layer-2 switch where the media player is connected.  On a multi-layer switch, it could be a SVI for the VLAN containing the media player. 

Example: SVI IP Helper

interface Vlan9
 ip address 192.168.9.1 255.255.255.0
 ip helper-address 192.168.7.3

By default, the ip helper command forwards UDP broadcasts for a half dozen or so protocols (appears to be different for different IOS revs).  Examples of default forwarded protocols:  BOOTP (DHCP), NetBIOS, DNS.  If all you want forwarded are the NetBIOS name service broadcasts (port 137, which is all you need to get CIFS operational), you can turn off forwarding of the others.

Example:  Turn off Forwarding of DNS


no ip forward-protocol udp domain

No comments:

Post a Comment