LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-06-2011, 08:15 PM   #1
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
Samba on notebook with 2 NICs


I currently have Samba working properly using the eth0 interface on my notebook computer. More importantly, I can browse the network and see the shares set up in Samba. If I disconnect and go wireless using the wlan0 interface I can no longer browse the shares on Samba via name. I can however browse via IP address of the wlan0 interface. How can I make it so that Samba is accessible by name when I switch between interfaces?

Code:
[global]
  workgroup = startrek
  server string = NCC-1701 Enterprise
  bind interfaces only = yes
  interfaces = lo 192.168.4.0/255.255.255.0
  hosts allow = 192.168.4.0/255.255.255.0 127.0.0.1
  printcap name = /etc/printcap
  load printers = yes
  printing = lprng
  log file = /var/log/samba/%m.log
  max log size = 50
  security = user
  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  username map = /etc/samba/smbusers
  map to guest = Bad User
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  dns proxy = no 
#  netbios name = enterprise-e
  local master = no
  domain master = no
  preferred master = no
  wins proxy = yes
  name resolve order = lmhosts, host, wins, bcast

# Samba now defaults to denying symlinks found in exported shares per
# http://www.samba.org/samba/news/symlink_attack.html
# To allow symlinks to be followed in Windows clients, the below three are needed
  follow symlinks = yes
  wide links = yes
  unix extensions = no

#============================ Share Definitions ==============================
[homes]
  comment = Home Directories
  browseable = no
  writable = yes
  valid users = %S
  create mode = 0600
  directory mode = 0700
 
Old 07-06-2011, 10:00 PM   #2
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
Do your eth0 and wlan0 have different IP-addresses?
Try to ping your Samba-server from another PC by hostname. What IP do you see?

The hostname is associated with that IP. If you use a DNS server in your LAN, you have to edit the config file and add the second IP address to the Samba server hostname.

Last edited by Lexus45; 07-06-2011 at 10:02 PM.
 
Old 07-06-2011, 10:57 PM   #3
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Original Poster
Rep: Reputation: 56
Yes, my eth0 has 192.168.4.10 while my wlan0 gets 192.168.4.11. When I ping this Samba-server from another machine, the resulting IP address is 192.168.4.10. Say I don't have a DNS server on my network, which means I would have to accomplish this using the hosts file on each Windows machine that I would like to connect to this Samba-server. Would the correct hosts file be as follows:

192.168.4.10 enterprise-e
192.168.4.11 enterprise-e

To put aside any worries, are there ANY issues to assigning 2 IP addresses to one hostname?
 
Old 07-06-2011, 11:27 PM   #4
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
I even do not know if it's possible in MS Windows to assign the same hostname to two different IP addresses.
But I'm also interested in.

Try to edit your hosts file and then write here if everything is OK.
 
Old 07-06-2011, 11:44 PM   #5
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Original Poster
Rep: Reputation: 56
Whoa, that worked! Well browsing the Samba-server worked using the name, but if I were to ping enterprise-e I see that's it reaching 192.168.4.10 and times out. I wonder if there are anything drawbacks to assigning 2 IP addresses to one hostname...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HP Notebook, VISTA, wireless DSL. UBUNTU "Unable to resolve host notebook" uncledunc Linux - Laptop and Netbook 7 02-03-2009 12:19 PM
notebook display not maximised acer notebook assettt Linux - Newbie 5 09-09-2006 05:20 PM
two nics--ftp on outside nic--samba on inside nic tyler0123 Linux - Networking 2 04-15-2005 07:27 PM
Intel D845GLLY + Multiple Intel Pro 100 NICs + kernel 2.6.x = NICs don't work egable Linux - Hardware 0 02-04-2005 02:30 PM
Samba And My Xp Notebook franzillo Linux - Networking 3 08-05-2003 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration