# Samba + LAGG



## Leander (Oct 13, 2014)

Hi,

I have a Samba 4 server running on a FreeBSD 10.0-RELEASE-p9. The server has two physical network interfaces. The two physical network interfaces are combined to one logical via lagg(4). Samba keeps on spamming me with the following irritating log message:

```
Oct 13 13:47:18 Storage-01 nmbd[1790]: [2014/10/13 13:47:18.221571,  0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
Oct 13 13:47:18 Storage-01 nmbd[1790]:   query_name_response: Multiple (2) responses received for a query on subnet 192.168.50.200 for name MYDOMAIN<1d>.
Oct 13 13:47:18 Storage-01 nmbd[1790]:   This response was from IP 192.168.50.201, reporting an IP address of 192.168.50.201.
```

This is how I have configured it in /etc/rc.conf:

```
ifconfig_re0="up"
ifconfig_re1="up"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport re0 laggport re1"
ipv4_addrs_lagg0="192.168.50.200/24"
```

Here is the associated `ifconfig` output:

```
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether f4:6d:04:af:a0:a7
    inet6 fe80::f66d:4ff:feaf:a0a7%re0 prefixlen 64 scopeid 0x1
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether f4:6d:04:af:a0:a7
    inet6 fe80::240:f4ff:feec:b6bd%re1 prefixlen 64 scopeid 0x2
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether f4:6d:04:af:a0:a7
    inet 192.168.50.200 netmask 0xffffff00 broadcast 192.168.50.255
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    laggproto failover lagghash l2,l3,l4
    laggport: re1 flags=0<>
    laggport: re0 flags=5<MASTER,ACTIVE>
```

I have found some threads with a similar problem description. Their solution was, to tie Samba to a certain interface only, since it seems smbd and nmbd keep on sending and  receiving through more than one interface simultaneously. This simultaneous sending and receiving seems to cause this log-spam. So back to my trouble: I have two physical but tied together to one logical network interface - so actually samba should ONLY be sending and receiving though this logical one. So it wouldn't really help to tie my smb4.conf to lagg0. One idea I have could be <<the not really configured>> IPv6? It is not configured, but somehow I can see some IPv6 when I look at my ifconfig(8) output? So could it be, that samba tries to send via re0 and re1 by using IPv6 as a transport layer?

This is weird to me. Any ideas what could cause this?

Thanks


----------



## usdmatt (Nov 6, 2014)

Have you tried tying samba to lagg0? If it is trying to run on all interfaces, and assuming that re0 and lagg0 are independent, then that may cause problems like those seen in the log.


----------



## nakal (Nov 6, 2014)

Which host uses the IP 192.168.50.201? Can you find out? Your lagg0 uses only 192.168.50.200.


----------



## Leander (Nov 20, 2014)

Hi,



usdmatt said:


> Have you tried tying samba to lagg0? If it is trying to run on all interfaces, and assuming that re0 and lagg0 are independent, then that may cause problems like those seen in the log.


Thanks for your reply. I've read about this but it is only a workaround to the problem - not a solution. I'm looking for a solution on this 



nakal said:


> Which host uses the IP 192.168.50.201? Can you find out? Your lagg0 uses only 192.168.50.200.


The IP address 192.168.50.201 belongs to a QNAP NAS system. It also interacts as a Samba server. Even though I have "Domain Master" deactivated. Have a look at the attached screenshot below.


----------



## nakal (Nov 26, 2014)

It still seems that the QNAP NAS answers name queries. Not sure if it helps, but did you try to enter 192.168.50.200 as WINS server into the QNAP configuration?


----------

