Jump to content

Two NICS question


Go to solution Solved by bmartino1,

Recommended Posts

Hello, wonderful people!

 

Question, I have two NICs on my unRAID server, configured as such:

 

eth0 - 172.16.17.252

eth1 - 172.16.17.251

 

I want to have all my docker traffic go over eth1 (.251) but all my remote shares via eth0 (.252).

I have created the bridge and I thought I had it configured correctly, but for some reason, the dockers all show .252 as the IP address.

 

image.thumb.png.866c81366821d6a91f95a49269732637.png

 

image.thumb.png.d458bc05556a257218e8a2e7f6cf8547.png

 

Basically I thought this would be a fast way to separate the traffic so "acquisition" dockers (ahem, SAB, etc) would not run their traffic over the same NIC as the shares (where PLEX streams from).

 

image.thumb.png.b6d812ff1bee63532d0720433c686265.png

 

So, I'm just wondering what I'm doing wrong. 

Would it be easier to just change the FSTAB mounts in the media server?

 

I know that unRAID is using the management interface as .252

 

image.png.95238825bd28017299e94d2591c4b86b.png

 

Any words of advice? 

 

Link to comment

Or, is it because they're on the same subnet?

Should I create another, separate network in my router (say, 192.168.10.X/24 for example) and then assign that second NIC to that?

Basically, I guess I just don't understand how unRAID is handling the traffic. 

I didn't think having two NICs on the same subnet should be an issue - my QNAP separates its traffic fine between interfaces, all on the same subnet.

Link to comment

this can be done by editing the smb config and setting the interface option and ip option.
 


your smb would need 

interfaces = 172.16.17.252

For dockers I would leave unraid networking settings and default settings alone... maybe swaping mac nic for what eth# they are so eth0 and eth1 swap places.

making:
eth0 - 172.16.17.251

eth1 - 172.16.17.252

Have bridging off. May have bonding on but only for eth0


Then user script plugin and replace your smb config with this:
example smb config:

#
#======================= Global Settings =====================================
[global]

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
#       this line.  The included file is read at that point.
;include = /usr/local/samba/lib/smb.conf.%m

#UnRaid Default Configurable Identification

netbios name = BMM-Unraid
server string = VM - Docker Server
hide dot files = no
server multi channel support = yes
max open files = 40960
multicast dns register = No
disable netbios = No
local master = yes
os level = 200
security = USER
workgroup = WORKGROUP
map to guest = Bad User
passdb backend = smbpasswd
;null passwords = Yes
idmap config * : backend = tdb
idmap config * : range = 3000-7999
create mask = 0777
directory mask = 0777
bind interfaces only = yes
interfaces = 127.0.0.1 172.16.17.252

# log stuff only to syslog
logging = syslog@0

# we don't do printers
show add printer wizard = No
disable spoolss = Yes
load printers = No
printing = bsd
printcap name = /dev/null

# disable aio by default
aio read size = 0
aio write size = 0

# misc.
#invalid users = root
unix extensions = No
wide links = Yes
use sendfile = Yes
host msdfs = No

# ease upgrades from Samba 3.6
acl allow execute always = Yes

#========Other Settings that should be set

#Security:
ntlm auth = ntlmv1-permitted
server min protocol = SMB2

#Domain/AD Server Settings
local master = yes
dns proxy = no
preferred master = yes
server role = standalone server
name resolve order = host wins lmhosts bcast
winbind request timeout = 5
server signing = auto
strict locking = no

#File Path / share Settings
follow symlinks = yes
guest account = nobody
guest ok = Yes
map hidden = Yes
map system = Yes

case sensitive = True
default case = lower
preserve case = yes
short preserve case = yes

#Apple SMB2 samba File Settings
fruit:encoding = native
fruit:zero_file_id = false
fruit:nfs_aces = false
fruit:nfs_aces = No
rpc_server:mdssvc = disabled
rpc_daemon:mdssd = disabled
fruit:encoding = native
fruit:time machine max size = 0 #Unlimted
fruit:time machine = True
fruit:resource = stream
fruit:metadata = stream
vfs objects = catia fruit streams_xattr

#Performance tuning
smbd max xattr size = 2097152
#posix locking = No
read raw = yes
write raw = yes
use sendfile = Yes
#min receivefile size = 16384
#aio read size = 16384
#aio write size = 16384

[global]
        # hook for unassigned devices shares
        include = /etc/samba/smb-unassigned.conf

        # auto-configured shares
        include = /etc/samba/smb-shares.conf

 

Edited by bmartino1
smb ip fix
Link to comment

I'm not trying to be difficult, I just don't get why it needs to be that complicated.

So, if I were to take (what appears to be) the easier way out and remapping my FSTAB to .251, are we saying that unRAID will continue to serve that traffic over eth0?

Link to comment
  • Solution

smb is the servers service that you would edit for traffic over the interface.
We don't have access to edit the main unraid servers services config like other linux distro...
NFS is a different server config and has its own config type to set interfaces. NFS is harder to manipulate than smb for share settings. OP was not clear in how they were sharing...

In unriad this is not possible without editing the core service config and setting them to the desired interfaces.
Unraids networking is aimed at the end users for a point and click. 

 

Link to comment

Gotcha!

I apologize for not being complete - I just thought it was a high-level thing like "Shares" and not the protocol.

Thanks for all the exhaustive info. I think my best bet it to just set fstab in the media server to "force" that nic being used.

  • Like 1
Link to comment
  • 2 weeks later...

So I get this a lot in my Unifi logs:  

 

Multiple devices are using the same IP address: 172.16.17.252

 

I notice that the two NICs in unRAID flap between one being .251 and both being .252

Any idea why it might be doing this? They are two, physical NICs, different MAC addresses.

Is this part of unRAID's fairly simplistic "click and done" network setup?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...