12 Replies Latest reply on Feb 19, 2009 10:52 PM by compsos

    Samba works on NAT but not on Bridged

    art_b Lurker

      I could not get Windows XP to see Samba shares on my Ubuntu Feisty host when using bridged networking. It says workgroup is not accessible.  However, I can see other windows xp shared folders on the network.  When I changed the ethernet device from bridged to NAT, then I can see the linux samba shares, but not the shared folders of other windows (because of different subnet).  I ended having 2 ethernet device (bridged and NAT).  But the documentation mentions bridged networking should work.  I even tried:

       

      interfaces = eth0

       

      but still does not work.  Any help appreciated. 

       

      Versions are:

      vmware-server 1.0.3

      samba 3.0.24

       

      Below is my smb.conf:

      \[global]

         workgroup = balingit

         server string = %h server (Samba, Ubuntu)

         dns proxy = no

         log file = /var/log/samba/log.%m

         max log size = 1000

         syslog = 0

         panic action = /usr/share/samba/panic-action %d

         encrypt passwords = true

         passdb backend = tdbsam

         obey pam restrictions = yes

         invalid users = root

         printing = cups

         printcap name = cups

         printer admin = @lpadmin

         socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

         domain master = yes

         preferred master = yes

         os level = 65

      \[homes]

         comment = Home Directories

         browseable = no

         writable = yes

         create mask = 0600

         directory mask = 0700

      \[printers]

         comment = All Printers

         browseable = no

         path = /var/spool/samba

         printable = yes

         public = no

         writable = no

         create mode = 0700

         default devmode = yes

      \[print$]

         comment = Printer Drivers

         path = /var/lib/samba/printers

         browseable = yes

         read only = yes

         guest ok = no

         write list = root, @lpadmin

       

       

      Also I get this messages on log.nmbd when using bridged networking:

      *****

      \[2007/05/30 23:58:04, 0] nmbd/nmbd_incomingdgrams.c:process_local_master_announce(309)

        process_local_master_announce: Server WINXP1 at IP 192.168.1.53 is announcing itself as a local master browser for workgroup BALINGIT and we think we are master. Forcing election.

      \[2007/05/30 23:58:04, 0] nmbd/nmbd_become_lmb.c:unbecome_local_master_success(149)

        *****

         

        Samba name server JULIE has stopped being a local master browser for workgroup BALINGIT on subnet 192.168.1.10

         

        *****

      \[2007/05/30 23:58:23, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)

        *****

         

        Samba name server JULIE is now a local master browser for workgroup BALINGIT on subnet 192.168.1.10

        • 1. Re: Samba works on NAT but not on Bridged
          nick.couchman Champion

          I run Samba perfectly fine over bridged network adapters.  It looks to me like Samba thinks that it should become the network master, which could be a problem.  Do you have a WINS Server on your network?  If so, you might want to try point Samba at that server.  Also, you may want to forcibly turn off some of the options like domain master and domain logons (unless, of course, you want Samba to do these things) so that it doesn't try to become the master.

          • 2. Re: Samba works on NAT but not on Bridged
            IdeCable Novice

            I have the same problem here.

             

            My Samba (hosted from my host OS of my VMware Server) cannot be seen from my vm (using a briged network connection..). I do not use domain controller features for Samba.. only simple and plain fileshares.

             

            I will give it a try at trying to RTFM to see how I can specify a WINS entry within my Samba configs. But I'd be very (very) surprised to see if a WINS entry could fix this.

            • 3. Re: Samba works on NAT but not on Bridged
              IdeCable Novice

              Here's something worth trying out!!!

               

              http://www.vmware.com/community/thread.jspa?threadID=86822&tstart=30

               

              I'm giving it a try to see if it works for me.

               

              I am confident it might fix it.

              • 4. Re: Samba works on NAT but not on Bridged
                art_b Lurker

                I have no luck.  Turning off the options  did not help.  However, if I change the ethernet device from bridged to NAT, then it will work.  Weird stuff.  Having the same smb.conf, it will work with NAT but not with Bridged.  I prefer bridged so other machines in the network will be able to see this VM.

                 

                Ide Cable, any luck ?

                • 5. Re: Samba works on NAT but not on Bridged
                  nick.couchman Champion

                  WINS is designed to fix the problem in the thread you posted.  WINS maps Microsoft Networking names to Internet IP Addresses.  Newer versions of Windows (AD-based domains) don't use WINS anymore - they use DNS - but Samba and non-AD domains sometimes need WINS for mapping names correctly.

                  • 6. Re: Samba works on NAT but not on Bridged
                    art_b Lurker

                    I tried making the Samba server the WINS server using "wins support = yes", and assigned the ip address of that server on windows tcip/ip properties advanced WINS section.  But still I have no luck.  I even place entries on lmhost and host on windows.  In addition I now have these errors in in log.nmbd

                     

                    \[2007/06/02 01:07:38, 0] nmbd/nmbd_browsesync.c:find_domain_master_name_query_fa

                    il(351)

                      find_domain_master_name_query_fail:

                      Unable to find the Domain Master Browser name BALINGIT<1b> for the workgroup B

                    ALINGIT.

                      Unable to sync browse lists in this workgroup.

                     

                    Note that I made domain master, preferred master as per previous advice.

                    • 7. Re: Samba works on NAT but not on Bridged
                      art_b Lurker

                      In addition to the info above,  the vmware-server package I installed came from  the commercial repository of Canonical.  Vmware server is integrated in Ubuntu Feisty.  I'm not sure if that would make a difference, but I assume the code and version are the same with the tar.gz from the vmware download site.  The Ubuntu package was build by the vmware team.

                       

                      art@julie:/var/log/samba$ dpkg -s vmware-server

                      Package: vmware-server

                      Status: install ok installed

                      Priority: optional

                      Section: misc

                      Installed-Size: 127608

                      Maintainer: VMware Build Team <vmware-builds@vmware.com>

                      Architecture: i386

                      Version: 1.0.3-1

                      • 8. Re: Samba works on NAT but not on Bridged
                        Steve_Adam Lurker

                        Today I finally got rid of those annoying 'forcing election' messages on our Samba server.

                         

                        A message in a log file every 15 minutes is not really all that annoying, but it bothered me that something was not right, and I've been wondering what the problem is for a couple of months.

                         

                        Our network is dead simple, but my solution might help you along in the right direction.

                         

                        We have a single network, 192.168.0 and a single samba server, and every other computer in the building is running windows (except for a couple of controllers running DOS).

                         

                        Anyway.. the problem was that the netmask on eth0 on the samba server was wrong.  It was 255.255.0.0 instead of 255.255.255.0

                         

                        As soon as I fixed that, windows workstations stopped trying to become local master browsers.

                         

                        Such an easy fix might not work for you, but your problem is surely an issue related to which actual net your computers think they are on, and who should be the master for that net.  (Or maybe that's so obvious that it doesn't need to be said...)

                         

                        Anyway, I hope this helps,

                        • 9. Re: Samba works on NAT but not on Bridged
                          IdeCable Novice

                          Just to let you know guys,

                           

                          I managed to make it work over my bridged connection. The thing is I have no idea why it is working now.

                           

                          I suspect it was my DHCP server going crazy. lol.

                           

                          I didn't had to change any settings to my Samba config file - I didn't even specified any WINS or anything of that sort.

                           

                          I remember I did a reboot onto that server.. and magicly, out of the blue, it started to work!!

                           

                          I am setting an other VMware Server box soon. I will let you folks know if I ever get this problem again.

                          • 10. Re: Samba works on NAT but not on Bridged
                            toms17 Lurker

                            I am having the same problem.  Has anyone else resolved the problem and knows how?  The other thing that has the same behavior is ssh - with NAT I can ssh from guest to host, but not with bridged.  This leads me to believe the problem is not with WINS.

                            • 11. Re: Samba works on NAT but not on Bridged
                              vslavik Novice

                              Are you using e1000 Ethernet driver on the host[/b] by a chance? If you are, chances are that the problem is in offloading capability of its newer versions (basically, it dumps already seen packets, but vmware's bridged networking sends data from eth0 to eth0 when talking to the host). If you aren't, maybe your driver does something similar too.

                               

                              See a discussion here: https://bugs.launchpad.net/ubuntu/source/vmware-player/bug/105697

                               

                              Short story: try running "ethtool -K eth0 sg off rx off tx off tso off".

                              • 12. Re: Samba works on NAT but not on Bridged
                                compsos Lurker

                                 

                                VMWare Server 2

                                 

                                 

                                Centos 7.7

                                 

                                 

                                No bridge network but would NAT or hostonly.

                                 

                                 

                                Check the ports (physical) link to the switch. It seems the bridge (virtual) would not work whlst the physical is not connected

                                 

                                 

                                Cheers