Forum Discussion

Ken_Vondersaar_'s avatar
Ken_Vondersaar_
Icon for Nimbostratus rankNimbostratus
Oct 08, 2008

Modifying SMB mid stream

We've run into a problem load balancing an application that sends a file using SMB as part of it's transaction. The issue only manifest if you attempt to hit the virtual server using the name and not the IP address.

 

 

A quick packet capture has led us to the conclusion that the application is using the hostname in the UNC path in the SMB transaction and not the IP address that it resolves to. As such, when the server on the other side gets an SMB request for a UNC like \\LBhostname\path when the server knows its hostname is actually hostB it errors and doesn't allow the transaction to occur.

 

 

Ideally we would like to tear into the packet with the erroneous UNC and fix it by replacing \\LBhostname\ with \\hostA\ or \\hostB\ as appropriate. However, I think replacing it with the VS's IP address should suffice.

 

 

What would be the best way to go about doing this? Streams? Modifying using TCP::collect/payload? Has anyone run into this before?

 

 

Any ideas or help would be much appreciated.

4 Replies

  • Hi there,

     

     

    This is a known issue with accessing Microsoft SMB shares using an alias. There is more info in this post (Click here).

     

     

    Aaron
  • If those options don't work, it might be worth testing a stream profile and iRule (using STREAM::expression Click here) to replace the alias with the server's real hostname or IP address.

     

     

    Aaron
  • I gave that a shot last night using {@\\hostname\@\\x.x.x.x\@}, however, I wasn't able to make it work. When looking at a packet capture of a SMB message it looks like they add spaces between every character in the UNC or use some other kind of weird encoding. Perhaps that's why it wouldn't match.

     

     

    The KB article, however, worked like a charm.