You have to install a wins server to resolve name across different subnets.
that involves putting this line in the [global] stanza of the Linux wins server:
and this line in the [global] stanzas of your Linux clients:
wins server = IP.address.of.winsserver
and pointing each windows box at the Linux wins server.
A bit more here:
HowTo Configure Samba openSUSE Windows Network Browsing on a SOHO LAN
particularly the section titled:
Name Resolution via a WINS Server
And enable wins support in nsswitch.conf